Spaces:
Build error
Build error
Commit
·
5e4589b
1
Parent(s):
3bcbe5f
Fix config
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitignore +8 -1
- README.md +14 -0
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/browser_field/package.json +0 -5
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/cup.coffee +0 -1
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_main/index.js +0 -1
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_main/package.json +0 -3
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_slash_main/index.js +0 -1
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_slash_main/package.json +0 -3
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/false_main/index.js +0 -0
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/false_main/package.json +0 -4
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/foo.js +0 -1
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/incorrect_main/index.js +0 -2
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/incorrect_main/package.json +0 -3
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/invalid_main/package.json +0 -7
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/mug.coffee +0 -0
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/mug.js +0 -0
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/lerna.json +0 -6
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/package.json +0 -20
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +0 -35
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +0 -14
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +0 -14
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +0 -26
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +0 -15
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +0 -12
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/quux/foo/index.js +0 -1
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/same_names/foo.js +0 -1
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/same_names/foo/index.js +0 -1
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/package/bar.js +0 -1
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/package/package.json +0 -3
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/without_basedir/main.js +0 -5
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver_sync.js +0 -730
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/shadowed_core.js +0 -54
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/subdirs.js +0 -13
- ThinFilm_Analyzer/frontend/node_modules/resolve/test/symlinks.js +0 -176
- ThinFilm_Analyzer/frontend/node_modules/right-now/LICENSE.md +0 -18
- ThinFilm_Analyzer/frontend/node_modules/right-now/README.md +0 -28
- ThinFilm_Analyzer/frontend/node_modules/right-now/browser.js +0 -7
- ThinFilm_Analyzer/frontend/node_modules/right-now/index.js +0 -4
- ThinFilm_Analyzer/frontend/node_modules/right-now/package.json +0 -28
- ThinFilm_Analyzer/frontend/node_modules/rollup/LICENSE.md +0 -679
- ThinFilm_Analyzer/frontend/node_modules/rollup/README.md +0 -134
- ThinFilm_Analyzer/frontend/node_modules/rollup/dist/bin/rollup +0 -1912
- ThinFilm_Analyzer/frontend/node_modules/rollup/dist/es/getLogFilter.js +0 -64
- ThinFilm_Analyzer/frontend/node_modules/rollup/dist/es/package.json +0 -1
.gitignore
CHANGED
|
@@ -5,12 +5,19 @@
|
|
| 5 |
!ThinFilm_Analyzer/
|
| 6 |
!ThinFilm_Analyzer/**
|
| 7 |
!Dockerfile
|
|
|
|
| 8 |
!.gitignore
|
| 9 |
!start_production.bat
|
| 10 |
!start_app.bat
|
| 11 |
!upload_to_hf.py
|
| 12 |
|
| 13 |
-
# Force ignore sub-project folders
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
LPS_Streamlit_App/
|
| 15 |
LPS_Streamlit_App_GDrive/
|
| 16 |
Literature_Map_App/
|
|
|
|
| 5 |
!ThinFilm_Analyzer/
|
| 6 |
!ThinFilm_Analyzer/**
|
| 7 |
!Dockerfile
|
| 8 |
+
!README.md
|
| 9 |
!.gitignore
|
| 10 |
!start_production.bat
|
| 11 |
!start_app.bat
|
| 12 |
!upload_to_hf.py
|
| 13 |
|
| 14 |
+
# Force ignore sub-project folders
|
| 15 |
+
LPS_Streamlit_App/
|
| 16 |
+
# ... (others)
|
| 17 |
+
|
| 18 |
+
# Fix: Force ignore node_modules even if whitelisted above
|
| 19 |
+
ThinFilm_Analyzer/frontend/node_modules/
|
| 20 |
+
ThinFilm_Analyzer/backend/app/data_cache/
|
| 21 |
LPS_Streamlit_App/
|
| 22 |
LPS_Streamlit_App_GDrive/
|
| 23 |
Literature_Map_App/
|
README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: CharacLab
|
| 3 |
+
emoji: 🧪
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: cyan
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# CharacLab - ThinFilm Analyzer
|
| 11 |
+
|
| 12 |
+
An advanced analysis tool for thin film characterization data (XRD, XRR, RHEED, AFM, MEB).
|
| 13 |
+
Powered by React (Frontend) and FastAPI (Backend).
|
| 14 |
+
Data is securely fetched from a private Hugging Face Dataset.
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/browser_field/package.json
DELETED
|
@@ -1,5 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"name": "browser_field",
|
| 3 |
-
"main": "a",
|
| 4 |
-
"browser": "b"
|
| 5 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/cup.coffee
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_main/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
module.exports = 1;
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_main/package.json
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"main": "."
|
| 3 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_slash_main/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
module.exports = 1;
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/dot_slash_main/package.json
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"main": "./"
|
| 3 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/false_main/index.js
DELETED
|
File without changes
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/false_main/package.json
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"name": "false_main",
|
| 3 |
-
"main": false
|
| 4 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/foo.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
module.exports = 1;
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/incorrect_main/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
| 1 |
-
// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate
|
| 2 |
-
module.exports = 1;
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/incorrect_main/package.json
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"main": "wrong.js"
|
| 3 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/invalid_main/package.json
DELETED
|
@@ -1,7 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"name": "invalid_main",
|
| 3 |
-
"main": [
|
| 4 |
-
"why is this a thing",
|
| 5 |
-
"srsly omg wtf"
|
| 6 |
-
]
|
| 7 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/mug.coffee
DELETED
|
File without changes
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/mug.js
DELETED
|
File without changes
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/lerna.json
DELETED
|
@@ -1,6 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"packages": [
|
| 3 |
-
"packages/*"
|
| 4 |
-
],
|
| 5 |
-
"version": "0.0.0"
|
| 6 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/package.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"name": "ljharb-monorepo-symlink-test",
|
| 3 |
-
"private": true,
|
| 4 |
-
"version": "0.0.0",
|
| 5 |
-
"description": "",
|
| 6 |
-
"main": "index.js",
|
| 7 |
-
"scripts": {
|
| 8 |
-
"postinstall": "lerna bootstrap",
|
| 9 |
-
"test": "node packages/package-a"
|
| 10 |
-
},
|
| 11 |
-
"author": "",
|
| 12 |
-
"license": "MIT",
|
| 13 |
-
"dependencies": {
|
| 14 |
-
"jquery": "^3.3.1",
|
| 15 |
-
"resolve": "../../../"
|
| 16 |
-
},
|
| 17 |
-
"devDependencies": {
|
| 18 |
-
"lerna": "^3.4.3"
|
| 19 |
-
}
|
| 20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
| 1 |
-
'use strict';
|
| 2 |
-
|
| 3 |
-
var assert = require('assert');
|
| 4 |
-
var path = require('path');
|
| 5 |
-
var resolve = require('resolve');
|
| 6 |
-
|
| 7 |
-
var basedir = __dirname + '/node_modules/@my-scope/package-b';
|
| 8 |
-
|
| 9 |
-
var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js');
|
| 10 |
-
|
| 11 |
-
/*
|
| 12 |
-
* preserveSymlinks === false
|
| 13 |
-
* will search NPM package from
|
| 14 |
-
* - packages/package-b/node_modules
|
| 15 |
-
* - packages/node_modules
|
| 16 |
-
* - node_modules
|
| 17 |
-
*/
|
| 18 |
-
assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected);
|
| 19 |
-
assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected);
|
| 20 |
-
|
| 21 |
-
/*
|
| 22 |
-
* preserveSymlinks === true
|
| 23 |
-
* will search NPM package from
|
| 24 |
-
* - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules
|
| 25 |
-
* - packages/package-a/node_modules/@my-scope/packages/node_modules
|
| 26 |
-
* - packages/package-a/node_modules/@my-scope/node_modules
|
| 27 |
-
* - packages/package-a/node_modules/node_modules
|
| 28 |
-
* - packages/package-a/node_modules
|
| 29 |
-
* - packages/node_modules
|
| 30 |
-
* - node_modules
|
| 31 |
-
*/
|
| 32 |
-
assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected);
|
| 33 |
-
assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected);
|
| 34 |
-
|
| 35 |
-
console.log(' * all monorepo paths successfully resolved through symlinks');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"name": "@my-scope/package-a",
|
| 3 |
-
"version": "0.0.0",
|
| 4 |
-
"private": true,
|
| 5 |
-
"description": "",
|
| 6 |
-
"license": "MIT",
|
| 7 |
-
"main": "index.js",
|
| 8 |
-
"scripts": {
|
| 9 |
-
"test": "echo \"Error: run tests from root\" && exit 1"
|
| 10 |
-
},
|
| 11 |
-
"dependencies": {
|
| 12 |
-
"@my-scope/package-b": "^0.0.0"
|
| 13 |
-
}
|
| 14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js
DELETED
|
File without changes
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"name": "@my-scope/package-b",
|
| 3 |
-
"private": true,
|
| 4 |
-
"version": "0.0.0",
|
| 5 |
-
"description": "",
|
| 6 |
-
"license": "MIT",
|
| 7 |
-
"main": "index.js",
|
| 8 |
-
"scripts": {
|
| 9 |
-
"test": "echo \"Error: run tests from root\" && exit 1"
|
| 10 |
-
},
|
| 11 |
-
"dependencies": {
|
| 12 |
-
"@my-scope/package-a": "^0.0.0"
|
| 13 |
-
}
|
| 14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
var a = require.resolve('buffer/').replace(process.cwd(), '$CWD');
|
| 2 |
-
var b;
|
| 3 |
-
var c;
|
| 4 |
-
|
| 5 |
-
var test = function test() {
|
| 6 |
-
console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
|
| 7 |
-
console.log(b, ': preserveSymlinks true');
|
| 8 |
-
console.log(c, ': preserveSymlinks false');
|
| 9 |
-
|
| 10 |
-
if (a !== b && a !== c) {
|
| 11 |
-
throw 'async: no match';
|
| 12 |
-
}
|
| 13 |
-
console.log('async: success! a matched either b or c\n');
|
| 14 |
-
};
|
| 15 |
-
|
| 16 |
-
require('resolve')('buffer/', { preserveSymlinks: true }, function (err, result) {
|
| 17 |
-
if (err) { throw err; }
|
| 18 |
-
b = result.replace(process.cwd(), '$CWD');
|
| 19 |
-
if (b && c) { test(); }
|
| 20 |
-
});
|
| 21 |
-
require('resolve')('buffer/', { preserveSymlinks: false }, function (err, result) {
|
| 22 |
-
if (err) { throw err; }
|
| 23 |
-
c = result.replace(process.cwd(), '$CWD');
|
| 24 |
-
if (b && c) { test(); }
|
| 25 |
-
});
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"name": "mylib",
|
| 3 |
-
"version": "0.0.0",
|
| 4 |
-
"description": "",
|
| 5 |
-
"private": true,
|
| 6 |
-
"scripts": {
|
| 7 |
-
"test": "echo \"Error: no test specified\" && exit 1"
|
| 8 |
-
},
|
| 9 |
-
"keywords": [],
|
| 10 |
-
"author": "",
|
| 11 |
-
"license": "ISC",
|
| 12 |
-
"dependencies": {
|
| 13 |
-
"buffer": "*"
|
| 14 |
-
}
|
| 15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
| 1 |
-
var a = require.resolve('buffer/').replace(process.cwd(), '$CWD');
|
| 2 |
-
var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD');
|
| 3 |
-
var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD');
|
| 4 |
-
|
| 5 |
-
console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false'));
|
| 6 |
-
console.log(b, ': preserveSymlinks true');
|
| 7 |
-
console.log(c, ': preserveSymlinks false');
|
| 8 |
-
|
| 9 |
-
if (a !== b && a !== c) {
|
| 10 |
-
throw 'sync: no match';
|
| 11 |
-
}
|
| 12 |
-
console.log('sync: success! a matched either b or c\n');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/other_path/lib/other-lib.js
DELETED
|
File without changes
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/other_path/root.js
DELETED
|
File without changes
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/quux/foo/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
module.exports = 1;
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/same_names/foo.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
module.exports = 42;
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/same_names/foo/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
module.exports = 1;
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js
DELETED
|
File without changes
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep
DELETED
|
File without changes
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/package/bar.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
module.exports = 'bar';
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/symlinked/package/package.json
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"main": "bar.js"
|
| 3 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver/without_basedir/main.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
| 1 |
-
var resolve = require('../../../');
|
| 2 |
-
|
| 3 |
-
module.exports = function (t, cb) {
|
| 4 |
-
resolve('mymodule', null, cb);
|
| 5 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/resolver_sync.js
DELETED
|
@@ -1,730 +0,0 @@
|
|
| 1 |
-
var path = require('path');
|
| 2 |
-
var fs = require('fs');
|
| 3 |
-
var test = require('tape');
|
| 4 |
-
|
| 5 |
-
var resolve = require('../');
|
| 6 |
-
var sync = require('../sync');
|
| 7 |
-
|
| 8 |
-
var requireResolveSupportsPaths = require.resolve.length > 1
|
| 9 |
-
&& !(/^v12\.[012]\./).test(process.version); // broken in v12.0-12.2, see https://github.com/nodejs/node/issues/27794
|
| 10 |
-
|
| 11 |
-
var requireResolveDefaultPathsBroken = (/^v8\.9\.|^v9\.[01]\.0|^v9\.2\./).test(process.version);
|
| 12 |
-
// broken in node v8.9.x, v9.0, v9.1, v9.2.x. see https://github.com/nodejs/node/pull/17113
|
| 13 |
-
|
| 14 |
-
test('`./sync` entry point', function (t) {
|
| 15 |
-
t.equal(resolve.sync, sync, '`./sync` entry point is the same as `.sync` on `main`');
|
| 16 |
-
t.end();
|
| 17 |
-
});
|
| 18 |
-
|
| 19 |
-
test('foo', function (t) {
|
| 20 |
-
var dir = path.join(__dirname, 'resolver');
|
| 21 |
-
|
| 22 |
-
t.equal(
|
| 23 |
-
resolve.sync('./foo', { basedir: dir }),
|
| 24 |
-
path.join(dir, 'foo.js'),
|
| 25 |
-
'./foo'
|
| 26 |
-
);
|
| 27 |
-
if (requireResolveSupportsPaths) {
|
| 28 |
-
t.equal(
|
| 29 |
-
resolve.sync('./foo', { basedir: dir }),
|
| 30 |
-
require.resolve('./foo', { paths: [dir] }),
|
| 31 |
-
'./foo: resolve.sync === require.resolve'
|
| 32 |
-
);
|
| 33 |
-
}
|
| 34 |
-
|
| 35 |
-
t.equal(
|
| 36 |
-
resolve.sync('./foo.js', { basedir: dir }),
|
| 37 |
-
path.join(dir, 'foo.js'),
|
| 38 |
-
'./foo.js'
|
| 39 |
-
);
|
| 40 |
-
if (requireResolveSupportsPaths) {
|
| 41 |
-
t.equal(
|
| 42 |
-
resolve.sync('./foo.js', { basedir: dir }),
|
| 43 |
-
require.resolve('./foo.js', { paths: [dir] }),
|
| 44 |
-
'./foo.js: resolve.sync === require.resolve'
|
| 45 |
-
);
|
| 46 |
-
}
|
| 47 |
-
|
| 48 |
-
t.equal(
|
| 49 |
-
resolve.sync('./foo.js', { basedir: dir, filename: path.join(dir, 'bar.js') }),
|
| 50 |
-
path.join(dir, 'foo.js')
|
| 51 |
-
);
|
| 52 |
-
|
| 53 |
-
t.throws(function () {
|
| 54 |
-
resolve.sync('foo', { basedir: dir });
|
| 55 |
-
});
|
| 56 |
-
|
| 57 |
-
// Test that filename is reported as the "from" value when passed.
|
| 58 |
-
t.throws(
|
| 59 |
-
function () {
|
| 60 |
-
resolve.sync('foo', { basedir: dir, filename: path.join(dir, 'bar.js') });
|
| 61 |
-
},
|
| 62 |
-
{
|
| 63 |
-
name: 'Error',
|
| 64 |
-
message: "Cannot find module 'foo' from '" + path.join(dir, 'bar.js') + "'"
|
| 65 |
-
}
|
| 66 |
-
);
|
| 67 |
-
|
| 68 |
-
t.end();
|
| 69 |
-
});
|
| 70 |
-
|
| 71 |
-
test('bar', function (t) {
|
| 72 |
-
var dir = path.join(__dirname, 'resolver');
|
| 73 |
-
|
| 74 |
-
var basedir = path.join(dir, 'bar');
|
| 75 |
-
|
| 76 |
-
t.equal(
|
| 77 |
-
resolve.sync('foo', { basedir: basedir }),
|
| 78 |
-
path.join(dir, 'bar/node_modules/foo/index.js'),
|
| 79 |
-
'foo in bar'
|
| 80 |
-
);
|
| 81 |
-
if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) {
|
| 82 |
-
t.equal(
|
| 83 |
-
resolve.sync('foo', { basedir: basedir }),
|
| 84 |
-
require.resolve('foo', { paths: [basedir] }),
|
| 85 |
-
'foo in bar: resolve.sync === require.resolve'
|
| 86 |
-
);
|
| 87 |
-
}
|
| 88 |
-
|
| 89 |
-
t.end();
|
| 90 |
-
});
|
| 91 |
-
|
| 92 |
-
test('baz', function (t) {
|
| 93 |
-
var dir = path.join(__dirname, 'resolver');
|
| 94 |
-
|
| 95 |
-
t.equal(
|
| 96 |
-
resolve.sync('./baz', { basedir: dir }),
|
| 97 |
-
path.join(dir, 'baz/quux.js'),
|
| 98 |
-
'./baz'
|
| 99 |
-
);
|
| 100 |
-
if (requireResolveSupportsPaths) {
|
| 101 |
-
t.equal(
|
| 102 |
-
resolve.sync('./baz', { basedir: dir }),
|
| 103 |
-
require.resolve('./baz', { paths: [dir] }),
|
| 104 |
-
'./baz: resolve.sync === require.resolve'
|
| 105 |
-
);
|
| 106 |
-
}
|
| 107 |
-
|
| 108 |
-
t.end();
|
| 109 |
-
});
|
| 110 |
-
|
| 111 |
-
test('biz', function (t) {
|
| 112 |
-
var dir = path.join(__dirname, 'resolver/biz/node_modules');
|
| 113 |
-
|
| 114 |
-
t.equal(
|
| 115 |
-
resolve.sync('./grux', { basedir: dir }),
|
| 116 |
-
path.join(dir, 'grux/index.js')
|
| 117 |
-
);
|
| 118 |
-
if (requireResolveSupportsPaths) {
|
| 119 |
-
t.equal(
|
| 120 |
-
resolve.sync('./grux', { basedir: dir }),
|
| 121 |
-
require.resolve('./grux', { paths: [dir] }),
|
| 122 |
-
'./grux: resolve.sync === require.resolve'
|
| 123 |
-
);
|
| 124 |
-
}
|
| 125 |
-
|
| 126 |
-
var tivDir = path.join(dir, 'grux');
|
| 127 |
-
t.equal(
|
| 128 |
-
resolve.sync('tiv', { basedir: tivDir }),
|
| 129 |
-
path.join(dir, 'tiv/index.js')
|
| 130 |
-
);
|
| 131 |
-
if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) {
|
| 132 |
-
t.equal(
|
| 133 |
-
resolve.sync('tiv', { basedir: tivDir }),
|
| 134 |
-
require.resolve('tiv', { paths: [tivDir] }),
|
| 135 |
-
'tiv: resolve.sync === require.resolve'
|
| 136 |
-
);
|
| 137 |
-
}
|
| 138 |
-
|
| 139 |
-
var gruxDir = path.join(dir, 'tiv');
|
| 140 |
-
t.equal(
|
| 141 |
-
resolve.sync('grux', { basedir: gruxDir }),
|
| 142 |
-
path.join(dir, 'grux/index.js')
|
| 143 |
-
);
|
| 144 |
-
if (!requireResolveDefaultPathsBroken && requireResolveSupportsPaths) {
|
| 145 |
-
t.equal(
|
| 146 |
-
resolve.sync('grux', { basedir: gruxDir }),
|
| 147 |
-
require.resolve('grux', { paths: [gruxDir] }),
|
| 148 |
-
'grux: resolve.sync === require.resolve'
|
| 149 |
-
);
|
| 150 |
-
}
|
| 151 |
-
|
| 152 |
-
t.end();
|
| 153 |
-
});
|
| 154 |
-
|
| 155 |
-
test('normalize', function (t) {
|
| 156 |
-
var dir = path.join(__dirname, 'resolver/biz/node_modules/grux');
|
| 157 |
-
|
| 158 |
-
t.equal(
|
| 159 |
-
resolve.sync('../grux', { basedir: dir }),
|
| 160 |
-
path.join(dir, 'index.js')
|
| 161 |
-
);
|
| 162 |
-
if (requireResolveSupportsPaths) {
|
| 163 |
-
t.equal(
|
| 164 |
-
resolve.sync('../grux', { basedir: dir }),
|
| 165 |
-
require.resolve('../grux', { paths: [dir] }),
|
| 166 |
-
'../grux: resolve.sync === require.resolve'
|
| 167 |
-
);
|
| 168 |
-
}
|
| 169 |
-
|
| 170 |
-
t.end();
|
| 171 |
-
});
|
| 172 |
-
|
| 173 |
-
test('cup', function (t) {
|
| 174 |
-
var dir = path.join(__dirname, 'resolver');
|
| 175 |
-
|
| 176 |
-
t.equal(
|
| 177 |
-
resolve.sync('./cup', {
|
| 178 |
-
basedir: dir,
|
| 179 |
-
extensions: ['.js', '.coffee']
|
| 180 |
-
}),
|
| 181 |
-
path.join(dir, 'cup.coffee'),
|
| 182 |
-
'./cup -> ./cup.coffee'
|
| 183 |
-
);
|
| 184 |
-
|
| 185 |
-
t.equal(
|
| 186 |
-
resolve.sync('./cup.coffee', { basedir: dir }),
|
| 187 |
-
path.join(dir, 'cup.coffee'),
|
| 188 |
-
'./cup.coffee'
|
| 189 |
-
);
|
| 190 |
-
|
| 191 |
-
t.throws(function () {
|
| 192 |
-
resolve.sync('./cup', {
|
| 193 |
-
basedir: dir,
|
| 194 |
-
extensions: ['.js']
|
| 195 |
-
});
|
| 196 |
-
});
|
| 197 |
-
|
| 198 |
-
if (requireResolveSupportsPaths) {
|
| 199 |
-
t.equal(
|
| 200 |
-
resolve.sync('./cup.coffee', { basedir: dir, extensions: ['.js', '.coffee'] }),
|
| 201 |
-
require.resolve('./cup.coffee', { paths: [dir] }),
|
| 202 |
-
'./cup.coffee: resolve.sync === require.resolve'
|
| 203 |
-
);
|
| 204 |
-
}
|
| 205 |
-
|
| 206 |
-
t.end();
|
| 207 |
-
});
|
| 208 |
-
|
| 209 |
-
test('mug', function (t) {
|
| 210 |
-
var dir = path.join(__dirname, 'resolver');
|
| 211 |
-
|
| 212 |
-
t.equal(
|
| 213 |
-
resolve.sync('./mug', { basedir: dir }),
|
| 214 |
-
path.join(dir, 'mug.js'),
|
| 215 |
-
'./mug -> ./mug.js'
|
| 216 |
-
);
|
| 217 |
-
if (requireResolveSupportsPaths) {
|
| 218 |
-
t.equal(
|
| 219 |
-
resolve.sync('./mug', { basedir: dir }),
|
| 220 |
-
require.resolve('./mug', { paths: [dir] }),
|
| 221 |
-
'./mug: resolve.sync === require.resolve'
|
| 222 |
-
);
|
| 223 |
-
}
|
| 224 |
-
|
| 225 |
-
t.equal(
|
| 226 |
-
resolve.sync('./mug', {
|
| 227 |
-
basedir: dir,
|
| 228 |
-
extensions: ['.coffee', '.js']
|
| 229 |
-
}),
|
| 230 |
-
path.join(dir, 'mug.coffee'),
|
| 231 |
-
'./mug -> ./mug.coffee'
|
| 232 |
-
);
|
| 233 |
-
|
| 234 |
-
t.equal(
|
| 235 |
-
resolve.sync('./mug', {
|
| 236 |
-
basedir: dir,
|
| 237 |
-
extensions: ['.js', '.coffee']
|
| 238 |
-
}),
|
| 239 |
-
path.join(dir, 'mug.js'),
|
| 240 |
-
'./mug -> ./mug.js'
|
| 241 |
-
);
|
| 242 |
-
|
| 243 |
-
t.end();
|
| 244 |
-
});
|
| 245 |
-
|
| 246 |
-
test('other path', function (t) {
|
| 247 |
-
var resolverDir = path.join(__dirname, 'resolver');
|
| 248 |
-
var dir = path.join(resolverDir, 'bar');
|
| 249 |
-
var otherDir = path.join(resolverDir, 'other_path');
|
| 250 |
-
|
| 251 |
-
t.equal(
|
| 252 |
-
resolve.sync('root', {
|
| 253 |
-
basedir: dir,
|
| 254 |
-
paths: [otherDir]
|
| 255 |
-
}),
|
| 256 |
-
path.join(resolverDir, 'other_path/root.js')
|
| 257 |
-
);
|
| 258 |
-
|
| 259 |
-
t.equal(
|
| 260 |
-
resolve.sync('lib/other-lib', {
|
| 261 |
-
basedir: dir,
|
| 262 |
-
paths: [otherDir]
|
| 263 |
-
}),
|
| 264 |
-
path.join(resolverDir, 'other_path/lib/other-lib.js')
|
| 265 |
-
);
|
| 266 |
-
|
| 267 |
-
t.throws(function () {
|
| 268 |
-
resolve.sync('root', { basedir: dir });
|
| 269 |
-
});
|
| 270 |
-
|
| 271 |
-
t.throws(function () {
|
| 272 |
-
resolve.sync('zzz', {
|
| 273 |
-
basedir: dir,
|
| 274 |
-
paths: [otherDir]
|
| 275 |
-
});
|
| 276 |
-
});
|
| 277 |
-
|
| 278 |
-
t.end();
|
| 279 |
-
});
|
| 280 |
-
|
| 281 |
-
test('path iterator', function (t) {
|
| 282 |
-
var resolverDir = path.join(__dirname, 'resolver');
|
| 283 |
-
|
| 284 |
-
var exactIterator = function (x, start, getPackageCandidates, opts) {
|
| 285 |
-
return [path.join(resolverDir, x)];
|
| 286 |
-
};
|
| 287 |
-
|
| 288 |
-
t.equal(
|
| 289 |
-
resolve.sync('baz', { packageIterator: exactIterator }),
|
| 290 |
-
path.join(resolverDir, 'baz/quux.js')
|
| 291 |
-
);
|
| 292 |
-
|
| 293 |
-
t.end();
|
| 294 |
-
});
|
| 295 |
-
|
| 296 |
-
test('incorrect main', function (t) {
|
| 297 |
-
var resolverDir = path.join(__dirname, 'resolver');
|
| 298 |
-
var dir = path.join(resolverDir, 'incorrect_main');
|
| 299 |
-
|
| 300 |
-
t.equal(
|
| 301 |
-
resolve.sync('./incorrect_main', { basedir: resolverDir }),
|
| 302 |
-
path.join(dir, 'index.js')
|
| 303 |
-
);
|
| 304 |
-
if (requireResolveSupportsPaths) {
|
| 305 |
-
t.equal(
|
| 306 |
-
resolve.sync('./incorrect_main', { basedir: resolverDir }),
|
| 307 |
-
require.resolve('./incorrect_main', { paths: [resolverDir] }),
|
| 308 |
-
'./incorrect_main: resolve.sync === require.resolve'
|
| 309 |
-
);
|
| 310 |
-
}
|
| 311 |
-
|
| 312 |
-
t.end();
|
| 313 |
-
});
|
| 314 |
-
|
| 315 |
-
test('missing index', function (t) {
|
| 316 |
-
t.plan(requireResolveSupportsPaths ? 2 : 1);
|
| 317 |
-
|
| 318 |
-
var resolverDir = path.join(__dirname, 'resolver');
|
| 319 |
-
try {
|
| 320 |
-
resolve.sync('./missing_index', { basedir: resolverDir });
|
| 321 |
-
t.fail('did not fail');
|
| 322 |
-
} catch (err) {
|
| 323 |
-
t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code');
|
| 324 |
-
}
|
| 325 |
-
if (requireResolveSupportsPaths) {
|
| 326 |
-
try {
|
| 327 |
-
require.resolve('./missing_index', { basedir: resolverDir });
|
| 328 |
-
t.fail('require.resolve did not fail');
|
| 329 |
-
} catch (err) {
|
| 330 |
-
t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code');
|
| 331 |
-
}
|
| 332 |
-
}
|
| 333 |
-
});
|
| 334 |
-
|
| 335 |
-
test('missing main', function (t) {
|
| 336 |
-
var resolverDir = path.join(__dirname, 'resolver');
|
| 337 |
-
|
| 338 |
-
try {
|
| 339 |
-
resolve.sync('./missing_main', { basedir: resolverDir });
|
| 340 |
-
t.fail('require.resolve did not fail');
|
| 341 |
-
} catch (err) {
|
| 342 |
-
t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code');
|
| 343 |
-
}
|
| 344 |
-
if (requireResolveSupportsPaths) {
|
| 345 |
-
try {
|
| 346 |
-
resolve.sync('./missing_main', { basedir: resolverDir });
|
| 347 |
-
t.fail('require.resolve did not fail');
|
| 348 |
-
} catch (err) {
|
| 349 |
-
t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code');
|
| 350 |
-
}
|
| 351 |
-
}
|
| 352 |
-
|
| 353 |
-
t.end();
|
| 354 |
-
});
|
| 355 |
-
|
| 356 |
-
test('null main', function (t) {
|
| 357 |
-
var resolverDir = path.join(__dirname, 'resolver');
|
| 358 |
-
|
| 359 |
-
try {
|
| 360 |
-
resolve.sync('./null_main', { basedir: resolverDir });
|
| 361 |
-
t.fail('require.resolve did not fail');
|
| 362 |
-
} catch (err) {
|
| 363 |
-
t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code');
|
| 364 |
-
}
|
| 365 |
-
if (requireResolveSupportsPaths) {
|
| 366 |
-
try {
|
| 367 |
-
resolve.sync('./null_main', { basedir: resolverDir });
|
| 368 |
-
t.fail('require.resolve did not fail');
|
| 369 |
-
} catch (err) {
|
| 370 |
-
t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error has correct error code');
|
| 371 |
-
}
|
| 372 |
-
}
|
| 373 |
-
|
| 374 |
-
t.end();
|
| 375 |
-
});
|
| 376 |
-
|
| 377 |
-
test('main: false', function (t) {
|
| 378 |
-
var basedir = path.join(__dirname, 'resolver');
|
| 379 |
-
var dir = path.join(basedir, 'false_main');
|
| 380 |
-
t.equal(
|
| 381 |
-
resolve.sync('./false_main', { basedir: basedir }),
|
| 382 |
-
path.join(dir, 'index.js'),
|
| 383 |
-
'`"main": false`: resolves to `index.js`'
|
| 384 |
-
);
|
| 385 |
-
if (requireResolveSupportsPaths) {
|
| 386 |
-
t.equal(
|
| 387 |
-
resolve.sync('./false_main', { basedir: basedir }),
|
| 388 |
-
require.resolve('./false_main', { paths: [basedir] }),
|
| 389 |
-
'`"main": false`: resolve.sync === require.resolve'
|
| 390 |
-
);
|
| 391 |
-
}
|
| 392 |
-
|
| 393 |
-
t.end();
|
| 394 |
-
});
|
| 395 |
-
|
| 396 |
-
var stubStatSync = function stubStatSync(fn) {
|
| 397 |
-
var statSync = fs.statSync;
|
| 398 |
-
try {
|
| 399 |
-
fs.statSync = function () {
|
| 400 |
-
throw new EvalError('Unknown Error');
|
| 401 |
-
};
|
| 402 |
-
return fn();
|
| 403 |
-
} finally {
|
| 404 |
-
fs.statSync = statSync;
|
| 405 |
-
}
|
| 406 |
-
};
|
| 407 |
-
|
| 408 |
-
test('#79 - re-throw non ENOENT errors from stat', function (t) {
|
| 409 |
-
var dir = path.join(__dirname, 'resolver');
|
| 410 |
-
|
| 411 |
-
stubStatSync(function () {
|
| 412 |
-
t.throws(function () {
|
| 413 |
-
resolve.sync('foo', { basedir: dir });
|
| 414 |
-
}, /Unknown Error/);
|
| 415 |
-
});
|
| 416 |
-
|
| 417 |
-
t.end();
|
| 418 |
-
});
|
| 419 |
-
|
| 420 |
-
test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) {
|
| 421 |
-
var dir = path.join(__dirname, 'resolver');
|
| 422 |
-
var basedir = path.join(dir, 'same_names');
|
| 423 |
-
|
| 424 |
-
t.equal(
|
| 425 |
-
resolve.sync('./foo', { basedir: basedir }),
|
| 426 |
-
path.join(dir, 'same_names/foo.js')
|
| 427 |
-
);
|
| 428 |
-
if (requireResolveSupportsPaths) {
|
| 429 |
-
t.equal(
|
| 430 |
-
resolve.sync('./foo', { basedir: basedir }),
|
| 431 |
-
require.resolve('./foo', { paths: [basedir] }),
|
| 432 |
-
'./foo: resolve.sync === require.resolve'
|
| 433 |
-
);
|
| 434 |
-
}
|
| 435 |
-
|
| 436 |
-
t.equal(
|
| 437 |
-
resolve.sync('./foo/', { basedir: basedir }),
|
| 438 |
-
path.join(dir, 'same_names/foo/index.js')
|
| 439 |
-
);
|
| 440 |
-
if (requireResolveSupportsPaths) {
|
| 441 |
-
t.equal(
|
| 442 |
-
resolve.sync('./foo/', { basedir: basedir }),
|
| 443 |
-
require.resolve('./foo/', { paths: [basedir] }),
|
| 444 |
-
'./foo/: resolve.sync === require.resolve'
|
| 445 |
-
);
|
| 446 |
-
}
|
| 447 |
-
|
| 448 |
-
t.end();
|
| 449 |
-
});
|
| 450 |
-
|
| 451 |
-
test('#211 - incorrectly resolves module-paths like "." when from inside a folder with a sibling file of the same name', function (t) {
|
| 452 |
-
var dir = path.join(__dirname, 'resolver');
|
| 453 |
-
var basedir = path.join(dir, 'same_names/foo');
|
| 454 |
-
|
| 455 |
-
t.equal(
|
| 456 |
-
resolve.sync('./', { basedir: basedir }),
|
| 457 |
-
path.join(dir, 'same_names/foo/index.js'),
|
| 458 |
-
'./'
|
| 459 |
-
);
|
| 460 |
-
if (requireResolveSupportsPaths) {
|
| 461 |
-
t.equal(
|
| 462 |
-
resolve.sync('./', { basedir: basedir }),
|
| 463 |
-
require.resolve('./', { paths: [basedir] }),
|
| 464 |
-
'./: resolve.sync === require.resolve'
|
| 465 |
-
);
|
| 466 |
-
}
|
| 467 |
-
|
| 468 |
-
t.equal(
|
| 469 |
-
resolve.sync('.', { basedir: basedir }),
|
| 470 |
-
path.join(dir, 'same_names/foo/index.js'),
|
| 471 |
-
'.'
|
| 472 |
-
);
|
| 473 |
-
if (requireResolveSupportsPaths) {
|
| 474 |
-
t.equal(
|
| 475 |
-
resolve.sync('.', { basedir: basedir }),
|
| 476 |
-
require.resolve('.', { paths: [basedir] }),
|
| 477 |
-
'.: resolve.sync === require.resolve',
|
| 478 |
-
{ todo: true }
|
| 479 |
-
);
|
| 480 |
-
}
|
| 481 |
-
|
| 482 |
-
t.end();
|
| 483 |
-
});
|
| 484 |
-
|
| 485 |
-
test('sync: #121 - treating an existing file as a dir when no basedir', function (t) {
|
| 486 |
-
var testFile = path.basename(__filename);
|
| 487 |
-
|
| 488 |
-
t.test('sanity check', function (st) {
|
| 489 |
-
st.equal(
|
| 490 |
-
resolve.sync('./' + testFile),
|
| 491 |
-
__filename,
|
| 492 |
-
'sanity check'
|
| 493 |
-
);
|
| 494 |
-
st.equal(
|
| 495 |
-
resolve.sync('./' + testFile),
|
| 496 |
-
require.resolve('./' + testFile),
|
| 497 |
-
'sanity check: resolve.sync === require.resolve'
|
| 498 |
-
);
|
| 499 |
-
|
| 500 |
-
st.end();
|
| 501 |
-
});
|
| 502 |
-
|
| 503 |
-
t.test('with a fake directory', function (st) {
|
| 504 |
-
function run() { return resolve.sync('./' + testFile + '/blah'); }
|
| 505 |
-
|
| 506 |
-
st.throws(run, 'throws an error');
|
| 507 |
-
|
| 508 |
-
try {
|
| 509 |
-
run();
|
| 510 |
-
} catch (e) {
|
| 511 |
-
st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve');
|
| 512 |
-
st.equal(
|
| 513 |
-
e.message,
|
| 514 |
-
'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'',
|
| 515 |
-
'can not find nonexistent module'
|
| 516 |
-
);
|
| 517 |
-
}
|
| 518 |
-
|
| 519 |
-
st.end();
|
| 520 |
-
});
|
| 521 |
-
|
| 522 |
-
t.end();
|
| 523 |
-
});
|
| 524 |
-
|
| 525 |
-
test('sync dot main', function (t) {
|
| 526 |
-
var start = new Date();
|
| 527 |
-
|
| 528 |
-
t.equal(
|
| 529 |
-
resolve.sync('./resolver/dot_main'),
|
| 530 |
-
path.join(__dirname, 'resolver/dot_main/index.js'),
|
| 531 |
-
'./resolver/dot_main'
|
| 532 |
-
);
|
| 533 |
-
t.equal(
|
| 534 |
-
resolve.sync('./resolver/dot_main'),
|
| 535 |
-
require.resolve('./resolver/dot_main'),
|
| 536 |
-
'./resolver/dot_main: resolve.sync === require.resolve'
|
| 537 |
-
);
|
| 538 |
-
|
| 539 |
-
t.ok(new Date() - start < 50, 'resolve.sync timedout');
|
| 540 |
-
|
| 541 |
-
t.end();
|
| 542 |
-
});
|
| 543 |
-
|
| 544 |
-
test('sync dot slash main', function (t) {
|
| 545 |
-
var start = new Date();
|
| 546 |
-
|
| 547 |
-
t.equal(
|
| 548 |
-
resolve.sync('./resolver/dot_slash_main'),
|
| 549 |
-
path.join(__dirname, 'resolver/dot_slash_main/index.js')
|
| 550 |
-
);
|
| 551 |
-
t.equal(
|
| 552 |
-
resolve.sync('./resolver/dot_slash_main'),
|
| 553 |
-
require.resolve('./resolver/dot_slash_main'),
|
| 554 |
-
'./resolver/dot_slash_main: resolve.sync === require.resolve'
|
| 555 |
-
);
|
| 556 |
-
|
| 557 |
-
t.ok(new Date() - start < 50, 'resolve.sync timedout');
|
| 558 |
-
|
| 559 |
-
t.end();
|
| 560 |
-
});
|
| 561 |
-
|
| 562 |
-
test('not a directory', function (t) {
|
| 563 |
-
var path = './foo';
|
| 564 |
-
try {
|
| 565 |
-
resolve.sync(path, { basedir: __filename });
|
| 566 |
-
t.fail();
|
| 567 |
-
} catch (err) {
|
| 568 |
-
t.ok(err, 'a non-directory errors');
|
| 569 |
-
t.equal(err && err.message, 'Cannot find module \'' + path + "' from '" + __filename + "'");
|
| 570 |
-
t.equal(err && err.code, 'MODULE_NOT_FOUND');
|
| 571 |
-
}
|
| 572 |
-
t.end();
|
| 573 |
-
});
|
| 574 |
-
|
| 575 |
-
test('non-string "main" field in package.json', function (t) {
|
| 576 |
-
var dir = path.join(__dirname, 'resolver');
|
| 577 |
-
try {
|
| 578 |
-
var result = resolve.sync('./invalid_main', { basedir: dir });
|
| 579 |
-
t.equal(result, undefined, 'result should not exist');
|
| 580 |
-
t.fail('should not get here');
|
| 581 |
-
} catch (err) {
|
| 582 |
-
t.ok(err, 'errors on non-string main');
|
| 583 |
-
t.equal(err.message, 'package “invalid_main” `main` must be a string');
|
| 584 |
-
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
|
| 585 |
-
}
|
| 586 |
-
t.end();
|
| 587 |
-
});
|
| 588 |
-
|
| 589 |
-
test('non-string "main" field in package.json', function (t) {
|
| 590 |
-
var dir = path.join(__dirname, 'resolver');
|
| 591 |
-
try {
|
| 592 |
-
var result = resolve.sync('./invalid_main', { basedir: dir });
|
| 593 |
-
t.equal(result, undefined, 'result should not exist');
|
| 594 |
-
t.fail('should not get here');
|
| 595 |
-
} catch (err) {
|
| 596 |
-
t.ok(err, 'errors on non-string main');
|
| 597 |
-
t.equal(err.message, 'package “invalid_main” `main` must be a string');
|
| 598 |
-
t.equal(err.code, 'INVALID_PACKAGE_MAIN');
|
| 599 |
-
}
|
| 600 |
-
t.end();
|
| 601 |
-
});
|
| 602 |
-
|
| 603 |
-
test('browser field in package.json', function (t) {
|
| 604 |
-
var dir = path.join(__dirname, 'resolver');
|
| 605 |
-
var res = resolve.sync('./browser_field', {
|
| 606 |
-
basedir: dir,
|
| 607 |
-
packageFilter: function packageFilter(pkg) {
|
| 608 |
-
if (pkg.browser) {
|
| 609 |
-
pkg.main = pkg.browser; // eslint-disable-line no-param-reassign
|
| 610 |
-
delete pkg.browser; // eslint-disable-line no-param-reassign
|
| 611 |
-
}
|
| 612 |
-
return pkg;
|
| 613 |
-
}
|
| 614 |
-
});
|
| 615 |
-
t.equal(res, path.join(dir, 'browser_field', 'b.js'));
|
| 616 |
-
t.end();
|
| 617 |
-
});
|
| 618 |
-
|
| 619 |
-
test('absolute paths', function (t) {
|
| 620 |
-
var extensionless = __filename.slice(0, -path.extname(__filename).length);
|
| 621 |
-
|
| 622 |
-
t.equal(
|
| 623 |
-
resolve.sync(__filename),
|
| 624 |
-
__filename,
|
| 625 |
-
'absolute path to this file resolves'
|
| 626 |
-
);
|
| 627 |
-
t.equal(
|
| 628 |
-
resolve.sync(__filename),
|
| 629 |
-
require.resolve(__filename),
|
| 630 |
-
'absolute path to this file: resolve.sync === require.resolve'
|
| 631 |
-
);
|
| 632 |
-
|
| 633 |
-
t.equal(
|
| 634 |
-
resolve.sync(extensionless),
|
| 635 |
-
__filename,
|
| 636 |
-
'extensionless absolute path to this file resolves'
|
| 637 |
-
);
|
| 638 |
-
t.equal(
|
| 639 |
-
resolve.sync(__filename),
|
| 640 |
-
require.resolve(__filename),
|
| 641 |
-
'absolute path to this file: resolve.sync === require.resolve'
|
| 642 |
-
);
|
| 643 |
-
|
| 644 |
-
t.equal(
|
| 645 |
-
resolve.sync(__filename, { basedir: process.cwd() }),
|
| 646 |
-
__filename,
|
| 647 |
-
'absolute path to this file with a basedir resolves'
|
| 648 |
-
);
|
| 649 |
-
if (requireResolveSupportsPaths) {
|
| 650 |
-
t.equal(
|
| 651 |
-
resolve.sync(__filename, { basedir: process.cwd() }),
|
| 652 |
-
require.resolve(__filename, { paths: [process.cwd()] }),
|
| 653 |
-
'absolute path to this file + basedir: resolve.sync === require.resolve'
|
| 654 |
-
);
|
| 655 |
-
}
|
| 656 |
-
|
| 657 |
-
t.equal(
|
| 658 |
-
resolve.sync(extensionless, { basedir: process.cwd() }),
|
| 659 |
-
__filename,
|
| 660 |
-
'extensionless absolute path to this file with a basedir resolves'
|
| 661 |
-
);
|
| 662 |
-
if (requireResolveSupportsPaths) {
|
| 663 |
-
t.equal(
|
| 664 |
-
resolve.sync(extensionless, { basedir: process.cwd() }),
|
| 665 |
-
require.resolve(extensionless, { paths: [process.cwd()] }),
|
| 666 |
-
'extensionless absolute path to this file + basedir: resolve.sync === require.resolve'
|
| 667 |
-
);
|
| 668 |
-
}
|
| 669 |
-
|
| 670 |
-
t.end();
|
| 671 |
-
});
|
| 672 |
-
|
| 673 |
-
var malformedDir = path.join(__dirname, 'resolver/malformed_package_json');
|
| 674 |
-
test('malformed package.json', { skip: !fs.existsSync(malformedDir) }, function (t) {
|
| 675 |
-
t.plan(5 + (requireResolveSupportsPaths ? 1 : 0));
|
| 676 |
-
|
| 677 |
-
var basedir = malformedDir;
|
| 678 |
-
var expected = path.join(basedir, 'index.js');
|
| 679 |
-
|
| 680 |
-
t.equal(
|
| 681 |
-
resolve.sync('./index.js', { basedir: basedir }),
|
| 682 |
-
expected,
|
| 683 |
-
'malformed package.json is silently ignored'
|
| 684 |
-
);
|
| 685 |
-
if (requireResolveSupportsPaths) {
|
| 686 |
-
t.equal(
|
| 687 |
-
resolve.sync('./index.js', { basedir: basedir }),
|
| 688 |
-
require.resolve('./index.js', { paths: [basedir] }),
|
| 689 |
-
'malformed package.json: resolve.sync === require.resolve'
|
| 690 |
-
);
|
| 691 |
-
}
|
| 692 |
-
|
| 693 |
-
var res1 = resolve.sync(
|
| 694 |
-
'./index.js',
|
| 695 |
-
{
|
| 696 |
-
basedir: basedir,
|
| 697 |
-
packageFilter: function (pkg, pkgfile, dir) {
|
| 698 |
-
t.fail('should not reach here');
|
| 699 |
-
}
|
| 700 |
-
}
|
| 701 |
-
);
|
| 702 |
-
|
| 703 |
-
t.equal(
|
| 704 |
-
res1,
|
| 705 |
-
expected,
|
| 706 |
-
'with packageFilter: malformed package.json is silently ignored'
|
| 707 |
-
);
|
| 708 |
-
|
| 709 |
-
var res2 = resolve.sync(
|
| 710 |
-
'./index.js',
|
| 711 |
-
{
|
| 712 |
-
basedir: basedir,
|
| 713 |
-
readPackageSync: function (readFileSync, pkgfile) {
|
| 714 |
-
t.equal(pkgfile, path.join(basedir, 'package.json'), 'readPackageSync: `pkgfile` is package.json path');
|
| 715 |
-
var result = String(readFileSync(pkgfile));
|
| 716 |
-
try {
|
| 717 |
-
return JSON.parse(result);
|
| 718 |
-
} catch (e) {
|
| 719 |
-
t.ok(e instanceof SyntaxError, 'readPackageSync: malformed package.json parses as a syntax error');
|
| 720 |
-
}
|
| 721 |
-
}
|
| 722 |
-
}
|
| 723 |
-
);
|
| 724 |
-
|
| 725 |
-
t.equal(
|
| 726 |
-
res2,
|
| 727 |
-
expected,
|
| 728 |
-
'with readPackageSync: malformed package.json is silently ignored'
|
| 729 |
-
);
|
| 730 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/shadowed_core.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
| 1 |
-
var test = require('tape');
|
| 2 |
-
var resolve = require('../');
|
| 3 |
-
var path = require('path');
|
| 4 |
-
|
| 5 |
-
test('shadowed core modules still return core module', function (t) {
|
| 6 |
-
t.plan(2);
|
| 7 |
-
|
| 8 |
-
resolve('util', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) {
|
| 9 |
-
t.ifError(err);
|
| 10 |
-
t.equal(res, 'util');
|
| 11 |
-
});
|
| 12 |
-
});
|
| 13 |
-
|
| 14 |
-
test('shadowed core modules still return core module [sync]', function (t) {
|
| 15 |
-
t.plan(1);
|
| 16 |
-
|
| 17 |
-
var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core') });
|
| 18 |
-
|
| 19 |
-
t.equal(res, 'util');
|
| 20 |
-
});
|
| 21 |
-
|
| 22 |
-
test('shadowed core modules return shadow when appending `/`', function (t) {
|
| 23 |
-
t.plan(2);
|
| 24 |
-
|
| 25 |
-
resolve('util/', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) {
|
| 26 |
-
t.ifError(err);
|
| 27 |
-
t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
|
| 28 |
-
});
|
| 29 |
-
});
|
| 30 |
-
|
| 31 |
-
test('shadowed core modules return shadow when appending `/` [sync]', function (t) {
|
| 32 |
-
t.plan(1);
|
| 33 |
-
|
| 34 |
-
var res = resolve.sync('util/', { basedir: path.join(__dirname, 'shadowed_core') });
|
| 35 |
-
|
| 36 |
-
t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
|
| 37 |
-
});
|
| 38 |
-
|
| 39 |
-
test('shadowed core modules return shadow with `includeCoreModules: false`', function (t) {
|
| 40 |
-
t.plan(2);
|
| 41 |
-
|
| 42 |
-
resolve('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }, function (err, res) {
|
| 43 |
-
t.ifError(err);
|
| 44 |
-
t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
|
| 45 |
-
});
|
| 46 |
-
});
|
| 47 |
-
|
| 48 |
-
test('shadowed core modules return shadow with `includeCoreModules: false` [sync]', function (t) {
|
| 49 |
-
t.plan(1);
|
| 50 |
-
|
| 51 |
-
var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false });
|
| 52 |
-
|
| 53 |
-
t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js'));
|
| 54 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/shadowed_core/node_modules/util/index.js
DELETED
|
File without changes
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/subdirs.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
| 1 |
-
var test = require('tape');
|
| 2 |
-
var resolve = require('../');
|
| 3 |
-
var path = require('path');
|
| 4 |
-
|
| 5 |
-
test('subdirs', function (t) {
|
| 6 |
-
t.plan(2);
|
| 7 |
-
|
| 8 |
-
var dir = path.join(__dirname, '/subdirs');
|
| 9 |
-
resolve('a/b/c/x.json', { basedir: dir }, function (err, res) {
|
| 10 |
-
t.ifError(err);
|
| 11 |
-
t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json'));
|
| 12 |
-
});
|
| 13 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/resolve/test/symlinks.js
DELETED
|
@@ -1,176 +0,0 @@
|
|
| 1 |
-
var path = require('path');
|
| 2 |
-
var fs = require('fs');
|
| 3 |
-
var test = require('tape');
|
| 4 |
-
var map = require('array.prototype.map');
|
| 5 |
-
var resolve = require('../');
|
| 6 |
-
|
| 7 |
-
var symlinkDir = path.join(__dirname, 'resolver', 'symlinked', 'symlink');
|
| 8 |
-
var packageDir = path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'package');
|
| 9 |
-
var modADir = path.join(__dirname, 'symlinks', 'source', 'node_modules', 'mod-a');
|
| 10 |
-
var symlinkModADir = path.join(__dirname, 'symlinks', 'dest', 'node_modules', 'mod-a');
|
| 11 |
-
try {
|
| 12 |
-
fs.unlinkSync(symlinkDir);
|
| 13 |
-
} catch (err) {}
|
| 14 |
-
try {
|
| 15 |
-
fs.unlinkSync(packageDir);
|
| 16 |
-
} catch (err) {}
|
| 17 |
-
try {
|
| 18 |
-
fs.unlinkSync(modADir);
|
| 19 |
-
} catch (err) {}
|
| 20 |
-
try {
|
| 21 |
-
fs.unlinkSync(symlinkModADir);
|
| 22 |
-
} catch (err) {}
|
| 23 |
-
|
| 24 |
-
try {
|
| 25 |
-
fs.symlinkSync('./_/symlink_target', symlinkDir, 'dir');
|
| 26 |
-
} catch (err) {
|
| 27 |
-
// if fails then it is probably on Windows and lets try to create a junction
|
| 28 |
-
fs.symlinkSync(path.join(__dirname, 'resolver', 'symlinked', '_', 'symlink_target') + '\\', symlinkDir, 'junction');
|
| 29 |
-
}
|
| 30 |
-
try {
|
| 31 |
-
fs.symlinkSync('../../package', packageDir, 'dir');
|
| 32 |
-
} catch (err) {
|
| 33 |
-
// if fails then it is probably on Windows and lets try to create a junction
|
| 34 |
-
fs.symlinkSync(path.join(__dirname, '..', '..', 'package') + '\\', packageDir, 'junction');
|
| 35 |
-
}
|
| 36 |
-
try {
|
| 37 |
-
fs.symlinkSync('../../source/node_modules/mod-a', symlinkModADir, 'dir');
|
| 38 |
-
} catch (err) {
|
| 39 |
-
// if fails then it is probably on Windows and lets try to create a junction
|
| 40 |
-
fs.symlinkSync(path.join(__dirname, '..', '..', 'source', 'node_modules', 'mod-a') + '\\', symlinkModADir, 'junction');
|
| 41 |
-
}
|
| 42 |
-
|
| 43 |
-
test('symlink', function (t) {
|
| 44 |
-
t.plan(2);
|
| 45 |
-
|
| 46 |
-
resolve('foo', { basedir: symlinkDir, preserveSymlinks: false }, function (err, res, pkg) {
|
| 47 |
-
t.error(err);
|
| 48 |
-
t.equal(res, path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js'));
|
| 49 |
-
});
|
| 50 |
-
});
|
| 51 |
-
|
| 52 |
-
test('sync symlink when preserveSymlinks = true', function (t) {
|
| 53 |
-
t.plan(4);
|
| 54 |
-
|
| 55 |
-
resolve('foo', { basedir: symlinkDir }, function (err, res, pkg) {
|
| 56 |
-
t.ok(err, 'there is an error');
|
| 57 |
-
t.notOk(res, 'no result');
|
| 58 |
-
|
| 59 |
-
t.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve');
|
| 60 |
-
t.equal(
|
| 61 |
-
err && err.message,
|
| 62 |
-
'Cannot find module \'foo\' from \'' + symlinkDir + '\'',
|
| 63 |
-
'can not find nonexistent module'
|
| 64 |
-
);
|
| 65 |
-
});
|
| 66 |
-
});
|
| 67 |
-
|
| 68 |
-
test('sync symlink', function (t) {
|
| 69 |
-
var start = new Date();
|
| 70 |
-
t.doesNotThrow(function () {
|
| 71 |
-
t.equal(
|
| 72 |
-
resolve.sync('foo', { basedir: symlinkDir, preserveSymlinks: false }),
|
| 73 |
-
path.join(__dirname, 'resolver', 'symlinked', '_', 'node_modules', 'foo.js')
|
| 74 |
-
);
|
| 75 |
-
});
|
| 76 |
-
t.ok(new Date() - start < 50, 'resolve.sync timedout');
|
| 77 |
-
t.end();
|
| 78 |
-
});
|
| 79 |
-
|
| 80 |
-
test('sync symlink when preserveSymlinks = true', function (t) {
|
| 81 |
-
t.throws(function () {
|
| 82 |
-
resolve.sync('foo', { basedir: symlinkDir });
|
| 83 |
-
}, /Cannot find module 'foo'/);
|
| 84 |
-
t.end();
|
| 85 |
-
});
|
| 86 |
-
|
| 87 |
-
test('sync symlink from node_modules to other dir when preserveSymlinks = false', function (t) {
|
| 88 |
-
var basedir = path.join(__dirname, 'resolver', 'symlinked', '_');
|
| 89 |
-
var fn = resolve.sync('package', { basedir: basedir, preserveSymlinks: false });
|
| 90 |
-
|
| 91 |
-
t.equal(fn, path.resolve(__dirname, 'resolver/symlinked/package/bar.js'));
|
| 92 |
-
t.end();
|
| 93 |
-
});
|
| 94 |
-
|
| 95 |
-
test('async symlink from node_modules to other dir when preserveSymlinks = false', function (t) {
|
| 96 |
-
t.plan(2);
|
| 97 |
-
var basedir = path.join(__dirname, 'resolver', 'symlinked', '_');
|
| 98 |
-
resolve('package', { basedir: basedir, preserveSymlinks: false }, function (err, result) {
|
| 99 |
-
t.notOk(err, 'no error');
|
| 100 |
-
t.equal(result, path.resolve(__dirname, 'resolver/symlinked/package/bar.js'));
|
| 101 |
-
});
|
| 102 |
-
});
|
| 103 |
-
|
| 104 |
-
test('packageFilter', function (t) {
|
| 105 |
-
function relative(x) {
|
| 106 |
-
return path.relative(__dirname, x);
|
| 107 |
-
}
|
| 108 |
-
|
| 109 |
-
function testPackageFilter(preserveSymlinks) {
|
| 110 |
-
return function (st) {
|
| 111 |
-
st.plan('is 1.x' ? 3 : 5); // eslint-disable-line no-constant-condition
|
| 112 |
-
|
| 113 |
-
var destMain = 'symlinks/dest/node_modules/mod-a/index.js';
|
| 114 |
-
var destPkg = 'symlinks/dest/node_modules/mod-a/package.json';
|
| 115 |
-
var sourceMain = 'symlinks/source/node_modules/mod-a/index.js';
|
| 116 |
-
var sourcePkg = 'symlinks/source/node_modules/mod-a/package.json';
|
| 117 |
-
var destDir = path.join(__dirname, 'symlinks', 'dest');
|
| 118 |
-
|
| 119 |
-
/* eslint multiline-comment-style: 0 */
|
| 120 |
-
/* v2.x will restore these tests
|
| 121 |
-
var packageFilterPath = [];
|
| 122 |
-
var actualPath = resolve.sync('mod-a', {
|
| 123 |
-
basedir: destDir,
|
| 124 |
-
preserveSymlinks: preserveSymlinks,
|
| 125 |
-
packageFilter: function (pkg, pkgfile, dir) {
|
| 126 |
-
packageFilterPath.push(pkgfile);
|
| 127 |
-
}
|
| 128 |
-
});
|
| 129 |
-
st.equal(
|
| 130 |
-
relative(actualPath),
|
| 131 |
-
path.normalize(preserveSymlinks ? destMain : sourceMain),
|
| 132 |
-
'sync: actual path is correct'
|
| 133 |
-
);
|
| 134 |
-
st.deepEqual(
|
| 135 |
-
map(packageFilterPath, relative),
|
| 136 |
-
map(preserveSymlinks ? [destPkg, destPkg] : [sourcePkg, sourcePkg], path.normalize),
|
| 137 |
-
'sync: packageFilter pkgfile arg is correct'
|
| 138 |
-
);
|
| 139 |
-
*/
|
| 140 |
-
|
| 141 |
-
var asyncPackageFilterPath = [];
|
| 142 |
-
resolve(
|
| 143 |
-
'mod-a',
|
| 144 |
-
{
|
| 145 |
-
basedir: destDir,
|
| 146 |
-
preserveSymlinks: preserveSymlinks,
|
| 147 |
-
packageFilter: function (pkg, pkgfile) {
|
| 148 |
-
asyncPackageFilterPath.push(pkgfile);
|
| 149 |
-
}
|
| 150 |
-
},
|
| 151 |
-
function (err, actualPath) {
|
| 152 |
-
st.error(err, 'no error');
|
| 153 |
-
st.equal(
|
| 154 |
-
relative(actualPath),
|
| 155 |
-
path.normalize(preserveSymlinks ? destMain : sourceMain),
|
| 156 |
-
'async: actual path is correct'
|
| 157 |
-
);
|
| 158 |
-
st.deepEqual(
|
| 159 |
-
map(asyncPackageFilterPath, relative),
|
| 160 |
-
map(
|
| 161 |
-
preserveSymlinks ? [destPkg, destPkg, destPkg] : [sourcePkg, sourcePkg, sourcePkg],
|
| 162 |
-
path.normalize
|
| 163 |
-
),
|
| 164 |
-
'async: packageFilter pkgfile arg is correct'
|
| 165 |
-
);
|
| 166 |
-
}
|
| 167 |
-
);
|
| 168 |
-
};
|
| 169 |
-
}
|
| 170 |
-
|
| 171 |
-
t.test('preserveSymlinks: false', testPackageFilter(false));
|
| 172 |
-
|
| 173 |
-
t.test('preserveSymlinks: true', testPackageFilter(true));
|
| 174 |
-
|
| 175 |
-
t.end();
|
| 176 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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is released under the MIT license:
|
| 2 |
-
|
| 3 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
| 4 |
-
this software and associated documentation files (the "Software"), to deal in
|
| 5 |
-
the Software without restriction, including without limitation the rights to
|
| 6 |
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
| 7 |
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
| 8 |
-
subject to the following conditions:
|
| 9 |
-
|
| 10 |
-
The above copyright notice and this permission notice shall be included in all
|
| 11 |
-
copies or substantial portions of the Software.
|
| 12 |
-
|
| 13 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 14 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
| 15 |
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
| 16 |
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
| 17 |
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
| 18 |
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/right-now/README.md
DELETED
|
@@ -1,28 +0,0 @@
|
|
| 1 |
-
# right-now [](http://github.com/hughsk/stability-badges) #
|
| 2 |
-
|
| 3 |
-
Get the quickest, most high-resolution timestamp possible in node or the
|
| 4 |
-
browser.
|
| 5 |
-
|
| 6 |
-
Instead of returning the date, `right-now` may use `performance.now`,
|
| 7 |
-
`Date.now`, `+new Date` or `process.hrtime` to get a timestamp suitable for
|
| 8 |
-
measuring intervals of time. Handy for both animation loops and precision
|
| 9 |
-
benchmarking.
|
| 10 |
-
|
| 11 |
-
It's pretty small but saves me writing this boilerplate every time :)
|
| 12 |
-
|
| 13 |
-
## Installation ##
|
| 14 |
-
|
| 15 |
-
``` bash
|
| 16 |
-
npm install right-now
|
| 17 |
-
```
|
| 18 |
-
|
| 19 |
-
## Usage ##
|
| 20 |
-
|
| 21 |
-
### `require('right-now')()` ###
|
| 22 |
-
|
| 23 |
-
Returns a timestamp. In node, this uses `process.hrtime`. In the browser,
|
| 24 |
-
support for the following is checked in this order:
|
| 25 |
-
|
| 26 |
-
* `performance.now()`
|
| 27 |
-
* `Date.now()`
|
| 28 |
-
* `+new Date`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/right-now/browser.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
| 1 |
-
module.exports =
|
| 2 |
-
global.performance &&
|
| 3 |
-
global.performance.now ? function now() {
|
| 4 |
-
return performance.now()
|
| 5 |
-
} : Date.now || function now() {
|
| 6 |
-
return +new Date
|
| 7 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/right-now/index.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
| 1 |
-
module.exports = function now() {
|
| 2 |
-
var time = process.hrtime()
|
| 3 |
-
return time[0] * 1e3 + time[1] / 1e6
|
| 4 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/right-now/package.json
DELETED
|
@@ -1,28 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"name": "right-now",
|
| 3 |
-
"version": "1.0.0",
|
| 4 |
-
"description": "Get the quickest, most high-resolution timestamp possible in node or the browser",
|
| 5 |
-
"main": "index.js",
|
| 6 |
-
"browser": "browser.js",
|
| 7 |
-
"scripts": {
|
| 8 |
-
"test": "say sorry"
|
| 9 |
-
},
|
| 10 |
-
"repository": {
|
| 11 |
-
"type": "git",
|
| 12 |
-
"url": "git://github.com/hughsk/right-now.git"
|
| 13 |
-
},
|
| 14 |
-
"keywords": [
|
| 15 |
-
"time",
|
| 16 |
-
"high",
|
| 17 |
-
"resolution",
|
| 18 |
-
"fast",
|
| 19 |
-
"quick",
|
| 20 |
-
"nanosecond",
|
| 21 |
-
"millsecond",
|
| 22 |
-
"performance",
|
| 23 |
-
"now"
|
| 24 |
-
],
|
| 25 |
-
"author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughskennedy.com/)",
|
| 26 |
-
"license": "MIT",
|
| 27 |
-
"readmeFilename": "README.md"
|
| 28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/rollup/LICENSE.md
DELETED
|
@@ -1,679 +0,0 @@
|
|
| 1 |
-
# Rollup core license
|
| 2 |
-
Rollup is released under the MIT license:
|
| 3 |
-
|
| 4 |
-
The MIT License (MIT)
|
| 5 |
-
|
| 6 |
-
Copyright (c) 2017 [these people](https://github.com/rollup/rollup/graphs/contributors)
|
| 7 |
-
|
| 8 |
-
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:
|
| 9 |
-
|
| 10 |
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 11 |
-
|
| 12 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 13 |
-
|
| 14 |
-
# Licenses of bundled dependencies
|
| 15 |
-
The published Rollup artifact additionally contains code with the following licenses:
|
| 16 |
-
MIT, ISC, 0BSD
|
| 17 |
-
|
| 18 |
-
# Bundled dependencies:
|
| 19 |
-
## @jridgewell/sourcemap-codec
|
| 20 |
-
License: MIT
|
| 21 |
-
By: Justin Ridgewell
|
| 22 |
-
Repository: git+https://github.com/jridgewell/sourcemaps.git
|
| 23 |
-
|
| 24 |
-
> Copyright 2024 Justin Ridgewell <justin@ridgewell.name>
|
| 25 |
-
>
|
| 26 |
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 27 |
-
> of this software and associated documentation files (the "Software"), to deal
|
| 28 |
-
> in the Software without restriction, including without limitation the rights
|
| 29 |
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 30 |
-
> copies of the Software, and to permit persons to whom the Software is
|
| 31 |
-
> furnished to do so, subject to the following conditions:
|
| 32 |
-
>
|
| 33 |
-
> The above copyright notice and this permission notice shall be included in
|
| 34 |
-
> all copies or substantial portions of the Software.
|
| 35 |
-
>
|
| 36 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 37 |
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 38 |
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 39 |
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 40 |
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 41 |
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 42 |
-
> SOFTWARE.
|
| 43 |
-
|
| 44 |
-
---------------------------------------
|
| 45 |
-
|
| 46 |
-
## @rollup/pluginutils
|
| 47 |
-
License: MIT
|
| 48 |
-
By: Rich Harris
|
| 49 |
-
Repository: rollup/plugins
|
| 50 |
-
|
| 51 |
-
> The MIT License (MIT)
|
| 52 |
-
>
|
| 53 |
-
> Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
|
| 54 |
-
>
|
| 55 |
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 56 |
-
> of this software and associated documentation files (the "Software"), to deal
|
| 57 |
-
> in the Software without restriction, including without limitation the rights
|
| 58 |
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 59 |
-
> copies of the Software, and to permit persons to whom the Software is
|
| 60 |
-
> furnished to do so, subject to the following conditions:
|
| 61 |
-
>
|
| 62 |
-
> The above copyright notice and this permission notice shall be included in
|
| 63 |
-
> all copies or substantial portions of the Software.
|
| 64 |
-
>
|
| 65 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 66 |
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 67 |
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 68 |
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 69 |
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 70 |
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 71 |
-
> THE SOFTWARE.
|
| 72 |
-
|
| 73 |
-
---------------------------------------
|
| 74 |
-
|
| 75 |
-
## anymatch
|
| 76 |
-
License: ISC
|
| 77 |
-
By: Elan Shanker
|
| 78 |
-
Repository: https://github.com/micromatch/anymatch
|
| 79 |
-
|
| 80 |
-
> The ISC License
|
| 81 |
-
>
|
| 82 |
-
> Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com)
|
| 83 |
-
>
|
| 84 |
-
> Permission to use, copy, modify, and/or distribute this software for any
|
| 85 |
-
> purpose with or without fee is hereby granted, provided that the above
|
| 86 |
-
> copyright notice and this permission notice appear in all copies.
|
| 87 |
-
>
|
| 88 |
-
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
| 89 |
-
> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
| 90 |
-
> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
| 91 |
-
> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
| 92 |
-
> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
| 93 |
-
> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
| 94 |
-
> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
| 95 |
-
|
| 96 |
-
---------------------------------------
|
| 97 |
-
|
| 98 |
-
## binary-extensions
|
| 99 |
-
License: MIT
|
| 100 |
-
By: Sindre Sorhus
|
| 101 |
-
Repository: sindresorhus/binary-extensions
|
| 102 |
-
|
| 103 |
-
> MIT License
|
| 104 |
-
>
|
| 105 |
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
| 106 |
-
> Copyright (c) Paul Miller (https://paulmillr.com)
|
| 107 |
-
>
|
| 108 |
-
> 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:
|
| 109 |
-
>
|
| 110 |
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 111 |
-
>
|
| 112 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 113 |
-
|
| 114 |
-
---------------------------------------
|
| 115 |
-
|
| 116 |
-
## braces
|
| 117 |
-
License: MIT
|
| 118 |
-
By: Jon Schlinkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm
|
| 119 |
-
Repository: micromatch/braces
|
| 120 |
-
|
| 121 |
-
> The MIT License (MIT)
|
| 122 |
-
>
|
| 123 |
-
> Copyright (c) 2014-present, Jon Schlinkert.
|
| 124 |
-
>
|
| 125 |
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 126 |
-
> of this software and associated documentation files (the "Software"), to deal
|
| 127 |
-
> in the Software without restriction, including without limitation the rights
|
| 128 |
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 129 |
-
> copies of the Software, and to permit persons to whom the Software is
|
| 130 |
-
> furnished to do so, subject to the following conditions:
|
| 131 |
-
>
|
| 132 |
-
> The above copyright notice and this permission notice shall be included in
|
| 133 |
-
> all copies or substantial portions of the Software.
|
| 134 |
-
>
|
| 135 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 136 |
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 137 |
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 138 |
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 139 |
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 140 |
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 141 |
-
> THE SOFTWARE.
|
| 142 |
-
|
| 143 |
-
---------------------------------------
|
| 144 |
-
|
| 145 |
-
## builtin-modules
|
| 146 |
-
License: MIT
|
| 147 |
-
By: Sindre Sorhus
|
| 148 |
-
Repository: sindresorhus/builtin-modules
|
| 149 |
-
|
| 150 |
-
> MIT License
|
| 151 |
-
>
|
| 152 |
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
| 153 |
-
>
|
| 154 |
-
> 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:
|
| 155 |
-
>
|
| 156 |
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 157 |
-
>
|
| 158 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 159 |
-
|
| 160 |
-
---------------------------------------
|
| 161 |
-
|
| 162 |
-
## chokidar
|
| 163 |
-
License: MIT
|
| 164 |
-
By: Paul Miller, Elan Shanker
|
| 165 |
-
Repository: git+https://github.com/paulmillr/chokidar.git
|
| 166 |
-
|
| 167 |
-
> The MIT License (MIT)
|
| 168 |
-
>
|
| 169 |
-
> Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker
|
| 170 |
-
>
|
| 171 |
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 172 |
-
> of this software and associated documentation files (the “Software”), to deal
|
| 173 |
-
> in the Software without restriction, including without limitation the rights
|
| 174 |
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 175 |
-
> copies of the Software, and to permit persons to whom the Software is
|
| 176 |
-
> furnished to do so, subject to the following conditions:
|
| 177 |
-
>
|
| 178 |
-
> The above copyright notice and this permission notice shall be included in
|
| 179 |
-
> all copies or substantial portions of the Software.
|
| 180 |
-
>
|
| 181 |
-
> THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 182 |
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 183 |
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 184 |
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 185 |
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 186 |
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 187 |
-
> THE SOFTWARE.
|
| 188 |
-
|
| 189 |
-
---------------------------------------
|
| 190 |
-
|
| 191 |
-
## date-time
|
| 192 |
-
License: MIT
|
| 193 |
-
By: Sindre Sorhus
|
| 194 |
-
Repository: sindresorhus/date-time
|
| 195 |
-
|
| 196 |
-
> MIT License
|
| 197 |
-
>
|
| 198 |
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
| 199 |
-
>
|
| 200 |
-
> 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:
|
| 201 |
-
>
|
| 202 |
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 203 |
-
>
|
| 204 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 205 |
-
|
| 206 |
-
---------------------------------------
|
| 207 |
-
|
| 208 |
-
## fill-range
|
| 209 |
-
License: MIT
|
| 210 |
-
By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling
|
| 211 |
-
Repository: jonschlinkert/fill-range
|
| 212 |
-
|
| 213 |
-
> The MIT License (MIT)
|
| 214 |
-
>
|
| 215 |
-
> Copyright (c) 2014-present, Jon Schlinkert.
|
| 216 |
-
>
|
| 217 |
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 218 |
-
> of this software and associated documentation files (the "Software"), to deal
|
| 219 |
-
> in the Software without restriction, including without limitation the rights
|
| 220 |
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 221 |
-
> copies of the Software, and to permit persons to whom the Software is
|
| 222 |
-
> furnished to do so, subject to the following conditions:
|
| 223 |
-
>
|
| 224 |
-
> The above copyright notice and this permission notice shall be included in
|
| 225 |
-
> all copies or substantial portions of the Software.
|
| 226 |
-
>
|
| 227 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 228 |
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 229 |
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 230 |
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 231 |
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 232 |
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 233 |
-
> THE SOFTWARE.
|
| 234 |
-
|
| 235 |
-
---------------------------------------
|
| 236 |
-
|
| 237 |
-
## flru
|
| 238 |
-
License: MIT
|
| 239 |
-
By: Luke Edwards
|
| 240 |
-
Repository: lukeed/flru
|
| 241 |
-
|
| 242 |
-
> MIT License
|
| 243 |
-
>
|
| 244 |
-
> Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
| 245 |
-
>
|
| 246 |
-
> 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:
|
| 247 |
-
>
|
| 248 |
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 249 |
-
>
|
| 250 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 251 |
-
|
| 252 |
-
---------------------------------------
|
| 253 |
-
|
| 254 |
-
## glob-parent
|
| 255 |
-
License: ISC
|
| 256 |
-
By: Gulp Team, Elan Shanker, Blaine Bublitz
|
| 257 |
-
Repository: gulpjs/glob-parent
|
| 258 |
-
|
| 259 |
-
> The ISC License
|
| 260 |
-
>
|
| 261 |
-
> Copyright (c) 2015, 2019 Elan Shanker
|
| 262 |
-
>
|
| 263 |
-
> Permission to use, copy, modify, and/or distribute this software for any
|
| 264 |
-
> purpose with or without fee is hereby granted, provided that the above
|
| 265 |
-
> copyright notice and this permission notice appear in all copies.
|
| 266 |
-
>
|
| 267 |
-
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
| 268 |
-
> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
| 269 |
-
> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
| 270 |
-
> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
| 271 |
-
> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
| 272 |
-
> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
| 273 |
-
> IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
| 274 |
-
|
| 275 |
-
---------------------------------------
|
| 276 |
-
|
| 277 |
-
## is-binary-path
|
| 278 |
-
License: MIT
|
| 279 |
-
By: Sindre Sorhus
|
| 280 |
-
Repository: sindresorhus/is-binary-path
|
| 281 |
-
|
| 282 |
-
> MIT License
|
| 283 |
-
>
|
| 284 |
-
> Copyright (c) 2019 Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com), Paul Miller (https://paulmillr.com)
|
| 285 |
-
>
|
| 286 |
-
> 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:
|
| 287 |
-
>
|
| 288 |
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 289 |
-
>
|
| 290 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 291 |
-
|
| 292 |
-
---------------------------------------
|
| 293 |
-
|
| 294 |
-
## is-extglob
|
| 295 |
-
License: MIT
|
| 296 |
-
By: Jon Schlinkert
|
| 297 |
-
Repository: jonschlinkert/is-extglob
|
| 298 |
-
|
| 299 |
-
> The MIT License (MIT)
|
| 300 |
-
>
|
| 301 |
-
> Copyright (c) 2014-2016, Jon Schlinkert
|
| 302 |
-
>
|
| 303 |
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 304 |
-
> of this software and associated documentation files (the "Software"), to deal
|
| 305 |
-
> in the Software without restriction, including without limitation the rights
|
| 306 |
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 307 |
-
> copies of the Software, and to permit persons to whom the Software is
|
| 308 |
-
> furnished to do so, subject to the following conditions:
|
| 309 |
-
>
|
| 310 |
-
> The above copyright notice and this permission notice shall be included in
|
| 311 |
-
> all copies or substantial portions of the Software.
|
| 312 |
-
>
|
| 313 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 314 |
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 315 |
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 316 |
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 317 |
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 318 |
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 319 |
-
> THE SOFTWARE.
|
| 320 |
-
|
| 321 |
-
---------------------------------------
|
| 322 |
-
|
| 323 |
-
## is-glob
|
| 324 |
-
License: MIT
|
| 325 |
-
By: Jon Schlinkert, Brian Woodward, Daniel Perez
|
| 326 |
-
Repository: micromatch/is-glob
|
| 327 |
-
|
| 328 |
-
> The MIT License (MIT)
|
| 329 |
-
>
|
| 330 |
-
> Copyright (c) 2014-2017, Jon Schlinkert.
|
| 331 |
-
>
|
| 332 |
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 333 |
-
> of this software and associated documentation files (the "Software"), to deal
|
| 334 |
-
> in the Software without restriction, including without limitation the rights
|
| 335 |
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 336 |
-
> copies of the Software, and to permit persons to whom the Software is
|
| 337 |
-
> furnished to do so, subject to the following conditions:
|
| 338 |
-
>
|
| 339 |
-
> The above copyright notice and this permission notice shall be included in
|
| 340 |
-
> all copies or substantial portions of the Software.
|
| 341 |
-
>
|
| 342 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 343 |
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 344 |
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 345 |
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 346 |
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 347 |
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 348 |
-
> THE SOFTWARE.
|
| 349 |
-
|
| 350 |
-
---------------------------------------
|
| 351 |
-
|
| 352 |
-
## is-number
|
| 353 |
-
License: MIT
|
| 354 |
-
By: Jon Schlinkert, Olsten Larck, Rouven Weßling
|
| 355 |
-
Repository: jonschlinkert/is-number
|
| 356 |
-
|
| 357 |
-
> The MIT License (MIT)
|
| 358 |
-
>
|
| 359 |
-
> Copyright (c) 2014-present, Jon Schlinkert.
|
| 360 |
-
>
|
| 361 |
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 362 |
-
> of this software and associated documentation files (the "Software"), to deal
|
| 363 |
-
> in the Software without restriction, including without limitation the rights
|
| 364 |
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 365 |
-
> copies of the Software, and to permit persons to whom the Software is
|
| 366 |
-
> furnished to do so, subject to the following conditions:
|
| 367 |
-
>
|
| 368 |
-
> The above copyright notice and this permission notice shall be included in
|
| 369 |
-
> all copies or substantial portions of the Software.
|
| 370 |
-
>
|
| 371 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 372 |
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 373 |
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 374 |
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 375 |
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 376 |
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 377 |
-
> THE SOFTWARE.
|
| 378 |
-
|
| 379 |
-
---------------------------------------
|
| 380 |
-
|
| 381 |
-
## is-reference
|
| 382 |
-
License: MIT
|
| 383 |
-
By: Rich Harris
|
| 384 |
-
Repository: git+https://github.com/Rich-Harris/is-reference.git
|
| 385 |
-
|
| 386 |
-
---------------------------------------
|
| 387 |
-
|
| 388 |
-
## locate-character
|
| 389 |
-
License: MIT
|
| 390 |
-
By: Rich Harris
|
| 391 |
-
Repository: git+https://gitlab.com/Rich-Harris/locate-character.git
|
| 392 |
-
|
| 393 |
-
---------------------------------------
|
| 394 |
-
|
| 395 |
-
## magic-string
|
| 396 |
-
License: MIT
|
| 397 |
-
By: Rich Harris
|
| 398 |
-
Repository: git+https://github.com/Rich-Harris/magic-string.git
|
| 399 |
-
|
| 400 |
-
> Copyright 2018 Rich Harris
|
| 401 |
-
>
|
| 402 |
-
> 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:
|
| 403 |
-
>
|
| 404 |
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 405 |
-
>
|
| 406 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 407 |
-
|
| 408 |
-
---------------------------------------
|
| 409 |
-
|
| 410 |
-
## normalize-path
|
| 411 |
-
License: MIT
|
| 412 |
-
By: Jon Schlinkert, Blaine Bublitz
|
| 413 |
-
Repository: jonschlinkert/normalize-path
|
| 414 |
-
|
| 415 |
-
> The MIT License (MIT)
|
| 416 |
-
>
|
| 417 |
-
> Copyright (c) 2014-2018, Jon Schlinkert.
|
| 418 |
-
>
|
| 419 |
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 420 |
-
> of this software and associated documentation files (the "Software"), to deal
|
| 421 |
-
> in the Software without restriction, including without limitation the rights
|
| 422 |
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 423 |
-
> copies of the Software, and to permit persons to whom the Software is
|
| 424 |
-
> furnished to do so, subject to the following conditions:
|
| 425 |
-
>
|
| 426 |
-
> The above copyright notice and this permission notice shall be included in
|
| 427 |
-
> all copies or substantial portions of the Software.
|
| 428 |
-
>
|
| 429 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 430 |
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 431 |
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 432 |
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 433 |
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 434 |
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 435 |
-
> THE SOFTWARE.
|
| 436 |
-
|
| 437 |
-
---------------------------------------
|
| 438 |
-
|
| 439 |
-
## parse-ms
|
| 440 |
-
License: MIT
|
| 441 |
-
By: Sindre Sorhus
|
| 442 |
-
Repository: sindresorhus/parse-ms
|
| 443 |
-
|
| 444 |
-
> MIT License
|
| 445 |
-
>
|
| 446 |
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
| 447 |
-
>
|
| 448 |
-
> 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:
|
| 449 |
-
>
|
| 450 |
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 451 |
-
>
|
| 452 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 453 |
-
|
| 454 |
-
---------------------------------------
|
| 455 |
-
|
| 456 |
-
## picocolors
|
| 457 |
-
License: ISC
|
| 458 |
-
By: Alexey Raspopov
|
| 459 |
-
Repository: alexeyraspopov/picocolors
|
| 460 |
-
|
| 461 |
-
> ISC License
|
| 462 |
-
>
|
| 463 |
-
> Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov
|
| 464 |
-
>
|
| 465 |
-
> Permission to use, copy, modify, and/or distribute this software for any
|
| 466 |
-
> purpose with or without fee is hereby granted, provided that the above
|
| 467 |
-
> copyright notice and this permission notice appear in all copies.
|
| 468 |
-
>
|
| 469 |
-
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
| 470 |
-
> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
| 471 |
-
> MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
| 472 |
-
> ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
| 473 |
-
> WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
| 474 |
-
> ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
| 475 |
-
> OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
| 476 |
-
|
| 477 |
-
---------------------------------------
|
| 478 |
-
|
| 479 |
-
## picomatch
|
| 480 |
-
License: MIT
|
| 481 |
-
By: Jon Schlinkert
|
| 482 |
-
Repository: micromatch/picomatch
|
| 483 |
-
|
| 484 |
-
> The MIT License (MIT)
|
| 485 |
-
>
|
| 486 |
-
> Copyright (c) 2017-present, Jon Schlinkert.
|
| 487 |
-
>
|
| 488 |
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 489 |
-
> of this software and associated documentation files (the "Software"), to deal
|
| 490 |
-
> in the Software without restriction, including without limitation the rights
|
| 491 |
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 492 |
-
> copies of the Software, and to permit persons to whom the Software is
|
| 493 |
-
> furnished to do so, subject to the following conditions:
|
| 494 |
-
>
|
| 495 |
-
> The above copyright notice and this permission notice shall be included in
|
| 496 |
-
> all copies or substantial portions of the Software.
|
| 497 |
-
>
|
| 498 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 499 |
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 500 |
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 501 |
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 502 |
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 503 |
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 504 |
-
> THE SOFTWARE.
|
| 505 |
-
|
| 506 |
-
---------------------------------------
|
| 507 |
-
|
| 508 |
-
## pretty-bytes
|
| 509 |
-
License: MIT
|
| 510 |
-
By: Sindre Sorhus
|
| 511 |
-
Repository: sindresorhus/pretty-bytes
|
| 512 |
-
|
| 513 |
-
> MIT License
|
| 514 |
-
>
|
| 515 |
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
| 516 |
-
>
|
| 517 |
-
> 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:
|
| 518 |
-
>
|
| 519 |
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 520 |
-
>
|
| 521 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 522 |
-
|
| 523 |
-
---------------------------------------
|
| 524 |
-
|
| 525 |
-
## pretty-ms
|
| 526 |
-
License: MIT
|
| 527 |
-
By: Sindre Sorhus
|
| 528 |
-
Repository: sindresorhus/pretty-ms
|
| 529 |
-
|
| 530 |
-
> MIT License
|
| 531 |
-
>
|
| 532 |
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
| 533 |
-
>
|
| 534 |
-
> 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:
|
| 535 |
-
>
|
| 536 |
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 537 |
-
>
|
| 538 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 539 |
-
|
| 540 |
-
---------------------------------------
|
| 541 |
-
|
| 542 |
-
## readdirp
|
| 543 |
-
License: MIT
|
| 544 |
-
By: Thorsten Lorenz, Paul Miller
|
| 545 |
-
Repository: git://github.com/paulmillr/readdirp.git
|
| 546 |
-
|
| 547 |
-
> MIT License
|
| 548 |
-
>
|
| 549 |
-
> Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com)
|
| 550 |
-
>
|
| 551 |
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 552 |
-
> of this software and associated documentation files (the "Software"), to deal
|
| 553 |
-
> in the Software without restriction, including without limitation the rights
|
| 554 |
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 555 |
-
> copies of the Software, and to permit persons to whom the Software is
|
| 556 |
-
> furnished to do so, subject to the following conditions:
|
| 557 |
-
>
|
| 558 |
-
> The above copyright notice and this permission notice shall be included in all
|
| 559 |
-
> copies or substantial portions of the Software.
|
| 560 |
-
>
|
| 561 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 562 |
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 563 |
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 564 |
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 565 |
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 566 |
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 567 |
-
> SOFTWARE.
|
| 568 |
-
|
| 569 |
-
---------------------------------------
|
| 570 |
-
|
| 571 |
-
## signal-exit
|
| 572 |
-
License: ISC
|
| 573 |
-
By: Ben Coe
|
| 574 |
-
Repository: https://github.com/tapjs/signal-exit.git
|
| 575 |
-
|
| 576 |
-
> The ISC License
|
| 577 |
-
>
|
| 578 |
-
> Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors
|
| 579 |
-
>
|
| 580 |
-
> Permission to use, copy, modify, and/or distribute this software
|
| 581 |
-
> for any purpose with or without fee is hereby granted, provided
|
| 582 |
-
> that the above copyright notice and this permission notice
|
| 583 |
-
> appear in all copies.
|
| 584 |
-
>
|
| 585 |
-
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
| 586 |
-
> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
| 587 |
-
> OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
|
| 588 |
-
> LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
| 589 |
-
> OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
| 590 |
-
> WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
| 591 |
-
> ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
| 592 |
-
|
| 593 |
-
---------------------------------------
|
| 594 |
-
|
| 595 |
-
## time-zone
|
| 596 |
-
License: MIT
|
| 597 |
-
By: Sindre Sorhus
|
| 598 |
-
Repository: sindresorhus/time-zone
|
| 599 |
-
|
| 600 |
-
> MIT License
|
| 601 |
-
>
|
| 602 |
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
| 603 |
-
>
|
| 604 |
-
> 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:
|
| 605 |
-
>
|
| 606 |
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 607 |
-
>
|
| 608 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 609 |
-
|
| 610 |
-
---------------------------------------
|
| 611 |
-
|
| 612 |
-
## to-regex-range
|
| 613 |
-
License: MIT
|
| 614 |
-
By: Jon Schlinkert, Rouven Weßling
|
| 615 |
-
Repository: micromatch/to-regex-range
|
| 616 |
-
|
| 617 |
-
> The MIT License (MIT)
|
| 618 |
-
>
|
| 619 |
-
> Copyright (c) 2015-present, Jon Schlinkert.
|
| 620 |
-
>
|
| 621 |
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 622 |
-
> of this software and associated documentation files (the "Software"), to deal
|
| 623 |
-
> in the Software without restriction, including without limitation the rights
|
| 624 |
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 625 |
-
> copies of the Software, and to permit persons to whom the Software is
|
| 626 |
-
> furnished to do so, subject to the following conditions:
|
| 627 |
-
>
|
| 628 |
-
> The above copyright notice and this permission notice shall be included in
|
| 629 |
-
> all copies or substantial portions of the Software.
|
| 630 |
-
>
|
| 631 |
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 632 |
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 633 |
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 634 |
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 635 |
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 636 |
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 637 |
-
> THE SOFTWARE.
|
| 638 |
-
|
| 639 |
-
---------------------------------------
|
| 640 |
-
|
| 641 |
-
## tslib
|
| 642 |
-
License: 0BSD
|
| 643 |
-
By: Microsoft Corp.
|
| 644 |
-
Repository: https://github.com/Microsoft/tslib.git
|
| 645 |
-
|
| 646 |
-
> Copyright (c) Microsoft Corporation.
|
| 647 |
-
>
|
| 648 |
-
> Permission to use, copy, modify, and/or distribute this software for any
|
| 649 |
-
> purpose with or without fee is hereby granted.
|
| 650 |
-
>
|
| 651 |
-
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
| 652 |
-
> REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
| 653 |
-
> AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
| 654 |
-
> INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
| 655 |
-
> LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
| 656 |
-
> OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
| 657 |
-
> PERFORMANCE OF THIS SOFTWARE.
|
| 658 |
-
|
| 659 |
-
---------------------------------------
|
| 660 |
-
|
| 661 |
-
## yargs-parser
|
| 662 |
-
License: ISC
|
| 663 |
-
By: Ben Coe
|
| 664 |
-
Repository: https://github.com/yargs/yargs-parser.git
|
| 665 |
-
|
| 666 |
-
> Copyright (c) 2016, Contributors
|
| 667 |
-
>
|
| 668 |
-
> Permission to use, copy, modify, and/or distribute this software
|
| 669 |
-
> for any purpose with or without fee is hereby granted, provided
|
| 670 |
-
> that the above copyright notice and this permission notice
|
| 671 |
-
> appear in all copies.
|
| 672 |
-
>
|
| 673 |
-
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
| 674 |
-
> WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
| 675 |
-
> OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
|
| 676 |
-
> LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
| 677 |
-
> OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
| 678 |
-
> WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
| 679 |
-
> ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/rollup/README.md
DELETED
|
@@ -1,134 +0,0 @@
|
|
| 1 |
-
<p align="center">
|
| 2 |
-
<a href="https://rollupjs.org/"><img src="https://rollupjs.org/rollup-logo.svg" width="150" /></a>
|
| 3 |
-
</p>
|
| 4 |
-
|
| 5 |
-
<p align="center">
|
| 6 |
-
<a href="https://www.npmjs.com/package/rollup">
|
| 7 |
-
<img src="https://img.shields.io/npm/v/rollup.svg" alt="npm version" >
|
| 8 |
-
</a>
|
| 9 |
-
<a href="https://nodejs.org/en/about/previous-releases">
|
| 10 |
-
<img src="https://img.shields.io/node/v/rollup.svg" alt="node compatibility">
|
| 11 |
-
</a>
|
| 12 |
-
<a href="https://packagephobia.now.sh/result?p=rollup">
|
| 13 |
-
<img src="https://packagephobia.now.sh/badge?p=rollup" alt="install size" >
|
| 14 |
-
</a>
|
| 15 |
-
<a href="https://codecov.io/gh/rollup/rollup">
|
| 16 |
-
<img src="https://codecov.io/gh/rollup/rollup/graph/badge.svg" alt="code coverage" >
|
| 17 |
-
</a>
|
| 18 |
-
<a href="#backers" alt="sponsors on Open Collective">
|
| 19 |
-
<img src="https://opencollective.com/rollup/backers/badge.svg" alt="backers" >
|
| 20 |
-
</a>
|
| 21 |
-
<a href="#sponsors" alt="Sponsors on Open Collective">
|
| 22 |
-
<img src="https://opencollective.com/rollup/sponsors/badge.svg" alt="sponsors" >
|
| 23 |
-
</a>
|
| 24 |
-
<a href="https://github.com/rollup/rollup/blob/master/LICENSE.md">
|
| 25 |
-
<img src="https://img.shields.io/npm/l/rollup.svg" alt="license">
|
| 26 |
-
</a>
|
| 27 |
-
<a href='https://is.gd/rollup_chat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge'>
|
| 28 |
-
<img src='https://img.shields.io/discord/466787075518365708?color=778cd1&label=chat' alt='Join the chat at https://is.gd/rollup_chat'>
|
| 29 |
-
</a>
|
| 30 |
-
</p>
|
| 31 |
-
|
| 32 |
-
<h1 align="center">Rollup</h1>
|
| 33 |
-
|
| 34 |
-
## Overview
|
| 35 |
-
|
| 36 |
-
Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. It uses the standardized ES module format for code, instead of previous idiosyncratic solutions such as CommonJS and AMD. ES modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries. Rollup can optimize ES modules for faster native loading in modern browsers, or output a legacy module format allowing ES module workflows today.
|
| 37 |
-
|
| 38 |
-
## Quick Start Guide
|
| 39 |
-
|
| 40 |
-
Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://rollupjs.org/command-line-interface/) with an optional configuration file or else through its [JavaScript API](https://rollupjs.org/javascript-api/). Run `rollup --help` to see the available options and parameters. The starter project templates, [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) and [rollup-starter-app](https://github.com/rollup/rollup-starter-app), demonstrate common configuration options, and more detailed instructions are available throughout the [user guide](https://rollupjs.org/introduction/).
|
| 41 |
-
|
| 42 |
-
### Commands
|
| 43 |
-
|
| 44 |
-
These commands assume the entry point to your application is named main.js, and that you'd like all imports compiled into a single file named bundle.js.
|
| 45 |
-
|
| 46 |
-
For browsers:
|
| 47 |
-
|
| 48 |
-
```bash
|
| 49 |
-
# compile to a <script> containing a self-executing function
|
| 50 |
-
rollup main.js --format iife --name "myBundle" --file bundle.js
|
| 51 |
-
```
|
| 52 |
-
|
| 53 |
-
For Node.js:
|
| 54 |
-
|
| 55 |
-
```bash
|
| 56 |
-
# compile to a CommonJS module
|
| 57 |
-
rollup main.js --format cjs --file bundle.js
|
| 58 |
-
```
|
| 59 |
-
|
| 60 |
-
For both browsers and Node.js:
|
| 61 |
-
|
| 62 |
-
```bash
|
| 63 |
-
# UMD format requires a bundle name
|
| 64 |
-
rollup main.js --format umd --name "myBundle" --file bundle.js
|
| 65 |
-
```
|
| 66 |
-
|
| 67 |
-
## Why
|
| 68 |
-
|
| 69 |
-
Developing software is usually easier if you break your project into smaller separate pieces, since that often removes unexpected interactions and dramatically reduces the complexity of the problems you'll need to solve, and simply writing smaller projects in the first place [isn't necessarily the answer](https://medium.com/@Rich_Harris/small-modules-it-s-not-quite-that-simple-3ca532d65de4). Unfortunately, JavaScript has not historically included this capability as a core feature in the language.
|
| 70 |
-
|
| 71 |
-
This finally changed with ES modules support in JavaScript, which provides a syntax for importing and exporting functions and data so they can be shared between separate scripts. Most browsers and Node.js support ES modules. However, Node.js releases before 12.17 support ES modules only behind the `--experimental-modules` flag, and older browsers like Internet Explorer do not support ES modules at all. Rollup allows you to write your code using ES modules, and run your application even in environments that do not support ES modules natively. For environments that support them, Rollup can output optimized ES modules; for environments that don't, Rollup can compile your code to other formats such as CommonJS modules, AMD modules, and IIFE-style scripts. This means that you get to _write future-proof code_, and you also get the tremendous benefits of...
|
| 72 |
-
|
| 73 |
-
## Tree Shaking
|
| 74 |
-
|
| 75 |
-
In addition to enabling the use of ES modules, Rollup also statically analyzes and optimizes the code you are importing, and will exclude anything that isn't actually used. This allows you to build on top of existing tools and modules without adding extra dependencies or bloating the size of your project.
|
| 76 |
-
|
| 77 |
-
For example, with CommonJS, the _entire tool or library must be imported_.
|
| 78 |
-
|
| 79 |
-
```js
|
| 80 |
-
// import the entire utils object with CommonJS
|
| 81 |
-
var utils = require('node:utils');
|
| 82 |
-
var query = 'Rollup';
|
| 83 |
-
// use the ajax method of the utils object
|
| 84 |
-
utils.ajax('https://api.example.com?search=' + query).then(handleResponse);
|
| 85 |
-
```
|
| 86 |
-
|
| 87 |
-
But with ES modules, instead of importing the whole `utils` object, we can just import the one `ajax` function we need:
|
| 88 |
-
|
| 89 |
-
```js
|
| 90 |
-
// import the ajax function with an ES import statement
|
| 91 |
-
import { ajax } from 'node:utils';
|
| 92 |
-
|
| 93 |
-
var query = 'Rollup';
|
| 94 |
-
// call the ajax function
|
| 95 |
-
ajax('https://api.example.com?search=' + query).then(handleResponse);
|
| 96 |
-
```
|
| 97 |
-
|
| 98 |
-
Because Rollup includes the bare minimum, it results in lighter, faster, and less complicated libraries and applications. Since this approach is based on explicit `import` and `export` statements, it is vastly more effective than simply running an automated minifier to detect unused variables in the compiled output code.
|
| 99 |
-
|
| 100 |
-
## Compatibility
|
| 101 |
-
|
| 102 |
-
### Importing CommonJS
|
| 103 |
-
|
| 104 |
-
Rollup can import existing CommonJS modules [through a plugin](https://github.com/rollup/plugins/tree/master/packages/commonjs).
|
| 105 |
-
|
| 106 |
-
### Publishing ES Modules
|
| 107 |
-
|
| 108 |
-
To make sure your ES modules are immediately usable by tools that work with CommonJS such as Node.js and webpack, you can use Rollup to compile to UMD or CommonJS format, and then point to that compiled version with the `main` property in your `package.json` file. If your `package.json` file also has a `module` field, ES-module-aware tools like Rollup and [webpack](https://webpack.js.org/) will [import the ES module version](https://github.com/rollup/rollup/wiki/pkg.module) directly.
|
| 109 |
-
|
| 110 |
-
## Contributors
|
| 111 |
-
|
| 112 |
-
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. <a href="https://github.com/rollup/rollup/graphs/contributors"><img src="https://opencollective.com/rollup/contributors.svg?width=890" /></a>. If you want to contribute yourself, head over to the [contribution guidelines](CONTRIBUTING.md).
|
| 113 |
-
|
| 114 |
-
## Backers
|
| 115 |
-
|
| 116 |
-
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/rollup#backer)]
|
| 117 |
-
|
| 118 |
-
<a href="https://opencollective.com/rollup#backers" target="_blank"><img src="https://opencollective.com/rollup/backers.svg?width=890"></a>
|
| 119 |
-
|
| 120 |
-
## Sponsors
|
| 121 |
-
|
| 122 |
-
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/rollup#sponsor)]
|
| 123 |
-
|
| 124 |
-
<a href="https://opencollective.com/rollup/sponsor/0/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/1/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/2/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/3/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/4/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/5/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/6/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/7/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/8/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/9/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/9/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/10/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/10/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/11/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/11/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/12/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/12/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/13/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/13/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/14/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/14/avatar.svg"></a>
|
| 125 |
-
|
| 126 |
-
## Special Sponsor
|
| 127 |
-
|
| 128 |
-
<a href="https://www.tngtech.com/en/index.html" target="_blank"><img src="https://avatars.githubusercontent.com/u/432256?s=200&v=4" alt="TNG Logo"/></a>
|
| 129 |
-
|
| 130 |
-
TNG has been supporting the work of [Lukas Taegert-Atkinson](https://github.com/lukastaegert) on Rollup since 2017.
|
| 131 |
-
|
| 132 |
-
## License
|
| 133 |
-
|
| 134 |
-
[MIT](https://github.com/rollup/rollup/blob/master/LICENSE.md)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/rollup/dist/bin/rollup
DELETED
|
@@ -1,1912 +0,0 @@
|
|
| 1 |
-
#!/usr/bin/env node
|
| 2 |
-
/*
|
| 3 |
-
@license
|
| 4 |
-
Rollup.js v4.55.1
|
| 5 |
-
Mon, 05 Jan 2026 10:23:35 GMT - commit 299cc46f3059a72b1e37b80c688a6d88c6c5f3fd
|
| 6 |
-
|
| 7 |
-
https://github.com/rollup/rollup
|
| 8 |
-
|
| 9 |
-
Released under the MIT License.
|
| 10 |
-
*/
|
| 11 |
-
'use strict';
|
| 12 |
-
|
| 13 |
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
| 14 |
-
|
| 15 |
-
const process$1 = require('node:process');
|
| 16 |
-
const rollup = require('../shared/rollup.js');
|
| 17 |
-
const require$$2 = require('util');
|
| 18 |
-
const require$$0 = require('path');
|
| 19 |
-
const require$$0$1 = require('fs');
|
| 20 |
-
const parseAst_js = require('../shared/parseAst.js');
|
| 21 |
-
const fseventsImporter = require('../shared/fsevents-importer.js');
|
| 22 |
-
const promises = require('node:fs/promises');
|
| 23 |
-
const path = require('node:path');
|
| 24 |
-
const loadConfigFile_js = require('../shared/loadConfigFile.js');
|
| 25 |
-
require('../native.js');
|
| 26 |
-
require('node:perf_hooks');
|
| 27 |
-
require('node:url');
|
| 28 |
-
require('../getLogFilter.js');
|
| 29 |
-
|
| 30 |
-
const help = "rollup version 4.55.1\n=====================================\n\nUsage: rollup [options] <entry file>\n\nOptions:\n\n-c, --config <filename> Use this config file (if argument is used but value\n is unspecified, Rollup will try to load configuration files in\n the following order:\n rollup.config.mjs -> rollup.config.cjs -> rollup.config.js)\n-d, --dir <dirname> Directory for chunks (if absent, prints to stdout)\n-e, --external <ids> Comma-separate list of module IDs to exclude\n-f, --format <format> Type of output (amd, cjs, es, iife, umd, system)\n-g, --globals <pairs> Comma-separate list of `moduleID:Global` pairs\n-h, --help Show this help message\n-i, --input <filename> Input (alternative to <entry file>)\n-m, --sourcemap Generate sourcemap (`-m inline` for inline map)\n-n, --name <name> Name for UMD export\n-o, --file <output> Single output file (if absent, prints to stdout)\n-p, --plugin <plugin> Use the plugin specified (may be repeated)\n-v, --version Show version number\n-w, --watch Watch files in bundle and rebuild on changes\n--amd.autoId Generate the AMD ID based off the chunk name\n--amd.basePath <prefix> Path to prepend to auto generated AMD ID\n--amd.define <name> Function to use in place of `define`\n--amd.forceJsExtensionForImports Use `.js` extension in AMD imports\n--amd.id <id> ID for AMD module (default is anonymous)\n--assetFileNames <pattern> Name pattern for emitted assets\n--banner <text> Code to insert at top of bundle (outside wrapper)\n--chunkFileNames <pattern> Name pattern for emitted secondary chunks\n--compact Minify wrapper code\n--context <variable> Specify top-level `this` value\n--no-dynamicImportInCjs Write external dynamic CommonJS imports as require\n--entryFileNames <pattern> Name pattern for emitted entry chunks\n--environment <values> Settings passed to config file (see example)\n--no-esModule Do not add __esModule property\n--exports <mode> Specify export mode (auto, default, named, none)\n--extend Extend global variable defined by --name\n--no-externalImportAttributes Omit import attributes in \"es\" output\n--no-externalLiveBindings Do not generate code to support live bindings\n--failAfterWarnings Exit with an error if the build produced warnings\n--filterLogs <filter> Filter log messages\n--footer <text> Code to insert at end of bundle (outside wrapper)\n--forceExit Force exit the process when done\n--no-freeze Do not freeze namespace objects\n--generatedCode <preset> Which code features to use (es5/es2015)\n--generatedCode.arrowFunctions Use arrow functions in generated code\n--generatedCode.constBindings Use \"const\" in generated code\n--generatedCode.objectShorthand Use shorthand properties in generated code\n--no-generatedCode.reservedNamesAsProps Always quote reserved names as props\n--generatedCode.symbols Use symbols in generated code\n--hashCharacters <name> Use the specified character set for file hashes\n--no-hoistTransitiveImports Do not hoist transitive imports into entry chunks\n--importAttributesKey <name> Use the specified keyword for import attributes\n--no-indent Don't indent result\n--inlineDynamicImports Create single bundle when using dynamic imports\n--no-interop Do not include interop block\n--intro <text> Code to insert at top of bundle (inside wrapper)\n--logLevel <level> Which kind of logs to display\n--no-makeAbsoluteExternalsRelative Prevent normalization of external imports\n--maxParallelFileOps <value> How many files to read in parallel\n--minifyInternalExports Force or disable minification of internal exports\n--noConflict Generate a noConflict method for UMD globals\n--outro <text> Code to insert at end of bundle (inside wrapper)\n--perf Display performance timings\n--no-preserveEntrySignatures Avoid facade chunks for entry points\n--preserveModules Preserve module structure\n--preserveModulesRoot Put preserved modules under this path at root level\n--preserveSymlinks Do not follow symlinks when resolving files\n--no-reexportProtoFromExternal Ignore `__proto__` in star re-exports\n--no-sanitizeFileName Do not replace invalid characters in file names\n--shimMissingExports Create shim variables for missing exports\n--silent Don't print warnings\n--sourcemapBaseUrl <url> Emit absolute sourcemap URLs with given base\n--sourcemapDebugIds Emit unique debug ids in source and sourcemaps\n--sourcemapExcludeSources Do not include source code in source maps\n--sourcemapFile <file> Specify bundle position for source maps\n--sourcemapFileNames <pattern> Name pattern for emitted sourcemaps\n--stdin=ext Specify file extension used for stdin input\n--no-stdin Do not read \"-\" from stdin\n--no-strict Don't emit `\"use strict\";` in the generated modules\n--strictDeprecations Throw errors for deprecated features\n--no-systemNullSetters Do not replace empty SystemJS setters with `null`\n--no-treeshake Disable tree-shaking optimisations\n--no-treeshake.annotations Ignore pure call annotations\n--treeshake.correctVarValueBeforeDeclaration Deoptimize variables until declared\n--treeshake.manualPureFunctions <names> Manually declare functions as pure\n--no-treeshake.moduleSideEffects Assume modules have no side effects\n--no-treeshake.propertyReadSideEffects Ignore property access side effects\n--no-treeshake.tryCatchDeoptimization Do not turn off try-catch-tree-shaking\n--no-treeshake.unknownGlobalSideEffects Assume unknown globals do not throw\n--validate Validate output\n--waitForBundleInput Wait for bundle input files\n--watch.allowInputInsideOutputPath Whether the input path is allowed to be a\n subpath of the output path\n--watch.buildDelay <number> Throttle watch rebuilds\n--no-watch.clearScreen Do not clear the screen when rebuilding\n--watch.exclude <files> Exclude files from being watched\n--watch.include <files> Limit watching to specified files\n--watch.onBundleEnd <cmd> Shell command to run on `\"BUNDLE_END\"` event\n--watch.onBundleStart <cmd> Shell command to run on `\"BUNDLE_START\"` event\n--watch.onEnd <cmd> Shell command to run on `\"END\"` event\n--watch.onError <cmd> Shell command to run on `\"ERROR\"` event\n--watch.onStart <cmd> Shell command to run on `\"START\"` event\n--watch.skipWrite Do not write files to disk when watching\n\nExamples:\n\n# use settings in config file\nrollup -c\n\n# in config file, process.env.INCLUDE_DEPS === 'true'\n# and process.env.BUILD === 'production'\nrollup -c --environment INCLUDE_DEPS,BUILD:production\n\n# create CommonJS bundle.js from src/main.js\nrollup --format=cjs --file=bundle.js -- src/main.js\n\n# create self-executing IIFE using `window.jQuery`\n# and `window._` as external globals\nrollup -f iife --globals jquery:jQuery,lodash:_ \\\n -i src/app.js -o build/app.js -m build/app.js.map\n\nNotes:\n\n* When piping to stdout, only inline sourcemaps are permitted\n\nFor more information visit https://rollupjs.org\n";
|
| 31 |
-
|
| 32 |
-
/**
|
| 33 |
-
* @license
|
| 34 |
-
* Copyright (c) 2016, Contributors
|
| 35 |
-
* SPDX-License-Identifier: ISC
|
| 36 |
-
*/
|
| 37 |
-
function camelCase(str) {
|
| 38 |
-
// Handle the case where an argument is provided as camel case, e.g., fooBar.
|
| 39 |
-
// by ensuring that the string isn't already mixed case:
|
| 40 |
-
const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
|
| 41 |
-
if (!isCamelCase) {
|
| 42 |
-
str = str.toLowerCase();
|
| 43 |
-
}
|
| 44 |
-
if (str.indexOf('-') === -1 && str.indexOf('_') === -1) {
|
| 45 |
-
return str;
|
| 46 |
-
}
|
| 47 |
-
else {
|
| 48 |
-
let camelcase = '';
|
| 49 |
-
let nextChrUpper = false;
|
| 50 |
-
const leadingHyphens = str.match(/^-+/);
|
| 51 |
-
for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) {
|
| 52 |
-
let chr = str.charAt(i);
|
| 53 |
-
if (nextChrUpper) {
|
| 54 |
-
nextChrUpper = false;
|
| 55 |
-
chr = chr.toUpperCase();
|
| 56 |
-
}
|
| 57 |
-
if (i !== 0 && (chr === '-' || chr === '_')) {
|
| 58 |
-
nextChrUpper = true;
|
| 59 |
-
}
|
| 60 |
-
else if (chr !== '-' && chr !== '_') {
|
| 61 |
-
camelcase += chr;
|
| 62 |
-
}
|
| 63 |
-
}
|
| 64 |
-
return camelcase;
|
| 65 |
-
}
|
| 66 |
-
}
|
| 67 |
-
function decamelize(str, joinString) {
|
| 68 |
-
const lowercase = str.toLowerCase();
|
| 69 |
-
joinString = joinString || '-';
|
| 70 |
-
let notCamelcase = '';
|
| 71 |
-
for (let i = 0; i < str.length; i++) {
|
| 72 |
-
const chrLower = lowercase.charAt(i);
|
| 73 |
-
const chrString = str.charAt(i);
|
| 74 |
-
if (chrLower !== chrString && i > 0) {
|
| 75 |
-
notCamelcase += `${joinString}${lowercase.charAt(i)}`;
|
| 76 |
-
}
|
| 77 |
-
else {
|
| 78 |
-
notCamelcase += chrString;
|
| 79 |
-
}
|
| 80 |
-
}
|
| 81 |
-
return notCamelcase;
|
| 82 |
-
}
|
| 83 |
-
function looksLikeNumber(x) {
|
| 84 |
-
if (x === null || x === undefined)
|
| 85 |
-
return false;
|
| 86 |
-
// if loaded from config, may already be a number.
|
| 87 |
-
if (typeof x === 'number')
|
| 88 |
-
return true;
|
| 89 |
-
// hexadecimal.
|
| 90 |
-
if (/^0x[0-9a-f]+$/i.test(x))
|
| 91 |
-
return true;
|
| 92 |
-
// don't treat 0123 as a number; as it drops the leading '0'.
|
| 93 |
-
if (/^0[^.]/.test(x))
|
| 94 |
-
return false;
|
| 95 |
-
return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
| 96 |
-
}
|
| 97 |
-
|
| 98 |
-
/**
|
| 99 |
-
* @license
|
| 100 |
-
* Copyright (c) 2016, Contributors
|
| 101 |
-
* SPDX-License-Identifier: ISC
|
| 102 |
-
*/
|
| 103 |
-
// take an un-split argv string and tokenize it.
|
| 104 |
-
function tokenizeArgString(argString) {
|
| 105 |
-
if (Array.isArray(argString)) {
|
| 106 |
-
return argString.map(e => typeof e !== 'string' ? e + '' : e);
|
| 107 |
-
}
|
| 108 |
-
argString = argString.trim();
|
| 109 |
-
let i = 0;
|
| 110 |
-
let prevC = null;
|
| 111 |
-
let c = null;
|
| 112 |
-
let opening = null;
|
| 113 |
-
const args = [];
|
| 114 |
-
for (let ii = 0; ii < argString.length; ii++) {
|
| 115 |
-
prevC = c;
|
| 116 |
-
c = argString.charAt(ii);
|
| 117 |
-
// split on spaces unless we're in quotes.
|
| 118 |
-
if (c === ' ' && !opening) {
|
| 119 |
-
if (!(prevC === ' ')) {
|
| 120 |
-
i++;
|
| 121 |
-
}
|
| 122 |
-
continue;
|
| 123 |
-
}
|
| 124 |
-
// don't split the string if we're in matching
|
| 125 |
-
// opening or closing single and double quotes.
|
| 126 |
-
if (c === opening) {
|
| 127 |
-
opening = null;
|
| 128 |
-
}
|
| 129 |
-
else if ((c === "'" || c === '"') && !opening) {
|
| 130 |
-
opening = c;
|
| 131 |
-
}
|
| 132 |
-
if (!args[i])
|
| 133 |
-
args[i] = '';
|
| 134 |
-
args[i] += c;
|
| 135 |
-
}
|
| 136 |
-
return args;
|
| 137 |
-
}
|
| 138 |
-
|
| 139 |
-
/**
|
| 140 |
-
* @license
|
| 141 |
-
* Copyright (c) 2016, Contributors
|
| 142 |
-
* SPDX-License-Identifier: ISC
|
| 143 |
-
*/
|
| 144 |
-
var DefaultValuesForTypeKey;
|
| 145 |
-
(function (DefaultValuesForTypeKey) {
|
| 146 |
-
DefaultValuesForTypeKey["BOOLEAN"] = "boolean";
|
| 147 |
-
DefaultValuesForTypeKey["STRING"] = "string";
|
| 148 |
-
DefaultValuesForTypeKey["NUMBER"] = "number";
|
| 149 |
-
DefaultValuesForTypeKey["ARRAY"] = "array";
|
| 150 |
-
})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {}));
|
| 151 |
-
|
| 152 |
-
/**
|
| 153 |
-
* @license
|
| 154 |
-
* Copyright (c) 2016, Contributors
|
| 155 |
-
* SPDX-License-Identifier: ISC
|
| 156 |
-
*/
|
| 157 |
-
let mixin;
|
| 158 |
-
class YargsParser {
|
| 159 |
-
constructor(_mixin) {
|
| 160 |
-
mixin = _mixin;
|
| 161 |
-
}
|
| 162 |
-
parse(argsInput, options) {
|
| 163 |
-
const opts = Object.assign({
|
| 164 |
-
alias: undefined,
|
| 165 |
-
array: undefined,
|
| 166 |
-
boolean: undefined,
|
| 167 |
-
config: undefined,
|
| 168 |
-
configObjects: undefined,
|
| 169 |
-
configuration: undefined,
|
| 170 |
-
coerce: undefined,
|
| 171 |
-
count: undefined,
|
| 172 |
-
default: undefined,
|
| 173 |
-
envPrefix: undefined,
|
| 174 |
-
narg: undefined,
|
| 175 |
-
normalize: undefined,
|
| 176 |
-
string: undefined,
|
| 177 |
-
number: undefined,
|
| 178 |
-
__: undefined,
|
| 179 |
-
key: undefined
|
| 180 |
-
}, options);
|
| 181 |
-
// allow a string argument to be passed in rather
|
| 182 |
-
// than an argv array.
|
| 183 |
-
const args = tokenizeArgString(argsInput);
|
| 184 |
-
// tokenizeArgString adds extra quotes to args if argsInput is a string
|
| 185 |
-
// only strip those extra quotes in processValue if argsInput is a string
|
| 186 |
-
const inputIsString = typeof argsInput === 'string';
|
| 187 |
-
// aliases might have transitive relationships, normalize this.
|
| 188 |
-
const aliases = combineAliases(Object.assign(Object.create(null), opts.alias));
|
| 189 |
-
const configuration = Object.assign({
|
| 190 |
-
'boolean-negation': true,
|
| 191 |
-
'camel-case-expansion': true,
|
| 192 |
-
'combine-arrays': false,
|
| 193 |
-
'dot-notation': true,
|
| 194 |
-
'duplicate-arguments-array': true,
|
| 195 |
-
'flatten-duplicate-arrays': true,
|
| 196 |
-
'greedy-arrays': true,
|
| 197 |
-
'halt-at-non-option': false,
|
| 198 |
-
'nargs-eats-options': false,
|
| 199 |
-
'negation-prefix': 'no-',
|
| 200 |
-
'parse-numbers': true,
|
| 201 |
-
'parse-positional-numbers': true,
|
| 202 |
-
'populate--': false,
|
| 203 |
-
'set-placeholder-key': false,
|
| 204 |
-
'short-option-groups': true,
|
| 205 |
-
'strip-aliased': false,
|
| 206 |
-
'strip-dashed': false,
|
| 207 |
-
'unknown-options-as-args': false
|
| 208 |
-
}, opts.configuration);
|
| 209 |
-
const defaults = Object.assign(Object.create(null), opts.default);
|
| 210 |
-
const configObjects = opts.configObjects || [];
|
| 211 |
-
const envPrefix = opts.envPrefix;
|
| 212 |
-
const notFlagsOption = configuration['populate--'];
|
| 213 |
-
const notFlagsArgv = notFlagsOption ? '--' : '_';
|
| 214 |
-
const newAliases = Object.create(null);
|
| 215 |
-
const defaulted = Object.create(null);
|
| 216 |
-
// allow a i18n handler to be passed in, default to a fake one (util.format).
|
| 217 |
-
const __ = opts.__ || mixin.format;
|
| 218 |
-
const flags = {
|
| 219 |
-
aliases: Object.create(null),
|
| 220 |
-
arrays: Object.create(null),
|
| 221 |
-
bools: Object.create(null),
|
| 222 |
-
strings: Object.create(null),
|
| 223 |
-
numbers: Object.create(null),
|
| 224 |
-
counts: Object.create(null),
|
| 225 |
-
normalize: Object.create(null),
|
| 226 |
-
configs: Object.create(null),
|
| 227 |
-
nargs: Object.create(null),
|
| 228 |
-
coercions: Object.create(null),
|
| 229 |
-
keys: []
|
| 230 |
-
};
|
| 231 |
-
const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
|
| 232 |
-
const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)');
|
| 233 |
-
[].concat(opts.array || []).filter(Boolean).forEach(function (opt) {
|
| 234 |
-
const key = typeof opt === 'object' ? opt.key : opt;
|
| 235 |
-
// assign to flags[bools|strings|numbers]
|
| 236 |
-
const assignment = Object.keys(opt).map(function (key) {
|
| 237 |
-
const arrayFlagKeys = {
|
| 238 |
-
boolean: 'bools',
|
| 239 |
-
string: 'strings',
|
| 240 |
-
number: 'numbers'
|
| 241 |
-
};
|
| 242 |
-
return arrayFlagKeys[key];
|
| 243 |
-
}).filter(Boolean).pop();
|
| 244 |
-
// assign key to be coerced
|
| 245 |
-
if (assignment) {
|
| 246 |
-
flags[assignment][key] = true;
|
| 247 |
-
}
|
| 248 |
-
flags.arrays[key] = true;
|
| 249 |
-
flags.keys.push(key);
|
| 250 |
-
});
|
| 251 |
-
[].concat(opts.boolean || []).filter(Boolean).forEach(function (key) {
|
| 252 |
-
flags.bools[key] = true;
|
| 253 |
-
flags.keys.push(key);
|
| 254 |
-
});
|
| 255 |
-
[].concat(opts.string || []).filter(Boolean).forEach(function (key) {
|
| 256 |
-
flags.strings[key] = true;
|
| 257 |
-
flags.keys.push(key);
|
| 258 |
-
});
|
| 259 |
-
[].concat(opts.number || []).filter(Boolean).forEach(function (key) {
|
| 260 |
-
flags.numbers[key] = true;
|
| 261 |
-
flags.keys.push(key);
|
| 262 |
-
});
|
| 263 |
-
[].concat(opts.count || []).filter(Boolean).forEach(function (key) {
|
| 264 |
-
flags.counts[key] = true;
|
| 265 |
-
flags.keys.push(key);
|
| 266 |
-
});
|
| 267 |
-
[].concat(opts.normalize || []).filter(Boolean).forEach(function (key) {
|
| 268 |
-
flags.normalize[key] = true;
|
| 269 |
-
flags.keys.push(key);
|
| 270 |
-
});
|
| 271 |
-
if (typeof opts.narg === 'object') {
|
| 272 |
-
Object.entries(opts.narg).forEach(([key, value]) => {
|
| 273 |
-
if (typeof value === 'number') {
|
| 274 |
-
flags.nargs[key] = value;
|
| 275 |
-
flags.keys.push(key);
|
| 276 |
-
}
|
| 277 |
-
});
|
| 278 |
-
}
|
| 279 |
-
if (typeof opts.coerce === 'object') {
|
| 280 |
-
Object.entries(opts.coerce).forEach(([key, value]) => {
|
| 281 |
-
if (typeof value === 'function') {
|
| 282 |
-
flags.coercions[key] = value;
|
| 283 |
-
flags.keys.push(key);
|
| 284 |
-
}
|
| 285 |
-
});
|
| 286 |
-
}
|
| 287 |
-
if (typeof opts.config !== 'undefined') {
|
| 288 |
-
if (Array.isArray(opts.config) || typeof opts.config === 'string') {
|
| 289 |
-
[].concat(opts.config).filter(Boolean).forEach(function (key) {
|
| 290 |
-
flags.configs[key] = true;
|
| 291 |
-
});
|
| 292 |
-
}
|
| 293 |
-
else if (typeof opts.config === 'object') {
|
| 294 |
-
Object.entries(opts.config).forEach(([key, value]) => {
|
| 295 |
-
if (typeof value === 'boolean' || typeof value === 'function') {
|
| 296 |
-
flags.configs[key] = value;
|
| 297 |
-
}
|
| 298 |
-
});
|
| 299 |
-
}
|
| 300 |
-
}
|
| 301 |
-
// create a lookup table that takes into account all
|
| 302 |
-
// combinations of aliases: {f: ['foo'], foo: ['f']}
|
| 303 |
-
extendAliases(opts.key, aliases, opts.default, flags.arrays);
|
| 304 |
-
// apply default values to all aliases.
|
| 305 |
-
Object.keys(defaults).forEach(function (key) {
|
| 306 |
-
(flags.aliases[key] || []).forEach(function (alias) {
|
| 307 |
-
defaults[alias] = defaults[key];
|
| 308 |
-
});
|
| 309 |
-
});
|
| 310 |
-
let error = null;
|
| 311 |
-
checkConfiguration();
|
| 312 |
-
let notFlags = [];
|
| 313 |
-
const argv = Object.assign(Object.create(null), { _: [] });
|
| 314 |
-
// TODO(bcoe): for the first pass at removing object prototype we didn't
|
| 315 |
-
// remove all prototypes from objects returned by this API, we might want
|
| 316 |
-
// to gradually move towards doing so.
|
| 317 |
-
const argvReturn = {};
|
| 318 |
-
for (let i = 0; i < args.length; i++) {
|
| 319 |
-
const arg = args[i];
|
| 320 |
-
const truncatedArg = arg.replace(/^-{3,}/, '---');
|
| 321 |
-
let broken;
|
| 322 |
-
let key;
|
| 323 |
-
let letters;
|
| 324 |
-
let m;
|
| 325 |
-
let next;
|
| 326 |
-
let value;
|
| 327 |
-
// any unknown option (except for end-of-options, "--")
|
| 328 |
-
if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) {
|
| 329 |
-
pushPositional(arg);
|
| 330 |
-
// ---, ---=, ----, etc,
|
| 331 |
-
}
|
| 332 |
-
else if (truncatedArg.match(/^---+(=|$)/)) {
|
| 333 |
-
// options without key name are invalid.
|
| 334 |
-
pushPositional(arg);
|
| 335 |
-
continue;
|
| 336 |
-
// -- separated by =
|
| 337 |
-
}
|
| 338 |
-
else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) {
|
| 339 |
-
// Using [\s\S] instead of . because js doesn't support the
|
| 340 |
-
// 'dotall' regex modifier. See:
|
| 341 |
-
// http://stackoverflow.com/a/1068308/13216
|
| 342 |
-
m = arg.match(/^--?([^=]+)=([\s\S]*)$/);
|
| 343 |
-
// arrays format = '--f=a b c'
|
| 344 |
-
if (m !== null && Array.isArray(m) && m.length >= 3) {
|
| 345 |
-
if (checkAllAliases(m[1], flags.arrays)) {
|
| 346 |
-
i = eatArray(i, m[1], args, m[2]);
|
| 347 |
-
}
|
| 348 |
-
else if (checkAllAliases(m[1], flags.nargs) !== false) {
|
| 349 |
-
// nargs format = '--f=monkey washing cat'
|
| 350 |
-
i = eatNargs(i, m[1], args, m[2]);
|
| 351 |
-
}
|
| 352 |
-
else {
|
| 353 |
-
setArg(m[1], m[2], true);
|
| 354 |
-
}
|
| 355 |
-
}
|
| 356 |
-
}
|
| 357 |
-
else if (arg.match(negatedBoolean) && configuration['boolean-negation']) {
|
| 358 |
-
m = arg.match(negatedBoolean);
|
| 359 |
-
if (m !== null && Array.isArray(m) && m.length >= 2) {
|
| 360 |
-
key = m[1];
|
| 361 |
-
setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false);
|
| 362 |
-
}
|
| 363 |
-
// -- separated by space.
|
| 364 |
-
}
|
| 365 |
-
else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) {
|
| 366 |
-
m = arg.match(/^--?(.+)/);
|
| 367 |
-
if (m !== null && Array.isArray(m) && m.length >= 2) {
|
| 368 |
-
key = m[1];
|
| 369 |
-
if (checkAllAliases(key, flags.arrays)) {
|
| 370 |
-
// array format = '--foo a b c'
|
| 371 |
-
i = eatArray(i, key, args);
|
| 372 |
-
}
|
| 373 |
-
else if (checkAllAliases(key, flags.nargs) !== false) {
|
| 374 |
-
// nargs format = '--foo a b c'
|
| 375 |
-
// should be truthy even if: flags.nargs[key] === 0
|
| 376 |
-
i = eatNargs(i, key, args);
|
| 377 |
-
}
|
| 378 |
-
else {
|
| 379 |
-
next = args[i + 1];
|
| 380 |
-
if (next !== undefined && (!next.match(/^-/) ||
|
| 381 |
-
next.match(negative)) &&
|
| 382 |
-
!checkAllAliases(key, flags.bools) &&
|
| 383 |
-
!checkAllAliases(key, flags.counts)) {
|
| 384 |
-
setArg(key, next);
|
| 385 |
-
i++;
|
| 386 |
-
}
|
| 387 |
-
else if (/^(true|false)$/.test(next)) {
|
| 388 |
-
setArg(key, next);
|
| 389 |
-
i++;
|
| 390 |
-
}
|
| 391 |
-
else {
|
| 392 |
-
setArg(key, defaultValue(key));
|
| 393 |
-
}
|
| 394 |
-
}
|
| 395 |
-
}
|
| 396 |
-
// dot-notation flag separated by '='.
|
| 397 |
-
}
|
| 398 |
-
else if (arg.match(/^-.\..+=/)) {
|
| 399 |
-
m = arg.match(/^-([^=]+)=([\s\S]*)$/);
|
| 400 |
-
if (m !== null && Array.isArray(m) && m.length >= 3) {
|
| 401 |
-
setArg(m[1], m[2]);
|
| 402 |
-
}
|
| 403 |
-
// dot-notation flag separated by space.
|
| 404 |
-
}
|
| 405 |
-
else if (arg.match(/^-.\..+/) && !arg.match(negative)) {
|
| 406 |
-
next = args[i + 1];
|
| 407 |
-
m = arg.match(/^-(.\..+)/);
|
| 408 |
-
if (m !== null && Array.isArray(m) && m.length >= 2) {
|
| 409 |
-
key = m[1];
|
| 410 |
-
if (next !== undefined && !next.match(/^-/) &&
|
| 411 |
-
!checkAllAliases(key, flags.bools) &&
|
| 412 |
-
!checkAllAliases(key, flags.counts)) {
|
| 413 |
-
setArg(key, next);
|
| 414 |
-
i++;
|
| 415 |
-
}
|
| 416 |
-
else {
|
| 417 |
-
setArg(key, defaultValue(key));
|
| 418 |
-
}
|
| 419 |
-
}
|
| 420 |
-
}
|
| 421 |
-
else if (arg.match(/^-[^-]+/) && !arg.match(negative)) {
|
| 422 |
-
letters = arg.slice(1, -1).split('');
|
| 423 |
-
broken = false;
|
| 424 |
-
for (let j = 0; j < letters.length; j++) {
|
| 425 |
-
next = arg.slice(j + 2);
|
| 426 |
-
if (letters[j + 1] && letters[j + 1] === '=') {
|
| 427 |
-
value = arg.slice(j + 3);
|
| 428 |
-
key = letters[j];
|
| 429 |
-
if (checkAllAliases(key, flags.arrays)) {
|
| 430 |
-
// array format = '-f=a b c'
|
| 431 |
-
i = eatArray(i, key, args, value);
|
| 432 |
-
}
|
| 433 |
-
else if (checkAllAliases(key, flags.nargs) !== false) {
|
| 434 |
-
// nargs format = '-f=monkey washing cat'
|
| 435 |
-
i = eatNargs(i, key, args, value);
|
| 436 |
-
}
|
| 437 |
-
else {
|
| 438 |
-
setArg(key, value);
|
| 439 |
-
}
|
| 440 |
-
broken = true;
|
| 441 |
-
break;
|
| 442 |
-
}
|
| 443 |
-
if (next === '-') {
|
| 444 |
-
setArg(letters[j], next);
|
| 445 |
-
continue;
|
| 446 |
-
}
|
| 447 |
-
// current letter is an alphabetic character and next value is a number
|
| 448 |
-
if (/[A-Za-z]/.test(letters[j]) &&
|
| 449 |
-
/^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) &&
|
| 450 |
-
checkAllAliases(next, flags.bools) === false) {
|
| 451 |
-
setArg(letters[j], next);
|
| 452 |
-
broken = true;
|
| 453 |
-
break;
|
| 454 |
-
}
|
| 455 |
-
if (letters[j + 1] && letters[j + 1].match(/\W/)) {
|
| 456 |
-
setArg(letters[j], next);
|
| 457 |
-
broken = true;
|
| 458 |
-
break;
|
| 459 |
-
}
|
| 460 |
-
else {
|
| 461 |
-
setArg(letters[j], defaultValue(letters[j]));
|
| 462 |
-
}
|
| 463 |
-
}
|
| 464 |
-
key = arg.slice(-1)[0];
|
| 465 |
-
if (!broken && key !== '-') {
|
| 466 |
-
if (checkAllAliases(key, flags.arrays)) {
|
| 467 |
-
// array format = '-f a b c'
|
| 468 |
-
i = eatArray(i, key, args);
|
| 469 |
-
}
|
| 470 |
-
else if (checkAllAliases(key, flags.nargs) !== false) {
|
| 471 |
-
// nargs format = '-f a b c'
|
| 472 |
-
// should be truthy even if: flags.nargs[key] === 0
|
| 473 |
-
i = eatNargs(i, key, args);
|
| 474 |
-
}
|
| 475 |
-
else {
|
| 476 |
-
next = args[i + 1];
|
| 477 |
-
if (next !== undefined && (!/^(-|--)[^-]/.test(next) ||
|
| 478 |
-
next.match(negative)) &&
|
| 479 |
-
!checkAllAliases(key, flags.bools) &&
|
| 480 |
-
!checkAllAliases(key, flags.counts)) {
|
| 481 |
-
setArg(key, next);
|
| 482 |
-
i++;
|
| 483 |
-
}
|
| 484 |
-
else if (/^(true|false)$/.test(next)) {
|
| 485 |
-
setArg(key, next);
|
| 486 |
-
i++;
|
| 487 |
-
}
|
| 488 |
-
else {
|
| 489 |
-
setArg(key, defaultValue(key));
|
| 490 |
-
}
|
| 491 |
-
}
|
| 492 |
-
}
|
| 493 |
-
}
|
| 494 |
-
else if (arg.match(/^-[0-9]$/) &&
|
| 495 |
-
arg.match(negative) &&
|
| 496 |
-
checkAllAliases(arg.slice(1), flags.bools)) {
|
| 497 |
-
// single-digit boolean alias, e.g: xargs -0
|
| 498 |
-
key = arg.slice(1);
|
| 499 |
-
setArg(key, defaultValue(key));
|
| 500 |
-
}
|
| 501 |
-
else if (arg === '--') {
|
| 502 |
-
notFlags = args.slice(i + 1);
|
| 503 |
-
break;
|
| 504 |
-
}
|
| 505 |
-
else if (configuration['halt-at-non-option']) {
|
| 506 |
-
notFlags = args.slice(i);
|
| 507 |
-
break;
|
| 508 |
-
}
|
| 509 |
-
else {
|
| 510 |
-
pushPositional(arg);
|
| 511 |
-
}
|
| 512 |
-
}
|
| 513 |
-
// order of precedence:
|
| 514 |
-
// 1. command line arg
|
| 515 |
-
// 2. value from env var
|
| 516 |
-
// 3. value from config file
|
| 517 |
-
// 4. value from config objects
|
| 518 |
-
// 5. configured default value
|
| 519 |
-
applyEnvVars(argv, true); // special case: check env vars that point to config file
|
| 520 |
-
applyEnvVars(argv, false);
|
| 521 |
-
setConfig(argv);
|
| 522 |
-
setConfigObjects();
|
| 523 |
-
applyDefaultsAndAliases(argv, flags.aliases, defaults, true);
|
| 524 |
-
applyCoercions(argv);
|
| 525 |
-
if (configuration['set-placeholder-key'])
|
| 526 |
-
setPlaceholderKeys(argv);
|
| 527 |
-
// for any counts either not in args or without an explicit default, set to 0
|
| 528 |
-
Object.keys(flags.counts).forEach(function (key) {
|
| 529 |
-
if (!hasKey(argv, key.split('.')))
|
| 530 |
-
setArg(key, 0);
|
| 531 |
-
});
|
| 532 |
-
// '--' defaults to undefined.
|
| 533 |
-
if (notFlagsOption && notFlags.length)
|
| 534 |
-
argv[notFlagsArgv] = [];
|
| 535 |
-
notFlags.forEach(function (key) {
|
| 536 |
-
argv[notFlagsArgv].push(key);
|
| 537 |
-
});
|
| 538 |
-
if (configuration['camel-case-expansion'] && configuration['strip-dashed']) {
|
| 539 |
-
Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => {
|
| 540 |
-
delete argv[key];
|
| 541 |
-
});
|
| 542 |
-
}
|
| 543 |
-
if (configuration['strip-aliased']) {
|
| 544 |
-
[].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => {
|
| 545 |
-
if (configuration['camel-case-expansion'] && alias.includes('-')) {
|
| 546 |
-
delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')];
|
| 547 |
-
}
|
| 548 |
-
delete argv[alias];
|
| 549 |
-
});
|
| 550 |
-
}
|
| 551 |
-
// Push argument into positional array, applying numeric coercion:
|
| 552 |
-
function pushPositional(arg) {
|
| 553 |
-
const maybeCoercedNumber = maybeCoerceNumber('_', arg);
|
| 554 |
-
if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') {
|
| 555 |
-
argv._.push(maybeCoercedNumber);
|
| 556 |
-
}
|
| 557 |
-
}
|
| 558 |
-
// how many arguments should we consume, based
|
| 559 |
-
// on the nargs option?
|
| 560 |
-
function eatNargs(i, key, args, argAfterEqualSign) {
|
| 561 |
-
let ii;
|
| 562 |
-
let toEat = checkAllAliases(key, flags.nargs);
|
| 563 |
-
// NaN has a special meaning for the array type, indicating that one or
|
| 564 |
-
// more values are expected.
|
| 565 |
-
toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat;
|
| 566 |
-
if (toEat === 0) {
|
| 567 |
-
if (!isUndefined(argAfterEqualSign)) {
|
| 568 |
-
error = Error(__('Argument unexpected for: %s', key));
|
| 569 |
-
}
|
| 570 |
-
setArg(key, defaultValue(key));
|
| 571 |
-
return i;
|
| 572 |
-
}
|
| 573 |
-
let available = isUndefined(argAfterEqualSign) ? 0 : 1;
|
| 574 |
-
if (configuration['nargs-eats-options']) {
|
| 575 |
-
// classic behavior, yargs eats positional and dash arguments.
|
| 576 |
-
if (args.length - (i + 1) + available < toEat) {
|
| 577 |
-
error = Error(__('Not enough arguments following: %s', key));
|
| 578 |
-
}
|
| 579 |
-
available = toEat;
|
| 580 |
-
}
|
| 581 |
-
else {
|
| 582 |
-
// nargs will not consume flag arguments, e.g., -abc, --foo,
|
| 583 |
-
// and terminates when one is observed.
|
| 584 |
-
for (ii = i + 1; ii < args.length; ii++) {
|
| 585 |
-
if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii]))
|
| 586 |
-
available++;
|
| 587 |
-
else
|
| 588 |
-
break;
|
| 589 |
-
}
|
| 590 |
-
if (available < toEat)
|
| 591 |
-
error = Error(__('Not enough arguments following: %s', key));
|
| 592 |
-
}
|
| 593 |
-
let consumed = Math.min(available, toEat);
|
| 594 |
-
if (!isUndefined(argAfterEqualSign) && consumed > 0) {
|
| 595 |
-
setArg(key, argAfterEqualSign);
|
| 596 |
-
consumed--;
|
| 597 |
-
}
|
| 598 |
-
for (ii = i + 1; ii < (consumed + i + 1); ii++) {
|
| 599 |
-
setArg(key, args[ii]);
|
| 600 |
-
}
|
| 601 |
-
return (i + consumed);
|
| 602 |
-
}
|
| 603 |
-
// if an option is an array, eat all non-hyphenated arguments
|
| 604 |
-
// following it... YUM!
|
| 605 |
-
// e.g., --foo apple banana cat becomes ["apple", "banana", "cat"]
|
| 606 |
-
function eatArray(i, key, args, argAfterEqualSign) {
|
| 607 |
-
let argsToSet = [];
|
| 608 |
-
let next = argAfterEqualSign || args[i + 1];
|
| 609 |
-
// If both array and nargs are configured, enforce the nargs count:
|
| 610 |
-
const nargsCount = checkAllAliases(key, flags.nargs);
|
| 611 |
-
if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) {
|
| 612 |
-
argsToSet.push(true);
|
| 613 |
-
}
|
| 614 |
-
else if (isUndefined(next) ||
|
| 615 |
-
(isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) {
|
| 616 |
-
// for keys without value ==> argsToSet remains an empty []
|
| 617 |
-
// set user default value, if available
|
| 618 |
-
if (defaults[key] !== undefined) {
|
| 619 |
-
const defVal = defaults[key];
|
| 620 |
-
argsToSet = Array.isArray(defVal) ? defVal : [defVal];
|
| 621 |
-
}
|
| 622 |
-
}
|
| 623 |
-
else {
|
| 624 |
-
// value in --option=value is eaten as is
|
| 625 |
-
if (!isUndefined(argAfterEqualSign)) {
|
| 626 |
-
argsToSet.push(processValue(key, argAfterEqualSign, true));
|
| 627 |
-
}
|
| 628 |
-
for (let ii = i + 1; ii < args.length; ii++) {
|
| 629 |
-
if ((!configuration['greedy-arrays'] && argsToSet.length > 0) ||
|
| 630 |
-
(nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount))
|
| 631 |
-
break;
|
| 632 |
-
next = args[ii];
|
| 633 |
-
if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))
|
| 634 |
-
break;
|
| 635 |
-
i = ii;
|
| 636 |
-
argsToSet.push(processValue(key, next, inputIsString));
|
| 637 |
-
}
|
| 638 |
-
}
|
| 639 |
-
// If both array and nargs are configured, create an error if less than
|
| 640 |
-
// nargs positionals were found. NaN has special meaning, indicating
|
| 641 |
-
// that at least one value is required (more are okay).
|
| 642 |
-
if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) ||
|
| 643 |
-
(isNaN(nargsCount) && argsToSet.length === 0))) {
|
| 644 |
-
error = Error(__('Not enough arguments following: %s', key));
|
| 645 |
-
}
|
| 646 |
-
setArg(key, argsToSet);
|
| 647 |
-
return i;
|
| 648 |
-
}
|
| 649 |
-
function setArg(key, val, shouldStripQuotes = inputIsString) {
|
| 650 |
-
if (/-/.test(key) && configuration['camel-case-expansion']) {
|
| 651 |
-
const alias = key.split('.').map(function (prop) {
|
| 652 |
-
return camelCase(prop);
|
| 653 |
-
}).join('.');
|
| 654 |
-
addNewAlias(key, alias);
|
| 655 |
-
}
|
| 656 |
-
const value = processValue(key, val, shouldStripQuotes);
|
| 657 |
-
const splitKey = key.split('.');
|
| 658 |
-
setKey(argv, splitKey, value);
|
| 659 |
-
// handle populating aliases of the full key
|
| 660 |
-
if (flags.aliases[key]) {
|
| 661 |
-
flags.aliases[key].forEach(function (x) {
|
| 662 |
-
const keyProperties = x.split('.');
|
| 663 |
-
setKey(argv, keyProperties, value);
|
| 664 |
-
});
|
| 665 |
-
}
|
| 666 |
-
// handle populating aliases of the first element of the dot-notation key
|
| 667 |
-
if (splitKey.length > 1 && configuration['dot-notation']) {
|
| 668 |
-
(flags.aliases[splitKey[0]] || []).forEach(function (x) {
|
| 669 |
-
let keyProperties = x.split('.');
|
| 670 |
-
// expand alias with nested objects in key
|
| 671 |
-
const a = [].concat(splitKey);
|
| 672 |
-
a.shift(); // nuke the old key.
|
| 673 |
-
keyProperties = keyProperties.concat(a);
|
| 674 |
-
// populate alias only if is not already an alias of the full key
|
| 675 |
-
// (already populated above)
|
| 676 |
-
if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) {
|
| 677 |
-
setKey(argv, keyProperties, value);
|
| 678 |
-
}
|
| 679 |
-
});
|
| 680 |
-
}
|
| 681 |
-
// Set normalize getter and setter when key is in 'normalize' but isn't an array
|
| 682 |
-
if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) {
|
| 683 |
-
const keys = [key].concat(flags.aliases[key] || []);
|
| 684 |
-
keys.forEach(function (key) {
|
| 685 |
-
Object.defineProperty(argvReturn, key, {
|
| 686 |
-
enumerable: true,
|
| 687 |
-
get() {
|
| 688 |
-
return val;
|
| 689 |
-
},
|
| 690 |
-
set(value) {
|
| 691 |
-
val = typeof value === 'string' ? mixin.normalize(value) : value;
|
| 692 |
-
}
|
| 693 |
-
});
|
| 694 |
-
});
|
| 695 |
-
}
|
| 696 |
-
}
|
| 697 |
-
function addNewAlias(key, alias) {
|
| 698 |
-
if (!(flags.aliases[key] && flags.aliases[key].length)) {
|
| 699 |
-
flags.aliases[key] = [alias];
|
| 700 |
-
newAliases[alias] = true;
|
| 701 |
-
}
|
| 702 |
-
if (!(flags.aliases[alias] && flags.aliases[alias].length)) {
|
| 703 |
-
addNewAlias(alias, key);
|
| 704 |
-
}
|
| 705 |
-
}
|
| 706 |
-
function processValue(key, val, shouldStripQuotes) {
|
| 707 |
-
// strings may be quoted, clean this up as we assign values.
|
| 708 |
-
if (shouldStripQuotes) {
|
| 709 |
-
val = stripQuotes(val);
|
| 710 |
-
}
|
| 711 |
-
// handle parsing boolean arguments --foo=true --bar false.
|
| 712 |
-
if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) {
|
| 713 |
-
if (typeof val === 'string')
|
| 714 |
-
val = val === 'true';
|
| 715 |
-
}
|
| 716 |
-
let value = Array.isArray(val)
|
| 717 |
-
? val.map(function (v) { return maybeCoerceNumber(key, v); })
|
| 718 |
-
: maybeCoerceNumber(key, val);
|
| 719 |
-
// increment a count given as arg (either no value or value parsed as boolean)
|
| 720 |
-
if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) {
|
| 721 |
-
value = increment();
|
| 722 |
-
}
|
| 723 |
-
// Set normalized value when key is in 'normalize' and in 'arrays'
|
| 724 |
-
if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) {
|
| 725 |
-
if (Array.isArray(val))
|
| 726 |
-
value = val.map((val) => { return mixin.normalize(val); });
|
| 727 |
-
else
|
| 728 |
-
value = mixin.normalize(val);
|
| 729 |
-
}
|
| 730 |
-
return value;
|
| 731 |
-
}
|
| 732 |
-
function maybeCoerceNumber(key, value) {
|
| 733 |
-
if (!configuration['parse-positional-numbers'] && key === '_')
|
| 734 |
-
return value;
|
| 735 |
-
if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) {
|
| 736 |
-
const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`))));
|
| 737 |
-
if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) {
|
| 738 |
-
value = Number(value);
|
| 739 |
-
}
|
| 740 |
-
}
|
| 741 |
-
return value;
|
| 742 |
-
}
|
| 743 |
-
// set args from config.json file, this should be
|
| 744 |
-
// applied last so that defaults can be applied.
|
| 745 |
-
function setConfig(argv) {
|
| 746 |
-
const configLookup = Object.create(null);
|
| 747 |
-
// expand defaults/aliases, in-case any happen to reference
|
| 748 |
-
// the config.json file.
|
| 749 |
-
applyDefaultsAndAliases(configLookup, flags.aliases, defaults);
|
| 750 |
-
Object.keys(flags.configs).forEach(function (configKey) {
|
| 751 |
-
const configPath = argv[configKey] || configLookup[configKey];
|
| 752 |
-
if (configPath) {
|
| 753 |
-
try {
|
| 754 |
-
let config = null;
|
| 755 |
-
const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath);
|
| 756 |
-
const resolveConfig = flags.configs[configKey];
|
| 757 |
-
if (typeof resolveConfig === 'function') {
|
| 758 |
-
try {
|
| 759 |
-
config = resolveConfig(resolvedConfigPath);
|
| 760 |
-
}
|
| 761 |
-
catch (e) {
|
| 762 |
-
config = e;
|
| 763 |
-
}
|
| 764 |
-
if (config instanceof Error) {
|
| 765 |
-
error = config;
|
| 766 |
-
return;
|
| 767 |
-
}
|
| 768 |
-
}
|
| 769 |
-
else {
|
| 770 |
-
config = mixin.require(resolvedConfigPath);
|
| 771 |
-
}
|
| 772 |
-
setConfigObject(config);
|
| 773 |
-
}
|
| 774 |
-
catch (ex) {
|
| 775 |
-
// Deno will receive a PermissionDenied error if an attempt is
|
| 776 |
-
// made to load config without the --allow-read flag:
|
| 777 |
-
if (ex.name === 'PermissionDenied')
|
| 778 |
-
error = ex;
|
| 779 |
-
else if (argv[configKey])
|
| 780 |
-
error = Error(__('Invalid JSON config file: %s', configPath));
|
| 781 |
-
}
|
| 782 |
-
}
|
| 783 |
-
});
|
| 784 |
-
}
|
| 785 |
-
// set args from config object.
|
| 786 |
-
// it recursively checks nested objects.
|
| 787 |
-
function setConfigObject(config, prev) {
|
| 788 |
-
Object.keys(config).forEach(function (key) {
|
| 789 |
-
const value = config[key];
|
| 790 |
-
const fullKey = prev ? prev + '.' + key : key;
|
| 791 |
-
// if the value is an inner object and we have dot-notation
|
| 792 |
-
// enabled, treat inner objects in config the same as
|
| 793 |
-
// heavily nested dot notations (foo.bar.apple).
|
| 794 |
-
if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) {
|
| 795 |
-
// if the value is an object but not an array, check nested object
|
| 796 |
-
setConfigObject(value, fullKey);
|
| 797 |
-
}
|
| 798 |
-
else {
|
| 799 |
-
// setting arguments via CLI takes precedence over
|
| 800 |
-
// values within the config file.
|
| 801 |
-
if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) {
|
| 802 |
-
setArg(fullKey, value);
|
| 803 |
-
}
|
| 804 |
-
}
|
| 805 |
-
});
|
| 806 |
-
}
|
| 807 |
-
// set all config objects passed in opts
|
| 808 |
-
function setConfigObjects() {
|
| 809 |
-
if (typeof configObjects !== 'undefined') {
|
| 810 |
-
configObjects.forEach(function (configObject) {
|
| 811 |
-
setConfigObject(configObject);
|
| 812 |
-
});
|
| 813 |
-
}
|
| 814 |
-
}
|
| 815 |
-
function applyEnvVars(argv, configOnly) {
|
| 816 |
-
if (typeof envPrefix === 'undefined')
|
| 817 |
-
return;
|
| 818 |
-
const prefix = typeof envPrefix === 'string' ? envPrefix : '';
|
| 819 |
-
const env = mixin.env();
|
| 820 |
-
Object.keys(env).forEach(function (envVar) {
|
| 821 |
-
if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) {
|
| 822 |
-
// get array of nested keys and convert them to camel case
|
| 823 |
-
const keys = envVar.split('__').map(function (key, i) {
|
| 824 |
-
if (i === 0) {
|
| 825 |
-
key = key.substring(prefix.length);
|
| 826 |
-
}
|
| 827 |
-
return camelCase(key);
|
| 828 |
-
});
|
| 829 |
-
if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) {
|
| 830 |
-
setArg(keys.join('.'), env[envVar]);
|
| 831 |
-
}
|
| 832 |
-
}
|
| 833 |
-
});
|
| 834 |
-
}
|
| 835 |
-
function applyCoercions(argv) {
|
| 836 |
-
let coerce;
|
| 837 |
-
const applied = new Set();
|
| 838 |
-
Object.keys(argv).forEach(function (key) {
|
| 839 |
-
if (!applied.has(key)) { // If we haven't already coerced this option via one of its aliases
|
| 840 |
-
coerce = checkAllAliases(key, flags.coercions);
|
| 841 |
-
if (typeof coerce === 'function') {
|
| 842 |
-
try {
|
| 843 |
-
const value = maybeCoerceNumber(key, coerce(argv[key]));
|
| 844 |
-
([].concat(flags.aliases[key] || [], key)).forEach(ali => {
|
| 845 |
-
applied.add(ali);
|
| 846 |
-
argv[ali] = value;
|
| 847 |
-
});
|
| 848 |
-
}
|
| 849 |
-
catch (err) {
|
| 850 |
-
error = err;
|
| 851 |
-
}
|
| 852 |
-
}
|
| 853 |
-
}
|
| 854 |
-
});
|
| 855 |
-
}
|
| 856 |
-
function setPlaceholderKeys(argv) {
|
| 857 |
-
flags.keys.forEach((key) => {
|
| 858 |
-
// don't set placeholder keys for dot notation options 'foo.bar'.
|
| 859 |
-
if (~key.indexOf('.'))
|
| 860 |
-
return;
|
| 861 |
-
if (typeof argv[key] === 'undefined')
|
| 862 |
-
argv[key] = undefined;
|
| 863 |
-
});
|
| 864 |
-
return argv;
|
| 865 |
-
}
|
| 866 |
-
function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) {
|
| 867 |
-
Object.keys(defaults).forEach(function (key) {
|
| 868 |
-
if (!hasKey(obj, key.split('.'))) {
|
| 869 |
-
setKey(obj, key.split('.'), defaults[key]);
|
| 870 |
-
if (canLog)
|
| 871 |
-
defaulted[key] = true;
|
| 872 |
-
(aliases[key] || []).forEach(function (x) {
|
| 873 |
-
if (hasKey(obj, x.split('.')))
|
| 874 |
-
return;
|
| 875 |
-
setKey(obj, x.split('.'), defaults[key]);
|
| 876 |
-
});
|
| 877 |
-
}
|
| 878 |
-
});
|
| 879 |
-
}
|
| 880 |
-
function hasKey(obj, keys) {
|
| 881 |
-
let o = obj;
|
| 882 |
-
if (!configuration['dot-notation'])
|
| 883 |
-
keys = [keys.join('.')];
|
| 884 |
-
keys.slice(0, -1).forEach(function (key) {
|
| 885 |
-
o = (o[key] || {});
|
| 886 |
-
});
|
| 887 |
-
const key = keys[keys.length - 1];
|
| 888 |
-
if (typeof o !== 'object')
|
| 889 |
-
return false;
|
| 890 |
-
else
|
| 891 |
-
return key in o;
|
| 892 |
-
}
|
| 893 |
-
function setKey(obj, keys, value) {
|
| 894 |
-
let o = obj;
|
| 895 |
-
if (!configuration['dot-notation'])
|
| 896 |
-
keys = [keys.join('.')];
|
| 897 |
-
keys.slice(0, -1).forEach(function (key) {
|
| 898 |
-
// TODO(bcoe): in the next major version of yargs, switch to
|
| 899 |
-
// Object.create(null) for dot notation:
|
| 900 |
-
key = sanitizeKey(key);
|
| 901 |
-
if (typeof o === 'object' && o[key] === undefined) {
|
| 902 |
-
o[key] = {};
|
| 903 |
-
}
|
| 904 |
-
if (typeof o[key] !== 'object' || Array.isArray(o[key])) {
|
| 905 |
-
// ensure that o[key] is an array, and that the last item is an empty object.
|
| 906 |
-
if (Array.isArray(o[key])) {
|
| 907 |
-
o[key].push({});
|
| 908 |
-
}
|
| 909 |
-
else {
|
| 910 |
-
o[key] = [o[key], {}];
|
| 911 |
-
}
|
| 912 |
-
// we want to update the empty object at the end of the o[key] array, so set o to that object
|
| 913 |
-
o = o[key][o[key].length - 1];
|
| 914 |
-
}
|
| 915 |
-
else {
|
| 916 |
-
o = o[key];
|
| 917 |
-
}
|
| 918 |
-
});
|
| 919 |
-
// TODO(bcoe): in the next major version of yargs, switch to
|
| 920 |
-
// Object.create(null) for dot notation:
|
| 921 |
-
const key = sanitizeKey(keys[keys.length - 1]);
|
| 922 |
-
const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays);
|
| 923 |
-
const isValueArray = Array.isArray(value);
|
| 924 |
-
let duplicate = configuration['duplicate-arguments-array'];
|
| 925 |
-
// nargs has higher priority than duplicate
|
| 926 |
-
if (!duplicate && checkAllAliases(key, flags.nargs)) {
|
| 927 |
-
duplicate = true;
|
| 928 |
-
if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) {
|
| 929 |
-
o[key] = undefined;
|
| 930 |
-
}
|
| 931 |
-
}
|
| 932 |
-
if (value === increment()) {
|
| 933 |
-
o[key] = increment(o[key]);
|
| 934 |
-
}
|
| 935 |
-
else if (Array.isArray(o[key])) {
|
| 936 |
-
if (duplicate && isTypeArray && isValueArray) {
|
| 937 |
-
o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]);
|
| 938 |
-
}
|
| 939 |
-
else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) {
|
| 940 |
-
o[key] = value;
|
| 941 |
-
}
|
| 942 |
-
else {
|
| 943 |
-
o[key] = o[key].concat([value]);
|
| 944 |
-
}
|
| 945 |
-
}
|
| 946 |
-
else if (o[key] === undefined && isTypeArray) {
|
| 947 |
-
o[key] = isValueArray ? value : [value];
|
| 948 |
-
}
|
| 949 |
-
else if (duplicate && !(o[key] === undefined ||
|
| 950 |
-
checkAllAliases(key, flags.counts) ||
|
| 951 |
-
checkAllAliases(key, flags.bools))) {
|
| 952 |
-
o[key] = [o[key], value];
|
| 953 |
-
}
|
| 954 |
-
else {
|
| 955 |
-
o[key] = value;
|
| 956 |
-
}
|
| 957 |
-
}
|
| 958 |
-
// extend the aliases list with inferred aliases.
|
| 959 |
-
function extendAliases(...args) {
|
| 960 |
-
args.forEach(function (obj) {
|
| 961 |
-
Object.keys(obj || {}).forEach(function (key) {
|
| 962 |
-
// short-circuit if we've already added a key
|
| 963 |
-
// to the aliases array, for example it might
|
| 964 |
-
// exist in both 'opts.default' and 'opts.key'.
|
| 965 |
-
if (flags.aliases[key])
|
| 966 |
-
return;
|
| 967 |
-
flags.aliases[key] = [].concat(aliases[key] || []);
|
| 968 |
-
// For "--option-name", also set argv.optionName
|
| 969 |
-
flags.aliases[key].concat(key).forEach(function (x) {
|
| 970 |
-
if (/-/.test(x) && configuration['camel-case-expansion']) {
|
| 971 |
-
const c = camelCase(x);
|
| 972 |
-
if (c !== key && flags.aliases[key].indexOf(c) === -1) {
|
| 973 |
-
flags.aliases[key].push(c);
|
| 974 |
-
newAliases[c] = true;
|
| 975 |
-
}
|
| 976 |
-
}
|
| 977 |
-
});
|
| 978 |
-
// For "--optionName", also set argv['option-name']
|
| 979 |
-
flags.aliases[key].concat(key).forEach(function (x) {
|
| 980 |
-
if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) {
|
| 981 |
-
const c = decamelize(x, '-');
|
| 982 |
-
if (c !== key && flags.aliases[key].indexOf(c) === -1) {
|
| 983 |
-
flags.aliases[key].push(c);
|
| 984 |
-
newAliases[c] = true;
|
| 985 |
-
}
|
| 986 |
-
}
|
| 987 |
-
});
|
| 988 |
-
flags.aliases[key].forEach(function (x) {
|
| 989 |
-
flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {
|
| 990 |
-
return x !== y;
|
| 991 |
-
}));
|
| 992 |
-
});
|
| 993 |
-
});
|
| 994 |
-
});
|
| 995 |
-
}
|
| 996 |
-
function checkAllAliases(key, flag) {
|
| 997 |
-
const toCheck = [].concat(flags.aliases[key] || [], key);
|
| 998 |
-
const keys = Object.keys(flag);
|
| 999 |
-
const setAlias = toCheck.find(key => keys.includes(key));
|
| 1000 |
-
return setAlias ? flag[setAlias] : false;
|
| 1001 |
-
}
|
| 1002 |
-
function hasAnyFlag(key) {
|
| 1003 |
-
const flagsKeys = Object.keys(flags);
|
| 1004 |
-
const toCheck = [].concat(flagsKeys.map(k => flags[k]));
|
| 1005 |
-
return toCheck.some(function (flag) {
|
| 1006 |
-
return Array.isArray(flag) ? flag.includes(key) : flag[key];
|
| 1007 |
-
});
|
| 1008 |
-
}
|
| 1009 |
-
function hasFlagsMatching(arg, ...patterns) {
|
| 1010 |
-
const toCheck = [].concat(...patterns);
|
| 1011 |
-
return toCheck.some(function (pattern) {
|
| 1012 |
-
const match = arg.match(pattern);
|
| 1013 |
-
return match && hasAnyFlag(match[1]);
|
| 1014 |
-
});
|
| 1015 |
-
}
|
| 1016 |
-
// based on a simplified version of the short flag group parsing logic
|
| 1017 |
-
function hasAllShortFlags(arg) {
|
| 1018 |
-
// if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group
|
| 1019 |
-
if (arg.match(negative) || !arg.match(/^-[^-]+/)) {
|
| 1020 |
-
return false;
|
| 1021 |
-
}
|
| 1022 |
-
let hasAllFlags = true;
|
| 1023 |
-
let next;
|
| 1024 |
-
const letters = arg.slice(1).split('');
|
| 1025 |
-
for (let j = 0; j < letters.length; j++) {
|
| 1026 |
-
next = arg.slice(j + 2);
|
| 1027 |
-
if (!hasAnyFlag(letters[j])) {
|
| 1028 |
-
hasAllFlags = false;
|
| 1029 |
-
break;
|
| 1030 |
-
}
|
| 1031 |
-
if ((letters[j + 1] && letters[j + 1] === '=') ||
|
| 1032 |
-
next === '-' ||
|
| 1033 |
-
(/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) ||
|
| 1034 |
-
(letters[j + 1] && letters[j + 1].match(/\W/))) {
|
| 1035 |
-
break;
|
| 1036 |
-
}
|
| 1037 |
-
}
|
| 1038 |
-
return hasAllFlags;
|
| 1039 |
-
}
|
| 1040 |
-
function isUnknownOptionAsArg(arg) {
|
| 1041 |
-
return configuration['unknown-options-as-args'] && isUnknownOption(arg);
|
| 1042 |
-
}
|
| 1043 |
-
function isUnknownOption(arg) {
|
| 1044 |
-
arg = arg.replace(/^-{3,}/, '--');
|
| 1045 |
-
// ignore negative numbers
|
| 1046 |
-
if (arg.match(negative)) {
|
| 1047 |
-
return false;
|
| 1048 |
-
}
|
| 1049 |
-
// if this is a short option group and all of them are configured, it isn't unknown
|
| 1050 |
-
if (hasAllShortFlags(arg)) {
|
| 1051 |
-
return false;
|
| 1052 |
-
}
|
| 1053 |
-
// e.g. '--count=2'
|
| 1054 |
-
const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/;
|
| 1055 |
-
// e.g. '-a' or '--arg'
|
| 1056 |
-
const normalFlag = /^-+([^=]+?)$/;
|
| 1057 |
-
// e.g. '-a-'
|
| 1058 |
-
const flagEndingInHyphen = /^-+([^=]+?)-$/;
|
| 1059 |
-
// e.g. '-abc123'
|
| 1060 |
-
const flagEndingInDigits = /^-+([^=]+?\d+)$/;
|
| 1061 |
-
// e.g. '-a/usr/local'
|
| 1062 |
-
const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/;
|
| 1063 |
-
// check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method
|
| 1064 |
-
return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters);
|
| 1065 |
-
}
|
| 1066 |
-
// make a best effort to pick a default value
|
| 1067 |
-
// for an option based on name and type.
|
| 1068 |
-
function defaultValue(key) {
|
| 1069 |
-
if (!checkAllAliases(key, flags.bools) &&
|
| 1070 |
-
!checkAllAliases(key, flags.counts) &&
|
| 1071 |
-
`${key}` in defaults) {
|
| 1072 |
-
return defaults[key];
|
| 1073 |
-
}
|
| 1074 |
-
else {
|
| 1075 |
-
return defaultForType(guessType(key));
|
| 1076 |
-
}
|
| 1077 |
-
}
|
| 1078 |
-
// return a default value, given the type of a flag.,
|
| 1079 |
-
function defaultForType(type) {
|
| 1080 |
-
const def = {
|
| 1081 |
-
[DefaultValuesForTypeKey.BOOLEAN]: true,
|
| 1082 |
-
[DefaultValuesForTypeKey.STRING]: '',
|
| 1083 |
-
[DefaultValuesForTypeKey.NUMBER]: undefined,
|
| 1084 |
-
[DefaultValuesForTypeKey.ARRAY]: []
|
| 1085 |
-
};
|
| 1086 |
-
return def[type];
|
| 1087 |
-
}
|
| 1088 |
-
// given a flag, enforce a default type.
|
| 1089 |
-
function guessType(key) {
|
| 1090 |
-
let type = DefaultValuesForTypeKey.BOOLEAN;
|
| 1091 |
-
if (checkAllAliases(key, flags.strings))
|
| 1092 |
-
type = DefaultValuesForTypeKey.STRING;
|
| 1093 |
-
else if (checkAllAliases(key, flags.numbers))
|
| 1094 |
-
type = DefaultValuesForTypeKey.NUMBER;
|
| 1095 |
-
else if (checkAllAliases(key, flags.bools))
|
| 1096 |
-
type = DefaultValuesForTypeKey.BOOLEAN;
|
| 1097 |
-
else if (checkAllAliases(key, flags.arrays))
|
| 1098 |
-
type = DefaultValuesForTypeKey.ARRAY;
|
| 1099 |
-
return type;
|
| 1100 |
-
}
|
| 1101 |
-
function isUndefined(num) {
|
| 1102 |
-
return num === undefined;
|
| 1103 |
-
}
|
| 1104 |
-
// check user configuration settings for inconsistencies
|
| 1105 |
-
function checkConfiguration() {
|
| 1106 |
-
// count keys should not be set as array/narg
|
| 1107 |
-
Object.keys(flags.counts).find(key => {
|
| 1108 |
-
if (checkAllAliases(key, flags.arrays)) {
|
| 1109 |
-
error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key));
|
| 1110 |
-
return true;
|
| 1111 |
-
}
|
| 1112 |
-
else if (checkAllAliases(key, flags.nargs)) {
|
| 1113 |
-
error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key));
|
| 1114 |
-
return true;
|
| 1115 |
-
}
|
| 1116 |
-
return false;
|
| 1117 |
-
});
|
| 1118 |
-
}
|
| 1119 |
-
return {
|
| 1120 |
-
aliases: Object.assign({}, flags.aliases),
|
| 1121 |
-
argv: Object.assign(argvReturn, argv),
|
| 1122 |
-
configuration: configuration,
|
| 1123 |
-
defaulted: Object.assign({}, defaulted),
|
| 1124 |
-
error: error,
|
| 1125 |
-
newAliases: Object.assign({}, newAliases)
|
| 1126 |
-
};
|
| 1127 |
-
}
|
| 1128 |
-
}
|
| 1129 |
-
// if any aliases reference each other, we should
|
| 1130 |
-
// merge them together.
|
| 1131 |
-
function combineAliases(aliases) {
|
| 1132 |
-
const aliasArrays = [];
|
| 1133 |
-
const combined = Object.create(null);
|
| 1134 |
-
let change = true;
|
| 1135 |
-
// turn alias lookup hash {key: ['alias1', 'alias2']} into
|
| 1136 |
-
// a simple array ['key', 'alias1', 'alias2']
|
| 1137 |
-
Object.keys(aliases).forEach(function (key) {
|
| 1138 |
-
aliasArrays.push([].concat(aliases[key], key));
|
| 1139 |
-
});
|
| 1140 |
-
// combine arrays until zero changes are
|
| 1141 |
-
// made in an iteration.
|
| 1142 |
-
while (change) {
|
| 1143 |
-
change = false;
|
| 1144 |
-
for (let i = 0; i < aliasArrays.length; i++) {
|
| 1145 |
-
for (let ii = i + 1; ii < aliasArrays.length; ii++) {
|
| 1146 |
-
const intersect = aliasArrays[i].filter(function (v) {
|
| 1147 |
-
return aliasArrays[ii].indexOf(v) !== -1;
|
| 1148 |
-
});
|
| 1149 |
-
if (intersect.length) {
|
| 1150 |
-
aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]);
|
| 1151 |
-
aliasArrays.splice(ii, 1);
|
| 1152 |
-
change = true;
|
| 1153 |
-
break;
|
| 1154 |
-
}
|
| 1155 |
-
}
|
| 1156 |
-
}
|
| 1157 |
-
}
|
| 1158 |
-
// map arrays back to the hash-lookup (de-dupe while
|
| 1159 |
-
// we're at it).
|
| 1160 |
-
aliasArrays.forEach(function (aliasArray) {
|
| 1161 |
-
aliasArray = aliasArray.filter(function (v, i, self) {
|
| 1162 |
-
return self.indexOf(v) === i;
|
| 1163 |
-
});
|
| 1164 |
-
const lastAlias = aliasArray.pop();
|
| 1165 |
-
if (lastAlias !== undefined && typeof lastAlias === 'string') {
|
| 1166 |
-
combined[lastAlias] = aliasArray;
|
| 1167 |
-
}
|
| 1168 |
-
});
|
| 1169 |
-
return combined;
|
| 1170 |
-
}
|
| 1171 |
-
// this function should only be called when a count is given as an arg
|
| 1172 |
-
// it is NOT called to set a default value
|
| 1173 |
-
// thus we can start the count at 1 instead of 0
|
| 1174 |
-
function increment(orig) {
|
| 1175 |
-
return orig !== undefined ? orig + 1 : 1;
|
| 1176 |
-
}
|
| 1177 |
-
// TODO(bcoe): in the next major version of yargs, switch to
|
| 1178 |
-
// Object.create(null) for dot notation:
|
| 1179 |
-
function sanitizeKey(key) {
|
| 1180 |
-
if (key === '__proto__')
|
| 1181 |
-
return '___proto___';
|
| 1182 |
-
return key;
|
| 1183 |
-
}
|
| 1184 |
-
function stripQuotes(val) {
|
| 1185 |
-
return (typeof val === 'string' &&
|
| 1186 |
-
(val[0] === "'" || val[0] === '"') &&
|
| 1187 |
-
val[val.length - 1] === val[0])
|
| 1188 |
-
? val.substring(1, val.length - 1)
|
| 1189 |
-
: val;
|
| 1190 |
-
}
|
| 1191 |
-
|
| 1192 |
-
/**
|
| 1193 |
-
* @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
|
| 1194 |
-
* CJS and ESM environments.
|
| 1195 |
-
*
|
| 1196 |
-
* @license
|
| 1197 |
-
* Copyright (c) 2016, Contributors
|
| 1198 |
-
* SPDX-License-Identifier: ISC
|
| 1199 |
-
*/
|
| 1200 |
-
var _a, _b, _c;
|
| 1201 |
-
// See https://github.com/yargs/yargs-parser#supported-nodejs-versions for our
|
| 1202 |
-
// version support policy. The YARGS_MIN_NODE_VERSION is used for testing only.
|
| 1203 |
-
const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION)
|
| 1204 |
-
? Number(process.env.YARGS_MIN_NODE_VERSION)
|
| 1205 |
-
: 12;
|
| 1206 |
-
const nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1);
|
| 1207 |
-
if (nodeVersion) {
|
| 1208 |
-
const major = Number(nodeVersion.match(/^([^.]+)/)[1]);
|
| 1209 |
-
if (major < minNodeVersion) {
|
| 1210 |
-
throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
|
| 1211 |
-
}
|
| 1212 |
-
}
|
| 1213 |
-
// Creates a yargs-parser instance using Node.js standard libraries:
|
| 1214 |
-
const env = process ? process.env : {};
|
| 1215 |
-
const parser = new YargsParser({
|
| 1216 |
-
cwd: process.cwd,
|
| 1217 |
-
env: () => {
|
| 1218 |
-
return env;
|
| 1219 |
-
},
|
| 1220 |
-
format: require$$2.format,
|
| 1221 |
-
normalize: require$$0.normalize,
|
| 1222 |
-
resolve: require$$0.resolve,
|
| 1223 |
-
// TODO: figure out a way to combine ESM and CJS coverage, such that
|
| 1224 |
-
// we can exercise all the lines below:
|
| 1225 |
-
require: (path) => {
|
| 1226 |
-
if (typeof require !== 'undefined') {
|
| 1227 |
-
return require(path);
|
| 1228 |
-
}
|
| 1229 |
-
else if (path.match(/\.json$/)) {
|
| 1230 |
-
// Addresses: https://github.com/yargs/yargs/issues/2040
|
| 1231 |
-
return JSON.parse(require$$0$1.readFileSync(path, 'utf8'));
|
| 1232 |
-
}
|
| 1233 |
-
else {
|
| 1234 |
-
throw Error('only .json config files are supported in ESM');
|
| 1235 |
-
}
|
| 1236 |
-
}
|
| 1237 |
-
});
|
| 1238 |
-
const yargsParser = function Parser(args, opts) {
|
| 1239 |
-
const result = parser.parse(args.slice(), opts);
|
| 1240 |
-
return result.argv;
|
| 1241 |
-
};
|
| 1242 |
-
yargsParser.detailed = function (args, opts) {
|
| 1243 |
-
return parser.parse(args.slice(), opts);
|
| 1244 |
-
};
|
| 1245 |
-
yargsParser.camelCase = camelCase;
|
| 1246 |
-
yargsParser.decamelize = decamelize;
|
| 1247 |
-
yargsParser.looksLikeNumber = looksLikeNumber;
|
| 1248 |
-
|
| 1249 |
-
/******************************************************************************
|
| 1250 |
-
Copyright (c) Microsoft Corporation.
|
| 1251 |
-
|
| 1252 |
-
Permission to use, copy, modify, and/or distribute this software for any
|
| 1253 |
-
purpose with or without fee is hereby granted.
|
| 1254 |
-
|
| 1255 |
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
| 1256 |
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
| 1257 |
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
| 1258 |
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
| 1259 |
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
| 1260 |
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
| 1261 |
-
PERFORMANCE OF THIS SOFTWARE.
|
| 1262 |
-
***************************************************************************** */
|
| 1263 |
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
| 1264 |
-
|
| 1265 |
-
|
| 1266 |
-
function __addDisposableResource(env, value, async) {
|
| 1267 |
-
if (value !== null && value !== void 0) {
|
| 1268 |
-
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
| 1269 |
-
var dispose, inner;
|
| 1270 |
-
if (async) {
|
| 1271 |
-
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
| 1272 |
-
dispose = value[Symbol.asyncDispose];
|
| 1273 |
-
}
|
| 1274 |
-
if (dispose === void 0) {
|
| 1275 |
-
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
| 1276 |
-
dispose = value[Symbol.dispose];
|
| 1277 |
-
if (async) inner = dispose;
|
| 1278 |
-
}
|
| 1279 |
-
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
| 1280 |
-
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
| 1281 |
-
env.stack.push({ value: value, dispose: dispose, async: async });
|
| 1282 |
-
}
|
| 1283 |
-
else if (async) {
|
| 1284 |
-
env.stack.push({ async: true });
|
| 1285 |
-
}
|
| 1286 |
-
return value;
|
| 1287 |
-
|
| 1288 |
-
}
|
| 1289 |
-
|
| 1290 |
-
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
| 1291 |
-
var e = new Error(message);
|
| 1292 |
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
| 1293 |
-
};
|
| 1294 |
-
|
| 1295 |
-
function __disposeResources(env) {
|
| 1296 |
-
function fail(e) {
|
| 1297 |
-
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
| 1298 |
-
env.hasError = true;
|
| 1299 |
-
}
|
| 1300 |
-
var r, s = 0;
|
| 1301 |
-
function next() {
|
| 1302 |
-
while (r = env.stack.pop()) {
|
| 1303 |
-
try {
|
| 1304 |
-
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
| 1305 |
-
if (r.dispose) {
|
| 1306 |
-
var result = r.dispose.call(r.value);
|
| 1307 |
-
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
| 1308 |
-
}
|
| 1309 |
-
else s |= 1;
|
| 1310 |
-
}
|
| 1311 |
-
catch (e) {
|
| 1312 |
-
fail(e);
|
| 1313 |
-
}
|
| 1314 |
-
}
|
| 1315 |
-
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
| 1316 |
-
if (env.hasError) throw env.error;
|
| 1317 |
-
}
|
| 1318 |
-
return next();
|
| 1319 |
-
}
|
| 1320 |
-
|
| 1321 |
-
const toZeroIfInfinity = value => Number.isFinite(value) ? value : 0;
|
| 1322 |
-
|
| 1323 |
-
function parseNumber(milliseconds) {
|
| 1324 |
-
return {
|
| 1325 |
-
days: Math.trunc(milliseconds / 86_400_000),
|
| 1326 |
-
hours: Math.trunc(milliseconds / 3_600_000 % 24),
|
| 1327 |
-
minutes: Math.trunc(milliseconds / 60_000 % 60),
|
| 1328 |
-
seconds: Math.trunc(milliseconds / 1000 % 60),
|
| 1329 |
-
milliseconds: Math.trunc(milliseconds % 1000),
|
| 1330 |
-
microseconds: Math.trunc(toZeroIfInfinity(milliseconds * 1000) % 1000),
|
| 1331 |
-
nanoseconds: Math.trunc(toZeroIfInfinity(milliseconds * 1e6) % 1000),
|
| 1332 |
-
};
|
| 1333 |
-
}
|
| 1334 |
-
|
| 1335 |
-
function parseBigint(milliseconds) {
|
| 1336 |
-
return {
|
| 1337 |
-
days: milliseconds / 86_400_000n,
|
| 1338 |
-
hours: milliseconds / 3_600_000n % 24n,
|
| 1339 |
-
minutes: milliseconds / 60_000n % 60n,
|
| 1340 |
-
seconds: milliseconds / 1000n % 60n,
|
| 1341 |
-
milliseconds: milliseconds % 1000n,
|
| 1342 |
-
microseconds: 0n,
|
| 1343 |
-
nanoseconds: 0n,
|
| 1344 |
-
};
|
| 1345 |
-
}
|
| 1346 |
-
|
| 1347 |
-
function parseMilliseconds(milliseconds) {
|
| 1348 |
-
switch (typeof milliseconds) {
|
| 1349 |
-
case 'number': {
|
| 1350 |
-
if (Number.isFinite(milliseconds)) {
|
| 1351 |
-
return parseNumber(milliseconds);
|
| 1352 |
-
}
|
| 1353 |
-
|
| 1354 |
-
break;
|
| 1355 |
-
}
|
| 1356 |
-
|
| 1357 |
-
case 'bigint': {
|
| 1358 |
-
return parseBigint(milliseconds);
|
| 1359 |
-
}
|
| 1360 |
-
|
| 1361 |
-
// No default
|
| 1362 |
-
}
|
| 1363 |
-
|
| 1364 |
-
throw new TypeError('Expected a finite number or bigint');
|
| 1365 |
-
}
|
| 1366 |
-
|
| 1367 |
-
const isZero = value => value === 0 || value === 0n;
|
| 1368 |
-
const pluralize = (word, count) => (count === 1 || count === 1n) ? word : `${word}s`;
|
| 1369 |
-
|
| 1370 |
-
const SECOND_ROUNDING_EPSILON = 0.000_000_1;
|
| 1371 |
-
const ONE_DAY_IN_MILLISECONDS = 24n * 60n * 60n * 1000n;
|
| 1372 |
-
|
| 1373 |
-
function prettyMilliseconds(milliseconds, options) {
|
| 1374 |
-
const isBigInt = typeof milliseconds === 'bigint';
|
| 1375 |
-
if (!isBigInt && !Number.isFinite(milliseconds)) {
|
| 1376 |
-
throw new TypeError('Expected a finite number or bigint');
|
| 1377 |
-
}
|
| 1378 |
-
|
| 1379 |
-
options = {...options};
|
| 1380 |
-
|
| 1381 |
-
const sign = milliseconds < 0 ? '-' : '';
|
| 1382 |
-
milliseconds = milliseconds < 0 ? -milliseconds : milliseconds; // Cannot use `Math.abs()` because of BigInt support.
|
| 1383 |
-
|
| 1384 |
-
if (options.colonNotation) {
|
| 1385 |
-
options.compact = false;
|
| 1386 |
-
options.formatSubMilliseconds = false;
|
| 1387 |
-
options.separateMilliseconds = false;
|
| 1388 |
-
options.verbose = false;
|
| 1389 |
-
}
|
| 1390 |
-
|
| 1391 |
-
if (options.compact) {
|
| 1392 |
-
options.unitCount = 1;
|
| 1393 |
-
options.secondsDecimalDigits = 0;
|
| 1394 |
-
options.millisecondsDecimalDigits = 0;
|
| 1395 |
-
}
|
| 1396 |
-
|
| 1397 |
-
let result = [];
|
| 1398 |
-
|
| 1399 |
-
const floorDecimals = (value, decimalDigits) => {
|
| 1400 |
-
const flooredInterimValue = Math.floor((value * (10 ** decimalDigits)) + SECOND_ROUNDING_EPSILON);
|
| 1401 |
-
const flooredValue = Math.round(flooredInterimValue) / (10 ** decimalDigits);
|
| 1402 |
-
return flooredValue.toFixed(decimalDigits);
|
| 1403 |
-
};
|
| 1404 |
-
|
| 1405 |
-
const add = (value, long, short, valueString) => {
|
| 1406 |
-
if (
|
| 1407 |
-
(result.length === 0 || !options.colonNotation)
|
| 1408 |
-
&& isZero(value)
|
| 1409 |
-
&& !(options.colonNotation && short === 'm')) {
|
| 1410 |
-
return;
|
| 1411 |
-
}
|
| 1412 |
-
|
| 1413 |
-
valueString ??= String(value);
|
| 1414 |
-
if (options.colonNotation) {
|
| 1415 |
-
const wholeDigits = valueString.includes('.') ? valueString.split('.')[0].length : valueString.length;
|
| 1416 |
-
const minLength = result.length > 0 ? 2 : 1;
|
| 1417 |
-
valueString = '0'.repeat(Math.max(0, minLength - wholeDigits)) + valueString;
|
| 1418 |
-
} else {
|
| 1419 |
-
valueString += options.verbose ? ' ' + pluralize(long, value) : short;
|
| 1420 |
-
}
|
| 1421 |
-
|
| 1422 |
-
result.push(valueString);
|
| 1423 |
-
};
|
| 1424 |
-
|
| 1425 |
-
const parsed = parseMilliseconds(milliseconds);
|
| 1426 |
-
const days = BigInt(parsed.days);
|
| 1427 |
-
|
| 1428 |
-
if (options.hideYearAndDays) {
|
| 1429 |
-
add((BigInt(days) * 24n) + BigInt(parsed.hours), 'hour', 'h');
|
| 1430 |
-
} else {
|
| 1431 |
-
if (options.hideYear) {
|
| 1432 |
-
add(days, 'day', 'd');
|
| 1433 |
-
} else {
|
| 1434 |
-
add(days / 365n, 'year', 'y');
|
| 1435 |
-
add(days % 365n, 'day', 'd');
|
| 1436 |
-
}
|
| 1437 |
-
|
| 1438 |
-
add(Number(parsed.hours), 'hour', 'h');
|
| 1439 |
-
}
|
| 1440 |
-
|
| 1441 |
-
add(Number(parsed.minutes), 'minute', 'm');
|
| 1442 |
-
|
| 1443 |
-
if (!options.hideSeconds) {
|
| 1444 |
-
if (
|
| 1445 |
-
options.separateMilliseconds
|
| 1446 |
-
|| options.formatSubMilliseconds
|
| 1447 |
-
|| (!options.colonNotation && milliseconds < 1000 && !options.subSecondsAsDecimals)
|
| 1448 |
-
) {
|
| 1449 |
-
const seconds = Number(parsed.seconds);
|
| 1450 |
-
const milliseconds = Number(parsed.milliseconds);
|
| 1451 |
-
const microseconds = Number(parsed.microseconds);
|
| 1452 |
-
const nanoseconds = Number(parsed.nanoseconds);
|
| 1453 |
-
|
| 1454 |
-
add(seconds, 'second', 's');
|
| 1455 |
-
|
| 1456 |
-
if (options.formatSubMilliseconds) {
|
| 1457 |
-
add(milliseconds, 'millisecond', 'ms');
|
| 1458 |
-
add(microseconds, 'microsecond', 'µs');
|
| 1459 |
-
add(nanoseconds, 'nanosecond', 'ns');
|
| 1460 |
-
} else {
|
| 1461 |
-
const millisecondsAndBelow
|
| 1462 |
-
= milliseconds
|
| 1463 |
-
+ (microseconds / 1000)
|
| 1464 |
-
+ (nanoseconds / 1e6);
|
| 1465 |
-
|
| 1466 |
-
const millisecondsDecimalDigits
|
| 1467 |
-
= typeof options.millisecondsDecimalDigits === 'number'
|
| 1468 |
-
? options.millisecondsDecimalDigits
|
| 1469 |
-
: 0;
|
| 1470 |
-
|
| 1471 |
-
const roundedMilliseconds = millisecondsAndBelow >= 1
|
| 1472 |
-
? Math.round(millisecondsAndBelow)
|
| 1473 |
-
: Math.ceil(millisecondsAndBelow);
|
| 1474 |
-
|
| 1475 |
-
const millisecondsString = millisecondsDecimalDigits
|
| 1476 |
-
? millisecondsAndBelow.toFixed(millisecondsDecimalDigits)
|
| 1477 |
-
: roundedMilliseconds;
|
| 1478 |
-
|
| 1479 |
-
add(
|
| 1480 |
-
Number.parseFloat(millisecondsString),
|
| 1481 |
-
'millisecond',
|
| 1482 |
-
'ms',
|
| 1483 |
-
millisecondsString,
|
| 1484 |
-
);
|
| 1485 |
-
}
|
| 1486 |
-
} else {
|
| 1487 |
-
const seconds = (
|
| 1488 |
-
(isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds)
|
| 1489 |
-
/ 1000
|
| 1490 |
-
) % 60;
|
| 1491 |
-
const secondsDecimalDigits
|
| 1492 |
-
= typeof options.secondsDecimalDigits === 'number'
|
| 1493 |
-
? options.secondsDecimalDigits
|
| 1494 |
-
: 1;
|
| 1495 |
-
const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);
|
| 1496 |
-
const secondsString = options.keepDecimalsOnWholeSeconds
|
| 1497 |
-
? secondsFixed
|
| 1498 |
-
: secondsFixed.replace(/\.0+$/, '');
|
| 1499 |
-
add(Number.parseFloat(secondsString), 'second', 's', secondsString);
|
| 1500 |
-
}
|
| 1501 |
-
}
|
| 1502 |
-
|
| 1503 |
-
if (result.length === 0) {
|
| 1504 |
-
return sign + '0' + (options.verbose ? ' milliseconds' : 'ms');
|
| 1505 |
-
}
|
| 1506 |
-
|
| 1507 |
-
const separator = options.colonNotation ? ':' : ' ';
|
| 1508 |
-
if (typeof options.unitCount === 'number') {
|
| 1509 |
-
result = result.slice(0, Math.max(options.unitCount, 1));
|
| 1510 |
-
}
|
| 1511 |
-
|
| 1512 |
-
return sign + result.join(separator);
|
| 1513 |
-
}
|
| 1514 |
-
|
| 1515 |
-
const BYTE_UNITS = [
|
| 1516 |
-
'B',
|
| 1517 |
-
'kB',
|
| 1518 |
-
'MB',
|
| 1519 |
-
'GB',
|
| 1520 |
-
'TB',
|
| 1521 |
-
'PB',
|
| 1522 |
-
'EB',
|
| 1523 |
-
'ZB',
|
| 1524 |
-
'YB',
|
| 1525 |
-
];
|
| 1526 |
-
|
| 1527 |
-
const BIBYTE_UNITS = [
|
| 1528 |
-
'B',
|
| 1529 |
-
'KiB',
|
| 1530 |
-
'MiB',
|
| 1531 |
-
'GiB',
|
| 1532 |
-
'TiB',
|
| 1533 |
-
'PiB',
|
| 1534 |
-
'EiB',
|
| 1535 |
-
'ZiB',
|
| 1536 |
-
'YiB',
|
| 1537 |
-
];
|
| 1538 |
-
|
| 1539 |
-
const BIT_UNITS = [
|
| 1540 |
-
'b',
|
| 1541 |
-
'kbit',
|
| 1542 |
-
'Mbit',
|
| 1543 |
-
'Gbit',
|
| 1544 |
-
'Tbit',
|
| 1545 |
-
'Pbit',
|
| 1546 |
-
'Ebit',
|
| 1547 |
-
'Zbit',
|
| 1548 |
-
'Ybit',
|
| 1549 |
-
];
|
| 1550 |
-
|
| 1551 |
-
const BIBIT_UNITS = [
|
| 1552 |
-
'b',
|
| 1553 |
-
'kibit',
|
| 1554 |
-
'Mibit',
|
| 1555 |
-
'Gibit',
|
| 1556 |
-
'Tibit',
|
| 1557 |
-
'Pibit',
|
| 1558 |
-
'Eibit',
|
| 1559 |
-
'Zibit',
|
| 1560 |
-
'Yibit',
|
| 1561 |
-
];
|
| 1562 |
-
|
| 1563 |
-
/*
|
| 1564 |
-
Formats the given number using `Number#toLocaleString`.
|
| 1565 |
-
- If locale is a string, the value is expected to be a locale-key (for example: `de`).
|
| 1566 |
-
- If locale is true, the system default locale is used for translation.
|
| 1567 |
-
- If no value for locale is specified, the number is returned unmodified.
|
| 1568 |
-
*/
|
| 1569 |
-
const toLocaleString = (number, locale, options) => {
|
| 1570 |
-
let result = number;
|
| 1571 |
-
if (typeof locale === 'string' || Array.isArray(locale)) {
|
| 1572 |
-
result = number.toLocaleString(locale, options);
|
| 1573 |
-
} else if (locale === true || options !== undefined) {
|
| 1574 |
-
result = number.toLocaleString(undefined, options);
|
| 1575 |
-
}
|
| 1576 |
-
|
| 1577 |
-
return result;
|
| 1578 |
-
};
|
| 1579 |
-
|
| 1580 |
-
const log10 = numberOrBigInt => {
|
| 1581 |
-
if (typeof numberOrBigInt === 'number') {
|
| 1582 |
-
return Math.log10(numberOrBigInt);
|
| 1583 |
-
}
|
| 1584 |
-
|
| 1585 |
-
const string = numberOrBigInt.toString(10);
|
| 1586 |
-
|
| 1587 |
-
return string.length + Math.log10(`0.${string.slice(0, 15)}`);
|
| 1588 |
-
};
|
| 1589 |
-
|
| 1590 |
-
const log = numberOrBigInt => {
|
| 1591 |
-
if (typeof numberOrBigInt === 'number') {
|
| 1592 |
-
return Math.log(numberOrBigInt);
|
| 1593 |
-
}
|
| 1594 |
-
|
| 1595 |
-
return log10(numberOrBigInt) * Math.log(10);
|
| 1596 |
-
};
|
| 1597 |
-
|
| 1598 |
-
const divide = (numberOrBigInt, divisor) => {
|
| 1599 |
-
if (typeof numberOrBigInt === 'number') {
|
| 1600 |
-
return numberOrBigInt / divisor;
|
| 1601 |
-
}
|
| 1602 |
-
|
| 1603 |
-
const integerPart = numberOrBigInt / BigInt(divisor);
|
| 1604 |
-
const remainder = numberOrBigInt % BigInt(divisor);
|
| 1605 |
-
return Number(integerPart) + (Number(remainder) / divisor);
|
| 1606 |
-
};
|
| 1607 |
-
|
| 1608 |
-
const applyFixedWidth = (result, fixedWidth) => {
|
| 1609 |
-
if (fixedWidth === undefined) {
|
| 1610 |
-
return result;
|
| 1611 |
-
}
|
| 1612 |
-
|
| 1613 |
-
if (typeof fixedWidth !== 'number' || !Number.isSafeInteger(fixedWidth) || fixedWidth < 0) {
|
| 1614 |
-
throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof fixedWidth}: ${fixedWidth}`);
|
| 1615 |
-
}
|
| 1616 |
-
|
| 1617 |
-
if (fixedWidth === 0) {
|
| 1618 |
-
return result;
|
| 1619 |
-
}
|
| 1620 |
-
|
| 1621 |
-
return result.length < fixedWidth ? result.padStart(fixedWidth, ' ') : result;
|
| 1622 |
-
};
|
| 1623 |
-
|
| 1624 |
-
const buildLocaleOptions = options => {
|
| 1625 |
-
const {minimumFractionDigits, maximumFractionDigits} = options;
|
| 1626 |
-
|
| 1627 |
-
if (minimumFractionDigits === undefined && maximumFractionDigits === undefined) {
|
| 1628 |
-
return undefined;
|
| 1629 |
-
}
|
| 1630 |
-
|
| 1631 |
-
return {
|
| 1632 |
-
...(minimumFractionDigits !== undefined && {minimumFractionDigits}),
|
| 1633 |
-
...(maximumFractionDigits !== undefined && {maximumFractionDigits}),
|
| 1634 |
-
roundingMode: 'trunc',
|
| 1635 |
-
};
|
| 1636 |
-
};
|
| 1637 |
-
|
| 1638 |
-
function prettyBytes(number, options) {
|
| 1639 |
-
if (typeof number !== 'bigint' && !Number.isFinite(number)) {
|
| 1640 |
-
throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
|
| 1641 |
-
}
|
| 1642 |
-
|
| 1643 |
-
options = {
|
| 1644 |
-
bits: false,
|
| 1645 |
-
binary: false,
|
| 1646 |
-
space: true,
|
| 1647 |
-
nonBreakingSpace: false,
|
| 1648 |
-
...options,
|
| 1649 |
-
};
|
| 1650 |
-
|
| 1651 |
-
const UNITS = options.bits
|
| 1652 |
-
? (options.binary ? BIBIT_UNITS : BIT_UNITS)
|
| 1653 |
-
: (options.binary ? BIBYTE_UNITS : BYTE_UNITS);
|
| 1654 |
-
|
| 1655 |
-
const separator = options.space ? (options.nonBreakingSpace ? '\u00A0' : ' ') : '';
|
| 1656 |
-
|
| 1657 |
-
// Handle signed zero case
|
| 1658 |
-
const isZero = typeof number === 'number' ? number === 0 : number === 0n;
|
| 1659 |
-
if (options.signed && isZero) {
|
| 1660 |
-
const result = ` 0${separator}${UNITS[0]}`;
|
| 1661 |
-
return applyFixedWidth(result, options.fixedWidth);
|
| 1662 |
-
}
|
| 1663 |
-
|
| 1664 |
-
const isNegative = number < 0;
|
| 1665 |
-
const prefix = isNegative ? '-' : (options.signed ? '+' : '');
|
| 1666 |
-
|
| 1667 |
-
if (isNegative) {
|
| 1668 |
-
number = -number;
|
| 1669 |
-
}
|
| 1670 |
-
|
| 1671 |
-
const localeOptions = buildLocaleOptions(options);
|
| 1672 |
-
let result;
|
| 1673 |
-
|
| 1674 |
-
if (number < 1) {
|
| 1675 |
-
const numberString = toLocaleString(number, options.locale, localeOptions);
|
| 1676 |
-
result = prefix + numberString + separator + UNITS[0];
|
| 1677 |
-
} else {
|
| 1678 |
-
const exponent = Math.min(Math.floor(options.binary ? log(number) / Math.log(1024) : log10(number) / 3), UNITS.length - 1);
|
| 1679 |
-
number = divide(number, (options.binary ? 1024 : 1000) ** exponent);
|
| 1680 |
-
|
| 1681 |
-
if (!localeOptions) {
|
| 1682 |
-
const minPrecision = Math.max(3, Math.floor(number).toString().length);
|
| 1683 |
-
number = number.toPrecision(minPrecision);
|
| 1684 |
-
}
|
| 1685 |
-
|
| 1686 |
-
const numberString = toLocaleString(Number(number), options.locale, localeOptions);
|
| 1687 |
-
const unit = UNITS[exponent];
|
| 1688 |
-
result = prefix + numberString + separator + unit;
|
| 1689 |
-
}
|
| 1690 |
-
|
| 1691 |
-
return applyFixedWidth(result, options.fixedWidth);
|
| 1692 |
-
}
|
| 1693 |
-
|
| 1694 |
-
function printTimings(timings) {
|
| 1695 |
-
for (const [label, [time, memory, total]] of Object.entries(timings)) {
|
| 1696 |
-
const appliedColor = label[0] === '#' ? (label[1] === '#' ? rollup.bold : rollup.underline) : (text) => text;
|
| 1697 |
-
const row = `${label}: ${time.toFixed(0)}ms, ${prettyBytes(memory)} / ${prettyBytes(total)}`;
|
| 1698 |
-
console.info(appliedColor(row));
|
| 1699 |
-
}
|
| 1700 |
-
}
|
| 1701 |
-
|
| 1702 |
-
async function build(inputOptions, warnings, silent = false) {
|
| 1703 |
-
const env_1 = { stack: [], error: void 0, hasError: false };
|
| 1704 |
-
try {
|
| 1705 |
-
const outputOptions = inputOptions.output;
|
| 1706 |
-
const useStdout = !outputOptions[0].file && !outputOptions[0].dir;
|
| 1707 |
-
const start = Date.now();
|
| 1708 |
-
const files = useStdout ? ['stdout'] : outputOptions.map(t => parseAst_js.relativeId(t.file || t.dir));
|
| 1709 |
-
if (!silent) {
|
| 1710 |
-
let inputFiles;
|
| 1711 |
-
if (typeof inputOptions.input === 'string') {
|
| 1712 |
-
inputFiles = inputOptions.input;
|
| 1713 |
-
}
|
| 1714 |
-
else if (Array.isArray(inputOptions.input)) {
|
| 1715 |
-
inputFiles = inputOptions.input.join(', ');
|
| 1716 |
-
}
|
| 1717 |
-
else if (typeof inputOptions.input === 'object' && inputOptions.input !== null) {
|
| 1718 |
-
inputFiles = Object.values(inputOptions.input).join(', ');
|
| 1719 |
-
}
|
| 1720 |
-
rollup.stderr(rollup.cyan(`\n${rollup.bold(inputFiles)} → ${rollup.bold(files.join(', '))}...`));
|
| 1721 |
-
}
|
| 1722 |
-
const bundle = __addDisposableResource(env_1, await rollup.rollup(inputOptions), true);
|
| 1723 |
-
if (useStdout) {
|
| 1724 |
-
const output = outputOptions[0];
|
| 1725 |
-
if (output.sourcemap && output.sourcemap !== 'inline') {
|
| 1726 |
-
rollup.handleError(parseAst_js.logOnlyInlineSourcemapsForStdout());
|
| 1727 |
-
}
|
| 1728 |
-
const { output: outputs } = await bundle.generate(output);
|
| 1729 |
-
for (const file of outputs) {
|
| 1730 |
-
if (outputs.length > 1)
|
| 1731 |
-
process$1.stdout.write(`\n${rollup.cyan(rollup.bold(`//→ ${file.fileName}:`))}\n`);
|
| 1732 |
-
process$1.stdout.write(file.type === 'asset' ? file.source : file.code);
|
| 1733 |
-
}
|
| 1734 |
-
if (!silent) {
|
| 1735 |
-
warnings.flush();
|
| 1736 |
-
}
|
| 1737 |
-
return;
|
| 1738 |
-
}
|
| 1739 |
-
await Promise.all(outputOptions.map(bundle.write));
|
| 1740 |
-
if (!silent) {
|
| 1741 |
-
warnings.flush();
|
| 1742 |
-
rollup.stderr(rollup.green(`created ${rollup.bold(files.join(', '))} in ${rollup.bold(prettyMilliseconds(Date.now() - start))}`));
|
| 1743 |
-
if (bundle && bundle.getTimings) {
|
| 1744 |
-
printTimings(bundle.getTimings());
|
| 1745 |
-
}
|
| 1746 |
-
}
|
| 1747 |
-
}
|
| 1748 |
-
catch (e_1) {
|
| 1749 |
-
env_1.error = e_1;
|
| 1750 |
-
env_1.hasError = true;
|
| 1751 |
-
}
|
| 1752 |
-
finally {
|
| 1753 |
-
const result_1 = __disposeResources(env_1);
|
| 1754 |
-
if (result_1)
|
| 1755 |
-
await result_1;
|
| 1756 |
-
}
|
| 1757 |
-
}
|
| 1758 |
-
|
| 1759 |
-
const DEFAULT_CONFIG_BASE = 'rollup.config';
|
| 1760 |
-
async function getConfigPath(commandConfig) {
|
| 1761 |
-
if (commandConfig === true) {
|
| 1762 |
-
return path.resolve(await findConfigFileNameInCwd());
|
| 1763 |
-
}
|
| 1764 |
-
if (commandConfig.slice(0, 5) === 'node:') {
|
| 1765 |
-
const packageName = commandConfig.slice(5);
|
| 1766 |
-
try {
|
| 1767 |
-
return require.resolve(`rollup-config-${packageName}`, { paths: [process$1.cwd()] });
|
| 1768 |
-
}
|
| 1769 |
-
catch {
|
| 1770 |
-
try {
|
| 1771 |
-
return require.resolve(packageName, { paths: [process$1.cwd()] });
|
| 1772 |
-
}
|
| 1773 |
-
catch (error) {
|
| 1774 |
-
if (error.code === 'MODULE_NOT_FOUND') {
|
| 1775 |
-
rollup.handleError(parseAst_js.logMissingExternalConfig(commandConfig));
|
| 1776 |
-
}
|
| 1777 |
-
throw error;
|
| 1778 |
-
}
|
| 1779 |
-
}
|
| 1780 |
-
}
|
| 1781 |
-
return path.resolve(commandConfig);
|
| 1782 |
-
}
|
| 1783 |
-
async function findConfigFileNameInCwd() {
|
| 1784 |
-
const filesInWorkingDirectory = new Set(await promises.readdir(process$1.cwd()));
|
| 1785 |
-
for (const extension of ['mjs', 'cjs', 'ts']) {
|
| 1786 |
-
const fileName = `${DEFAULT_CONFIG_BASE}.${extension}`;
|
| 1787 |
-
if (filesInWorkingDirectory.has(fileName))
|
| 1788 |
-
return fileName;
|
| 1789 |
-
}
|
| 1790 |
-
return `${DEFAULT_CONFIG_BASE}.js`;
|
| 1791 |
-
}
|
| 1792 |
-
|
| 1793 |
-
async function loadConfigFromCommand(commandOptions, watchMode) {
|
| 1794 |
-
const warnings = loadConfigFile_js.batchWarnings(commandOptions);
|
| 1795 |
-
if (!commandOptions.input && (commandOptions.stdin || !process$1.stdin.isTTY)) {
|
| 1796 |
-
commandOptions.input = loadConfigFile_js.stdinName;
|
| 1797 |
-
}
|
| 1798 |
-
const options = await rollup.mergeOptions({ input: [] }, watchMode, commandOptions, warnings.log);
|
| 1799 |
-
await loadConfigFile_js.addCommandPluginsToInputOptions(options, commandOptions);
|
| 1800 |
-
return { options: [options], warnings };
|
| 1801 |
-
}
|
| 1802 |
-
|
| 1803 |
-
async function runRollup(command) {
|
| 1804 |
-
let inputSource;
|
| 1805 |
-
if (command._.length > 0) {
|
| 1806 |
-
if (command.input) {
|
| 1807 |
-
rollup.handleError(parseAst_js.logDuplicateImportOptions());
|
| 1808 |
-
}
|
| 1809 |
-
inputSource = command._;
|
| 1810 |
-
}
|
| 1811 |
-
else if (typeof command.input === 'string') {
|
| 1812 |
-
inputSource = [command.input];
|
| 1813 |
-
}
|
| 1814 |
-
else {
|
| 1815 |
-
inputSource = command.input;
|
| 1816 |
-
}
|
| 1817 |
-
if (inputSource && inputSource.length > 0) {
|
| 1818 |
-
if (inputSource.some((input) => input.includes('='))) {
|
| 1819 |
-
command.input = {};
|
| 1820 |
-
for (const input of inputSource) {
|
| 1821 |
-
const equalsIndex = input.indexOf('=');
|
| 1822 |
-
const value = input.slice(Math.max(0, equalsIndex + 1));
|
| 1823 |
-
const key = input.slice(0, Math.max(0, equalsIndex)) || parseAst_js.getAliasName(input);
|
| 1824 |
-
command.input[key] = value;
|
| 1825 |
-
}
|
| 1826 |
-
}
|
| 1827 |
-
else {
|
| 1828 |
-
command.input = inputSource;
|
| 1829 |
-
}
|
| 1830 |
-
}
|
| 1831 |
-
if (command.environment) {
|
| 1832 |
-
const environment = Array.isArray(command.environment)
|
| 1833 |
-
? command.environment
|
| 1834 |
-
: [command.environment];
|
| 1835 |
-
for (const argument of environment) {
|
| 1836 |
-
for (const pair of argument.split(',')) {
|
| 1837 |
-
const [key, ...value] = pair.split(':');
|
| 1838 |
-
process$1.env[key] = value.length === 0 ? String(true) : value.join(':');
|
| 1839 |
-
}
|
| 1840 |
-
}
|
| 1841 |
-
}
|
| 1842 |
-
if (rollup.isWatchEnabled(command.watch)) {
|
| 1843 |
-
await fseventsImporter.loadFsEvents();
|
| 1844 |
-
const { watch } = await Promise.resolve().then(() => require('../shared/watch-cli.js'));
|
| 1845 |
-
await watch(command);
|
| 1846 |
-
}
|
| 1847 |
-
else {
|
| 1848 |
-
try {
|
| 1849 |
-
const { options, warnings } = await getConfigs(command);
|
| 1850 |
-
try {
|
| 1851 |
-
for (const inputOptions of options) {
|
| 1852 |
-
if (!inputOptions.cache) {
|
| 1853 |
-
// We explicitly disable the cache when unused as the CLI will not
|
| 1854 |
-
// use the cache object on the bundle when not in watch mode. This
|
| 1855 |
-
// improves performance as the cache is not generated.
|
| 1856 |
-
inputOptions.cache = false;
|
| 1857 |
-
}
|
| 1858 |
-
await build(inputOptions, warnings, command.silent);
|
| 1859 |
-
}
|
| 1860 |
-
if (command.failAfterWarnings && warnings.warningOccurred) {
|
| 1861 |
-
warnings.flush();
|
| 1862 |
-
rollup.handleError(parseAst_js.logFailAfterWarnings());
|
| 1863 |
-
}
|
| 1864 |
-
}
|
| 1865 |
-
catch (error) {
|
| 1866 |
-
warnings.flush();
|
| 1867 |
-
rollup.handleError(error);
|
| 1868 |
-
}
|
| 1869 |
-
}
|
| 1870 |
-
catch (error) {
|
| 1871 |
-
rollup.handleError(error);
|
| 1872 |
-
}
|
| 1873 |
-
}
|
| 1874 |
-
}
|
| 1875 |
-
async function getConfigs(command) {
|
| 1876 |
-
if (command.config) {
|
| 1877 |
-
const configFile = await getConfigPath(command.config);
|
| 1878 |
-
const { options, warnings } = await loadConfigFile_js.loadConfigFile(configFile, command, false);
|
| 1879 |
-
return { options, warnings };
|
| 1880 |
-
}
|
| 1881 |
-
return await loadConfigFromCommand(command, false);
|
| 1882 |
-
}
|
| 1883 |
-
|
| 1884 |
-
const command = yargsParser(process$1.argv.slice(2), {
|
| 1885 |
-
alias: rollup.commandAliases,
|
| 1886 |
-
configuration: { 'camel-case-expansion': false }
|
| 1887 |
-
});
|
| 1888 |
-
if (command.help || (process$1.argv.length <= 2 && process$1.stdin.isTTY)) {
|
| 1889 |
-
console.log(`\n${help}\n`);
|
| 1890 |
-
}
|
| 1891 |
-
else if (command.version) {
|
| 1892 |
-
console.log(`rollup v${rollup.version}`);
|
| 1893 |
-
}
|
| 1894 |
-
else {
|
| 1895 |
-
try {
|
| 1896 |
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
| 1897 |
-
require('source-map-support').install();
|
| 1898 |
-
}
|
| 1899 |
-
catch {
|
| 1900 |
-
// do nothing
|
| 1901 |
-
}
|
| 1902 |
-
const promise = runRollup(command);
|
| 1903 |
-
if (command.forceExit) {
|
| 1904 |
-
promise.then(() => process$1.exit());
|
| 1905 |
-
}
|
| 1906 |
-
}
|
| 1907 |
-
|
| 1908 |
-
exports.getConfigPath = getConfigPath;
|
| 1909 |
-
exports.loadConfigFromCommand = loadConfigFromCommand;
|
| 1910 |
-
exports.prettyMilliseconds = prettyMilliseconds;
|
| 1911 |
-
exports.printTimings = printTimings;
|
| 1912 |
-
//# sourceMappingURL=rollup.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/rollup/dist/es/getLogFilter.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
| 1 |
-
/*
|
| 2 |
-
@license
|
| 3 |
-
Rollup.js v4.55.1
|
| 4 |
-
Mon, 05 Jan 2026 10:23:35 GMT - commit 299cc46f3059a72b1e37b80c688a6d88c6c5f3fd
|
| 5 |
-
|
| 6 |
-
https://github.com/rollup/rollup
|
| 7 |
-
|
| 8 |
-
Released under the MIT License.
|
| 9 |
-
*/
|
| 10 |
-
const getLogFilter = filters => {
|
| 11 |
-
if (filters.length === 0)
|
| 12 |
-
return () => true;
|
| 13 |
-
const normalizedFilters = filters.map(filter => filter.split('&').map(subFilter => {
|
| 14 |
-
const inverted = subFilter[0] === '!';
|
| 15 |
-
if (inverted)
|
| 16 |
-
subFilter = subFilter.slice(1);
|
| 17 |
-
const [key, ...value] = subFilter.split(':');
|
| 18 |
-
return { inverted, key: key.split('.'), parts: value.join(':').split('*') };
|
| 19 |
-
}));
|
| 20 |
-
return (log) => {
|
| 21 |
-
nextIntersectedFilter: for (const intersectedFilters of normalizedFilters) {
|
| 22 |
-
for (const { inverted, key, parts } of intersectedFilters) {
|
| 23 |
-
const isFilterSatisfied = testFilter(log, key, parts);
|
| 24 |
-
if (inverted ? isFilterSatisfied : !isFilterSatisfied) {
|
| 25 |
-
continue nextIntersectedFilter;
|
| 26 |
-
}
|
| 27 |
-
}
|
| 28 |
-
return true;
|
| 29 |
-
}
|
| 30 |
-
return false;
|
| 31 |
-
};
|
| 32 |
-
};
|
| 33 |
-
const testFilter = (log, key, parts) => {
|
| 34 |
-
let rawValue = log;
|
| 35 |
-
for (let index = 0; index < key.length; index++) {
|
| 36 |
-
if (!rawValue) {
|
| 37 |
-
return false;
|
| 38 |
-
}
|
| 39 |
-
const part = key[index];
|
| 40 |
-
if (!(part in rawValue)) {
|
| 41 |
-
return false;
|
| 42 |
-
}
|
| 43 |
-
rawValue = rawValue[part];
|
| 44 |
-
}
|
| 45 |
-
let value = typeof rawValue === 'object' ? JSON.stringify(rawValue) : String(rawValue);
|
| 46 |
-
if (parts.length === 1) {
|
| 47 |
-
return value === parts[0];
|
| 48 |
-
}
|
| 49 |
-
if (!value.startsWith(parts[0])) {
|
| 50 |
-
return false;
|
| 51 |
-
}
|
| 52 |
-
const lastPartIndex = parts.length - 1;
|
| 53 |
-
for (let index = 1; index < lastPartIndex; index++) {
|
| 54 |
-
const part = parts[index];
|
| 55 |
-
const position = value.indexOf(part);
|
| 56 |
-
if (position === -1) {
|
| 57 |
-
return false;
|
| 58 |
-
}
|
| 59 |
-
value = value.slice(position + part.length);
|
| 60 |
-
}
|
| 61 |
-
return value.endsWith(parts[lastPartIndex]);
|
| 62 |
-
};
|
| 63 |
-
|
| 64 |
-
export { getLogFilter };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThinFilm_Analyzer/frontend/node_modules/rollup/dist/es/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
{"type":"module"}
|
|
|
|
|
|