Spaces:
Sleeping
Sleeping
Commit
·
a63e09b
1
Parent(s):
4175aca
added baseline stuff for making this a flask app with tailwind
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- app.py +19 -0
- neural_network/activation.py +1 -1
- node_modules/.bin/cssesc +1 -0
- node_modules/.bin/jiti +1 -0
- node_modules/.bin/nanoid +1 -0
- node_modules/.bin/resolve +1 -0
- node_modules/.bin/sucrase +1 -0
- node_modules/.bin/sucrase-node +1 -0
- node_modules/.bin/tailwind +1 -0
- node_modules/.bin/tailwindcss +1 -0
- node_modules/.package-lock.json +909 -0
- node_modules/@jridgewell/gen-mapping/LICENSE +19 -0
- node_modules/@jridgewell/gen-mapping/README.md +227 -0
- node_modules/@jridgewell/gen-mapping/package.json +77 -0
- node_modules/@jridgewell/resolve-uri/LICENSE +19 -0
- node_modules/@jridgewell/resolve-uri/README.md +40 -0
- node_modules/@jridgewell/resolve-uri/package.json +69 -0
- node_modules/@jridgewell/set-array/LICENSE +19 -0
- node_modules/@jridgewell/set-array/README.md +37 -0
- node_modules/@jridgewell/set-array/package.json +66 -0
- node_modules/@jridgewell/set-array/src/set-array.ts +55 -0
- node_modules/@jridgewell/sourcemap-codec/LICENSE +21 -0
- node_modules/@jridgewell/sourcemap-codec/README.md +200 -0
- node_modules/@jridgewell/sourcemap-codec/package.json +74 -0
- node_modules/@jridgewell/trace-mapping/LICENSE +19 -0
- node_modules/@jridgewell/trace-mapping/README.md +252 -0
- node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/LICENSE +21 -0
- node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/README.md +200 -0
- node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/package.json +75 -0
- node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts +198 -0
- node_modules/@jridgewell/trace-mapping/package.json +75 -0
- node_modules/@nodelib/fs.scandir/LICENSE +21 -0
- node_modules/@nodelib/fs.scandir/README.md +171 -0
- node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
- node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
- node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
- node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
- node_modules/@nodelib/fs.scandir/out/index.js +26 -0
- node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
- node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
- node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
- node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
- node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
- node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
- node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
- node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from flask import Flask, render_template
|
2 |
+
|
3 |
+
|
4 |
+
app = Flask(
|
5 |
+
__name__,
|
6 |
+
static_folder="static",
|
7 |
+
template_folder="templates",
|
8 |
+
)
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
@app.route("/")
|
13 |
+
def index():
|
14 |
+
return render_template("index.html")
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
if __name__ == "__main__":
|
19 |
+
app.run()
|
neural_network/activation.py
CHANGED
@@ -4,7 +4,7 @@ relu = lambda x: np.maximum(x, 0)
|
|
4 |
relu_prime = lambda x: np.where(x > 0, 1, 0)
|
5 |
|
6 |
tanh = lambda x: np.tanh(x)
|
7 |
-
tanh_prime = lambda x: 1 - tanh(x) ** 2
|
8 |
|
9 |
sigmoid = lambda x: 1.0 / (1.0 + np.exp(-x))
|
10 |
sigmoid_prime = lambda x: sigmoid(x) / 1.0 - sigmoid(x)
|
|
|
4 |
relu_prime = lambda x: np.where(x > 0, 1, 0)
|
5 |
|
6 |
tanh = lambda x: np.tanh(x)
|
7 |
+
tanh_prime = lambda x: 1 - np.tanh(x) ** 2
|
8 |
|
9 |
sigmoid = lambda x: 1.0 / (1.0 + np.exp(-x))
|
10 |
sigmoid_prime = lambda x: sigmoid(x) / 1.0 - sigmoid(x)
|
node_modules/.bin/cssesc
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
../cssesc/bin/cssesc
|
node_modules/.bin/jiti
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
../jiti/bin/jiti.js
|
node_modules/.bin/nanoid
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
../nanoid/bin/nanoid.cjs
|
node_modules/.bin/resolve
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
../resolve/bin/resolve
|
node_modules/.bin/sucrase
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
../sucrase/bin/sucrase
|
node_modules/.bin/sucrase-node
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
../sucrase/bin/sucrase-node
|
node_modules/.bin/tailwind
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
../tailwindcss/lib/cli.js
|
node_modules/.bin/tailwindcss
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
../tailwindcss/lib/cli.js
|
node_modules/.package-lock.json
ADDED
@@ -0,0 +1,909 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "data-mining-study",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"lockfileVersion": 3,
|
5 |
+
"requires": true,
|
6 |
+
"packages": {
|
7 |
+
"node_modules/@jridgewell/gen-mapping": {
|
8 |
+
"version": "0.3.3",
|
9 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
|
10 |
+
"integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
|
11 |
+
"dependencies": {
|
12 |
+
"@jridgewell/set-array": "^1.0.1",
|
13 |
+
"@jridgewell/sourcemap-codec": "^1.4.10",
|
14 |
+
"@jridgewell/trace-mapping": "^0.3.9"
|
15 |
+
},
|
16 |
+
"engines": {
|
17 |
+
"node": ">=6.0.0"
|
18 |
+
}
|
19 |
+
},
|
20 |
+
"node_modules/@jridgewell/resolve-uri": {
|
21 |
+
"version": "3.1.0",
|
22 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
|
23 |
+
"integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
|
24 |
+
"engines": {
|
25 |
+
"node": ">=6.0.0"
|
26 |
+
}
|
27 |
+
},
|
28 |
+
"node_modules/@jridgewell/set-array": {
|
29 |
+
"version": "1.1.2",
|
30 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
|
31 |
+
"integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
|
32 |
+
"engines": {
|
33 |
+
"node": ">=6.0.0"
|
34 |
+
}
|
35 |
+
},
|
36 |
+
"node_modules/@jridgewell/sourcemap-codec": {
|
37 |
+
"version": "1.4.15",
|
38 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
39 |
+
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
|
40 |
+
},
|
41 |
+
"node_modules/@jridgewell/trace-mapping": {
|
42 |
+
"version": "0.3.18",
|
43 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz",
|
44 |
+
"integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==",
|
45 |
+
"dependencies": {
|
46 |
+
"@jridgewell/resolve-uri": "3.1.0",
|
47 |
+
"@jridgewell/sourcemap-codec": "1.4.14"
|
48 |
+
}
|
49 |
+
},
|
50 |
+
"node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": {
|
51 |
+
"version": "1.4.14",
|
52 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
|
53 |
+
"integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw=="
|
54 |
+
},
|
55 |
+
"node_modules/@nodelib/fs.scandir": {
|
56 |
+
"version": "2.1.5",
|
57 |
+
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
58 |
+
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
|
59 |
+
"dependencies": {
|
60 |
+
"@nodelib/fs.stat": "2.0.5",
|
61 |
+
"run-parallel": "^1.1.9"
|
62 |
+
},
|
63 |
+
"engines": {
|
64 |
+
"node": ">= 8"
|
65 |
+
}
|
66 |
+
},
|
67 |
+
"node_modules/@nodelib/fs.stat": {
|
68 |
+
"version": "2.0.5",
|
69 |
+
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
|
70 |
+
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
|
71 |
+
"engines": {
|
72 |
+
"node": ">= 8"
|
73 |
+
}
|
74 |
+
},
|
75 |
+
"node_modules/@nodelib/fs.walk": {
|
76 |
+
"version": "1.2.8",
|
77 |
+
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
|
78 |
+
"integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
|
79 |
+
"dependencies": {
|
80 |
+
"@nodelib/fs.scandir": "2.1.5",
|
81 |
+
"fastq": "^1.6.0"
|
82 |
+
},
|
83 |
+
"engines": {
|
84 |
+
"node": ">= 8"
|
85 |
+
}
|
86 |
+
},
|
87 |
+
"node_modules/any-promise": {
|
88 |
+
"version": "1.3.0",
|
89 |
+
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
|
90 |
+
"integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A=="
|
91 |
+
},
|
92 |
+
"node_modules/anymatch": {
|
93 |
+
"version": "3.1.3",
|
94 |
+
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
95 |
+
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
|
96 |
+
"dependencies": {
|
97 |
+
"normalize-path": "^3.0.0",
|
98 |
+
"picomatch": "^2.0.4"
|
99 |
+
},
|
100 |
+
"engines": {
|
101 |
+
"node": ">= 8"
|
102 |
+
}
|
103 |
+
},
|
104 |
+
"node_modules/arg": {
|
105 |
+
"version": "5.0.2",
|
106 |
+
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
|
107 |
+
"integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg=="
|
108 |
+
},
|
109 |
+
"node_modules/balanced-match": {
|
110 |
+
"version": "1.0.2",
|
111 |
+
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
112 |
+
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
113 |
+
},
|
114 |
+
"node_modules/binary-extensions": {
|
115 |
+
"version": "2.2.0",
|
116 |
+
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
117 |
+
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
118 |
+
"engines": {
|
119 |
+
"node": ">=8"
|
120 |
+
}
|
121 |
+
},
|
122 |
+
"node_modules/brace-expansion": {
|
123 |
+
"version": "1.1.11",
|
124 |
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
125 |
+
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
126 |
+
"dependencies": {
|
127 |
+
"balanced-match": "^1.0.0",
|
128 |
+
"concat-map": "0.0.1"
|
129 |
+
}
|
130 |
+
},
|
131 |
+
"node_modules/braces": {
|
132 |
+
"version": "3.0.2",
|
133 |
+
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
134 |
+
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
135 |
+
"dependencies": {
|
136 |
+
"fill-range": "^7.0.1"
|
137 |
+
},
|
138 |
+
"engines": {
|
139 |
+
"node": ">=8"
|
140 |
+
}
|
141 |
+
},
|
142 |
+
"node_modules/camelcase-css": {
|
143 |
+
"version": "2.0.1",
|
144 |
+
"resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",
|
145 |
+
"integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
|
146 |
+
"engines": {
|
147 |
+
"node": ">= 6"
|
148 |
+
}
|
149 |
+
},
|
150 |
+
"node_modules/chokidar": {
|
151 |
+
"version": "3.5.3",
|
152 |
+
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
|
153 |
+
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
|
154 |
+
"funding": [
|
155 |
+
{
|
156 |
+
"type": "individual",
|
157 |
+
"url": "https://paulmillr.com/funding/"
|
158 |
+
}
|
159 |
+
],
|
160 |
+
"dependencies": {
|
161 |
+
"anymatch": "~3.1.2",
|
162 |
+
"braces": "~3.0.2",
|
163 |
+
"glob-parent": "~5.1.2",
|
164 |
+
"is-binary-path": "~2.1.0",
|
165 |
+
"is-glob": "~4.0.1",
|
166 |
+
"normalize-path": "~3.0.0",
|
167 |
+
"readdirp": "~3.6.0"
|
168 |
+
},
|
169 |
+
"engines": {
|
170 |
+
"node": ">= 8.10.0"
|
171 |
+
},
|
172 |
+
"optionalDependencies": {
|
173 |
+
"fsevents": "~2.3.2"
|
174 |
+
}
|
175 |
+
},
|
176 |
+
"node_modules/chokidar/node_modules/glob-parent": {
|
177 |
+
"version": "5.1.2",
|
178 |
+
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
179 |
+
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
180 |
+
"dependencies": {
|
181 |
+
"is-glob": "^4.0.1"
|
182 |
+
},
|
183 |
+
"engines": {
|
184 |
+
"node": ">= 6"
|
185 |
+
}
|
186 |
+
},
|
187 |
+
"node_modules/color-name": {
|
188 |
+
"version": "1.1.4",
|
189 |
+
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
190 |
+
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
191 |
+
},
|
192 |
+
"node_modules/commander": {
|
193 |
+
"version": "4.1.1",
|
194 |
+
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
|
195 |
+
"integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
|
196 |
+
"engines": {
|
197 |
+
"node": ">= 6"
|
198 |
+
}
|
199 |
+
},
|
200 |
+
"node_modules/concat-map": {
|
201 |
+
"version": "0.0.1",
|
202 |
+
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
203 |
+
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
204 |
+
},
|
205 |
+
"node_modules/cssesc": {
|
206 |
+
"version": "3.0.0",
|
207 |
+
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
|
208 |
+
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
|
209 |
+
"bin": {
|
210 |
+
"cssesc": "bin/cssesc"
|
211 |
+
},
|
212 |
+
"engines": {
|
213 |
+
"node": ">=4"
|
214 |
+
}
|
215 |
+
},
|
216 |
+
"node_modules/didyoumean": {
|
217 |
+
"version": "1.2.2",
|
218 |
+
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
219 |
+
"integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw=="
|
220 |
+
},
|
221 |
+
"node_modules/dlv": {
|
222 |
+
"version": "1.1.3",
|
223 |
+
"resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
|
224 |
+
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="
|
225 |
+
},
|
226 |
+
"node_modules/fast-glob": {
|
227 |
+
"version": "3.2.12",
|
228 |
+
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
|
229 |
+
"integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
|
230 |
+
"dependencies": {
|
231 |
+
"@nodelib/fs.stat": "^2.0.2",
|
232 |
+
"@nodelib/fs.walk": "^1.2.3",
|
233 |
+
"glob-parent": "^5.1.2",
|
234 |
+
"merge2": "^1.3.0",
|
235 |
+
"micromatch": "^4.0.4"
|
236 |
+
},
|
237 |
+
"engines": {
|
238 |
+
"node": ">=8.6.0"
|
239 |
+
}
|
240 |
+
},
|
241 |
+
"node_modules/fast-glob/node_modules/glob-parent": {
|
242 |
+
"version": "5.1.2",
|
243 |
+
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
244 |
+
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
245 |
+
"dependencies": {
|
246 |
+
"is-glob": "^4.0.1"
|
247 |
+
},
|
248 |
+
"engines": {
|
249 |
+
"node": ">= 6"
|
250 |
+
}
|
251 |
+
},
|
252 |
+
"node_modules/fastq": {
|
253 |
+
"version": "1.15.0",
|
254 |
+
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
|
255 |
+
"integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
|
256 |
+
"dependencies": {
|
257 |
+
"reusify": "^1.0.4"
|
258 |
+
}
|
259 |
+
},
|
260 |
+
"node_modules/fill-range": {
|
261 |
+
"version": "7.0.1",
|
262 |
+
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
263 |
+
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
264 |
+
"dependencies": {
|
265 |
+
"to-regex-range": "^5.0.1"
|
266 |
+
},
|
267 |
+
"engines": {
|
268 |
+
"node": ">=8"
|
269 |
+
}
|
270 |
+
},
|
271 |
+
"node_modules/fs.realpath": {
|
272 |
+
"version": "1.0.0",
|
273 |
+
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
274 |
+
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
|
275 |
+
},
|
276 |
+
"node_modules/fsevents": {
|
277 |
+
"version": "2.3.2",
|
278 |
+
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
279 |
+
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
280 |
+
"hasInstallScript": true,
|
281 |
+
"optional": true,
|
282 |
+
"os": [
|
283 |
+
"darwin"
|
284 |
+
],
|
285 |
+
"engines": {
|
286 |
+
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
287 |
+
}
|
288 |
+
},
|
289 |
+
"node_modules/function-bind": {
|
290 |
+
"version": "1.1.1",
|
291 |
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
292 |
+
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
293 |
+
},
|
294 |
+
"node_modules/glob": {
|
295 |
+
"version": "7.1.6",
|
296 |
+
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
297 |
+
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
|
298 |
+
"dependencies": {
|
299 |
+
"fs.realpath": "^1.0.0",
|
300 |
+
"inflight": "^1.0.4",
|
301 |
+
"inherits": "2",
|
302 |
+
"minimatch": "^3.0.4",
|
303 |
+
"once": "^1.3.0",
|
304 |
+
"path-is-absolute": "^1.0.0"
|
305 |
+
},
|
306 |
+
"engines": {
|
307 |
+
"node": "*"
|
308 |
+
},
|
309 |
+
"funding": {
|
310 |
+
"url": "https://github.com/sponsors/isaacs"
|
311 |
+
}
|
312 |
+
},
|
313 |
+
"node_modules/glob-parent": {
|
314 |
+
"version": "6.0.2",
|
315 |
+
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
|
316 |
+
"integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
|
317 |
+
"dependencies": {
|
318 |
+
"is-glob": "^4.0.3"
|
319 |
+
},
|
320 |
+
"engines": {
|
321 |
+
"node": ">=10.13.0"
|
322 |
+
}
|
323 |
+
},
|
324 |
+
"node_modules/has": {
|
325 |
+
"version": "1.0.3",
|
326 |
+
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
327 |
+
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
328 |
+
"dependencies": {
|
329 |
+
"function-bind": "^1.1.1"
|
330 |
+
},
|
331 |
+
"engines": {
|
332 |
+
"node": ">= 0.4.0"
|
333 |
+
}
|
334 |
+
},
|
335 |
+
"node_modules/inflight": {
|
336 |
+
"version": "1.0.6",
|
337 |
+
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
338 |
+
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
339 |
+
"dependencies": {
|
340 |
+
"once": "^1.3.0",
|
341 |
+
"wrappy": "1"
|
342 |
+
}
|
343 |
+
},
|
344 |
+
"node_modules/inherits": {
|
345 |
+
"version": "2.0.4",
|
346 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
347 |
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
348 |
+
},
|
349 |
+
"node_modules/is-binary-path": {
|
350 |
+
"version": "2.1.0",
|
351 |
+
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
352 |
+
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
353 |
+
"dependencies": {
|
354 |
+
"binary-extensions": "^2.0.0"
|
355 |
+
},
|
356 |
+
"engines": {
|
357 |
+
"node": ">=8"
|
358 |
+
}
|
359 |
+
},
|
360 |
+
"node_modules/is-core-module": {
|
361 |
+
"version": "2.12.0",
|
362 |
+
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz",
|
363 |
+
"integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==",
|
364 |
+
"dependencies": {
|
365 |
+
"has": "^1.0.3"
|
366 |
+
},
|
367 |
+
"funding": {
|
368 |
+
"url": "https://github.com/sponsors/ljharb"
|
369 |
+
}
|
370 |
+
},
|
371 |
+
"node_modules/is-extglob": {
|
372 |
+
"version": "2.1.1",
|
373 |
+
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
374 |
+
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
|
375 |
+
"engines": {
|
376 |
+
"node": ">=0.10.0"
|
377 |
+
}
|
378 |
+
},
|
379 |
+
"node_modules/is-glob": {
|
380 |
+
"version": "4.0.3",
|
381 |
+
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
382 |
+
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
|
383 |
+
"dependencies": {
|
384 |
+
"is-extglob": "^2.1.1"
|
385 |
+
},
|
386 |
+
"engines": {
|
387 |
+
"node": ">=0.10.0"
|
388 |
+
}
|
389 |
+
},
|
390 |
+
"node_modules/is-number": {
|
391 |
+
"version": "7.0.0",
|
392 |
+
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
393 |
+
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
394 |
+
"engines": {
|
395 |
+
"node": ">=0.12.0"
|
396 |
+
}
|
397 |
+
},
|
398 |
+
"node_modules/jiti": {
|
399 |
+
"version": "1.18.2",
|
400 |
+
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz",
|
401 |
+
"integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==",
|
402 |
+
"bin": {
|
403 |
+
"jiti": "bin/jiti.js"
|
404 |
+
}
|
405 |
+
},
|
406 |
+
"node_modules/lilconfig": {
|
407 |
+
"version": "2.1.0",
|
408 |
+
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz",
|
409 |
+
"integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==",
|
410 |
+
"engines": {
|
411 |
+
"node": ">=10"
|
412 |
+
}
|
413 |
+
},
|
414 |
+
"node_modules/lines-and-columns": {
|
415 |
+
"version": "1.2.4",
|
416 |
+
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
|
417 |
+
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
|
418 |
+
},
|
419 |
+
"node_modules/merge2": {
|
420 |
+
"version": "1.4.1",
|
421 |
+
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
422 |
+
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
|
423 |
+
"engines": {
|
424 |
+
"node": ">= 8"
|
425 |
+
}
|
426 |
+
},
|
427 |
+
"node_modules/micromatch": {
|
428 |
+
"version": "4.0.5",
|
429 |
+
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
|
430 |
+
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
|
431 |
+
"dependencies": {
|
432 |
+
"braces": "^3.0.2",
|
433 |
+
"picomatch": "^2.3.1"
|
434 |
+
},
|
435 |
+
"engines": {
|
436 |
+
"node": ">=8.6"
|
437 |
+
}
|
438 |
+
},
|
439 |
+
"node_modules/minimatch": {
|
440 |
+
"version": "3.1.2",
|
441 |
+
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
442 |
+
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
443 |
+
"dependencies": {
|
444 |
+
"brace-expansion": "^1.1.7"
|
445 |
+
},
|
446 |
+
"engines": {
|
447 |
+
"node": "*"
|
448 |
+
}
|
449 |
+
},
|
450 |
+
"node_modules/mz": {
|
451 |
+
"version": "2.7.0",
|
452 |
+
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
453 |
+
"integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
|
454 |
+
"dependencies": {
|
455 |
+
"any-promise": "^1.0.0",
|
456 |
+
"object-assign": "^4.0.1",
|
457 |
+
"thenify-all": "^1.0.0"
|
458 |
+
}
|
459 |
+
},
|
460 |
+
"node_modules/nanoid": {
|
461 |
+
"version": "3.3.6",
|
462 |
+
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
|
463 |
+
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
|
464 |
+
"funding": [
|
465 |
+
{
|
466 |
+
"type": "github",
|
467 |
+
"url": "https://github.com/sponsors/ai"
|
468 |
+
}
|
469 |
+
],
|
470 |
+
"bin": {
|
471 |
+
"nanoid": "bin/nanoid.cjs"
|
472 |
+
},
|
473 |
+
"engines": {
|
474 |
+
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
475 |
+
}
|
476 |
+
},
|
477 |
+
"node_modules/normalize-path": {
|
478 |
+
"version": "3.0.0",
|
479 |
+
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
480 |
+
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
|
481 |
+
"engines": {
|
482 |
+
"node": ">=0.10.0"
|
483 |
+
}
|
484 |
+
},
|
485 |
+
"node_modules/object-assign": {
|
486 |
+
"version": "4.1.1",
|
487 |
+
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
488 |
+
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
489 |
+
"engines": {
|
490 |
+
"node": ">=0.10.0"
|
491 |
+
}
|
492 |
+
},
|
493 |
+
"node_modules/object-hash": {
|
494 |
+
"version": "3.0.0",
|
495 |
+
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
|
496 |
+
"integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
|
497 |
+
"engines": {
|
498 |
+
"node": ">= 6"
|
499 |
+
}
|
500 |
+
},
|
501 |
+
"node_modules/once": {
|
502 |
+
"version": "1.4.0",
|
503 |
+
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
504 |
+
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
505 |
+
"dependencies": {
|
506 |
+
"wrappy": "1"
|
507 |
+
}
|
508 |
+
},
|
509 |
+
"node_modules/path-is-absolute": {
|
510 |
+
"version": "1.0.1",
|
511 |
+
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
512 |
+
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
|
513 |
+
"engines": {
|
514 |
+
"node": ">=0.10.0"
|
515 |
+
}
|
516 |
+
},
|
517 |
+
"node_modules/path-parse": {
|
518 |
+
"version": "1.0.7",
|
519 |
+
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
520 |
+
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
|
521 |
+
},
|
522 |
+
"node_modules/picocolors": {
|
523 |
+
"version": "1.0.0",
|
524 |
+
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
|
525 |
+
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
|
526 |
+
},
|
527 |
+
"node_modules/picomatch": {
|
528 |
+
"version": "2.3.1",
|
529 |
+
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
530 |
+
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
531 |
+
"engines": {
|
532 |
+
"node": ">=8.6"
|
533 |
+
},
|
534 |
+
"funding": {
|
535 |
+
"url": "https://github.com/sponsors/jonschlinkert"
|
536 |
+
}
|
537 |
+
},
|
538 |
+
"node_modules/pify": {
|
539 |
+
"version": "2.3.0",
|
540 |
+
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
541 |
+
"integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
|
542 |
+
"engines": {
|
543 |
+
"node": ">=0.10.0"
|
544 |
+
}
|
545 |
+
},
|
546 |
+
"node_modules/pirates": {
|
547 |
+
"version": "4.0.5",
|
548 |
+
"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz",
|
549 |
+
"integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==",
|
550 |
+
"engines": {
|
551 |
+
"node": ">= 6"
|
552 |
+
}
|
553 |
+
},
|
554 |
+
"node_modules/postcss": {
|
555 |
+
"version": "8.4.23",
|
556 |
+
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz",
|
557 |
+
"integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==",
|
558 |
+
"funding": [
|
559 |
+
{
|
560 |
+
"type": "opencollective",
|
561 |
+
"url": "https://opencollective.com/postcss/"
|
562 |
+
},
|
563 |
+
{
|
564 |
+
"type": "tidelift",
|
565 |
+
"url": "https://tidelift.com/funding/github/npm/postcss"
|
566 |
+
},
|
567 |
+
{
|
568 |
+
"type": "github",
|
569 |
+
"url": "https://github.com/sponsors/ai"
|
570 |
+
}
|
571 |
+
],
|
572 |
+
"dependencies": {
|
573 |
+
"nanoid": "^3.3.6",
|
574 |
+
"picocolors": "^1.0.0",
|
575 |
+
"source-map-js": "^1.0.2"
|
576 |
+
},
|
577 |
+
"engines": {
|
578 |
+
"node": "^10 || ^12 || >=14"
|
579 |
+
}
|
580 |
+
},
|
581 |
+
"node_modules/postcss-import": {
|
582 |
+
"version": "14.1.0",
|
583 |
+
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz",
|
584 |
+
"integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==",
|
585 |
+
"dependencies": {
|
586 |
+
"postcss-value-parser": "^4.0.0",
|
587 |
+
"read-cache": "^1.0.0",
|
588 |
+
"resolve": "^1.1.7"
|
589 |
+
},
|
590 |
+
"engines": {
|
591 |
+
"node": ">=10.0.0"
|
592 |
+
},
|
593 |
+
"peerDependencies": {
|
594 |
+
"postcss": "^8.0.0"
|
595 |
+
}
|
596 |
+
},
|
597 |
+
"node_modules/postcss-js": {
|
598 |
+
"version": "4.0.1",
|
599 |
+
"resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz",
|
600 |
+
"integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==",
|
601 |
+
"dependencies": {
|
602 |
+
"camelcase-css": "^2.0.1"
|
603 |
+
},
|
604 |
+
"engines": {
|
605 |
+
"node": "^12 || ^14 || >= 16"
|
606 |
+
},
|
607 |
+
"funding": {
|
608 |
+
"type": "opencollective",
|
609 |
+
"url": "https://opencollective.com/postcss/"
|
610 |
+
},
|
611 |
+
"peerDependencies": {
|
612 |
+
"postcss": "^8.4.21"
|
613 |
+
}
|
614 |
+
},
|
615 |
+
"node_modules/postcss-load-config": {
|
616 |
+
"version": "3.1.4",
|
617 |
+
"resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz",
|
618 |
+
"integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==",
|
619 |
+
"dependencies": {
|
620 |
+
"lilconfig": "^2.0.5",
|
621 |
+
"yaml": "^1.10.2"
|
622 |
+
},
|
623 |
+
"engines": {
|
624 |
+
"node": ">= 10"
|
625 |
+
},
|
626 |
+
"funding": {
|
627 |
+
"type": "opencollective",
|
628 |
+
"url": "https://opencollective.com/postcss/"
|
629 |
+
},
|
630 |
+
"peerDependencies": {
|
631 |
+
"postcss": ">=8.0.9",
|
632 |
+
"ts-node": ">=9.0.0"
|
633 |
+
},
|
634 |
+
"peerDependenciesMeta": {
|
635 |
+
"postcss": {
|
636 |
+
"optional": true
|
637 |
+
},
|
638 |
+
"ts-node": {
|
639 |
+
"optional": true
|
640 |
+
}
|
641 |
+
}
|
642 |
+
},
|
643 |
+
"node_modules/postcss-nested": {
|
644 |
+
"version": "6.0.0",
|
645 |
+
"resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.0.tgz",
|
646 |
+
"integrity": "sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==",
|
647 |
+
"dependencies": {
|
648 |
+
"postcss-selector-parser": "^6.0.10"
|
649 |
+
},
|
650 |
+
"engines": {
|
651 |
+
"node": ">=12.0"
|
652 |
+
},
|
653 |
+
"funding": {
|
654 |
+
"type": "opencollective",
|
655 |
+
"url": "https://opencollective.com/postcss/"
|
656 |
+
},
|
657 |
+
"peerDependencies": {
|
658 |
+
"postcss": "^8.2.14"
|
659 |
+
}
|
660 |
+
},
|
661 |
+
"node_modules/postcss-selector-parser": {
|
662 |
+
"version": "6.0.11",
|
663 |
+
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz",
|
664 |
+
"integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==",
|
665 |
+
"dependencies": {
|
666 |
+
"cssesc": "^3.0.0",
|
667 |
+
"util-deprecate": "^1.0.2"
|
668 |
+
},
|
669 |
+
"engines": {
|
670 |
+
"node": ">=4"
|
671 |
+
}
|
672 |
+
},
|
673 |
+
"node_modules/postcss-value-parser": {
|
674 |
+
"version": "4.2.0",
|
675 |
+
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
|
676 |
+
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
|
677 |
+
},
|
678 |
+
"node_modules/queue-microtask": {
|
679 |
+
"version": "1.2.3",
|
680 |
+
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
681 |
+
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
|
682 |
+
"funding": [
|
683 |
+
{
|
684 |
+
"type": "github",
|
685 |
+
"url": "https://github.com/sponsors/feross"
|
686 |
+
},
|
687 |
+
{
|
688 |
+
"type": "patreon",
|
689 |
+
"url": "https://www.patreon.com/feross"
|
690 |
+
},
|
691 |
+
{
|
692 |
+
"type": "consulting",
|
693 |
+
"url": "https://feross.org/support"
|
694 |
+
}
|
695 |
+
]
|
696 |
+
},
|
697 |
+
"node_modules/quick-lru": {
|
698 |
+
"version": "5.1.1",
|
699 |
+
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
|
700 |
+
"integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
|
701 |
+
"engines": {
|
702 |
+
"node": ">=10"
|
703 |
+
},
|
704 |
+
"funding": {
|
705 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
706 |
+
}
|
707 |
+
},
|
708 |
+
"node_modules/read-cache": {
|
709 |
+
"version": "1.0.0",
|
710 |
+
"resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
|
711 |
+
"integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==",
|
712 |
+
"dependencies": {
|
713 |
+
"pify": "^2.3.0"
|
714 |
+
}
|
715 |
+
},
|
716 |
+
"node_modules/readdirp": {
|
717 |
+
"version": "3.6.0",
|
718 |
+
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
719 |
+
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
720 |
+
"dependencies": {
|
721 |
+
"picomatch": "^2.2.1"
|
722 |
+
},
|
723 |
+
"engines": {
|
724 |
+
"node": ">=8.10.0"
|
725 |
+
}
|
726 |
+
},
|
727 |
+
"node_modules/resolve": {
|
728 |
+
"version": "1.22.2",
|
729 |
+
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",
|
730 |
+
"integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==",
|
731 |
+
"dependencies": {
|
732 |
+
"is-core-module": "^2.11.0",
|
733 |
+
"path-parse": "^1.0.7",
|
734 |
+
"supports-preserve-symlinks-flag": "^1.0.0"
|
735 |
+
},
|
736 |
+
"bin": {
|
737 |
+
"resolve": "bin/resolve"
|
738 |
+
},
|
739 |
+
"funding": {
|
740 |
+
"url": "https://github.com/sponsors/ljharb"
|
741 |
+
}
|
742 |
+
},
|
743 |
+
"node_modules/reusify": {
|
744 |
+
"version": "1.0.4",
|
745 |
+
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
|
746 |
+
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
|
747 |
+
"engines": {
|
748 |
+
"iojs": ">=1.0.0",
|
749 |
+
"node": ">=0.10.0"
|
750 |
+
}
|
751 |
+
},
|
752 |
+
"node_modules/run-parallel": {
|
753 |
+
"version": "1.2.0",
|
754 |
+
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
|
755 |
+
"integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
|
756 |
+
"funding": [
|
757 |
+
{
|
758 |
+
"type": "github",
|
759 |
+
"url": "https://github.com/sponsors/feross"
|
760 |
+
},
|
761 |
+
{
|
762 |
+
"type": "patreon",
|
763 |
+
"url": "https://www.patreon.com/feross"
|
764 |
+
},
|
765 |
+
{
|
766 |
+
"type": "consulting",
|
767 |
+
"url": "https://feross.org/support"
|
768 |
+
}
|
769 |
+
],
|
770 |
+
"dependencies": {
|
771 |
+
"queue-microtask": "^1.2.2"
|
772 |
+
}
|
773 |
+
},
|
774 |
+
"node_modules/source-map-js": {
|
775 |
+
"version": "1.0.2",
|
776 |
+
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
777 |
+
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
|
778 |
+
"engines": {
|
779 |
+
"node": ">=0.10.0"
|
780 |
+
}
|
781 |
+
},
|
782 |
+
"node_modules/sucrase": {
|
783 |
+
"version": "3.32.0",
|
784 |
+
"resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.32.0.tgz",
|
785 |
+
"integrity": "sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==",
|
786 |
+
"dependencies": {
|
787 |
+
"@jridgewell/gen-mapping": "^0.3.2",
|
788 |
+
"commander": "^4.0.0",
|
789 |
+
"glob": "7.1.6",
|
790 |
+
"lines-and-columns": "^1.1.6",
|
791 |
+
"mz": "^2.7.0",
|
792 |
+
"pirates": "^4.0.1",
|
793 |
+
"ts-interface-checker": "^0.1.9"
|
794 |
+
},
|
795 |
+
"bin": {
|
796 |
+
"sucrase": "bin/sucrase",
|
797 |
+
"sucrase-node": "bin/sucrase-node"
|
798 |
+
},
|
799 |
+
"engines": {
|
800 |
+
"node": ">=8"
|
801 |
+
}
|
802 |
+
},
|
803 |
+
"node_modules/supports-preserve-symlinks-flag": {
|
804 |
+
"version": "1.0.0",
|
805 |
+
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
|
806 |
+
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
|
807 |
+
"engines": {
|
808 |
+
"node": ">= 0.4"
|
809 |
+
},
|
810 |
+
"funding": {
|
811 |
+
"url": "https://github.com/sponsors/ljharb"
|
812 |
+
}
|
813 |
+
},
|
814 |
+
"node_modules/tailwindcss": {
|
815 |
+
"version": "3.3.1",
|
816 |
+
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.1.tgz",
|
817 |
+
"integrity": "sha512-Vkiouc41d4CEq0ujXl6oiGFQ7bA3WEhUZdTgXAhtKxSy49OmKs8rEfQmupsfF0IGW8fv2iQkp1EVUuapCFrZ9g==",
|
818 |
+
"dependencies": {
|
819 |
+
"arg": "^5.0.2",
|
820 |
+
"chokidar": "^3.5.3",
|
821 |
+
"color-name": "^1.1.4",
|
822 |
+
"didyoumean": "^1.2.2",
|
823 |
+
"dlv": "^1.1.3",
|
824 |
+
"fast-glob": "^3.2.12",
|
825 |
+
"glob-parent": "^6.0.2",
|
826 |
+
"is-glob": "^4.0.3",
|
827 |
+
"jiti": "^1.17.2",
|
828 |
+
"lilconfig": "^2.0.6",
|
829 |
+
"micromatch": "^4.0.5",
|
830 |
+
"normalize-path": "^3.0.0",
|
831 |
+
"object-hash": "^3.0.0",
|
832 |
+
"picocolors": "^1.0.0",
|
833 |
+
"postcss": "^8.0.9",
|
834 |
+
"postcss-import": "^14.1.0",
|
835 |
+
"postcss-js": "^4.0.0",
|
836 |
+
"postcss-load-config": "^3.1.4",
|
837 |
+
"postcss-nested": "6.0.0",
|
838 |
+
"postcss-selector-parser": "^6.0.11",
|
839 |
+
"postcss-value-parser": "^4.2.0",
|
840 |
+
"quick-lru": "^5.1.1",
|
841 |
+
"resolve": "^1.22.1",
|
842 |
+
"sucrase": "^3.29.0"
|
843 |
+
},
|
844 |
+
"bin": {
|
845 |
+
"tailwind": "lib/cli.js",
|
846 |
+
"tailwindcss": "lib/cli.js"
|
847 |
+
},
|
848 |
+
"engines": {
|
849 |
+
"node": ">=12.13.0"
|
850 |
+
},
|
851 |
+
"peerDependencies": {
|
852 |
+
"postcss": "^8.0.9"
|
853 |
+
}
|
854 |
+
},
|
855 |
+
"node_modules/thenify": {
|
856 |
+
"version": "3.3.1",
|
857 |
+
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
|
858 |
+
"integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
|
859 |
+
"dependencies": {
|
860 |
+
"any-promise": "^1.0.0"
|
861 |
+
}
|
862 |
+
},
|
863 |
+
"node_modules/thenify-all": {
|
864 |
+
"version": "1.6.0",
|
865 |
+
"resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
|
866 |
+
"integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",
|
867 |
+
"dependencies": {
|
868 |
+
"thenify": ">= 3.1.0 < 4"
|
869 |
+
},
|
870 |
+
"engines": {
|
871 |
+
"node": ">=0.8"
|
872 |
+
}
|
873 |
+
},
|
874 |
+
"node_modules/to-regex-range": {
|
875 |
+
"version": "5.0.1",
|
876 |
+
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
877 |
+
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
878 |
+
"dependencies": {
|
879 |
+
"is-number": "^7.0.0"
|
880 |
+
},
|
881 |
+
"engines": {
|
882 |
+
"node": ">=8.0"
|
883 |
+
}
|
884 |
+
},
|
885 |
+
"node_modules/ts-interface-checker": {
|
886 |
+
"version": "0.1.13",
|
887 |
+
"resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
|
888 |
+
"integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="
|
889 |
+
},
|
890 |
+
"node_modules/util-deprecate": {
|
891 |
+
"version": "1.0.2",
|
892 |
+
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
893 |
+
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
894 |
+
},
|
895 |
+
"node_modules/wrappy": {
|
896 |
+
"version": "1.0.2",
|
897 |
+
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
898 |
+
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
899 |
+
},
|
900 |
+
"node_modules/yaml": {
|
901 |
+
"version": "1.10.2",
|
902 |
+
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
|
903 |
+
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
|
904 |
+
"engines": {
|
905 |
+
"node": ">= 6"
|
906 |
+
}
|
907 |
+
}
|
908 |
+
}
|
909 |
+
}
|
node_modules/@jridgewell/gen-mapping/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright 2022 Justin Ridgewell <[email protected]>
|
2 |
+
|
3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
+
of this software and associated documentation files (the "Software"), to deal
|
5 |
+
in the Software without restriction, including without limitation the rights
|
6 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
+
copies of the Software, and to permit persons to whom the Software is
|
8 |
+
furnished to do so, subject to the following conditions:
|
9 |
+
|
10 |
+
The above copyright notice and this permission notice shall be included in
|
11 |
+
all 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,
|
15 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19 |
+
SOFTWARE.
|
node_modules/@jridgewell/gen-mapping/README.md
ADDED
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @jridgewell/gen-mapping
|
2 |
+
|
3 |
+
> Generate source maps
|
4 |
+
|
5 |
+
`gen-mapping` allows you to generate a source map during transpilation or minification.
|
6 |
+
With a source map, you're able to trace the original location in the source file, either in Chrome's
|
7 |
+
DevTools or using a library like [`@jridgewell/trace-mapping`][trace-mapping].
|
8 |
+
|
9 |
+
You may already be familiar with the [`source-map`][source-map] package's `SourceMapGenerator`. This
|
10 |
+
provides the same `addMapping` and `setSourceContent` API.
|
11 |
+
|
12 |
+
## Installation
|
13 |
+
|
14 |
+
```sh
|
15 |
+
npm install @jridgewell/gen-mapping
|
16 |
+
```
|
17 |
+
|
18 |
+
## Usage
|
19 |
+
|
20 |
+
```typescript
|
21 |
+
import { GenMapping, addMapping, setSourceContent, toEncodedMap, toDecodedMap } from '@jridgewell/gen-mapping';
|
22 |
+
|
23 |
+
const map = new GenMapping({
|
24 |
+
file: 'output.js',
|
25 |
+
sourceRoot: 'https://example.com/',
|
26 |
+
});
|
27 |
+
|
28 |
+
setSourceContent(map, 'input.js', `function foo() {}`);
|
29 |
+
|
30 |
+
addMapping(map, {
|
31 |
+
// Lines start at line 1, columns at column 0.
|
32 |
+
generated: { line: 1, column: 0 },
|
33 |
+
source: 'input.js',
|
34 |
+
original: { line: 1, column: 0 },
|
35 |
+
});
|
36 |
+
|
37 |
+
addMapping(map, {
|
38 |
+
generated: { line: 1, column: 9 },
|
39 |
+
source: 'input.js',
|
40 |
+
original: { line: 1, column: 9 },
|
41 |
+
name: 'foo',
|
42 |
+
});
|
43 |
+
|
44 |
+
assert.deepEqual(toDecodedMap(map), {
|
45 |
+
version: 3,
|
46 |
+
file: 'output.js',
|
47 |
+
names: ['foo'],
|
48 |
+
sourceRoot: 'https://example.com/',
|
49 |
+
sources: ['input.js'],
|
50 |
+
sourcesContent: ['function foo() {}'],
|
51 |
+
mappings: [
|
52 |
+
[ [0, 0, 0, 0], [9, 0, 0, 9, 0] ]
|
53 |
+
],
|
54 |
+
});
|
55 |
+
|
56 |
+
assert.deepEqual(toEncodedMap(map), {
|
57 |
+
version: 3,
|
58 |
+
file: 'output.js',
|
59 |
+
names: ['foo'],
|
60 |
+
sourceRoot: 'https://example.com/',
|
61 |
+
sources: ['input.js'],
|
62 |
+
sourcesContent: ['function foo() {}'],
|
63 |
+
mappings: 'AAAA,SAASA',
|
64 |
+
});
|
65 |
+
```
|
66 |
+
|
67 |
+
### Smaller Sourcemaps
|
68 |
+
|
69 |
+
Not everything needs to be added to a sourcemap, and needless markings can cause signficantly
|
70 |
+
larger file sizes. `gen-mapping` exposes `maybeAddSegment`/`maybeAddMapping` APIs that will
|
71 |
+
intelligently determine if this marking adds useful information. If not, the marking will be
|
72 |
+
skipped.
|
73 |
+
|
74 |
+
```typescript
|
75 |
+
import { maybeAddMapping } from '@jridgewell/gen-mapping';
|
76 |
+
|
77 |
+
const map = new GenMapping();
|
78 |
+
|
79 |
+
// Adding a sourceless marking at the beginning of a line isn't useful.
|
80 |
+
maybeAddMapping(map, {
|
81 |
+
generated: { line: 1, column: 0 },
|
82 |
+
});
|
83 |
+
|
84 |
+
// Adding a new source marking is useful.
|
85 |
+
maybeAddMapping(map, {
|
86 |
+
generated: { line: 1, column: 0 },
|
87 |
+
source: 'input.js',
|
88 |
+
original: { line: 1, column: 0 },
|
89 |
+
});
|
90 |
+
|
91 |
+
// But adding another marking pointing to the exact same original location isn't, even if the
|
92 |
+
// generated column changed.
|
93 |
+
maybeAddMapping(map, {
|
94 |
+
generated: { line: 1, column: 9 },
|
95 |
+
source: 'input.js',
|
96 |
+
original: { line: 1, column: 0 },
|
97 |
+
});
|
98 |
+
|
99 |
+
assert.deepEqual(toEncodedMap(map), {
|
100 |
+
version: 3,
|
101 |
+
names: [],
|
102 |
+
sources: ['input.js'],
|
103 |
+
sourcesContent: [null],
|
104 |
+
mappings: 'AAAA',
|
105 |
+
});
|
106 |
+
```
|
107 |
+
|
108 |
+
## Benchmarks
|
109 |
+
|
110 |
+
```
|
111 |
+
node v18.0.0
|
112 |
+
|
113 |
+
amp.js.map
|
114 |
+
Memory Usage:
|
115 |
+
gen-mapping: addSegment 5852872 bytes
|
116 |
+
gen-mapping: addMapping 7716042 bytes
|
117 |
+
source-map-js 6143250 bytes
|
118 |
+
source-map-0.6.1 6124102 bytes
|
119 |
+
source-map-0.8.0 6121173 bytes
|
120 |
+
Smallest memory usage is gen-mapping: addSegment
|
121 |
+
|
122 |
+
Adding speed:
|
123 |
+
gen-mapping: addSegment x 441 ops/sec ±2.07% (90 runs sampled)
|
124 |
+
gen-mapping: addMapping x 350 ops/sec ±2.40% (86 runs sampled)
|
125 |
+
source-map-js: addMapping x 169 ops/sec ±2.42% (80 runs sampled)
|
126 |
+
source-map-0.6.1: addMapping x 167 ops/sec ±2.56% (80 runs sampled)
|
127 |
+
source-map-0.8.0: addMapping x 168 ops/sec ±2.52% (80 runs sampled)
|
128 |
+
Fastest is gen-mapping: addSegment
|
129 |
+
|
130 |
+
Generate speed:
|
131 |
+
gen-mapping: decoded output x 150,824,370 ops/sec ±0.07% (102 runs sampled)
|
132 |
+
gen-mapping: encoded output x 663 ops/sec ±0.22% (98 runs sampled)
|
133 |
+
source-map-js: encoded output x 197 ops/sec ±0.45% (84 runs sampled)
|
134 |
+
source-map-0.6.1: encoded output x 198 ops/sec ±0.33% (85 runs sampled)
|
135 |
+
source-map-0.8.0: encoded output x 197 ops/sec ±0.06% (93 runs sampled)
|
136 |
+
Fastest is gen-mapping: decoded output
|
137 |
+
|
138 |
+
|
139 |
+
***
|
140 |
+
|
141 |
+
|
142 |
+
babel.min.js.map
|
143 |
+
Memory Usage:
|
144 |
+
gen-mapping: addSegment 37578063 bytes
|
145 |
+
gen-mapping: addMapping 37212897 bytes
|
146 |
+
source-map-js 47638527 bytes
|
147 |
+
source-map-0.6.1 47690503 bytes
|
148 |
+
source-map-0.8.0 47470188 bytes
|
149 |
+
Smallest memory usage is gen-mapping: addMapping
|
150 |
+
|
151 |
+
Adding speed:
|
152 |
+
gen-mapping: addSegment x 31.05 ops/sec ±8.31% (43 runs sampled)
|
153 |
+
gen-mapping: addMapping x 29.83 ops/sec ±7.36% (51 runs sampled)
|
154 |
+
source-map-js: addMapping x 20.73 ops/sec ±6.22% (38 runs sampled)
|
155 |
+
source-map-0.6.1: addMapping x 20.03 ops/sec ±10.51% (38 runs sampled)
|
156 |
+
source-map-0.8.0: addMapping x 19.30 ops/sec ±8.27% (37 runs sampled)
|
157 |
+
Fastest is gen-mapping: addSegment
|
158 |
+
|
159 |
+
Generate speed:
|
160 |
+
gen-mapping: decoded output x 381,379,234 ops/sec ±0.29% (96 runs sampled)
|
161 |
+
gen-mapping: encoded output x 95.15 ops/sec ±2.98% (72 runs sampled)
|
162 |
+
source-map-js: encoded output x 15.20 ops/sec ±7.41% (33 runs sampled)
|
163 |
+
source-map-0.6.1: encoded output x 16.36 ops/sec ±10.46% (31 runs sampled)
|
164 |
+
source-map-0.8.0: encoded output x 16.06 ops/sec ±6.45% (31 runs sampled)
|
165 |
+
Fastest is gen-mapping: decoded output
|
166 |
+
|
167 |
+
|
168 |
+
***
|
169 |
+
|
170 |
+
|
171 |
+
preact.js.map
|
172 |
+
Memory Usage:
|
173 |
+
gen-mapping: addSegment 416247 bytes
|
174 |
+
gen-mapping: addMapping 419824 bytes
|
175 |
+
source-map-js 1024619 bytes
|
176 |
+
source-map-0.6.1 1146004 bytes
|
177 |
+
source-map-0.8.0 1113250 bytes
|
178 |
+
Smallest memory usage is gen-mapping: addSegment
|
179 |
+
|
180 |
+
Adding speed:
|
181 |
+
gen-mapping: addSegment x 13,755 ops/sec ±0.15% (98 runs sampled)
|
182 |
+
gen-mapping: addMapping x 13,013 ops/sec ±0.11% (101 runs sampled)
|
183 |
+
source-map-js: addMapping x 4,564 ops/sec ±0.21% (98 runs sampled)
|
184 |
+
source-map-0.6.1: addMapping x 4,562 ops/sec ±0.11% (99 runs sampled)
|
185 |
+
source-map-0.8.0: addMapping x 4,593 ops/sec ±0.11% (100 runs sampled)
|
186 |
+
Fastest is gen-mapping: addSegment
|
187 |
+
|
188 |
+
Generate speed:
|
189 |
+
gen-mapping: decoded output x 379,864,020 ops/sec ±0.23% (93 runs sampled)
|
190 |
+
gen-mapping: encoded output x 14,368 ops/sec ±4.07% (82 runs sampled)
|
191 |
+
source-map-js: encoded output x 5,261 ops/sec ±0.21% (99 runs sampled)
|
192 |
+
source-map-0.6.1: encoded output x 5,124 ops/sec ±0.58% (99 runs sampled)
|
193 |
+
source-map-0.8.0: encoded output x 5,434 ops/sec ±0.33% (96 runs sampled)
|
194 |
+
Fastest is gen-mapping: decoded output
|
195 |
+
|
196 |
+
|
197 |
+
***
|
198 |
+
|
199 |
+
|
200 |
+
react.js.map
|
201 |
+
Memory Usage:
|
202 |
+
gen-mapping: addSegment 975096 bytes
|
203 |
+
gen-mapping: addMapping 1102981 bytes
|
204 |
+
source-map-js 2918836 bytes
|
205 |
+
source-map-0.6.1 2885435 bytes
|
206 |
+
source-map-0.8.0 2874336 bytes
|
207 |
+
Smallest memory usage is gen-mapping: addSegment
|
208 |
+
|
209 |
+
Adding speed:
|
210 |
+
gen-mapping: addSegment x 4,772 ops/sec ±0.15% (100 runs sampled)
|
211 |
+
gen-mapping: addMapping x 4,456 ops/sec ±0.13% (97 runs sampled)
|
212 |
+
source-map-js: addMapping x 1,618 ops/sec ±0.24% (97 runs sampled)
|
213 |
+
source-map-0.6.1: addMapping x 1,622 ops/sec ±0.12% (99 runs sampled)
|
214 |
+
source-map-0.8.0: addMapping x 1,631 ops/sec ±0.12% (100 runs sampled)
|
215 |
+
Fastest is gen-mapping: addSegment
|
216 |
+
|
217 |
+
Generate speed:
|
218 |
+
gen-mapping: decoded output x 379,107,695 ops/sec ±0.07% (99 runs sampled)
|
219 |
+
gen-mapping: encoded output x 5,421 ops/sec ±1.60% (89 runs sampled)
|
220 |
+
source-map-js: encoded output x 2,113 ops/sec ±1.81% (98 runs sampled)
|
221 |
+
source-map-0.6.1: encoded output x 2,126 ops/sec ±0.10% (100 runs sampled)
|
222 |
+
source-map-0.8.0: encoded output x 2,176 ops/sec ±0.39% (98 runs sampled)
|
223 |
+
Fastest is gen-mapping: decoded output
|
224 |
+
```
|
225 |
+
|
226 |
+
[source-map]: https://www.npmjs.com/package/source-map
|
227 |
+
[trace-mapping]: https://github.com/jridgewell/trace-mapping
|
node_modules/@jridgewell/gen-mapping/package.json
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "@jridgewell/gen-mapping",
|
3 |
+
"version": "0.3.3",
|
4 |
+
"description": "Generate source maps",
|
5 |
+
"keywords": [
|
6 |
+
"source",
|
7 |
+
"map"
|
8 |
+
],
|
9 |
+
"author": "Justin Ridgewell <[email protected]>",
|
10 |
+
"license": "MIT",
|
11 |
+
"repository": "https://github.com/jridgewell/gen-mapping",
|
12 |
+
"main": "dist/gen-mapping.umd.js",
|
13 |
+
"module": "dist/gen-mapping.mjs",
|
14 |
+
"types": "dist/types/gen-mapping.d.ts",
|
15 |
+
"exports": {
|
16 |
+
".": [
|
17 |
+
{
|
18 |
+
"types": "./dist/types/gen-mapping.d.ts",
|
19 |
+
"browser": "./dist/gen-mapping.umd.js",
|
20 |
+
"require": "./dist/gen-mapping.umd.js",
|
21 |
+
"import": "./dist/gen-mapping.mjs"
|
22 |
+
},
|
23 |
+
"./dist/gen-mapping.umd.js"
|
24 |
+
],
|
25 |
+
"./package.json": "./package.json"
|
26 |
+
},
|
27 |
+
"files": [
|
28 |
+
"dist"
|
29 |
+
],
|
30 |
+
"engines": {
|
31 |
+
"node": ">=6.0.0"
|
32 |
+
},
|
33 |
+
"scripts": {
|
34 |
+
"benchmark": "run-s build:rollup benchmark:*",
|
35 |
+
"benchmark:install": "cd benchmark && npm install",
|
36 |
+
"benchmark:only": "node benchmark/index.mjs",
|
37 |
+
"prebuild": "rm -rf dist",
|
38 |
+
"build": "run-s -n build:*",
|
39 |
+
"build:rollup": "rollup -c rollup.config.js",
|
40 |
+
"build:ts": "tsc --project tsconfig.build.json",
|
41 |
+
"lint": "run-s -n lint:*",
|
42 |
+
"lint:prettier": "npm run test:lint:prettier -- --write",
|
43 |
+
"lint:ts": "npm run test:lint:ts -- --fix",
|
44 |
+
"pretest": "run-s build:rollup",
|
45 |
+
"test": "run-s -n test:lint test:coverage",
|
46 |
+
"test:debug": "mocha --inspect-brk",
|
47 |
+
"test:lint": "run-s -n test:lint:*",
|
48 |
+
"test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
|
49 |
+
"test:lint:ts": "eslint '{src,test}/**/*.ts'",
|
50 |
+
"test:only": "mocha",
|
51 |
+
"test:coverage": "c8 mocha",
|
52 |
+
"test:watch": "run-p 'build:rollup -- --watch' 'test:only -- --watch'",
|
53 |
+
"prepublishOnly": "npm run preversion",
|
54 |
+
"preversion": "run-s test build"
|
55 |
+
},
|
56 |
+
"devDependencies": {
|
57 |
+
"@rollup/plugin-typescript": "8.3.2",
|
58 |
+
"@types/mocha": "9.1.1",
|
59 |
+
"@types/node": "17.0.29",
|
60 |
+
"@typescript-eslint/eslint-plugin": "5.21.0",
|
61 |
+
"@typescript-eslint/parser": "5.21.0",
|
62 |
+
"benchmark": "2.1.4",
|
63 |
+
"c8": "7.11.2",
|
64 |
+
"eslint": "8.14.0",
|
65 |
+
"eslint-config-prettier": "8.5.0",
|
66 |
+
"mocha": "9.2.2",
|
67 |
+
"npm-run-all": "4.1.5",
|
68 |
+
"prettier": "2.6.2",
|
69 |
+
"rollup": "2.70.2",
|
70 |
+
"typescript": "4.6.3"
|
71 |
+
},
|
72 |
+
"dependencies": {
|
73 |
+
"@jridgewell/set-array": "^1.0.1",
|
74 |
+
"@jridgewell/sourcemap-codec": "^1.4.10",
|
75 |
+
"@jridgewell/trace-mapping": "^0.3.9"
|
76 |
+
}
|
77 |
+
}
|
node_modules/@jridgewell/resolve-uri/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright 2019 Justin Ridgewell <[email protected]>
|
2 |
+
|
3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
+
of this software and associated documentation files (the "Software"), to deal
|
5 |
+
in the Software without restriction, including without limitation the rights
|
6 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
+
copies of the Software, and to permit persons to whom the Software is
|
8 |
+
furnished to do so, subject to the following conditions:
|
9 |
+
|
10 |
+
The above copyright notice and this permission notice shall be included in
|
11 |
+
all 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,
|
15 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19 |
+
SOFTWARE.
|
node_modules/@jridgewell/resolve-uri/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @jridgewell/resolve-uri
|
2 |
+
|
3 |
+
> Resolve a URI relative to an optional base URI
|
4 |
+
|
5 |
+
Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths.
|
6 |
+
|
7 |
+
## Installation
|
8 |
+
|
9 |
+
```sh
|
10 |
+
npm install @jridgewell/resolve-uri
|
11 |
+
```
|
12 |
+
|
13 |
+
## Usage
|
14 |
+
|
15 |
+
```typescript
|
16 |
+
function resolve(input: string, base?: string): string;
|
17 |
+
```
|
18 |
+
|
19 |
+
```js
|
20 |
+
import resolve from '@jridgewell/resolve-uri';
|
21 |
+
|
22 |
+
resolve('foo', 'https://example.com'); // => 'https://example.com/foo'
|
23 |
+
```
|
24 |
+
|
25 |
+
| Input | Base | Resolution | Explanation |
|
26 |
+
|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------|
|
27 |
+
| `https://example.com` | _any_ | `https://example.com/` | Input is normalized only |
|
28 |
+
| `//example.com` | `https://base.com/` | `https://example.com/` | Input inherits the base's protocol |
|
29 |
+
| `//example.com` | _rest_ | `//example.com/` | Input is normalized only |
|
30 |
+
| `/example` | `https://base.com/` | `https://base.com/example` | Input inherits the base's origin |
|
31 |
+
| `/example` | `//base.com/` | `//base.com/example` | Input inherits the base's host and remains protocol relative |
|
32 |
+
| `/example` | _rest_ | `/example` | Input is normalized only |
|
33 |
+
| `example` | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base |
|
34 |
+
| `example` | `https://base.com/file` | `https://base.com/example` | Input is joined with the base without its file |
|
35 |
+
| `example` | `//base.com/dir/` | `//base.com/dir/example` | Input is joined with the base's last directory |
|
36 |
+
| `example` | `//base.com/file` | `//base.com/example` | Input is joined with the base without its file |
|
37 |
+
| `example` | `/base/dir/` | `/base/dir/example` | Input is joined with the base's last directory |
|
38 |
+
| `example` | `/base/file` | `/base/example` | Input is joined with the base without its file |
|
39 |
+
| `example` | `base/dir/` | `base/dir/example` | Input is joined with the base's last directory |
|
40 |
+
| `example` | `base/file` | `base/example` | Input is joined with the base without its file |
|
node_modules/@jridgewell/resolve-uri/package.json
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "@jridgewell/resolve-uri",
|
3 |
+
"version": "3.1.0",
|
4 |
+
"description": "Resolve a URI relative to an optional base URI",
|
5 |
+
"keywords": [
|
6 |
+
"resolve",
|
7 |
+
"uri",
|
8 |
+
"url",
|
9 |
+
"path"
|
10 |
+
],
|
11 |
+
"author": "Justin Ridgewell <[email protected]>",
|
12 |
+
"license": "MIT",
|
13 |
+
"repository": "https://github.com/jridgewell/resolve-uri",
|
14 |
+
"main": "dist/resolve-uri.umd.js",
|
15 |
+
"module": "dist/resolve-uri.mjs",
|
16 |
+
"typings": "dist/types/resolve-uri.d.ts",
|
17 |
+
"exports": {
|
18 |
+
".": [
|
19 |
+
{
|
20 |
+
"types": "./dist/types/resolve-uri.d.ts",
|
21 |
+
"browser": "./dist/resolve-uri.umd.js",
|
22 |
+
"require": "./dist/resolve-uri.umd.js",
|
23 |
+
"import": "./dist/resolve-uri.mjs"
|
24 |
+
},
|
25 |
+
"./dist/resolve-uri.umd.js"
|
26 |
+
],
|
27 |
+
"./package.json": "./package.json"
|
28 |
+
},
|
29 |
+
"files": [
|
30 |
+
"dist"
|
31 |
+
],
|
32 |
+
"engines": {
|
33 |
+
"node": ">=6.0.0"
|
34 |
+
},
|
35 |
+
"scripts": {
|
36 |
+
"prebuild": "rm -rf dist",
|
37 |
+
"build": "run-s -n build:*",
|
38 |
+
"build:rollup": "rollup -c rollup.config.js",
|
39 |
+
"build:ts": "tsc --project tsconfig.build.json",
|
40 |
+
"lint": "run-s -n lint:*",
|
41 |
+
"lint:prettier": "npm run test:lint:prettier -- --write",
|
42 |
+
"lint:ts": "npm run test:lint:ts -- --fix",
|
43 |
+
"pretest": "run-s build:rollup",
|
44 |
+
"test": "run-s -n test:lint test:only",
|
45 |
+
"test:debug": "mocha --inspect-brk",
|
46 |
+
"test:lint": "run-s -n test:lint:*",
|
47 |
+
"test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
|
48 |
+
"test:lint:ts": "eslint '{src,test}/**/*.ts'",
|
49 |
+
"test:only": "mocha",
|
50 |
+
"test:coverage": "c8 mocha",
|
51 |
+
"test:watch": "mocha --watch",
|
52 |
+
"prepublishOnly": "npm run preversion",
|
53 |
+
"preversion": "run-s test build"
|
54 |
+
},
|
55 |
+
"devDependencies": {
|
56 |
+
"@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*",
|
57 |
+
"@rollup/plugin-typescript": "8.3.0",
|
58 |
+
"@typescript-eslint/eslint-plugin": "5.10.0",
|
59 |
+
"@typescript-eslint/parser": "5.10.0",
|
60 |
+
"c8": "7.11.0",
|
61 |
+
"eslint": "8.7.0",
|
62 |
+
"eslint-config-prettier": "8.3.0",
|
63 |
+
"mocha": "9.2.0",
|
64 |
+
"npm-run-all": "4.1.5",
|
65 |
+
"prettier": "2.5.1",
|
66 |
+
"rollup": "2.66.0",
|
67 |
+
"typescript": "4.5.5"
|
68 |
+
}
|
69 |
+
}
|
node_modules/@jridgewell/set-array/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright 2022 Justin Ridgewell <[email protected]>
|
2 |
+
|
3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
+
of this software and associated documentation files (the "Software"), to deal
|
5 |
+
in the Software without restriction, including without limitation the rights
|
6 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
+
copies of the Software, and to permit persons to whom the Software is
|
8 |
+
furnished to do so, subject to the following conditions:
|
9 |
+
|
10 |
+
The above copyright notice and this permission notice shall be included in
|
11 |
+
all 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,
|
15 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19 |
+
SOFTWARE.
|
node_modules/@jridgewell/set-array/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @jridgewell/set-array
|
2 |
+
|
3 |
+
> Like a Set, but provides the index of the `key` in the backing array
|
4 |
+
|
5 |
+
This is designed to allow synchronizing a second array with the contents of the backing array, like
|
6 |
+
how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, and there
|
7 |
+
are never duplicates.
|
8 |
+
|
9 |
+
## Installation
|
10 |
+
|
11 |
+
```sh
|
12 |
+
npm install @jridgewell/set-array
|
13 |
+
```
|
14 |
+
|
15 |
+
## Usage
|
16 |
+
|
17 |
+
```js
|
18 |
+
import { SetArray, get, put, pop } from '@jridgewell/set-array';
|
19 |
+
|
20 |
+
const sa = new SetArray();
|
21 |
+
|
22 |
+
let index = put(sa, 'first');
|
23 |
+
assert.strictEqual(index, 0);
|
24 |
+
|
25 |
+
index = put(sa, 'second');
|
26 |
+
assert.strictEqual(index, 1);
|
27 |
+
|
28 |
+
assert.deepEqual(sa.array, [ 'first', 'second' ]);
|
29 |
+
|
30 |
+
index = get(sa, 'first');
|
31 |
+
assert.strictEqual(index, 0);
|
32 |
+
|
33 |
+
pop(sa);
|
34 |
+
index = get(sa, 'second');
|
35 |
+
assert.strictEqual(index, undefined);
|
36 |
+
assert.deepEqual(sa.array, [ 'first' ]);
|
37 |
+
```
|
node_modules/@jridgewell/set-array/package.json
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "@jridgewell/set-array",
|
3 |
+
"version": "1.1.2",
|
4 |
+
"description": "Like a Set, but provides the index of the `key` in the backing array",
|
5 |
+
"keywords": [],
|
6 |
+
"author": "Justin Ridgewell <[email protected]>",
|
7 |
+
"license": "MIT",
|
8 |
+
"repository": "https://github.com/jridgewell/set-array",
|
9 |
+
"main": "dist/set-array.umd.js",
|
10 |
+
"module": "dist/set-array.mjs",
|
11 |
+
"typings": "dist/types/set-array.d.ts",
|
12 |
+
"exports": {
|
13 |
+
".": [
|
14 |
+
{
|
15 |
+
"types": "./dist/types/set-array.d.ts",
|
16 |
+
"browser": "./dist/set-array.umd.js",
|
17 |
+
"require": "./dist/set-array.umd.js",
|
18 |
+
"import": "./dist/set-array.mjs"
|
19 |
+
},
|
20 |
+
"./dist/set-array.umd.js"
|
21 |
+
],
|
22 |
+
"./package.json": "./package.json"
|
23 |
+
},
|
24 |
+
"files": [
|
25 |
+
"dist",
|
26 |
+
"src"
|
27 |
+
],
|
28 |
+
"engines": {
|
29 |
+
"node": ">=6.0.0"
|
30 |
+
},
|
31 |
+
"scripts": {
|
32 |
+
"prebuild": "rm -rf dist",
|
33 |
+
"build": "run-s -n build:*",
|
34 |
+
"build:rollup": "rollup -c rollup.config.js",
|
35 |
+
"build:ts": "tsc --project tsconfig.build.json",
|
36 |
+
"lint": "run-s -n lint:*",
|
37 |
+
"lint:prettier": "npm run test:lint:prettier -- --write",
|
38 |
+
"lint:ts": "npm run test:lint:ts -- --fix",
|
39 |
+
"pretest": "run-s build:rollup",
|
40 |
+
"test": "run-s -n test:lint test:only",
|
41 |
+
"test:debug": "mocha --inspect-brk",
|
42 |
+
"test:lint": "run-s -n test:lint:*",
|
43 |
+
"test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
|
44 |
+
"test:lint:ts": "eslint '{src,test}/**/*.ts'",
|
45 |
+
"test:only": "mocha",
|
46 |
+
"test:coverage": "c8 mocha",
|
47 |
+
"test:watch": "mocha --watch",
|
48 |
+
"prepublishOnly": "npm run preversion",
|
49 |
+
"preversion": "run-s test build"
|
50 |
+
},
|
51 |
+
"devDependencies": {
|
52 |
+
"@rollup/plugin-typescript": "8.3.0",
|
53 |
+
"@types/mocha": "9.1.1",
|
54 |
+
"@types/node": "17.0.29",
|
55 |
+
"@typescript-eslint/eslint-plugin": "5.10.0",
|
56 |
+
"@typescript-eslint/parser": "5.10.0",
|
57 |
+
"c8": "7.11.0",
|
58 |
+
"eslint": "8.7.0",
|
59 |
+
"eslint-config-prettier": "8.3.0",
|
60 |
+
"mocha": "9.2.0",
|
61 |
+
"npm-run-all": "4.1.5",
|
62 |
+
"prettier": "2.5.1",
|
63 |
+
"rollup": "2.66.0",
|
64 |
+
"typescript": "4.5.5"
|
65 |
+
}
|
66 |
+
}
|
node_modules/@jridgewell/set-array/src/set-array.ts
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Gets the index associated with `key` in the backing array, if it is already present.
|
3 |
+
*/
|
4 |
+
export let get: (strarr: SetArray, key: string) => number | undefined;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Puts `key` into the backing array, if it is not already present. Returns
|
8 |
+
* the index of the `key` in the backing array.
|
9 |
+
*/
|
10 |
+
export let put: (strarr: SetArray, key: string) => number;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Pops the last added item out of the SetArray.
|
14 |
+
*/
|
15 |
+
export let pop: (strarr: SetArray) => void;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
|
19 |
+
* index of the `key` in the backing array.
|
20 |
+
*
|
21 |
+
* This is designed to allow synchronizing a second array with the contents of the backing array,
|
22 |
+
* like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
|
23 |
+
* and there are never duplicates.
|
24 |
+
*/
|
25 |
+
export class SetArray {
|
26 |
+
private declare _indexes: { [key: string]: number | undefined };
|
27 |
+
declare array: readonly string[];
|
28 |
+
|
29 |
+
constructor() {
|
30 |
+
this._indexes = { __proto__: null } as any;
|
31 |
+
this.array = [];
|
32 |
+
}
|
33 |
+
|
34 |
+
static {
|
35 |
+
get = (strarr, key) => strarr._indexes[key];
|
36 |
+
|
37 |
+
put = (strarr, key) => {
|
38 |
+
// The key may or may not be present. If it is present, it's a number.
|
39 |
+
const index = get(strarr, key);
|
40 |
+
if (index !== undefined) return index;
|
41 |
+
|
42 |
+
const { array, _indexes: indexes } = strarr;
|
43 |
+
|
44 |
+
return (indexes[key] = (array as string[]).push(key) - 1);
|
45 |
+
};
|
46 |
+
|
47 |
+
pop = (strarr) => {
|
48 |
+
const { array, _indexes: indexes } = strarr;
|
49 |
+
if (array.length === 0) return;
|
50 |
+
|
51 |
+
const last = (array as string[]).pop()!;
|
52 |
+
indexes[last] = undefined;
|
53 |
+
};
|
54 |
+
}
|
55 |
+
}
|
node_modules/@jridgewell/sourcemap-codec/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The MIT License
|
2 |
+
|
3 |
+
Copyright (c) 2015 Rich Harris
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in
|
13 |
+
all copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21 |
+
THE SOFTWARE.
|
node_modules/@jridgewell/sourcemap-codec/README.md
ADDED
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @jridgewell/sourcemap-codec
|
2 |
+
|
3 |
+
Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit).
|
4 |
+
|
5 |
+
|
6 |
+
## Why?
|
7 |
+
|
8 |
+
Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap.
|
9 |
+
|
10 |
+
This package makes the process slightly easier.
|
11 |
+
|
12 |
+
|
13 |
+
## Installation
|
14 |
+
|
15 |
+
```bash
|
16 |
+
npm install @jridgewell/sourcemap-codec
|
17 |
+
```
|
18 |
+
|
19 |
+
|
20 |
+
## Usage
|
21 |
+
|
22 |
+
```js
|
23 |
+
import { encode, decode } from '@jridgewell/sourcemap-codec';
|
24 |
+
|
25 |
+
var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
|
26 |
+
|
27 |
+
assert.deepEqual( decoded, [
|
28 |
+
// the first line (of the generated code) has no mappings,
|
29 |
+
// as shown by the starting semi-colon (which separates lines)
|
30 |
+
[],
|
31 |
+
|
32 |
+
// the second line contains four (comma-separated) segments
|
33 |
+
[
|
34 |
+
// segments are encoded as you'd expect:
|
35 |
+
// [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ]
|
36 |
+
|
37 |
+
// i.e. the first segment begins at column 2, and maps back to the second column
|
38 |
+
// of the second line (both zero-based) of the 0th source, and uses the 0th
|
39 |
+
// name in the `map.names` array
|
40 |
+
[ 2, 0, 2, 2, 0 ],
|
41 |
+
|
42 |
+
// the remaining segments are 4-length rather than 5-length,
|
43 |
+
// because they don't map a name
|
44 |
+
[ 4, 0, 2, 4 ],
|
45 |
+
[ 6, 0, 2, 5 ],
|
46 |
+
[ 7, 0, 2, 7 ]
|
47 |
+
],
|
48 |
+
|
49 |
+
// the final line contains two segments
|
50 |
+
[
|
51 |
+
[ 2, 1, 10, 19 ],
|
52 |
+
[ 12, 1, 11, 20 ]
|
53 |
+
]
|
54 |
+
]);
|
55 |
+
|
56 |
+
var encoded = encode( decoded );
|
57 |
+
assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
|
58 |
+
```
|
59 |
+
|
60 |
+
## Benchmarks
|
61 |
+
|
62 |
+
```
|
63 |
+
node v18.0.0
|
64 |
+
|
65 |
+
amp.js.map - 45120 segments
|
66 |
+
|
67 |
+
Decode Memory Usage:
|
68 |
+
@jridgewell/sourcemap-codec 5479160 bytes
|
69 |
+
sourcemap-codec 5659336 bytes
|
70 |
+
source-map-0.6.1 17144440 bytes
|
71 |
+
source-map-0.8.0 6867424 bytes
|
72 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
73 |
+
|
74 |
+
Decode speed:
|
75 |
+
decode: @jridgewell/sourcemap-codec x 502 ops/sec ±1.03% (90 runs sampled)
|
76 |
+
decode: sourcemap-codec x 445 ops/sec ±0.97% (92 runs sampled)
|
77 |
+
decode: source-map-0.6.1 x 36.01 ops/sec ±1.64% (49 runs sampled)
|
78 |
+
decode: source-map-0.8.0 x 367 ops/sec ±0.04% (95 runs sampled)
|
79 |
+
Fastest is decode: @jridgewell/sourcemap-codec
|
80 |
+
|
81 |
+
Encode Memory Usage:
|
82 |
+
@jridgewell/sourcemap-codec 1261620 bytes
|
83 |
+
sourcemap-codec 9119248 bytes
|
84 |
+
source-map-0.6.1 8968560 bytes
|
85 |
+
source-map-0.8.0 8952952 bytes
|
86 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
87 |
+
|
88 |
+
Encode speed:
|
89 |
+
encode: @jridgewell/sourcemap-codec x 738 ops/sec ±0.42% (98 runs sampled)
|
90 |
+
encode: sourcemap-codec x 238 ops/sec ±0.73% (88 runs sampled)
|
91 |
+
encode: source-map-0.6.1 x 162 ops/sec ±0.43% (84 runs sampled)
|
92 |
+
encode: source-map-0.8.0 x 191 ops/sec ±0.34% (90 runs sampled)
|
93 |
+
Fastest is encode: @jridgewell/sourcemap-codec
|
94 |
+
|
95 |
+
|
96 |
+
***
|
97 |
+
|
98 |
+
|
99 |
+
babel.min.js.map - 347793 segments
|
100 |
+
|
101 |
+
Decode Memory Usage:
|
102 |
+
@jridgewell/sourcemap-codec 35338184 bytes
|
103 |
+
sourcemap-codec 35922736 bytes
|
104 |
+
source-map-0.6.1 62366360 bytes
|
105 |
+
source-map-0.8.0 44337416 bytes
|
106 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
107 |
+
|
108 |
+
Decode speed:
|
109 |
+
decode: @jridgewell/sourcemap-codec x 40.35 ops/sec ±4.47% (54 runs sampled)
|
110 |
+
decode: sourcemap-codec x 36.76 ops/sec ±3.67% (51 runs sampled)
|
111 |
+
decode: source-map-0.6.1 x 4.44 ops/sec ±2.15% (16 runs sampled)
|
112 |
+
decode: source-map-0.8.0 x 59.35 ops/sec ±0.05% (78 runs sampled)
|
113 |
+
Fastest is decode: source-map-0.8.0
|
114 |
+
|
115 |
+
Encode Memory Usage:
|
116 |
+
@jridgewell/sourcemap-codec 7212604 bytes
|
117 |
+
sourcemap-codec 21421456 bytes
|
118 |
+
source-map-0.6.1 25286888 bytes
|
119 |
+
source-map-0.8.0 25498744 bytes
|
120 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
121 |
+
|
122 |
+
Encode speed:
|
123 |
+
encode: @jridgewell/sourcemap-codec x 112 ops/sec ±0.13% (84 runs sampled)
|
124 |
+
encode: sourcemap-codec x 30.23 ops/sec ±2.76% (53 runs sampled)
|
125 |
+
encode: source-map-0.6.1 x 19.43 ops/sec ±3.70% (37 runs sampled)
|
126 |
+
encode: source-map-0.8.0 x 19.40 ops/sec ±3.26% (37 runs sampled)
|
127 |
+
Fastest is encode: @jridgewell/sourcemap-codec
|
128 |
+
|
129 |
+
|
130 |
+
***
|
131 |
+
|
132 |
+
|
133 |
+
preact.js.map - 1992 segments
|
134 |
+
|
135 |
+
Decode Memory Usage:
|
136 |
+
@jridgewell/sourcemap-codec 500272 bytes
|
137 |
+
sourcemap-codec 516864 bytes
|
138 |
+
source-map-0.6.1 1596672 bytes
|
139 |
+
source-map-0.8.0 517272 bytes
|
140 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
141 |
+
|
142 |
+
Decode speed:
|
143 |
+
decode: @jridgewell/sourcemap-codec x 16,137 ops/sec ±0.17% (99 runs sampled)
|
144 |
+
decode: sourcemap-codec x 12,139 ops/sec ±0.13% (99 runs sampled)
|
145 |
+
decode: source-map-0.6.1 x 1,264 ops/sec ±0.12% (100 runs sampled)
|
146 |
+
decode: source-map-0.8.0 x 9,894 ops/sec ±0.08% (101 runs sampled)
|
147 |
+
Fastest is decode: @jridgewell/sourcemap-codec
|
148 |
+
|
149 |
+
Encode Memory Usage:
|
150 |
+
@jridgewell/sourcemap-codec 321026 bytes
|
151 |
+
sourcemap-codec 830832 bytes
|
152 |
+
source-map-0.6.1 586608 bytes
|
153 |
+
source-map-0.8.0 586680 bytes
|
154 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
155 |
+
|
156 |
+
Encode speed:
|
157 |
+
encode: @jridgewell/sourcemap-codec x 19,876 ops/sec ±0.78% (95 runs sampled)
|
158 |
+
encode: sourcemap-codec x 6,983 ops/sec ±0.15% (100 runs sampled)
|
159 |
+
encode: source-map-0.6.1 x 5,070 ops/sec ±0.12% (102 runs sampled)
|
160 |
+
encode: source-map-0.8.0 x 5,641 ops/sec ±0.17% (100 runs sampled)
|
161 |
+
Fastest is encode: @jridgewell/sourcemap-codec
|
162 |
+
|
163 |
+
|
164 |
+
***
|
165 |
+
|
166 |
+
|
167 |
+
react.js.map - 5726 segments
|
168 |
+
|
169 |
+
Decode Memory Usage:
|
170 |
+
@jridgewell/sourcemap-codec 734848 bytes
|
171 |
+
sourcemap-codec 954200 bytes
|
172 |
+
source-map-0.6.1 2276432 bytes
|
173 |
+
source-map-0.8.0 955488 bytes
|
174 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
175 |
+
|
176 |
+
Decode speed:
|
177 |
+
decode: @jridgewell/sourcemap-codec x 5,723 ops/sec ±0.12% (98 runs sampled)
|
178 |
+
decode: sourcemap-codec x 4,555 ops/sec ±0.09% (101 runs sampled)
|
179 |
+
decode: source-map-0.6.1 x 437 ops/sec ±0.11% (93 runs sampled)
|
180 |
+
decode: source-map-0.8.0 x 3,441 ops/sec ±0.15% (100 runs sampled)
|
181 |
+
Fastest is decode: @jridgewell/sourcemap-codec
|
182 |
+
|
183 |
+
Encode Memory Usage:
|
184 |
+
@jridgewell/sourcemap-codec 638672 bytes
|
185 |
+
sourcemap-codec 1109840 bytes
|
186 |
+
source-map-0.6.1 1321224 bytes
|
187 |
+
source-map-0.8.0 1324448 bytes
|
188 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
189 |
+
|
190 |
+
Encode speed:
|
191 |
+
encode: @jridgewell/sourcemap-codec x 6,801 ops/sec ±0.48% (98 runs sampled)
|
192 |
+
encode: sourcemap-codec x 2,533 ops/sec ±0.13% (101 runs sampled)
|
193 |
+
encode: source-map-0.6.1 x 2,248 ops/sec ±0.08% (100 runs sampled)
|
194 |
+
encode: source-map-0.8.0 x 2,303 ops/sec ±0.15% (100 runs sampled)
|
195 |
+
Fastest is encode: @jridgewell/sourcemap-codec
|
196 |
+
```
|
197 |
+
|
198 |
+
# License
|
199 |
+
|
200 |
+
MIT
|
node_modules/@jridgewell/sourcemap-codec/package.json
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "@jridgewell/sourcemap-codec",
|
3 |
+
"version": "1.4.15",
|
4 |
+
"description": "Encode/decode sourcemap mappings",
|
5 |
+
"keywords": [
|
6 |
+
"sourcemap",
|
7 |
+
"vlq"
|
8 |
+
],
|
9 |
+
"main": "dist/sourcemap-codec.umd.js",
|
10 |
+
"module": "dist/sourcemap-codec.mjs",
|
11 |
+
"types": "dist/types/sourcemap-codec.d.ts",
|
12 |
+
"files": [
|
13 |
+
"dist"
|
14 |
+
],
|
15 |
+
"exports": {
|
16 |
+
".": [
|
17 |
+
{
|
18 |
+
"types": "./dist/types/sourcemap-codec.d.ts",
|
19 |
+
"browser": "./dist/sourcemap-codec.umd.js",
|
20 |
+
"require": "./dist/sourcemap-codec.umd.js",
|
21 |
+
"import": "./dist/sourcemap-codec.mjs"
|
22 |
+
},
|
23 |
+
"./dist/sourcemap-codec.umd.js"
|
24 |
+
],
|
25 |
+
"./package.json": "./package.json"
|
26 |
+
},
|
27 |
+
"scripts": {
|
28 |
+
"benchmark": "run-s build:rollup benchmark:*",
|
29 |
+
"benchmark:install": "cd benchmark && npm install",
|
30 |
+
"benchmark:only": "node --expose-gc benchmark/index.js",
|
31 |
+
"build": "run-s -n build:*",
|
32 |
+
"build:rollup": "rollup -c rollup.config.js",
|
33 |
+
"build:ts": "tsc --project tsconfig.build.json",
|
34 |
+
"lint": "run-s -n lint:*",
|
35 |
+
"lint:prettier": "npm run test:lint:prettier -- --write",
|
36 |
+
"lint:ts": "npm run test:lint:ts -- --fix",
|
37 |
+
"prebuild": "rm -rf dist",
|
38 |
+
"prepublishOnly": "npm run preversion",
|
39 |
+
"preversion": "run-s test build",
|
40 |
+
"pretest": "run-s build:rollup",
|
41 |
+
"test": "run-s -n test:lint test:only",
|
42 |
+
"test:debug": "mocha --inspect-brk",
|
43 |
+
"test:lint": "run-s -n test:lint:*",
|
44 |
+
"test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
|
45 |
+
"test:lint:ts": "eslint '{src,test}/**/*.ts'",
|
46 |
+
"test:only": "mocha",
|
47 |
+
"test:coverage": "c8 mocha",
|
48 |
+
"test:watch": "mocha --watch"
|
49 |
+
},
|
50 |
+
"repository": {
|
51 |
+
"type": "git",
|
52 |
+
"url": "git+https://github.com/jridgewell/sourcemap-codec.git"
|
53 |
+
},
|
54 |
+
"author": "Rich Harris",
|
55 |
+
"license": "MIT",
|
56 |
+
"devDependencies": {
|
57 |
+
"@rollup/plugin-typescript": "8.3.0",
|
58 |
+
"@types/node": "17.0.15",
|
59 |
+
"@typescript-eslint/eslint-plugin": "5.10.0",
|
60 |
+
"@typescript-eslint/parser": "5.10.0",
|
61 |
+
"benchmark": "2.1.4",
|
62 |
+
"c8": "7.11.2",
|
63 |
+
"eslint": "8.7.0",
|
64 |
+
"eslint-config-prettier": "8.3.0",
|
65 |
+
"mocha": "9.2.0",
|
66 |
+
"npm-run-all": "4.1.5",
|
67 |
+
"prettier": "2.5.1",
|
68 |
+
"rollup": "2.64.0",
|
69 |
+
"source-map": "0.6.1",
|
70 |
+
"source-map-js": "1.0.2",
|
71 |
+
"sourcemap-codec": "1.4.8",
|
72 |
+
"typescript": "4.5.4"
|
73 |
+
}
|
74 |
+
}
|
node_modules/@jridgewell/trace-mapping/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Copyright 2022 Justin Ridgewell <[email protected]>
|
2 |
+
|
3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
+
of this software and associated documentation files (the "Software"), to deal
|
5 |
+
in the Software without restriction, including without limitation the rights
|
6 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
+
copies of the Software, and to permit persons to whom the Software is
|
8 |
+
furnished to do so, subject to the following conditions:
|
9 |
+
|
10 |
+
The above copyright notice and this permission notice shall be included in
|
11 |
+
all 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,
|
15 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19 |
+
SOFTWARE.
|
node_modules/@jridgewell/trace-mapping/README.md
ADDED
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @jridgewell/trace-mapping
|
2 |
+
|
3 |
+
> Trace the original position through a source map
|
4 |
+
|
5 |
+
`trace-mapping` allows you to take the line and column of an output file and trace it to the
|
6 |
+
original location in the source file through a source map.
|
7 |
+
|
8 |
+
You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This
|
9 |
+
provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM.
|
10 |
+
|
11 |
+
## Installation
|
12 |
+
|
13 |
+
```sh
|
14 |
+
npm install @jridgewell/trace-mapping
|
15 |
+
```
|
16 |
+
|
17 |
+
## Usage
|
18 |
+
|
19 |
+
```typescript
|
20 |
+
import {
|
21 |
+
TraceMap,
|
22 |
+
originalPositionFor,
|
23 |
+
generatedPositionFor,
|
24 |
+
sourceContentFor,
|
25 |
+
} from '@jridgewell/trace-mapping';
|
26 |
+
|
27 |
+
const tracer = new TraceMap({
|
28 |
+
version: 3,
|
29 |
+
sources: ['input.js'],
|
30 |
+
sourcesContent: ['content of input.js'],
|
31 |
+
names: ['foo'],
|
32 |
+
mappings: 'KAyCIA',
|
33 |
+
});
|
34 |
+
|
35 |
+
// Lines start at line 1, columns at column 0.
|
36 |
+
const traced = originalPositionFor(tracer, { line: 1, column: 5 });
|
37 |
+
assert.deepEqual(traced, {
|
38 |
+
source: 'input.js',
|
39 |
+
line: 42,
|
40 |
+
column: 4,
|
41 |
+
name: 'foo',
|
42 |
+
});
|
43 |
+
|
44 |
+
const content = sourceContentFor(tracer, traced.source);
|
45 |
+
assert.strictEqual(content, 'content for input.js');
|
46 |
+
|
47 |
+
const generated = generatedPositionFor(tracer, {
|
48 |
+
source: 'input.js',
|
49 |
+
line: 42,
|
50 |
+
column: 4,
|
51 |
+
});
|
52 |
+
assert.deepEqual(generated, {
|
53 |
+
line: 1,
|
54 |
+
column: 5,
|
55 |
+
});
|
56 |
+
```
|
57 |
+
|
58 |
+
We also provide a lower level API to get the actual segment that matches our line and column. Unlike
|
59 |
+
`originalPositionFor`, `traceSegment` uses a 0-base for `line`:
|
60 |
+
|
61 |
+
```typescript
|
62 |
+
import { traceSegment } from '@jridgewell/trace-mapping';
|
63 |
+
|
64 |
+
// line is 0-base.
|
65 |
+
const traced = traceSegment(tracer, /* line */ 0, /* column */ 5);
|
66 |
+
|
67 |
+
// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]
|
68 |
+
// Again, line is 0-base and so is sourceLine
|
69 |
+
assert.deepEqual(traced, [5, 0, 41, 4, 0]);
|
70 |
+
```
|
71 |
+
|
72 |
+
### SectionedSourceMaps
|
73 |
+
|
74 |
+
The sourcemap spec defines a special `sections` field that's designed to handle concatenation of
|
75 |
+
output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool
|
76 |
+
produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap`
|
77 |
+
helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a
|
78 |
+
`TraceMap` instance:
|
79 |
+
|
80 |
+
```typescript
|
81 |
+
import { AnyMap } from '@jridgewell/trace-mapping';
|
82 |
+
const fooOutput = 'foo';
|
83 |
+
const barOutput = 'bar';
|
84 |
+
const output = [fooOutput, barOutput].join('\n');
|
85 |
+
|
86 |
+
const sectioned = new AnyMap({
|
87 |
+
version: 3,
|
88 |
+
sections: [
|
89 |
+
{
|
90 |
+
// 0-base line and column
|
91 |
+
offset: { line: 0, column: 0 },
|
92 |
+
// fooOutput's sourcemap
|
93 |
+
map: {
|
94 |
+
version: 3,
|
95 |
+
sources: ['foo.js'],
|
96 |
+
names: ['foo'],
|
97 |
+
mappings: 'AAAAA',
|
98 |
+
},
|
99 |
+
},
|
100 |
+
{
|
101 |
+
// barOutput's sourcemap will not affect the first line, only the second
|
102 |
+
offset: { line: 1, column: 0 },
|
103 |
+
map: {
|
104 |
+
version: 3,
|
105 |
+
sources: ['bar.js'],
|
106 |
+
names: ['bar'],
|
107 |
+
mappings: 'AAAAA',
|
108 |
+
},
|
109 |
+
},
|
110 |
+
],
|
111 |
+
});
|
112 |
+
|
113 |
+
const traced = originalPositionFor(sectioned, {
|
114 |
+
line: 2,
|
115 |
+
column: 0,
|
116 |
+
});
|
117 |
+
|
118 |
+
assert.deepEqual(traced, {
|
119 |
+
source: 'bar.js',
|
120 |
+
line: 1,
|
121 |
+
column: 0,
|
122 |
+
name: 'bar',
|
123 |
+
});
|
124 |
+
```
|
125 |
+
|
126 |
+
## Benchmarks
|
127 |
+
|
128 |
+
```
|
129 |
+
node v18.0.0
|
130 |
+
|
131 |
+
amp.js.map - 45120 segments
|
132 |
+
|
133 |
+
Memory Usage:
|
134 |
+
trace-mapping decoded 562400 bytes
|
135 |
+
trace-mapping encoded 5706544 bytes
|
136 |
+
source-map-js 10717664 bytes
|
137 |
+
source-map-0.6.1 17446384 bytes
|
138 |
+
source-map-0.8.0 9701757 bytes
|
139 |
+
Smallest memory usage is trace-mapping decoded
|
140 |
+
|
141 |
+
Init speed:
|
142 |
+
trace-mapping: decoded JSON input x 180 ops/sec ±0.34% (85 runs sampled)
|
143 |
+
trace-mapping: encoded JSON input x 364 ops/sec ±1.77% (89 runs sampled)
|
144 |
+
trace-mapping: decoded Object input x 3,116 ops/sec ±0.50% (96 runs sampled)
|
145 |
+
trace-mapping: encoded Object input x 410 ops/sec ±2.62% (85 runs sampled)
|
146 |
+
source-map-js: encoded Object input x 84.23 ops/sec ±0.91% (73 runs sampled)
|
147 |
+
source-map-0.6.1: encoded Object input x 37.21 ops/sec ±2.08% (51 runs sampled)
|
148 |
+
Fastest is trace-mapping: decoded Object input
|
149 |
+
|
150 |
+
Trace speed:
|
151 |
+
trace-mapping: decoded originalPositionFor x 3,952,212 ops/sec ±0.17% (98 runs sampled)
|
152 |
+
trace-mapping: encoded originalPositionFor x 3,487,468 ops/sec ±1.58% (90 runs sampled)
|
153 |
+
source-map-js: encoded originalPositionFor x 827,730 ops/sec ±0.78% (97 runs sampled)
|
154 |
+
source-map-0.6.1: encoded originalPositionFor x 748,991 ops/sec ±0.53% (94 runs sampled)
|
155 |
+
source-map-0.8.0: encoded originalPositionFor x 2,532,894 ops/sec ±0.57% (95 runs sampled)
|
156 |
+
Fastest is trace-mapping: decoded originalPositionFor
|
157 |
+
|
158 |
+
|
159 |
+
***
|
160 |
+
|
161 |
+
|
162 |
+
babel.min.js.map - 347793 segments
|
163 |
+
|
164 |
+
Memory Usage:
|
165 |
+
trace-mapping decoded 89832 bytes
|
166 |
+
trace-mapping encoded 35474640 bytes
|
167 |
+
source-map-js 51257176 bytes
|
168 |
+
source-map-0.6.1 63515664 bytes
|
169 |
+
source-map-0.8.0 42933752 bytes
|
170 |
+
Smallest memory usage is trace-mapping decoded
|
171 |
+
|
172 |
+
Init speed:
|
173 |
+
trace-mapping: decoded JSON input x 15.41 ops/sec ±8.65% (34 runs sampled)
|
174 |
+
trace-mapping: encoded JSON input x 28.20 ops/sec ±12.87% (42 runs sampled)
|
175 |
+
trace-mapping: decoded Object input x 964 ops/sec ±0.36% (99 runs sampled)
|
176 |
+
trace-mapping: encoded Object input x 31.77 ops/sec ±13.79% (45 runs sampled)
|
177 |
+
source-map-js: encoded Object input x 6.45 ops/sec ±5.16% (21 runs sampled)
|
178 |
+
source-map-0.6.1: encoded Object input x 4.07 ops/sec ±5.24% (15 runs sampled)
|
179 |
+
Fastest is trace-mapping: decoded Object input
|
180 |
+
|
181 |
+
Trace speed:
|
182 |
+
trace-mapping: decoded originalPositionFor x 7,183,038 ops/sec ±0.58% (95 runs sampled)
|
183 |
+
trace-mapping: encoded originalPositionFor x 5,192,185 ops/sec ±0.41% (100 runs sampled)
|
184 |
+
source-map-js: encoded originalPositionFor x 4,259,489 ops/sec ±0.79% (94 runs sampled)
|
185 |
+
source-map-0.6.1: encoded originalPositionFor x 3,742,629 ops/sec ±0.71% (95 runs sampled)
|
186 |
+
source-map-0.8.0: encoded originalPositionFor x 6,270,211 ops/sec ±0.64% (94 runs sampled)
|
187 |
+
Fastest is trace-mapping: decoded originalPositionFor
|
188 |
+
|
189 |
+
|
190 |
+
***
|
191 |
+
|
192 |
+
|
193 |
+
preact.js.map - 1992 segments
|
194 |
+
|
195 |
+
Memory Usage:
|
196 |
+
trace-mapping decoded 37128 bytes
|
197 |
+
trace-mapping encoded 247280 bytes
|
198 |
+
source-map-js 1143536 bytes
|
199 |
+
source-map-0.6.1 1290992 bytes
|
200 |
+
source-map-0.8.0 96544 bytes
|
201 |
+
Smallest memory usage is trace-mapping decoded
|
202 |
+
|
203 |
+
Init speed:
|
204 |
+
trace-mapping: decoded JSON input x 3,483 ops/sec ±0.30% (98 runs sampled)
|
205 |
+
trace-mapping: encoded JSON input x 6,092 ops/sec ±0.18% (97 runs sampled)
|
206 |
+
trace-mapping: decoded Object input x 249,076 ops/sec ±0.24% (98 runs sampled)
|
207 |
+
trace-mapping: encoded Object input x 14,555 ops/sec ±0.48% (100 runs sampled)
|
208 |
+
source-map-js: encoded Object input x 2,447 ops/sec ±0.36% (99 runs sampled)
|
209 |
+
source-map-0.6.1: encoded Object input x 1,201 ops/sec ±0.57% (96 runs sampled)
|
210 |
+
Fastest is trace-mapping: decoded Object input
|
211 |
+
|
212 |
+
Trace speed:
|
213 |
+
trace-mapping: decoded originalPositionFor x 7,620,192 ops/sec ±0.09% (99 runs sampled)
|
214 |
+
trace-mapping: encoded originalPositionFor x 6,872,554 ops/sec ±0.30% (97 runs sampled)
|
215 |
+
source-map-js: encoded originalPositionFor x 2,489,570 ops/sec ±0.35% (94 runs sampled)
|
216 |
+
source-map-0.6.1: encoded originalPositionFor x 1,698,633 ops/sec ±0.28% (98 runs sampled)
|
217 |
+
source-map-0.8.0: encoded originalPositionFor x 4,015,644 ops/sec ±0.22% (98 runs sampled)
|
218 |
+
Fastest is trace-mapping: decoded originalPositionFor
|
219 |
+
|
220 |
+
|
221 |
+
***
|
222 |
+
|
223 |
+
|
224 |
+
react.js.map - 5726 segments
|
225 |
+
|
226 |
+
Memory Usage:
|
227 |
+
trace-mapping decoded 16176 bytes
|
228 |
+
trace-mapping encoded 681552 bytes
|
229 |
+
source-map-js 2418352 bytes
|
230 |
+
source-map-0.6.1 2443672 bytes
|
231 |
+
source-map-0.8.0 111768 bytes
|
232 |
+
Smallest memory usage is trace-mapping decoded
|
233 |
+
|
234 |
+
Init speed:
|
235 |
+
trace-mapping: decoded JSON input x 1,720 ops/sec ±0.34% (98 runs sampled)
|
236 |
+
trace-mapping: encoded JSON input x 4,406 ops/sec ±0.35% (100 runs sampled)
|
237 |
+
trace-mapping: decoded Object input x 92,122 ops/sec ±0.10% (99 runs sampled)
|
238 |
+
trace-mapping: encoded Object input x 5,385 ops/sec ±0.37% (99 runs sampled)
|
239 |
+
source-map-js: encoded Object input x 794 ops/sec ±0.40% (98 runs sampled)
|
240 |
+
source-map-0.6.1: encoded Object input x 416 ops/sec ±0.54% (91 runs sampled)
|
241 |
+
Fastest is trace-mapping: decoded Object input
|
242 |
+
|
243 |
+
Trace speed:
|
244 |
+
trace-mapping: decoded originalPositionFor x 32,759,519 ops/sec ±0.33% (100 runs sampled)
|
245 |
+
trace-mapping: encoded originalPositionFor x 31,116,306 ops/sec ±0.33% (97 runs sampled)
|
246 |
+
source-map-js: encoded originalPositionFor x 17,458,435 ops/sec ±0.44% (97 runs sampled)
|
247 |
+
source-map-0.6.1: encoded originalPositionFor x 12,687,097 ops/sec ±0.43% (95 runs sampled)
|
248 |
+
source-map-0.8.0: encoded originalPositionFor x 23,538,275 ops/sec ±0.38% (95 runs sampled)
|
249 |
+
Fastest is trace-mapping: decoded originalPositionFor
|
250 |
+
```
|
251 |
+
|
252 |
+
[source-map]: https://www.npmjs.com/package/source-map
|
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The MIT License
|
2 |
+
|
3 |
+
Copyright (c) 2015 Rich Harris
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in
|
13 |
+
all copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21 |
+
THE SOFTWARE.
|
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/README.md
ADDED
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# sourcemap-codec
|
2 |
+
|
3 |
+
Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit).
|
4 |
+
|
5 |
+
|
6 |
+
## Why?
|
7 |
+
|
8 |
+
Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap.
|
9 |
+
|
10 |
+
This package makes the process slightly easier.
|
11 |
+
|
12 |
+
|
13 |
+
## Installation
|
14 |
+
|
15 |
+
```bash
|
16 |
+
npm install sourcemap-codec
|
17 |
+
```
|
18 |
+
|
19 |
+
|
20 |
+
## Usage
|
21 |
+
|
22 |
+
```js
|
23 |
+
import { encode, decode } from 'sourcemap-codec';
|
24 |
+
|
25 |
+
var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
|
26 |
+
|
27 |
+
assert.deepEqual( decoded, [
|
28 |
+
// the first line (of the generated code) has no mappings,
|
29 |
+
// as shown by the starting semi-colon (which separates lines)
|
30 |
+
[],
|
31 |
+
|
32 |
+
// the second line contains four (comma-separated) segments
|
33 |
+
[
|
34 |
+
// segments are encoded as you'd expect:
|
35 |
+
// [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ]
|
36 |
+
|
37 |
+
// i.e. the first segment begins at column 2, and maps back to the second column
|
38 |
+
// of the second line (both zero-based) of the 0th source, and uses the 0th
|
39 |
+
// name in the `map.names` array
|
40 |
+
[ 2, 0, 2, 2, 0 ],
|
41 |
+
|
42 |
+
// the remaining segments are 4-length rather than 5-length,
|
43 |
+
// because they don't map a name
|
44 |
+
[ 4, 0, 2, 4 ],
|
45 |
+
[ 6, 0, 2, 5 ],
|
46 |
+
[ 7, 0, 2, 7 ]
|
47 |
+
],
|
48 |
+
|
49 |
+
// the final line contains two segments
|
50 |
+
[
|
51 |
+
[ 2, 1, 10, 19 ],
|
52 |
+
[ 12, 1, 11, 20 ]
|
53 |
+
]
|
54 |
+
]);
|
55 |
+
|
56 |
+
var encoded = encode( decoded );
|
57 |
+
assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
|
58 |
+
```
|
59 |
+
|
60 |
+
## Benchmarks
|
61 |
+
|
62 |
+
```
|
63 |
+
node v18.0.0
|
64 |
+
|
65 |
+
amp.js.map - 45120 segments
|
66 |
+
|
67 |
+
Decode Memory Usage:
|
68 |
+
@jridgewell/sourcemap-codec 5479160 bytes
|
69 |
+
sourcemap-codec 5659336 bytes
|
70 |
+
source-map-0.6.1 17144440 bytes
|
71 |
+
source-map-0.8.0 6867424 bytes
|
72 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
73 |
+
|
74 |
+
Decode speed:
|
75 |
+
decode: @jridgewell/sourcemap-codec x 502 ops/sec ±1.03% (90 runs sampled)
|
76 |
+
decode: sourcemap-codec x 445 ops/sec ±0.97% (92 runs sampled)
|
77 |
+
decode: source-map-0.6.1 x 36.01 ops/sec ±1.64% (49 runs sampled)
|
78 |
+
decode: source-map-0.8.0 x 367 ops/sec ±0.04% (95 runs sampled)
|
79 |
+
Fastest is decode: @jridgewell/sourcemap-codec
|
80 |
+
|
81 |
+
Encode Memory Usage:
|
82 |
+
@jridgewell/sourcemap-codec 1261620 bytes
|
83 |
+
sourcemap-codec 9119248 bytes
|
84 |
+
source-map-0.6.1 8968560 bytes
|
85 |
+
source-map-0.8.0 8952952 bytes
|
86 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
87 |
+
|
88 |
+
Encode speed:
|
89 |
+
encode: @jridgewell/sourcemap-codec x 738 ops/sec ±0.42% (98 runs sampled)
|
90 |
+
encode: sourcemap-codec x 238 ops/sec ±0.73% (88 runs sampled)
|
91 |
+
encode: source-map-0.6.1 x 162 ops/sec ±0.43% (84 runs sampled)
|
92 |
+
encode: source-map-0.8.0 x 191 ops/sec ±0.34% (90 runs sampled)
|
93 |
+
Fastest is encode: @jridgewell/sourcemap-codec
|
94 |
+
|
95 |
+
|
96 |
+
***
|
97 |
+
|
98 |
+
|
99 |
+
babel.min.js.map - 347793 segments
|
100 |
+
|
101 |
+
Decode Memory Usage:
|
102 |
+
@jridgewell/sourcemap-codec 35338184 bytes
|
103 |
+
sourcemap-codec 35922736 bytes
|
104 |
+
source-map-0.6.1 62366360 bytes
|
105 |
+
source-map-0.8.0 44337416 bytes
|
106 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
107 |
+
|
108 |
+
Decode speed:
|
109 |
+
decode: @jridgewell/sourcemap-codec x 40.35 ops/sec ±4.47% (54 runs sampled)
|
110 |
+
decode: sourcemap-codec x 36.76 ops/sec ±3.67% (51 runs sampled)
|
111 |
+
decode: source-map-0.6.1 x 4.44 ops/sec ±2.15% (16 runs sampled)
|
112 |
+
decode: source-map-0.8.0 x 59.35 ops/sec ±0.05% (78 runs sampled)
|
113 |
+
Fastest is decode: source-map-0.8.0
|
114 |
+
|
115 |
+
Encode Memory Usage:
|
116 |
+
@jridgewell/sourcemap-codec 7212604 bytes
|
117 |
+
sourcemap-codec 21421456 bytes
|
118 |
+
source-map-0.6.1 25286888 bytes
|
119 |
+
source-map-0.8.0 25498744 bytes
|
120 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
121 |
+
|
122 |
+
Encode speed:
|
123 |
+
encode: @jridgewell/sourcemap-codec x 112 ops/sec ±0.13% (84 runs sampled)
|
124 |
+
encode: sourcemap-codec x 30.23 ops/sec ±2.76% (53 runs sampled)
|
125 |
+
encode: source-map-0.6.1 x 19.43 ops/sec ±3.70% (37 runs sampled)
|
126 |
+
encode: source-map-0.8.0 x 19.40 ops/sec ±3.26% (37 runs sampled)
|
127 |
+
Fastest is encode: @jridgewell/sourcemap-codec
|
128 |
+
|
129 |
+
|
130 |
+
***
|
131 |
+
|
132 |
+
|
133 |
+
preact.js.map - 1992 segments
|
134 |
+
|
135 |
+
Decode Memory Usage:
|
136 |
+
@jridgewell/sourcemap-codec 500272 bytes
|
137 |
+
sourcemap-codec 516864 bytes
|
138 |
+
source-map-0.6.1 1596672 bytes
|
139 |
+
source-map-0.8.0 517272 bytes
|
140 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
141 |
+
|
142 |
+
Decode speed:
|
143 |
+
decode: @jridgewell/sourcemap-codec x 16,137 ops/sec ±0.17% (99 runs sampled)
|
144 |
+
decode: sourcemap-codec x 12,139 ops/sec ±0.13% (99 runs sampled)
|
145 |
+
decode: source-map-0.6.1 x 1,264 ops/sec ±0.12% (100 runs sampled)
|
146 |
+
decode: source-map-0.8.0 x 9,894 ops/sec ±0.08% (101 runs sampled)
|
147 |
+
Fastest is decode: @jridgewell/sourcemap-codec
|
148 |
+
|
149 |
+
Encode Memory Usage:
|
150 |
+
@jridgewell/sourcemap-codec 321026 bytes
|
151 |
+
sourcemap-codec 830832 bytes
|
152 |
+
source-map-0.6.1 586608 bytes
|
153 |
+
source-map-0.8.0 586680 bytes
|
154 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
155 |
+
|
156 |
+
Encode speed:
|
157 |
+
encode: @jridgewell/sourcemap-codec x 19,876 ops/sec ±0.78% (95 runs sampled)
|
158 |
+
encode: sourcemap-codec x 6,983 ops/sec ±0.15% (100 runs sampled)
|
159 |
+
encode: source-map-0.6.1 x 5,070 ops/sec ±0.12% (102 runs sampled)
|
160 |
+
encode: source-map-0.8.0 x 5,641 ops/sec ±0.17% (100 runs sampled)
|
161 |
+
Fastest is encode: @jridgewell/sourcemap-codec
|
162 |
+
|
163 |
+
|
164 |
+
***
|
165 |
+
|
166 |
+
|
167 |
+
react.js.map - 5726 segments
|
168 |
+
|
169 |
+
Decode Memory Usage:
|
170 |
+
@jridgewell/sourcemap-codec 734848 bytes
|
171 |
+
sourcemap-codec 954200 bytes
|
172 |
+
source-map-0.6.1 2276432 bytes
|
173 |
+
source-map-0.8.0 955488 bytes
|
174 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
175 |
+
|
176 |
+
Decode speed:
|
177 |
+
decode: @jridgewell/sourcemap-codec x 5,723 ops/sec ±0.12% (98 runs sampled)
|
178 |
+
decode: sourcemap-codec x 4,555 ops/sec ±0.09% (101 runs sampled)
|
179 |
+
decode: source-map-0.6.1 x 437 ops/sec ±0.11% (93 runs sampled)
|
180 |
+
decode: source-map-0.8.0 x 3,441 ops/sec ±0.15% (100 runs sampled)
|
181 |
+
Fastest is decode: @jridgewell/sourcemap-codec
|
182 |
+
|
183 |
+
Encode Memory Usage:
|
184 |
+
@jridgewell/sourcemap-codec 638672 bytes
|
185 |
+
sourcemap-codec 1109840 bytes
|
186 |
+
source-map-0.6.1 1321224 bytes
|
187 |
+
source-map-0.8.0 1324448 bytes
|
188 |
+
Smallest memory usage is @jridgewell/sourcemap-codec
|
189 |
+
|
190 |
+
Encode speed:
|
191 |
+
encode: @jridgewell/sourcemap-codec x 6,801 ops/sec ±0.48% (98 runs sampled)
|
192 |
+
encode: sourcemap-codec x 2,533 ops/sec ±0.13% (101 runs sampled)
|
193 |
+
encode: source-map-0.6.1 x 2,248 ops/sec ±0.08% (100 runs sampled)
|
194 |
+
encode: source-map-0.8.0 x 2,303 ops/sec ±0.15% (100 runs sampled)
|
195 |
+
Fastest is encode: @jridgewell/sourcemap-codec
|
196 |
+
```
|
197 |
+
|
198 |
+
# License
|
199 |
+
|
200 |
+
MIT
|
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/package.json
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "@jridgewell/sourcemap-codec",
|
3 |
+
"version": "1.4.14",
|
4 |
+
"description": "Encode/decode sourcemap mappings",
|
5 |
+
"keywords": [
|
6 |
+
"sourcemap",
|
7 |
+
"vlq"
|
8 |
+
],
|
9 |
+
"main": "dist/sourcemap-codec.umd.js",
|
10 |
+
"module": "dist/sourcemap-codec.mjs",
|
11 |
+
"typings": "dist/types/sourcemap-codec.d.ts",
|
12 |
+
"files": [
|
13 |
+
"dist",
|
14 |
+
"src"
|
15 |
+
],
|
16 |
+
"exports": {
|
17 |
+
".": [
|
18 |
+
{
|
19 |
+
"types": "./dist/types/sourcemap-codec.d.ts",
|
20 |
+
"browser": "./dist/sourcemap-codec.umd.js",
|
21 |
+
"import": "./dist/sourcemap-codec.mjs",
|
22 |
+
"require": "./dist/sourcemap-codec.umd.js"
|
23 |
+
},
|
24 |
+
"./dist/sourcemap-codec.umd.js"
|
25 |
+
],
|
26 |
+
"./package.json": "./package.json"
|
27 |
+
},
|
28 |
+
"scripts": {
|
29 |
+
"benchmark": "run-s build:rollup benchmark:*",
|
30 |
+
"benchmark:install": "cd benchmark && npm install",
|
31 |
+
"benchmark:only": "node --expose-gc benchmark/index.js",
|
32 |
+
"build": "run-s -n build:*",
|
33 |
+
"build:rollup": "rollup -c rollup.config.js",
|
34 |
+
"build:ts": "tsc --project tsconfig.build.json",
|
35 |
+
"lint": "run-s -n lint:*",
|
36 |
+
"lint:prettier": "npm run test:lint:prettier -- --write",
|
37 |
+
"lint:ts": "npm run test:lint:ts -- --fix",
|
38 |
+
"prebuild": "rm -rf dist",
|
39 |
+
"prepublishOnly": "npm run preversion",
|
40 |
+
"preversion": "run-s test build",
|
41 |
+
"pretest": "run-s build:rollup",
|
42 |
+
"test": "run-s -n test:lint test:only",
|
43 |
+
"test:debug": "mocha --inspect-brk",
|
44 |
+
"test:lint": "run-s -n test:lint:*",
|
45 |
+
"test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
|
46 |
+
"test:lint:ts": "eslint '{src,test}/**/*.ts'",
|
47 |
+
"test:only": "mocha",
|
48 |
+
"test:coverage": "c8 mocha",
|
49 |
+
"test:watch": "mocha --watch"
|
50 |
+
},
|
51 |
+
"repository": {
|
52 |
+
"type": "git",
|
53 |
+
"url": "git+https://github.com/jridgewell/sourcemap-codec.git"
|
54 |
+
},
|
55 |
+
"author": "Rich Harris",
|
56 |
+
"license": "MIT",
|
57 |
+
"devDependencies": {
|
58 |
+
"@rollup/plugin-typescript": "8.3.0",
|
59 |
+
"@types/node": "17.0.15",
|
60 |
+
"@typescript-eslint/eslint-plugin": "5.10.0",
|
61 |
+
"@typescript-eslint/parser": "5.10.0",
|
62 |
+
"benchmark": "2.1.4",
|
63 |
+
"c8": "7.11.2",
|
64 |
+
"eslint": "8.7.0",
|
65 |
+
"eslint-config-prettier": "8.3.0",
|
66 |
+
"mocha": "9.2.0",
|
67 |
+
"npm-run-all": "4.1.5",
|
68 |
+
"prettier": "2.5.1",
|
69 |
+
"rollup": "2.64.0",
|
70 |
+
"source-map": "0.6.1",
|
71 |
+
"source-map-js": "1.0.2",
|
72 |
+
"sourcemap-codec": "1.4.8",
|
73 |
+
"typescript": "4.5.4"
|
74 |
+
}
|
75 |
+
}
|
node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts
ADDED
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export type SourceMapSegment =
|
2 |
+
| [number]
|
3 |
+
| [number, number, number, number]
|
4 |
+
| [number, number, number, number, number];
|
5 |
+
export type SourceMapLine = SourceMapSegment[];
|
6 |
+
export type SourceMapMappings = SourceMapLine[];
|
7 |
+
|
8 |
+
const comma = ','.charCodeAt(0);
|
9 |
+
const semicolon = ';'.charCodeAt(0);
|
10 |
+
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
11 |
+
const intToChar = new Uint8Array(64); // 64 possible chars.
|
12 |
+
const charToInt = new Uint8Array(128); // z is 122 in ASCII
|
13 |
+
|
14 |
+
for (let i = 0; i < chars.length; i++) {
|
15 |
+
const c = chars.charCodeAt(i);
|
16 |
+
intToChar[i] = c;
|
17 |
+
charToInt[c] = i;
|
18 |
+
}
|
19 |
+
|
20 |
+
// Provide a fallback for older environments.
|
21 |
+
const td =
|
22 |
+
typeof TextDecoder !== 'undefined'
|
23 |
+
? /* #__PURE__ */ new TextDecoder()
|
24 |
+
: typeof Buffer !== 'undefined'
|
25 |
+
? {
|
26 |
+
decode(buf: Uint8Array) {
|
27 |
+
const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
|
28 |
+
return out.toString();
|
29 |
+
},
|
30 |
+
}
|
31 |
+
: {
|
32 |
+
decode(buf: Uint8Array) {
|
33 |
+
let out = '';
|
34 |
+
for (let i = 0; i < buf.length; i++) {
|
35 |
+
out += String.fromCharCode(buf[i]);
|
36 |
+
}
|
37 |
+
return out;
|
38 |
+
},
|
39 |
+
};
|
40 |
+
|
41 |
+
export function decode(mappings: string): SourceMapMappings {
|
42 |
+
const state: [number, number, number, number, number] = new Int32Array(5) as any;
|
43 |
+
const decoded: SourceMapMappings = [];
|
44 |
+
|
45 |
+
let index = 0;
|
46 |
+
do {
|
47 |
+
const semi = indexOf(mappings, index);
|
48 |
+
const line: SourceMapLine = [];
|
49 |
+
let sorted = true;
|
50 |
+
let lastCol = 0;
|
51 |
+
state[0] = 0;
|
52 |
+
|
53 |
+
for (let i = index; i < semi; i++) {
|
54 |
+
let seg: SourceMapSegment;
|
55 |
+
|
56 |
+
i = decodeInteger(mappings, i, state, 0); // genColumn
|
57 |
+
const col = state[0];
|
58 |
+
if (col < lastCol) sorted = false;
|
59 |
+
lastCol = col;
|
60 |
+
|
61 |
+
if (hasMoreVlq(mappings, i, semi)) {
|
62 |
+
i = decodeInteger(mappings, i, state, 1); // sourcesIndex
|
63 |
+
i = decodeInteger(mappings, i, state, 2); // sourceLine
|
64 |
+
i = decodeInteger(mappings, i, state, 3); // sourceColumn
|
65 |
+
|
66 |
+
if (hasMoreVlq(mappings, i, semi)) {
|
67 |
+
i = decodeInteger(mappings, i, state, 4); // namesIndex
|
68 |
+
seg = [col, state[1], state[2], state[3], state[4]];
|
69 |
+
} else {
|
70 |
+
seg = [col, state[1], state[2], state[3]];
|
71 |
+
}
|
72 |
+
} else {
|
73 |
+
seg = [col];
|
74 |
+
}
|
75 |
+
|
76 |
+
line.push(seg);
|
77 |
+
}
|
78 |
+
|
79 |
+
if (!sorted) sort(line);
|
80 |
+
decoded.push(line);
|
81 |
+
index = semi + 1;
|
82 |
+
} while (index <= mappings.length);
|
83 |
+
|
84 |
+
return decoded;
|
85 |
+
}
|
86 |
+
|
87 |
+
function indexOf(mappings: string, index: number): number {
|
88 |
+
const idx = mappings.indexOf(';', index);
|
89 |
+
return idx === -1 ? mappings.length : idx;
|
90 |
+
}
|
91 |
+
|
92 |
+
function decodeInteger(mappings: string, pos: number, state: SourceMapSegment, j: number): number {
|
93 |
+
let value = 0;
|
94 |
+
let shift = 0;
|
95 |
+
let integer = 0;
|
96 |
+
|
97 |
+
do {
|
98 |
+
const c = mappings.charCodeAt(pos++);
|
99 |
+
integer = charToInt[c];
|
100 |
+
value |= (integer & 31) << shift;
|
101 |
+
shift += 5;
|
102 |
+
} while (integer & 32);
|
103 |
+
|
104 |
+
const shouldNegate = value & 1;
|
105 |
+
value >>>= 1;
|
106 |
+
|
107 |
+
if (shouldNegate) {
|
108 |
+
value = -0x80000000 | -value;
|
109 |
+
}
|
110 |
+
|
111 |
+
state[j] += value;
|
112 |
+
return pos;
|
113 |
+
}
|
114 |
+
|
115 |
+
function hasMoreVlq(mappings: string, i: number, length: number): boolean {
|
116 |
+
if (i >= length) return false;
|
117 |
+
return mappings.charCodeAt(i) !== comma;
|
118 |
+
}
|
119 |
+
|
120 |
+
function sort(line: SourceMapSegment[]) {
|
121 |
+
line.sort(sortComparator);
|
122 |
+
}
|
123 |
+
|
124 |
+
function sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {
|
125 |
+
return a[0] - b[0];
|
126 |
+
}
|
127 |
+
|
128 |
+
export function encode(decoded: SourceMapMappings): string;
|
129 |
+
export function encode(decoded: Readonly<SourceMapMappings>): string;
|
130 |
+
export function encode(decoded: Readonly<SourceMapMappings>): string {
|
131 |
+
const state: [number, number, number, number, number] = new Int32Array(5) as any;
|
132 |
+
const bufLength = 1024 * 16;
|
133 |
+
const subLength = bufLength - 36;
|
134 |
+
const buf = new Uint8Array(bufLength);
|
135 |
+
const sub = buf.subarray(0, subLength);
|
136 |
+
let pos = 0;
|
137 |
+
let out = '';
|
138 |
+
|
139 |
+
for (let i = 0; i < decoded.length; i++) {
|
140 |
+
const line = decoded[i];
|
141 |
+
if (i > 0) {
|
142 |
+
if (pos === bufLength) {
|
143 |
+
out += td.decode(buf);
|
144 |
+
pos = 0;
|
145 |
+
}
|
146 |
+
buf[pos++] = semicolon;
|
147 |
+
}
|
148 |
+
if (line.length === 0) continue;
|
149 |
+
|
150 |
+
state[0] = 0;
|
151 |
+
|
152 |
+
for (let j = 0; j < line.length; j++) {
|
153 |
+
const segment = line[j];
|
154 |
+
// We can push up to 5 ints, each int can take at most 7 chars, and we
|
155 |
+
// may push a comma.
|
156 |
+
if (pos > subLength) {
|
157 |
+
out += td.decode(sub);
|
158 |
+
buf.copyWithin(0, subLength, pos);
|
159 |
+
pos -= subLength;
|
160 |
+
}
|
161 |
+
if (j > 0) buf[pos++] = comma;
|
162 |
+
|
163 |
+
pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
|
164 |
+
|
165 |
+
if (segment.length === 1) continue;
|
166 |
+
pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
|
167 |
+
pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
|
168 |
+
pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
|
169 |
+
|
170 |
+
if (segment.length === 4) continue;
|
171 |
+
pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
return out + td.decode(buf.subarray(0, pos));
|
176 |
+
}
|
177 |
+
|
178 |
+
function encodeInteger(
|
179 |
+
buf: Uint8Array,
|
180 |
+
pos: number,
|
181 |
+
state: SourceMapSegment,
|
182 |
+
segment: SourceMapSegment,
|
183 |
+
j: number,
|
184 |
+
): number {
|
185 |
+
const next = segment[j];
|
186 |
+
let num = next - state[j];
|
187 |
+
state[j] = next;
|
188 |
+
|
189 |
+
num = num < 0 ? (-num << 1) | 1 : num << 1;
|
190 |
+
do {
|
191 |
+
let clamped = num & 0b011111;
|
192 |
+
num >>>= 5;
|
193 |
+
if (num > 0) clamped |= 0b100000;
|
194 |
+
buf[pos++] = intToChar[clamped];
|
195 |
+
} while (num > 0);
|
196 |
+
|
197 |
+
return pos;
|
198 |
+
}
|
node_modules/@jridgewell/trace-mapping/package.json
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "@jridgewell/trace-mapping",
|
3 |
+
"version": "0.3.18",
|
4 |
+
"description": "Trace the original position through a source map",
|
5 |
+
"keywords": [
|
6 |
+
"source",
|
7 |
+
"map"
|
8 |
+
],
|
9 |
+
"main": "dist/trace-mapping.umd.js",
|
10 |
+
"module": "dist/trace-mapping.mjs",
|
11 |
+
"types": "dist/types/trace-mapping.d.ts",
|
12 |
+
"files": [
|
13 |
+
"dist"
|
14 |
+
],
|
15 |
+
"exports": {
|
16 |
+
".": [
|
17 |
+
{
|
18 |
+
"types": "./dist/types/trace-mapping.d.ts",
|
19 |
+
"browser": "./dist/trace-mapping.umd.js",
|
20 |
+
"require": "./dist/trace-mapping.umd.js",
|
21 |
+
"import": "./dist/trace-mapping.mjs"
|
22 |
+
},
|
23 |
+
"./dist/trace-mapping.umd.js"
|
24 |
+
],
|
25 |
+
"./package.json": "./package.json"
|
26 |
+
},
|
27 |
+
"author": "Justin Ridgewell <[email protected]>",
|
28 |
+
"repository": {
|
29 |
+
"type": "git",
|
30 |
+
"url": "git+https://github.com/jridgewell/trace-mapping.git"
|
31 |
+
},
|
32 |
+
"license": "MIT",
|
33 |
+
"scripts": {
|
34 |
+
"benchmark": "run-s build:rollup benchmark:*",
|
35 |
+
"benchmark:install": "cd benchmark && npm install",
|
36 |
+
"benchmark:only": "node --expose-gc benchmark/index.mjs",
|
37 |
+
"build": "run-s -n build:*",
|
38 |
+
"build:rollup": "rollup -c rollup.config.js",
|
39 |
+
"build:ts": "tsc --project tsconfig.build.json",
|
40 |
+
"lint": "run-s -n lint:*",
|
41 |
+
"lint:prettier": "npm run test:lint:prettier -- --write",
|
42 |
+
"lint:ts": "npm run test:lint:ts -- --fix",
|
43 |
+
"prebuild": "rm -rf dist",
|
44 |
+
"prepublishOnly": "npm run preversion",
|
45 |
+
"preversion": "run-s test build",
|
46 |
+
"test": "run-s -n test:lint test:only",
|
47 |
+
"test:debug": "ava debug",
|
48 |
+
"test:lint": "run-s -n test:lint:*",
|
49 |
+
"test:lint:prettier": "prettier --check '{src,test}/**/*.ts' '**/*.md'",
|
50 |
+
"test:lint:ts": "eslint '{src,test}/**/*.ts'",
|
51 |
+
"test:only": "c8 ava",
|
52 |
+
"test:watch": "ava --watch"
|
53 |
+
},
|
54 |
+
"devDependencies": {
|
55 |
+
"@rollup/plugin-typescript": "8.5.0",
|
56 |
+
"@typescript-eslint/eslint-plugin": "5.39.0",
|
57 |
+
"@typescript-eslint/parser": "5.39.0",
|
58 |
+
"ava": "4.3.3",
|
59 |
+
"benchmark": "2.1.4",
|
60 |
+
"c8": "7.12.0",
|
61 |
+
"esbuild": "0.15.10",
|
62 |
+
"eslint": "8.25.0",
|
63 |
+
"eslint-config-prettier": "8.5.0",
|
64 |
+
"eslint-plugin-no-only-tests": "3.0.0",
|
65 |
+
"npm-run-all": "4.1.5",
|
66 |
+
"prettier": "2.7.1",
|
67 |
+
"rollup": "2.79.1",
|
68 |
+
"tsx": "3.10.1",
|
69 |
+
"typescript": "4.8.4"
|
70 |
+
},
|
71 |
+
"dependencies": {
|
72 |
+
"@jridgewell/resolve-uri": "3.1.0",
|
73 |
+
"@jridgewell/sourcemap-codec": "1.4.14"
|
74 |
+
}
|
75 |
+
}
|
node_modules/@nodelib/fs.scandir/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The MIT License (MIT)
|
2 |
+
|
3 |
+
Copyright (c) Denis Malinochkin
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
node_modules/@nodelib/fs.scandir/README.md
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# @nodelib/fs.scandir
|
2 |
+
|
3 |
+
> List files and directories inside the specified directory.
|
4 |
+
|
5 |
+
## :bulb: Highlights
|
6 |
+
|
7 |
+
The package is aimed at obtaining information about entries in the directory.
|
8 |
+
|
9 |
+
* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional).
|
10 |
+
* :gear: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type. See [`old` and `modern` mode](#old-and-modern-mode).
|
11 |
+
* :link: Can safely work with broken symbolic links.
|
12 |
+
|
13 |
+
## Install
|
14 |
+
|
15 |
+
```console
|
16 |
+
npm install @nodelib/fs.scandir
|
17 |
+
```
|
18 |
+
|
19 |
+
## Usage
|
20 |
+
|
21 |
+
```ts
|
22 |
+
import * as fsScandir from '@nodelib/fs.scandir';
|
23 |
+
|
24 |
+
fsScandir.scandir('path', (error, stats) => { /* … */ });
|
25 |
+
```
|
26 |
+
|
27 |
+
## API
|
28 |
+
|
29 |
+
### .scandir(path, [optionsOrSettings], callback)
|
30 |
+
|
31 |
+
Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style.
|
32 |
+
|
33 |
+
```ts
|
34 |
+
fsScandir.scandir('path', (error, entries) => { /* … */ });
|
35 |
+
fsScandir.scandir('path', {}, (error, entries) => { /* … */ });
|
36 |
+
fsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ });
|
37 |
+
```
|
38 |
+
|
39 |
+
### .scandirSync(path, [optionsOrSettings])
|
40 |
+
|
41 |
+
Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path.
|
42 |
+
|
43 |
+
```ts
|
44 |
+
const entries = fsScandir.scandirSync('path');
|
45 |
+
const entries = fsScandir.scandirSync('path', {});
|
46 |
+
const entries = fsScandir.scandirSync(('path', new fsScandir.Settings());
|
47 |
+
```
|
48 |
+
|
49 |
+
#### path
|
50 |
+
|
51 |
+
* Required: `true`
|
52 |
+
* Type: `string | Buffer | URL`
|
53 |
+
|
54 |
+
A path to a file. If a URL is provided, it must use the `file:` protocol.
|
55 |
+
|
56 |
+
#### optionsOrSettings
|
57 |
+
|
58 |
+
* Required: `false`
|
59 |
+
* Type: `Options | Settings`
|
60 |
+
* Default: An instance of `Settings` class
|
61 |
+
|
62 |
+
An [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class.
|
63 |
+
|
64 |
+
> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.
|
65 |
+
|
66 |
+
### Settings([options])
|
67 |
+
|
68 |
+
A class of full settings of the package.
|
69 |
+
|
70 |
+
```ts
|
71 |
+
const settings = new fsScandir.Settings({ followSymbolicLinks: false });
|
72 |
+
|
73 |
+
const entries = fsScandir.scandirSync('path', settings);
|
74 |
+
```
|
75 |
+
|
76 |
+
## Entry
|
77 |
+
|
78 |
+
* `name` — The name of the entry (`unknown.txt`).
|
79 |
+
* `path` — The path of the entry relative to call directory (`root/unknown.txt`).
|
80 |
+
* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. On Node.js below 10.10 will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class.
|
81 |
+
* `stats` (optional) — An instance of `fs.Stats` class.
|
82 |
+
|
83 |
+
For example, the `scandir` call for `tools` directory with one directory inside:
|
84 |
+
|
85 |
+
```ts
|
86 |
+
{
|
87 |
+
dirent: Dirent { name: 'typedoc', /* … */ },
|
88 |
+
name: 'typedoc',
|
89 |
+
path: 'tools/typedoc'
|
90 |
+
}
|
91 |
+
```
|
92 |
+
|
93 |
+
## Options
|
94 |
+
|
95 |
+
### stats
|
96 |
+
|
97 |
+
* Type: `boolean`
|
98 |
+
* Default: `false`
|
99 |
+
|
100 |
+
Adds an instance of `fs.Stats` class to the [`Entry`](#entry).
|
101 |
+
|
102 |
+
> :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO??
|
103 |
+
|
104 |
+
### followSymbolicLinks
|
105 |
+
|
106 |
+
* Type: `boolean`
|
107 |
+
* Default: `false`
|
108 |
+
|
109 |
+
Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`.
|
110 |
+
|
111 |
+
### `throwErrorOnBrokenSymbolicLink`
|
112 |
+
|
113 |
+
* Type: `boolean`
|
114 |
+
* Default: `true`
|
115 |
+
|
116 |
+
Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`.
|
117 |
+
|
118 |
+
### `pathSegmentSeparator`
|
119 |
+
|
120 |
+
* Type: `string`
|
121 |
+
* Default: `path.sep`
|
122 |
+
|
123 |
+
By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead.
|
124 |
+
|
125 |
+
### `fs`
|
126 |
+
|
127 |
+
* Type: [`FileSystemAdapter`](./src/adapters/fs.ts)
|
128 |
+
* Default: A default FS methods
|
129 |
+
|
130 |
+
By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
|
131 |
+
|
132 |
+
```ts
|
133 |
+
interface FileSystemAdapter {
|
134 |
+
lstat?: typeof fs.lstat;
|
135 |
+
stat?: typeof fs.stat;
|
136 |
+
lstatSync?: typeof fs.lstatSync;
|
137 |
+
statSync?: typeof fs.statSync;
|
138 |
+
readdir?: typeof fs.readdir;
|
139 |
+
readdirSync?: typeof fs.readdirSync;
|
140 |
+
}
|
141 |
+
|
142 |
+
const settings = new fsScandir.Settings({
|
143 |
+
fs: { lstat: fakeLstat }
|
144 |
+
});
|
145 |
+
```
|
146 |
+
|
147 |
+
## `old` and `modern` mode
|
148 |
+
|
149 |
+
This package has two modes that are used depending on the environment and parameters of use.
|
150 |
+
|
151 |
+
### old
|
152 |
+
|
153 |
+
* Node.js below `10.10` or when the `stats` option is enabled
|
154 |
+
|
155 |
+
When working in the old mode, the directory is read first (`fs.readdir`), then the type of entries is determined (`fs.lstat` and/or `fs.stat` for symbolic links).
|
156 |
+
|
157 |
+
### modern
|
158 |
+
|
159 |
+
* Node.js 10.10+ and the `stats` option is disabled
|
160 |
+
|
161 |
+
In the modern mode, reading the directory (`fs.readdir` with the `withFileTypes` option) is combined with obtaining information about its entries. An additional call for symbolic links (`fs.stat`) is still present.
|
162 |
+
|
163 |
+
This mode makes fewer calls to the file system. It's faster.
|
164 |
+
|
165 |
+
## Changelog
|
166 |
+
|
167 |
+
See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
|
168 |
+
|
169 |
+
## License
|
170 |
+
|
171 |
+
This software is released under the terms of the MIT license.
|
node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import type * as fsStat from '@nodelib/fs.stat';
|
2 |
+
import type { Dirent, ErrnoException } from '../types';
|
3 |
+
export interface ReaddirAsynchronousMethod {
|
4 |
+
(filepath: string, options: {
|
5 |
+
withFileTypes: true;
|
6 |
+
}, callback: (error: ErrnoException | null, files: Dirent[]) => void): void;
|
7 |
+
(filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void;
|
8 |
+
}
|
9 |
+
export interface ReaddirSynchronousMethod {
|
10 |
+
(filepath: string, options: {
|
11 |
+
withFileTypes: true;
|
12 |
+
}): Dirent[];
|
13 |
+
(filepath: string): string[];
|
14 |
+
}
|
15 |
+
export declare type FileSystemAdapter = fsStat.FileSystemAdapter & {
|
16 |
+
readdir: ReaddirAsynchronousMethod;
|
17 |
+
readdirSync: ReaddirSynchronousMethod;
|
18 |
+
};
|
19 |
+
export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
|
20 |
+
export declare function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter;
|
node_modules/@nodelib/fs.scandir/out/adapters/fs.js
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3 |
+
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
4 |
+
const fs = require("fs");
|
5 |
+
exports.FILE_SYSTEM_ADAPTER = {
|
6 |
+
lstat: fs.lstat,
|
7 |
+
stat: fs.stat,
|
8 |
+
lstatSync: fs.lstatSync,
|
9 |
+
statSync: fs.statSync,
|
10 |
+
readdir: fs.readdir,
|
11 |
+
readdirSync: fs.readdirSync
|
12 |
+
};
|
13 |
+
function createFileSystemAdapter(fsMethods) {
|
14 |
+
if (fsMethods === undefined) {
|
15 |
+
return exports.FILE_SYSTEM_ADAPTER;
|
16 |
+
}
|
17 |
+
return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
|
18 |
+
}
|
19 |
+
exports.createFileSystemAdapter = createFileSystemAdapter;
|
node_modules/@nodelib/fs.scandir/out/constants.d.ts
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* IS `true` for Node.js 10.10 and greater.
|
3 |
+
*/
|
4 |
+
export declare const IS_SUPPORT_READDIR_WITH_FILE_TYPES: boolean;
|
node_modules/@nodelib/fs.scandir/out/constants.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3 |
+
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
|
4 |
+
const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
|
5 |
+
if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) {
|
6 |
+
throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
|
7 |
+
}
|
8 |
+
const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
|
9 |
+
const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
|
10 |
+
const SUPPORTED_MAJOR_VERSION = 10;
|
11 |
+
const SUPPORTED_MINOR_VERSION = 10;
|
12 |
+
const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
|
13 |
+
const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
|
14 |
+
/**
|
15 |
+
* IS `true` for Node.js 10.10 and greater.
|
16 |
+
*/
|
17 |
+
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
|
node_modules/@nodelib/fs.scandir/out/index.d.ts
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import type { FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod } from './adapters/fs';
|
2 |
+
import * as async from './providers/async';
|
3 |
+
import Settings, { Options } from './settings';
|
4 |
+
import type { Dirent, Entry } from './types';
|
5 |
+
declare type AsyncCallback = async.AsyncCallback;
|
6 |
+
declare function scandir(path: string, callback: AsyncCallback): void;
|
7 |
+
declare function scandir(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void;
|
8 |
+
declare namespace scandir {
|
9 |
+
function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise<Entry[]>;
|
10 |
+
}
|
11 |
+
declare function scandirSync(path: string, optionsOrSettings?: Options | Settings): Entry[];
|
12 |
+
export { scandir, scandirSync, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod, Options };
|
node_modules/@nodelib/fs.scandir/out/index.js
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3 |
+
exports.Settings = exports.scandirSync = exports.scandir = void 0;
|
4 |
+
const async = require("./providers/async");
|
5 |
+
const sync = require("./providers/sync");
|
6 |
+
const settings_1 = require("./settings");
|
7 |
+
exports.Settings = settings_1.default;
|
8 |
+
function scandir(path, optionsOrSettingsOrCallback, callback) {
|
9 |
+
if (typeof optionsOrSettingsOrCallback === 'function') {
|
10 |
+
async.read(path, getSettings(), optionsOrSettingsOrCallback);
|
11 |
+
return;
|
12 |
+
}
|
13 |
+
async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
14 |
+
}
|
15 |
+
exports.scandir = scandir;
|
16 |
+
function scandirSync(path, optionsOrSettings) {
|
17 |
+
const settings = getSettings(optionsOrSettings);
|
18 |
+
return sync.read(path, settings);
|
19 |
+
}
|
20 |
+
exports.scandirSync = scandirSync;
|
21 |
+
function getSettings(settingsOrOptions = {}) {
|
22 |
+
if (settingsOrOptions instanceof settings_1.default) {
|
23 |
+
return settingsOrOptions;
|
24 |
+
}
|
25 |
+
return new settings_1.default(settingsOrOptions);
|
26 |
+
}
|
node_modules/@nodelib/fs.scandir/out/providers/async.d.ts
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/// <reference types="node" />
|
2 |
+
import type Settings from '../settings';
|
3 |
+
import type { Entry } from '../types';
|
4 |
+
export declare type AsyncCallback = (error: NodeJS.ErrnoException, entries: Entry[]) => void;
|
5 |
+
export declare function read(directory: string, settings: Settings, callback: AsyncCallback): void;
|
6 |
+
export declare function readdirWithFileTypes(directory: string, settings: Settings, callback: AsyncCallback): void;
|
7 |
+
export declare function readdir(directory: string, settings: Settings, callback: AsyncCallback): void;
|
node_modules/@nodelib/fs.scandir/out/providers/async.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3 |
+
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
|
4 |
+
const fsStat = require("@nodelib/fs.stat");
|
5 |
+
const rpl = require("run-parallel");
|
6 |
+
const constants_1 = require("../constants");
|
7 |
+
const utils = require("../utils");
|
8 |
+
const common = require("./common");
|
9 |
+
function read(directory, settings, callback) {
|
10 |
+
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
11 |
+
readdirWithFileTypes(directory, settings, callback);
|
12 |
+
return;
|
13 |
+
}
|
14 |
+
readdir(directory, settings, callback);
|
15 |
+
}
|
16 |
+
exports.read = read;
|
17 |
+
function readdirWithFileTypes(directory, settings, callback) {
|
18 |
+
settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
|
19 |
+
if (readdirError !== null) {
|
20 |
+
callFailureCallback(callback, readdirError);
|
21 |
+
return;
|
22 |
+
}
|
23 |
+
const entries = dirents.map((dirent) => ({
|
24 |
+
dirent,
|
25 |
+
name: dirent.name,
|
26 |
+
path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
|
27 |
+
}));
|
28 |
+
if (!settings.followSymbolicLinks) {
|
29 |
+
callSuccessCallback(callback, entries);
|
30 |
+
return;
|
31 |
+
}
|
32 |
+
const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
|
33 |
+
rpl(tasks, (rplError, rplEntries) => {
|
34 |
+
if (rplError !== null) {
|
35 |
+
callFailureCallback(callback, rplError);
|
36 |
+
return;
|
37 |
+
}
|
38 |
+
callSuccessCallback(callback, rplEntries);
|
39 |
+
});
|
40 |
+
});
|
41 |
+
}
|
42 |
+
exports.readdirWithFileTypes = readdirWithFileTypes;
|
43 |
+
function makeRplTaskEntry(entry, settings) {
|
44 |
+
return (done) => {
|
45 |
+
if (!entry.dirent.isSymbolicLink()) {
|
46 |
+
done(null, entry);
|
47 |
+
return;
|
48 |
+
}
|
49 |
+
settings.fs.stat(entry.path, (statError, stats) => {
|
50 |
+
if (statError !== null) {
|
51 |
+
if (settings.throwErrorOnBrokenSymbolicLink) {
|
52 |
+
done(statError);
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
done(null, entry);
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
|
59 |
+
done(null, entry);
|
60 |
+
});
|
61 |
+
};
|
62 |
+
}
|
63 |
+
function readdir(directory, settings, callback) {
|
64 |
+
settings.fs.readdir(directory, (readdirError, names) => {
|
65 |
+
if (readdirError !== null) {
|
66 |
+
callFailureCallback(callback, readdirError);
|
67 |
+
return;
|
68 |
+
}
|
69 |
+
const tasks = names.map((name) => {
|
70 |
+
const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
71 |
+
return (done) => {
|
72 |
+
fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
|
73 |
+
if (error !== null) {
|
74 |
+
done(error);
|
75 |
+
return;
|
76 |
+
}
|
77 |
+
const entry = {
|
78 |
+
name,
|
79 |
+
path,
|
80 |
+
dirent: utils.fs.createDirentFromStats(name, stats)
|
81 |
+
};
|
82 |
+
if (settings.stats) {
|
83 |
+
entry.stats = stats;
|
84 |
+
}
|
85 |
+
done(null, entry);
|
86 |
+
});
|
87 |
+
};
|
88 |
+
});
|
89 |
+
rpl(tasks, (rplError, entries) => {
|
90 |
+
if (rplError !== null) {
|
91 |
+
callFailureCallback(callback, rplError);
|
92 |
+
return;
|
93 |
+
}
|
94 |
+
callSuccessCallback(callback, entries);
|
95 |
+
});
|
96 |
+
});
|
97 |
+
}
|
98 |
+
exports.readdir = readdir;
|
99 |
+
function callFailureCallback(callback, error) {
|
100 |
+
callback(error);
|
101 |
+
}
|
102 |
+
function callSuccessCallback(callback, result) {
|
103 |
+
callback(null, result);
|
104 |
+
}
|
node_modules/@nodelib/fs.scandir/out/providers/common.d.ts
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
export declare function joinPathSegments(a: string, b: string, separator: string): string;
|
node_modules/@nodelib/fs.scandir/out/providers/common.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3 |
+
exports.joinPathSegments = void 0;
|
4 |
+
function joinPathSegments(a, b, separator) {
|
5 |
+
/**
|
6 |
+
* The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
|
7 |
+
*/
|
8 |
+
if (a.endsWith(separator)) {
|
9 |
+
return a + b;
|
10 |
+
}
|
11 |
+
return a + separator + b;
|
12 |
+
}
|
13 |
+
exports.joinPathSegments = joinPathSegments;
|
node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import type Settings from '../settings';
|
2 |
+
import type { Entry } from '../types';
|
3 |
+
export declare function read(directory: string, settings: Settings): Entry[];
|
4 |
+
export declare function readdirWithFileTypes(directory: string, settings: Settings): Entry[];
|
5 |
+
export declare function readdir(directory: string, settings: Settings): Entry[];
|
node_modules/@nodelib/fs.scandir/out/providers/sync.js
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3 |
+
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
|
4 |
+
const fsStat = require("@nodelib/fs.stat");
|
5 |
+
const constants_1 = require("../constants");
|
6 |
+
const utils = require("../utils");
|
7 |
+
const common = require("./common");
|
8 |
+
function read(directory, settings) {
|
9 |
+
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
10 |
+
return readdirWithFileTypes(directory, settings);
|
11 |
+
}
|
12 |
+
return readdir(directory, settings);
|
13 |
+
}
|
14 |
+
exports.read = read;
|
15 |
+
function readdirWithFileTypes(directory, settings) {
|
16 |
+
const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
|
17 |
+
return dirents.map((dirent) => {
|
18 |
+
const entry = {
|
19 |
+
dirent,
|
20 |
+
name: dirent.name,
|
21 |
+
path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
|
22 |
+
};
|
23 |
+
if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
|
24 |
+
try {
|
25 |
+
const stats = settings.fs.statSync(entry.path);
|
26 |
+
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
|
27 |
+
}
|
28 |
+
catch (error) {
|
29 |
+
if (settings.throwErrorOnBrokenSymbolicLink) {
|
30 |
+
throw error;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
}
|
34 |
+
return entry;
|
35 |
+
});
|
36 |
+
}
|
37 |
+
exports.readdirWithFileTypes = readdirWithFileTypes;
|
38 |
+
function readdir(directory, settings) {
|
39 |
+
const names = settings.fs.readdirSync(directory);
|
40 |
+
return names.map((name) => {
|
41 |
+
const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
42 |
+
const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
|
43 |
+
const entry = {
|
44 |
+
name,
|
45 |
+
path: entryPath,
|
46 |
+
dirent: utils.fs.createDirentFromStats(name, stats)
|
47 |
+
};
|
48 |
+
if (settings.stats) {
|
49 |
+
entry.stats = stats;
|
50 |
+
}
|
51 |
+
return entry;
|
52 |
+
});
|
53 |
+
}
|
54 |
+
exports.readdir = readdir;
|
node_modules/@nodelib/fs.scandir/out/settings.d.ts
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import * as fsStat from '@nodelib/fs.stat';
|
2 |
+
import * as fs from './adapters/fs';
|
3 |
+
export interface Options {
|
4 |
+
followSymbolicLinks?: boolean;
|
5 |
+
fs?: Partial<fs.FileSystemAdapter>;
|
6 |
+
pathSegmentSeparator?: string;
|
7 |
+
stats?: boolean;
|
8 |
+
throwErrorOnBrokenSymbolicLink?: boolean;
|
9 |
+
}
|
10 |
+
export default class Settings {
|
11 |
+
private readonly _options;
|
12 |
+
readonly followSymbolicLinks: boolean;
|
13 |
+
readonly fs: fs.FileSystemAdapter;
|
14 |
+
readonly pathSegmentSeparator: string;
|
15 |
+
readonly stats: boolean;
|
16 |
+
readonly throwErrorOnBrokenSymbolicLink: boolean;
|
17 |
+
readonly fsStatSettings: fsStat.Settings;
|
18 |
+
constructor(_options?: Options);
|
19 |
+
private _getValue;
|
20 |
+
}
|
node_modules/@nodelib/fs.scandir/out/settings.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3 |
+
const path = require("path");
|
4 |
+
const fsStat = require("@nodelib/fs.stat");
|
5 |
+
const fs = require("./adapters/fs");
|
6 |
+
class Settings {
|
7 |
+
constructor(_options = {}) {
|
8 |
+
this._options = _options;
|
9 |
+
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
10 |
+
this.fs = fs.createFileSystemAdapter(this._options.fs);
|
11 |
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
|
12 |
+
this.stats = this._getValue(this._options.stats, false);
|
13 |
+
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
14 |
+
this.fsStatSettings = new fsStat.Settings({
|
15 |
+
followSymbolicLink: this.followSymbolicLinks,
|
16 |
+
fs: this.fs,
|
17 |
+
throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
|
18 |
+
});
|
19 |
+
}
|
20 |
+
_getValue(option, value) {
|
21 |
+
return option !== null && option !== void 0 ? option : value;
|
22 |
+
}
|
23 |
+
}
|
24 |
+
exports.default = Settings;
|
node_modules/@nodelib/fs.scandir/out/types/index.d.ts
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/// <reference types="node" />
|
2 |
+
import type * as fs from 'fs';
|
3 |
+
export interface Entry {
|
4 |
+
dirent: Dirent;
|
5 |
+
name: string;
|
6 |
+
path: string;
|
7 |
+
stats?: Stats;
|
8 |
+
}
|
9 |
+
export declare type Stats = fs.Stats;
|
10 |
+
export declare type ErrnoException = NodeJS.ErrnoException;
|
11 |
+
export interface Dirent {
|
12 |
+
isBlockDevice: () => boolean;
|
13 |
+
isCharacterDevice: () => boolean;
|
14 |
+
isDirectory: () => boolean;
|
15 |
+
isFIFO: () => boolean;
|
16 |
+
isFile: () => boolean;
|
17 |
+
isSocket: () => boolean;
|
18 |
+
isSymbolicLink: () => boolean;
|
19 |
+
name: string;
|
20 |
+
}
|
node_modules/@nodelib/fs.scandir/out/types/index.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
import type { Dirent, Stats } from '../types';
|
2 |
+
export declare function createDirentFromStats(name: string, stats: Stats): Dirent;
|