fixes and admin data
This commit is contained in:
6
app.js
6
app.js
@@ -3,6 +3,12 @@ const { port, dbPass, cookiesSecret } = config;
|
|||||||
const express = require("express");
|
const express = require("express");
|
||||||
const app = express();
|
const app = express();
|
||||||
const loaders = require("./loaders/index.js");
|
const loaders = require("./loaders/index.js");
|
||||||
|
|
||||||
|
/* const crypto = require("crypto")
|
||||||
|
crypto.generateKeyPair("rsa", { modulusLength: 2048 }, (err, publicKey, privateKey) => {
|
||||||
|
console.log(publicKey.export({ format: "pem", type: "pkcs1" }))
|
||||||
|
console.log(privateKey.export({ format: "pem", type: "pkcs1" }))
|
||||||
|
}) */
|
||||||
//
|
//
|
||||||
// Server init function
|
// Server init function
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ exports.jwtSecret = process.env.JWT_SECRET;
|
|||||||
exports.MAIL_PASS = process.env.MAIL_PASS;
|
exports.MAIL_PASS = process.env.MAIL_PASS;
|
||||||
exports.s3_key = process.env.S3_KEY;
|
exports.s3_key = process.env.S3_KEY;
|
||||||
exports.s3_secret = process.env.S3_SECRET;
|
exports.s3_secret = process.env.S3_SECRET;
|
||||||
|
exports.appkey = process.env.APP_KEY
|
||||||
|
exports.publicKey = process.env.PUBLIC_KEY
|
||||||
@@ -9,6 +9,7 @@ const routeSearch = require("../routes/routeSearch.js");
|
|||||||
const routeImg = require("../routes/routeImg.js");
|
const routeImg = require("../routes/routeImg.js");
|
||||||
const routePayments = require("../routes/routePayments.js");
|
const routePayments = require("../routes/routePayments.js");
|
||||||
const routeHealth = require("../routes/routeHealth.js");
|
const routeHealth = require("../routes/routeHealth.js");
|
||||||
|
const routeAdmin = require("../routes/routeAdmin.js")
|
||||||
|
|
||||||
const loadExpress = ({ app, secret }) => {
|
const loadExpress = ({ app, secret }) => {
|
||||||
const limiter = rateLimiter({
|
const limiter = rateLimiter({
|
||||||
@@ -31,6 +32,7 @@ const loadExpress = ({ app, secret }) => {
|
|||||||
app.use("/search", routeSearch);
|
app.use("/search", routeSearch);
|
||||||
app.use("/payments", routePayments);
|
app.use("/payments", routePayments);
|
||||||
app.use("/healthcheck", routeHealth);
|
app.use("/healthcheck", routeHealth);
|
||||||
|
app.use("/00xc232", routeAdmin)
|
||||||
|
|
||||||
return app;
|
return app;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ const reportSchema = mongoose.Schema({
|
|||||||
invoicesSent: Number
|
invoicesSent: Number
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exorts = mongoose.model("Report", reportSchema);
|
module.exports = mongoose.model("Report", reportSchema);
|
||||||
4
node_modules/binary-extensions/binary-extensions.json
generated
vendored
4
node_modules/binary-extensions/binary-extensions.json
generated
vendored
@@ -134,10 +134,14 @@
|
|||||||
"numbers",
|
"numbers",
|
||||||
"nupkg",
|
"nupkg",
|
||||||
"o",
|
"o",
|
||||||
|
"odp",
|
||||||
|
"ods",
|
||||||
|
"odt",
|
||||||
"oga",
|
"oga",
|
||||||
"ogg",
|
"ogg",
|
||||||
"ogv",
|
"ogv",
|
||||||
"otf",
|
"otf",
|
||||||
|
"ott",
|
||||||
"pages",
|
"pages",
|
||||||
"pbm",
|
"pbm",
|
||||||
"pcx",
|
"pcx",
|
||||||
|
|||||||
60
node_modules/binary-extensions/package.json
generated
vendored
60
node_modules/binary-extensions/package.json
generated
vendored
@@ -1,26 +1,53 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "binary-extensions@^2.0.0",
|
||||||
|
"_id": "binary-extensions@2.2.0",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
||||||
|
"_location": "/binary-extensions",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "binary-extensions@^2.0.0",
|
||||||
"name": "binary-extensions",
|
"name": "binary-extensions",
|
||||||
"version": "2.1.0",
|
"escapedName": "binary-extensions",
|
||||||
"description": "List of binary file extensions",
|
"rawSpec": "^2.0.0",
|
||||||
"license": "MIT",
|
"saveSpec": null,
|
||||||
"repository": "sindresorhus/binary-extensions",
|
"fetchSpec": "^2.0.0"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/is-binary-path"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||||
|
"_shasum": "75f502eeaf9ffde42fc98829645be4ea76bd9e2d",
|
||||||
|
"_spec": "binary-extensions@^2.0.0",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\is-binary-path",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
"url": "sindresorhus.com"
|
"url": "sindresorhus.com"
|
||||||
},
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/sindresorhus/binary-extensions/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "List of binary file extensions",
|
||||||
|
"devDependencies": {
|
||||||
|
"ava": "^1.4.1",
|
||||||
|
"tsd": "^0.7.2",
|
||||||
|
"xo": "^0.24.0"
|
||||||
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"test": "xo && ava && tsd"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
"index.d.ts",
|
"index.d.ts",
|
||||||
"binary-extensions.json",
|
"binary-extensions.json",
|
||||||
"binary-extensions.json.d.ts"
|
"binary-extensions.json.d.ts"
|
||||||
],
|
],
|
||||||
|
"homepage": "https://github.com/sindresorhus/binary-extensions#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"binary",
|
"binary",
|
||||||
"extensions",
|
"extensions",
|
||||||
@@ -30,13 +57,14 @@
|
|||||||
"list",
|
"list",
|
||||||
"array"
|
"array"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"license": "MIT",
|
||||||
"ava": "^1.4.1",
|
"name": "binary-extensions",
|
||||||
"tsd": "^0.7.2",
|
"repository": {
|
||||||
"xo": "^0.24.0"
|
"type": "git",
|
||||||
}
|
"url": "git+https://github.com/sindresorhus/binary-extensions.git"
|
||||||
|
},
|
||||||
,"_resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz"
|
"scripts": {
|
||||||
,"_integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ=="
|
"test": "xo && ava && tsd"
|
||||||
,"_from": "binary-extensions@2.1.0"
|
},
|
||||||
|
"version": "2.2.0"
|
||||||
}
|
}
|
||||||
2
node_modules/binary-extensions/readme.md
generated
vendored
2
node_modules/binary-extensions/readme.md
generated
vendored
@@ -1,4 +1,4 @@
|
|||||||
# binary-extensions [](https://travis-ci.org/sindresorhus/binary-extensions)
|
# binary-extensions
|
||||||
|
|
||||||
> List of binary file extensions
|
> List of binary file extensions
|
||||||
|
|
||||||
|
|||||||
2
node_modules/cacheable-request/node_modules/get-stream/index.d.ts
generated
vendored
2
node_modules/cacheable-request/node_modules/get-stream/index.d.ts
generated
vendored
@@ -86,7 +86,7 @@ declare const getStream: {
|
|||||||
- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array.
|
- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array.
|
||||||
- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array.
|
- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array.
|
||||||
*/
|
*/
|
||||||
array<StreamObjectModeType = unknown>(
|
array<StreamObjectModeType>(
|
||||||
stream: Stream,
|
stream: Stream,
|
||||||
options?: getStream.Options
|
options?: getStream.Options
|
||||||
): Promise<StreamObjectModeType[]>;
|
): Promise<StreamObjectModeType[]>;
|
||||||
|
|||||||
4
node_modules/cacheable-request/node_modules/get-stream/index.js
generated
vendored
4
node_modules/cacheable-request/node_modules/get-stream/index.js
generated
vendored
@@ -1,4 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
const {constants: BufferConstants} = require('buffer');
|
||||||
const pump = require('pump');
|
const pump = require('pump');
|
||||||
const bufferStream = require('./buffer-stream');
|
const bufferStream = require('./buffer-stream');
|
||||||
|
|
||||||
@@ -24,7 +25,8 @@ async function getStream(inputStream, options) {
|
|||||||
let stream;
|
let stream;
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
const rejectPromise = error => {
|
const rejectPromise = error => {
|
||||||
if (error) { // A null check
|
// Don't retrieve an oversized buffer.
|
||||||
|
if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
||||||
error.bufferedData = stream.getBufferedValue();
|
error.bufferedData = stream.getBufferedValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
node_modules/cacheable-request/node_modules/get-stream/license
generated
vendored
2
node_modules/cacheable-request/node_modules/get-stream/license
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|||||||
71
node_modules/cacheable-request/node_modules/get-stream/package.json
generated
vendored
71
node_modules/cacheable-request/node_modules/get-stream/package.json
generated
vendored
@@ -1,25 +1,58 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "get-stream@^5.1.0",
|
||||||
|
"_id": "get-stream@5.2.0",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
|
||||||
|
"_location": "/cacheable-request/get-stream",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "get-stream@^5.1.0",
|
||||||
"name": "get-stream",
|
"name": "get-stream",
|
||||||
"version": "5.1.0",
|
"escapedName": "get-stream",
|
||||||
"description": "Get a stream as a string, buffer, or array",
|
"rawSpec": "^5.1.0",
|
||||||
"license": "MIT",
|
"saveSpec": null,
|
||||||
"repository": "sindresorhus/get-stream",
|
"fetchSpec": "^5.1.0"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/cacheable-request"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
|
||||||
|
"_shasum": "4966a1795ee5ace65e706c4b7beb71257d6e22d3",
|
||||||
|
"_spec": "get-stream@^5.1.0",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\cacheable-request",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
"url": "sindresorhus.com"
|
"url": "https://sindresorhus.com"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/sindresorhus/get-stream/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"dependencies": {
|
||||||
|
"pump": "^3.0.0"
|
||||||
|
},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Get a stream as a string, buffer, or array",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^12.0.7",
|
||||||
|
"ava": "^2.0.0",
|
||||||
|
"into-stream": "^5.0.0",
|
||||||
|
"tsd": "^0.7.2",
|
||||||
|
"xo": "^0.24.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"test": "xo && ava && tsd"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
"index.d.ts",
|
"index.d.ts",
|
||||||
"buffer-stream.js"
|
"buffer-stream.js"
|
||||||
],
|
],
|
||||||
|
"funding": "https://github.com/sponsors/sindresorhus",
|
||||||
|
"homepage": "https://github.com/sindresorhus/get-stream#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"get",
|
"get",
|
||||||
"stream",
|
"stream",
|
||||||
@@ -36,18 +69,14 @@
|
|||||||
"array",
|
"array",
|
||||||
"object"
|
"object"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"license": "MIT",
|
||||||
"pump": "^3.0.0"
|
"name": "get-stream",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/sindresorhus/get-stream.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"scripts": {
|
||||||
"@types/node": "^11.13.0",
|
"test": "xo && ava && tsd"
|
||||||
"ava": "^1.4.1",
|
},
|
||||||
"into-stream": "^5.0.0",
|
"version": "5.2.0"
|
||||||
"tsd": "^0.7.2",
|
|
||||||
"xo": "^0.24.0"
|
|
||||||
}
|
|
||||||
|
|
||||||
,"_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz"
|
|
||||||
,"_integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw=="
|
|
||||||
,"_from": "get-stream@5.1.0"
|
|
||||||
}
|
}
|
||||||
35
node_modules/cacheable-request/node_modules/get-stream/readme.md
generated
vendored
35
node_modules/cacheable-request/node_modules/get-stream/readme.md
generated
vendored
@@ -1,15 +1,13 @@
|
|||||||
# get-stream [](https://travis-ci.org/sindresorhus/get-stream)
|
# get-stream [](https://travis-ci.com/github/sindresorhus/get-stream)
|
||||||
|
|
||||||
> Get a stream as a string, buffer, or array
|
> Get a stream as a string, buffer, or array
|
||||||
|
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm install get-stream
|
$ npm install get-stream
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@@ -44,40 +42,39 @@ const getStream = require('get-stream');
|
|||||||
})();
|
})();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode.
|
The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode.
|
||||||
|
|
||||||
### getStream(stream, [options])
|
### getStream(stream, options?)
|
||||||
|
|
||||||
Get the `stream` as a string.
|
Get the `stream` as a string.
|
||||||
|
|
||||||
#### options
|
#### options
|
||||||
|
|
||||||
Type: `Object`
|
Type: `object`
|
||||||
|
|
||||||
##### encoding
|
##### encoding
|
||||||
|
|
||||||
Type: `string`<br>
|
Type: `string`\
|
||||||
Default: `utf8`
|
Default: `'utf8'`
|
||||||
|
|
||||||
[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream.
|
[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream.
|
||||||
|
|
||||||
##### maxBuffer
|
##### maxBuffer
|
||||||
|
|
||||||
Type: `number`<br>
|
Type: `number`\
|
||||||
Default: `Infinity`
|
Default: `Infinity`
|
||||||
|
|
||||||
Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected with a `getStream.MaxBufferError` error.
|
Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected with a `getStream.MaxBufferError` error.
|
||||||
|
|
||||||
### getStream.buffer(stream, [options])
|
### getStream.buffer(stream, options?)
|
||||||
|
|
||||||
Get the `stream` as a buffer.
|
Get the `stream` as a buffer.
|
||||||
|
|
||||||
It honors the `maxBuffer` option as above, but it refers to byte length rather than string length.
|
It honors the `maxBuffer` option as above, but it refers to byte length rather than string length.
|
||||||
|
|
||||||
### getStream.array(stream, [options])
|
### getStream.array(stream, options?)
|
||||||
|
|
||||||
Get the `stream` as an array of values.
|
Get the `stream` as an array of values.
|
||||||
|
|
||||||
@@ -89,7 +86,6 @@ It honors both the `maxBuffer` and `encoding` options. The behavior changes slig
|
|||||||
|
|
||||||
- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array.
|
- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array.
|
||||||
|
|
||||||
|
|
||||||
## Errors
|
## Errors
|
||||||
|
|
||||||
If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error.
|
If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error.
|
||||||
@@ -105,19 +101,24 @@ If the input stream emits an `error` event, the promise will be rejected with th
|
|||||||
})()
|
})()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)?
|
### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)?
|
||||||
|
|
||||||
This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package.
|
This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package.
|
||||||
|
|
||||||
|
|
||||||
## Related
|
## Related
|
||||||
|
|
||||||
- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer
|
- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## License
|
<div align="center">
|
||||||
|
<b>
|
||||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
<a href="https://tidelift.com/subscription/pkg/npm-get-stream?utm_source=npm-get-stream&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||||
|
</b>
|
||||||
|
<br>
|
||||||
|
<sub>
|
||||||
|
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||||
|
</sub>
|
||||||
|
</div>
|
||||||
|
|||||||
6
node_modules/chalk/node_modules/supports-color/index.js
generated
vendored
6
node_modules/chalk/node_modules/supports-color/index.js
generated
vendored
@@ -81,7 +81,7 @@ function supportsColor(haveStream, streamIsTTY) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ('CI' in env) {
|
if ('CI' in env) {
|
||||||
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,10 +92,6 @@ function supportsColor(haveStream, streamIsTTY) {
|
|||||||
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('GITHUB_ACTIONS' in env) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (env.COLORTERM === 'truecolor') {
|
if (env.COLORTERM === 'truecolor') {
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|||||||
64
node_modules/chalk/node_modules/supports-color/package.json
generated
vendored
64
node_modules/chalk/node_modules/supports-color/package.json
generated
vendored
@@ -1,24 +1,55 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "supports-color@^7.1.0",
|
||||||
|
"_id": "supports-color@7.2.0",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||||
|
"_location": "/chalk/supports-color",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "supports-color@^7.1.0",
|
||||||
"name": "supports-color",
|
"name": "supports-color",
|
||||||
"version": "7.1.0",
|
"escapedName": "supports-color",
|
||||||
"description": "Detect whether a terminal supports color",
|
"rawSpec": "^7.1.0",
|
||||||
"license": "MIT",
|
"saveSpec": null,
|
||||||
"repository": "chalk/supports-color",
|
"fetchSpec": "^7.1.0"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/chalk"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||||
|
"_shasum": "1b7dcdcb32b8138801b3e478ba6a51caa89648da",
|
||||||
|
"_spec": "supports-color@^7.1.0",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\chalk",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
"url": "sindresorhus.com"
|
"url": "sindresorhus.com"
|
||||||
},
|
},
|
||||||
|
"browser": "browser.js",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/chalk/supports-color/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"dependencies": {
|
||||||
|
"has-flag": "^4.0.0"
|
||||||
|
},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Detect whether a terminal supports color",
|
||||||
|
"devDependencies": {
|
||||||
|
"ava": "^1.4.1",
|
||||||
|
"import-fresh": "^3.0.0",
|
||||||
|
"xo": "^0.24.0"
|
||||||
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"test": "xo && ava"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
"browser.js"
|
"browser.js"
|
||||||
],
|
],
|
||||||
|
"homepage": "https://github.com/chalk/supports-color#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"color",
|
"color",
|
||||||
"colour",
|
"colour",
|
||||||
@@ -41,17 +72,14 @@
|
|||||||
"truecolor",
|
"truecolor",
|
||||||
"16m"
|
"16m"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"license": "MIT",
|
||||||
"has-flag": "^4.0.0"
|
"name": "supports-color",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/chalk/supports-color.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"scripts": {
|
||||||
"ava": "^1.4.1",
|
"test": "xo && ava"
|
||||||
"import-fresh": "^3.0.0",
|
|
||||||
"xo": "^0.24.0"
|
|
||||||
},
|
},
|
||||||
"browser": "browser.js"
|
"version": "7.2.0"
|
||||||
|
|
||||||
,"_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz"
|
|
||||||
,"_integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g=="
|
|
||||||
,"_from": "supports-color@7.1.0"
|
|
||||||
}
|
}
|
||||||
21
node_modules/chokidar/README.md
generated
vendored
21
node_modules/chokidar/README.md
generated
vendored
@@ -1,11 +1,9 @@
|
|||||||
# Chokidar [](https://github.com/paulmillr/chokidar) [](https://github.com/paulmillr/chokidar)
|
# Chokidar [](https://github.com/paulmillr/chokidar) [](https://github.com/paulmillr/chokidar)
|
||||||
|
|
||||||
> A neat wrapper around Node.js fs.watch / fs.watchFile / FSEvents.
|
> Minimal and efficient cross-platform file watching library
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/chokidar)
|
[](https://www.npmjs.com/package/chokidar)
|
||||||
|
|
||||||
Version 3 is out! Check out our blog post about it: [Chokidar 3: How to save 32TB of traffic every week](https://paulmillr.com/posts/chokidar-3-save-32tb-of-traffic/)
|
|
||||||
|
|
||||||
## Why?
|
## Why?
|
||||||
|
|
||||||
Node.js `fs.watch`:
|
Node.js `fs.watch`:
|
||||||
@@ -35,6 +33,8 @@ Initially made for **[Brunch](https://brunch.io/)** (an ultra-swift web app buil
|
|||||||
and [many others](https://www.npmjs.com/browse/depended/chokidar).
|
and [many others](https://www.npmjs.com/browse/depended/chokidar).
|
||||||
It has proven itself in production environments.
|
It has proven itself in production environments.
|
||||||
|
|
||||||
|
Version 3 is out! Check out our blog post about it: [Chokidar 3: How to save 32TB of traffic every week](https://paulmillr.com/posts/chokidar-3-save-32tb-of-traffic/)
|
||||||
|
|
||||||
## How?
|
## How?
|
||||||
|
|
||||||
Chokidar does still rely on the Node.js core `fs` module, but when using
|
Chokidar does still rely on the Node.js core `fs` module, but when using
|
||||||
@@ -74,7 +74,7 @@ chokidar.watch('.').on('all', (event, path) => {
|
|||||||
## API
|
## API
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// Example of a more typical implementation structure:
|
// Example of a more typical implementation structure
|
||||||
|
|
||||||
// Initialize watcher.
|
// Initialize watcher.
|
||||||
const watcher = chokidar.watch('file, dir, glob, or array', {
|
const watcher = chokidar.watch('file, dir, glob, or array', {
|
||||||
@@ -253,9 +253,9 @@ Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`,
|
|||||||
`raw`, `error`.
|
`raw`, `error`.
|
||||||
Additionally `all` is available which gets emitted with the underlying event
|
Additionally `all` is available which gets emitted with the underlying event
|
||||||
name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully.
|
name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully.
|
||||||
* `.unwatch(path / paths)`: **async** Stop watching files, directories, or glob patterns.
|
* `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns.
|
||||||
Takes an array of strings or just one string. Use with `await` to ensure bugs don't happen.
|
Takes an array of strings or just one string. Use with `await` to ensure bugs don't happen.
|
||||||
* `.close()`: Removes all listeners from watched files. Asynchronous, returns Promise.
|
* `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise.
|
||||||
* `.getWatched()`: Returns an object representing all the paths on the file
|
* `.getWatched()`: Returns an object representing all the paths on the file
|
||||||
system being watched by this `FSWatcher` instance. The object's keys are all the
|
system being watched by this `FSWatcher` instance. The object's keys are all the
|
||||||
directories (using absolute paths unless the `cwd` option was used), and the
|
directories (using absolute paths unless the `cwd` option was used), and the
|
||||||
@@ -286,7 +286,8 @@ execute a command on each change, or get a stdio stream of change events.
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md).
|
For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md).
|
||||||
- **v3.4 (Apr 26, 2020):** Support for directory-based symlinks. Macos file replacement fixes.
|
- **v3.5 (Jan 6, 2021):** Support for ARM Macs with Apple Silicon. Fixes for deleted symlinks.
|
||||||
|
- **v3.4 (Apr 26, 2020):** Support for directory-based symlinks. Fixes for macos file replacement.
|
||||||
- **v3.3 (Nov 2, 2019):** `FSWatcher#close()` method became async. That fixes IO race conditions related to close method.
|
- **v3.3 (Nov 2, 2019):** `FSWatcher#close()` method became async. That fixes IO race conditions related to close method.
|
||||||
- **v3.2 (Oct 1, 2019):** Improve Linux RAM usage by 50%. Race condition fixes. Windows glob fixes. Improve stability by using tight range of dependency versions.
|
- **v3.2 (Oct 1, 2019):** Improve Linux RAM usage by 50%. Race condition fixes. Windows glob fixes. Improve stability by using tight range of dependency versions.
|
||||||
- **v3.1 (Sep 16, 2019):** dotfiles are no longer filtered out by default. Use `ignored` option if needed. Improve initial Linux scan time by 50%.
|
- **v3.1 (Sep 16, 2019):** dotfiles are no longer filtered out by default. Use `ignored` option if needed. Improve initial Linux scan time by 50%.
|
||||||
@@ -295,6 +296,12 @@ For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md
|
|||||||
- **v1 (Apr 7, 2015):** Glob support, symlink support, tons of bugfixes. Node 0.8+ is supported
|
- **v1 (Apr 7, 2015):** Glob support, symlink support, tons of bugfixes. Node 0.8+ is supported
|
||||||
- **v0.1 (Apr 20, 2012):** Initial release, extracted from [Brunch](https://github.com/brunch/brunch/blob/9847a065aea300da99bd0753f90354cde9de1261/src/helpers.coffee#L66)
|
- **v0.1 (Apr 20, 2012):** Initial release, extracted from [Brunch](https://github.com/brunch/brunch/blob/9847a065aea300da99bd0753f90354cde9de1261/src/helpers.coffee#L66)
|
||||||
|
|
||||||
|
## Also
|
||||||
|
|
||||||
|
Why was chokidar named this way? What's the meaning behind it?
|
||||||
|
|
||||||
|
>Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four).
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT (c) Paul Miller (<https://paulmillr.com>), see [LICENSE](LICENSE) file.
|
MIT (c) Paul Miller (<https://paulmillr.com>), see [LICENSE](LICENSE) file.
|
||||||
|
|||||||
33
node_modules/chokidar/index.js
generated
vendored
33
node_modules/chokidar/index.js
generated
vendored
@@ -34,6 +34,7 @@ const {
|
|||||||
REPLACER_RE,
|
REPLACER_RE,
|
||||||
|
|
||||||
SLASH,
|
SLASH,
|
||||||
|
SLASH_SLASH,
|
||||||
BRACE_START,
|
BRACE_START,
|
||||||
BANG,
|
BANG,
|
||||||
ONE_DOT,
|
ONE_DOT,
|
||||||
@@ -96,11 +97,20 @@ const unifyPaths = (paths_) => {
|
|||||||
return paths.map(normalizePathToUnix);
|
return paths.map(normalizePathToUnix);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// If SLASH_SLASH occurs at the beginning of path, it is not replaced
|
||||||
|
// because "//StoragePC/DrivePool/Movies" is a valid network path
|
||||||
const toUnix = (string) => {
|
const toUnix = (string) => {
|
||||||
let str = string.replace(BACK_SLASH_RE, SLASH);
|
let str = string.replace(BACK_SLASH_RE, SLASH);
|
||||||
|
let prepend = false;
|
||||||
|
if (str.startsWith(SLASH_SLASH)) {
|
||||||
|
prepend = true;
|
||||||
|
}
|
||||||
while (str.match(DOUBLE_SLASH_RE)) {
|
while (str.match(DOUBLE_SLASH_RE)) {
|
||||||
str = str.replace(DOUBLE_SLASH_RE, SLASH);
|
str = str.replace(DOUBLE_SLASH_RE, SLASH);
|
||||||
}
|
}
|
||||||
|
if (prepend) {
|
||||||
|
str = SLASH + str;
|
||||||
|
}
|
||||||
return str;
|
return str;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -854,6 +864,15 @@ _remove(directory, item, isDirectory) {
|
|||||||
const wasTracked = parent.has(item);
|
const wasTracked = parent.has(item);
|
||||||
parent.remove(item);
|
parent.remove(item);
|
||||||
|
|
||||||
|
// Fixes issue #1042 -> Relative paths were detected and added as symlinks
|
||||||
|
// (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612),
|
||||||
|
// but never removed from the map in case the path was deleted.
|
||||||
|
// This leads to an incorrect state if the path was recreated:
|
||||||
|
// https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553
|
||||||
|
if (this._symlinkPaths.has(fullPath)) {
|
||||||
|
this._symlinkPaths.delete(fullPath);
|
||||||
|
}
|
||||||
|
|
||||||
// If we wait for this file to be fully written, cancel the wait.
|
// If we wait for this file to be fully written, cancel the wait.
|
||||||
let relPath = path;
|
let relPath = path;
|
||||||
if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);
|
if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);
|
||||||
@@ -876,16 +895,24 @@ _remove(directory, item, isDirectory) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Closes all watchers for a path
|
||||||
* @param {Path} path
|
* @param {Path} path
|
||||||
*/
|
*/
|
||||||
_closePath(path) {
|
_closePath(path) {
|
||||||
|
this._closeFile(path)
|
||||||
|
const dir = sysPath.dirname(path);
|
||||||
|
this._getWatchedDir(dir).remove(sysPath.basename(path));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Closes only file-specific watchers
|
||||||
|
* @param {Path} path
|
||||||
|
*/
|
||||||
|
_closeFile(path) {
|
||||||
const closers = this._closers.get(path);
|
const closers = this._closers.get(path);
|
||||||
if (!closers) return;
|
if (!closers) return;
|
||||||
closers.forEach(closer => closer());
|
closers.forEach(closer => closer());
|
||||||
this._closers.delete(path);
|
this._closers.delete(path);
|
||||||
const dir = sysPath.dirname(path);
|
|
||||||
this._getWatchedDir(dir).remove(sysPath.basename(path));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
2
node_modules/chokidar/lib/constants.js
generated
vendored
2
node_modules/chokidar/lib/constants.js
generated
vendored
@@ -41,6 +41,7 @@ exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
|
|||||||
exports.REPLACER_RE = /^\.[/\\]/;
|
exports.REPLACER_RE = /^\.[/\\]/;
|
||||||
|
|
||||||
exports.SLASH = '/';
|
exports.SLASH = '/';
|
||||||
|
exports.SLASH_SLASH = '//';
|
||||||
exports.BRACE_START = '{';
|
exports.BRACE_START = '{';
|
||||||
exports.BANG = '!';
|
exports.BANG = '!';
|
||||||
exports.ONE_DOT = '.';
|
exports.ONE_DOT = '.';
|
||||||
@@ -59,3 +60,4 @@ exports.IDENTITY_FN = val => val;
|
|||||||
|
|
||||||
exports.isWindows = platform === 'win32';
|
exports.isWindows = platform === 'win32';
|
||||||
exports.isMacos = platform === 'darwin';
|
exports.isMacos = platform === 'darwin';
|
||||||
|
exports.isLinux = platform === 'linux';
|
||||||
|
|||||||
11
node_modules/chokidar/lib/fsevents-handler.js
generated
vendored
11
node_modules/chokidar/lib/fsevents-handler.js
generated
vendored
@@ -103,7 +103,7 @@ const createFSEventsInstance = (path, callback) => {
|
|||||||
* @param {Function} rawEmitter - passes data to listeners of the 'raw' event
|
* @param {Function} rawEmitter - passes data to listeners of the 'raw' event
|
||||||
* @returns {Function} closer
|
* @returns {Function} closer
|
||||||
*/
|
*/
|
||||||
function setFSEventsListener(path, realPath, listener, rawEmitter, fsw) {
|
function setFSEventsListener(path, realPath, listener, rawEmitter) {
|
||||||
let watchPath = sysPath.extname(path) ? sysPath.dirname(path) : path;
|
let watchPath = sysPath.extname(path) ? sysPath.dirname(path) : path;
|
||||||
const parentPath = sysPath.dirname(watchPath);
|
const parentPath = sysPath.dirname(watchPath);
|
||||||
let cont = FSEventsWatchers.get(watchPath);
|
let cont = FSEventsWatchers.get(watchPath);
|
||||||
@@ -146,7 +146,7 @@ function setFSEventsListener(path, realPath, listener, rawEmitter, fsw) {
|
|||||||
listeners: new Set([filteredListener]),
|
listeners: new Set([filteredListener]),
|
||||||
rawEmitter,
|
rawEmitter,
|
||||||
watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {
|
watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {
|
||||||
if (fsw.closed) return;
|
if (!cont.listeners.size) return;
|
||||||
const info = fsevents.getInfo(fullPath, flags);
|
const info = fsevents.getInfo(fullPath, flags);
|
||||||
cont.listeners.forEach(list => {
|
cont.listeners.forEach(list => {
|
||||||
list(fullPath, flags, info);
|
list(fullPath, flags, info);
|
||||||
@@ -242,7 +242,6 @@ async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts
|
|||||||
try {
|
try {
|
||||||
const stats = await stat(path)
|
const stats = await stat(path)
|
||||||
if (this.fsw.closed) return;
|
if (this.fsw.closed) return;
|
||||||
if (this.fsw.closed) return;
|
|
||||||
if (sameTypes(info, stats)) {
|
if (sameTypes(info, stats)) {
|
||||||
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
|
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
|
||||||
} else {
|
} else {
|
||||||
@@ -300,8 +299,7 @@ handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opt
|
|||||||
* @returns {Function} closer for the watcher instance
|
* @returns {Function} closer for the watcher instance
|
||||||
*/
|
*/
|
||||||
_watchWithFsEvents(watchPath, realPath, transform, globFilter) {
|
_watchWithFsEvents(watchPath, realPath, transform, globFilter) {
|
||||||
if (this.fsw.closed) return;
|
if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;
|
||||||
if (this.fsw._isIgnored(watchPath)) return;
|
|
||||||
const opts = this.fsw.options;
|
const opts = this.fsw.options;
|
||||||
const watchCallback = async (fullPath, flags, info) => {
|
const watchCallback = async (fullPath, flags, info) => {
|
||||||
if (this.fsw.closed) return;
|
if (this.fsw.closed) return;
|
||||||
@@ -353,8 +351,7 @@ _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
|
|||||||
watchPath,
|
watchPath,
|
||||||
realPath,
|
realPath,
|
||||||
watchCallback,
|
watchCallback,
|
||||||
this.fsw._emitRaw,
|
this.fsw._emitRaw
|
||||||
this.fsw
|
|
||||||
);
|
);
|
||||||
|
|
||||||
this.fsw._emitReady();
|
this.fsw._emitReady();
|
||||||
|
|||||||
19
node_modules/chokidar/lib/nodefs-handler.js
generated
vendored
19
node_modules/chokidar/lib/nodefs-handler.js
generated
vendored
@@ -6,6 +6,7 @@ const { promisify } = require('util');
|
|||||||
const isBinaryPath = require('is-binary-path');
|
const isBinaryPath = require('is-binary-path');
|
||||||
const {
|
const {
|
||||||
isWindows,
|
isWindows,
|
||||||
|
isLinux,
|
||||||
EMPTY_FN,
|
EMPTY_FN,
|
||||||
EMPTY_STR,
|
EMPTY_STR,
|
||||||
KEY_LISTENERS,
|
KEY_LISTENERS,
|
||||||
@@ -356,8 +357,7 @@ _handleFile(file, stats, initialAdd) {
|
|||||||
// if the file is already being watched, do nothing
|
// if the file is already being watched, do nothing
|
||||||
if (parent.has(basename)) return;
|
if (parent.has(basename)) return;
|
||||||
|
|
||||||
// kick off the watcher
|
const listener = async (path, newStats) => {
|
||||||
const closer = this._watchWithNodeFs(file, async (path, newStats) => {
|
|
||||||
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;
|
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;
|
||||||
if (!newStats || newStats.mtimeMs === 0) {
|
if (!newStats || newStats.mtimeMs === 0) {
|
||||||
try {
|
try {
|
||||||
@@ -369,7 +369,13 @@ _handleFile(file, stats, initialAdd) {
|
|||||||
if (!at || at <= mt || mt !== prevStats.mtimeMs) {
|
if (!at || at <= mt || mt !== prevStats.mtimeMs) {
|
||||||
this.fsw._emit(EV_CHANGE, file, newStats);
|
this.fsw._emit(EV_CHANGE, file, newStats);
|
||||||
}
|
}
|
||||||
|
if (isLinux && prevStats.ino !== newStats.ino) {
|
||||||
|
this.fsw._closeFile(path)
|
||||||
prevStats = newStats;
|
prevStats = newStats;
|
||||||
|
this.fsw._addPathCloser(path, this._watchWithNodeFs(file, listener));
|
||||||
|
} else {
|
||||||
|
prevStats = newStats;
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Fix issues where mtime is null but file is still present
|
// Fix issues where mtime is null but file is still present
|
||||||
this.fsw._remove(dirname, basename);
|
this.fsw._remove(dirname, basename);
|
||||||
@@ -384,7 +390,9 @@ _handleFile(file, stats, initialAdd) {
|
|||||||
}
|
}
|
||||||
prevStats = newStats;
|
prevStats = newStats;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
// kick off the watcher
|
||||||
|
const closer = this._watchWithNodeFs(file, listener);
|
||||||
|
|
||||||
// emit an add event if we're supposed to
|
// emit an add event if we're supposed to
|
||||||
if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {
|
if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {
|
||||||
@@ -595,13 +603,14 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
|
|||||||
const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START);
|
const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START);
|
||||||
let closer;
|
let closer;
|
||||||
if (stats.isDirectory()) {
|
if (stats.isDirectory()) {
|
||||||
|
const absPath = sysPath.resolve(path);
|
||||||
const targetPath = follow ? await fsrealpath(path) : path;
|
const targetPath = follow ? await fsrealpath(path) : path;
|
||||||
if (this.fsw.closed) return;
|
if (this.fsw.closed) return;
|
||||||
closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
|
closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
|
||||||
if (this.fsw.closed) return;
|
if (this.fsw.closed) return;
|
||||||
// preserve this symlink's target path
|
// preserve this symlink's target path
|
||||||
if (path !== targetPath && targetPath !== undefined) {
|
if (absPath !== targetPath && targetPath !== undefined) {
|
||||||
this.fsw._symlinkPaths.set(targetPath, true);
|
this.fsw._symlinkPaths.set(absPath, targetPath);
|
||||||
}
|
}
|
||||||
} else if (stats.isSymbolicLink()) {
|
} else if (stats.isSymbolicLink()) {
|
||||||
const targetPath = follow ? await fsrealpath(path) : path;
|
const targetPath = follow ? await fsrealpath(path) : path;
|
||||||
|
|||||||
154
node_modules/chokidar/package.json
generated
vendored
154
node_modules/chokidar/package.json
generated
vendored
@@ -1,34 +1,61 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "chokidar@^3.2.2",
|
||||||
|
"_id": "chokidar@3.5.1",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==",
|
||||||
|
"_location": "/chokidar",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "chokidar@^3.2.2",
|
||||||
"name": "chokidar",
|
"name": "chokidar",
|
||||||
"description": "A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.",
|
"escapedName": "chokidar",
|
||||||
"version": "3.4.0",
|
"rawSpec": "^3.2.2",
|
||||||
"homepage": "https://github.com/paulmillr/chokidar",
|
"saveSpec": null,
|
||||||
"author": "Paul Miller (https://paulmillr.com)",
|
"fetchSpec": "^3.2.2"
|
||||||
"contributors": [
|
|
||||||
"Paul Miller (https://paulmillr.com)",
|
|
||||||
"Elan Shanker"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 8.10.0"
|
|
||||||
},
|
},
|
||||||
"main": "index.js",
|
"_requiredBy": [
|
||||||
|
"/nodemon"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz",
|
||||||
|
"_shasum": "ee9ce7bbebd2b79f49f304799d5468e31e14e68a",
|
||||||
|
"_spec": "chokidar@^3.2.2",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\nodemon",
|
||||||
|
"author": {
|
||||||
|
"name": "Paul Miller",
|
||||||
|
"url": "https://paulmillr.com"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/paulmillr/chokidar/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"name": "Paul Miller",
|
||||||
|
"url": "https://paulmillr.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Elan Shanker"
|
||||||
|
}
|
||||||
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"anymatch": "~3.1.1",
|
"anymatch": "~3.1.1",
|
||||||
"braces": "~3.0.2",
|
"braces": "~3.0.2",
|
||||||
|
"fsevents": "~2.3.1",
|
||||||
"glob-parent": "~5.1.0",
|
"glob-parent": "~5.1.0",
|
||||||
"is-binary-path": "~2.1.0",
|
"is-binary-path": "~2.1.0",
|
||||||
"is-glob": "~4.0.1",
|
"is-glob": "~4.0.1",
|
||||||
"normalize-path": "~3.0.0",
|
"normalize-path": "~3.0.0",
|
||||||
"readdirp": "~3.4.0"
|
"readdirp": "~3.5.0"
|
||||||
},
|
|
||||||
"optionalDependencies": {
|
|
||||||
"fsevents": "~2.1.2"
|
|
||||||
},
|
},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Minimal and efficient cross-platform file watching library",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^13",
|
"@types/node": "^14",
|
||||||
"chai": "^4.2",
|
"chai": "^4.2",
|
||||||
"dtslint": "^3.3.0",
|
"dtslint": "^3.3.0",
|
||||||
"eslint": "^6.6.0",
|
"eslint": "^7.0.0",
|
||||||
"mocha": "^7.0.0",
|
"mocha": "^7.0.0",
|
||||||
"nyc": "^15.0.0",
|
"nyc": "^15.0.0",
|
||||||
"rimraf": "^3.0.0",
|
"rimraf": "^3.0.0",
|
||||||
@@ -36,25 +63,15 @@
|
|||||||
"sinon-chai": "^3.3.0",
|
"sinon-chai": "^3.3.0",
|
||||||
"upath": "^1.2.0"
|
"upath": "^1.2.0"
|
||||||
},
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 8.10.0"
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
"lib/*.js",
|
"lib/*.js",
|
||||||
"types/index.d.ts"
|
"types/index.d.ts"
|
||||||
],
|
],
|
||||||
"repository": {
|
"homepage": "https://github.com/paulmillr/chokidar",
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/paulmillr/chokidar.git"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/paulmillr/chokidar/issues"
|
|
||||||
},
|
|
||||||
"license": "MIT",
|
|
||||||
"scripts": {
|
|
||||||
"dtslint": "dtslint types",
|
|
||||||
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
|
|
||||||
"mocha": "mocha --exit --timeout 60000",
|
|
||||||
"test": "npm run lint && npm run mocha"
|
|
||||||
},
|
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"fs",
|
"fs",
|
||||||
"watch",
|
"watch",
|
||||||
@@ -64,57 +81,9 @@
|
|||||||
"file",
|
"file",
|
||||||
"fsevents"
|
"fsevents"
|
||||||
],
|
],
|
||||||
"types": "./types/index.d.ts",
|
"license": "MIT",
|
||||||
"eslintConfig": {
|
"main": "index.js",
|
||||||
"extends": "eslint:recommended",
|
"name": "chokidar",
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": 9,
|
|
||||||
"sourceType": "script"
|
|
||||||
},
|
|
||||||
"env": {
|
|
||||||
"node": true,
|
|
||||||
"es6": true
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"array-callback-return": "error",
|
|
||||||
"no-empty": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"allowEmptyCatch": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"no-lonely-if": "error",
|
|
||||||
"no-var": "error",
|
|
||||||
"object-shorthand": "error",
|
|
||||||
"prefer-arrow-callback": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"allowNamedFunctions": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"prefer-const": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"ignoreReadBeforeAssign": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"prefer-destructuring": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"object": true,
|
|
||||||
"array": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"prefer-spread": "error",
|
|
||||||
"prefer-template": "error",
|
|
||||||
"radix": "error",
|
|
||||||
"strict": "error",
|
|
||||||
"quotes": [
|
|
||||||
"error",
|
|
||||||
"single"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nyc": {
|
"nyc": {
|
||||||
"include": [
|
"include": [
|
||||||
"index.js",
|
"index.js",
|
||||||
@@ -124,9 +93,20 @@
|
|||||||
"html",
|
"html",
|
||||||
"text"
|
"text"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
,"_resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz"
|
"fsevents": "~2.3.1"
|
||||||
,"_integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ=="
|
},
|
||||||
,"_from": "chokidar@3.4.0"
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/paulmillr/chokidar.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"dtslint": "dtslint types",
|
||||||
|
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
|
||||||
|
"mocha": "mocha --exit --timeout 60000",
|
||||||
|
"test": "npm run lint && npm run mocha"
|
||||||
|
},
|
||||||
|
"types": "./types/index.d.ts",
|
||||||
|
"version": "3.5.1"
|
||||||
}
|
}
|
||||||
2
node_modules/cli-boxes/index.d.ts
generated
vendored
2
node_modules/cli-boxes/index.d.ts
generated
vendored
@@ -101,7 +101,7 @@ console.log(cliBoxes.single);
|
|||||||
// bottomRight: '┘',
|
// bottomRight: '┘',
|
||||||
// bottomLeft: '└',
|
// bottomLeft: '└',
|
||||||
// vertical: '│',
|
// vertical: '│',
|
||||||
// horizontal: '─''
|
// horizontal: '─'
|
||||||
// }
|
// }
|
||||||
```
|
```
|
||||||
*/
|
*/
|
||||||
|
|||||||
2
node_modules/cli-boxes/license
generated
vendored
2
node_modules/cli-boxes/license
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|||||||
63
node_modules/cli-boxes/package.json
generated
vendored
63
node_modules/cli-boxes/package.json
generated
vendored
@@ -1,25 +1,53 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "cli-boxes@^2.2.0",
|
||||||
|
"_id": "cli-boxes@2.2.1",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==",
|
||||||
|
"_location": "/cli-boxes",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "cli-boxes@^2.2.0",
|
||||||
"name": "cli-boxes",
|
"name": "cli-boxes",
|
||||||
"version": "2.2.0",
|
"escapedName": "cli-boxes",
|
||||||
"description": "Boxes for use in the terminal",
|
"rawSpec": "^2.2.0",
|
||||||
"license": "MIT",
|
"saveSpec": null,
|
||||||
"repository": "sindresorhus/cli-boxes",
|
"fetchSpec": "^2.2.0"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/boxen"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz",
|
||||||
|
"_shasum": "ddd5035d25094fce220e9cab40a45840a440318f",
|
||||||
|
"_spec": "cli-boxes@^2.2.0",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\boxen",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
"url": "sindresorhus.com"
|
"url": "https://sindresorhus.com"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/sindresorhus/cli-boxes/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Boxes for use in the terminal",
|
||||||
|
"devDependencies": {
|
||||||
|
"ava": "^1.4.1",
|
||||||
|
"tsd": "^0.7.2",
|
||||||
|
"xo": "^0.24.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"test": "xo && ava && tsd"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
"index.d.ts",
|
"index.d.ts",
|
||||||
"boxes.json"
|
"boxes.json"
|
||||||
],
|
],
|
||||||
|
"funding": "https://github.com/sponsors/sindresorhus",
|
||||||
|
"homepage": "https://github.com/sindresorhus/cli-boxes#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"cli",
|
"cli",
|
||||||
"box",
|
"box",
|
||||||
@@ -33,13 +61,14 @@
|
|||||||
"text",
|
"text",
|
||||||
"json"
|
"json"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"license": "MIT",
|
||||||
"ava": "^1.4.1",
|
"name": "cli-boxes",
|
||||||
"tsd": "^0.7.2",
|
"repository": {
|
||||||
"xo": "^0.24.0"
|
"type": "git",
|
||||||
}
|
"url": "git+https://github.com/sindresorhus/cli-boxes.git"
|
||||||
|
},
|
||||||
,"_resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz"
|
"scripts": {
|
||||||
,"_integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w=="
|
"test": "xo && ava && tsd"
|
||||||
,"_from": "cli-boxes@2.2.0"
|
},
|
||||||
|
"version": "2.2.1"
|
||||||
}
|
}
|
||||||
21
node_modules/cli-boxes/readme.md
generated
vendored
21
node_modules/cli-boxes/readme.md
generated
vendored
@@ -1,17 +1,15 @@
|
|||||||
# cli-boxes [](https://travis-ci.org/sindresorhus/cli-boxes)
|
# cli-boxes [](https://travis-ci.com/github/sindresorhus/cli-boxes)
|
||||||
|
|
||||||
> Boxes for use in the terminal
|
> Boxes for use in the terminal
|
||||||
|
|
||||||
The list of boxes is just a [JSON file](boxes.json) and can be used anywhere.
|
The list of boxes is just a [JSON file](boxes.json) and can be used anywhere.
|
||||||
|
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm install cli-boxes
|
$ npm install cli-boxes
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@@ -25,12 +23,11 @@ console.log(cliBoxes.single);
|
|||||||
bottomRight: '┘',
|
bottomRight: '┘',
|
||||||
bottomLeft: '└',
|
bottomLeft: '└',
|
||||||
vertical: '│',
|
vertical: '│',
|
||||||
horizontal: '─''
|
horizontal: '─'
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
### cliBoxes
|
### cliBoxes
|
||||||
@@ -91,12 +88,18 @@ console.log(cliBoxes.single);
|
|||||||
+----+
|
+----+
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Related
|
## Related
|
||||||
|
|
||||||
- [boxen](https://github.com/sindresorhus/boxen) - Create boxes in the terminal
|
- [boxen](https://github.com/sindresorhus/boxen) - Create boxes in the terminal
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## License
|
<div align="center">
|
||||||
|
<b>
|
||||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
<a href="https://tidelift.com/subscription/pkg/npm-cli-boxes?utm_source=npm-cli-boxes&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||||
|
</b>
|
||||||
|
<br>
|
||||||
|
<sub>
|
||||||
|
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||||
|
</sub>
|
||||||
|
</div>
|
||||||
|
|||||||
4
node_modules/dot-prop/index.d.ts
generated
vendored
4
node_modules/dot-prop/index.d.ts
generated
vendored
@@ -35,6 +35,7 @@ declare const dotProp: {
|
|||||||
@param object - Object to set the `path` value.
|
@param object - Object to set the `path` value.
|
||||||
@param path - Path of the property in the object, using `.` to separate each nested key. Use `\\.` if you have a `.` in the key.
|
@param path - Path of the property in the object, using `.` to separate each nested key. Use `\\.` if you have a `.` in the key.
|
||||||
@param value - Value to set at `path`.
|
@param value - Value to set at `path`.
|
||||||
|
@returns The object.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
```
|
```
|
||||||
@@ -77,6 +78,7 @@ declare const dotProp: {
|
|||||||
/**
|
/**
|
||||||
@param object - Object to delete the `path` value.
|
@param object - Object to delete the `path` value.
|
||||||
@param path - Path of the property in the object, using `.` to separate each nested key. Use `\\.` if you have a `.` in the key.
|
@param path - Path of the property in the object, using `.` to separate each nested key. Use `\\.` if you have a `.` in the key.
|
||||||
|
@returns A boolean of whether the property existed before being deleted.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
```
|
```
|
||||||
@@ -93,7 +95,7 @@ declare const dotProp: {
|
|||||||
//=> {foo: {bar: {y: 'x'}}}
|
//=> {foo: {bar: {y: 'x'}}}
|
||||||
```
|
```
|
||||||
*/
|
*/
|
||||||
delete(object: {[key: string]: any}, path: string): void;
|
delete(object: {[key: string]: any}, path: string): boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export = dotProp;
|
export = dotProp;
|
||||||
|
|||||||
6
node_modules/dot-prop/index.js
generated
vendored
6
node_modules/dot-prop/index.js
generated
vendored
@@ -93,7 +93,7 @@ module.exports = {
|
|||||||
|
|
||||||
delete(object, path) {
|
delete(object, path) {
|
||||||
if (!isObj(object) || typeof path !== 'string') {
|
if (!isObj(object) || typeof path !== 'string') {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const pathArray = getPathSegments(path);
|
const pathArray = getPathSegments(path);
|
||||||
@@ -103,13 +103,13 @@ module.exports = {
|
|||||||
|
|
||||||
if (i === pathArray.length - 1) {
|
if (i === pathArray.length - 1) {
|
||||||
delete object[p];
|
delete object[p];
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
object = object[p];
|
object = object[p];
|
||||||
|
|
||||||
if (!isObj(object)) {
|
if (!isObj(object)) {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
68
node_modules/dot-prop/package.json
generated
vendored
68
node_modules/dot-prop/package.json
generated
vendored
@@ -1,25 +1,55 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "dot-prop@^5.2.0",
|
||||||
|
"_id": "dot-prop@5.3.0",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
|
||||||
|
"_location": "/dot-prop",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "dot-prop@^5.2.0",
|
||||||
"name": "dot-prop",
|
"name": "dot-prop",
|
||||||
"version": "5.2.0",
|
"escapedName": "dot-prop",
|
||||||
"description": "Get, set, or delete a property from a nested object using a dot path",
|
"rawSpec": "^5.2.0",
|
||||||
"license": "MIT",
|
"saveSpec": null,
|
||||||
"repository": "sindresorhus/dot-prop",
|
"fetchSpec": "^5.2.0"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/configstore"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
|
||||||
|
"_shasum": "90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88",
|
||||||
|
"_spec": "dot-prop@^5.2.0",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\configstore",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
"url": "sindresorhus.com"
|
"url": "sindresorhus.com"
|
||||||
},
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/sindresorhus/dot-prop/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"dependencies": {
|
||||||
|
"is-obj": "^2.0.0"
|
||||||
|
},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Get, set, or delete a property from a nested object using a dot path",
|
||||||
|
"devDependencies": {
|
||||||
|
"ava": "^2.1.0",
|
||||||
|
"benchmark": "^2.1.4",
|
||||||
|
"tsd": "^0.7.2",
|
||||||
|
"xo": "^0.25.3"
|
||||||
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"test": "xo && ava && tsd",
|
|
||||||
"bench": "node bench.js"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
"index.d.ts"
|
"index.d.ts"
|
||||||
],
|
],
|
||||||
|
"homepage": "https://github.com/sindresorhus/dot-prop#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"object",
|
"object",
|
||||||
"prop",
|
"prop",
|
||||||
@@ -33,17 +63,15 @@
|
|||||||
"notation",
|
"notation",
|
||||||
"dotty"
|
"dotty"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"license": "MIT",
|
||||||
"is-obj": "^2.0.0"
|
"name": "dot-prop",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/sindresorhus/dot-prop.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"scripts": {
|
||||||
"ava": "^2.1.0",
|
"bench": "node bench.js",
|
||||||
"benchmark": "^2.1.4",
|
"test": "xo && ava && tsd"
|
||||||
"tsd": "^0.7.2",
|
},
|
||||||
"xo": "^0.25.3"
|
"version": "5.3.0"
|
||||||
}
|
|
||||||
|
|
||||||
,"_resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz"
|
|
||||||
,"_integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A=="
|
|
||||||
,"_from": "dot-prop@5.2.0"
|
|
||||||
}
|
}
|
||||||
2
node_modules/dot-prop/readme.md
generated
vendored
2
node_modules/dot-prop/readme.md
generated
vendored
@@ -71,6 +71,8 @@ Returns the object.
|
|||||||
|
|
||||||
### delete(object, path)
|
### delete(object, path)
|
||||||
|
|
||||||
|
Returns a boolean of whether the property existed before being deleted.
|
||||||
|
|
||||||
#### object
|
#### object
|
||||||
|
|
||||||
Type: `object`
|
Type: `object`
|
||||||
|
|||||||
2
node_modules/global-dirs/license
generated
vendored
2
node_modules/global-dirs/license
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|||||||
71
node_modules/global-dirs/package.json
generated
vendored
71
node_modules/global-dirs/package.json
generated
vendored
@@ -1,24 +1,57 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "global-dirs@^2.0.1",
|
||||||
|
"_id": "global-dirs@2.1.0",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==",
|
||||||
|
"_location": "/global-dirs",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "global-dirs@^2.0.1",
|
||||||
"name": "global-dirs",
|
"name": "global-dirs",
|
||||||
"version": "2.0.1",
|
"escapedName": "global-dirs",
|
||||||
"description": "Get the directory of globally installed packages and binaries",
|
"rawSpec": "^2.0.1",
|
||||||
"license": "MIT",
|
"saveSpec": null,
|
||||||
"repository": "sindresorhus/global-dirs",
|
"fetchSpec": "^2.0.1"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/is-installed-globally"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz",
|
||||||
|
"_shasum": "e9046a49c806ff04d6c1825e196c8f0091e8df4d",
|
||||||
|
"_spec": "global-dirs@^2.0.1",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\is-installed-globally",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
"url": "sindresorhus.com"
|
"url": "https://sindresorhus.com"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/sindresorhus/global-dirs/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"dependencies": {
|
||||||
|
"ini": "1.3.7"
|
||||||
|
},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Get the directory of globally installed packages and binaries",
|
||||||
|
"devDependencies": {
|
||||||
|
"ava": "^2.4.0",
|
||||||
|
"execa": "^3.2.0",
|
||||||
|
"import-fresh": "^3.1.0",
|
||||||
|
"tsd": "^0.10.0",
|
||||||
|
"xo": "^0.25.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"test": "xo && ava && tsd"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
"index.d.ts"
|
"index.d.ts"
|
||||||
],
|
],
|
||||||
|
"funding": "https://github.com/sponsors/sindresorhus",
|
||||||
|
"homepage": "https://github.com/sindresorhus/global-dirs#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"global",
|
"global",
|
||||||
"prefix",
|
"prefix",
|
||||||
@@ -42,18 +75,14 @@
|
|||||||
"root",
|
"root",
|
||||||
"resolve"
|
"resolve"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"license": "MIT",
|
||||||
"ini": "^1.3.5"
|
"name": "global-dirs",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/sindresorhus/global-dirs.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"scripts": {
|
||||||
"ava": "^2.4.0",
|
"test": "xo && ava && tsd"
|
||||||
"execa": "^3.2.0",
|
},
|
||||||
"import-fresh": "^3.1.0",
|
"version": "2.1.0"
|
||||||
"tsd": "^0.10.0",
|
|
||||||
"xo": "^0.25.3"
|
|
||||||
}
|
|
||||||
|
|
||||||
,"_resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz"
|
|
||||||
,"_integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A=="
|
|
||||||
,"_from": "global-dirs@2.0.1"
|
|
||||||
}
|
}
|
||||||
7
node_modules/global-dirs/readme.md
generated
vendored
7
node_modules/global-dirs/readme.md
generated
vendored
@@ -1,17 +1,15 @@
|
|||||||
# global-dirs [](https://travis-ci.org/sindresorhus/global-dirs)
|
# global-dirs
|
||||||
|
|
||||||
> Get the directory of globally installed packages and binaries
|
> Get the directory of globally installed packages and binaries
|
||||||
|
|
||||||
Uses the same resolution logic as `npm` and `yarn`.
|
Uses the same resolution logic as `npm` and `yarn`.
|
||||||
|
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm install global-dirs
|
$ npm install global-dirs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@@ -30,7 +28,6 @@ console.log(globalDirectories.yarn.packages);
|
|||||||
//=> '/Users/sindresorhus/.config/yarn/global/node_modules'
|
//=> '/Users/sindresorhus/.config/yarn/global/node_modules'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
### globalDirectories
|
### globalDirectories
|
||||||
@@ -56,14 +53,12 @@ Directory with directories for packages and binaries. You probably want either o
|
|||||||
|
|
||||||
Equivalent to `npm prefix --global`.
|
Equivalent to `npm prefix --global`.
|
||||||
|
|
||||||
|
|
||||||
## Related
|
## Related
|
||||||
|
|
||||||
- [import-global](https://github.com/sindresorhus/import-global) - Import a globally installed module
|
- [import-global](https://github.com/sindresorhus/import-global) - Import a globally installed module
|
||||||
- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module
|
- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module
|
||||||
- [is-installed-globally](https://github.com/sindresorhus/is-installed-globally) - Check if your package was installed globally
|
- [is-installed-globally](https://github.com/sindresorhus/is-installed-globally) - Check if your package was installed globally
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|||||||
86
node_modules/ini/ini.js
generated
vendored
86
node_modules/ini/ini.js
generated
vendored
@@ -15,10 +15,10 @@ function encode (obj, opt) {
|
|||||||
if (typeof opt === 'string') {
|
if (typeof opt === 'string') {
|
||||||
opt = {
|
opt = {
|
||||||
section: opt,
|
section: opt,
|
||||||
whitespace: false
|
whitespace: false,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
opt = opt || {}
|
opt = opt || Object.create(null)
|
||||||
opt.whitespace = opt.whitespace === true
|
opt.whitespace = opt.whitespace === true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,27 +30,25 @@ function encode (obj, opt) {
|
|||||||
val.forEach(function (item) {
|
val.forEach(function (item) {
|
||||||
out += safe(k + '[]') + separator + safe(item) + '\n'
|
out += safe(k + '[]') + separator + safe(item) + '\n'
|
||||||
})
|
})
|
||||||
} else if (val && typeof val === 'object') {
|
} else if (val && typeof val === 'object')
|
||||||
children.push(k)
|
children.push(k)
|
||||||
} else {
|
else
|
||||||
out += safe(k) + separator + safe(val) + eol
|
out += safe(k) + separator + safe(val) + eol
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
if (opt.section && out.length) {
|
if (opt.section && out.length)
|
||||||
out = '[' + safe(opt.section) + ']' + eol + out
|
out = '[' + safe(opt.section) + ']' + eol + out
|
||||||
}
|
|
||||||
|
|
||||||
children.forEach(function (k, _, __) {
|
children.forEach(function (k, _, __) {
|
||||||
var nk = dotSplit(k).join('\\.')
|
var nk = dotSplit(k).join('\\.')
|
||||||
var section = (opt.section ? opt.section + '.' : '') + nk
|
var section = (opt.section ? opt.section + '.' : '') + nk
|
||||||
var child = encode(obj[k], {
|
var child = encode(obj[k], {
|
||||||
section: section,
|
section: section,
|
||||||
whitespace: opt.whitespace
|
whitespace: opt.whitespace,
|
||||||
})
|
})
|
||||||
if (out.length && child.length) {
|
if (out.length && child.length)
|
||||||
out += eol
|
out += eol
|
||||||
}
|
|
||||||
out += child
|
out += child
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -67,7 +65,7 @@ function dotSplit (str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function decode (str) {
|
function decode (str) {
|
||||||
var out = {}
|
var out = Object.create(null)
|
||||||
var p = out
|
var p = out
|
||||||
var section = null
|
var section = null
|
||||||
// section |key = value
|
// section |key = value
|
||||||
@@ -75,15 +73,25 @@ function decode (str) {
|
|||||||
var lines = str.split(/[\r\n]+/g)
|
var lines = str.split(/[\r\n]+/g)
|
||||||
|
|
||||||
lines.forEach(function (line, _, __) {
|
lines.forEach(function (line, _, __) {
|
||||||
if (!line || line.match(/^\s*[;#]/)) return
|
if (!line || line.match(/^\s*[;#]/))
|
||||||
|
return
|
||||||
var match = line.match(re)
|
var match = line.match(re)
|
||||||
if (!match) return
|
if (!match)
|
||||||
|
return
|
||||||
if (match[1] !== undefined) {
|
if (match[1] !== undefined) {
|
||||||
section = unsafe(match[1])
|
section = unsafe(match[1])
|
||||||
p = out[section] = out[section] || {}
|
if (section === '__proto__') {
|
||||||
|
// not allowed
|
||||||
|
// keep parsing the section, but don't attach it.
|
||||||
|
p = Object.create(null)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
p = out[section] = out[section] || Object.create(null)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var key = unsafe(match[2])
|
var key = unsafe(match[2])
|
||||||
|
if (key === '__proto__')
|
||||||
|
return
|
||||||
var value = match[3] ? unsafe(match[4]) : true
|
var value = match[3] ? unsafe(match[4]) : true
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 'true':
|
case 'true':
|
||||||
@@ -94,20 +102,20 @@ function decode (str) {
|
|||||||
// Convert keys with '[]' suffix to an array
|
// Convert keys with '[]' suffix to an array
|
||||||
if (key.length > 2 && key.slice(-2) === '[]') {
|
if (key.length > 2 && key.slice(-2) === '[]') {
|
||||||
key = key.substring(0, key.length - 2)
|
key = key.substring(0, key.length - 2)
|
||||||
if (!p[key]) {
|
if (key === '__proto__')
|
||||||
|
return
|
||||||
|
if (!p[key])
|
||||||
p[key] = []
|
p[key] = []
|
||||||
} else if (!Array.isArray(p[key])) {
|
else if (!Array.isArray(p[key]))
|
||||||
p[key] = [p[key]]
|
p[key] = [p[key]]
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// safeguard against resetting a previously defined
|
// safeguard against resetting a previously defined
|
||||||
// array by accidentally forgetting the brackets
|
// array by accidentally forgetting the brackets
|
||||||
if (Array.isArray(p[key])) {
|
if (Array.isArray(p[key]))
|
||||||
p[key].push(value)
|
p[key].push(value)
|
||||||
} else {
|
else
|
||||||
p[key] = value
|
p[key] = value
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}}
|
// {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}}
|
||||||
@@ -115,9 +123,9 @@ function decode (str) {
|
|||||||
Object.keys(out).filter(function (k, _, __) {
|
Object.keys(out).filter(function (k, _, __) {
|
||||||
if (!out[k] ||
|
if (!out[k] ||
|
||||||
typeof out[k] !== 'object' ||
|
typeof out[k] !== 'object' ||
|
||||||
Array.isArray(out[k])) {
|
Array.isArray(out[k]))
|
||||||
return false
|
return false
|
||||||
}
|
|
||||||
// see if the parent section is also an object.
|
// see if the parent section is also an object.
|
||||||
// if so, add it to that, and mark this one for deletion
|
// if so, add it to that, and mark this one for deletion
|
||||||
var parts = dotSplit(k)
|
var parts = dotSplit(k)
|
||||||
@@ -125,12 +133,15 @@ function decode (str) {
|
|||||||
var l = parts.pop()
|
var l = parts.pop()
|
||||||
var nl = l.replace(/\\\./g, '.')
|
var nl = l.replace(/\\\./g, '.')
|
||||||
parts.forEach(function (part, _, __) {
|
parts.forEach(function (part, _, __) {
|
||||||
if (!p[part] || typeof p[part] !== 'object') p[part] = {}
|
if (part === '__proto__')
|
||||||
|
return
|
||||||
|
if (!p[part] || typeof p[part] !== 'object')
|
||||||
|
p[part] = Object.create(null)
|
||||||
p = p[part]
|
p = p[part]
|
||||||
})
|
})
|
||||||
if (p === out && nl === l) {
|
if (p === out && nl === l)
|
||||||
return false
|
return false
|
||||||
}
|
|
||||||
p[nl] = out[k]
|
p[nl] = out[k]
|
||||||
return true
|
return true
|
||||||
}).forEach(function (del, _, __) {
|
}).forEach(function (del, _, __) {
|
||||||
@@ -160,10 +171,12 @@ function unsafe (val, doUnesc) {
|
|||||||
val = (val || '').trim()
|
val = (val || '').trim()
|
||||||
if (isQuoted(val)) {
|
if (isQuoted(val)) {
|
||||||
// remove the single quotes before calling JSON.parse
|
// remove the single quotes before calling JSON.parse
|
||||||
if (val.charAt(0) === "'") {
|
if (val.charAt(0) === "'")
|
||||||
val = val.substr(1, val.length - 2)
|
val = val.substr(1, val.length - 2)
|
||||||
}
|
|
||||||
try { val = JSON.parse(val) } catch (_) {}
|
try {
|
||||||
|
val = JSON.parse(val)
|
||||||
|
} catch (_) {}
|
||||||
} else {
|
} else {
|
||||||
// walk the val to find the first not-escaped ; character
|
// walk the val to find the first not-escaped ; character
|
||||||
var esc = false
|
var esc = false
|
||||||
@@ -171,23 +184,22 @@ function unsafe (val, doUnesc) {
|
|||||||
for (var i = 0, l = val.length; i < l; i++) {
|
for (var i = 0, l = val.length; i < l; i++) {
|
||||||
var c = val.charAt(i)
|
var c = val.charAt(i)
|
||||||
if (esc) {
|
if (esc) {
|
||||||
if ('\\;#'.indexOf(c) !== -1) {
|
if ('\\;#'.indexOf(c) !== -1)
|
||||||
unesc += c
|
unesc += c
|
||||||
} else {
|
else
|
||||||
unesc += '\\' + c
|
unesc += '\\' + c
|
||||||
}
|
|
||||||
esc = false
|
esc = false
|
||||||
} else if (';#'.indexOf(c) !== -1) {
|
} else if (';#'.indexOf(c) !== -1)
|
||||||
break
|
break
|
||||||
} else if (c === '\\') {
|
else if (c === '\\')
|
||||||
esc = true
|
esc = true
|
||||||
} else {
|
else
|
||||||
unesc += c
|
unesc += c
|
||||||
}
|
}
|
||||||
}
|
if (esc)
|
||||||
if (esc) {
|
|
||||||
unesc += '\\'
|
unesc += '\\'
|
||||||
}
|
|
||||||
return unesc.trim()
|
return unesc.trim()
|
||||||
}
|
}
|
||||||
return val
|
return val
|
||||||
|
|||||||
79
node_modules/ini/package.json
generated
vendored
79
node_modules/ini/package.json
generated
vendored
@@ -1,34 +1,67 @@
|
|||||||
{
|
{
|
||||||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
|
"_from": "ini@1.3.7",
|
||||||
|
"_id": "ini@1.3.7",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==",
|
||||||
|
"_location": "/ini",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "version",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "ini@1.3.7",
|
||||||
"name": "ini",
|
"name": "ini",
|
||||||
|
"escapedName": "ini",
|
||||||
|
"rawSpec": "1.3.7",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "1.3.7"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/global-dirs",
|
||||||
|
"/rc"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz",
|
||||||
|
"_shasum": "a09363e1911972ea16d7a8851005d84cf09a9a84",
|
||||||
|
"_spec": "ini@1.3.7",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\global-dirs",
|
||||||
|
"author": {
|
||||||
|
"name": "Isaac Z. Schlueter",
|
||||||
|
"email": "i@izs.me",
|
||||||
|
"url": "http://blog.izs.me/"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/isaacs/ini/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"deprecated": false,
|
||||||
"description": "An ini encoder/decoder for node",
|
"description": "An ini encoder/decoder for node",
|
||||||
"version": "1.3.5",
|
"devDependencies": {
|
||||||
|
"eslint": "^7.9.0",
|
||||||
|
"eslint-plugin-import": "^2.22.0",
|
||||||
|
"eslint-plugin-node": "^11.1.0",
|
||||||
|
"eslint-plugin-promise": "^4.2.1",
|
||||||
|
"eslint-plugin-standard": "^4.0.1",
|
||||||
|
"tap": "14"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"ini.js"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/isaacs/ini#readme",
|
||||||
|
"license": "ISC",
|
||||||
|
"main": "ini.js",
|
||||||
|
"name": "ini",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/isaacs/ini.git"
|
"url": "git://github.com/isaacs/ini.git"
|
||||||
},
|
},
|
||||||
"main": "ini.js",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"pretest": "standard ini.js",
|
"eslint": "eslint",
|
||||||
"test": "tap test/*.js --100 -J",
|
"lint": "npm run eslint -- ini.js test/*.js",
|
||||||
"preversion": "npm test",
|
"lintfix": "npm run lint -- --fix",
|
||||||
|
"posttest": "npm run lint",
|
||||||
"postversion": "npm publish",
|
"postversion": "npm publish",
|
||||||
"postpublish": "git push origin --all; git push origin --tags"
|
"prepublishOnly": "git push origin --follow-tags",
|
||||||
|
"preversion": "npm test",
|
||||||
|
"test": "tap"
|
||||||
},
|
},
|
||||||
"engines": {
|
"version": "1.3.7"
|
||||||
"node": "*"
|
|
||||||
},
|
|
||||||
"dependencies": {},
|
|
||||||
"devDependencies": {
|
|
||||||
"standard": "^10.0.3",
|
|
||||||
"tap": "^10.7.3 || 11"
|
|
||||||
},
|
|
||||||
"license": "ISC",
|
|
||||||
"files": [
|
|
||||||
"ini.js"
|
|
||||||
]
|
|
||||||
|
|
||||||
,"_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz"
|
|
||||||
,"_integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
|
|
||||||
,"_from": "ini@1.3.5"
|
|
||||||
}
|
}
|
||||||
13
node_modules/nodemon/.jscsrc
generated
vendored
13
node_modules/nodemon/.jscsrc
generated
vendored
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"preset": "node-style-guide",
|
|
||||||
"requireCapitalizedComments": null,
|
|
||||||
"requireSpacesInAnonymousFunctionExpression": {
|
|
||||||
"beforeOpeningCurlyBrace": true,
|
|
||||||
"beforeOpeningRoundBrace": true
|
|
||||||
},
|
|
||||||
"disallowSpacesInNamedFunctionExpression": {
|
|
||||||
"beforeOpeningRoundBrace": true
|
|
||||||
},
|
|
||||||
"excludeFiles": ["node_modules/**"],
|
|
||||||
"disallowSpacesInFunction": null
|
|
||||||
}
|
|
||||||
3
node_modules/nodemon/.travis.yml
generated
vendored
3
node_modules/nodemon/.travis.yml
generated
vendored
@@ -5,10 +5,9 @@ cache:
|
|||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
node_js:
|
node_js:
|
||||||
|
- '14'
|
||||||
- '12'
|
- '12'
|
||||||
- '11'
|
|
||||||
- '10'
|
- '10'
|
||||||
- '8'
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [ "$TRAVIS_PULL_REQUEST_BRANCH" == "" ]; then echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> .npmrc; fi
|
- if [ "$TRAVIS_PULL_REQUEST_BRANCH" == "" ]; then echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> .npmrc; fi
|
||||||
after_success:
|
after_success:
|
||||||
|
|||||||
2
node_modules/nodemon/bin/postinstall.js
generated
vendored
2
node_modules/nodemon/bin/postinstall.js
generated
vendored
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
if (process.env.SUPPRESS_SUPPORT) {
|
if (process.env.SUPPRESS_SUPPORT || process.env.OPENCOLLECTIVE_HIDE || process.env.CI) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
6
node_modules/nodemon/commitlint.config.js
generated
vendored
6
node_modules/nodemon/commitlint.config.js
generated
vendored
@@ -1,7 +1,3 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
rules: {
|
extends: ['@commitlint/config-conventional'],
|
||||||
'body-tense': [0, 'never', 0],
|
|
||||||
lang: 'eng',
|
|
||||||
},
|
|
||||||
extends: ['@commitlint/config-angular'],
|
|
||||||
};
|
};
|
||||||
|
|||||||
4
node_modules/nodemon/lib/config/load.js
generated
vendored
4
node_modules/nodemon/lib/config/load.js
generated
vendored
@@ -74,7 +74,9 @@ function load(settings, options, config, callback) {
|
|||||||
}
|
}
|
||||||
// if the script is found as a result of not being on the command
|
// if the script is found as a result of not being on the command
|
||||||
// line, then we move any of the pre double-dash args in execArgs
|
// line, then we move any of the pre double-dash args in execArgs
|
||||||
const n = options.scriptPosition || options.args.length;
|
const n = options.scriptPosition === null ?
|
||||||
|
options.args.length : options.scriptPosition;
|
||||||
|
|
||||||
options.execArgs = (options.execArgs || [])
|
options.execArgs = (options.execArgs || [])
|
||||||
.concat(options.args.splice(0, n));
|
.concat(options.args.splice(0, n));
|
||||||
options.scriptPosition = null;
|
options.scriptPosition = null;
|
||||||
|
|||||||
9
node_modules/nodemon/lib/monitor/match.js
generated
vendored
9
node_modules/nodemon/lib/monitor/match.js
generated
vendored
@@ -157,6 +157,12 @@ function match(files, monitor, ext) {
|
|||||||
if (s.indexOf('!' + cwd) === 0) {
|
if (s.indexOf('!' + cwd) === 0) {
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if it starts with a period, then let's get the relative path
|
||||||
|
if (s.indexOf('!.') === 0) {
|
||||||
|
return '!' + path.resolve(cwd, s.substring(1));
|
||||||
|
}
|
||||||
|
|
||||||
return '!**' + (prefix !== path.sep ? path.sep : '') + s.slice(1);
|
return '!**' + (prefix !== path.sep ? path.sep : '') + s.slice(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,12 +201,13 @@ function match(files, monitor, ext) {
|
|||||||
for (var i = 0; i < rules.length; i++) {
|
for (var i = 0; i < rules.length; i++) {
|
||||||
if (rules[i].slice(0, 1) === '!') {
|
if (rules[i].slice(0, 1) === '!') {
|
||||||
if (!minimatch(file, rules[i], minimatchOpts)) {
|
if (!minimatch(file, rules[i], minimatchOpts)) {
|
||||||
|
debug('ignored', file, 'rule:', rules[i]);
|
||||||
ignored++;
|
ignored++;
|
||||||
matched = true;
|
matched = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
debug('match', file, minimatch(file, rules[i], minimatchOpts));
|
debug('matched', file, 'rule:', rules[i]);
|
||||||
if (minimatch(file, rules[i], minimatchOpts)) {
|
if (minimatch(file, rules[i], minimatchOpts)) {
|
||||||
watched++;
|
watched++;
|
||||||
|
|
||||||
|
|||||||
123
node_modules/nodemon/lib/monitor/run.js
generated
vendored
123
node_modules/nodemon/lib/monitor/run.js
generated
vendored
@@ -18,15 +18,30 @@ var signals = require('./signals');
|
|||||||
|
|
||||||
function run(options) {
|
function run(options) {
|
||||||
var cmd = config.command.raw;
|
var cmd = config.command.raw;
|
||||||
|
// moved up
|
||||||
|
// we need restart function below in the global scope for run.kill
|
||||||
|
/*jshint validthis:true*/
|
||||||
|
restart = run.bind(this, options);
|
||||||
|
run.restart = restart;
|
||||||
|
|
||||||
|
// binding options with instance of run
|
||||||
|
// so that we can use it in run.kill
|
||||||
|
run.options = options;
|
||||||
|
|
||||||
var runCmd = !options.runOnChangeOnly || config.lastStarted !== 0;
|
var runCmd = !options.runOnChangeOnly || config.lastStarted !== 0;
|
||||||
if (runCmd) {
|
if (runCmd) {
|
||||||
utils.log.status('starting `' + config.command.string + '`');
|
utils.log.status('starting `' + config.command.string + '`');
|
||||||
|
} else {
|
||||||
|
// should just watch file if command is not to be run
|
||||||
|
// had another alternate approach
|
||||||
|
// to stop process being forked/spawned in the below code
|
||||||
|
// but this approach does early exit and makes code cleaner
|
||||||
|
debug('start watch on: %s', config.options.watch);
|
||||||
|
if (config.options.watch !== false) {
|
||||||
|
watch();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*jshint validthis:true*/
|
|
||||||
restart = run.bind(this, options);
|
|
||||||
run.restart = restart;
|
|
||||||
|
|
||||||
config.lastStarted = Date.now();
|
config.lastStarted = Date.now();
|
||||||
|
|
||||||
@@ -97,6 +112,8 @@ function run(options) {
|
|||||||
utils.version.major > 4 // only fork if node version > 4
|
utils.version.major > 4 // only fork if node version > 4
|
||||||
|
|
||||||
if (shouldFork) {
|
if (shouldFork) {
|
||||||
|
// this assumes the first argument is the script and slices it out, since
|
||||||
|
// we're forking
|
||||||
var forkArgs = cmd.args.slice(1);
|
var forkArgs = cmd.args.slice(1);
|
||||||
var env = utils.merge(options.execOptions.env, process.env);
|
var env = utils.merge(options.execOptions.env, process.env);
|
||||||
stdio.push('ipc');
|
stdio.push('ipc');
|
||||||
@@ -235,53 +252,9 @@ function run(options) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
run.kill = function (noRestart, callback) {
|
// moved the run.kill outside to handle both the cases
|
||||||
// I hate code like this :( - Remy (author of said code)
|
// intial start
|
||||||
if (typeof noRestart === 'function') {
|
// no start
|
||||||
callback = noRestart;
|
|
||||||
noRestart = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!callback) {
|
|
||||||
callback = noop;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (child !== null) {
|
|
||||||
// if the stdin piping is on, we need to unpipe, but also close stdin on
|
|
||||||
// the child, otherwise linux can throw EPIPE or ECONNRESET errors.
|
|
||||||
if (options.stdin) {
|
|
||||||
process.stdin.unpipe(child.stdin);
|
|
||||||
}
|
|
||||||
|
|
||||||
// For the on('exit', ...) handler above the following looks like a
|
|
||||||
// crash, so we set the killedAfterChange flag if a restart is planned
|
|
||||||
if (!noRestart) {
|
|
||||||
killedAfterChange = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now kill the entire subtree of processes belonging to nodemon */
|
|
||||||
var oldPid = child.pid;
|
|
||||||
if (child) {
|
|
||||||
kill(child, config.signal, function () {
|
|
||||||
// this seems to fix the 0.11.x issue with the "rs" restart command,
|
|
||||||
// though I'm unsure why. it seems like more data is streamed in to
|
|
||||||
// stdin after we close.
|
|
||||||
if (child && options.stdin && child.stdin && oldPid === child.pid) {
|
|
||||||
child.stdin.end();
|
|
||||||
}
|
|
||||||
callback();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (!noRestart) {
|
|
||||||
// if there's no child, then we need to manually start the process
|
|
||||||
// this is because as there was no child, the child.on('exit') event
|
|
||||||
// handler doesn't exist which would normally trigger the restart.
|
|
||||||
bus.once('start', callback);
|
|
||||||
restart();
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// connect stdin to the child process (options.stdin is on by default)
|
// connect stdin to the child process (options.stdin is on by default)
|
||||||
if (options.stdin) {
|
if (options.stdin) {
|
||||||
@@ -379,12 +352,54 @@ function kill(child, signal, callback) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// stubbed out for now, filled in during run
|
run.kill = function (noRestart, callback) {
|
||||||
run.kill = function (flag, callback) {
|
// I hate code like this :( - Remy (author of said code)
|
||||||
if (callback) {
|
if (typeof noRestart === 'function') {
|
||||||
|
callback = noRestart;
|
||||||
|
noRestart = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!callback) {
|
||||||
|
callback = noop;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (child !== null) {
|
||||||
|
// if the stdin piping is on, we need to unpipe, but also close stdin on
|
||||||
|
// the child, otherwise linux can throw EPIPE or ECONNRESET errors.
|
||||||
|
if (run.options.stdin) {
|
||||||
|
process.stdin.unpipe(child.stdin);
|
||||||
|
}
|
||||||
|
|
||||||
|
// For the on('exit', ...) handler above the following looks like a
|
||||||
|
// crash, so we set the killedAfterChange flag if a restart is planned
|
||||||
|
if (!noRestart) {
|
||||||
|
killedAfterChange = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Now kill the entire subtree of processes belonging to nodemon */
|
||||||
|
var oldPid = child.pid;
|
||||||
|
if (child) {
|
||||||
|
kill(child, config.signal, function () {
|
||||||
|
// this seems to fix the 0.11.x issue with the "rs" restart command,
|
||||||
|
// though I'm unsure why. it seems like more data is streamed in to
|
||||||
|
// stdin after we close.
|
||||||
|
if (child && run.options.stdin && child.stdin && oldPid === child.pid) {
|
||||||
|
child.stdin.end();
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (!noRestart) {
|
||||||
|
// if there's no child, then we need to manually start the process
|
||||||
|
// this is because as there was no child, the child.on('exit') event
|
||||||
|
// handler doesn't exist which would normally trigger the restart.
|
||||||
|
bus.once('start', callback);
|
||||||
|
run.restart();
|
||||||
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
run.restart = noop;
|
run.restart = noop;
|
||||||
|
|
||||||
bus.on('quit', function onQuit(code) {
|
bus.on('quit', function onQuit(code) {
|
||||||
|
|||||||
2
node_modules/nodemon/lib/monitor/watch.js
generated
vendored
2
node_modules/nodemon/lib/monitor/watch.js
generated
vendored
@@ -177,7 +177,7 @@ function filterAndRestart(files) {
|
|||||||
|
|
||||||
// if there's no matches, then test to see if the changed file is the
|
// if there's no matches, then test to see if the changed file is the
|
||||||
// running script, if so, let's allow a restart
|
// running script, if so, let's allow a restart
|
||||||
if (config.options.execOptions.script) {
|
if (config.options.execOptions && config.options.execOptions.script) {
|
||||||
const script = path.resolve(config.options.execOptions.script);
|
const script = path.resolve(config.options.execOptions.script);
|
||||||
if (matched.result.length === 0 && script) {
|
if (matched.result.length === 0 && script) {
|
||||||
const length = script.length;
|
const length = script.length;
|
||||||
|
|||||||
2
node_modules/nodemon/lib/nodemon.js
generated
vendored
2
node_modules/nodemon/lib/nodemon.js
generated
vendored
@@ -39,7 +39,9 @@ function nodemon(settings) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (settings.help) {
|
if (settings.help) {
|
||||||
|
if (process.stdout.isTTY) {
|
||||||
process.stdout._handle.setBlocking(true); // nodejs/node#6456
|
process.stdout._handle.setBlocking(true); // nodejs/node#6456
|
||||||
|
}
|
||||||
console.log(help(settings.help));
|
console.log(help(settings.help));
|
||||||
if (!config.required) {
|
if (!config.required) {
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
|
|||||||
886
node_modules/nodemon/node_modules/debug/dist/debug.js
generated
vendored
886
node_modules/nodemon/node_modules/debug/dist/debug.js
generated
vendored
@@ -1,886 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
|
|
||||||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
||||||
|
|
||||||
(function (f) {
|
|
||||||
if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") {
|
|
||||||
module.exports = f();
|
|
||||||
} else if (typeof define === "function" && define.amd) {
|
|
||||||
define([], f);
|
|
||||||
} else {
|
|
||||||
var g;
|
|
||||||
|
|
||||||
if (typeof window !== "undefined") {
|
|
||||||
g = window;
|
|
||||||
} else if (typeof global !== "undefined") {
|
|
||||||
g = global;
|
|
||||||
} else if (typeof self !== "undefined") {
|
|
||||||
g = self;
|
|
||||||
} else {
|
|
||||||
g = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
g.debug = f();
|
|
||||||
}
|
|
||||||
})(function () {
|
|
||||||
var define, module, exports;
|
|
||||||
return function () {
|
|
||||||
function r(e, n, t) {
|
|
||||||
function o(i, f) {
|
|
||||||
if (!n[i]) {
|
|
||||||
if (!e[i]) {
|
|
||||||
var c = "function" == typeof require && require;
|
|
||||||
if (!f && c) return c(i, !0);
|
|
||||||
if (u) return u(i, !0);
|
|
||||||
var a = new Error("Cannot find module '" + i + "'");
|
|
||||||
throw a.code = "MODULE_NOT_FOUND", a;
|
|
||||||
}
|
|
||||||
|
|
||||||
var p = n[i] = {
|
|
||||||
exports: {}
|
|
||||||
};
|
|
||||||
e[i][0].call(p.exports, function (r) {
|
|
||||||
var n = e[i][1][r];
|
|
||||||
return o(n || r);
|
|
||||||
}, p, p.exports, r, e, n, t);
|
|
||||||
}
|
|
||||||
|
|
||||||
return n[i].exports;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) {
|
|
||||||
o(t[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return o;
|
|
||||||
}
|
|
||||||
|
|
||||||
return r;
|
|
||||||
}()({
|
|
||||||
1: [function (require, module, exports) {
|
|
||||||
/**
|
|
||||||
* Helpers.
|
|
||||||
*/
|
|
||||||
var s = 1000;
|
|
||||||
var m = s * 60;
|
|
||||||
var h = m * 60;
|
|
||||||
var d = h * 24;
|
|
||||||
var w = d * 7;
|
|
||||||
var y = d * 365.25;
|
|
||||||
/**
|
|
||||||
* Parse or format the given `val`.
|
|
||||||
*
|
|
||||||
* Options:
|
|
||||||
*
|
|
||||||
* - `long` verbose formatting [false]
|
|
||||||
*
|
|
||||||
* @param {String|Number} val
|
|
||||||
* @param {Object} [options]
|
|
||||||
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
||||||
* @return {String|Number}
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
module.exports = function (val, options) {
|
|
||||||
options = options || {};
|
|
||||||
|
|
||||||
var type = _typeof(val);
|
|
||||||
|
|
||||||
if (type === 'string' && val.length > 0) {
|
|
||||||
return parse(val);
|
|
||||||
} else if (type === 'number' && isNaN(val) === false) {
|
|
||||||
return options.long ? fmtLong(val) : fmtShort(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Parse the given `str` and return milliseconds.
|
|
||||||
*
|
|
||||||
* @param {String} str
|
|
||||||
* @return {Number}
|
|
||||||
* @api private
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function parse(str) {
|
|
||||||
str = String(str);
|
|
||||||
|
|
||||||
if (str.length > 100) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
|
|
||||||
|
|
||||||
if (!match) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var n = parseFloat(match[1]);
|
|
||||||
var type = (match[2] || 'ms').toLowerCase();
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case 'years':
|
|
||||||
case 'year':
|
|
||||||
case 'yrs':
|
|
||||||
case 'yr':
|
|
||||||
case 'y':
|
|
||||||
return n * y;
|
|
||||||
|
|
||||||
case 'weeks':
|
|
||||||
case 'week':
|
|
||||||
case 'w':
|
|
||||||
return n * w;
|
|
||||||
|
|
||||||
case 'days':
|
|
||||||
case 'day':
|
|
||||||
case 'd':
|
|
||||||
return n * d;
|
|
||||||
|
|
||||||
case 'hours':
|
|
||||||
case 'hour':
|
|
||||||
case 'hrs':
|
|
||||||
case 'hr':
|
|
||||||
case 'h':
|
|
||||||
return n * h;
|
|
||||||
|
|
||||||
case 'minutes':
|
|
||||||
case 'minute':
|
|
||||||
case 'mins':
|
|
||||||
case 'min':
|
|
||||||
case 'm':
|
|
||||||
return n * m;
|
|
||||||
|
|
||||||
case 'seconds':
|
|
||||||
case 'second':
|
|
||||||
case 'secs':
|
|
||||||
case 'sec':
|
|
||||||
case 's':
|
|
||||||
return n * s;
|
|
||||||
|
|
||||||
case 'milliseconds':
|
|
||||||
case 'millisecond':
|
|
||||||
case 'msecs':
|
|
||||||
case 'msec':
|
|
||||||
case 'ms':
|
|
||||||
return n;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Short format for `ms`.
|
|
||||||
*
|
|
||||||
* @param {Number} ms
|
|
||||||
* @return {String}
|
|
||||||
* @api private
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function fmtShort(ms) {
|
|
||||||
var msAbs = Math.abs(ms);
|
|
||||||
|
|
||||||
if (msAbs >= d) {
|
|
||||||
return Math.round(ms / d) + 'd';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (msAbs >= h) {
|
|
||||||
return Math.round(ms / h) + 'h';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (msAbs >= m) {
|
|
||||||
return Math.round(ms / m) + 'm';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (msAbs >= s) {
|
|
||||||
return Math.round(ms / s) + 's';
|
|
||||||
}
|
|
||||||
|
|
||||||
return ms + 'ms';
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Long format for `ms`.
|
|
||||||
*
|
|
||||||
* @param {Number} ms
|
|
||||||
* @return {String}
|
|
||||||
* @api private
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function fmtLong(ms) {
|
|
||||||
var msAbs = Math.abs(ms);
|
|
||||||
|
|
||||||
if (msAbs >= d) {
|
|
||||||
return plural(ms, msAbs, d, 'day');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (msAbs >= h) {
|
|
||||||
return plural(ms, msAbs, h, 'hour');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (msAbs >= m) {
|
|
||||||
return plural(ms, msAbs, m, 'minute');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (msAbs >= s) {
|
|
||||||
return plural(ms, msAbs, s, 'second');
|
|
||||||
}
|
|
||||||
|
|
||||||
return ms + ' ms';
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Pluralization helper.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function plural(ms, msAbs, n, name) {
|
|
||||||
var isPlural = msAbs >= n * 1.5;
|
|
||||||
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
||||||
}
|
|
||||||
}, {}],
|
|
||||||
2: [function (require, module, exports) {
|
|
||||||
// shim for using process in browser
|
|
||||||
var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it
|
|
||||||
// don't break things. But we need to wrap it in a try catch in case it is
|
|
||||||
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
||||||
// function because try/catches deoptimize in certain engines.
|
|
||||||
|
|
||||||
var cachedSetTimeout;
|
|
||||||
var cachedClearTimeout;
|
|
||||||
|
|
||||||
function defaultSetTimout() {
|
|
||||||
throw new Error('setTimeout has not been defined');
|
|
||||||
}
|
|
||||||
|
|
||||||
function defaultClearTimeout() {
|
|
||||||
throw new Error('clearTimeout has not been defined');
|
|
||||||
}
|
|
||||||
|
|
||||||
(function () {
|
|
||||||
try {
|
|
||||||
if (typeof setTimeout === 'function') {
|
|
||||||
cachedSetTimeout = setTimeout;
|
|
||||||
} else {
|
|
||||||
cachedSetTimeout = defaultSetTimout;
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
cachedSetTimeout = defaultSetTimout;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (typeof clearTimeout === 'function') {
|
|
||||||
cachedClearTimeout = clearTimeout;
|
|
||||||
} else {
|
|
||||||
cachedClearTimeout = defaultClearTimeout;
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
cachedClearTimeout = defaultClearTimeout;
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
function runTimeout(fun) {
|
|
||||||
if (cachedSetTimeout === setTimeout) {
|
|
||||||
//normal enviroments in sane situations
|
|
||||||
return setTimeout(fun, 0);
|
|
||||||
} // if setTimeout wasn't available but was latter defined
|
|
||||||
|
|
||||||
|
|
||||||
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
||||||
cachedSetTimeout = setTimeout;
|
|
||||||
return setTimeout(fun, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
||||||
return cachedSetTimeout(fun, 0);
|
|
||||||
} catch (e) {
|
|
||||||
try {
|
|
||||||
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
||||||
return cachedSetTimeout.call(null, fun, 0);
|
|
||||||
} catch (e) {
|
|
||||||
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
||||||
return cachedSetTimeout.call(this, fun, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function runClearTimeout(marker) {
|
|
||||||
if (cachedClearTimeout === clearTimeout) {
|
|
||||||
//normal enviroments in sane situations
|
|
||||||
return clearTimeout(marker);
|
|
||||||
} // if clearTimeout wasn't available but was latter defined
|
|
||||||
|
|
||||||
|
|
||||||
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
||||||
cachedClearTimeout = clearTimeout;
|
|
||||||
return clearTimeout(marker);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
||||||
return cachedClearTimeout(marker);
|
|
||||||
} catch (e) {
|
|
||||||
try {
|
|
||||||
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
||||||
return cachedClearTimeout.call(null, marker);
|
|
||||||
} catch (e) {
|
|
||||||
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
||||||
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
||||||
return cachedClearTimeout.call(this, marker);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var queue = [];
|
|
||||||
var draining = false;
|
|
||||||
var currentQueue;
|
|
||||||
var queueIndex = -1;
|
|
||||||
|
|
||||||
function cleanUpNextTick() {
|
|
||||||
if (!draining || !currentQueue) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
draining = false;
|
|
||||||
|
|
||||||
if (currentQueue.length) {
|
|
||||||
queue = currentQueue.concat(queue);
|
|
||||||
} else {
|
|
||||||
queueIndex = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (queue.length) {
|
|
||||||
drainQueue();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function drainQueue() {
|
|
||||||
if (draining) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var timeout = runTimeout(cleanUpNextTick);
|
|
||||||
draining = true;
|
|
||||||
var len = queue.length;
|
|
||||||
|
|
||||||
while (len) {
|
|
||||||
currentQueue = queue;
|
|
||||||
queue = [];
|
|
||||||
|
|
||||||
while (++queueIndex < len) {
|
|
||||||
if (currentQueue) {
|
|
||||||
currentQueue[queueIndex].run();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
queueIndex = -1;
|
|
||||||
len = queue.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
currentQueue = null;
|
|
||||||
draining = false;
|
|
||||||
runClearTimeout(timeout);
|
|
||||||
}
|
|
||||||
|
|
||||||
process.nextTick = function (fun) {
|
|
||||||
var args = new Array(arguments.length - 1);
|
|
||||||
|
|
||||||
if (arguments.length > 1) {
|
|
||||||
for (var i = 1; i < arguments.length; i++) {
|
|
||||||
args[i - 1] = arguments[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
queue.push(new Item(fun, args));
|
|
||||||
|
|
||||||
if (queue.length === 1 && !draining) {
|
|
||||||
runTimeout(drainQueue);
|
|
||||||
}
|
|
||||||
}; // v8 likes predictible objects
|
|
||||||
|
|
||||||
|
|
||||||
function Item(fun, array) {
|
|
||||||
this.fun = fun;
|
|
||||||
this.array = array;
|
|
||||||
}
|
|
||||||
|
|
||||||
Item.prototype.run = function () {
|
|
||||||
this.fun.apply(null, this.array);
|
|
||||||
};
|
|
||||||
|
|
||||||
process.title = 'browser';
|
|
||||||
process.browser = true;
|
|
||||||
process.env = {};
|
|
||||||
process.argv = [];
|
|
||||||
process.version = ''; // empty string to avoid regexp issues
|
|
||||||
|
|
||||||
process.versions = {};
|
|
||||||
|
|
||||||
function noop() {}
|
|
||||||
|
|
||||||
process.on = noop;
|
|
||||||
process.addListener = noop;
|
|
||||||
process.once = noop;
|
|
||||||
process.off = noop;
|
|
||||||
process.removeListener = noop;
|
|
||||||
process.removeAllListeners = noop;
|
|
||||||
process.emit = noop;
|
|
||||||
process.prependListener = noop;
|
|
||||||
process.prependOnceListener = noop;
|
|
||||||
|
|
||||||
process.listeners = function (name) {
|
|
||||||
return [];
|
|
||||||
};
|
|
||||||
|
|
||||||
process.binding = function (name) {
|
|
||||||
throw new Error('process.binding is not supported');
|
|
||||||
};
|
|
||||||
|
|
||||||
process.cwd = function () {
|
|
||||||
return '/';
|
|
||||||
};
|
|
||||||
|
|
||||||
process.chdir = function (dir) {
|
|
||||||
throw new Error('process.chdir is not supported');
|
|
||||||
};
|
|
||||||
|
|
||||||
process.umask = function () {
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
}, {}],
|
|
||||||
3: [function (require, module, exports) {
|
|
||||||
/**
|
|
||||||
* This is the common logic for both the Node.js and web browser
|
|
||||||
* implementations of `debug()`.
|
|
||||||
*/
|
|
||||||
function setup(env) {
|
|
||||||
createDebug.debug = createDebug;
|
|
||||||
createDebug.default = createDebug;
|
|
||||||
createDebug.coerce = coerce;
|
|
||||||
createDebug.disable = disable;
|
|
||||||
createDebug.enable = enable;
|
|
||||||
createDebug.enabled = enabled;
|
|
||||||
createDebug.humanize = require('ms');
|
|
||||||
Object.keys(env).forEach(function (key) {
|
|
||||||
createDebug[key] = env[key];
|
|
||||||
});
|
|
||||||
/**
|
|
||||||
* Active `debug` instances.
|
|
||||||
*/
|
|
||||||
|
|
||||||
createDebug.instances = [];
|
|
||||||
/**
|
|
||||||
* The currently active debug mode names, and names to skip.
|
|
||||||
*/
|
|
||||||
|
|
||||||
createDebug.names = [];
|
|
||||||
createDebug.skips = [];
|
|
||||||
/**
|
|
||||||
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
||||||
*
|
|
||||||
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
||||||
*/
|
|
||||||
|
|
||||||
createDebug.formatters = {};
|
|
||||||
/**
|
|
||||||
* Selects a color for a debug namespace
|
|
||||||
* @param {String} namespace The namespace string for the for the debug instance to be colored
|
|
||||||
* @return {Number|String} An ANSI color code for the given namespace
|
|
||||||
* @api private
|
|
||||||
*/
|
|
||||||
|
|
||||||
function selectColor(namespace) {
|
|
||||||
var hash = 0;
|
|
||||||
|
|
||||||
for (var i = 0; i < namespace.length; i++) {
|
|
||||||
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
||||||
hash |= 0; // Convert to 32bit integer
|
|
||||||
}
|
|
||||||
|
|
||||||
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
||||||
}
|
|
||||||
|
|
||||||
createDebug.selectColor = selectColor;
|
|
||||||
/**
|
|
||||||
* Create a debugger with the given `namespace`.
|
|
||||||
*
|
|
||||||
* @param {String} namespace
|
|
||||||
* @return {Function}
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
function createDebug(namespace) {
|
|
||||||
var prevTime;
|
|
||||||
|
|
||||||
function debug() {
|
|
||||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
||||||
args[_key] = arguments[_key];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disabled?
|
|
||||||
if (!debug.enabled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var self = debug; // Set `diff` timestamp
|
|
||||||
|
|
||||||
var curr = Number(new Date());
|
|
||||||
var ms = curr - (prevTime || curr);
|
|
||||||
self.diff = ms;
|
|
||||||
self.prev = prevTime;
|
|
||||||
self.curr = curr;
|
|
||||||
prevTime = curr;
|
|
||||||
args[0] = createDebug.coerce(args[0]);
|
|
||||||
|
|
||||||
if (typeof args[0] !== 'string') {
|
|
||||||
// Anything else let's inspect with %O
|
|
||||||
args.unshift('%O');
|
|
||||||
} // Apply any `formatters` transformations
|
|
||||||
|
|
||||||
|
|
||||||
var index = 0;
|
|
||||||
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
|
|
||||||
// If we encounter an escaped % then don't increase the array index
|
|
||||||
if (match === '%%') {
|
|
||||||
return match;
|
|
||||||
}
|
|
||||||
|
|
||||||
index++;
|
|
||||||
var formatter = createDebug.formatters[format];
|
|
||||||
|
|
||||||
if (typeof formatter === 'function') {
|
|
||||||
var val = args[index];
|
|
||||||
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
|
|
||||||
|
|
||||||
args.splice(index, 1);
|
|
||||||
index--;
|
|
||||||
}
|
|
||||||
|
|
||||||
return match;
|
|
||||||
}); // Apply env-specific formatting (colors, etc.)
|
|
||||||
|
|
||||||
createDebug.formatArgs.call(self, args);
|
|
||||||
var logFn = self.log || createDebug.log;
|
|
||||||
logFn.apply(self, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
debug.namespace = namespace;
|
|
||||||
debug.enabled = createDebug.enabled(namespace);
|
|
||||||
debug.useColors = createDebug.useColors();
|
|
||||||
debug.color = selectColor(namespace);
|
|
||||||
debug.destroy = destroy;
|
|
||||||
debug.extend = extend; // Debug.formatArgs = formatArgs;
|
|
||||||
// debug.rawLog = rawLog;
|
|
||||||
// env-specific initialization logic for debug instances
|
|
||||||
|
|
||||||
if (typeof createDebug.init === 'function') {
|
|
||||||
createDebug.init(debug);
|
|
||||||
}
|
|
||||||
|
|
||||||
createDebug.instances.push(debug);
|
|
||||||
return debug;
|
|
||||||
}
|
|
||||||
|
|
||||||
function destroy() {
|
|
||||||
var index = createDebug.instances.indexOf(this);
|
|
||||||
|
|
||||||
if (index !== -1) {
|
|
||||||
createDebug.instances.splice(index, 1);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function extend(namespace, delimiter) {
|
|
||||||
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Enables a debug mode by namespaces. This can include modes
|
|
||||||
* separated by a colon and wildcards.
|
|
||||||
*
|
|
||||||
* @param {String} namespaces
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function enable(namespaces) {
|
|
||||||
createDebug.save(namespaces);
|
|
||||||
createDebug.names = [];
|
|
||||||
createDebug.skips = [];
|
|
||||||
var i;
|
|
||||||
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
|
||||||
var len = split.length;
|
|
||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
|
||||||
if (!split[i]) {
|
|
||||||
// ignore empty strings
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespaces = split[i].replace(/\*/g, '.*?');
|
|
||||||
|
|
||||||
if (namespaces[0] === '-') {
|
|
||||||
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
|
||||||
} else {
|
|
||||||
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < createDebug.instances.length; i++) {
|
|
||||||
var instance = createDebug.instances[i];
|
|
||||||
instance.enabled = createDebug.enabled(instance.namespace);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Disable debug output.
|
|
||||||
*
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function disable() {
|
|
||||||
createDebug.enable('');
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns true if the given mode name is enabled, false otherwise.
|
|
||||||
*
|
|
||||||
* @param {String} name
|
|
||||||
* @return {Boolean}
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function enabled(name) {
|
|
||||||
if (name[name.length - 1] === '*') {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var i;
|
|
||||||
var len;
|
|
||||||
|
|
||||||
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
||||||
if (createDebug.skips[i].test(name)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
||||||
if (createDebug.names[i].test(name)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Coerce `val`.
|
|
||||||
*
|
|
||||||
* @param {Mixed} val
|
|
||||||
* @return {Mixed}
|
|
||||||
* @api private
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function coerce(val) {
|
|
||||||
if (val instanceof Error) {
|
|
||||||
return val.stack || val.message;
|
|
||||||
}
|
|
||||||
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
createDebug.enable(createDebug.load());
|
|
||||||
return createDebug;
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = setup;
|
|
||||||
}, {
|
|
||||||
"ms": 1
|
|
||||||
}],
|
|
||||||
4: [function (require, module, exports) {
|
|
||||||
(function (process) {
|
|
||||||
/* eslint-env browser */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the web browser implementation of `debug()`.
|
|
||||||
*/
|
|
||||||
exports.log = log;
|
|
||||||
exports.formatArgs = formatArgs;
|
|
||||||
exports.save = save;
|
|
||||||
exports.load = load;
|
|
||||||
exports.useColors = useColors;
|
|
||||||
exports.storage = localstorage();
|
|
||||||
/**
|
|
||||||
* Colors.
|
|
||||||
*/
|
|
||||||
|
|
||||||
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
|
|
||||||
/**
|
|
||||||
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
||||||
* and the Firebug extension (any Firefox version) are known
|
|
||||||
* to support "%c" CSS customizations.
|
|
||||||
*
|
|
||||||
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
||||||
*/
|
|
||||||
// eslint-disable-next-line complexity
|
|
||||||
|
|
||||||
function useColors() {
|
|
||||||
// NB: In an Electron preload script, document will be defined but not fully
|
|
||||||
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
||||||
// explicitly
|
|
||||||
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
||||||
return true;
|
|
||||||
} // Internet Explorer and Edge do not support colors.
|
|
||||||
|
|
||||||
|
|
||||||
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
||||||
return false;
|
|
||||||
} // Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
||||||
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
||||||
|
|
||||||
|
|
||||||
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
||||||
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
||||||
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
||||||
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
||||||
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Colorize log arguments if enabled.
|
|
||||||
*
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function formatArgs(args) {
|
|
||||||
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
|
|
||||||
|
|
||||||
if (!this.useColors) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var c = 'color: ' + this.color;
|
|
||||||
args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
|
|
||||||
// arguments passed either before or after the %c, so we need to
|
|
||||||
// figure out the correct index to insert the CSS into
|
|
||||||
|
|
||||||
var index = 0;
|
|
||||||
var lastC = 0;
|
|
||||||
args[0].replace(/%[a-zA-Z%]/g, function (match) {
|
|
||||||
if (match === '%%') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
index++;
|
|
||||||
|
|
||||||
if (match === '%c') {
|
|
||||||
// We only are interested in the *last* %c
|
|
||||||
// (the user may have provided their own)
|
|
||||||
lastC = index;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
args.splice(lastC, 0, c);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Invokes `console.log()` when available.
|
|
||||||
* No-op when `console.log` is not a "function".
|
|
||||||
*
|
|
||||||
* @api public
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function log() {
|
|
||||||
var _console;
|
|
||||||
|
|
||||||
// This hackery is required for IE8/9, where
|
|
||||||
// the `console.log` function doesn't have 'apply'
|
|
||||||
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Save `namespaces`.
|
|
||||||
*
|
|
||||||
* @param {String} namespaces
|
|
||||||
* @api private
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function save(namespaces) {
|
|
||||||
try {
|
|
||||||
if (namespaces) {
|
|
||||||
exports.storage.setItem('debug', namespaces);
|
|
||||||
} else {
|
|
||||||
exports.storage.removeItem('debug');
|
|
||||||
}
|
|
||||||
} catch (error) {// Swallow
|
|
||||||
// XXX (@Qix-) should we be logging these?
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Load `namespaces`.
|
|
||||||
*
|
|
||||||
* @return {String} returns the previously persisted debug modes
|
|
||||||
* @api private
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function load() {
|
|
||||||
var r;
|
|
||||||
|
|
||||||
try {
|
|
||||||
r = exports.storage.getItem('debug');
|
|
||||||
} catch (error) {} // Swallow
|
|
||||||
// XXX (@Qix-) should we be logging these?
|
|
||||||
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
||||||
|
|
||||||
|
|
||||||
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
|
||||||
r = process.env.DEBUG;
|
|
||||||
}
|
|
||||||
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Localstorage attempts to return the localstorage.
|
|
||||||
*
|
|
||||||
* This is necessary because safari throws
|
|
||||||
* when a user disables cookies/localstorage
|
|
||||||
* and you attempt to access it.
|
|
||||||
*
|
|
||||||
* @return {LocalStorage}
|
|
||||||
* @api private
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
function localstorage() {
|
|
||||||
try {
|
|
||||||
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
||||||
// The Browser also has localStorage in the global context.
|
|
||||||
return localStorage;
|
|
||||||
} catch (error) {// Swallow
|
|
||||||
// XXX (@Qix-) should we be logging these?
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = require('./common')(exports);
|
|
||||||
var formatters = module.exports.formatters;
|
|
||||||
/**
|
|
||||||
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
||||||
*/
|
|
||||||
|
|
||||||
formatters.j = function (v) {
|
|
||||||
try {
|
|
||||||
return JSON.stringify(v);
|
|
||||||
} catch (error) {
|
|
||||||
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}).call(this, require('_process'));
|
|
||||||
}, {
|
|
||||||
"./common": 3,
|
|
||||||
"_process": 2
|
|
||||||
}]
|
|
||||||
}, {}, [4])(4);
|
|
||||||
});
|
|
||||||
|
|
||||||
87
node_modules/nodemon/node_modules/debug/package.json
generated
vendored
87
node_modules/nodemon/node_modules/debug/package.json
generated
vendored
@@ -1,32 +1,52 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "debug@^3.2.6",
|
||||||
|
"_id": "debug@3.2.7",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
||||||
|
"_location": "/nodemon/debug",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "debug@^3.2.6",
|
||||||
"name": "debug",
|
"name": "debug",
|
||||||
"version": "3.2.6",
|
"escapedName": "debug",
|
||||||
"repository": {
|
"rawSpec": "^3.2.6",
|
||||||
"type": "git",
|
"saveSpec": null,
|
||||||
"url": "git://github.com/visionmedia/debug.git"
|
"fetchSpec": "^3.2.6"
|
||||||
},
|
},
|
||||||
"description": "small debugging utility",
|
"_requiredBy": [
|
||||||
"keywords": [
|
"/nodemon"
|
||||||
"debug",
|
|
||||||
"log",
|
|
||||||
"debugger"
|
|
||||||
],
|
],
|
||||||
"files": [
|
"_resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
|
||||||
"src",
|
"_shasum": "72580b7e9145fb39b6676f9c5e5fb100b934179a",
|
||||||
"node.js",
|
"_spec": "debug@^3.2.6",
|
||||||
"dist/debug.js",
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\nodemon",
|
||||||
"LICENSE",
|
"author": {
|
||||||
"README.md"
|
"name": "TJ Holowaychuk",
|
||||||
],
|
"email": "tj@vision-media.ca"
|
||||||
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
},
|
||||||
|
"browser": "./src/browser.js",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/visionmedia/debug/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
|
{
|
||||||
"Andrew Rhyne <rhyneandrew@gmail.com>"
|
"name": "Nathan Rajlich",
|
||||||
|
"email": "nathan@tootallnate.net",
|
||||||
|
"url": "http://n8.io"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Andrew Rhyne",
|
||||||
|
"email": "rhyneandrew@gmail.com"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ms": "^2.1.1"
|
"ms": "^2.1.1"
|
||||||
},
|
},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "small debugging utility",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.0.0",
|
"@babel/cli": "^7.0.0",
|
||||||
"@babel/core": "^7.0.0",
|
"@babel/core": "^7.0.0",
|
||||||
@@ -45,11 +65,26 @@
|
|||||||
"rimraf": "^2.5.4",
|
"rimraf": "^2.5.4",
|
||||||
"xo": "^0.23.0"
|
"xo": "^0.23.0"
|
||||||
},
|
},
|
||||||
|
"files": [
|
||||||
|
"src",
|
||||||
|
"node.js",
|
||||||
|
"dist/debug.js",
|
||||||
|
"LICENSE",
|
||||||
|
"README.md"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/visionmedia/debug#readme",
|
||||||
|
"keywords": [
|
||||||
|
"debug",
|
||||||
|
"log",
|
||||||
|
"debugger"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
"browser": "./src/browser.js",
|
"name": "debug",
|
||||||
"unpkg": "./dist/debug.js"
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
,"_resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz"
|
"url": "git://github.com/visionmedia/debug.git"
|
||||||
,"_integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ=="
|
},
|
||||||
,"_from": "debug@3.2.6"
|
"unpkg": "./dist/debug.js",
|
||||||
|
"version": "3.2.7"
|
||||||
}
|
}
|
||||||
5
node_modules/nodemon/node_modules/debug/src/node.js
generated
vendored
5
node_modules/nodemon/node_modules/debug/src/node.js
generated
vendored
@@ -160,7 +160,10 @@ var formatters = module.exports.formatters;
|
|||||||
|
|
||||||
formatters.o = function (v) {
|
formatters.o = function (v) {
|
||||||
this.inspectOpts.colors = this.useColors;
|
this.inspectOpts.colors = this.useColors;
|
||||||
return util.inspect(v, this.inspectOpts).replace(/\s*\n\s*/g, ' ');
|
return util.inspect(v, this.inspectOpts)
|
||||||
|
.split('\n')
|
||||||
|
.map(function (str) { return str.trim(); })
|
||||||
|
.join(' ');
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
||||||
|
|||||||
2
node_modules/nodemon/node_modules/ms/index.js
generated
vendored
2
node_modules/nodemon/node_modules/ms/index.js
generated
vendored
@@ -23,7 +23,7 @@ var y = d * 365.25;
|
|||||||
* @api public
|
* @api public
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = function(val, options) {
|
module.exports = function (val, options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
var type = typeof val;
|
var type = typeof val;
|
||||||
if (type === 'string' && val.length > 0) {
|
if (type === 'string' && val.length > 0) {
|
||||||
|
|||||||
2
node_modules/nodemon/node_modules/ms/license.md
generated
vendored
2
node_modules/nodemon/node_modules/ms/license.md
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2016 Zeit, Inc.
|
Copyright (c) 2020 Vercel, Inc.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
73
node_modules/nodemon/node_modules/ms/package.json
generated
vendored
73
node_modules/nodemon/node_modules/ms/package.json
generated
vendored
@@ -1,16 +1,40 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "ms@^2.1.1",
|
||||||
|
"_id": "ms@2.1.3",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||||
|
"_location": "/nodemon/ms",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "ms@^2.1.1",
|
||||||
"name": "ms",
|
"name": "ms",
|
||||||
"version": "2.1.2",
|
"escapedName": "ms",
|
||||||
"description": "Tiny millisecond conversion utility",
|
"rawSpec": "^2.1.1",
|
||||||
"repository": "zeit/ms",
|
"saveSpec": null,
|
||||||
"main": "./index",
|
"fetchSpec": "^2.1.1"
|
||||||
"files": [
|
},
|
||||||
"index.js"
|
"_requiredBy": [
|
||||||
|
"/nodemon/debug"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||||
"precommit": "lint-staged",
|
"_shasum": "574c8138ce1d2b5861f0b44579dbadd60c6615b2",
|
||||||
"lint": "eslint lib/* bin/*",
|
"_spec": "ms@^2.1.1",
|
||||||
"test": "mocha tests.js"
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\nodemon\\node_modules\\debug",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/vercel/ms/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Tiny millisecond conversion utility",
|
||||||
|
"devDependencies": {
|
||||||
|
"eslint": "4.18.2",
|
||||||
|
"expect.js": "0.3.1",
|
||||||
|
"husky": "0.14.3",
|
||||||
|
"lint-staged": "5.0.0",
|
||||||
|
"mocha": "4.0.1",
|
||||||
|
"prettier": "2.0.5"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": "eslint:recommended",
|
"extends": "eslint:recommended",
|
||||||
@@ -19,6 +43,11 @@
|
|||||||
"es6": true
|
"es6": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"files": [
|
||||||
|
"index.js"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/vercel/ms#readme",
|
||||||
|
"license": "MIT",
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.js": [
|
"*.js": [
|
||||||
"npm run lint",
|
"npm run lint",
|
||||||
@@ -26,16 +55,16 @@
|
|||||||
"git add"
|
"git add"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"main": "./index",
|
||||||
"devDependencies": {
|
"name": "ms",
|
||||||
"eslint": "4.12.1",
|
"repository": {
|
||||||
"expect.js": "0.3.1",
|
"type": "git",
|
||||||
"husky": "0.14.3",
|
"url": "git+https://github.com/vercel/ms.git"
|
||||||
"lint-staged": "5.0.0",
|
},
|
||||||
"mocha": "4.0.1"
|
"scripts": {
|
||||||
}
|
"lint": "eslint lib/* bin/*",
|
||||||
|
"precommit": "lint-staged",
|
||||||
,"_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
|
"test": "mocha tests.js"
|
||||||
,"_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
},
|
||||||
,"_from": "ms@2.1.2"
|
"version": "2.1.3"
|
||||||
}
|
}
|
||||||
3
node_modules/nodemon/node_modules/ms/readme.md
generated
vendored
3
node_modules/nodemon/node_modules/ms/readme.md
generated
vendored
@@ -1,7 +1,6 @@
|
|||||||
# ms
|
# ms
|
||||||
|
|
||||||
[](https://travis-ci.org/zeit/ms)
|

|
||||||
[](https://spectrum.chat/zeit)
|
|
||||||
|
|
||||||
Use this package to easily convert various time formats to milliseconds.
|
Use this package to easily convert various time formats to milliseconds.
|
||||||
|
|
||||||
|
|||||||
106
node_modules/nodemon/package.json
generated
vendored
106
node_modules/nodemon/package.json
generated
vendored
@@ -1,5 +1,103 @@
|
|||||||
{"name":"nodemon","homepage":"http://nodemon.io","author":{"name":"Remy Sharp","url":"http://github.com/remy"},"bin":{"nodemon":"./bin/nodemon.js"},"engines":{"node":">=8.10.0"},"repository":{"type":"git","url":"https://github.com/remy/nodemon.git"},"description":"Simple monitor script for use during development of a node.js app.","keywords":["monitor","development","restart","autoload","reload","terminal"],"license":"MIT","main":"./lib/nodemon","scripts":{"commitmsg":"commitlint -e","coverage":"istanbul cover _mocha -- --timeout 30000 --ui bdd --reporter list test/**/*.test.js","lint":"jscs lib/**/*.js -v",":spec":"node_modules/.bin/mocha --timeout 30000 --ui bdd test/**/*.test.js","test":"npm run lint && npm run spec","spec":"for FILE in test/**/*.test.js; do echo $FILE; TEST=1 mocha --exit --timeout 30000 $FILE; if [ $? -ne 0 ]; then exit 1; fi; sleep 1; done","postspec":"npm run clean","clean":"rm -rf test/fixtures/test*.js test/fixtures/test*.md","web":"node web","semantic-release":"semantic-release pre && npm publish && semantic-release post","prepush":"npm run lint","killall":"ps auxww | grep node | grep -v grep | awk '{ print $2 }' | xargs kill -9","postinstall":"node bin/postinstall || exit 0"},"devDependencies":{"@commitlint/cli":"^3.1.3","@commitlint/config-angular":"^3.1.1","async":"1.4.2","coffee-script":"~1.7.1","husky":"^0.14.3","istanbul":"^0.4.5","jscs":"^3.0.7","mocha":"^2.5.3","proxyquire":"^1.8.0","semantic-release":"^8.2.3","should":"~4.0.0"},"dependencies":{"chokidar":"^3.2.2","debug":"^3.2.6","ignore-by-default":"^1.0.1","minimatch":"^3.0.4","pstree.remy":"^1.1.7","semver":"^5.7.1","supports-color":"^5.5.0","touch":"^3.1.0","undefsafe":"^2.0.2","update-notifier":"^4.0.0"},"version":"2.0.4","funding":{"type":"opencollective","url":"https://opencollective.com/nodemon"}
|
{
|
||||||
,"_resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.4.tgz"
|
"_from": "nodemon@^2.0.4",
|
||||||
,"_integrity": "sha512-Ltced+hIfTmaS28Zjv1BM552oQ3dbwPqI4+zI0SLgq+wpJhSyqgYude/aZa/3i31VCQWMfXJVxvu86abcam3uQ=="
|
"_id": "nodemon@2.0.7",
|
||||||
,"_from": "nodemon@2.0.4"
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-XHzK69Awgnec9UzHr1kc8EomQh4sjTQ8oRf8TsGrSmHDx9/UmiGG9E/mM3BuTfNeFwdNBvrqQq/RHL0xIeyFOA==",
|
||||||
|
"_location": "/nodemon",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "nodemon@^2.0.4",
|
||||||
|
"name": "nodemon",
|
||||||
|
"escapedName": "nodemon",
|
||||||
|
"rawSpec": "^2.0.4",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "^2.0.4"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"#USER",
|
||||||
|
"/"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.7.tgz",
|
||||||
|
"_shasum": "6f030a0a0ebe3ea1ba2a38f71bf9bab4841ced32",
|
||||||
|
"_spec": "nodemon@^2.0.4",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend",
|
||||||
|
"author": {
|
||||||
|
"name": "Remy Sharp",
|
||||||
|
"url": "https://github.com/remy"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"nodemon": "bin/nodemon.js"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/remy/nodemon/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"dependencies": {
|
||||||
|
"chokidar": "^3.2.2",
|
||||||
|
"debug": "^3.2.6",
|
||||||
|
"ignore-by-default": "^1.0.1",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"pstree.remy": "^1.1.7",
|
||||||
|
"semver": "^5.7.1",
|
||||||
|
"supports-color": "^5.5.0",
|
||||||
|
"touch": "^3.1.0",
|
||||||
|
"undefsafe": "^2.0.3",
|
||||||
|
"update-notifier": "^4.1.0"
|
||||||
|
},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Simple monitor script for use during development of a node.js app.",
|
||||||
|
"devDependencies": {
|
||||||
|
"@commitlint/cli": "^11.0.0",
|
||||||
|
"@commitlint/config-conventional": "^11.0.0",
|
||||||
|
"async": "1.4.2",
|
||||||
|
"coffee-script": "~1.7.1",
|
||||||
|
"eslint": "^7.11.0",
|
||||||
|
"husky": "^0.14.3",
|
||||||
|
"istanbul": "^0.4.5",
|
||||||
|
"mocha": "^2.5.3",
|
||||||
|
"proxyquire": "^1.8.0",
|
||||||
|
"semantic-release": "^8.2.3",
|
||||||
|
"should": "~4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.10.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/nodemon"
|
||||||
|
},
|
||||||
|
"homepage": "https://nodemon.io",
|
||||||
|
"keywords": [
|
||||||
|
"monitor",
|
||||||
|
"development",
|
||||||
|
"restart",
|
||||||
|
"autoload",
|
||||||
|
"reload",
|
||||||
|
"terminal"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "./lib/nodemon",
|
||||||
|
"name": "nodemon",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/remy/nodemon.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
":spec": "mocha --timeout 30000 --ui bdd test/**/*.test.js",
|
||||||
|
"clean": "rm -rf test/fixtures/test*.js test/fixtures/test*.md",
|
||||||
|
"commitmsg": "commitlint -e",
|
||||||
|
"coverage": "istanbul cover _mocha -- --timeout 30000 --ui bdd --reporter list test/**/*.test.js",
|
||||||
|
"killall": "ps auxww | grep node | grep -v grep | awk '{ print $2 }' | xargs kill -9",
|
||||||
|
"lint": "eslint lib/**/*.js",
|
||||||
|
"postinstall": "node bin/postinstall || exit 0",
|
||||||
|
"postspec": "npm run clean",
|
||||||
|
"prepush": "npm run lint",
|
||||||
|
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
|
||||||
|
"spec": "for FILE in test/**/*.test.js; do echo $FILE; TEST=1 mocha --exit --timeout 30000 $FILE; if [ $? -ne 0 ]; then exit 1; fi; sleep 1; done",
|
||||||
|
"test": "npm run lint && npm run spec",
|
||||||
|
"web": "node web"
|
||||||
|
},
|
||||||
|
"version": "2.0.7"
|
||||||
}
|
}
|
||||||
5
node_modules/pupa/index.js
generated
vendored
5
node_modules/pupa/index.js
generated
vendored
@@ -10,7 +10,8 @@ module.exports = (template, data) => {
|
|||||||
throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof data}\``);
|
throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof data}\``);
|
||||||
}
|
}
|
||||||
|
|
||||||
const doubleBraceRegex = /{{(.*?)}}/g;
|
// The regex tries to match either a number inside `{{ }}` or a valid JS identifier or key path.
|
||||||
|
const doubleBraceRegex = /{{(\d+|[a-z$_][a-z\d$_]*?(?:\.[a-z\d$_]*?)*?)}}/gi;
|
||||||
|
|
||||||
if (doubleBraceRegex.test(template)) {
|
if (doubleBraceRegex.test(template)) {
|
||||||
template = template.replace(doubleBraceRegex, (_, key) => {
|
template = template.replace(doubleBraceRegex, (_, key) => {
|
||||||
@@ -24,7 +25,7 @@ module.exports = (template, data) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const braceRegex = /{(.*?)}/g;
|
const braceRegex = /{(\d+|[a-z$_][a-z\d$_]*?(?:\.[a-z\d$_]*?)*?)}/gi;
|
||||||
|
|
||||||
return template.replace(braceRegex, (_, key) => {
|
return template.replace(braceRegex, (_, key) => {
|
||||||
let result = data;
|
let result = data;
|
||||||
|
|||||||
64
node_modules/pupa/package.json
generated
vendored
64
node_modules/pupa/package.json
generated
vendored
@@ -1,24 +1,54 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "pupa@^2.0.1",
|
||||||
|
"_id": "pupa@2.1.1",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==",
|
||||||
|
"_location": "/pupa",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "pupa@^2.0.1",
|
||||||
"name": "pupa",
|
"name": "pupa",
|
||||||
"version": "2.0.1",
|
"escapedName": "pupa",
|
||||||
"description": "Simple micro templating",
|
"rawSpec": "^2.0.1",
|
||||||
"license": "MIT",
|
"saveSpec": null,
|
||||||
"repository": "sindresorhus/pupa",
|
"fetchSpec": "^2.0.1"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/update-notifier"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz",
|
||||||
|
"_shasum": "f5e8fd4afc2c5d97828faa523549ed8744a20d62",
|
||||||
|
"_spec": "pupa@^2.0.1",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\update-notifier",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
"url": "sindresorhus.com"
|
"url": "sindresorhus.com"
|
||||||
},
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/sindresorhus/pupa/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"dependencies": {
|
||||||
|
"escape-goat": "^2.0.0"
|
||||||
|
},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Simple micro templating",
|
||||||
|
"devDependencies": {
|
||||||
|
"ava": "^1.4.1",
|
||||||
|
"tsd": "^0.7.2",
|
||||||
|
"xo": "^0.24.0"
|
||||||
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"test": "xo && ava && tsd"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
"index.d.ts"
|
"index.d.ts"
|
||||||
],
|
],
|
||||||
|
"homepage": "https://github.com/sindresorhus/pupa#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"string",
|
"string",
|
||||||
"formatting",
|
"formatting",
|
||||||
@@ -36,16 +66,14 @@
|
|||||||
"transform",
|
"transform",
|
||||||
"micro"
|
"micro"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"license": "MIT",
|
||||||
"escape-goat": "^2.0.0"
|
"name": "pupa",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/sindresorhus/pupa.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"scripts": {
|
||||||
"ava": "^1.4.1",
|
"test": "xo && ava && tsd"
|
||||||
"tsd": "^0.7.2",
|
},
|
||||||
"xo": "^0.24.0"
|
"version": "2.1.1"
|
||||||
}
|
|
||||||
|
|
||||||
,"_resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz"
|
|
||||||
,"_integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA=="
|
|
||||||
,"_from": "pupa@2.0.1"
|
|
||||||
}
|
}
|
||||||
8
node_modules/readdirp/README.md
generated
vendored
8
node_modules/readdirp/README.md
generated
vendored
@@ -1,8 +1,7 @@
|
|||||||
# readdirp [](https://github.com/paulmillr/readdirp)
|
# readdirp [](https://github.com/paulmillr/readdirp)
|
||||||
|
|
||||||
> Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**.
|
Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**.
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/readdirp)
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install readdirp
|
npm install readdirp
|
||||||
@@ -79,7 +78,7 @@ First argument is awalys `root`, path in which to start reading and recursing in
|
|||||||
- `directoryFilter: ['!.git']`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into.
|
- `directoryFilter: ['!.git']`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into.
|
||||||
- `depth: 5`: depth at which to stop recursing even if more subdirectories are found
|
- `depth: 5`: depth at which to stop recursing even if more subdirectories are found
|
||||||
- `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes.
|
- `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes.
|
||||||
- `alwaysStat: false`: always return `stats` property for every file. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0.
|
- `alwaysStat: false`: always return `stats` property for every file. Default is `false`, readdirp will return `Dirent` entries. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0.
|
||||||
- `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat`
|
- `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat`
|
||||||
|
|
||||||
### `EntryInfo`
|
### `EntryInfo`
|
||||||
@@ -94,6 +93,9 @@ Has the following properties:
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
- 3.5 (Oct 13, 2020) disallows recursive directory-based symlinks.
|
||||||
|
Before, it could have entered infinite loop.
|
||||||
|
- 3.4 (Mar 19, 2020) adds support for directory-based symlinks.
|
||||||
- 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping.
|
- 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping.
|
||||||
- 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic.
|
- 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic.
|
||||||
- 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions".
|
- 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions".
|
||||||
|
|||||||
9
node_modules/readdirp/index.js
generated
vendored
9
node_modules/readdirp/index.js
generated
vendored
@@ -204,13 +204,20 @@ class ReaddirpStream extends Readable {
|
|||||||
return 'directory';
|
return 'directory';
|
||||||
}
|
}
|
||||||
if (stats && stats.isSymbolicLink()) {
|
if (stats && stats.isSymbolicLink()) {
|
||||||
|
const full = entry.fullPath;
|
||||||
try {
|
try {
|
||||||
const entryRealPath = await realpath(entry.fullPath);
|
const entryRealPath = await realpath(full);
|
||||||
const entryRealPathStats = await lstat(entryRealPath);
|
const entryRealPathStats = await lstat(entryRealPath);
|
||||||
if (entryRealPathStats.isFile()) {
|
if (entryRealPathStats.isFile()) {
|
||||||
return 'file';
|
return 'file';
|
||||||
}
|
}
|
||||||
if (entryRealPathStats.isDirectory()) {
|
if (entryRealPathStats.isDirectory()) {
|
||||||
|
const len = entryRealPath.length;
|
||||||
|
if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) {
|
||||||
|
return this._onError(new Error(
|
||||||
|
`Circular symlink detected: "${full}" points to "${entryRealPath}"`
|
||||||
|
));
|
||||||
|
}
|
||||||
return 'directory';
|
return 'directory';
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
127
node_modules/readdirp/package.json
generated
vendored
127
node_modules/readdirp/package.json
generated
vendored
@@ -1,64 +1,65 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "readdirp@~3.5.0",
|
||||||
|
"_id": "readdirp@3.5.0",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
|
||||||
|
"_location": "/readdirp",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "readdirp@~3.5.0",
|
||||||
"name": "readdirp",
|
"name": "readdirp",
|
||||||
"description": "Recursive version of fs.readdir with streaming API.",
|
"escapedName": "readdirp",
|
||||||
"version": "3.4.0",
|
"rawSpec": "~3.5.0",
|
||||||
"homepage": "https://github.com/paulmillr/readdirp",
|
"saveSpec": null,
|
||||||
"repository": {
|
"fetchSpec": "~3.5.0"
|
||||||
"type": "git",
|
},
|
||||||
"url": "git://github.com/paulmillr/readdirp.git"
|
"_requiredBy": [
|
||||||
|
"/chokidar"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
|
||||||
|
"_shasum": "9ba74c019b15d365278d2e91bb8c48d7b4d42c9e",
|
||||||
|
"_spec": "readdirp@~3.5.0",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\chokidar",
|
||||||
|
"author": {
|
||||||
|
"name": "Thorsten Lorenz",
|
||||||
|
"email": "thlorenz@gmx.de",
|
||||||
|
"url": "thlorenz.com"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/paulmillr/readdirp/issues"
|
"url": "https://github.com/paulmillr/readdirp/issues"
|
||||||
},
|
},
|
||||||
"author": "Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)",
|
"bundleDependencies": false,
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)",
|
{
|
||||||
"Paul Miller (https://paulmillr.com)"
|
"name": "Thorsten Lorenz",
|
||||||
],
|
"email": "thlorenz@gmx.de",
|
||||||
"main": "index.js",
|
"url": "thlorenz.com"
|
||||||
"engines": {
|
|
||||||
"node": ">=8.10.0"
|
|
||||||
},
|
},
|
||||||
"files": [
|
{
|
||||||
"index.js",
|
"name": "Paul Miller",
|
||||||
"index.d.ts"
|
"url": "https://paulmillr.com"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"keywords": [
|
|
||||||
"recursive",
|
|
||||||
"fs",
|
|
||||||
"stream",
|
|
||||||
"streams",
|
|
||||||
"readdir",
|
|
||||||
"filesystem",
|
|
||||||
"find",
|
|
||||||
"filter"
|
|
||||||
],
|
|
||||||
"scripts": {
|
|
||||||
"dtslint": "dtslint",
|
|
||||||
"nyc": "nyc",
|
|
||||||
"mocha": "mocha --exit",
|
|
||||||
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
|
|
||||||
"test": "npm run lint && nyc npm run mocha"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"picomatch": "^2.2.1"
|
"picomatch": "^2.2.1"
|
||||||
},
|
},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Recursive version of fs.readdir with streaming API.",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^13",
|
"@types/node": "^14",
|
||||||
"chai": "^4.2",
|
"chai": "^4.2",
|
||||||
"chai-subset": "^1.6",
|
"chai-subset": "^1.6",
|
||||||
"dtslint": "^3.3.0",
|
"dtslint": "^3.3.0",
|
||||||
"eslint": "^6.6.0",
|
"eslint": "^7.0.0",
|
||||||
"mocha": "^7.1.1",
|
"mocha": "^7.1.1",
|
||||||
"nyc": "^15.0.0",
|
"nyc": "^15.0.0",
|
||||||
"rimraf": "^3.0.0"
|
"rimraf": "^3.0.0",
|
||||||
|
"typescript": "^4.0.3"
|
||||||
},
|
},
|
||||||
"nyc": {
|
"engines": {
|
||||||
"reporter": [
|
"node": ">=8.10.0"
|
||||||
"html",
|
|
||||||
"text"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"root": true,
|
"root": true,
|
||||||
@@ -117,9 +118,41 @@
|
|||||||
"single"
|
"single"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"files": [
|
||||||
,"_resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz"
|
"index.js",
|
||||||
,"_integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ=="
|
"index.d.ts"
|
||||||
,"_from": "readdirp@3.4.0"
|
],
|
||||||
|
"homepage": "https://github.com/paulmillr/readdirp",
|
||||||
|
"keywords": [
|
||||||
|
"recursive",
|
||||||
|
"fs",
|
||||||
|
"stream",
|
||||||
|
"streams",
|
||||||
|
"readdir",
|
||||||
|
"filesystem",
|
||||||
|
"find",
|
||||||
|
"filter"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "index.js",
|
||||||
|
"name": "readdirp",
|
||||||
|
"nyc": {
|
||||||
|
"reporter": [
|
||||||
|
"html",
|
||||||
|
"text"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/paulmillr/readdirp.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"dtslint": "dtslint",
|
||||||
|
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
|
||||||
|
"mocha": "mocha --exit",
|
||||||
|
"nyc": "nyc",
|
||||||
|
"test": "npm run lint && nyc npm run mocha"
|
||||||
|
},
|
||||||
|
"version": "3.5.0"
|
||||||
}
|
}
|
||||||
6
node_modules/registry-auth-token/CHANGELOG.md
generated
vendored
6
node_modules/registry-auth-token/CHANGELOG.md
generated
vendored
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
All notable changes will be documented in this file.
|
All notable changes will be documented in this file.
|
||||||
|
|
||||||
|
## [4.2.0] - 2020-07-13
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
- Add support for `NPM_CONFIG_USERCONFIG` environment variable (Ben Sorohan)
|
||||||
|
|
||||||
## [4.1.0] - 2020-01-17
|
## [4.1.0] - 2020-01-17
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
|||||||
2
node_modules/registry-auth-token/README.md
generated
vendored
2
node_modules/registry-auth-token/README.md
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
# registry-auth-token
|
# registry-auth-token
|
||||||
|
|
||||||
[](http://browsenpm.org/package/registry-auth-token)[](https://travis-ci.org/rexxars/registry-auth-token)
|
[](http://browsenpm.org/package/registry-auth-token)[](https://travis-ci.org/rexxars/registry-auth-token)
|
||||||
|
|
||||||
Get the auth token set for an npm registry from `.npmrc`. Also allows fetching the configured registry URL for a given npm scope.
|
Get the auth token set for an npm registry from `.npmrc`. Also allows fetching the configured registry URL for a given npm scope.
|
||||||
|
|
||||||
|
|||||||
4
node_modules/registry-auth-token/index.js
generated
vendored
4
node_modules/registry-auth-token/index.js
generated
vendored
@@ -21,7 +21,9 @@ module.exports = function () {
|
|||||||
options = arguments[0]
|
options = arguments[0]
|
||||||
}
|
}
|
||||||
options = options || {}
|
options = options || {}
|
||||||
options.npmrc = options.npmrc || require('rc')('npm', { registry: 'https://registry.npmjs.org/' })
|
options.npmrc = options.npmrc || require('rc')('npm', { registry: 'https://registry.npmjs.org/' }, {
|
||||||
|
config: process.env.npm_config_userconfig || process.env.NPM_CONFIG_USERCONFIG
|
||||||
|
})
|
||||||
checkUrl = checkUrl || options.npmrc.registry
|
checkUrl = checkUrl || options.npmrc.registry
|
||||||
return getRegistryAuthInfo(checkUrl, options) || getLegacyAuthInfo(options.npmrc)
|
return getRegistryAuthInfo(checkUrl, options) || getLegacyAuthInfo(options.npmrc)
|
||||||
}
|
}
|
||||||
|
|||||||
78
node_modules/registry-auth-token/package.json
generated
vendored
78
node_modules/registry-auth-token/package.json
generated
vendored
@@ -1,20 +1,50 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "registry-auth-token@^4.0.0",
|
||||||
|
"_id": "registry-auth-token@4.2.1",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==",
|
||||||
|
"_location": "/registry-auth-token",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "registry-auth-token@^4.0.0",
|
||||||
"name": "registry-auth-token",
|
"name": "registry-auth-token",
|
||||||
"version": "4.1.1",
|
"escapedName": "registry-auth-token",
|
||||||
"description": "Get the auth token set for an npm registry (if any)",
|
"rawSpec": "^4.0.0",
|
||||||
"main": "index.js",
|
"saveSpec": null,
|
||||||
"scripts": {
|
"fetchSpec": "^4.0.0"
|
||||||
"test": "mocha",
|
|
||||||
"posttest": "standard",
|
|
||||||
"coverage": "istanbul cover _mocha"
|
|
||||||
},
|
},
|
||||||
"repository": {
|
"_requiredBy": [
|
||||||
"type": "git",
|
"/package-json"
|
||||||
"url": "git+ssh://git@github.com/rexxars/registry-auth-token.git"
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz",
|
||||||
|
"_shasum": "6d7b4006441918972ccd5fedcd41dc322c79b250",
|
||||||
|
"_spec": "registry-auth-token@^4.0.0",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\package-json",
|
||||||
|
"author": {
|
||||||
|
"name": "Espen Hovlandsdal",
|
||||||
|
"email": "espen@hovlandsdal.com"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/rexxars/registry-auth-token/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"dependencies": {
|
||||||
|
"rc": "^1.2.8"
|
||||||
|
},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Get the auth token set for an npm registry (if any)",
|
||||||
|
"devDependencies": {
|
||||||
|
"istanbul": "^0.4.2",
|
||||||
|
"mocha": "^6.1.4",
|
||||||
|
"require-uncached": "^1.0.2",
|
||||||
|
"standard": "^12.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.0.0"
|
"node": ">=6.0.0"
|
||||||
},
|
},
|
||||||
|
"homepage": "https://github.com/rexxars/registry-auth-token#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"npm",
|
"npm",
|
||||||
"conf",
|
"conf",
|
||||||
@@ -25,28 +55,22 @@
|
|||||||
"token",
|
"token",
|
||||||
"authtoken"
|
"authtoken"
|
||||||
],
|
],
|
||||||
"author": "Espen Hovlandsdal <espen@hovlandsdal.com>",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"main": "index.js",
|
||||||
"url": "https://github.com/rexxars/registry-auth-token/issues"
|
"name": "registry-auth-token",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+ssh://git@github.com/rexxars/registry-auth-token.git"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/rexxars/registry-auth-token#readme",
|
"scripts": {
|
||||||
"dependencies": {
|
"coverage": "istanbul cover _mocha",
|
||||||
"rc": "^1.2.8"
|
"posttest": "standard",
|
||||||
},
|
"test": "mocha"
|
||||||
"devDependencies": {
|
|
||||||
"istanbul": "^0.4.2",
|
|
||||||
"mocha": "^6.1.4",
|
|
||||||
"require-uncached": "^1.0.2",
|
|
||||||
"standard": "^12.0.1"
|
|
||||||
},
|
},
|
||||||
"standard": {
|
"standard": {
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"coverage/**"
|
"coverage/**"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"version": "4.2.1"
|
||||||
,"_resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz"
|
|
||||||
,"_integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA=="
|
|
||||||
,"_from": "registry-auth-token@4.1.1"
|
|
||||||
}
|
}
|
||||||
474
node_modules/registry-auth-token/test/auth-token.test.js
generated
vendored
474
node_modules/registry-auth-token/test/auth-token.test.js
generated
vendored
@@ -1,474 +0,0 @@
|
|||||||
var fs = require('fs')
|
|
||||||
var path = require('path')
|
|
||||||
var mocha = require('mocha')
|
|
||||||
var assert = require('assert')
|
|
||||||
var requireUncached = require('require-uncached')
|
|
||||||
|
|
||||||
var npmRcPath = path.join(__dirname, '..', '.npmrc')
|
|
||||||
var afterEach = mocha.afterEach
|
|
||||||
var describe = mocha.describe
|
|
||||||
var it = mocha.it
|
|
||||||
|
|
||||||
var base64 = require('../base64')
|
|
||||||
var decodeBase64 = base64.decodeBase64
|
|
||||||
var encodeBase64 = base64.encodeBase64
|
|
||||||
|
|
||||||
/* eslint max-nested-callbacks: ["error", 4] */
|
|
||||||
|
|
||||||
describe('auth-token', function () {
|
|
||||||
afterEach(function (done) {
|
|
||||||
fs.unlink(npmRcPath, function () {
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should read global if no local is found', function () {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
getAuthToken()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return undefined if no auth token is given for registry', function (done) {
|
|
||||||
fs.writeFile(npmRcPath, 'registry=http://registry.npmjs.eu/', function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert(!getAuthToken())
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('legacy auth token', function () {
|
|
||||||
it('should return auth token if it is defined in the legacy way via the `_auth` key', function (done) {
|
|
||||||
var content = [
|
|
||||||
'_auth=foobar',
|
|
||||||
'registry=http://registry.foobar.eu/'
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(getAuthToken(), { token: 'foobar', type: 'Basic' })
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return legacy auth token defined by reference to an environment variable (with curly braces)', function (done) {
|
|
||||||
var environmentVariable = '__REGISTRY_AUTH_TOKEN_NPM_TOKEN__'
|
|
||||||
var content = [
|
|
||||||
'_auth=${' + environmentVariable + '}',
|
|
||||||
'registry=http://registry.foobar.eu/'
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
process.env[environmentVariable] = 'foobar'
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(getAuthToken(), { token: 'foobar', type: 'Basic' })
|
|
||||||
delete process.env[environmentVariable]
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return legacy auth token defined by reference to an environment variable (without curly braces)', function (done) {
|
|
||||||
var environmentVariable = '__REGISTRY_AUTH_TOKEN_NPM_TOKEN__'
|
|
||||||
var content = [
|
|
||||||
'_auth=$' + environmentVariable,
|
|
||||||
'registry=http://registry.foobar.eu/'
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
process.env[environmentVariable] = 'foobar'
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(getAuthToken(), { token: 'foobar', type: 'Basic' })
|
|
||||||
delete process.env[environmentVariable]
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('bearer token', function () {
|
|
||||||
it('should return auth token if registry is defined', function (done) {
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.eu/',
|
|
||||||
'//registry.foobar.eu/:_authToken=foobar', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(getAuthToken(), { token: 'foobar', type: 'Bearer' })
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should use npmrc passed in', function (done) {
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.eu/',
|
|
||||||
'//registry.foobar.eu/:_authToken=foobar', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
const npmrc = {
|
|
||||||
'registry': 'http://registry.foobar.eu/',
|
|
||||||
'//registry.foobar.eu/:_authToken': 'qar'
|
|
||||||
}
|
|
||||||
assert.deepStrictEqual(getAuthToken({ npmrc: npmrc }), { token: 'qar', type: 'Bearer' })
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return auth token if registry url has port specified', function (done) {
|
|
||||||
var content = [
|
|
||||||
'registry=http://localhost:8770/',
|
|
||||||
// before the patch this token was selected.
|
|
||||||
'//localhost/:_authToken=ohno',
|
|
||||||
'//localhost:8770/:_authToken=beepboop', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(getAuthToken(), { token: 'beepboop', type: 'Bearer' })
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return auth token defined by reference to an environment variable (with curly braces)', function (done) {
|
|
||||||
var environmentVariable = '__REGISTRY_AUTH_TOKEN_NPM_TOKEN__'
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.cc/',
|
|
||||||
'//registry.foobar.cc/:_authToken=${' + environmentVariable + '}', ''
|
|
||||||
].join('\n')
|
|
||||||
process.env[environmentVariable] = 'foobar'
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(getAuthToken(), { token: 'foobar', type: 'Bearer' })
|
|
||||||
delete process.env[environmentVariable]
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return auth token defined by reference to an environment variable (without curly braces)', function (done) {
|
|
||||||
var environmentVariable = '__REGISTRY_AUTH_TOKEN_NPM_TOKEN__'
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.cc/',
|
|
||||||
'//registry.foobar.cc/:_authToken=$' + environmentVariable, ''
|
|
||||||
].join('\n')
|
|
||||||
process.env[environmentVariable] = 'foobar'
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(getAuthToken(), { token: 'foobar', type: 'Bearer' })
|
|
||||||
delete process.env[environmentVariable]
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should try with and without a slash at the end of registry url', function (done) {
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.eu',
|
|
||||||
'//registry.foobar.eu:_authToken=barbaz', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(getAuthToken(), { token: 'barbaz', type: 'Bearer' })
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should fetch for the registry given (if defined)', function (done) {
|
|
||||||
var content = [
|
|
||||||
'//registry.foobar.eu:_authToken=barbaz',
|
|
||||||
'//registry.blah.foo:_authToken=whatev',
|
|
||||||
'//registry.last.thing:_authToken=yep', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(getAuthToken('//registry.blah.foo'), { token: 'whatev', type: 'Bearer' })
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('recursively finds registries for deep url if option is set', function (done, undef) {
|
|
||||||
var opts = { recursive: true }
|
|
||||||
var content = [
|
|
||||||
'//registry.blah.com/foo:_authToken=whatev',
|
|
||||||
'//registry.blah.org/foo/bar:_authToken=recurseExactlyOneLevel',
|
|
||||||
'//registry.blah.edu/foo/bar/baz:_authToken=recurseNoLevel',
|
|
||||||
'//registry.blah.eu:_authToken=yep', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(getAuthToken('https://registry.blah.edu/foo/bar/baz', opts), { token: 'recurseNoLevel', type: 'Bearer' })
|
|
||||||
assert.deepStrictEqual(getAuthToken('https://registry.blah.org/foo/bar/baz', opts), { token: 'recurseExactlyOneLevel', type: 'Bearer' })
|
|
||||||
assert.deepStrictEqual(getAuthToken('https://registry.blah.com/foo/bar/baz', opts), { token: 'whatev', type: 'Bearer' })
|
|
||||||
assert.deepStrictEqual(getAuthToken('http://registry.blah.eu/what/ever', opts), { token: 'yep', type: 'Bearer' })
|
|
||||||
assert.deepStrictEqual(getAuthToken('http://registry.blah.eu//what/ever', opts), undefined, 'does not hang')
|
|
||||||
assert.strictEqual(getAuthToken('//some.registry', opts), undef)
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should try both with and without trailing slash', function (done) {
|
|
||||||
fs.writeFile(npmRcPath, '//registry.blah.com:_authToken=whatev', function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(getAuthToken('https://registry.blah.com'), { token: 'whatev', type: 'Bearer' })
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should prefer bearer token over basic token', function (done) {
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.eu/',
|
|
||||||
'registry=http://registry.foobar.eu/',
|
|
||||||
'//registry.foobar.eu/:_authToken=bearerToken',
|
|
||||||
'//registry.foobar.eu/:_password=' + encodeBase64('foobar'),
|
|
||||||
'//registry.foobar.eu/:username=foobar', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(getAuthToken('//registry.foobar.eu'), { token: 'bearerToken', type: 'Bearer' })
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('"nerf darts" registry urls', function (done, undef) {
|
|
||||||
fs.writeFile(npmRcPath, '//contoso.pkgs.visualstudio.com/_packaging/MyFeed/npm/:_authToken=heider', function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.deepStrictEqual(
|
|
||||||
getAuthToken('https://contoso.pkgs.visualstudio.com/_packaging/MyFeed/npm/registry'),
|
|
||||||
{ token: 'heider', type: 'Bearer' }
|
|
||||||
)
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('basic token', function () {
|
|
||||||
it('should return undefined if password or username are missing', function (done, undef) {
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.eu/',
|
|
||||||
'//registry.foobar.eu/:_password=' + encodeBase64('foobar'),
|
|
||||||
'//registry.foobar.com/:username=foobar', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.strictEqual(getAuthToken('//registry.foobar.eu'), undef)
|
|
||||||
assert.strictEqual(getAuthToken('//registry.foobar.com'), undef)
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return basic token if username and password are defined', function (done) {
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.eu/',
|
|
||||||
'//registry.foobar.eu/:_password=' + encodeBase64('foobar'),
|
|
||||||
'//registry.foobar.eu/:username=foobar', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
var token = getAuthToken()
|
|
||||||
assert.deepStrictEqual(token, {
|
|
||||||
token: 'Zm9vYmFyOmZvb2Jhcg==',
|
|
||||||
type: 'Basic',
|
|
||||||
username: 'foobar',
|
|
||||||
password: 'foobar'
|
|
||||||
})
|
|
||||||
assert.strictEqual(decodeBase64(token.token), 'foobar:foobar')
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return basic token if _auth is base64 encoded', function (done) {
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.eu/',
|
|
||||||
'//registry.foobar.eu/:_auth=' + encodeBase64('foobar:foobar')
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
var token = getAuthToken()
|
|
||||||
assert.deepStrictEqual(token, {
|
|
||||||
token: 'Zm9vYmFyOmZvb2Jhcg==',
|
|
||||||
type: 'Basic'
|
|
||||||
})
|
|
||||||
assert.strictEqual(decodeBase64(token.token), 'foobar:foobar')
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return basic token if registry url has port specified', function (done) {
|
|
||||||
var content = [
|
|
||||||
'registry=http://localhost:8770/',
|
|
||||||
// before the patch this token was selected.
|
|
||||||
'//localhost/:_authToken=ohno',
|
|
||||||
'//localhost:8770/:_password=' + encodeBase64('foobar'),
|
|
||||||
'//localhost:8770/:username=foobar', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
var token = getAuthToken()
|
|
||||||
assert.deepStrictEqual(token, {
|
|
||||||
token: 'Zm9vYmFyOmZvb2Jhcg==',
|
|
||||||
type: 'Basic',
|
|
||||||
username: 'foobar',
|
|
||||||
password: 'foobar'
|
|
||||||
})
|
|
||||||
assert.strictEqual(decodeBase64(token.token), 'foobar:foobar')
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return password defined by reference to an environment variable (with curly braces)', function (done) {
|
|
||||||
var environmentVariable = '__REGISTRY_PASSWORD__'
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.cc/',
|
|
||||||
'//registry.foobar.cc/:username=username',
|
|
||||||
'//registry.foobar.cc/:_password=${' + environmentVariable + '}', ''
|
|
||||||
].join('\n')
|
|
||||||
process.env[environmentVariable] = encodeBase64('password')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
var token = getAuthToken()
|
|
||||||
assert.deepStrictEqual(token, {
|
|
||||||
type: 'Basic',
|
|
||||||
username: 'username',
|
|
||||||
password: 'password',
|
|
||||||
token: 'dXNlcm5hbWU6cGFzc3dvcmQ='
|
|
||||||
})
|
|
||||||
assert.strictEqual(decodeBase64(token.token), 'username:password')
|
|
||||||
delete process.env[environmentVariable]
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return password defined by reference to an environment variable (without curly braces)', function (done) {
|
|
||||||
var environmentVariable = '__REGISTRY_PASSWORD__'
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.cc/',
|
|
||||||
'//registry.foobar.cc/:username=username',
|
|
||||||
'//registry.foobar.cc/:_password=$' + environmentVariable, ''
|
|
||||||
].join('\n')
|
|
||||||
process.env[environmentVariable] = encodeBase64('password')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
var token = getAuthToken()
|
|
||||||
assert.deepStrictEqual(token, {
|
|
||||||
type: 'Basic',
|
|
||||||
username: 'username',
|
|
||||||
password: 'password',
|
|
||||||
token: 'dXNlcm5hbWU6cGFzc3dvcmQ='
|
|
||||||
})
|
|
||||||
assert.strictEqual(decodeBase64(token.token), 'username:password')
|
|
||||||
delete process.env[environmentVariable]
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should try with and without a slash at the end of registry url', function (done) {
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.eu',
|
|
||||||
'//registry.foobar.eu:_password=' + encodeBase64('barbay'),
|
|
||||||
'//registry.foobar.eu:username=barbaz', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
var token = getAuthToken()
|
|
||||||
assert.deepStrictEqual(token, {
|
|
||||||
token: 'YmFyYmF6OmJhcmJheQ==',
|
|
||||||
type: 'Basic',
|
|
||||||
password: 'barbay',
|
|
||||||
username: 'barbaz'
|
|
||||||
})
|
|
||||||
assert.strictEqual(decodeBase64(token.token), 'barbaz:barbay')
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should fetch for the registry given (if defined)', function (done) {
|
|
||||||
var content = [
|
|
||||||
'//registry.foobar.eu:_authToken=barbaz',
|
|
||||||
'//registry.blah.foo:_password=' + encodeBase64('barbay'),
|
|
||||||
'//registry.blah.foo:username=barbaz',
|
|
||||||
'//registry.last.thing:_authToken=yep', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
var token = getAuthToken('//registry.blah.foo')
|
|
||||||
assert.deepStrictEqual(token, {
|
|
||||||
token: 'YmFyYmF6OmJhcmJheQ==',
|
|
||||||
type: 'Basic',
|
|
||||||
password: 'barbay',
|
|
||||||
username: 'barbaz'
|
|
||||||
})
|
|
||||||
assert.strictEqual(decodeBase64(token.token), 'barbaz:barbay')
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('recursively finds registries for deep url if option is set', function (done, undef) {
|
|
||||||
var opts = { recursive: true }
|
|
||||||
var content = [
|
|
||||||
'//registry.blah.com/foo:_password=' + encodeBase64('barbay'),
|
|
||||||
'//registry.blah.com/foo:username=barbaz',
|
|
||||||
'//registry.blah.eu:username=barbaz',
|
|
||||||
'//registry.blah.eu:_password=' + encodeBase64('foobaz'), ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getAuthToken = requireUncached('../index')
|
|
||||||
assert(!err, err)
|
|
||||||
var token = getAuthToken('https://registry.blah.com/foo/bar/baz', opts)
|
|
||||||
assert.deepStrictEqual(token, {
|
|
||||||
token: 'YmFyYmF6OmJhcmJheQ==',
|
|
||||||
type: 'Basic',
|
|
||||||
password: 'barbay',
|
|
||||||
username: 'barbaz'
|
|
||||||
})
|
|
||||||
assert.strictEqual(decodeBase64(token.token), 'barbaz:barbay')
|
|
||||||
token = getAuthToken('https://registry.blah.eu/foo/bar/baz', opts)
|
|
||||||
assert.deepStrictEqual(token, {
|
|
||||||
token: 'YmFyYmF6OmZvb2Jheg==',
|
|
||||||
type: 'Basic',
|
|
||||||
password: 'foobaz',
|
|
||||||
username: 'barbaz'
|
|
||||||
})
|
|
||||||
assert.strictEqual(decodeBase64(token.token), 'barbaz:foobaz')
|
|
||||||
assert.strictEqual(getAuthToken('//some.registry', opts), undef)
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
64
node_modules/registry-auth-token/test/registry-url.test.js
generated
vendored
64
node_modules/registry-auth-token/test/registry-url.test.js
generated
vendored
@@ -1,64 +0,0 @@
|
|||||||
var fs = require('fs')
|
|
||||||
var path = require('path')
|
|
||||||
var mocha = require('mocha')
|
|
||||||
var assert = require('assert')
|
|
||||||
var requireUncached = require('require-uncached')
|
|
||||||
|
|
||||||
var npmRcPath = path.join(__dirname, '..', '.npmrc')
|
|
||||||
var afterEach = mocha.afterEach
|
|
||||||
var describe = mocha.describe
|
|
||||||
var it = mocha.it
|
|
||||||
|
|
||||||
describe('registry-url', function () {
|
|
||||||
afterEach(function (done) {
|
|
||||||
fs.unlink(npmRcPath, function () {
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should read global if no local is found', function () {
|
|
||||||
var getRegistryUrl = requireUncached('../registry-url')
|
|
||||||
getRegistryUrl()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return default registry if no url is given for scope', function (done) {
|
|
||||||
fs.writeFile(npmRcPath, 'registry=https://registry.npmjs.org/', function (err) {
|
|
||||||
var getRegistryUrl = requireUncached('../registry-url')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.strictEqual(getRegistryUrl('@somescope'), 'https://registry.npmjs.org/')
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return registry url if url is given for scope ', function (done) {
|
|
||||||
fs.writeFile(npmRcPath, '@somescope:registry=https://some.registry/', function (err) {
|
|
||||||
var getRegistryUrl = requireUncached('../registry-url')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.strictEqual(getRegistryUrl('@somescope'), 'https://some.registry/')
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should append trailing slash if not present', function (done) {
|
|
||||||
fs.writeFile(npmRcPath, '@somescope:registry=https://some.registry', function (err) {
|
|
||||||
var getRegistryUrl = requireUncached('../registry-url')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.strictEqual(getRegistryUrl('@somescope'), 'https://some.registry/')
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should return configured global registry if given', function (done) {
|
|
||||||
var content = [
|
|
||||||
'registry=http://registry.foobar.eu/',
|
|
||||||
'@somescope:registry=https://some.url/', ''
|
|
||||||
].join('\n')
|
|
||||||
|
|
||||||
fs.writeFile(npmRcPath, content, function (err) {
|
|
||||||
var getRegistryUrl = requireUncached('../registry-url')
|
|
||||||
assert(!err, err)
|
|
||||||
assert.strictEqual(getRegistryUrl(), 'http://registry.foobar.eu/')
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
2
node_modules/term-size/license
generated
vendored
2
node_modules/term-size/license
generated
vendored
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|||||||
66
node_modules/term-size/package.json
generated
vendored
66
node_modules/term-size/package.json
generated
vendored
@@ -1,26 +1,54 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "term-size@^2.1.0",
|
||||||
|
"_id": "term-size@2.2.1",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==",
|
||||||
|
"_location": "/term-size",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "term-size@^2.1.0",
|
||||||
"name": "term-size",
|
"name": "term-size",
|
||||||
"version": "2.2.0",
|
"escapedName": "term-size",
|
||||||
"description": "Reliably get the terminal window size (columns & rows)",
|
"rawSpec": "^2.1.0",
|
||||||
"license": "MIT",
|
"saveSpec": null,
|
||||||
"repository": "sindresorhus/term-size",
|
"fetchSpec": "^2.1.0"
|
||||||
"funding": "https://github.com/sponsors/sindresorhus",
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/boxen"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz",
|
||||||
|
"_shasum": "2a6a54840432c2fb6320fea0f415531e90189f54",
|
||||||
|
"_spec": "term-size@^2.1.0",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\boxen",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
"url": "sindresorhus.com"
|
"url": "https://sindresorhus.com"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/sindresorhus/term-size/issues"
|
||||||
|
},
|
||||||
|
"bundleDependencies": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Reliably get the terminal window size (columns & rows)",
|
||||||
|
"devDependencies": {
|
||||||
|
"ava": "^2.4.0",
|
||||||
|
"execa": "^3.4.0",
|
||||||
|
"tsd": "^0.11.0",
|
||||||
|
"xo": "^0.25.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"test": "xo && ava && tsd"
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
"index.d.ts",
|
"index.d.ts",
|
||||||
"vendor"
|
"vendor"
|
||||||
],
|
],
|
||||||
|
"funding": "https://github.com/sponsors/sindresorhus",
|
||||||
|
"homepage": "https://github.com/sindresorhus/term-size#readme",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"terminal",
|
"terminal",
|
||||||
"size",
|
"size",
|
||||||
@@ -34,14 +62,14 @@
|
|||||||
"tty",
|
"tty",
|
||||||
"redirected"
|
"redirected"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"license": "MIT",
|
||||||
"ava": "^2.4.0",
|
"name": "term-size",
|
||||||
"execa": "^3.4.0",
|
"repository": {
|
||||||
"tsd": "^0.11.0",
|
"type": "git",
|
||||||
"xo": "^0.25.3"
|
"url": "git+https://github.com/sindresorhus/term-size.git"
|
||||||
}
|
},
|
||||||
|
"scripts": {
|
||||||
,"_resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz"
|
"test": "xo && ava && tsd"
|
||||||
,"_integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw=="
|
},
|
||||||
,"_from": "term-size@2.2.0"
|
"version": "2.2.1"
|
||||||
}
|
}
|
||||||
2
node_modules/term-size/readme.md
generated
vendored
2
node_modules/term-size/readme.md
generated
vendored
@@ -1,4 +1,4 @@
|
|||||||
# term-size [](https://travis-ci.org/sindresorhus/term-size)
|
# term-size [](https://travis-ci.com/github/sindresorhus/term-size)
|
||||||
|
|
||||||
> Reliably get the terminal window size
|
> Reliably get the terminal window size
|
||||||
|
|
||||||
|
|||||||
BIN
node_modules/term-size/vendor/.DS_Store
generated
vendored
BIN
node_modules/term-size/vendor/.DS_Store
generated
vendored
Binary file not shown.
4
node_modules/update-notifier/index.js
generated
vendored
4
node_modules/update-notifier/index.js
generated
vendored
@@ -63,7 +63,7 @@ class UpdateNotifier {
|
|||||||
chalk().cyan(format(' sudo chown -R $USER:$(id -gn $USER) %s ', xdgBasedir().config));
|
chalk().cyan(format(' sudo chown -R $USER:$(id -gn $USER) %s ', xdgBasedir().config));
|
||||||
|
|
||||||
process.on('exit', () => {
|
process.on('exit', () => {
|
||||||
console.error('\n' + boxen()(message, {align: 'center'}));
|
console.error(boxen()(message, {align: 'center'}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -151,7 +151,7 @@ class UpdateNotifier {
|
|||||||
borderStyle: 'round'
|
borderStyle: 'round'
|
||||||
};
|
};
|
||||||
|
|
||||||
const message = '\n' + boxen()(
|
const message = boxen()(
|
||||||
pupa()(template, {
|
pupa()(template, {
|
||||||
packageName: this.packageName,
|
packageName: this.packageName,
|
||||||
currentVersion: this.update.current,
|
currentVersion: this.update.current,
|
||||||
|
|||||||
92
node_modules/update-notifier/package.json
generated
vendored
92
node_modules/update-notifier/package.json
generated
vendored
@@ -1,38 +1,36 @@
|
|||||||
{
|
{
|
||||||
|
"_from": "update-notifier@^4.1.0",
|
||||||
|
"_id": "update-notifier@4.1.3",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==",
|
||||||
|
"_location": "/update-notifier",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "range",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "update-notifier@^4.1.0",
|
||||||
"name": "update-notifier",
|
"name": "update-notifier",
|
||||||
"version": "4.1.0",
|
"escapedName": "update-notifier",
|
||||||
"description": "Update notifications for your CLI app",
|
"rawSpec": "^4.1.0",
|
||||||
"license": "BSD-2-Clause",
|
"saveSpec": null,
|
||||||
"repository": "yeoman/update-notifier",
|
"fetchSpec": "^4.1.0"
|
||||||
"funding": "https://github.com/yeoman/update-notifier?sponsor=1",
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/nodemon"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz",
|
||||||
|
"_shasum": "be86ee13e8ce48fb50043ff72057b5bd598e1ea3",
|
||||||
|
"_spec": "update-notifier@^4.1.0",
|
||||||
|
"_where": "C:\\Users\\Jonasz\\Desktop\\Menui\\menui_backend\\node_modules\\nodemon",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
"url": "https://sindresorhus.com"
|
"url": "https://sindresorhus.com"
|
||||||
},
|
},
|
||||||
"engines": {
|
"bugs": {
|
||||||
"node": ">=8"
|
"url": "https://github.com/yeoman/update-notifier/issues"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"bundleDependencies": false,
|
||||||
"test": "xo && ava --timeout=20s -s"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js",
|
|
||||||
"check.js"
|
|
||||||
],
|
|
||||||
"keywords": [
|
|
||||||
"npm",
|
|
||||||
"update",
|
|
||||||
"updater",
|
|
||||||
"notify",
|
|
||||||
"notifier",
|
|
||||||
"check",
|
|
||||||
"checker",
|
|
||||||
"cli",
|
|
||||||
"module",
|
|
||||||
"package",
|
|
||||||
"version"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"boxen": "^4.2.0",
|
"boxen": "^4.2.0",
|
||||||
"chalk": "^3.0.0",
|
"chalk": "^3.0.0",
|
||||||
@@ -48,21 +46,51 @@
|
|||||||
"semver-diff": "^3.1.1",
|
"semver-diff": "^3.1.1",
|
||||||
"xdg-basedir": "^4.0.0"
|
"xdg-basedir": "^4.0.0"
|
||||||
},
|
},
|
||||||
|
"deprecated": false,
|
||||||
|
"description": "Update notifications for your CLI app",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ava": "^2.4.0",
|
"ava": "^2.4.0",
|
||||||
"clear-module": "^4.0.0",
|
"clear-module": "^4.0.0",
|
||||||
"fixture-stdout": "^0.2.1",
|
"fixture-stdout": "^0.2.1",
|
||||||
"mock-require": "^3.0.3",
|
"mock-require": "^3.0.3",
|
||||||
"strip-ansi": "^6.0.0",
|
"strip-ansi": "^6.0.0",
|
||||||
"xo": "^0.26.1"
|
"xo": "^0.25.0"
|
||||||
},
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"index.js",
|
||||||
|
"check.js"
|
||||||
|
],
|
||||||
|
"funding": "https://github.com/yeoman/update-notifier?sponsor=1",
|
||||||
|
"homepage": "https://github.com/yeoman/update-notifier#readme",
|
||||||
|
"keywords": [
|
||||||
|
"npm",
|
||||||
|
"update",
|
||||||
|
"updater",
|
||||||
|
"notify",
|
||||||
|
"notifier",
|
||||||
|
"check",
|
||||||
|
"checker",
|
||||||
|
"cli",
|
||||||
|
"module",
|
||||||
|
"package",
|
||||||
|
"version"
|
||||||
|
],
|
||||||
|
"license": "BSD-2-Clause",
|
||||||
|
"name": "update-notifier",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/yeoman/update-notifier.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "xo && ava --timeout=20s -s"
|
||||||
|
},
|
||||||
|
"version": "4.1.3",
|
||||||
"xo": {
|
"xo": {
|
||||||
"rules": {
|
"rules": {
|
||||||
"prefer-object-spread": 0
|
"prefer-object-spread": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
,"_resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz"
|
|
||||||
,"_integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew=="
|
|
||||||
,"_from": "update-notifier@4.1.0"
|
|
||||||
}
|
}
|
||||||
5
node_modules/update-notifier/readme.md
generated
vendored
5
node_modules/update-notifier/readme.md
generated
vendored
@@ -203,11 +203,10 @@ The idea for this module came from the desire to apply the browser update strate
|
|||||||
There are a bunch projects using it:
|
There are a bunch projects using it:
|
||||||
|
|
||||||
- [npm](https://github.com/npm/npm) - Package manager for JavaScript
|
- [npm](https://github.com/npm/npm) - Package manager for JavaScript
|
||||||
- [Yeoman](http://yeoman.io) - Modern workflows for modern webapps
|
- [Yeoman](https://yeoman.io) - Modern workflows for modern webapps
|
||||||
- [AVA](https://ava.li) - Simple concurrent test runner
|
- [AVA](https://ava.li) - Simple concurrent test runner
|
||||||
- [XO](https://github.com/xojs/xo) - JavaScript happiness style linter
|
- [XO](https://github.com/xojs/xo) - JavaScript happiness style linter
|
||||||
- [Pageres](https://github.com/sindresorhus/pageres) - Capture website screenshots
|
- [Node GH](https://github.com/node-gh/gh) - GitHub command line tool
|
||||||
- [Node GH](http://nodegh.io) - GitHub command line tool
|
|
||||||
|
|
||||||
[And 2700+ more…](https://www.npmjs.org/browse/depended/update-notifier)
|
[And 2700+ more…](https://www.npmjs.org/browse/depended/update-notifier)
|
||||||
|
|
||||||
|
|||||||
132
package-lock.json
generated
132
package-lock.json
generated
@@ -2096,9 +2096,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"axios": {
|
"axios": {
|
||||||
"version": "0.20.0",
|
"version": "0.21.1",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.20.0.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
|
||||||
"integrity": "sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA==",
|
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"follow-redirects": "^1.10.0"
|
"follow-redirects": "^1.10.0"
|
||||||
}
|
}
|
||||||
@@ -2326,9 +2326,9 @@
|
|||||||
"integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms="
|
"integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms="
|
||||||
},
|
},
|
||||||
"binary-extensions": {
|
"binary-extensions": {
|
||||||
"version": "2.1.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||||
"integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ=="
|
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA=="
|
||||||
},
|
},
|
||||||
"bl": {
|
"bl": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
@@ -2519,9 +2519,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"get-stream": {
|
"get-stream": {
|
||||||
"version": "5.1.0",
|
"version": "5.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
|
||||||
"integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==",
|
"integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"pump": "^3.0.0"
|
"pump": "^3.0.0"
|
||||||
}
|
}
|
||||||
@@ -2585,9 +2585,9 @@
|
|||||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
|
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
|
||||||
},
|
},
|
||||||
"supports-color": {
|
"supports-color": {
|
||||||
"version": "7.1.0",
|
"version": "7.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||||
"integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
|
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"has-flag": "^4.0.0"
|
"has-flag": "^4.0.0"
|
||||||
}
|
}
|
||||||
@@ -2601,18 +2601,26 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"chokidar": {
|
"chokidar": {
|
||||||
"version": "3.4.0",
|
"version": "3.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz",
|
||||||
"integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==",
|
"integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"anymatch": "~3.1.1",
|
"anymatch": "~3.1.1",
|
||||||
"braces": "~3.0.2",
|
"braces": "~3.0.2",
|
||||||
"fsevents": "~2.1.2",
|
"fsevents": "~2.3.1",
|
||||||
"glob-parent": "~5.1.0",
|
"glob-parent": "~5.1.0",
|
||||||
"is-binary-path": "~2.1.0",
|
"is-binary-path": "~2.1.0",
|
||||||
"is-glob": "~4.0.1",
|
"is-glob": "~4.0.1",
|
||||||
"normalize-path": "~3.0.0",
|
"normalize-path": "~3.0.0",
|
||||||
"readdirp": "~3.4.0"
|
"readdirp": "~3.5.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"fsevents": {
|
||||||
|
"version": "2.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
||||||
|
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ci-info": {
|
"ci-info": {
|
||||||
@@ -2644,9 +2652,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cli-boxes": {
|
"cli-boxes": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz",
|
||||||
"integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w=="
|
"integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw=="
|
||||||
},
|
},
|
||||||
"cliui": {
|
"cliui": {
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
@@ -2856,6 +2864,11 @@
|
|||||||
"which": "^1.2.9"
|
"which": "^1.2.9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"crypto": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig=="
|
||||||
|
},
|
||||||
"crypto-random-string": {
|
"crypto-random-string": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
|
||||||
@@ -3102,9 +3115,9 @@
|
|||||||
"integrity": "sha512-ZjI4zqTaxveH2/tTlzS1wFp+7ncxNZaIEWYg3lzZRHkKf5zPT/MnEG6WL0BhHMJUabkh8GeU5NL5j+rEUCb7Ug=="
|
"integrity": "sha512-ZjI4zqTaxveH2/tTlzS1wFp+7ncxNZaIEWYg3lzZRHkKf5zPT/MnEG6WL0BhHMJUabkh8GeU5NL5j+rEUCb7Ug=="
|
||||||
},
|
},
|
||||||
"dot-prop": {
|
"dot-prop": {
|
||||||
"version": "5.2.0",
|
"version": "5.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
|
||||||
"integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==",
|
"integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"is-obj": "^2.0.0"
|
"is-obj": "^2.0.0"
|
||||||
}
|
}
|
||||||
@@ -3542,9 +3555,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"follow-redirects": {
|
"follow-redirects": {
|
||||||
"version": "1.13.0",
|
"version": "1.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz",
|
||||||
"integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA=="
|
"integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA=="
|
||||||
},
|
},
|
||||||
"for-in": {
|
"for-in": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@@ -3606,6 +3619,7 @@
|
|||||||
"version": "2.1.3",
|
"version": "2.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
|
||||||
"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
|
"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
|
||||||
|
"dev": true,
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"function-bind": {
|
"function-bind": {
|
||||||
@@ -3683,11 +3697,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"global-dirs": {
|
"global-dirs": {
|
||||||
"version": "2.0.1",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz",
|
||||||
"integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==",
|
"integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ini": "^1.3.5"
|
"ini": "1.3.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
@@ -3990,9 +4004,9 @@
|
|||||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.7",
|
||||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz",
|
||||||
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
|
"integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ=="
|
||||||
},
|
},
|
||||||
"into-stream": {
|
"into-stream": {
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
@@ -5922,9 +5936,9 @@
|
|||||||
"integrity": "sha512-BVZBDi+aJV4O38rxsUh164Dk1NCqgh6Cm0rQSb9SK/DHGll/DrCMnycVDD7msJgZCnmVa8ASo8EZzR7jsgTukQ=="
|
"integrity": "sha512-BVZBDi+aJV4O38rxsUh164Dk1NCqgh6Cm0rQSb9SK/DHGll/DrCMnycVDD7msJgZCnmVa8ASo8EZzR7jsgTukQ=="
|
||||||
},
|
},
|
||||||
"nodemon": {
|
"nodemon": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.7.tgz",
|
||||||
"integrity": "sha512-Ltced+hIfTmaS28Zjv1BM552oQ3dbwPqI4+zI0SLgq+wpJhSyqgYude/aZa/3i31VCQWMfXJVxvu86abcam3uQ==",
|
"integrity": "sha512-XHzK69Awgnec9UzHr1kc8EomQh4sjTQ8oRf8TsGrSmHDx9/UmiGG9E/mM3BuTfNeFwdNBvrqQq/RHL0xIeyFOA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"chokidar": "^3.2.2",
|
"chokidar": "^3.2.2",
|
||||||
"debug": "^3.2.6",
|
"debug": "^3.2.6",
|
||||||
@@ -5934,22 +5948,22 @@
|
|||||||
"semver": "^5.7.1",
|
"semver": "^5.7.1",
|
||||||
"supports-color": "^5.5.0",
|
"supports-color": "^5.5.0",
|
||||||
"touch": "^3.1.0",
|
"touch": "^3.1.0",
|
||||||
"undefsafe": "^2.0.2",
|
"undefsafe": "^2.0.3",
|
||||||
"update-notifier": "^4.0.0"
|
"update-notifier": "^4.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "3.2.6",
|
"version": "3.2.7",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
|
||||||
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
|
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "^2.1.1"
|
"ms": "^2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -6357,9 +6371,9 @@
|
|||||||
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
|
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
|
||||||
},
|
},
|
||||||
"pupa": {
|
"pupa": {
|
||||||
"version": "2.0.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz",
|
||||||
"integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==",
|
"integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"escape-goat": "^2.0.0"
|
"escape-goat": "^2.0.0"
|
||||||
}
|
}
|
||||||
@@ -6453,9 +6467,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"readdirp": {
|
"readdirp": {
|
||||||
"version": "3.4.0",
|
"version": "3.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
|
||||||
"integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==",
|
"integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"picomatch": "^2.2.1"
|
"picomatch": "^2.2.1"
|
||||||
}
|
}
|
||||||
@@ -6525,9 +6539,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"registry-auth-token": {
|
"registry-auth-token": {
|
||||||
"version": "4.1.1",
|
"version": "4.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz",
|
||||||
"integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==",
|
"integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"rc": "^1.2.8"
|
"rc": "^1.2.8"
|
||||||
}
|
}
|
||||||
@@ -7506,9 +7520,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"term-size": {
|
"term-size": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz",
|
||||||
"integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw=="
|
"integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg=="
|
||||||
},
|
},
|
||||||
"terminal-link": {
|
"terminal-link": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
@@ -7800,9 +7814,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"update-notifier": {
|
"update-notifier": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz",
|
||||||
"integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==",
|
"integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"boxen": "^4.2.0",
|
"boxen": "^4.2.0",
|
||||||
"chalk": "^3.0.0",
|
"chalk": "^3.0.0",
|
||||||
|
|||||||
@@ -12,11 +12,12 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@azure/storage-blob": "^12.2.0-preview.1",
|
"@azure/storage-blob": "^12.2.0-preview.1",
|
||||||
"aws-sdk": "^2.789.0",
|
"aws-sdk": "^2.789.0",
|
||||||
"axios": "^0.20.0",
|
"axios": "^0.21.1",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
"cookie": "^0.4.1",
|
"cookie": "^0.4.1",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
|
"crypto": "^1.0.1",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"esm": "^3.2.25",
|
"esm": "^3.2.25",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
@@ -29,7 +30,7 @@
|
|||||||
"multer": "^1.4.2",
|
"multer": "^1.4.2",
|
||||||
"multer-s3": "^2.9.0",
|
"multer-s3": "^2.9.0",
|
||||||
"nodemailer": "^6.4.11",
|
"nodemailer": "^6.4.11",
|
||||||
"nodemon": "^2.0.4",
|
"nodemon": "^2.0.7",
|
||||||
"string-sanitizer": "^1.1.1",
|
"string-sanitizer": "^1.1.1",
|
||||||
"validator": "^13.1.1"
|
"validator": "^13.1.1"
|
||||||
},
|
},
|
||||||
|
|||||||
26
routes/routeAdmin.js
Normal file
26
routes/routeAdmin.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
const express = require("express");
|
||||||
|
const { appkey } = require("../config")
|
||||||
|
const { fetchAllAdminData } = require("../services/databaseServices.js");
|
||||||
|
const {
|
||||||
|
newError,
|
||||||
|
handleError,
|
||||||
|
encryptRSA
|
||||||
|
} = require("../services/services.js");
|
||||||
|
|
||||||
|
var router = express.Router();
|
||||||
|
|
||||||
|
router.post("/getall", async (req, res) => {
|
||||||
|
try {
|
||||||
|
if(req.body.key === appkey){
|
||||||
|
const results = await fetchAllAdminData();
|
||||||
|
const encrypted = encryptRSA(results)
|
||||||
|
res.send(encrypted)
|
||||||
|
} else {
|
||||||
|
throw newError("Brak dostępu", 403)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
handleError(error, res)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
module.exports = router;
|
||||||
@@ -2,6 +2,7 @@ const Restaurant = require("../models/restaurant.js");
|
|||||||
const Dish = require("../models/dish.js");
|
const Dish = require("../models/dish.js");
|
||||||
const User = require("../models/users.js");
|
const User = require("../models/users.js");
|
||||||
const Payments = require("../models/payments.js");
|
const Payments = require("../models/payments.js");
|
||||||
|
const Report = require("../models/reports.js")
|
||||||
const { deleteImage } = require("./oceanServices.js");
|
const { deleteImage } = require("./oceanServices.js");
|
||||||
const { newError } = require("./services.js");
|
const { newError } = require("./services.js");
|
||||||
const mongoose = require("mongoose");
|
const mongoose = require("mongoose");
|
||||||
@@ -398,6 +399,18 @@ async function setRestaurantVisibility(restaurantId, visible) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function fetchAllAdminData(){
|
||||||
|
const restaurants = await Restaurant.find({}, "_id name city adress subscriptionActive subscriptionDue phone dishes");
|
||||||
|
const reports = await Report.find({});
|
||||||
|
const users = await User.find({}, "_id email firstname lastname login billing isRestaurant restaurants trialUsed photos");
|
||||||
|
const result = {
|
||||||
|
restaurants: restaurants,
|
||||||
|
reports: reports,
|
||||||
|
users: users
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
exports.changeUserPass = changeUserPass;
|
exports.changeUserPass = changeUserPass;
|
||||||
exports.removeDish = removeDish;
|
exports.removeDish = removeDish;
|
||||||
exports.removeRestaurant = removeRestaurant;
|
exports.removeRestaurant = removeRestaurant;
|
||||||
@@ -416,3 +429,4 @@ exports.fetchUser = fetchUser;
|
|||||||
exports.initializePayment = initializePayment;
|
exports.initializePayment = initializePayment;
|
||||||
exports.setRestaurantVisibility = setRestaurantVisibility;
|
exports.setRestaurantVisibility = setRestaurantVisibility;
|
||||||
exports.startTrial = startTrial;
|
exports.startTrial = startTrial;
|
||||||
|
exports.fetchAllAdminData = fetchAllAdminData;
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ const sanitizer = require("string-sanitizer");
|
|||||||
const { renameBlob } = require("./oceanServices.js");
|
const { renameBlob } = require("./oceanServices.js");
|
||||||
const jwt = require("jsonwebtoken");
|
const jwt = require("jsonwebtoken");
|
||||||
const bcrypt = require("bcryptjs");
|
const bcrypt = require("bcryptjs");
|
||||||
const { jwtSecret } = require("../config/index.js");
|
const crypto = require("crypto")
|
||||||
|
const { jwtSecret, publicKey } = require("../config/index.js");
|
||||||
|
|
||||||
function newError(message, status) {
|
function newError(message, status) {
|
||||||
const error = {
|
const error = {
|
||||||
@@ -25,6 +26,17 @@ function handleError(error, responseObject) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function encryptRSA(data) {
|
||||||
|
const encrypted = crypto.publicEncrypt({
|
||||||
|
key: publicKey,
|
||||||
|
padding: crypto.constants.RSA_PKCS1_OAEP_PADDING,
|
||||||
|
oaepHash: "sha256"
|
||||||
|
},
|
||||||
|
Buffer.from(JSON.stringify(data))
|
||||||
|
)
|
||||||
|
return encrypted;
|
||||||
|
}
|
||||||
|
|
||||||
async function validateRestaurant(id) {
|
async function validateRestaurant(id) {
|
||||||
if (!mongoose.Types.ObjectId.isValid(id))
|
if (!mongoose.Types.ObjectId.isValid(id))
|
||||||
throw newError("Nieprawidłowy ID", 204);
|
throw newError("Nieprawidłowy ID", 204);
|
||||||
@@ -193,3 +205,4 @@ exports.hashPass = hashPass;
|
|||||||
exports.saveImage = saveImage;
|
exports.saveImage = saveImage;
|
||||||
exports.generateRefreshToken = generateRefreshToken;
|
exports.generateRefreshToken = generateRefreshToken;
|
||||||
exports.validateRefreshToken = validateRefreshToken;
|
exports.validateRefreshToken = validateRefreshToken;
|
||||||
|
exports.encryptRSA = encryptRSA
|
||||||
|
|||||||
Reference in New Issue
Block a user