fix(monitor): remove non-existent worker columns from job_run_logs query
The job_run_logs table tracks scheduled job orchestration, not individual worker jobs. Worker info (worker_id, worker_hostname) belongs on dispensary_crawl_jobs, not job_run_logs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1
backend/node_modules/.bin/prebuild-install
generated
vendored
Symbolic link
1
backend/node_modules/.bin/prebuild-install
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../prebuild-install/bin.js
|
||||
1
backend/node_modules/.bin/rc
generated
vendored
Symbolic link
1
backend/node_modules/.bin/rc
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../rc/cli.js
|
||||
398
backend/node_modules/.package-lock.json
generated
vendored
398
backend/node_modules/.package-lock.json
generated
vendored
@@ -41,86 +41,6 @@
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/colour": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz",
|
||||
"integrity": "sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-libvips-linux-x64": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz",
|
||||
"integrity": "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-libvips-linuxmusl-x64": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz",
|
||||
"integrity": "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-linux-x64": {
|
||||
"version": "0.34.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz",
|
||||
"integrity": "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linux-x64": "1.2.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-linuxmusl-x64": {
|
||||
"version": "0.34.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz",
|
||||
"integrity": "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linuxmusl-x64": "1.2.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
|
||||
@@ -341,6 +261,17 @@
|
||||
"integrity": "sha512-0ikrnug3/IyneSHqCBeslAhlK2aBfYek1fGo4bP4QnZPmiqSGRK+Oy7ZMisLWkesffJvQ1cqAcBnJC+8+nxIAg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/pg": {
|
||||
"version": "8.15.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.15.6.tgz",
|
||||
"integrity": "sha512-NoaMtzhxOrubeL/7UZuNTrejB4MPAJ0RpxZqXQf2qXuVlTPuG6Y8p4u9dKRaue4yjmC7ZhzVO2/Yyyn25znrPQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"pg-protocol": "*",
|
||||
"pg-types": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/qs": {
|
||||
"version": "6.14.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz",
|
||||
@@ -603,6 +534,16 @@
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bl": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
|
||||
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
|
||||
"dependencies": {
|
||||
"buffer": "^5.5.0",
|
||||
"inherits": "^2.0.4",
|
||||
"readable-stream": "^3.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/block-stream2": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/block-stream2/-/block-stream2-2.1.0.tgz",
|
||||
@@ -792,6 +733,18 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
|
||||
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1",
|
||||
"color-string": "^1.9.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
@@ -808,6 +761,15 @@
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
},
|
||||
"node_modules/color-string": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
|
||||
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
|
||||
"dependencies": {
|
||||
"color-name": "^1.0.0",
|
||||
"simple-swizzle": "^0.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/color-support": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
|
||||
@@ -938,6 +900,28 @@
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/decompress-response": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
|
||||
"integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
|
||||
"dependencies": {
|
||||
"mimic-response": "^3.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/deep-extend": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/deepmerge": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
||||
@@ -1251,6 +1235,14 @@
|
||||
"bare-events": "^2.7.0"
|
||||
}
|
||||
},
|
||||
"node_modules/expand-template": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
|
||||
"integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/express": {
|
||||
"version": "4.21.2",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
|
||||
@@ -1488,6 +1480,11 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/fs-constants": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
|
||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "10.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
|
||||
@@ -1667,6 +1664,11 @@
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
||||
},
|
||||
"node_modules/github-from-package": {
|
||||
"version": "0.0.0",
|
||||
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
|
||||
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
@@ -1904,6 +1906,11 @@
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"node_modules/ini": {
|
||||
"version": "1.3.8",
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
|
||||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
|
||||
},
|
||||
"node_modules/ip-address": {
|
||||
"version": "10.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz",
|
||||
@@ -2291,6 +2298,17 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mimic-response": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
|
||||
"integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
@@ -2302,6 +2320,14 @@
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/minio": {
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/minio/-/minio-7.1.3.tgz",
|
||||
@@ -2403,6 +2429,11 @@
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||
},
|
||||
"node_modules/napi-build-utils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",
|
||||
"integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA=="
|
||||
},
|
||||
"node_modules/negotiator": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
||||
@@ -2419,6 +2450,17 @@
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/node-abi": {
|
||||
"version": "3.85.0",
|
||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.85.0.tgz",
|
||||
"integrity": "sha512-zsFhmbkAzwhTft6nd3VxcG0cvJsT70rL+BIGHWVq5fi6MwGrHwzqKaxXE+Hl2GmnGItnDKPPkO5/LQqjVkIdFg==",
|
||||
"dependencies": {
|
||||
"semver": "^7.3.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz",
|
||||
@@ -2832,6 +2874,62 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prebuild-install": {
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz",
|
||||
"integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",
|
||||
"dependencies": {
|
||||
"detect-libc": "^2.0.0",
|
||||
"expand-template": "^2.0.3",
|
||||
"github-from-package": "0.0.0",
|
||||
"minimist": "^1.2.3",
|
||||
"mkdirp-classic": "^0.5.3",
|
||||
"napi-build-utils": "^2.0.0",
|
||||
"node-abi": "^3.3.0",
|
||||
"pump": "^3.0.0",
|
||||
"rc": "^1.2.7",
|
||||
"simple-get": "^4.0.0",
|
||||
"tar-fs": "^2.0.0",
|
||||
"tunnel-agent": "^0.6.0"
|
||||
},
|
||||
"bin": {
|
||||
"prebuild-install": "bin.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/prebuild-install/node_modules/chownr": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
|
||||
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
|
||||
},
|
||||
"node_modules/prebuild-install/node_modules/tar-fs": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz",
|
||||
"integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==",
|
||||
"dependencies": {
|
||||
"chownr": "^1.1.1",
|
||||
"mkdirp-classic": "^0.5.2",
|
||||
"pump": "^3.0.0",
|
||||
"tar-stream": "^2.1.4"
|
||||
}
|
||||
},
|
||||
"node_modules/prebuild-install/node_modules/tar-stream": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
|
||||
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
|
||||
"dependencies": {
|
||||
"bl": "^4.0.3",
|
||||
"end-of-stream": "^1.4.1",
|
||||
"fs-constants": "^1.0.0",
|
||||
"inherits": "^2.0.3",
|
||||
"readable-stream": "^3.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/progress": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
|
||||
@@ -3257,6 +3355,20 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/rc": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
||||
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
||||
"dependencies": {
|
||||
"deep-extend": "^0.6.0",
|
||||
"ini": "~1.3.0",
|
||||
"minimist": "^1.2.0",
|
||||
"strip-json-comments": "~2.0.1"
|
||||
},
|
||||
"bin": {
|
||||
"rc": "cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/readable-stream": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
@@ -3476,49 +3588,32 @@
|
||||
}
|
||||
},
|
||||
"node_modules/sharp": {
|
||||
"version": "0.34.5",
|
||||
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz",
|
||||
"integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==",
|
||||
"version": "0.32.6",
|
||||
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz",
|
||||
"integrity": "sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@img/colour": "^1.0.0",
|
||||
"detect-libc": "^2.1.2",
|
||||
"semver": "^7.7.3"
|
||||
"color": "^4.2.3",
|
||||
"detect-libc": "^2.0.2",
|
||||
"node-addon-api": "^6.1.0",
|
||||
"prebuild-install": "^7.1.1",
|
||||
"semver": "^7.5.4",
|
||||
"simple-get": "^4.0.1",
|
||||
"tar-fs": "^3.0.4",
|
||||
"tunnel-agent": "^0.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
"node": ">=14.15.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-darwin-arm64": "0.34.5",
|
||||
"@img/sharp-darwin-x64": "0.34.5",
|
||||
"@img/sharp-libvips-darwin-arm64": "1.2.4",
|
||||
"@img/sharp-libvips-darwin-x64": "1.2.4",
|
||||
"@img/sharp-libvips-linux-arm": "1.2.4",
|
||||
"@img/sharp-libvips-linux-arm64": "1.2.4",
|
||||
"@img/sharp-libvips-linux-ppc64": "1.2.4",
|
||||
"@img/sharp-libvips-linux-riscv64": "1.2.4",
|
||||
"@img/sharp-libvips-linux-s390x": "1.2.4",
|
||||
"@img/sharp-libvips-linux-x64": "1.2.4",
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "1.2.4",
|
||||
"@img/sharp-libvips-linuxmusl-x64": "1.2.4",
|
||||
"@img/sharp-linux-arm": "0.34.5",
|
||||
"@img/sharp-linux-arm64": "0.34.5",
|
||||
"@img/sharp-linux-ppc64": "0.34.5",
|
||||
"@img/sharp-linux-riscv64": "0.34.5",
|
||||
"@img/sharp-linux-s390x": "0.34.5",
|
||||
"@img/sharp-linux-x64": "0.34.5",
|
||||
"@img/sharp-linuxmusl-arm64": "0.34.5",
|
||||
"@img/sharp-linuxmusl-x64": "0.34.5",
|
||||
"@img/sharp-wasm32": "0.34.5",
|
||||
"@img/sharp-win32-arm64": "0.34.5",
|
||||
"@img/sharp-win32-ia32": "0.34.5",
|
||||
"@img/sharp-win32-x64": "0.34.5"
|
||||
}
|
||||
},
|
||||
"node_modules/sharp/node_modules/node-addon-api": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz",
|
||||
"integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA=="
|
||||
},
|
||||
"node_modules/side-channel": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
||||
@@ -3592,6 +3687,62 @@
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
|
||||
},
|
||||
"node_modules/simple-concat": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
|
||||
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/simple-get": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
|
||||
"integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"decompress-response": "^6.0.0",
|
||||
"once": "^1.3.1",
|
||||
"simple-concat": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/simple-swizzle": {
|
||||
"version": "0.2.4",
|
||||
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.4.tgz",
|
||||
"integrity": "sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==",
|
||||
"dependencies": {
|
||||
"is-arrayish": "^0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/simple-swizzle/node_modules/is-arrayish": {
|
||||
"version": "0.3.4",
|
||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.4.tgz",
|
||||
"integrity": "sha512-m6UrgzFVUYawGBh1dUsWR5M2Clqic9RVXC/9f8ceNlv2IcO9j9J/z8UoCLPqtsPBFNzEpfR3xftohbfqDx8EQA=="
|
||||
},
|
||||
"node_modules/smart-buffer": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
|
||||
@@ -3731,6 +3882,14 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-json-comments": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||
"integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/strnum": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/strnum/-/strnum-1.1.2.tgz",
|
||||
@@ -3836,6 +3995,17 @@
|
||||
"fsevents": "~2.3.3"
|
||||
}
|
||||
},
|
||||
"node_modules/tunnel-agent": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/type-is": {
|
||||
"version": "1.6.18",
|
||||
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
||||
|
||||
82
backend/node_modules/@img/colour/LICENSE.md
generated
vendored
82
backend/node_modules/@img/colour/LICENSE.md
generated
vendored
@@ -1,82 +0,0 @@
|
||||
# Licensing
|
||||
|
||||
## color
|
||||
|
||||
Copyright (c) 2012 Heather Arthur
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
## color-convert
|
||||
|
||||
Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com>.
|
||||
Copyright (c) 2016-2021 Josh Junon <josh@junon.me>.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
## color-string
|
||||
|
||||
Copyright (c) 2011 Heather Arthur <fayearthur@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
## color-name
|
||||
|
||||
The MIT License (MIT)
|
||||
Copyright (c) 2015 Dmitry Ivanov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
15
backend/node_modules/@img/colour/README.md
generated
vendored
15
backend/node_modules/@img/colour/README.md
generated
vendored
@@ -1,15 +0,0 @@
|
||||
# `@img/colour`
|
||||
|
||||
The latest version of the
|
||||
[color](https://www.npmjs.com/package/color)
|
||||
package is now ESM-only,
|
||||
however some JavaScript runtimes do not yet support this,
|
||||
which includes versions of Node.js prior to 20.19.0.
|
||||
|
||||
This package converts the `color` package and its dependencies,
|
||||
all of which are MIT-licensed, to CommonJS.
|
||||
|
||||
- [color](https://www.npmjs.com/package/color)
|
||||
- [color-convert](https://www.npmjs.com/package/color-convert)
|
||||
- [color-string](https://www.npmjs.com/package/color-string)
|
||||
- [color-name](https://www.npmjs.com/package/color-name)
|
||||
1594
backend/node_modules/@img/colour/color.cjs
generated
vendored
1594
backend/node_modules/@img/colour/color.cjs
generated
vendored
File diff suppressed because it is too large
Load Diff
1
backend/node_modules/@img/colour/index.cjs
generated
vendored
1
backend/node_modules/@img/colour/index.cjs
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = require("./color.cjs").default;
|
||||
45
backend/node_modules/@img/colour/package.json
generated
vendored
45
backend/node_modules/@img/colour/package.json
generated
vendored
@@ -1,45 +0,0 @@
|
||||
{
|
||||
"name": "@img/colour",
|
||||
"version": "1.0.0",
|
||||
"description": "The ESM-only 'color' package made compatible for use with CommonJS runtimes",
|
||||
"license": "MIT",
|
||||
"main": "index.cjs",
|
||||
"authors": [
|
||||
"Heather Arthur <fayearthur@gmail.com>",
|
||||
"Josh Junon <josh@junon.me>",
|
||||
"Maxime Thirouin",
|
||||
"Dyma Ywanov <dfcreative@gmail.com>",
|
||||
"LitoMore (https://github.com/LitoMore)"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"files": [
|
||||
"color.cjs"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lovell/colour.git"
|
||||
},
|
||||
"type": "commonjs",
|
||||
"keywords": [
|
||||
"color",
|
||||
"colour",
|
||||
"cjs",
|
||||
"commonjs"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "esbuild node_modules/color/index.js --bundle --platform=node --outfile=color.cjs",
|
||||
"test": "node --test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"color": "5.0.0",
|
||||
"color-convert": "3.1.0",
|
||||
"color-name": "2.0.0",
|
||||
"color-string": "2.1.0",
|
||||
"esbuild": "^0.25.9"
|
||||
}
|
||||
}
|
||||
221
backend/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h
generated
vendored
221
backend/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h
generated
vendored
@@ -1,221 +0,0 @@
|
||||
/* glibconfig.h
|
||||
*
|
||||
* This is a generated file. Please modify 'glibconfig.h.in'
|
||||
*/
|
||||
|
||||
#ifndef __GLIBCONFIG_H__
|
||||
#define __GLIBCONFIG_H__
|
||||
|
||||
#include <glib/gmacros.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
#define GLIB_HAVE_ALLOCA_H
|
||||
|
||||
#define GLIB_STATIC_COMPILATION 1
|
||||
#define GOBJECT_STATIC_COMPILATION 1
|
||||
#define GIO_STATIC_COMPILATION 1
|
||||
#define GMODULE_STATIC_COMPILATION 1
|
||||
#define GI_STATIC_COMPILATION 1
|
||||
#define G_INTL_STATIC_COMPILATION 1
|
||||
#define FFI_STATIC_BUILD 1
|
||||
|
||||
/* Specifies that GLib's g_print*() functions wrap the
|
||||
* system printf functions. This is useful to know, for example,
|
||||
* when using glibc's register_printf_function().
|
||||
*/
|
||||
#define GLIB_USING_SYSTEM_PRINTF
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_MINFLOAT FLT_MIN
|
||||
#define G_MAXFLOAT FLT_MAX
|
||||
#define G_MINDOUBLE DBL_MIN
|
||||
#define G_MAXDOUBLE DBL_MAX
|
||||
#define G_MINSHORT SHRT_MIN
|
||||
#define G_MAXSHORT SHRT_MAX
|
||||
#define G_MAXUSHORT USHRT_MAX
|
||||
#define G_MININT INT_MIN
|
||||
#define G_MAXINT INT_MAX
|
||||
#define G_MAXUINT UINT_MAX
|
||||
#define G_MINLONG LONG_MIN
|
||||
#define G_MAXLONG LONG_MAX
|
||||
#define G_MAXULONG ULONG_MAX
|
||||
|
||||
typedef signed char gint8;
|
||||
typedef unsigned char guint8;
|
||||
|
||||
typedef signed short gint16;
|
||||
typedef unsigned short guint16;
|
||||
|
||||
#define G_GINT16_MODIFIER "h"
|
||||
#define G_GINT16_FORMAT "hi"
|
||||
#define G_GUINT16_FORMAT "hu"
|
||||
|
||||
|
||||
typedef signed int gint32;
|
||||
typedef unsigned int guint32;
|
||||
|
||||
#define G_GINT32_MODIFIER ""
|
||||
#define G_GINT32_FORMAT "i"
|
||||
#define G_GUINT32_FORMAT "u"
|
||||
|
||||
|
||||
#define G_HAVE_GINT64 1 /* deprecated, always true */
|
||||
|
||||
typedef signed long gint64;
|
||||
typedef unsigned long guint64;
|
||||
|
||||
#define G_GINT64_CONSTANT(val) (val##L)
|
||||
#define G_GUINT64_CONSTANT(val) (val##UL)
|
||||
|
||||
#define G_GINT64_MODIFIER "l"
|
||||
#define G_GINT64_FORMAT "li"
|
||||
#define G_GUINT64_FORMAT "lu"
|
||||
|
||||
|
||||
#define GLIB_SIZEOF_VOID_P 8
|
||||
#define GLIB_SIZEOF_LONG 8
|
||||
#define GLIB_SIZEOF_SIZE_T 8
|
||||
#define GLIB_SIZEOF_SSIZE_T 8
|
||||
|
||||
typedef signed long gssize;
|
||||
typedef unsigned long gsize;
|
||||
#define G_GSIZE_MODIFIER "l"
|
||||
#define G_GSSIZE_MODIFIER "l"
|
||||
#define G_GSIZE_FORMAT "lu"
|
||||
#define G_GSSIZE_FORMAT "li"
|
||||
|
||||
#define G_MAXSIZE G_MAXULONG
|
||||
#define G_MINSSIZE G_MINLONG
|
||||
#define G_MAXSSIZE G_MAXLONG
|
||||
|
||||
typedef gint64 goffset;
|
||||
#define G_MINOFFSET G_MININT64
|
||||
#define G_MAXOFFSET G_MAXINT64
|
||||
|
||||
#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER
|
||||
#define G_GOFFSET_FORMAT G_GINT64_FORMAT
|
||||
#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
|
||||
|
||||
#define G_POLLFD_FORMAT "%d"
|
||||
|
||||
#define GPOINTER_TO_INT(p) ((gint) (glong) (p))
|
||||
#define GPOINTER_TO_UINT(p) ((guint) (gulong) (p))
|
||||
|
||||
#define GINT_TO_POINTER(i) ((gpointer) (glong) (i))
|
||||
#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u))
|
||||
|
||||
typedef signed long gintptr;
|
||||
typedef unsigned long guintptr;
|
||||
|
||||
#define G_GINTPTR_MODIFIER "l"
|
||||
#define G_GINTPTR_FORMAT "li"
|
||||
#define G_GUINTPTR_FORMAT "lu"
|
||||
|
||||
#define GLIB_MAJOR_VERSION 2
|
||||
#define GLIB_MINOR_VERSION 86
|
||||
#define GLIB_MICRO_VERSION 1
|
||||
|
||||
#define G_OS_UNIX
|
||||
|
||||
#define G_VA_COPY va_copy
|
||||
|
||||
#define G_VA_COPY_AS_ARRAY 1
|
||||
|
||||
#define G_HAVE_ISO_VARARGS 1
|
||||
|
||||
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
|
||||
* is passed ISO vararg support is turned off, and there is no work
|
||||
* around to turn it on, so we unconditionally turn it off.
|
||||
*/
|
||||
#if __GNUC__ == 2 && __GNUC_MINOR__ == 95
|
||||
# undef G_HAVE_ISO_VARARGS
|
||||
#endif
|
||||
|
||||
#define G_HAVE_GROWING_STACK 0
|
||||
|
||||
#ifndef _MSC_VER
|
||||
# define G_HAVE_GNUC_VARARGS 1
|
||||
#endif
|
||||
|
||||
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
||||
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
||||
#define G_GNUC_INTERNAL __hidden
|
||||
#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
|
||||
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
||||
#else
|
||||
#define G_GNUC_INTERNAL
|
||||
#endif
|
||||
|
||||
#define G_THREADS_ENABLED
|
||||
#define G_THREADS_IMPL_POSIX
|
||||
|
||||
#define G_ATOMIC_LOCK_FREE
|
||||
|
||||
#define GINT16_TO_LE(val) ((gint16) (val))
|
||||
#define GUINT16_TO_LE(val) ((guint16) (val))
|
||||
#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val))
|
||||
#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
|
||||
|
||||
#define GINT32_TO_LE(val) ((gint32) (val))
|
||||
#define GUINT32_TO_LE(val) ((guint32) (val))
|
||||
#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val))
|
||||
#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val))
|
||||
|
||||
#define GINT64_TO_LE(val) ((gint64) (val))
|
||||
#define GUINT64_TO_LE(val) ((guint64) (val))
|
||||
#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val))
|
||||
#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val))
|
||||
|
||||
#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val))
|
||||
#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val))
|
||||
#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val))
|
||||
#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val))
|
||||
#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val))
|
||||
#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val))
|
||||
#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val))
|
||||
#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val))
|
||||
#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val))
|
||||
#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val))
|
||||
#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val))
|
||||
#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val))
|
||||
#define G_BYTE_ORDER G_LITTLE_ENDIAN
|
||||
|
||||
#define GLIB_SYSDEF_POLLIN =1
|
||||
#define GLIB_SYSDEF_POLLOUT =4
|
||||
#define GLIB_SYSDEF_POLLPRI =2
|
||||
#define GLIB_SYSDEF_POLLHUP =16
|
||||
#define GLIB_SYSDEF_POLLERR =8
|
||||
#define GLIB_SYSDEF_POLLNVAL =32
|
||||
|
||||
/* No way to disable deprecation warnings for macros, so only emit deprecation
|
||||
* warnings on platforms where usage of this macro is broken */
|
||||
#if defined(__APPLE__) || defined(_MSC_VER) || defined(__CYGWIN__)
|
||||
#define G_MODULE_SUFFIX "so" GLIB_DEPRECATED_MACRO_IN_2_76
|
||||
#else
|
||||
#define G_MODULE_SUFFIX "so"
|
||||
#endif
|
||||
|
||||
typedef int GPid;
|
||||
#define G_PID_FORMAT "i"
|
||||
|
||||
#define GLIB_SYSDEF_AF_UNIX 1
|
||||
#define GLIB_SYSDEF_AF_INET 2
|
||||
#define GLIB_SYSDEF_AF_INET6 10
|
||||
|
||||
#define GLIB_SYSDEF_MSG_OOB 1
|
||||
#define GLIB_SYSDEF_MSG_PEEK 2
|
||||
#define GLIB_SYSDEF_MSG_DONTROUTE 4
|
||||
|
||||
#define G_DIR_SEPARATOR '/'
|
||||
#define G_DIR_SEPARATOR_S "/"
|
||||
#define G_SEARCHPATH_SEPARATOR ':'
|
||||
#define G_SEARCHPATH_SEPARATOR_S ":"
|
||||
|
||||
#undef G_HAVE_FREE_SIZED
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GLIBCONFIG_H__ */
|
||||
1
backend/node_modules/@img/sharp-libvips-linux-x64/lib/index.js
generated
vendored
1
backend/node_modules/@img/sharp-libvips-linux-x64/lib/index.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = __dirname;
|
||||
42
backend/node_modules/@img/sharp-libvips-linux-x64/package.json
generated
vendored
42
backend/node_modules/@img/sharp-libvips-linux-x64/package.json
generated
vendored
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"name": "@img/sharp-libvips-linux-x64",
|
||||
"version": "1.2.4",
|
||||
"description": "Prebuilt libvips and dependencies for use with sharp on Linux (glibc) x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lovell/sharp-libvips.git",
|
||||
"directory": "npm/linux-x64"
|
||||
},
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"versions.json"
|
||||
],
|
||||
"type": "commonjs",
|
||||
"exports": {
|
||||
"./lib": "./lib/index.js",
|
||||
"./package": "./package.json",
|
||||
"./versions": "./versions.json"
|
||||
},
|
||||
"config": {
|
||||
"glibc": ">=2.26"
|
||||
},
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
]
|
||||
}
|
||||
30
backend/node_modules/@img/sharp-libvips-linux-x64/versions.json
generated
vendored
30
backend/node_modules/@img/sharp-libvips-linux-x64/versions.json
generated
vendored
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"aom": "3.13.1",
|
||||
"archive": "3.8.2",
|
||||
"cairo": "1.18.4",
|
||||
"cgif": "0.5.0",
|
||||
"exif": "0.6.25",
|
||||
"expat": "2.7.3",
|
||||
"ffi": "3.5.2",
|
||||
"fontconfig": "2.17.1",
|
||||
"freetype": "2.14.1",
|
||||
"fribidi": "1.0.16",
|
||||
"glib": "2.86.1",
|
||||
"harfbuzz": "12.1.0",
|
||||
"heif": "1.20.2",
|
||||
"highway": "1.3.0",
|
||||
"imagequant": "2.4.1",
|
||||
"lcms": "2.17",
|
||||
"mozjpeg": "0826579",
|
||||
"pango": "1.57.0",
|
||||
"pixman": "0.46.4",
|
||||
"png": "1.6.50",
|
||||
"proxy-libintl": "0.5",
|
||||
"rsvg": "2.61.2",
|
||||
"spng": "0.7.4",
|
||||
"tiff": "4.7.1",
|
||||
"vips": "8.17.3",
|
||||
"webp": "1.6.0",
|
||||
"xml2": "2.15.1",
|
||||
"zlib-ng": "2.2.5"
|
||||
}
|
||||
46
backend/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md
generated
vendored
46
backend/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md
generated
vendored
@@ -1,46 +0,0 @@
|
||||
# `@img/sharp-libvips-linuxmusl-x64`
|
||||
|
||||
Prebuilt libvips and dependencies for use with sharp on Linux (musl) x64.
|
||||
|
||||
## Licensing
|
||||
|
||||
This software contains third-party libraries
|
||||
used under the terms of the following licences:
|
||||
|
||||
| Library | Used under the terms of |
|
||||
|---------------|-----------------------------------------------------------------------------------------------------------|
|
||||
| aom | BSD 2-Clause + [Alliance for Open Media Patent License 1.0](https://aomedia.org/license/patent-license/) |
|
||||
| cairo | Mozilla Public License 2.0 |
|
||||
| cgif | MIT Licence |
|
||||
| expat | MIT Licence |
|
||||
| fontconfig | [fontconfig Licence](https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/main/COPYING) (BSD-like) |
|
||||
| freetype | [freetype Licence](https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT) (BSD-like) |
|
||||
| fribidi | LGPLv3 |
|
||||
| glib | LGPLv3 |
|
||||
| harfbuzz | MIT Licence |
|
||||
| highway | Apache-2.0 License, BSD 3-Clause |
|
||||
| lcms | MIT Licence |
|
||||
| libarchive | BSD 2-Clause |
|
||||
| libexif | LGPLv3 |
|
||||
| libffi | MIT Licence |
|
||||
| libheif | LGPLv3 |
|
||||
| libimagequant | [BSD 2-Clause](https://github.com/lovell/libimagequant/blob/main/COPYRIGHT) |
|
||||
| libnsgif | MIT Licence |
|
||||
| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) |
|
||||
| librsvg | LGPLv3 |
|
||||
| libspng | [BSD 2-Clause, libpng License](https://github.com/randy408/libspng/blob/master/LICENSE) |
|
||||
| libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) |
|
||||
| libvips | LGPLv3 |
|
||||
| libwebp | New BSD License |
|
||||
| libxml2 | MIT Licence |
|
||||
| mozjpeg | [zlib License, IJG License, BSD-3-Clause](https://github.com/mozilla/mozjpeg/blob/master/LICENSE.md) |
|
||||
| pango | LGPLv3 |
|
||||
| pixman | MIT Licence |
|
||||
| proxy-libintl | LGPLv3 |
|
||||
| zlib-ng | [zlib Licence](https://github.com/zlib-ng/zlib-ng/blob/develop/LICENSE.md) |
|
||||
|
||||
Use of libraries under the terms of the LGPLv3 is via the
|
||||
"any later version" clause of the LGPLv2 or LGPLv2.1.
|
||||
|
||||
Please report any errors or omissions via
|
||||
https://github.com/lovell/sharp-libvips/issues/new
|
||||
221
backend/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h
generated
vendored
221
backend/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h
generated
vendored
@@ -1,221 +0,0 @@
|
||||
/* glibconfig.h
|
||||
*
|
||||
* This is a generated file. Please modify 'glibconfig.h.in'
|
||||
*/
|
||||
|
||||
#ifndef __GLIBCONFIG_H__
|
||||
#define __GLIBCONFIG_H__
|
||||
|
||||
#include <glib/gmacros.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
#define GLIB_HAVE_ALLOCA_H
|
||||
|
||||
#define GLIB_STATIC_COMPILATION 1
|
||||
#define GOBJECT_STATIC_COMPILATION 1
|
||||
#define GIO_STATIC_COMPILATION 1
|
||||
#define GMODULE_STATIC_COMPILATION 1
|
||||
#define GI_STATIC_COMPILATION 1
|
||||
#define G_INTL_STATIC_COMPILATION 1
|
||||
#define FFI_STATIC_BUILD 1
|
||||
|
||||
/* Specifies that GLib's g_print*() functions wrap the
|
||||
* system printf functions. This is useful to know, for example,
|
||||
* when using glibc's register_printf_function().
|
||||
*/
|
||||
#define GLIB_USING_SYSTEM_PRINTF
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_MINFLOAT FLT_MIN
|
||||
#define G_MAXFLOAT FLT_MAX
|
||||
#define G_MINDOUBLE DBL_MIN
|
||||
#define G_MAXDOUBLE DBL_MAX
|
||||
#define G_MINSHORT SHRT_MIN
|
||||
#define G_MAXSHORT SHRT_MAX
|
||||
#define G_MAXUSHORT USHRT_MAX
|
||||
#define G_MININT INT_MIN
|
||||
#define G_MAXINT INT_MAX
|
||||
#define G_MAXUINT UINT_MAX
|
||||
#define G_MINLONG LONG_MIN
|
||||
#define G_MAXLONG LONG_MAX
|
||||
#define G_MAXULONG ULONG_MAX
|
||||
|
||||
typedef signed char gint8;
|
||||
typedef unsigned char guint8;
|
||||
|
||||
typedef signed short gint16;
|
||||
typedef unsigned short guint16;
|
||||
|
||||
#define G_GINT16_MODIFIER "h"
|
||||
#define G_GINT16_FORMAT "hi"
|
||||
#define G_GUINT16_FORMAT "hu"
|
||||
|
||||
|
||||
typedef signed int gint32;
|
||||
typedef unsigned int guint32;
|
||||
|
||||
#define G_GINT32_MODIFIER ""
|
||||
#define G_GINT32_FORMAT "i"
|
||||
#define G_GUINT32_FORMAT "u"
|
||||
|
||||
|
||||
#define G_HAVE_GINT64 1 /* deprecated, always true */
|
||||
|
||||
typedef signed long gint64;
|
||||
typedef unsigned long guint64;
|
||||
|
||||
#define G_GINT64_CONSTANT(val) (val##L)
|
||||
#define G_GUINT64_CONSTANT(val) (val##UL)
|
||||
|
||||
#define G_GINT64_MODIFIER "l"
|
||||
#define G_GINT64_FORMAT "li"
|
||||
#define G_GUINT64_FORMAT "lu"
|
||||
|
||||
|
||||
#define GLIB_SIZEOF_VOID_P 8
|
||||
#define GLIB_SIZEOF_LONG 8
|
||||
#define GLIB_SIZEOF_SIZE_T 8
|
||||
#define GLIB_SIZEOF_SSIZE_T 8
|
||||
|
||||
typedef signed long gssize;
|
||||
typedef unsigned long gsize;
|
||||
#define G_GSIZE_MODIFIER "l"
|
||||
#define G_GSSIZE_MODIFIER "l"
|
||||
#define G_GSIZE_FORMAT "lu"
|
||||
#define G_GSSIZE_FORMAT "li"
|
||||
|
||||
#define G_MAXSIZE G_MAXULONG
|
||||
#define G_MINSSIZE G_MINLONG
|
||||
#define G_MAXSSIZE G_MAXLONG
|
||||
|
||||
typedef gint64 goffset;
|
||||
#define G_MINOFFSET G_MININT64
|
||||
#define G_MAXOFFSET G_MAXINT64
|
||||
|
||||
#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER
|
||||
#define G_GOFFSET_FORMAT G_GINT64_FORMAT
|
||||
#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
|
||||
|
||||
#define G_POLLFD_FORMAT "%d"
|
||||
|
||||
#define GPOINTER_TO_INT(p) ((gint) (glong) (p))
|
||||
#define GPOINTER_TO_UINT(p) ((guint) (gulong) (p))
|
||||
|
||||
#define GINT_TO_POINTER(i) ((gpointer) (glong) (i))
|
||||
#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u))
|
||||
|
||||
typedef signed long gintptr;
|
||||
typedef unsigned long guintptr;
|
||||
|
||||
#define G_GINTPTR_MODIFIER "l"
|
||||
#define G_GINTPTR_FORMAT "li"
|
||||
#define G_GUINTPTR_FORMAT "lu"
|
||||
|
||||
#define GLIB_MAJOR_VERSION 2
|
||||
#define GLIB_MINOR_VERSION 86
|
||||
#define GLIB_MICRO_VERSION 1
|
||||
|
||||
#define G_OS_UNIX
|
||||
|
||||
#define G_VA_COPY va_copy
|
||||
|
||||
#define G_VA_COPY_AS_ARRAY 1
|
||||
|
||||
#define G_HAVE_ISO_VARARGS 1
|
||||
|
||||
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
|
||||
* is passed ISO vararg support is turned off, and there is no work
|
||||
* around to turn it on, so we unconditionally turn it off.
|
||||
*/
|
||||
#if __GNUC__ == 2 && __GNUC_MINOR__ == 95
|
||||
# undef G_HAVE_ISO_VARARGS
|
||||
#endif
|
||||
|
||||
#define G_HAVE_GROWING_STACK 0
|
||||
|
||||
#ifndef _MSC_VER
|
||||
# define G_HAVE_GNUC_VARARGS 1
|
||||
#endif
|
||||
|
||||
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
||||
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
||||
#define G_GNUC_INTERNAL __hidden
|
||||
#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
|
||||
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
||||
#else
|
||||
#define G_GNUC_INTERNAL
|
||||
#endif
|
||||
|
||||
#define G_THREADS_ENABLED
|
||||
#define G_THREADS_IMPL_POSIX
|
||||
|
||||
#define G_ATOMIC_LOCK_FREE
|
||||
|
||||
#define GINT16_TO_LE(val) ((gint16) (val))
|
||||
#define GUINT16_TO_LE(val) ((guint16) (val))
|
||||
#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val))
|
||||
#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
|
||||
|
||||
#define GINT32_TO_LE(val) ((gint32) (val))
|
||||
#define GUINT32_TO_LE(val) ((guint32) (val))
|
||||
#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val))
|
||||
#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val))
|
||||
|
||||
#define GINT64_TO_LE(val) ((gint64) (val))
|
||||
#define GUINT64_TO_LE(val) ((guint64) (val))
|
||||
#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val))
|
||||
#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val))
|
||||
|
||||
#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val))
|
||||
#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val))
|
||||
#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val))
|
||||
#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val))
|
||||
#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val))
|
||||
#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val))
|
||||
#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val))
|
||||
#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val))
|
||||
#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val))
|
||||
#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val))
|
||||
#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val))
|
||||
#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val))
|
||||
#define G_BYTE_ORDER G_LITTLE_ENDIAN
|
||||
|
||||
#define GLIB_SYSDEF_POLLIN =1
|
||||
#define GLIB_SYSDEF_POLLOUT =4
|
||||
#define GLIB_SYSDEF_POLLPRI =2
|
||||
#define GLIB_SYSDEF_POLLHUP =16
|
||||
#define GLIB_SYSDEF_POLLERR =8
|
||||
#define GLIB_SYSDEF_POLLNVAL =32
|
||||
|
||||
/* No way to disable deprecation warnings for macros, so only emit deprecation
|
||||
* warnings on platforms where usage of this macro is broken */
|
||||
#if defined(__APPLE__) || defined(_MSC_VER) || defined(__CYGWIN__)
|
||||
#define G_MODULE_SUFFIX "so" GLIB_DEPRECATED_MACRO_IN_2_76
|
||||
#else
|
||||
#define G_MODULE_SUFFIX "so"
|
||||
#endif
|
||||
|
||||
typedef int GPid;
|
||||
#define G_PID_FORMAT "i"
|
||||
|
||||
#define GLIB_SYSDEF_AF_UNIX 1
|
||||
#define GLIB_SYSDEF_AF_INET 2
|
||||
#define GLIB_SYSDEF_AF_INET6 10
|
||||
|
||||
#define GLIB_SYSDEF_MSG_OOB 1
|
||||
#define GLIB_SYSDEF_MSG_PEEK 2
|
||||
#define GLIB_SYSDEF_MSG_DONTROUTE 4
|
||||
|
||||
#define G_DIR_SEPARATOR '/'
|
||||
#define G_DIR_SEPARATOR_S "/"
|
||||
#define G_SEARCHPATH_SEPARATOR ':'
|
||||
#define G_SEARCHPATH_SEPARATOR_S ":"
|
||||
|
||||
#undef G_HAVE_FREE_SIZED
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GLIBCONFIG_H__ */
|
||||
1
backend/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js
generated
vendored
1
backend/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = __dirname;
|
||||
BIN
backend/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3
generated
vendored
BIN
backend/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3
generated
vendored
Binary file not shown.
42
backend/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json
generated
vendored
42
backend/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json
generated
vendored
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"name": "@img/sharp-libvips-linuxmusl-x64",
|
||||
"version": "1.2.4",
|
||||
"description": "Prebuilt libvips and dependencies for use with sharp on Linux (musl) x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lovell/sharp-libvips.git",
|
||||
"directory": "npm/linuxmusl-x64"
|
||||
},
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"versions.json"
|
||||
],
|
||||
"type": "commonjs",
|
||||
"exports": {
|
||||
"./lib": "./lib/index.js",
|
||||
"./package": "./package.json",
|
||||
"./versions": "./versions.json"
|
||||
},
|
||||
"config": {
|
||||
"musl": ">=1.2.2"
|
||||
},
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
]
|
||||
}
|
||||
30
backend/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json
generated
vendored
30
backend/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json
generated
vendored
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"aom": "3.13.1",
|
||||
"archive": "3.8.2",
|
||||
"cairo": "1.18.4",
|
||||
"cgif": "0.5.0",
|
||||
"exif": "0.6.25",
|
||||
"expat": "2.7.3",
|
||||
"ffi": "3.5.2",
|
||||
"fontconfig": "2.17.1",
|
||||
"freetype": "2.14.1",
|
||||
"fribidi": "1.0.16",
|
||||
"glib": "2.86.1",
|
||||
"harfbuzz": "12.1.0",
|
||||
"heif": "1.20.2",
|
||||
"highway": "1.3.0",
|
||||
"imagequant": "2.4.1",
|
||||
"lcms": "2.17",
|
||||
"mozjpeg": "0826579",
|
||||
"pango": "1.57.0",
|
||||
"pixman": "0.46.4",
|
||||
"png": "1.6.50",
|
||||
"proxy-libintl": "0.5",
|
||||
"rsvg": "2.61.2",
|
||||
"spng": "0.7.4",
|
||||
"tiff": "4.7.1",
|
||||
"vips": "8.17.3",
|
||||
"webp": "1.6.0",
|
||||
"xml2": "2.15.1",
|
||||
"zlib-ng": "2.2.5"
|
||||
}
|
||||
191
backend/node_modules/@img/sharp-linux-x64/LICENSE
generated
vendored
191
backend/node_modules/@img/sharp-linux-x64/LICENSE
generated
vendored
@@ -1,191 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
||||
owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities
|
||||
that control, are controlled by, or are under common control with that entity.
|
||||
For the purposes of this definition, "control" means (i) the power, direct or
|
||||
indirect, to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including
|
||||
but not limited to software source code, documentation source, and configuration
|
||||
files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or
|
||||
translation of a Source form, including but not limited to compiled object code,
|
||||
generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made
|
||||
available under the License, as indicated by a copyright notice that is included
|
||||
in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
||||
is based on (or derived from) the Work and for which the editorial revisions,
|
||||
annotations, elaborations, or other modifications represent, as a whole, an
|
||||
original work of authorship. For the purposes of this License, Derivative Works
|
||||
shall not include works that remain separable from, or merely link (or bind by
|
||||
name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version
|
||||
of the Work and any modifications or additions to that Work or Derivative Works
|
||||
thereof, that is intentionally submitted to Licensor for inclusion in the Work
|
||||
by the copyright owner or by an individual or Legal Entity authorized to submit
|
||||
on behalf of the copyright owner. For the purposes of this definition,
|
||||
"submitted" means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems, and
|
||||
issue tracking systems that are managed by, or on behalf of, the Licensor for
|
||||
the purpose of discussing and improving the Work, but excluding communication
|
||||
that is conspicuously marked or otherwise designated in writing by the copyright
|
||||
owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
||||
of whom a Contribution has been received by Licensor and subsequently
|
||||
incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the Work and such
|
||||
Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable (except as stated in this section) patent license to make, have
|
||||
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
|
||||
such license applies only to those patent claims licensable by such Contributor
|
||||
that are necessarily infringed by their Contribution(s) alone or by combination
|
||||
of their Contribution(s) with the Work to which such Contribution(s) was
|
||||
submitted. If You institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
||||
Contribution incorporated within the Work constitutes direct or contributory
|
||||
patent infringement, then any patent licenses granted to You under this License
|
||||
for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution.
|
||||
|
||||
You may reproduce and distribute copies of the Work or Derivative Works thereof
|
||||
in any medium, with or without modifications, and in Source or Object form,
|
||||
provided that You meet the following conditions:
|
||||
|
||||
You must give any other recipients of the Work or Derivative Works a copy of
|
||||
this License; and
|
||||
You must cause any modified files to carry prominent notices stating that You
|
||||
changed the files; and
|
||||
You must retain, in the Source form of any Derivative Works that You distribute,
|
||||
all copyright, patent, trademark, and attribution notices from the Source form
|
||||
of the Work, excluding those notices that do not pertain to any part of the
|
||||
Derivative Works; and
|
||||
If the Work includes a "NOTICE" text file as part of its distribution, then any
|
||||
Derivative Works that You distribute must include a readable copy of the
|
||||
attribution notices contained within such NOTICE file, excluding those notices
|
||||
that do not pertain to any part of the Derivative Works, in at least one of the
|
||||
following places: within a NOTICE text file distributed as part of the
|
||||
Derivative Works; within the Source form or documentation, if provided along
|
||||
with the Derivative Works; or, within a display generated by the Derivative
|
||||
Works, if and wherever such third-party notices normally appear. The contents of
|
||||
the NOTICE file are for informational purposes only and do not modify the
|
||||
License. You may add Your own attribution notices within Derivative Works that
|
||||
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
||||
provided that such additional attribution notices cannot be construed as
|
||||
modifying the License.
|
||||
You may add Your own copyright statement to Your modifications and may provide
|
||||
additional or different license terms and conditions for use, reproduction, or
|
||||
distribution of Your modifications, or for any such Derivative Works as a whole,
|
||||
provided Your use, reproduction, and distribution of the Work otherwise complies
|
||||
with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions.
|
||||
|
||||
Unless You explicitly state otherwise, any Contribution intentionally submitted
|
||||
for inclusion in the Work by You to the Licensor shall be under the terms and
|
||||
conditions of this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify the terms of
|
||||
any separate license agreement you may have executed with Licensor regarding
|
||||
such Contributions.
|
||||
|
||||
6. Trademarks.
|
||||
|
||||
This License does not grant permission to use the trade names, trademarks,
|
||||
service marks, or product names of the Licensor, except as required for
|
||||
reasonable and customary use in describing the origin of the Work and
|
||||
reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, Licensor provides the
|
||||
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
|
||||
including, without limitation, any warranties or conditions of TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
|
||||
solely responsible for determining the appropriateness of using or
|
||||
redistributing the Work and assume any risks associated with Your exercise of
|
||||
permissions under this License.
|
||||
|
||||
8. Limitation of Liability.
|
||||
|
||||
In no event and under no legal theory, whether in tort (including negligence),
|
||||
contract, or otherwise, unless required by applicable law (such as deliberate
|
||||
and grossly negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special, incidental,
|
||||
or consequential damages of any character arising as a result of this License or
|
||||
out of the use or inability to use the Work (including but not limited to
|
||||
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
|
||||
any and all other commercial damages or losses), even if such Contributor has
|
||||
been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability.
|
||||
|
||||
While redistributing the Work or Derivative Works thereof, You may choose to
|
||||
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
|
||||
other liability obligations and/or rights consistent with this License. However,
|
||||
in accepting such obligations, You may act only on Your own behalf and on Your
|
||||
sole responsibility, not on behalf of any other Contributor, and only if You
|
||||
agree to indemnify, defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason of your
|
||||
accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate
|
||||
notice, with the fields enclosed by brackets "[]" replaced with your own
|
||||
identifying information. (Don't include the brackets!) The text should be
|
||||
enclosed in the appropriate comment syntax for the file format. We also
|
||||
recommend that a file or class name and description of purpose be included on
|
||||
the same "printed page" as the copyright notice for easier identification within
|
||||
third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
BIN
backend/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node
generated
vendored
BIN
backend/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node
generated
vendored
Binary file not shown.
46
backend/node_modules/@img/sharp-linux-x64/package.json
generated
vendored
46
backend/node_modules/@img/sharp-linux-x64/package.json
generated
vendored
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"name": "@img/sharp-linux-x64",
|
||||
"version": "0.34.5",
|
||||
"description": "Prebuilt sharp for use with Linux (glibc) x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lovell/sharp.git",
|
||||
"directory": "npm/linux-x64"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linux-x64": "1.2.4"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"type": "commonjs",
|
||||
"exports": {
|
||||
"./sharp.node": "./lib/sharp-linux-x64.node",
|
||||
"./package": "./package.json"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"config": {
|
||||
"glibc": ">=2.26"
|
||||
},
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
]
|
||||
}
|
||||
191
backend/node_modules/@img/sharp-linuxmusl-x64/LICENSE
generated
vendored
191
backend/node_modules/@img/sharp-linuxmusl-x64/LICENSE
generated
vendored
@@ -1,191 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
||||
owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities
|
||||
that control, are controlled by, or are under common control with that entity.
|
||||
For the purposes of this definition, "control" means (i) the power, direct or
|
||||
indirect, to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including
|
||||
but not limited to software source code, documentation source, and configuration
|
||||
files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or
|
||||
translation of a Source form, including but not limited to compiled object code,
|
||||
generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made
|
||||
available under the License, as indicated by a copyright notice that is included
|
||||
in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
||||
is based on (or derived from) the Work and for which the editorial revisions,
|
||||
annotations, elaborations, or other modifications represent, as a whole, an
|
||||
original work of authorship. For the purposes of this License, Derivative Works
|
||||
shall not include works that remain separable from, or merely link (or bind by
|
||||
name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version
|
||||
of the Work and any modifications or additions to that Work or Derivative Works
|
||||
thereof, that is intentionally submitted to Licensor for inclusion in the Work
|
||||
by the copyright owner or by an individual or Legal Entity authorized to submit
|
||||
on behalf of the copyright owner. For the purposes of this definition,
|
||||
"submitted" means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems, and
|
||||
issue tracking systems that are managed by, or on behalf of, the Licensor for
|
||||
the purpose of discussing and improving the Work, but excluding communication
|
||||
that is conspicuously marked or otherwise designated in writing by the copyright
|
||||
owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
||||
of whom a Contribution has been received by Licensor and subsequently
|
||||
incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the Work and such
|
||||
Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License.
|
||||
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable (except as stated in this section) patent license to make, have
|
||||
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
|
||||
such license applies only to those patent claims licensable by such Contributor
|
||||
that are necessarily infringed by their Contribution(s) alone or by combination
|
||||
of their Contribution(s) with the Work to which such Contribution(s) was
|
||||
submitted. If You institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
||||
Contribution incorporated within the Work constitutes direct or contributory
|
||||
patent infringement, then any patent licenses granted to You under this License
|
||||
for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution.
|
||||
|
||||
You may reproduce and distribute copies of the Work or Derivative Works thereof
|
||||
in any medium, with or without modifications, and in Source or Object form,
|
||||
provided that You meet the following conditions:
|
||||
|
||||
You must give any other recipients of the Work or Derivative Works a copy of
|
||||
this License; and
|
||||
You must cause any modified files to carry prominent notices stating that You
|
||||
changed the files; and
|
||||
You must retain, in the Source form of any Derivative Works that You distribute,
|
||||
all copyright, patent, trademark, and attribution notices from the Source form
|
||||
of the Work, excluding those notices that do not pertain to any part of the
|
||||
Derivative Works; and
|
||||
If the Work includes a "NOTICE" text file as part of its distribution, then any
|
||||
Derivative Works that You distribute must include a readable copy of the
|
||||
attribution notices contained within such NOTICE file, excluding those notices
|
||||
that do not pertain to any part of the Derivative Works, in at least one of the
|
||||
following places: within a NOTICE text file distributed as part of the
|
||||
Derivative Works; within the Source form or documentation, if provided along
|
||||
with the Derivative Works; or, within a display generated by the Derivative
|
||||
Works, if and wherever such third-party notices normally appear. The contents of
|
||||
the NOTICE file are for informational purposes only and do not modify the
|
||||
License. You may add Your own attribution notices within Derivative Works that
|
||||
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
||||
provided that such additional attribution notices cannot be construed as
|
||||
modifying the License.
|
||||
You may add Your own copyright statement to Your modifications and may provide
|
||||
additional or different license terms and conditions for use, reproduction, or
|
||||
distribution of Your modifications, or for any such Derivative Works as a whole,
|
||||
provided Your use, reproduction, and distribution of the Work otherwise complies
|
||||
with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions.
|
||||
|
||||
Unless You explicitly state otherwise, any Contribution intentionally submitted
|
||||
for inclusion in the Work by You to the Licensor shall be under the terms and
|
||||
conditions of this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify the terms of
|
||||
any separate license agreement you may have executed with Licensor regarding
|
||||
such Contributions.
|
||||
|
||||
6. Trademarks.
|
||||
|
||||
This License does not grant permission to use the trade names, trademarks,
|
||||
service marks, or product names of the Licensor, except as required for
|
||||
reasonable and customary use in describing the origin of the Work and
|
||||
reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty.
|
||||
|
||||
Unless required by applicable law or agreed to in writing, Licensor provides the
|
||||
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
|
||||
including, without limitation, any warranties or conditions of TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
|
||||
solely responsible for determining the appropriateness of using or
|
||||
redistributing the Work and assume any risks associated with Your exercise of
|
||||
permissions under this License.
|
||||
|
||||
8. Limitation of Liability.
|
||||
|
||||
In no event and under no legal theory, whether in tort (including negligence),
|
||||
contract, or otherwise, unless required by applicable law (such as deliberate
|
||||
and grossly negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special, incidental,
|
||||
or consequential damages of any character arising as a result of this License or
|
||||
out of the use or inability to use the Work (including but not limited to
|
||||
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
|
||||
any and all other commercial damages or losses), even if such Contributor has
|
||||
been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability.
|
||||
|
||||
While redistributing the Work or Derivative Works thereof, You may choose to
|
||||
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
|
||||
other liability obligations and/or rights consistent with this License. However,
|
||||
in accepting such obligations, You may act only on Your own behalf and on Your
|
||||
sole responsibility, not on behalf of any other Contributor, and only if You
|
||||
agree to indemnify, defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason of your
|
||||
accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate
|
||||
notice, with the fields enclosed by brackets "[]" replaced with your own
|
||||
identifying information. (Don't include the brackets!) The text should be
|
||||
enclosed in the appropriate comment syntax for the file format. We also
|
||||
recommend that a file or class name and description of purpose be included on
|
||||
the same "printed page" as the copyright notice for easier identification within
|
||||
third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
18
backend/node_modules/@img/sharp-linuxmusl-x64/README.md
generated
vendored
18
backend/node_modules/@img/sharp-linuxmusl-x64/README.md
generated
vendored
@@ -1,18 +0,0 @@
|
||||
# `@img/sharp-linuxmusl-x64`
|
||||
|
||||
Prebuilt sharp for use with Linux (musl) x64.
|
||||
|
||||
## Licensing
|
||||
|
||||
Copyright 2013 Lovell Fuller and others.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
BIN
backend/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node
generated
vendored
BIN
backend/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node
generated
vendored
Binary file not shown.
46
backend/node_modules/@img/sharp-linuxmusl-x64/package.json
generated
vendored
46
backend/node_modules/@img/sharp-linuxmusl-x64/package.json
generated
vendored
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"name": "@img/sharp-linuxmusl-x64",
|
||||
"version": "0.34.5",
|
||||
"description": "Prebuilt sharp for use with Linux (musl) x64",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"homepage": "https://sharp.pixelplumbing.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lovell/sharp.git",
|
||||
"directory": "npm/linuxmusl-x64"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linuxmusl-x64": "1.2.4"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"type": "commonjs",
|
||||
"exports": {
|
||||
"./sharp.node": "./lib/sharp-linuxmusl-x64.node",
|
||||
"./package": "./package.json"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"config": {
|
||||
"musl": ">=1.2.2"
|
||||
},
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"cpu": [
|
||||
"x64"
|
||||
]
|
||||
}
|
||||
21
backend/node_modules/@types/pg/LICENSE
generated
vendored
Normal file
21
backend/node_modules/@types/pg/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
15
backend/node_modules/@types/pg/README.md
generated
vendored
Normal file
15
backend/node_modules/@types/pg/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/pg`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for pg (https://github.com/brianc/node-postgres).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pg.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 27 Oct 2025 23:32:24 GMT
|
||||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node), [pg-protocol](https://npmjs.com/package/pg-protocol), [pg-types](https://npmjs.com/package/pg-types)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Phips Peter](https://github.com/pspeter3).
|
||||
56
backend/node_modules/@types/pg/index.d.mts
generated
vendored
Normal file
56
backend/node_modules/@types/pg/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
import * as pg from "./index.js";
|
||||
|
||||
declare const PG: {
|
||||
defaults: typeof pg.defaults;
|
||||
Client: typeof pg.Client;
|
||||
ClientBase: typeof pg.ClientBase;
|
||||
Events: typeof pg.Events;
|
||||
Query: typeof pg.Query;
|
||||
Pool: typeof pg.Pool;
|
||||
Connection: typeof pg.Connection;
|
||||
types: typeof pg.types;
|
||||
DatabaseError: typeof pg.DatabaseError;
|
||||
TypeOverrides: typeof pg.TypeOverrides;
|
||||
escapeIdentifier: typeof pg.escapeIdentifier;
|
||||
escapeLiteral: typeof pg.escapeLiteral;
|
||||
Result: typeof pg.Result;
|
||||
native: typeof pg.native;
|
||||
};
|
||||
|
||||
declare namespace PG {
|
||||
type QueryConfigValues<T> = pg.QueryConfigValues<T>;
|
||||
type ClientConfig = pg.ClientConfig;
|
||||
type ConnectionConfig = pg.ConnectionConfig;
|
||||
type Defaults = pg.Defaults;
|
||||
type PoolConfig = pg.PoolConfig;
|
||||
type QueryConfig<I = any[]> = pg.QueryConfig<I>;
|
||||
type CustomTypesConfig = pg.CustomTypesConfig;
|
||||
type Submittable = pg.Submittable;
|
||||
type QueryArrayConfig<I = any[]> = pg.QueryArrayConfig<I>;
|
||||
type FieldDef = pg.FieldDef;
|
||||
type QueryResultBase = pg.QueryResultBase;
|
||||
type QueryResultRow = pg.QueryResultRow;
|
||||
type QueryResult<R extends QueryResultRow = any> = pg.QueryResult<R>;
|
||||
type QueryArrayResult<R extends any[] = any[]> = pg.QueryArrayResult<R>;
|
||||
type Notification = pg.Notification;
|
||||
type ResultBuilder<R extends QueryResultRow = any> = pg.ResultBuilder<R>;
|
||||
type QueryParse = pg.QueryParse;
|
||||
type BindConfig = pg.BindConfig;
|
||||
type ExecuteConfig = pg.ExecuteConfig;
|
||||
type MessageConfig = pg.MessageConfig;
|
||||
type PoolOptions = pg.PoolOptions;
|
||||
type PoolClient = pg.PoolClient;
|
||||
|
||||
type ClientBase = pg.ClientBase;
|
||||
type Client = pg.Client;
|
||||
type Query = pg.Query;
|
||||
type Events = pg.Events;
|
||||
type Pool = pg.Pool;
|
||||
type Connection = pg.Connection;
|
||||
type DatabaseError = pg.DatabaseError;
|
||||
type TypeOverrides = pg.TypeOverrides;
|
||||
type Result = pg.Result;
|
||||
}
|
||||
|
||||
export * from "./index.js";
|
||||
export default PG;
|
||||
349
backend/node_modules/@types/pg/index.d.ts
generated
vendored
Normal file
349
backend/node_modules/@types/pg/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,349 @@
|
||||
/// <reference types="node" />
|
||||
|
||||
import events = require("events");
|
||||
import stream = require("stream");
|
||||
import pgTypes = require("pg-types");
|
||||
import { NoticeMessage } from "pg-protocol/dist/messages.js";
|
||||
|
||||
import { ConnectionOptions } from "tls";
|
||||
|
||||
export type QueryConfigValues<T> = T extends Array<infer U> ? T : never;
|
||||
|
||||
export interface ClientConfig {
|
||||
user?: string | undefined;
|
||||
database?: string | undefined;
|
||||
password?: string | (() => string | Promise<string>) | undefined;
|
||||
port?: number | undefined;
|
||||
host?: string | undefined;
|
||||
connectionString?: string | undefined;
|
||||
keepAlive?: boolean | undefined;
|
||||
stream?: () => stream.Duplex | undefined;
|
||||
statement_timeout?: false | number | undefined;
|
||||
ssl?: boolean | ConnectionOptions | undefined;
|
||||
query_timeout?: number | undefined;
|
||||
lock_timeout?: number | undefined;
|
||||
keepAliveInitialDelayMillis?: number | undefined;
|
||||
idle_in_transaction_session_timeout?: number | undefined;
|
||||
application_name?: string | undefined;
|
||||
fallback_application_name?: string | undefined;
|
||||
connectionTimeoutMillis?: number | undefined;
|
||||
types?: CustomTypesConfig | undefined;
|
||||
options?: string | undefined;
|
||||
client_encoding?: string | undefined;
|
||||
}
|
||||
|
||||
export type ConnectionConfig = ClientConfig;
|
||||
|
||||
export interface Defaults extends ClientConfig {
|
||||
poolSize?: number | undefined;
|
||||
poolIdleTimeout?: number | undefined;
|
||||
reapIntervalMillis?: number | undefined;
|
||||
binary?: boolean | undefined;
|
||||
parseInt8?: boolean | undefined;
|
||||
parseInputDatesAsUTC?: boolean | undefined;
|
||||
}
|
||||
|
||||
export interface PoolConfig extends ClientConfig {
|
||||
// properties from module 'pg-pool'
|
||||
max?: number | undefined;
|
||||
min?: number | undefined;
|
||||
idleTimeoutMillis?: number | undefined | null;
|
||||
log?: ((...messages: any[]) => void) | undefined;
|
||||
Promise?: PromiseConstructorLike | undefined;
|
||||
allowExitOnIdle?: boolean | undefined;
|
||||
maxUses?: number | undefined;
|
||||
maxLifetimeSeconds?: number | undefined;
|
||||
Client?: (new() => ClientBase) | undefined;
|
||||
}
|
||||
|
||||
export interface QueryConfig<I = any[]> {
|
||||
name?: string | undefined;
|
||||
text: string;
|
||||
values?: QueryConfigValues<I>;
|
||||
types?: CustomTypesConfig | undefined;
|
||||
}
|
||||
|
||||
export interface CustomTypesConfig {
|
||||
getTypeParser: typeof pgTypes.getTypeParser;
|
||||
}
|
||||
|
||||
export interface Submittable {
|
||||
submit: (connection: Connection) => void;
|
||||
}
|
||||
|
||||
export interface QueryArrayConfig<I = any[]> extends QueryConfig<I> {
|
||||
rowMode: "array";
|
||||
}
|
||||
|
||||
export interface FieldDef {
|
||||
name: string;
|
||||
tableID: number;
|
||||
columnID: number;
|
||||
dataTypeID: number;
|
||||
dataTypeSize: number;
|
||||
dataTypeModifier: number;
|
||||
format: string;
|
||||
}
|
||||
|
||||
export interface QueryResultBase {
|
||||
command: string;
|
||||
rowCount: number | null;
|
||||
oid: number;
|
||||
fields: FieldDef[];
|
||||
}
|
||||
|
||||
export interface QueryResultRow {
|
||||
[column: string]: any;
|
||||
}
|
||||
|
||||
export interface QueryResult<R extends QueryResultRow = any> extends QueryResultBase {
|
||||
rows: R[];
|
||||
}
|
||||
|
||||
export interface QueryArrayResult<R extends any[] = any[]> extends QueryResultBase {
|
||||
rows: R[];
|
||||
}
|
||||
|
||||
export interface Notification {
|
||||
processId: number;
|
||||
channel: string;
|
||||
payload?: string | undefined;
|
||||
}
|
||||
|
||||
export interface ResultBuilder<R extends QueryResultRow = any> extends QueryResult<R> {
|
||||
addRow(row: R): void;
|
||||
}
|
||||
|
||||
export interface QueryParse {
|
||||
name: string;
|
||||
text: string;
|
||||
types: string[];
|
||||
}
|
||||
|
||||
type ValueMapper = (param: any, index: number) => any;
|
||||
|
||||
export interface BindConfig {
|
||||
portal?: string | undefined;
|
||||
statement?: string | undefined;
|
||||
binary?: string | undefined;
|
||||
values?: Array<Buffer | null | undefined | string> | undefined;
|
||||
valueMapper?: ValueMapper | undefined;
|
||||
}
|
||||
|
||||
export interface ExecuteConfig {
|
||||
portal?: string | undefined;
|
||||
rows?: string | undefined;
|
||||
}
|
||||
|
||||
export interface MessageConfig {
|
||||
type: string;
|
||||
name?: string | undefined;
|
||||
}
|
||||
|
||||
export function escapeIdentifier(str: string): string;
|
||||
|
||||
export function escapeLiteral(str: string): string;
|
||||
|
||||
export class Connection extends events.EventEmitter {
|
||||
readonly stream: stream.Duplex;
|
||||
|
||||
constructor(config?: ConnectionConfig);
|
||||
|
||||
bind(config: BindConfig | null, more: boolean): void;
|
||||
execute(config: ExecuteConfig | null, more: boolean): void;
|
||||
parse(query: QueryParse, more: boolean): void;
|
||||
|
||||
query(text: string): void;
|
||||
|
||||
describe(msg: MessageConfig, more: boolean): void;
|
||||
close(msg: MessageConfig, more: boolean): void;
|
||||
|
||||
flush(): void;
|
||||
sync(): void;
|
||||
end(): void;
|
||||
}
|
||||
|
||||
export interface PoolOptions extends PoolConfig {
|
||||
max: number;
|
||||
maxUses: number;
|
||||
allowExitOnIdle: boolean;
|
||||
maxLifetimeSeconds: number;
|
||||
idleTimeoutMillis: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link https://node-postgres.com/apis/pool}
|
||||
*/
|
||||
export class Pool extends events.EventEmitter {
|
||||
/**
|
||||
* Every field of the config object is entirely optional.
|
||||
* The config passed to the pool is also passed to every client
|
||||
* instance within the pool when the pool creates that client.
|
||||
*/
|
||||
constructor(config?: PoolConfig);
|
||||
|
||||
readonly totalCount: number;
|
||||
readonly idleCount: number;
|
||||
readonly waitingCount: number;
|
||||
readonly expiredCount: number;
|
||||
|
||||
readonly ending: boolean;
|
||||
readonly ended: boolean;
|
||||
|
||||
options: PoolOptions;
|
||||
|
||||
connect(): Promise<PoolClient>;
|
||||
connect(
|
||||
callback: (err: Error | undefined, client: PoolClient | undefined, done: (release?: any) => void) => void,
|
||||
): void;
|
||||
|
||||
end(): Promise<void>;
|
||||
end(callback: () => void): void;
|
||||
|
||||
query<T extends Submittable>(queryStream: T): T;
|
||||
// tslint:disable:no-unnecessary-generics
|
||||
query<R extends any[] = any[], I = any[]>(
|
||||
queryConfig: QueryArrayConfig<I>,
|
||||
values?: QueryConfigValues<I>,
|
||||
): Promise<QueryArrayResult<R>>;
|
||||
query<R extends QueryResultRow = any, I = any[]>(
|
||||
queryConfig: QueryConfig<I>,
|
||||
): Promise<QueryResult<R>>;
|
||||
query<R extends QueryResultRow = any, I = any[]>(
|
||||
queryTextOrConfig: string | QueryConfig<I>,
|
||||
values?: QueryConfigValues<I>,
|
||||
): Promise<QueryResult<R>>;
|
||||
query<R extends any[] = any[], I = any[]>(
|
||||
queryConfig: QueryArrayConfig<I>,
|
||||
callback: (err: Error, result: QueryArrayResult<R>) => void,
|
||||
): void;
|
||||
query<R extends QueryResultRow = any, I = any[]>(
|
||||
queryTextOrConfig: string | QueryConfig<I>,
|
||||
callback: (err: Error, result: QueryResult<R>) => void,
|
||||
): void;
|
||||
query<R extends QueryResultRow = any, I = any[]>(
|
||||
queryText: string,
|
||||
values: QueryConfigValues<I>,
|
||||
callback: (err: Error, result: QueryResult<R>) => void,
|
||||
): void;
|
||||
// tslint:enable:no-unnecessary-generics
|
||||
|
||||
on(event: "release" | "error", listener: (err: Error, client: PoolClient) => void): this;
|
||||
on(event: "connect" | "acquire" | "remove", listener: (client: PoolClient) => void): this;
|
||||
}
|
||||
|
||||
export class ClientBase extends events.EventEmitter {
|
||||
constructor(config?: string | ClientConfig);
|
||||
|
||||
connect(): Promise<void>;
|
||||
connect(callback: (err: Error) => void): void;
|
||||
|
||||
query<T extends Submittable>(queryStream: T): T;
|
||||
// tslint:disable:no-unnecessary-generics
|
||||
query<R extends any[] = any[], I = any[]>(
|
||||
queryConfig: QueryArrayConfig<I>,
|
||||
values?: QueryConfigValues<I>,
|
||||
): Promise<QueryArrayResult<R>>;
|
||||
query<R extends QueryResultRow = any, I = any>(
|
||||
queryConfig: QueryConfig<I>,
|
||||
): Promise<QueryResult<R>>;
|
||||
query<R extends QueryResultRow = any, I = any[]>(
|
||||
queryTextOrConfig: string | QueryConfig<I>,
|
||||
values?: QueryConfigValues<I>,
|
||||
): Promise<QueryResult<R>>;
|
||||
query<R extends any[] = any[], I = any[]>(
|
||||
queryConfig: QueryArrayConfig<I>,
|
||||
callback: (err: Error, result: QueryArrayResult<R>) => void,
|
||||
): void;
|
||||
query<R extends QueryResultRow = any, I = any[]>(
|
||||
queryTextOrConfig: string | QueryConfig<I>,
|
||||
callback: (err: Error, result: QueryResult<R>) => void,
|
||||
): void;
|
||||
query<R extends QueryResultRow = any, I = any[]>(
|
||||
queryText: string,
|
||||
values: QueryConfigValues<I>,
|
||||
callback: (err: Error, result: QueryResult<R>) => void,
|
||||
): void;
|
||||
// tslint:enable:no-unnecessary-generics
|
||||
|
||||
copyFrom(queryText: string): stream.Writable;
|
||||
copyTo(queryText: string): stream.Readable;
|
||||
|
||||
pauseDrain(): void;
|
||||
resumeDrain(): void;
|
||||
|
||||
escapeIdentifier: typeof escapeIdentifier;
|
||||
escapeLiteral: typeof escapeLiteral;
|
||||
setTypeParser: typeof pgTypes.setTypeParser;
|
||||
getTypeParser: typeof pgTypes.getTypeParser;
|
||||
|
||||
on(event: "drain", listener: () => void): this;
|
||||
on(event: "error", listener: (err: Error) => void): this;
|
||||
on(event: "notice", listener: (notice: NoticeMessage) => void): this;
|
||||
on(event: "notification", listener: (message: Notification) => void): this;
|
||||
// tslint:disable-next-line unified-signatures
|
||||
on(event: "end", listener: () => void): this;
|
||||
}
|
||||
|
||||
export class Client extends ClientBase {
|
||||
user?: string | undefined;
|
||||
database?: string | undefined;
|
||||
port: number;
|
||||
host: string;
|
||||
password?: string | undefined;
|
||||
ssl: boolean;
|
||||
readonly connection: Connection;
|
||||
|
||||
constructor(config?: string | ClientConfig);
|
||||
|
||||
end(): Promise<void>;
|
||||
end(callback: (err: Error) => void): void;
|
||||
}
|
||||
|
||||
export interface PoolClient extends ClientBase {
|
||||
release(err?: Error | boolean): void;
|
||||
}
|
||||
|
||||
export class Query<R extends QueryResultRow = any, I extends any[] = any> extends events.EventEmitter
|
||||
implements Submittable
|
||||
{
|
||||
constructor(
|
||||
queryTextOrConfig?: string | QueryConfig<I>,
|
||||
callback?: (error: Error | undefined, result: ResultBuilder<R>) => void,
|
||||
);
|
||||
constructor(
|
||||
queryTextOrConfig?: string | QueryConfig<I>,
|
||||
values?: I,
|
||||
callback?: (error: Error | undefined, result: ResultBuilder<R>) => void,
|
||||
);
|
||||
submit: (connection: Connection) => void;
|
||||
on(event: "row", listener: (row: R, result?: ResultBuilder<R>) => void): this;
|
||||
on(event: "error", listener: (err: Error) => void): this;
|
||||
on(event: "end", listener: (result: ResultBuilder<R>) => void): this;
|
||||
}
|
||||
|
||||
export class Events extends events.EventEmitter {
|
||||
on(event: "error", listener: (err: Error, client: Client) => void): this;
|
||||
}
|
||||
|
||||
export const types: typeof pgTypes;
|
||||
|
||||
export const defaults: Defaults & ClientConfig;
|
||||
|
||||
import * as Pg from ".";
|
||||
|
||||
export const native: typeof Pg | null;
|
||||
|
||||
export { DatabaseError } from "pg-protocol";
|
||||
import TypeOverrides = require("./lib/type-overrides");
|
||||
export { TypeOverrides };
|
||||
|
||||
export class Result<R extends QueryResultRow = any> implements QueryResult<R> {
|
||||
command: string;
|
||||
rowCount: number | null;
|
||||
oid: number;
|
||||
fields: FieldDef[];
|
||||
rows: R[];
|
||||
|
||||
constructor(rowMode: string, t: typeof types);
|
||||
}
|
||||
58
backend/node_modules/@types/pg/lib/connection-parameters.d.ts
generated
vendored
Normal file
58
backend/node_modules/@types/pg/lib/connection-parameters.d.ts
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
import { ConnectionOptions } from "tls";
|
||||
import { ConnectionConfig } from "..";
|
||||
|
||||
interface ConnectionParametersConfig extends
|
||||
Pick<
|
||||
ConnectionConfig,
|
||||
| "user"
|
||||
| "database"
|
||||
| "password"
|
||||
| "port"
|
||||
| "host"
|
||||
| "options"
|
||||
| "ssl"
|
||||
| "application_name"
|
||||
| "statement_timeout"
|
||||
| "idle_in_transaction_session_timeout"
|
||||
| "query_timeout"
|
||||
>
|
||||
{
|
||||
binary?: unknown;
|
||||
client_encoding?: unknown;
|
||||
replication?: unknown;
|
||||
isDomainSocket?: unknown;
|
||||
fallback_application_name?: unknown;
|
||||
lock_timeout?: unknown;
|
||||
connect_timeout?: unknown;
|
||||
keepalives?: unknown;
|
||||
keepalives_idle?: unknown;
|
||||
}
|
||||
|
||||
export = ConnectionParameters;
|
||||
declare class ConnectionParameters implements ConnectionParametersConfig {
|
||||
user?: string | undefined;
|
||||
database?: string | undefined;
|
||||
password?: string | (() => string | Promise<string>) | undefined;
|
||||
port?: number | undefined;
|
||||
host?: string | undefined;
|
||||
statement_timeout?: false | number | undefined;
|
||||
ssl?: boolean | ConnectionOptions | undefined;
|
||||
query_timeout?: number | undefined;
|
||||
idle_in_transaction_session_timeout?: number | undefined;
|
||||
application_name?: string | undefined;
|
||||
options?: string | undefined;
|
||||
|
||||
binary?: unknown;
|
||||
client_encoding?: unknown;
|
||||
replication?: unknown;
|
||||
isDomainSocket?: unknown;
|
||||
fallback_application_name?: unknown;
|
||||
lock_timeout?: unknown;
|
||||
connect_timeout?: unknown;
|
||||
keepalives?: unknown;
|
||||
keepalives_idle?: unknown;
|
||||
|
||||
constructor(config?: string | ConnectionParametersConfig);
|
||||
|
||||
getLibpqConnectionString<TResult>(cb: (err: Error | null, params: string | null) => TResult): TResult;
|
||||
}
|
||||
77
backend/node_modules/@types/pg/lib/type-overrides.d.ts
generated
vendored
Normal file
77
backend/node_modules/@types/pg/lib/type-overrides.d.ts
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
import { CustomTypesConfig } from "..";
|
||||
|
||||
declare enum builtins {
|
||||
BOOL = 16,
|
||||
BYTEA = 17,
|
||||
CHAR = 18,
|
||||
INT8 = 20,
|
||||
INT2 = 21,
|
||||
INT4 = 23,
|
||||
REGPROC = 24,
|
||||
TEXT = 25,
|
||||
OID = 26,
|
||||
TID = 27,
|
||||
XID = 28,
|
||||
CID = 29,
|
||||
JSON = 114,
|
||||
XML = 142,
|
||||
PG_NODE_TREE = 194,
|
||||
SMGR = 210,
|
||||
PATH = 602,
|
||||
POLYGON = 604,
|
||||
CIDR = 650,
|
||||
FLOAT4 = 700,
|
||||
FLOAT8 = 701,
|
||||
ABSTIME = 702,
|
||||
RELTIME = 703,
|
||||
TINTERVAL = 704,
|
||||
CIRCLE = 718,
|
||||
MACADDR8 = 774,
|
||||
MONEY = 790,
|
||||
MACADDR = 829,
|
||||
INET = 869,
|
||||
ACLITEM = 1033,
|
||||
BPCHAR = 1042,
|
||||
VARCHAR = 1043,
|
||||
DATE = 1082,
|
||||
TIME = 1083,
|
||||
TIMESTAMP = 1114,
|
||||
TIMESTAMPTZ = 1184,
|
||||
INTERVAL = 1186,
|
||||
TIMETZ = 1266,
|
||||
BIT = 1560,
|
||||
VARBIT = 1562,
|
||||
NUMERIC = 1700,
|
||||
REFCURSOR = 1790,
|
||||
REGPROCEDURE = 2202,
|
||||
REGOPER = 2203,
|
||||
REGOPERATOR = 2204,
|
||||
REGCLASS = 2205,
|
||||
REGTYPE = 2206,
|
||||
UUID = 2950,
|
||||
TXID_SNAPSHOT = 2970,
|
||||
PG_LSN = 3220,
|
||||
PG_NDISTINCT = 3361,
|
||||
PG_DEPENDENCIES = 3402,
|
||||
TSVECTOR = 3614,
|
||||
TSQUERY = 3615,
|
||||
GTSVECTOR = 3642,
|
||||
REGCONFIG = 3734,
|
||||
REGDICTIONARY = 3769,
|
||||
JSONB = 3802,
|
||||
REGNAMESPACE = 4089,
|
||||
REGROLE = 4096,
|
||||
}
|
||||
type TypeId = builtins;
|
||||
type TypeParser<TOid = number, TReturn = any> = (oid: TOid) => TReturn;
|
||||
type TypeFormat = "text" | "binary";
|
||||
|
||||
export = TypeOverrides;
|
||||
declare class TypeOverrides implements CustomTypesConfig {
|
||||
constructor(types?: CustomTypesConfig);
|
||||
setTypeParser<T>(oid: number | TypeId, parseFn: TypeParser<string, T>): void;
|
||||
setTypeParser<T>(oid: number | TypeId, format: "text", parseFn: TypeParser<string, T>): void;
|
||||
setTypeParser<T>(oid: number | TypeId, format: "binary", parseFn: TypeParser<Buffer, T>): void;
|
||||
|
||||
getTypeParser<T>(oid: number | TypeId, format?: TypeFormat): TypeParser;
|
||||
}
|
||||
38
backend/node_modules/@types/pg/package.json
generated
vendored
Normal file
38
backend/node_modules/@types/pg/package.json
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "@types/pg",
|
||||
"version": "8.15.6",
|
||||
"description": "TypeScript definitions for pg",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pg",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Phips Peter",
|
||||
"githubUsername": "pspeter3",
|
||||
"url": "https://github.com/pspeter3"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./index.d.mts",
|
||||
"require": "./index.d.ts"
|
||||
},
|
||||
"./lib/*": "./lib/*.d.ts",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/pg"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"pg-protocol": "*",
|
||||
"pg-types": "^2.2.0"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "bfe58cd33772b929b21b29a9496746a24084358ddea01e505b949995ff72d44e",
|
||||
"typeScriptVersion": "5.2"
|
||||
}
|
||||
17
backend/node_modules/bl/.travis.yml
generated
vendored
Normal file
17
backend/node_modules/bl/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
sudo: false
|
||||
arch:
|
||||
- amd64
|
||||
- ppc64le
|
||||
language: node_js
|
||||
node_js:
|
||||
- '6'
|
||||
- '8'
|
||||
- '10'
|
||||
- '12'
|
||||
- '14'
|
||||
- '15'
|
||||
- lts/*
|
||||
notifications:
|
||||
email:
|
||||
- rod@vagg.org
|
||||
- matteo.collina@gmail.com
|
||||
396
backend/node_modules/bl/BufferList.js
generated
vendored
Normal file
396
backend/node_modules/bl/BufferList.js
generated
vendored
Normal file
@@ -0,0 +1,396 @@
|
||||
'use strict'
|
||||
|
||||
const { Buffer } = require('buffer')
|
||||
const symbol = Symbol.for('BufferList')
|
||||
|
||||
function BufferList (buf) {
|
||||
if (!(this instanceof BufferList)) {
|
||||
return new BufferList(buf)
|
||||
}
|
||||
|
||||
BufferList._init.call(this, buf)
|
||||
}
|
||||
|
||||
BufferList._init = function _init (buf) {
|
||||
Object.defineProperty(this, symbol, { value: true })
|
||||
|
||||
this._bufs = []
|
||||
this.length = 0
|
||||
|
||||
if (buf) {
|
||||
this.append(buf)
|
||||
}
|
||||
}
|
||||
|
||||
BufferList.prototype._new = function _new (buf) {
|
||||
return new BufferList(buf)
|
||||
}
|
||||
|
||||
BufferList.prototype._offset = function _offset (offset) {
|
||||
if (offset === 0) {
|
||||
return [0, 0]
|
||||
}
|
||||
|
||||
let tot = 0
|
||||
|
||||
for (let i = 0; i < this._bufs.length; i++) {
|
||||
const _t = tot + this._bufs[i].length
|
||||
if (offset < _t || i === this._bufs.length - 1) {
|
||||
return [i, offset - tot]
|
||||
}
|
||||
tot = _t
|
||||
}
|
||||
}
|
||||
|
||||
BufferList.prototype._reverseOffset = function (blOffset) {
|
||||
const bufferId = blOffset[0]
|
||||
let offset = blOffset[1]
|
||||
|
||||
for (let i = 0; i < bufferId; i++) {
|
||||
offset += this._bufs[i].length
|
||||
}
|
||||
|
||||
return offset
|
||||
}
|
||||
|
||||
BufferList.prototype.get = function get (index) {
|
||||
if (index > this.length || index < 0) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
const offset = this._offset(index)
|
||||
|
||||
return this._bufs[offset[0]][offset[1]]
|
||||
}
|
||||
|
||||
BufferList.prototype.slice = function slice (start, end) {
|
||||
if (typeof start === 'number' && start < 0) {
|
||||
start += this.length
|
||||
}
|
||||
|
||||
if (typeof end === 'number' && end < 0) {
|
||||
end += this.length
|
||||
}
|
||||
|
||||
return this.copy(null, 0, start, end)
|
||||
}
|
||||
|
||||
BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {
|
||||
if (typeof srcStart !== 'number' || srcStart < 0) {
|
||||
srcStart = 0
|
||||
}
|
||||
|
||||
if (typeof srcEnd !== 'number' || srcEnd > this.length) {
|
||||
srcEnd = this.length
|
||||
}
|
||||
|
||||
if (srcStart >= this.length) {
|
||||
return dst || Buffer.alloc(0)
|
||||
}
|
||||
|
||||
if (srcEnd <= 0) {
|
||||
return dst || Buffer.alloc(0)
|
||||
}
|
||||
|
||||
const copy = !!dst
|
||||
const off = this._offset(srcStart)
|
||||
const len = srcEnd - srcStart
|
||||
let bytes = len
|
||||
let bufoff = (copy && dstStart) || 0
|
||||
let start = off[1]
|
||||
|
||||
// copy/slice everything
|
||||
if (srcStart === 0 && srcEnd === this.length) {
|
||||
if (!copy) {
|
||||
// slice, but full concat if multiple buffers
|
||||
return this._bufs.length === 1
|
||||
? this._bufs[0]
|
||||
: Buffer.concat(this._bufs, this.length)
|
||||
}
|
||||
|
||||
// copy, need to copy individual buffers
|
||||
for (let i = 0; i < this._bufs.length; i++) {
|
||||
this._bufs[i].copy(dst, bufoff)
|
||||
bufoff += this._bufs[i].length
|
||||
}
|
||||
|
||||
return dst
|
||||
}
|
||||
|
||||
// easy, cheap case where it's a subset of one of the buffers
|
||||
if (bytes <= this._bufs[off[0]].length - start) {
|
||||
return copy
|
||||
? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes)
|
||||
: this._bufs[off[0]].slice(start, start + bytes)
|
||||
}
|
||||
|
||||
if (!copy) {
|
||||
// a slice, we need something to copy in to
|
||||
dst = Buffer.allocUnsafe(len)
|
||||
}
|
||||
|
||||
for (let i = off[0]; i < this._bufs.length; i++) {
|
||||
const l = this._bufs[i].length - start
|
||||
|
||||
if (bytes > l) {
|
||||
this._bufs[i].copy(dst, bufoff, start)
|
||||
bufoff += l
|
||||
} else {
|
||||
this._bufs[i].copy(dst, bufoff, start, start + bytes)
|
||||
bufoff += l
|
||||
break
|
||||
}
|
||||
|
||||
bytes -= l
|
||||
|
||||
if (start) {
|
||||
start = 0
|
||||
}
|
||||
}
|
||||
|
||||
// safeguard so that we don't return uninitialized memory
|
||||
if (dst.length > bufoff) return dst.slice(0, bufoff)
|
||||
|
||||
return dst
|
||||
}
|
||||
|
||||
BufferList.prototype.shallowSlice = function shallowSlice (start, end) {
|
||||
start = start || 0
|
||||
end = typeof end !== 'number' ? this.length : end
|
||||
|
||||
if (start < 0) {
|
||||
start += this.length
|
||||
}
|
||||
|
||||
if (end < 0) {
|
||||
end += this.length
|
||||
}
|
||||
|
||||
if (start === end) {
|
||||
return this._new()
|
||||
}
|
||||
|
||||
const startOffset = this._offset(start)
|
||||
const endOffset = this._offset(end)
|
||||
const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1)
|
||||
|
||||
if (endOffset[1] === 0) {
|
||||
buffers.pop()
|
||||
} else {
|
||||
buffers[buffers.length - 1] = buffers[buffers.length - 1].slice(0, endOffset[1])
|
||||
}
|
||||
|
||||
if (startOffset[1] !== 0) {
|
||||
buffers[0] = buffers[0].slice(startOffset[1])
|
||||
}
|
||||
|
||||
return this._new(buffers)
|
||||
}
|
||||
|
||||
BufferList.prototype.toString = function toString (encoding, start, end) {
|
||||
return this.slice(start, end).toString(encoding)
|
||||
}
|
||||
|
||||
BufferList.prototype.consume = function consume (bytes) {
|
||||
// first, normalize the argument, in accordance with how Buffer does it
|
||||
bytes = Math.trunc(bytes)
|
||||
// do nothing if not a positive number
|
||||
if (Number.isNaN(bytes) || bytes <= 0) return this
|
||||
|
||||
while (this._bufs.length) {
|
||||
if (bytes >= this._bufs[0].length) {
|
||||
bytes -= this._bufs[0].length
|
||||
this.length -= this._bufs[0].length
|
||||
this._bufs.shift()
|
||||
} else {
|
||||
this._bufs[0] = this._bufs[0].slice(bytes)
|
||||
this.length -= bytes
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
BufferList.prototype.duplicate = function duplicate () {
|
||||
const copy = this._new()
|
||||
|
||||
for (let i = 0; i < this._bufs.length; i++) {
|
||||
copy.append(this._bufs[i])
|
||||
}
|
||||
|
||||
return copy
|
||||
}
|
||||
|
||||
BufferList.prototype.append = function append (buf) {
|
||||
if (buf == null) {
|
||||
return this
|
||||
}
|
||||
|
||||
if (buf.buffer) {
|
||||
// append a view of the underlying ArrayBuffer
|
||||
this._appendBuffer(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength))
|
||||
} else if (Array.isArray(buf)) {
|
||||
for (let i = 0; i < buf.length; i++) {
|
||||
this.append(buf[i])
|
||||
}
|
||||
} else if (this._isBufferList(buf)) {
|
||||
// unwrap argument into individual BufferLists
|
||||
for (let i = 0; i < buf._bufs.length; i++) {
|
||||
this.append(buf._bufs[i])
|
||||
}
|
||||
} else {
|
||||
// coerce number arguments to strings, since Buffer(number) does
|
||||
// uninitialized memory allocation
|
||||
if (typeof buf === 'number') {
|
||||
buf = buf.toString()
|
||||
}
|
||||
|
||||
this._appendBuffer(Buffer.from(buf))
|
||||
}
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
BufferList.prototype._appendBuffer = function appendBuffer (buf) {
|
||||
this._bufs.push(buf)
|
||||
this.length += buf.length
|
||||
}
|
||||
|
||||
BufferList.prototype.indexOf = function (search, offset, encoding) {
|
||||
if (encoding === undefined && typeof offset === 'string') {
|
||||
encoding = offset
|
||||
offset = undefined
|
||||
}
|
||||
|
||||
if (typeof search === 'function' || Array.isArray(search)) {
|
||||
throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.')
|
||||
} else if (typeof search === 'number') {
|
||||
search = Buffer.from([search])
|
||||
} else if (typeof search === 'string') {
|
||||
search = Buffer.from(search, encoding)
|
||||
} else if (this._isBufferList(search)) {
|
||||
search = search.slice()
|
||||
} else if (Array.isArray(search.buffer)) {
|
||||
search = Buffer.from(search.buffer, search.byteOffset, search.byteLength)
|
||||
} else if (!Buffer.isBuffer(search)) {
|
||||
search = Buffer.from(search)
|
||||
}
|
||||
|
||||
offset = Number(offset || 0)
|
||||
|
||||
if (isNaN(offset)) {
|
||||
offset = 0
|
||||
}
|
||||
|
||||
if (offset < 0) {
|
||||
offset = this.length + offset
|
||||
}
|
||||
|
||||
if (offset < 0) {
|
||||
offset = 0
|
||||
}
|
||||
|
||||
if (search.length === 0) {
|
||||
return offset > this.length ? this.length : offset
|
||||
}
|
||||
|
||||
const blOffset = this._offset(offset)
|
||||
let blIndex = blOffset[0] // index of which internal buffer we're working on
|
||||
let buffOffset = blOffset[1] // offset of the internal buffer we're working on
|
||||
|
||||
// scan over each buffer
|
||||
for (; blIndex < this._bufs.length; blIndex++) {
|
||||
const buff = this._bufs[blIndex]
|
||||
|
||||
while (buffOffset < buff.length) {
|
||||
const availableWindow = buff.length - buffOffset
|
||||
|
||||
if (availableWindow >= search.length) {
|
||||
const nativeSearchResult = buff.indexOf(search, buffOffset)
|
||||
|
||||
if (nativeSearchResult !== -1) {
|
||||
return this._reverseOffset([blIndex, nativeSearchResult])
|
||||
}
|
||||
|
||||
buffOffset = buff.length - search.length + 1 // end of native search window
|
||||
} else {
|
||||
const revOffset = this._reverseOffset([blIndex, buffOffset])
|
||||
|
||||
if (this._match(revOffset, search)) {
|
||||
return revOffset
|
||||
}
|
||||
|
||||
buffOffset++
|
||||
}
|
||||
}
|
||||
|
||||
buffOffset = 0
|
||||
}
|
||||
|
||||
return -1
|
||||
}
|
||||
|
||||
BufferList.prototype._match = function (offset, search) {
|
||||
if (this.length - offset < search.length) {
|
||||
return false
|
||||
}
|
||||
|
||||
for (let searchOffset = 0; searchOffset < search.length; searchOffset++) {
|
||||
if (this.get(offset + searchOffset) !== search[searchOffset]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
;(function () {
|
||||
const methods = {
|
||||
readDoubleBE: 8,
|
||||
readDoubleLE: 8,
|
||||
readFloatBE: 4,
|
||||
readFloatLE: 4,
|
||||
readInt32BE: 4,
|
||||
readInt32LE: 4,
|
||||
readUInt32BE: 4,
|
||||
readUInt32LE: 4,
|
||||
readInt16BE: 2,
|
||||
readInt16LE: 2,
|
||||
readUInt16BE: 2,
|
||||
readUInt16LE: 2,
|
||||
readInt8: 1,
|
||||
readUInt8: 1,
|
||||
readIntBE: null,
|
||||
readIntLE: null,
|
||||
readUIntBE: null,
|
||||
readUIntLE: null
|
||||
}
|
||||
|
||||
for (const m in methods) {
|
||||
(function (m) {
|
||||
if (methods[m] === null) {
|
||||
BufferList.prototype[m] = function (offset, byteLength) {
|
||||
return this.slice(offset, offset + byteLength)[m](0, byteLength)
|
||||
}
|
||||
} else {
|
||||
BufferList.prototype[m] = function (offset = 0) {
|
||||
return this.slice(offset, offset + methods[m])[m](0)
|
||||
}
|
||||
}
|
||||
}(m))
|
||||
}
|
||||
}())
|
||||
|
||||
// Used internally by the class and also as an indicator of this object being
|
||||
// a `BufferList`. It's not possible to use `instanceof BufferList` in a browser
|
||||
// environment because there could be multiple different copies of the
|
||||
// BufferList class and some `BufferList`s might be `BufferList`s.
|
||||
BufferList.prototype._isBufferList = function _isBufferList (b) {
|
||||
return b instanceof BufferList || BufferList.isBufferList(b)
|
||||
}
|
||||
|
||||
BufferList.isBufferList = function isBufferList (b) {
|
||||
return b != null && b[symbol]
|
||||
}
|
||||
|
||||
module.exports = BufferList
|
||||
13
backend/node_modules/bl/LICENSE.md
generated
vendored
Normal file
13
backend/node_modules/bl/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
The MIT License (MIT)
|
||||
=====================
|
||||
|
||||
Copyright (c) 2013-2019 bl contributors
|
||||
----------------------------------
|
||||
|
||||
*bl contributors listed at <https://github.com/rvagg/bl#contributors>*
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
247
backend/node_modules/bl/README.md
generated
vendored
Normal file
247
backend/node_modules/bl/README.md
generated
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
# bl *(BufferList)*
|
||||
|
||||
[](https://travis-ci.com/rvagg/bl/)
|
||||
|
||||
**A Node.js Buffer list collector, reader and streamer thingy.**
|
||||
|
||||
[](https://nodei.co/npm/bl/)
|
||||
|
||||
**bl** is a storage object for collections of Node Buffers, exposing them with the main Buffer readable API. Also works as a duplex stream so you can collect buffers from a stream that emits them and emit buffers to a stream that consumes them!
|
||||
|
||||
The original buffers are kept intact and copies are only done as necessary. Any reads that require the use of a single original buffer will return a slice of that buffer only (which references the same memory as the original buffer). Reads that span buffers perform concatenation as required and return the results transparently.
|
||||
|
||||
```js
|
||||
const { BufferList } = require('bl')
|
||||
|
||||
const bl = new BufferList()
|
||||
bl.append(Buffer.from('abcd'))
|
||||
bl.append(Buffer.from('efg'))
|
||||
bl.append('hi') // bl will also accept & convert Strings
|
||||
bl.append(Buffer.from('j'))
|
||||
bl.append(Buffer.from([ 0x3, 0x4 ]))
|
||||
|
||||
console.log(bl.length) // 12
|
||||
|
||||
console.log(bl.slice(0, 10).toString('ascii')) // 'abcdefghij'
|
||||
console.log(bl.slice(3, 10).toString('ascii')) // 'defghij'
|
||||
console.log(bl.slice(3, 6).toString('ascii')) // 'def'
|
||||
console.log(bl.slice(3, 8).toString('ascii')) // 'defgh'
|
||||
console.log(bl.slice(5, 10).toString('ascii')) // 'fghij'
|
||||
|
||||
console.log(bl.indexOf('def')) // 3
|
||||
console.log(bl.indexOf('asdf')) // -1
|
||||
|
||||
// or just use toString!
|
||||
console.log(bl.toString()) // 'abcdefghij\u0003\u0004'
|
||||
console.log(bl.toString('ascii', 3, 8)) // 'defgh'
|
||||
console.log(bl.toString('ascii', 5, 10)) // 'fghij'
|
||||
|
||||
// other standard Buffer readables
|
||||
console.log(bl.readUInt16BE(10)) // 0x0304
|
||||
console.log(bl.readUInt16LE(10)) // 0x0403
|
||||
```
|
||||
|
||||
Give it a callback in the constructor and use it just like **[concat-stream](https://github.com/maxogden/node-concat-stream)**:
|
||||
|
||||
```js
|
||||
const { BufferListStream } = require('bl')
|
||||
const fs = require('fs')
|
||||
|
||||
fs.createReadStream('README.md')
|
||||
.pipe(BufferListStream((err, data) => { // note 'new' isn't strictly required
|
||||
// `data` is a complete Buffer object containing the full data
|
||||
console.log(data.toString())
|
||||
}))
|
||||
```
|
||||
|
||||
Note that when you use the *callback* method like this, the resulting `data` parameter is a concatenation of all `Buffer` objects in the list. If you want to avoid the overhead of this concatenation (in cases of extreme performance consciousness), then avoid the *callback* method and just listen to `'end'` instead, like a standard Stream.
|
||||
|
||||
Or to fetch a URL using [hyperquest](https://github.com/substack/hyperquest) (should work with [request](http://github.com/mikeal/request) and even plain Node http too!):
|
||||
|
||||
```js
|
||||
const hyperquest = require('hyperquest')
|
||||
const { BufferListStream } = require('bl')
|
||||
|
||||
const url = 'https://raw.github.com/rvagg/bl/master/README.md'
|
||||
|
||||
hyperquest(url).pipe(BufferListStream((err, data) => {
|
||||
console.log(data.toString())
|
||||
}))
|
||||
```
|
||||
|
||||
Or, use it as a readable stream to recompose a list of Buffers to an output source:
|
||||
|
||||
```js
|
||||
const { BufferListStream } = require('bl')
|
||||
const fs = require('fs')
|
||||
|
||||
var bl = new BufferListStream()
|
||||
bl.append(Buffer.from('abcd'))
|
||||
bl.append(Buffer.from('efg'))
|
||||
bl.append(Buffer.from('hi'))
|
||||
bl.append(Buffer.from('j'))
|
||||
|
||||
bl.pipe(fs.createWriteStream('gibberish.txt'))
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
* <a href="#ctor"><code><b>new BufferList([ buf ])</b></code></a>
|
||||
* <a href="#isBufferList"><code><b>BufferList.isBufferList(obj)</b></code></a>
|
||||
* <a href="#length"><code>bl.<b>length</b></code></a>
|
||||
* <a href="#append"><code>bl.<b>append(buffer)</b></code></a>
|
||||
* <a href="#get"><code>bl.<b>get(index)</b></code></a>
|
||||
* <a href="#indexOf"><code>bl.<b>indexOf(value[, byteOffset][, encoding])</b></code></a>
|
||||
* <a href="#slice"><code>bl.<b>slice([ start[, end ] ])</b></code></a>
|
||||
* <a href="#shallowSlice"><code>bl.<b>shallowSlice([ start[, end ] ])</b></code></a>
|
||||
* <a href="#copy"><code>bl.<b>copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])</b></code></a>
|
||||
* <a href="#duplicate"><code>bl.<b>duplicate()</b></code></a>
|
||||
* <a href="#consume"><code>bl.<b>consume(bytes)</b></code></a>
|
||||
* <a href="#toString"><code>bl.<b>toString([encoding, [ start, [ end ]]])</b></code></a>
|
||||
* <a href="#readXX"><code>bl.<b>readDoubleBE()</b></code>, <code>bl.<b>readDoubleLE()</b></code>, <code>bl.<b>readFloatBE()</b></code>, <code>bl.<b>readFloatLE()</b></code>, <code>bl.<b>readInt32BE()</b></code>, <code>bl.<b>readInt32LE()</b></code>, <code>bl.<b>readUInt32BE()</b></code>, <code>bl.<b>readUInt32LE()</b></code>, <code>bl.<b>readInt16BE()</b></code>, <code>bl.<b>readInt16LE()</b></code>, <code>bl.<b>readUInt16BE()</b></code>, <code>bl.<b>readUInt16LE()</b></code>, <code>bl.<b>readInt8()</b></code>, <code>bl.<b>readUInt8()</b></code></a>
|
||||
* <a href="#ctorStream"><code><b>new BufferListStream([ callback ])</b></code></a>
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="ctor"></a>
|
||||
### new BufferList([ Buffer | Buffer array | BufferList | BufferList array | String ])
|
||||
No arguments are _required_ for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` objects.
|
||||
|
||||
`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with:
|
||||
|
||||
```js
|
||||
const { BufferList } = require('bl')
|
||||
const bl = BufferList()
|
||||
|
||||
// equivalent to:
|
||||
|
||||
const { BufferList } = require('bl')
|
||||
const bl = new BufferList()
|
||||
```
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="isBufferList"></a>
|
||||
### BufferList.isBufferList(obj)
|
||||
Determines if the passed object is a `BufferList`. It will return `true` if the passed object is an instance of `BufferList` **or** `BufferListStream` and `false` otherwise.
|
||||
|
||||
N.B. this won't return `true` for `BufferList` or `BufferListStream` instances created by versions of this library before this static method was added.
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="length"></a>
|
||||
### bl.length
|
||||
Get the length of the list in bytes. This is the sum of the lengths of all of the buffers contained in the list, minus any initial offset for a semi-consumed buffer at the beginning. Should accurately represent the total number of bytes that can be read from the list.
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="append"></a>
|
||||
### bl.append(Buffer | Buffer array | BufferList | BufferList array | String)
|
||||
`append(buffer)` adds an additional buffer or BufferList to the internal list. `this` is returned so it can be chained.
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="get"></a>
|
||||
### bl.get(index)
|
||||
`get()` will return the byte at the specified index.
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="indexOf"></a>
|
||||
### bl.indexOf(value[, byteOffset][, encoding])
|
||||
`get()` will return the byte at the specified index.
|
||||
`indexOf()` method returns the first index at which a given element can be found in the BufferList, or -1 if it is not present.
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="slice"></a>
|
||||
### bl.slice([ start, [ end ] ])
|
||||
`slice()` returns a new `Buffer` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively.
|
||||
|
||||
If the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer.
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="shallowSlice"></a>
|
||||
### bl.shallowSlice([ start, [ end ] ])
|
||||
`shallowSlice()` returns a new `BufferList` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively.
|
||||
|
||||
No copies will be performed. All buffers in the result share memory with the original list.
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="copy"></a>
|
||||
### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ])
|
||||
`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively.
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="duplicate"></a>
|
||||
### bl.duplicate()
|
||||
`duplicate()` performs a **shallow-copy** of the list. The internal Buffers remains the same, so if you change the underlying Buffers, the change will be reflected in both the original and the duplicate. This method is needed if you want to call `consume()` or `pipe()` and still keep the original list.Example:
|
||||
|
||||
```js
|
||||
var bl = new BufferListStream()
|
||||
|
||||
bl.append('hello')
|
||||
bl.append(' world')
|
||||
bl.append('\n')
|
||||
|
||||
bl.duplicate().pipe(process.stdout, { end: false })
|
||||
|
||||
console.log(bl.toString())
|
||||
```
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="consume"></a>
|
||||
### bl.consume(bytes)
|
||||
`consume()` will shift bytes *off the start of the list*. The number of bytes consumed don't need to line up with the sizes of the internal Buffers—initial offsets will be calculated accordingly in order to give you a consistent view of the data.
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="toString"></a>
|
||||
### bl.toString([encoding, [ start, [ end ]]])
|
||||
`toString()` will return a string representation of the buffer. The optional `start` and `end` arguments are passed on to `slice()`, while the `encoding` is passed on to `toString()` of the resulting Buffer. See the [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end) documentation for more information.
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="readXX"></a>
|
||||
### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8()
|
||||
|
||||
All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently.
|
||||
|
||||
See the <b><code>[Buffer](http://nodejs.org/docs/latest/api/buffer.html)</code></b> documentation for how these work.
|
||||
|
||||
--------------------------------------------------------
|
||||
<a name="ctorStream"></a>
|
||||
### new BufferListStream([ callback | Buffer | Buffer array | BufferList | BufferList array | String ])
|
||||
**BufferListStream** is a Node **[Duplex Stream](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_duplex)**, so it can be read from and written to like a standard Node stream. You can also `pipe()` to and from a **BufferListStream** instance.
|
||||
|
||||
The constructor takes an optional callback, if supplied, the callback will be called with an error argument followed by a reference to the **bl** instance, when `bl.end()` is called (i.e. from a piped stream). This is a convenient method of collecting the entire contents of a stream, particularly when the stream is *chunky*, such as a network stream.
|
||||
|
||||
Normally, no arguments are required for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` object.
|
||||
|
||||
`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with:
|
||||
|
||||
```js
|
||||
const { BufferListStream } = require('bl')
|
||||
const bl = BufferListStream()
|
||||
|
||||
// equivalent to:
|
||||
|
||||
const { BufferListStream } = require('bl')
|
||||
const bl = new BufferListStream()
|
||||
```
|
||||
|
||||
N.B. For backwards compatibility reasons, `BufferListStream` is the **default** export when you `require('bl')`:
|
||||
|
||||
```js
|
||||
const { BufferListStream } = require('bl')
|
||||
// equivalent to:
|
||||
const BufferListStream = require('bl')
|
||||
```
|
||||
|
||||
--------------------------------------------------------
|
||||
|
||||
## Contributors
|
||||
|
||||
**bl** is brought to you by the following hackers:
|
||||
|
||||
* [Rod Vagg](https://github.com/rvagg)
|
||||
* [Matteo Collina](https://github.com/mcollina)
|
||||
* [Jarett Cruger](https://github.com/jcrugzz)
|
||||
|
||||
<a name="license"></a>
|
||||
## License & copyright
|
||||
|
||||
Copyright (c) 2013-2019 bl contributors (listed above).
|
||||
|
||||
bl is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
|
||||
84
backend/node_modules/bl/bl.js
generated
vendored
Normal file
84
backend/node_modules/bl/bl.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
'use strict'
|
||||
|
||||
const DuplexStream = require('readable-stream').Duplex
|
||||
const inherits = require('inherits')
|
||||
const BufferList = require('./BufferList')
|
||||
|
||||
function BufferListStream (callback) {
|
||||
if (!(this instanceof BufferListStream)) {
|
||||
return new BufferListStream(callback)
|
||||
}
|
||||
|
||||
if (typeof callback === 'function') {
|
||||
this._callback = callback
|
||||
|
||||
const piper = function piper (err) {
|
||||
if (this._callback) {
|
||||
this._callback(err)
|
||||
this._callback = null
|
||||
}
|
||||
}.bind(this)
|
||||
|
||||
this.on('pipe', function onPipe (src) {
|
||||
src.on('error', piper)
|
||||
})
|
||||
this.on('unpipe', function onUnpipe (src) {
|
||||
src.removeListener('error', piper)
|
||||
})
|
||||
|
||||
callback = null
|
||||
}
|
||||
|
||||
BufferList._init.call(this, callback)
|
||||
DuplexStream.call(this)
|
||||
}
|
||||
|
||||
inherits(BufferListStream, DuplexStream)
|
||||
Object.assign(BufferListStream.prototype, BufferList.prototype)
|
||||
|
||||
BufferListStream.prototype._new = function _new (callback) {
|
||||
return new BufferListStream(callback)
|
||||
}
|
||||
|
||||
BufferListStream.prototype._write = function _write (buf, encoding, callback) {
|
||||
this._appendBuffer(buf)
|
||||
|
||||
if (typeof callback === 'function') {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
BufferListStream.prototype._read = function _read (size) {
|
||||
if (!this.length) {
|
||||
return this.push(null)
|
||||
}
|
||||
|
||||
size = Math.min(size, this.length)
|
||||
this.push(this.slice(0, size))
|
||||
this.consume(size)
|
||||
}
|
||||
|
||||
BufferListStream.prototype.end = function end (chunk) {
|
||||
DuplexStream.prototype.end.call(this, chunk)
|
||||
|
||||
if (this._callback) {
|
||||
this._callback(null, this.slice())
|
||||
this._callback = null
|
||||
}
|
||||
}
|
||||
|
||||
BufferListStream.prototype._destroy = function _destroy (err, cb) {
|
||||
this._bufs.length = 0
|
||||
this.length = 0
|
||||
cb(err)
|
||||
}
|
||||
|
||||
BufferListStream.prototype._isBufferList = function _isBufferList (b) {
|
||||
return b instanceof BufferListStream || b instanceof BufferList || BufferListStream.isBufferList(b)
|
||||
}
|
||||
|
||||
BufferListStream.isBufferList = BufferList.isBufferList
|
||||
|
||||
module.exports = BufferListStream
|
||||
module.exports.BufferListStream = BufferListStream
|
||||
module.exports.BufferList = BufferList
|
||||
37
backend/node_modules/bl/package.json
generated
vendored
Normal file
37
backend/node_modules/bl/package.json
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "bl",
|
||||
"version": "4.1.0",
|
||||
"description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
|
||||
"license": "MIT",
|
||||
"main": "bl.js",
|
||||
"scripts": {
|
||||
"lint": "standard *.js test/*.js",
|
||||
"test": "npm run lint && node test/test.js | faucet"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rvagg/bl.git"
|
||||
},
|
||||
"homepage": "https://github.com/rvagg/bl",
|
||||
"authors": [
|
||||
"Rod Vagg <rod@vagg.org> (https://github.com/rvagg)",
|
||||
"Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)",
|
||||
"Jarett Cruger <jcrugzz@gmail.com> (https://github.com/jcrugzz)"
|
||||
],
|
||||
"keywords": [
|
||||
"buffer",
|
||||
"buffers",
|
||||
"stream",
|
||||
"awesomesauce"
|
||||
],
|
||||
"dependencies": {
|
||||
"buffer": "^5.5.0",
|
||||
"inherits": "^2.0.4",
|
||||
"readable-stream": "^3.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"faucet": "~0.0.1",
|
||||
"standard": "^14.3.0",
|
||||
"tape": "^4.11.0"
|
||||
}
|
||||
}
|
||||
21
backend/node_modules/bl/test/convert.js
generated
vendored
Normal file
21
backend/node_modules/bl/test/convert.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict'
|
||||
|
||||
const tape = require('tape')
|
||||
const { BufferList, BufferListStream } = require('../')
|
||||
const { Buffer } = require('buffer')
|
||||
|
||||
tape('convert from BufferList to BufferListStream', (t) => {
|
||||
const data = Buffer.from(`TEST-${Date.now()}`)
|
||||
const bl = new BufferList(data)
|
||||
const bls = new BufferListStream(bl)
|
||||
t.ok(bl.slice().equals(bls.slice()))
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('convert from BufferListStream to BufferList', (t) => {
|
||||
const data = Buffer.from(`TEST-${Date.now()}`)
|
||||
const bls = new BufferListStream(data)
|
||||
const bl = new BufferList(bls)
|
||||
t.ok(bl.slice().equals(bls.slice()))
|
||||
t.end()
|
||||
})
|
||||
492
backend/node_modules/bl/test/indexOf.js
generated
vendored
Normal file
492
backend/node_modules/bl/test/indexOf.js
generated
vendored
Normal file
@@ -0,0 +1,492 @@
|
||||
'use strict'
|
||||
|
||||
const tape = require('tape')
|
||||
const BufferList = require('../')
|
||||
const { Buffer } = require('buffer')
|
||||
|
||||
tape('indexOf single byte needle', (t) => {
|
||||
const bl = new BufferList(['abcdefg', 'abcdefg', '12345'])
|
||||
|
||||
t.equal(bl.indexOf('e'), 4)
|
||||
t.equal(bl.indexOf('e', 5), 11)
|
||||
t.equal(bl.indexOf('e', 12), -1)
|
||||
t.equal(bl.indexOf('5'), 18)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('indexOf multiple byte needle', (t) => {
|
||||
const bl = new BufferList(['abcdefg', 'abcdefg'])
|
||||
|
||||
t.equal(bl.indexOf('ef'), 4)
|
||||
t.equal(bl.indexOf('ef', 5), 11)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('indexOf multiple byte needles across buffer boundaries', (t) => {
|
||||
const bl = new BufferList(['abcdefg', 'abcdefg'])
|
||||
|
||||
t.equal(bl.indexOf('fgabc'), 5)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('indexOf takes a Uint8Array search', (t) => {
|
||||
const bl = new BufferList(['abcdefg', 'abcdefg'])
|
||||
const search = new Uint8Array([102, 103, 97, 98, 99]) // fgabc
|
||||
|
||||
t.equal(bl.indexOf(search), 5)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('indexOf takes a buffer list search', (t) => {
|
||||
const bl = new BufferList(['abcdefg', 'abcdefg'])
|
||||
const search = new BufferList('fgabc')
|
||||
|
||||
t.equal(bl.indexOf(search), 5)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('indexOf a zero byte needle', (t) => {
|
||||
const b = new BufferList('abcdef')
|
||||
const bufEmpty = Buffer.from('')
|
||||
|
||||
t.equal(b.indexOf(''), 0)
|
||||
t.equal(b.indexOf('', 1), 1)
|
||||
t.equal(b.indexOf('', b.length + 1), b.length)
|
||||
t.equal(b.indexOf('', Infinity), b.length)
|
||||
t.equal(b.indexOf(bufEmpty), 0)
|
||||
t.equal(b.indexOf(bufEmpty, 1), 1)
|
||||
t.equal(b.indexOf(bufEmpty, b.length + 1), b.length)
|
||||
t.equal(b.indexOf(bufEmpty, Infinity), b.length)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('indexOf buffers smaller and larger than the needle', (t) => {
|
||||
const bl = new BufferList(['abcdefg', 'a', 'bcdefg', 'a', 'bcfgab'])
|
||||
|
||||
t.equal(bl.indexOf('fgabc'), 5)
|
||||
t.equal(bl.indexOf('fgabc', 6), 12)
|
||||
t.equal(bl.indexOf('fgabc', 13), -1)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
// only present in node 6+
|
||||
;(process.version.substr(1).split('.')[0] >= 6) && tape('indexOf latin1 and binary encoding', (t) => {
|
||||
const b = new BufferList('abcdef')
|
||||
|
||||
// test latin1 encoding
|
||||
t.equal(
|
||||
new BufferList(Buffer.from(b.toString('latin1'), 'latin1'))
|
||||
.indexOf('d', 0, 'latin1'),
|
||||
3
|
||||
)
|
||||
t.equal(
|
||||
new BufferList(Buffer.from(b.toString('latin1'), 'latin1'))
|
||||
.indexOf(Buffer.from('d', 'latin1'), 0, 'latin1'),
|
||||
3
|
||||
)
|
||||
t.equal(
|
||||
new BufferList(Buffer.from('aa\u00e8aa', 'latin1'))
|
||||
.indexOf('\u00e8', 'latin1'),
|
||||
2
|
||||
)
|
||||
t.equal(
|
||||
new BufferList(Buffer.from('\u00e8', 'latin1'))
|
||||
.indexOf('\u00e8', 'latin1'),
|
||||
0
|
||||
)
|
||||
t.equal(
|
||||
new BufferList(Buffer.from('\u00e8', 'latin1'))
|
||||
.indexOf(Buffer.from('\u00e8', 'latin1'), 'latin1'),
|
||||
0
|
||||
)
|
||||
|
||||
// test binary encoding
|
||||
t.equal(
|
||||
new BufferList(Buffer.from(b.toString('binary'), 'binary'))
|
||||
.indexOf('d', 0, 'binary'),
|
||||
3
|
||||
)
|
||||
t.equal(
|
||||
new BufferList(Buffer.from(b.toString('binary'), 'binary'))
|
||||
.indexOf(Buffer.from('d', 'binary'), 0, 'binary'),
|
||||
3
|
||||
)
|
||||
t.equal(
|
||||
new BufferList(Buffer.from('aa\u00e8aa', 'binary'))
|
||||
.indexOf('\u00e8', 'binary'),
|
||||
2
|
||||
)
|
||||
t.equal(
|
||||
new BufferList(Buffer.from('\u00e8', 'binary'))
|
||||
.indexOf('\u00e8', 'binary'),
|
||||
0
|
||||
)
|
||||
t.equal(
|
||||
new BufferList(Buffer.from('\u00e8', 'binary'))
|
||||
.indexOf(Buffer.from('\u00e8', 'binary'), 'binary'),
|
||||
0
|
||||
)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('indexOf the entire nodejs10 buffer test suite', (t) => {
|
||||
const b = new BufferList('abcdef')
|
||||
const bufA = Buffer.from('a')
|
||||
const bufBc = Buffer.from('bc')
|
||||
const bufF = Buffer.from('f')
|
||||
const bufZ = Buffer.from('z')
|
||||
|
||||
const stringComparison = 'abcdef'
|
||||
|
||||
t.equal(b.indexOf('a'), 0)
|
||||
t.equal(b.indexOf('a', 1), -1)
|
||||
t.equal(b.indexOf('a', -1), -1)
|
||||
t.equal(b.indexOf('a', -4), -1)
|
||||
t.equal(b.indexOf('a', -b.length), 0)
|
||||
t.equal(b.indexOf('a', NaN), 0)
|
||||
t.equal(b.indexOf('a', -Infinity), 0)
|
||||
t.equal(b.indexOf('a', Infinity), -1)
|
||||
t.equal(b.indexOf('bc'), 1)
|
||||
t.equal(b.indexOf('bc', 2), -1)
|
||||
t.equal(b.indexOf('bc', -1), -1)
|
||||
t.equal(b.indexOf('bc', -3), -1)
|
||||
t.equal(b.indexOf('bc', -5), 1)
|
||||
t.equal(b.indexOf('bc', NaN), 1)
|
||||
t.equal(b.indexOf('bc', -Infinity), 1)
|
||||
t.equal(b.indexOf('bc', Infinity), -1)
|
||||
t.equal(b.indexOf('f'), b.length - 1)
|
||||
t.equal(b.indexOf('z'), -1)
|
||||
|
||||
// empty search tests
|
||||
t.equal(b.indexOf(bufA), 0)
|
||||
t.equal(b.indexOf(bufA, 1), -1)
|
||||
t.equal(b.indexOf(bufA, -1), -1)
|
||||
t.equal(b.indexOf(bufA, -4), -1)
|
||||
t.equal(b.indexOf(bufA, -b.length), 0)
|
||||
t.equal(b.indexOf(bufA, NaN), 0)
|
||||
t.equal(b.indexOf(bufA, -Infinity), 0)
|
||||
t.equal(b.indexOf(bufA, Infinity), -1)
|
||||
t.equal(b.indexOf(bufBc), 1)
|
||||
t.equal(b.indexOf(bufBc, 2), -1)
|
||||
t.equal(b.indexOf(bufBc, -1), -1)
|
||||
t.equal(b.indexOf(bufBc, -3), -1)
|
||||
t.equal(b.indexOf(bufBc, -5), 1)
|
||||
t.equal(b.indexOf(bufBc, NaN), 1)
|
||||
t.equal(b.indexOf(bufBc, -Infinity), 1)
|
||||
t.equal(b.indexOf(bufBc, Infinity), -1)
|
||||
t.equal(b.indexOf(bufF), b.length - 1)
|
||||
t.equal(b.indexOf(bufZ), -1)
|
||||
t.equal(b.indexOf(0x61), 0)
|
||||
t.equal(b.indexOf(0x61, 1), -1)
|
||||
t.equal(b.indexOf(0x61, -1), -1)
|
||||
t.equal(b.indexOf(0x61, -4), -1)
|
||||
t.equal(b.indexOf(0x61, -b.length), 0)
|
||||
t.equal(b.indexOf(0x61, NaN), 0)
|
||||
t.equal(b.indexOf(0x61, -Infinity), 0)
|
||||
t.equal(b.indexOf(0x61, Infinity), -1)
|
||||
t.equal(b.indexOf(0x0), -1)
|
||||
|
||||
// test offsets
|
||||
t.equal(b.indexOf('d', 2), 3)
|
||||
t.equal(b.indexOf('f', 5), 5)
|
||||
t.equal(b.indexOf('f', -1), 5)
|
||||
t.equal(b.indexOf('f', 6), -1)
|
||||
|
||||
t.equal(b.indexOf(Buffer.from('d'), 2), 3)
|
||||
t.equal(b.indexOf(Buffer.from('f'), 5), 5)
|
||||
t.equal(b.indexOf(Buffer.from('f'), -1), 5)
|
||||
t.equal(b.indexOf(Buffer.from('f'), 6), -1)
|
||||
|
||||
t.equal(Buffer.from('ff').indexOf(Buffer.from('f'), 1, 'ucs2'), -1)
|
||||
|
||||
// test invalid and uppercase encoding
|
||||
t.equal(b.indexOf('b', 'utf8'), 1)
|
||||
t.equal(b.indexOf('b', 'UTF8'), 1)
|
||||
t.equal(b.indexOf('62', 'HEX'), 1)
|
||||
t.throws(() => b.indexOf('bad', 'enc'), TypeError)
|
||||
|
||||
// test hex encoding
|
||||
t.equal(
|
||||
Buffer.from(b.toString('hex'), 'hex')
|
||||
.indexOf('64', 0, 'hex'),
|
||||
3
|
||||
)
|
||||
t.equal(
|
||||
Buffer.from(b.toString('hex'), 'hex')
|
||||
.indexOf(Buffer.from('64', 'hex'), 0, 'hex'),
|
||||
3
|
||||
)
|
||||
|
||||
// test base64 encoding
|
||||
t.equal(
|
||||
Buffer.from(b.toString('base64'), 'base64')
|
||||
.indexOf('ZA==', 0, 'base64'),
|
||||
3
|
||||
)
|
||||
t.equal(
|
||||
Buffer.from(b.toString('base64'), 'base64')
|
||||
.indexOf(Buffer.from('ZA==', 'base64'), 0, 'base64'),
|
||||
3
|
||||
)
|
||||
|
||||
// test ascii encoding
|
||||
t.equal(
|
||||
Buffer.from(b.toString('ascii'), 'ascii')
|
||||
.indexOf('d', 0, 'ascii'),
|
||||
3
|
||||
)
|
||||
t.equal(
|
||||
Buffer.from(b.toString('ascii'), 'ascii')
|
||||
.indexOf(Buffer.from('d', 'ascii'), 0, 'ascii'),
|
||||
3
|
||||
)
|
||||
|
||||
// test optional offset with passed encoding
|
||||
t.equal(Buffer.from('aaaa0').indexOf('30', 'hex'), 4)
|
||||
t.equal(Buffer.from('aaaa00a').indexOf('3030', 'hex'), 4)
|
||||
|
||||
{
|
||||
// test usc2 encoding
|
||||
const twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2')
|
||||
|
||||
t.equal(8, twoByteString.indexOf('\u0395', 4, 'ucs2'))
|
||||
t.equal(6, twoByteString.indexOf('\u03a3', -4, 'ucs2'))
|
||||
t.equal(4, twoByteString.indexOf('\u03a3', -6, 'ucs2'))
|
||||
t.equal(4, twoByteString.indexOf(
|
||||
Buffer.from('\u03a3', 'ucs2'), -6, 'ucs2'))
|
||||
t.equal(-1, twoByteString.indexOf('\u03a3', -2, 'ucs2'))
|
||||
}
|
||||
|
||||
const mixedByteStringUcs2 =
|
||||
Buffer.from('\u039a\u0391abc\u03a3\u03a3\u0395', 'ucs2')
|
||||
|
||||
t.equal(6, mixedByteStringUcs2.indexOf('bc', 0, 'ucs2'))
|
||||
t.equal(10, mixedByteStringUcs2.indexOf('\u03a3', 0, 'ucs2'))
|
||||
t.equal(-1, mixedByteStringUcs2.indexOf('\u0396', 0, 'ucs2'))
|
||||
|
||||
t.equal(
|
||||
6, mixedByteStringUcs2.indexOf(Buffer.from('bc', 'ucs2'), 0, 'ucs2'))
|
||||
t.equal(
|
||||
10, mixedByteStringUcs2.indexOf(Buffer.from('\u03a3', 'ucs2'), 0, 'ucs2'))
|
||||
t.equal(
|
||||
-1, mixedByteStringUcs2.indexOf(Buffer.from('\u0396', 'ucs2'), 0, 'ucs2'))
|
||||
|
||||
{
|
||||
const twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2')
|
||||
|
||||
// Test single char pattern
|
||||
t.equal(0, twoByteString.indexOf('\u039a', 0, 'ucs2'))
|
||||
let index = twoByteString.indexOf('\u0391', 0, 'ucs2')
|
||||
t.equal(2, index, `Alpha - at index ${index}`)
|
||||
index = twoByteString.indexOf('\u03a3', 0, 'ucs2')
|
||||
t.equal(4, index, `First Sigma - at index ${index}`)
|
||||
index = twoByteString.indexOf('\u03a3', 6, 'ucs2')
|
||||
t.equal(6, index, `Second Sigma - at index ${index}`)
|
||||
index = twoByteString.indexOf('\u0395', 0, 'ucs2')
|
||||
t.equal(8, index, `Epsilon - at index ${index}`)
|
||||
index = twoByteString.indexOf('\u0392', 0, 'ucs2')
|
||||
t.equal(-1, index, `Not beta - at index ${index}`)
|
||||
|
||||
// Test multi-char pattern
|
||||
index = twoByteString.indexOf('\u039a\u0391', 0, 'ucs2')
|
||||
t.equal(0, index, `Lambda Alpha - at index ${index}`)
|
||||
index = twoByteString.indexOf('\u0391\u03a3', 0, 'ucs2')
|
||||
t.equal(2, index, `Alpha Sigma - at index ${index}`)
|
||||
index = twoByteString.indexOf('\u03a3\u03a3', 0, 'ucs2')
|
||||
t.equal(4, index, `Sigma Sigma - at index ${index}`)
|
||||
index = twoByteString.indexOf('\u03a3\u0395', 0, 'ucs2')
|
||||
t.equal(6, index, `Sigma Epsilon - at index ${index}`)
|
||||
}
|
||||
|
||||
const mixedByteStringUtf8 = Buffer.from('\u039a\u0391abc\u03a3\u03a3\u0395')
|
||||
|
||||
t.equal(5, mixedByteStringUtf8.indexOf('bc'))
|
||||
t.equal(5, mixedByteStringUtf8.indexOf('bc', 5))
|
||||
t.equal(5, mixedByteStringUtf8.indexOf('bc', -8))
|
||||
t.equal(7, mixedByteStringUtf8.indexOf('\u03a3'))
|
||||
t.equal(-1, mixedByteStringUtf8.indexOf('\u0396'))
|
||||
|
||||
// Test complex string indexOf algorithms. Only trigger for long strings.
|
||||
// Long string that isn't a simple repeat of a shorter string.
|
||||
let longString = 'A'
|
||||
for (let i = 66; i < 76; i++) { // from 'B' to 'K'
|
||||
longString = longString + String.fromCharCode(i) + longString
|
||||
}
|
||||
|
||||
const longBufferString = Buffer.from(longString)
|
||||
|
||||
// pattern of 15 chars, repeated every 16 chars in long
|
||||
let pattern = 'ABACABADABACABA'
|
||||
for (let i = 0; i < longBufferString.length - pattern.length; i += 7) {
|
||||
const index = longBufferString.indexOf(pattern, i)
|
||||
t.equal((i + 15) & ~0xf, index,
|
||||
`Long ABACABA...-string at index ${i}`)
|
||||
}
|
||||
|
||||
let index = longBufferString.indexOf('AJABACA')
|
||||
t.equal(510, index, `Long AJABACA, First J - at index ${index}`)
|
||||
index = longBufferString.indexOf('AJABACA', 511)
|
||||
t.equal(1534, index, `Long AJABACA, Second J - at index ${index}`)
|
||||
|
||||
pattern = 'JABACABADABACABA'
|
||||
index = longBufferString.indexOf(pattern)
|
||||
t.equal(511, index, `Long JABACABA..., First J - at index ${index}`)
|
||||
index = longBufferString.indexOf(pattern, 512)
|
||||
t.equal(
|
||||
1535, index, `Long JABACABA..., Second J - at index ${index}`)
|
||||
|
||||
// Search for a non-ASCII string in a pure ASCII string.
|
||||
const asciiString = Buffer.from(
|
||||
'somethingnotatallsinisterwhichalsoworks')
|
||||
t.equal(-1, asciiString.indexOf('\x2061'))
|
||||
t.equal(3, asciiString.indexOf('eth', 0))
|
||||
|
||||
// Search in string containing many non-ASCII chars.
|
||||
const allCodePoints = []
|
||||
for (let i = 0; i < 65536; i++) {
|
||||
allCodePoints[i] = i
|
||||
}
|
||||
|
||||
const allCharsString = String.fromCharCode.apply(String, allCodePoints)
|
||||
const allCharsBufferUtf8 = Buffer.from(allCharsString)
|
||||
const allCharsBufferUcs2 = Buffer.from(allCharsString, 'ucs2')
|
||||
|
||||
// Search for string long enough to trigger complex search with ASCII pattern
|
||||
// and UC16 subject.
|
||||
t.equal(-1, allCharsBufferUtf8.indexOf('notfound'))
|
||||
t.equal(-1, allCharsBufferUcs2.indexOf('notfound'))
|
||||
|
||||
// Needle is longer than haystack, but only because it's encoded as UTF-16
|
||||
t.equal(Buffer.from('aaaa').indexOf('a'.repeat(4), 'ucs2'), -1)
|
||||
|
||||
t.equal(Buffer.from('aaaa').indexOf('a'.repeat(4), 'utf8'), 0)
|
||||
t.equal(Buffer.from('aaaa').indexOf('你好', 'ucs2'), -1)
|
||||
|
||||
// Haystack has odd length, but the needle is UCS2.
|
||||
t.equal(Buffer.from('aaaaa').indexOf('b', 'ucs2'), -1)
|
||||
|
||||
{
|
||||
// Find substrings in Utf8.
|
||||
const lengths = [1, 3, 15] // Single char, simple and complex.
|
||||
const indices = [0x5, 0x60, 0x400, 0x680, 0x7ee, 0xFF02, 0x16610, 0x2f77b]
|
||||
for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
|
||||
for (let i = 0; i < indices.length; i++) {
|
||||
const index = indices[i]
|
||||
let length = lengths[lengthIndex]
|
||||
|
||||
if (index + length > 0x7F) {
|
||||
length = 2 * length
|
||||
}
|
||||
|
||||
if (index + length > 0x7FF) {
|
||||
length = 3 * length
|
||||
}
|
||||
|
||||
if (index + length > 0xFFFF) {
|
||||
length = 4 * length
|
||||
}
|
||||
|
||||
const patternBufferUtf8 = allCharsBufferUtf8.slice(index, index + length)
|
||||
t.equal(index, allCharsBufferUtf8.indexOf(patternBufferUtf8))
|
||||
|
||||
const patternStringUtf8 = patternBufferUtf8.toString()
|
||||
t.equal(index, allCharsBufferUtf8.indexOf(patternStringUtf8))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Find substrings in Usc2.
|
||||
const lengths = [2, 4, 16] // Single char, simple and complex.
|
||||
const indices = [0x5, 0x65, 0x105, 0x205, 0x285, 0x2005, 0x2085, 0xfff0]
|
||||
|
||||
for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
|
||||
for (let i = 0; i < indices.length; i++) {
|
||||
const index = indices[i] * 2
|
||||
const length = lengths[lengthIndex]
|
||||
|
||||
const patternBufferUcs2 =
|
||||
allCharsBufferUcs2.slice(index, index + length)
|
||||
t.equal(
|
||||
index, allCharsBufferUcs2.indexOf(patternBufferUcs2, 0, 'ucs2'))
|
||||
|
||||
const patternStringUcs2 = patternBufferUcs2.toString('ucs2')
|
||||
t.equal(
|
||||
index, allCharsBufferUcs2.indexOf(patternStringUcs2, 0, 'ucs2'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[
|
||||
() => {},
|
||||
{},
|
||||
[]
|
||||
].forEach((val) => {
|
||||
t.throws(() => b.indexOf(val), TypeError, `"${JSON.stringify(val)}" should throw`)
|
||||
})
|
||||
|
||||
// Test weird offset arguments.
|
||||
// The following offsets coerce to NaN or 0, searching the whole Buffer
|
||||
t.equal(b.indexOf('b', undefined), 1)
|
||||
t.equal(b.indexOf('b', {}), 1)
|
||||
t.equal(b.indexOf('b', 0), 1)
|
||||
t.equal(b.indexOf('b', null), 1)
|
||||
t.equal(b.indexOf('b', []), 1)
|
||||
|
||||
// The following offset coerces to 2, in other words +[2] === 2
|
||||
t.equal(b.indexOf('b', [2]), -1)
|
||||
|
||||
// Behavior should match String.indexOf()
|
||||
t.equal(
|
||||
b.indexOf('b', undefined),
|
||||
stringComparison.indexOf('b', undefined))
|
||||
t.equal(
|
||||
b.indexOf('b', {}),
|
||||
stringComparison.indexOf('b', {}))
|
||||
t.equal(
|
||||
b.indexOf('b', 0),
|
||||
stringComparison.indexOf('b', 0))
|
||||
t.equal(
|
||||
b.indexOf('b', null),
|
||||
stringComparison.indexOf('b', null))
|
||||
t.equal(
|
||||
b.indexOf('b', []),
|
||||
stringComparison.indexOf('b', []))
|
||||
t.equal(
|
||||
b.indexOf('b', [2]),
|
||||
stringComparison.indexOf('b', [2]))
|
||||
|
||||
// test truncation of Number arguments to uint8
|
||||
{
|
||||
const buf = Buffer.from('this is a test')
|
||||
|
||||
t.equal(buf.indexOf(0x6973), 3)
|
||||
t.equal(buf.indexOf(0x697320), 4)
|
||||
t.equal(buf.indexOf(0x69732069), 2)
|
||||
t.equal(buf.indexOf(0x697374657374), 0)
|
||||
t.equal(buf.indexOf(0x69737374), 0)
|
||||
t.equal(buf.indexOf(0x69737465), 11)
|
||||
t.equal(buf.indexOf(0x69737465), 11)
|
||||
t.equal(buf.indexOf(-140), 0)
|
||||
t.equal(buf.indexOf(-152), 1)
|
||||
t.equal(buf.indexOf(0xff), -1)
|
||||
t.equal(buf.indexOf(0xffff), -1)
|
||||
}
|
||||
|
||||
// Test that Uint8Array arguments are okay.
|
||||
{
|
||||
const needle = new Uint8Array([0x66, 0x6f, 0x6f])
|
||||
const haystack = new BufferList(Buffer.from('a foo b foo'))
|
||||
t.equal(haystack.indexOf(needle), 2)
|
||||
}
|
||||
|
||||
t.end()
|
||||
})
|
||||
32
backend/node_modules/bl/test/isBufferList.js
generated
vendored
Normal file
32
backend/node_modules/bl/test/isBufferList.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
'use strict'
|
||||
|
||||
const tape = require('tape')
|
||||
const { BufferList, BufferListStream } = require('../')
|
||||
const { Buffer } = require('buffer')
|
||||
|
||||
tape('isBufferList positives', (t) => {
|
||||
t.ok(BufferList.isBufferList(new BufferList()))
|
||||
t.ok(BufferList.isBufferList(new BufferListStream()))
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('isBufferList negatives', (t) => {
|
||||
const types = [
|
||||
null,
|
||||
undefined,
|
||||
NaN,
|
||||
true,
|
||||
false,
|
||||
{},
|
||||
[],
|
||||
Buffer.alloc(0),
|
||||
[Buffer.alloc(0)]
|
||||
]
|
||||
|
||||
for (const obj of types) {
|
||||
t.notOk(BufferList.isBufferList(obj))
|
||||
}
|
||||
|
||||
t.end()
|
||||
})
|
||||
869
backend/node_modules/bl/test/test.js
generated
vendored
Normal file
869
backend/node_modules/bl/test/test.js
generated
vendored
Normal file
@@ -0,0 +1,869 @@
|
||||
'use strict'
|
||||
|
||||
const tape = require('tape')
|
||||
const crypto = require('crypto')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const BufferList = require('../')
|
||||
const { Buffer } = require('buffer')
|
||||
|
||||
const encodings =
|
||||
('hex utf8 utf-8 ascii binary base64' +
|
||||
(process.browser ? '' : ' ucs2 ucs-2 utf16le utf-16le')).split(' ')
|
||||
|
||||
require('./indexOf')
|
||||
require('./isBufferList')
|
||||
require('./convert')
|
||||
|
||||
tape('single bytes from single buffer', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(Buffer.from('abcd'))
|
||||
|
||||
t.equal(bl.length, 4)
|
||||
t.equal(bl.get(-1), undefined)
|
||||
t.equal(bl.get(0), 97)
|
||||
t.equal(bl.get(1), 98)
|
||||
t.equal(bl.get(2), 99)
|
||||
t.equal(bl.get(3), 100)
|
||||
t.equal(bl.get(4), undefined)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('single bytes from multiple buffers', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(Buffer.from('abcd'))
|
||||
bl.append(Buffer.from('efg'))
|
||||
bl.append(Buffer.from('hi'))
|
||||
bl.append(Buffer.from('j'))
|
||||
|
||||
t.equal(bl.length, 10)
|
||||
|
||||
t.equal(bl.get(0), 97)
|
||||
t.equal(bl.get(1), 98)
|
||||
t.equal(bl.get(2), 99)
|
||||
t.equal(bl.get(3), 100)
|
||||
t.equal(bl.get(4), 101)
|
||||
t.equal(bl.get(5), 102)
|
||||
t.equal(bl.get(6), 103)
|
||||
t.equal(bl.get(7), 104)
|
||||
t.equal(bl.get(8), 105)
|
||||
t.equal(bl.get(9), 106)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('multi bytes from single buffer', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(Buffer.from('abcd'))
|
||||
|
||||
t.equal(bl.length, 4)
|
||||
|
||||
t.equal(bl.slice(0, 4).toString('ascii'), 'abcd')
|
||||
t.equal(bl.slice(0, 3).toString('ascii'), 'abc')
|
||||
t.equal(bl.slice(1, 4).toString('ascii'), 'bcd')
|
||||
t.equal(bl.slice(-4, -1).toString('ascii'), 'abc')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('multi bytes from single buffer (negative indexes)', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(Buffer.from('buffer'))
|
||||
|
||||
t.equal(bl.length, 6)
|
||||
|
||||
t.equal(bl.slice(-6, -1).toString('ascii'), 'buffe')
|
||||
t.equal(bl.slice(-6, -2).toString('ascii'), 'buff')
|
||||
t.equal(bl.slice(-5, -2).toString('ascii'), 'uff')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('multiple bytes from multiple buffers', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(Buffer.from('abcd'))
|
||||
bl.append(Buffer.from('efg'))
|
||||
bl.append(Buffer.from('hi'))
|
||||
bl.append(Buffer.from('j'))
|
||||
|
||||
t.equal(bl.length, 10)
|
||||
|
||||
t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
|
||||
t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
|
||||
t.equal(bl.slice(3, 6).toString('ascii'), 'def')
|
||||
t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
|
||||
t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
|
||||
t.equal(bl.slice(-7, -4).toString('ascii'), 'def')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('multiple bytes from multiple buffer lists', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(new BufferList([Buffer.from('abcd'), Buffer.from('efg')]))
|
||||
bl.append(new BufferList([Buffer.from('hi'), Buffer.from('j')]))
|
||||
|
||||
t.equal(bl.length, 10)
|
||||
|
||||
t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
|
||||
|
||||
t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
|
||||
t.equal(bl.slice(3, 6).toString('ascii'), 'def')
|
||||
t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
|
||||
t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
// same data as previous test, just using nested constructors
|
||||
tape('multiple bytes from crazy nested buffer lists', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(new BufferList([
|
||||
new BufferList([
|
||||
new BufferList(Buffer.from('abc')),
|
||||
Buffer.from('d'),
|
||||
new BufferList(Buffer.from('efg'))
|
||||
]),
|
||||
new BufferList([Buffer.from('hi')]),
|
||||
new BufferList(Buffer.from('j'))
|
||||
]))
|
||||
|
||||
t.equal(bl.length, 10)
|
||||
|
||||
t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
|
||||
|
||||
t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
|
||||
t.equal(bl.slice(3, 6).toString('ascii'), 'def')
|
||||
t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
|
||||
t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('append accepts arrays of Buffers', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(Buffer.from('abc'))
|
||||
bl.append([Buffer.from('def')])
|
||||
bl.append([Buffer.from('ghi'), Buffer.from('jkl')])
|
||||
bl.append([Buffer.from('mnop'), Buffer.from('qrstu'), Buffer.from('vwxyz')])
|
||||
t.equal(bl.length, 26)
|
||||
t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('append accepts arrays of Uint8Arrays', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(new Uint8Array([97, 98, 99]))
|
||||
bl.append([Uint8Array.from([100, 101, 102])])
|
||||
bl.append([new Uint8Array([103, 104, 105]), new Uint8Array([106, 107, 108])])
|
||||
bl.append([new Uint8Array([109, 110, 111, 112]), new Uint8Array([113, 114, 115, 116, 117]), new Uint8Array([118, 119, 120, 121, 122])])
|
||||
t.equal(bl.length, 26)
|
||||
t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('append accepts arrays of BufferLists', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(Buffer.from('abc'))
|
||||
bl.append([new BufferList('def')])
|
||||
bl.append(new BufferList([Buffer.from('ghi'), new BufferList('jkl')]))
|
||||
bl.append([Buffer.from('mnop'), new BufferList([Buffer.from('qrstu'), Buffer.from('vwxyz')])])
|
||||
t.equal(bl.length, 26)
|
||||
t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('append chainable', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
t.ok(bl.append(Buffer.from('abcd')) === bl)
|
||||
t.ok(bl.append([Buffer.from('abcd')]) === bl)
|
||||
t.ok(bl.append(new BufferList(Buffer.from('abcd'))) === bl)
|
||||
t.ok(bl.append([new BufferList(Buffer.from('abcd'))]) === bl)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('append chainable (test results)', function (t) {
|
||||
const bl = new BufferList('abc')
|
||||
.append([new BufferList('def')])
|
||||
.append(new BufferList([Buffer.from('ghi'), new BufferList('jkl')]))
|
||||
.append([Buffer.from('mnop'), new BufferList([Buffer.from('qrstu'), Buffer.from('vwxyz')])])
|
||||
|
||||
t.equal(bl.length, 26)
|
||||
t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('consuming from multiple buffers', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(Buffer.from('abcd'))
|
||||
bl.append(Buffer.from('efg'))
|
||||
bl.append(Buffer.from('hi'))
|
||||
bl.append(Buffer.from('j'))
|
||||
|
||||
t.equal(bl.length, 10)
|
||||
|
||||
t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
|
||||
|
||||
bl.consume(3)
|
||||
t.equal(bl.length, 7)
|
||||
t.equal(bl.slice(0, 7).toString('ascii'), 'defghij')
|
||||
|
||||
bl.consume(2)
|
||||
t.equal(bl.length, 5)
|
||||
t.equal(bl.slice(0, 5).toString('ascii'), 'fghij')
|
||||
|
||||
bl.consume(1)
|
||||
t.equal(bl.length, 4)
|
||||
t.equal(bl.slice(0, 4).toString('ascii'), 'ghij')
|
||||
|
||||
bl.consume(1)
|
||||
t.equal(bl.length, 3)
|
||||
t.equal(bl.slice(0, 3).toString('ascii'), 'hij')
|
||||
|
||||
bl.consume(2)
|
||||
t.equal(bl.length, 1)
|
||||
t.equal(bl.slice(0, 1).toString('ascii'), 'j')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('complete consumption', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(Buffer.from('a'))
|
||||
bl.append(Buffer.from('b'))
|
||||
|
||||
bl.consume(2)
|
||||
|
||||
t.equal(bl.length, 0)
|
||||
t.equal(bl._bufs.length, 0)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('test readUInt8 / readInt8', function (t) {
|
||||
const buf1 = Buffer.alloc(1)
|
||||
const buf2 = Buffer.alloc(3)
|
||||
const buf3 = Buffer.alloc(3)
|
||||
const bl = new BufferList()
|
||||
|
||||
buf1[0] = 0x1
|
||||
buf2[1] = 0x3
|
||||
buf2[2] = 0x4
|
||||
buf3[0] = 0x23
|
||||
buf3[1] = 0x42
|
||||
|
||||
bl.append(buf1)
|
||||
bl.append(buf2)
|
||||
bl.append(buf3)
|
||||
|
||||
t.equal(bl.readUInt8(), 0x1)
|
||||
t.equal(bl.readUInt8(2), 0x3)
|
||||
t.equal(bl.readInt8(2), 0x3)
|
||||
t.equal(bl.readUInt8(3), 0x4)
|
||||
t.equal(bl.readInt8(3), 0x4)
|
||||
t.equal(bl.readUInt8(4), 0x23)
|
||||
t.equal(bl.readInt8(4), 0x23)
|
||||
t.equal(bl.readUInt8(5), 0x42)
|
||||
t.equal(bl.readInt8(5), 0x42)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) {
|
||||
const buf1 = Buffer.alloc(1)
|
||||
const buf2 = Buffer.alloc(3)
|
||||
const buf3 = Buffer.alloc(3)
|
||||
const bl = new BufferList()
|
||||
|
||||
buf1[0] = 0x1
|
||||
buf2[1] = 0x3
|
||||
buf2[2] = 0x4
|
||||
buf3[0] = 0x23
|
||||
buf3[1] = 0x42
|
||||
|
||||
bl.append(buf1)
|
||||
bl.append(buf2)
|
||||
bl.append(buf3)
|
||||
|
||||
t.equal(bl.readUInt16BE(), 0x0100)
|
||||
t.equal(bl.readUInt16LE(), 0x0001)
|
||||
t.equal(bl.readUInt16BE(2), 0x0304)
|
||||
t.equal(bl.readUInt16LE(2), 0x0403)
|
||||
t.equal(bl.readInt16BE(2), 0x0304)
|
||||
t.equal(bl.readInt16LE(2), 0x0403)
|
||||
t.equal(bl.readUInt16BE(3), 0x0423)
|
||||
t.equal(bl.readUInt16LE(3), 0x2304)
|
||||
t.equal(bl.readInt16BE(3), 0x0423)
|
||||
t.equal(bl.readInt16LE(3), 0x2304)
|
||||
t.equal(bl.readUInt16BE(4), 0x2342)
|
||||
t.equal(bl.readUInt16LE(4), 0x4223)
|
||||
t.equal(bl.readInt16BE(4), 0x2342)
|
||||
t.equal(bl.readInt16LE(4), 0x4223)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) {
|
||||
const buf1 = Buffer.alloc(1)
|
||||
const buf2 = Buffer.alloc(3)
|
||||
const buf3 = Buffer.alloc(3)
|
||||
const bl = new BufferList()
|
||||
|
||||
buf1[0] = 0x1
|
||||
buf2[1] = 0x3
|
||||
buf2[2] = 0x4
|
||||
buf3[0] = 0x23
|
||||
buf3[1] = 0x42
|
||||
|
||||
bl.append(buf1)
|
||||
bl.append(buf2)
|
||||
bl.append(buf3)
|
||||
|
||||
t.equal(bl.readUInt32BE(), 0x01000304)
|
||||
t.equal(bl.readUInt32LE(), 0x04030001)
|
||||
t.equal(bl.readUInt32BE(2), 0x03042342)
|
||||
t.equal(bl.readUInt32LE(2), 0x42230403)
|
||||
t.equal(bl.readInt32BE(2), 0x03042342)
|
||||
t.equal(bl.readInt32LE(2), 0x42230403)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('test readUIntLE / readUIntBE / readIntLE / readIntBE', function (t) {
|
||||
const buf1 = Buffer.alloc(1)
|
||||
const buf2 = Buffer.alloc(3)
|
||||
const buf3 = Buffer.alloc(3)
|
||||
const bl = new BufferList()
|
||||
|
||||
buf2[0] = 0x2
|
||||
buf2[1] = 0x3
|
||||
buf2[2] = 0x4
|
||||
buf3[0] = 0x23
|
||||
buf3[1] = 0x42
|
||||
buf3[2] = 0x61
|
||||
|
||||
bl.append(buf1)
|
||||
bl.append(buf2)
|
||||
bl.append(buf3)
|
||||
|
||||
t.equal(bl.readUIntBE(1, 1), 0x02)
|
||||
t.equal(bl.readUIntBE(1, 2), 0x0203)
|
||||
t.equal(bl.readUIntBE(1, 3), 0x020304)
|
||||
t.equal(bl.readUIntBE(1, 4), 0x02030423)
|
||||
t.equal(bl.readUIntBE(1, 5), 0x0203042342)
|
||||
t.equal(bl.readUIntBE(1, 6), 0x020304234261)
|
||||
t.equal(bl.readUIntLE(1, 1), 0x02)
|
||||
t.equal(bl.readUIntLE(1, 2), 0x0302)
|
||||
t.equal(bl.readUIntLE(1, 3), 0x040302)
|
||||
t.equal(bl.readUIntLE(1, 4), 0x23040302)
|
||||
t.equal(bl.readUIntLE(1, 5), 0x4223040302)
|
||||
t.equal(bl.readUIntLE(1, 6), 0x614223040302)
|
||||
t.equal(bl.readIntBE(1, 1), 0x02)
|
||||
t.equal(bl.readIntBE(1, 2), 0x0203)
|
||||
t.equal(bl.readIntBE(1, 3), 0x020304)
|
||||
t.equal(bl.readIntBE(1, 4), 0x02030423)
|
||||
t.equal(bl.readIntBE(1, 5), 0x0203042342)
|
||||
t.equal(bl.readIntBE(1, 6), 0x020304234261)
|
||||
t.equal(bl.readIntLE(1, 1), 0x02)
|
||||
t.equal(bl.readIntLE(1, 2), 0x0302)
|
||||
t.equal(bl.readIntLE(1, 3), 0x040302)
|
||||
t.equal(bl.readIntLE(1, 4), 0x23040302)
|
||||
t.equal(bl.readIntLE(1, 5), 0x4223040302)
|
||||
t.equal(bl.readIntLE(1, 6), 0x614223040302)
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('test readFloatLE / readFloatBE', function (t) {
|
||||
const buf1 = Buffer.alloc(1)
|
||||
const buf2 = Buffer.alloc(3)
|
||||
const buf3 = Buffer.alloc(3)
|
||||
const bl = new BufferList()
|
||||
|
||||
buf1[0] = 0x01
|
||||
buf2[1] = 0x00
|
||||
buf2[2] = 0x00
|
||||
buf3[0] = 0x80
|
||||
buf3[1] = 0x3f
|
||||
|
||||
bl.append(buf1)
|
||||
bl.append(buf2)
|
||||
bl.append(buf3)
|
||||
|
||||
const canonical = Buffer.concat([buf1, buf2, buf3])
|
||||
t.equal(bl.readFloatLE(), canonical.readFloatLE())
|
||||
t.equal(bl.readFloatBE(), canonical.readFloatBE())
|
||||
t.equal(bl.readFloatLE(2), canonical.readFloatLE(2))
|
||||
t.equal(bl.readFloatBE(2), canonical.readFloatBE(2))
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('test readDoubleLE / readDoubleBE', function (t) {
|
||||
const buf1 = Buffer.alloc(1)
|
||||
const buf2 = Buffer.alloc(3)
|
||||
const buf3 = Buffer.alloc(10)
|
||||
const bl = new BufferList()
|
||||
|
||||
buf1[0] = 0x01
|
||||
buf2[1] = 0x55
|
||||
buf2[2] = 0x55
|
||||
buf3[0] = 0x55
|
||||
buf3[1] = 0x55
|
||||
buf3[2] = 0x55
|
||||
buf3[3] = 0x55
|
||||
buf3[4] = 0xd5
|
||||
buf3[5] = 0x3f
|
||||
|
||||
bl.append(buf1)
|
||||
bl.append(buf2)
|
||||
bl.append(buf3)
|
||||
|
||||
const canonical = Buffer.concat([buf1, buf2, buf3])
|
||||
t.equal(bl.readDoubleBE(), canonical.readDoubleBE())
|
||||
t.equal(bl.readDoubleLE(), canonical.readDoubleLE())
|
||||
t.equal(bl.readDoubleBE(2), canonical.readDoubleBE(2))
|
||||
t.equal(bl.readDoubleLE(2), canonical.readDoubleLE(2))
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('test toString', function (t) {
|
||||
const bl = new BufferList()
|
||||
|
||||
bl.append(Buffer.from('abcd'))
|
||||
bl.append(Buffer.from('efg'))
|
||||
bl.append(Buffer.from('hi'))
|
||||
bl.append(Buffer.from('j'))
|
||||
|
||||
t.equal(bl.toString('ascii', 0, 10), 'abcdefghij')
|
||||
t.equal(bl.toString('ascii', 3, 10), 'defghij')
|
||||
t.equal(bl.toString('ascii', 3, 6), 'def')
|
||||
t.equal(bl.toString('ascii', 3, 8), 'defgh')
|
||||
t.equal(bl.toString('ascii', 5, 10), 'fghij')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('test toString encoding', function (t) {
|
||||
const bl = new BufferList()
|
||||
const b = Buffer.from('abcdefghij\xff\x00')
|
||||
|
||||
bl.append(Buffer.from('abcd'))
|
||||
bl.append(Buffer.from('efg'))
|
||||
bl.append(Buffer.from('hi'))
|
||||
bl.append(Buffer.from('j'))
|
||||
bl.append(Buffer.from('\xff\x00'))
|
||||
|
||||
encodings.forEach(function (enc) {
|
||||
t.equal(bl.toString(enc), b.toString(enc), enc)
|
||||
})
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('uninitialized memory', function (t) {
|
||||
const secret = crypto.randomBytes(256)
|
||||
for (let i = 0; i < 1e6; i++) {
|
||||
const clone = Buffer.from(secret)
|
||||
const bl = new BufferList()
|
||||
bl.append(Buffer.from('a'))
|
||||
bl.consume(-1024)
|
||||
const buf = bl.slice(1)
|
||||
if (buf.indexOf(clone) !== -1) {
|
||||
t.fail(`Match (at ${i})`)
|
||||
break
|
||||
}
|
||||
}
|
||||
t.end()
|
||||
})
|
||||
|
||||
!process.browser && tape('test stream', function (t) {
|
||||
const random = crypto.randomBytes(65534)
|
||||
|
||||
const bl = new BufferList((err, buf) => {
|
||||
t.ok(Buffer.isBuffer(buf))
|
||||
t.ok(err === null)
|
||||
t.ok(random.equals(bl.slice()))
|
||||
t.ok(random.equals(buf.slice()))
|
||||
|
||||
bl.pipe(fs.createWriteStream('/tmp/bl_test_rnd_out.dat'))
|
||||
.on('close', function () {
|
||||
const rndhash = crypto.createHash('md5').update(random).digest('hex')
|
||||
const md5sum = crypto.createHash('md5')
|
||||
const s = fs.createReadStream('/tmp/bl_test_rnd_out.dat')
|
||||
|
||||
s.on('data', md5sum.update.bind(md5sum))
|
||||
s.on('end', function () {
|
||||
t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!')
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
fs.writeFileSync('/tmp/bl_test_rnd.dat', random)
|
||||
fs.createReadStream('/tmp/bl_test_rnd.dat').pipe(bl)
|
||||
})
|
||||
|
||||
tape('instantiation with Buffer', function (t) {
|
||||
const buf = crypto.randomBytes(1024)
|
||||
const buf2 = crypto.randomBytes(1024)
|
||||
let b = BufferList(buf)
|
||||
|
||||
t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer')
|
||||
b = BufferList([buf, buf2])
|
||||
t.equal(b.slice().toString('hex'), Buffer.concat([buf, buf2]).toString('hex'), 'same buffer')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('test String appendage', function (t) {
|
||||
const bl = new BufferList()
|
||||
const b = Buffer.from('abcdefghij\xff\x00')
|
||||
|
||||
bl.append('abcd')
|
||||
bl.append('efg')
|
||||
bl.append('hi')
|
||||
bl.append('j')
|
||||
bl.append('\xff\x00')
|
||||
|
||||
encodings.forEach(function (enc) {
|
||||
t.equal(bl.toString(enc), b.toString(enc))
|
||||
})
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('test Number appendage', function (t) {
|
||||
const bl = new BufferList()
|
||||
const b = Buffer.from('1234567890')
|
||||
|
||||
bl.append(1234)
|
||||
bl.append(567)
|
||||
bl.append(89)
|
||||
bl.append(0)
|
||||
|
||||
encodings.forEach(function (enc) {
|
||||
t.equal(bl.toString(enc), b.toString(enc))
|
||||
})
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('write nothing, should get empty buffer', function (t) {
|
||||
t.plan(3)
|
||||
BufferList(function (err, data) {
|
||||
t.notOk(err, 'no error')
|
||||
t.ok(Buffer.isBuffer(data), 'got a buffer')
|
||||
t.equal(0, data.length, 'got a zero-length buffer')
|
||||
t.end()
|
||||
}).end()
|
||||
})
|
||||
|
||||
tape('unicode string', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
const inp1 = '\u2600'
|
||||
const inp2 = '\u2603'
|
||||
const exp = inp1 + ' and ' + inp2
|
||||
const bl = BufferList()
|
||||
|
||||
bl.write(inp1)
|
||||
bl.write(' and ')
|
||||
bl.write(inp2)
|
||||
t.equal(exp, bl.toString())
|
||||
t.equal(Buffer.from(exp).toString('hex'), bl.toString('hex'))
|
||||
})
|
||||
|
||||
tape('should emit finish', function (t) {
|
||||
const source = BufferList()
|
||||
const dest = BufferList()
|
||||
|
||||
source.write('hello')
|
||||
source.pipe(dest)
|
||||
|
||||
dest.on('finish', function () {
|
||||
t.equal(dest.toString('utf8'), 'hello')
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
|
||||
tape('basic copy', function (t) {
|
||||
const buf = crypto.randomBytes(1024)
|
||||
const buf2 = Buffer.alloc(1024)
|
||||
const b = BufferList(buf)
|
||||
|
||||
b.copy(buf2)
|
||||
t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('copy after many appends', function (t) {
|
||||
const buf = crypto.randomBytes(512)
|
||||
const buf2 = Buffer.alloc(1024)
|
||||
const b = BufferList(buf)
|
||||
|
||||
b.append(buf)
|
||||
b.copy(buf2)
|
||||
t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('copy at a precise position', function (t) {
|
||||
const buf = crypto.randomBytes(1004)
|
||||
const buf2 = Buffer.alloc(1024)
|
||||
const b = BufferList(buf)
|
||||
|
||||
b.copy(buf2, 20)
|
||||
t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('copy starting from a precise location', function (t) {
|
||||
const buf = crypto.randomBytes(10)
|
||||
const buf2 = Buffer.alloc(5)
|
||||
const b = BufferList(buf)
|
||||
|
||||
b.copy(buf2, 0, 5)
|
||||
t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('copy in an interval', function (t) {
|
||||
const rnd = crypto.randomBytes(10)
|
||||
const b = BufferList(rnd) // put the random bytes there
|
||||
const actual = Buffer.alloc(3)
|
||||
const expected = Buffer.alloc(3)
|
||||
|
||||
rnd.copy(expected, 0, 5, 8)
|
||||
b.copy(actual, 0, 5, 8)
|
||||
|
||||
t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('copy an interval between two buffers', function (t) {
|
||||
const buf = crypto.randomBytes(10)
|
||||
const buf2 = Buffer.alloc(10)
|
||||
const b = BufferList(buf)
|
||||
|
||||
b.append(buf)
|
||||
b.copy(buf2, 0, 5, 15)
|
||||
|
||||
t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('shallow slice across buffer boundaries', function (t) {
|
||||
const bl = new BufferList(['First', 'Second', 'Third'])
|
||||
|
||||
t.equal(bl.shallowSlice(3, 13).toString(), 'stSecondTh')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('shallow slice within single buffer', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
const bl = new BufferList(['First', 'Second', 'Third'])
|
||||
|
||||
t.equal(bl.shallowSlice(5, 10).toString(), 'Secon')
|
||||
t.equal(bl.shallowSlice(7, 10).toString(), 'con')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('shallow slice single buffer', function (t) {
|
||||
t.plan(3)
|
||||
|
||||
const bl = new BufferList(['First', 'Second', 'Third'])
|
||||
|
||||
t.equal(bl.shallowSlice(0, 5).toString(), 'First')
|
||||
t.equal(bl.shallowSlice(5, 11).toString(), 'Second')
|
||||
t.equal(bl.shallowSlice(11, 16).toString(), 'Third')
|
||||
})
|
||||
|
||||
tape('shallow slice with negative or omitted indices', function (t) {
|
||||
t.plan(4)
|
||||
|
||||
const bl = new BufferList(['First', 'Second', 'Third'])
|
||||
|
||||
t.equal(bl.shallowSlice().toString(), 'FirstSecondThird')
|
||||
t.equal(bl.shallowSlice(5).toString(), 'SecondThird')
|
||||
t.equal(bl.shallowSlice(5, -3).toString(), 'SecondTh')
|
||||
t.equal(bl.shallowSlice(-8).toString(), 'ondThird')
|
||||
})
|
||||
|
||||
tape('shallow slice does not make a copy', function (t) {
|
||||
t.plan(1)
|
||||
|
||||
const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
|
||||
const bl = (new BufferList(buffers)).shallowSlice(5, -3)
|
||||
|
||||
buffers[1].fill('h')
|
||||
buffers[2].fill('h')
|
||||
|
||||
t.equal(bl.toString(), 'hhhhhhhh')
|
||||
})
|
||||
|
||||
tape('shallow slice with 0 length', function (t) {
|
||||
t.plan(1)
|
||||
|
||||
const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
|
||||
const bl = (new BufferList(buffers)).shallowSlice(0, 0)
|
||||
|
||||
t.equal(bl.length, 0)
|
||||
})
|
||||
|
||||
tape('shallow slice with 0 length from middle', function (t) {
|
||||
t.plan(1)
|
||||
|
||||
const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
|
||||
const bl = (new BufferList(buffers)).shallowSlice(10, 10)
|
||||
|
||||
t.equal(bl.length, 0)
|
||||
})
|
||||
|
||||
tape('duplicate', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
const bl = new BufferList('abcdefghij\xff\x00')
|
||||
const dup = bl.duplicate()
|
||||
|
||||
t.equal(bl.prototype, dup.prototype)
|
||||
t.equal(bl.toString('hex'), dup.toString('hex'))
|
||||
})
|
||||
|
||||
tape('destroy no pipe', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
const bl = new BufferList('alsdkfja;lsdkfja;lsdk')
|
||||
|
||||
bl.destroy()
|
||||
|
||||
t.equal(bl._bufs.length, 0)
|
||||
t.equal(bl.length, 0)
|
||||
})
|
||||
|
||||
tape('destroy with error', function (t) {
|
||||
t.plan(3)
|
||||
|
||||
const bl = new BufferList('alsdkfja;lsdkfja;lsdk')
|
||||
const err = new Error('kaboom')
|
||||
|
||||
bl.destroy(err)
|
||||
bl.on('error', function (_err) {
|
||||
t.equal(_err, err)
|
||||
})
|
||||
|
||||
t.equal(bl._bufs.length, 0)
|
||||
t.equal(bl.length, 0)
|
||||
})
|
||||
|
||||
!process.browser && tape('destroy with pipe before read end', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
const bl = new BufferList()
|
||||
fs.createReadStream(path.join(__dirname, '/test.js'))
|
||||
.pipe(bl)
|
||||
|
||||
bl.destroy()
|
||||
|
||||
t.equal(bl._bufs.length, 0)
|
||||
t.equal(bl.length, 0)
|
||||
})
|
||||
|
||||
!process.browser && tape('destroy with pipe before read end with race', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
const bl = new BufferList()
|
||||
|
||||
fs.createReadStream(path.join(__dirname, '/test.js'))
|
||||
.pipe(bl)
|
||||
|
||||
setTimeout(function () {
|
||||
bl.destroy()
|
||||
setTimeout(function () {
|
||||
t.equal(bl._bufs.length, 0)
|
||||
t.equal(bl.length, 0)
|
||||
}, 500)
|
||||
}, 500)
|
||||
})
|
||||
|
||||
!process.browser && tape('destroy with pipe after read end', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
const bl = new BufferList()
|
||||
|
||||
fs.createReadStream(path.join(__dirname, '/test.js'))
|
||||
.on('end', onEnd)
|
||||
.pipe(bl)
|
||||
|
||||
function onEnd () {
|
||||
bl.destroy()
|
||||
|
||||
t.equal(bl._bufs.length, 0)
|
||||
t.equal(bl.length, 0)
|
||||
}
|
||||
})
|
||||
|
||||
!process.browser && tape('destroy with pipe while writing to a destination', function (t) {
|
||||
t.plan(4)
|
||||
|
||||
const bl = new BufferList()
|
||||
const ds = new BufferList()
|
||||
|
||||
fs.createReadStream(path.join(__dirname, '/test.js'))
|
||||
.on('end', onEnd)
|
||||
.pipe(bl)
|
||||
|
||||
function onEnd () {
|
||||
bl.pipe(ds)
|
||||
|
||||
setTimeout(function () {
|
||||
bl.destroy()
|
||||
|
||||
t.equals(bl._bufs.length, 0)
|
||||
t.equals(bl.length, 0)
|
||||
|
||||
ds.destroy()
|
||||
|
||||
t.equals(bl._bufs.length, 0)
|
||||
t.equals(bl.length, 0)
|
||||
}, 100)
|
||||
}
|
||||
})
|
||||
|
||||
!process.browser && tape('handle error', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
fs.createReadStream('/does/not/exist').pipe(BufferList(function (err, data) {
|
||||
t.ok(err instanceof Error, 'has error')
|
||||
t.notOk(data, 'no data')
|
||||
}))
|
||||
})
|
||||
21
backend/node_modules/color-string/LICENSE
generated
vendored
Normal file
21
backend/node_modules/color-string/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 2011 Heather Arthur <fayearthur@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
62
backend/node_modules/color-string/README.md
generated
vendored
Normal file
62
backend/node_modules/color-string/README.md
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
# color-string
|
||||
|
||||
> library for parsing and generating CSS color strings.
|
||||
|
||||
## Install
|
||||
|
||||
With [npm](http://npmjs.org/):
|
||||
|
||||
```console
|
||||
$ npm install color-string
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Parsing
|
||||
|
||||
```js
|
||||
colorString.get('#FFF') // {model: 'rgb', value: [255, 255, 255, 1]}
|
||||
colorString.get('#FFFA') // {model: 'rgb', value: [255, 255, 255, 0.67]}
|
||||
colorString.get('#FFFFFFAA') // {model: 'rgb', value: [255, 255, 255, 0.67]}
|
||||
colorString.get('hsl(360, 100%, 50%)') // {model: 'hsl', value: [0, 100, 50, 1]}
|
||||
colorString.get('hsl(360 100% 50%)') // {model: 'hsl', value: [0, 100, 50, 1]}
|
||||
colorString.get('hwb(60, 3%, 60%)') // {model: 'hwb', value: [60, 3, 60, 1]}
|
||||
|
||||
colorString.get.rgb('#FFF') // [255, 255, 255, 1]
|
||||
colorString.get.rgb('blue') // [0, 0, 255, 1]
|
||||
colorString.get.rgb('rgba(200, 60, 60, 0.3)') // [200, 60, 60, 0.3]
|
||||
colorString.get.rgb('rgba(200 60 60 / 0.3)') // [200, 60, 60, 0.3]
|
||||
colorString.get.rgb('rgba(200 60 60 / 30%)') // [200, 60, 60, 0.3]
|
||||
colorString.get.rgb('rgb(200, 200, 200)') // [200, 200, 200, 1]
|
||||
colorString.get.rgb('rgb(200 200 200)') // [200, 200, 200, 1]
|
||||
|
||||
colorString.get.hsl('hsl(360, 100%, 50%)') // [0, 100, 50, 1]
|
||||
colorString.get.hsl('hsl(360 100% 50%)') // [0, 100, 50, 1]
|
||||
colorString.get.hsl('hsla(360, 60%, 50%, 0.4)') // [0, 60, 50, 0.4]
|
||||
colorString.get.hsl('hsl(360 60% 50% / 0.4)') // [0, 60, 50, 0.4]
|
||||
|
||||
colorString.get.hwb('hwb(60, 3%, 60%)') // [60, 3, 60, 1]
|
||||
colorString.get.hwb('hwb(60, 3%, 60%, 0.6)') // [60, 3, 60, 0.6]
|
||||
|
||||
colorString.get.rgb('invalid color string') // null
|
||||
```
|
||||
|
||||
### Generation
|
||||
|
||||
```js
|
||||
colorString.to.hex([255, 255, 255]) // "#FFFFFF"
|
||||
colorString.to.hex([0, 0, 255, 0.4]) // "#0000FF66"
|
||||
colorString.to.hex([0, 0, 255], 0.4) // "#0000FF66"
|
||||
colorString.to.rgb([255, 255, 255]) // "rgb(255, 255, 255)"
|
||||
colorString.to.rgb([0, 0, 255, 0.4]) // "rgba(0, 0, 255, 0.4)"
|
||||
colorString.to.rgb([0, 0, 255], 0.4) // "rgba(0, 0, 255, 0.4)"
|
||||
colorString.to.rgb.percent([0, 0, 255]) // "rgb(0%, 0%, 100%)"
|
||||
colorString.to.keyword([255, 255, 0]) // "yellow"
|
||||
colorString.to.hsl([360, 100, 100]) // "hsl(360, 100%, 100%)"
|
||||
colorString.to.hwb([50, 3, 15]) // "hwb(50, 3%, 15%)"
|
||||
|
||||
// all functions also support swizzling
|
||||
colorString.to.rgb(0, [0, 255], 0.4) // "rgba(0, 0, 255, 0.4)"
|
||||
colorString.to.rgb([0, 0], [255], 0.4) // "rgba(0, 0, 255, 0.4)"
|
||||
colorString.to.rgb([0], 0, [255, 0.4]) // "rgba(0, 0, 255, 0.4)"
|
||||
```
|
||||
242
backend/node_modules/color-string/index.js
generated
vendored
Normal file
242
backend/node_modules/color-string/index.js
generated
vendored
Normal file
@@ -0,0 +1,242 @@
|
||||
/* MIT license */
|
||||
var colorNames = require('color-name');
|
||||
var swizzle = require('simple-swizzle');
|
||||
var hasOwnProperty = Object.hasOwnProperty;
|
||||
|
||||
var reverseNames = Object.create(null);
|
||||
|
||||
// create a list of reverse color names
|
||||
for (var name in colorNames) {
|
||||
if (hasOwnProperty.call(colorNames, name)) {
|
||||
reverseNames[colorNames[name]] = name;
|
||||
}
|
||||
}
|
||||
|
||||
var cs = module.exports = {
|
||||
to: {},
|
||||
get: {}
|
||||
};
|
||||
|
||||
cs.get = function (string) {
|
||||
var prefix = string.substring(0, 3).toLowerCase();
|
||||
var val;
|
||||
var model;
|
||||
switch (prefix) {
|
||||
case 'hsl':
|
||||
val = cs.get.hsl(string);
|
||||
model = 'hsl';
|
||||
break;
|
||||
case 'hwb':
|
||||
val = cs.get.hwb(string);
|
||||
model = 'hwb';
|
||||
break;
|
||||
default:
|
||||
val = cs.get.rgb(string);
|
||||
model = 'rgb';
|
||||
break;
|
||||
}
|
||||
|
||||
if (!val) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {model: model, value: val};
|
||||
};
|
||||
|
||||
cs.get.rgb = function (string) {
|
||||
if (!string) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var abbr = /^#([a-f0-9]{3,4})$/i;
|
||||
var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
|
||||
var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
|
||||
var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
|
||||
var keyword = /^(\w+)$/;
|
||||
|
||||
var rgb = [0, 0, 0, 1];
|
||||
var match;
|
||||
var i;
|
||||
var hexAlpha;
|
||||
|
||||
if (match = string.match(hex)) {
|
||||
hexAlpha = match[2];
|
||||
match = match[1];
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19
|
||||
var i2 = i * 2;
|
||||
rgb[i] = parseInt(match.slice(i2, i2 + 2), 16);
|
||||
}
|
||||
|
||||
if (hexAlpha) {
|
||||
rgb[3] = parseInt(hexAlpha, 16) / 255;
|
||||
}
|
||||
} else if (match = string.match(abbr)) {
|
||||
match = match[1];
|
||||
hexAlpha = match[3];
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
rgb[i] = parseInt(match[i] + match[i], 16);
|
||||
}
|
||||
|
||||
if (hexAlpha) {
|
||||
rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
|
||||
}
|
||||
} else if (match = string.match(rgba)) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
rgb[i] = parseInt(match[i + 1], 0);
|
||||
}
|
||||
|
||||
if (match[4]) {
|
||||
if (match[5]) {
|
||||
rgb[3] = parseFloat(match[4]) * 0.01;
|
||||
} else {
|
||||
rgb[3] = parseFloat(match[4]);
|
||||
}
|
||||
}
|
||||
} else if (match = string.match(per)) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
|
||||
}
|
||||
|
||||
if (match[4]) {
|
||||
if (match[5]) {
|
||||
rgb[3] = parseFloat(match[4]) * 0.01;
|
||||
} else {
|
||||
rgb[3] = parseFloat(match[4]);
|
||||
}
|
||||
}
|
||||
} else if (match = string.match(keyword)) {
|
||||
if (match[1] === 'transparent') {
|
||||
return [0, 0, 0, 0];
|
||||
}
|
||||
|
||||
if (!hasOwnProperty.call(colorNames, match[1])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
rgb = colorNames[match[1]];
|
||||
rgb[3] = 1;
|
||||
|
||||
return rgb;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
rgb[i] = clamp(rgb[i], 0, 255);
|
||||
}
|
||||
rgb[3] = clamp(rgb[3], 0, 1);
|
||||
|
||||
return rgb;
|
||||
};
|
||||
|
||||
cs.get.hsl = function (string) {
|
||||
if (!string) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
|
||||
var match = string.match(hsl);
|
||||
|
||||
if (match) {
|
||||
var alpha = parseFloat(match[4]);
|
||||
var h = ((parseFloat(match[1]) % 360) + 360) % 360;
|
||||
var s = clamp(parseFloat(match[2]), 0, 100);
|
||||
var l = clamp(parseFloat(match[3]), 0, 100);
|
||||
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
|
||||
|
||||
return [h, s, l, a];
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
cs.get.hwb = function (string) {
|
||||
if (!string) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
|
||||
var match = string.match(hwb);
|
||||
|
||||
if (match) {
|
||||
var alpha = parseFloat(match[4]);
|
||||
var h = ((parseFloat(match[1]) % 360) + 360) % 360;
|
||||
var w = clamp(parseFloat(match[2]), 0, 100);
|
||||
var b = clamp(parseFloat(match[3]), 0, 100);
|
||||
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
|
||||
return [h, w, b, a];
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
cs.to.hex = function () {
|
||||
var rgba = swizzle(arguments);
|
||||
|
||||
return (
|
||||
'#' +
|
||||
hexDouble(rgba[0]) +
|
||||
hexDouble(rgba[1]) +
|
||||
hexDouble(rgba[2]) +
|
||||
(rgba[3] < 1
|
||||
? (hexDouble(Math.round(rgba[3] * 255)))
|
||||
: '')
|
||||
);
|
||||
};
|
||||
|
||||
cs.to.rgb = function () {
|
||||
var rgba = swizzle(arguments);
|
||||
|
||||
return rgba.length < 4 || rgba[3] === 1
|
||||
? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'
|
||||
: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';
|
||||
};
|
||||
|
||||
cs.to.rgb.percent = function () {
|
||||
var rgba = swizzle(arguments);
|
||||
|
||||
var r = Math.round(rgba[0] / 255 * 100);
|
||||
var g = Math.round(rgba[1] / 255 * 100);
|
||||
var b = Math.round(rgba[2] / 255 * 100);
|
||||
|
||||
return rgba.length < 4 || rgba[3] === 1
|
||||
? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'
|
||||
: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';
|
||||
};
|
||||
|
||||
cs.to.hsl = function () {
|
||||
var hsla = swizzle(arguments);
|
||||
return hsla.length < 4 || hsla[3] === 1
|
||||
? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'
|
||||
: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';
|
||||
};
|
||||
|
||||
// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax
|
||||
// (hwb have alpha optional & 1 is default value)
|
||||
cs.to.hwb = function () {
|
||||
var hwba = swizzle(arguments);
|
||||
|
||||
var a = '';
|
||||
if (hwba.length >= 4 && hwba[3] !== 1) {
|
||||
a = ', ' + hwba[3];
|
||||
}
|
||||
|
||||
return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';
|
||||
};
|
||||
|
||||
cs.to.keyword = function (rgb) {
|
||||
return reverseNames[rgb.slice(0, 3)];
|
||||
};
|
||||
|
||||
// helpers
|
||||
function clamp(num, min, max) {
|
||||
return Math.min(Math.max(min, num), max);
|
||||
}
|
||||
|
||||
function hexDouble(num) {
|
||||
var str = Math.round(num).toString(16).toUpperCase();
|
||||
return (str.length < 2) ? '0' + str : str;
|
||||
}
|
||||
39
backend/node_modules/color-string/package.json
generated
vendored
Normal file
39
backend/node_modules/color-string/package.json
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "color-string",
|
||||
"description": "Parser and generator for CSS color strings",
|
||||
"version": "1.9.1",
|
||||
"author": "Heather Arthur <fayearthur@gmail.com>",
|
||||
"contributors": [
|
||||
"Maxime Thirouin",
|
||||
"Dyma Ywanov <dfcreative@gmail.com>",
|
||||
"Josh Junon"
|
||||
],
|
||||
"repository": "Qix-/color-string",
|
||||
"scripts": {
|
||||
"pretest": "xo",
|
||||
"test": "node test/basic.js"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"xo": {
|
||||
"rules": {
|
||||
"no-cond-assign": 0,
|
||||
"operator-linebreak": 0
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"color-name": "^1.0.0",
|
||||
"simple-swizzle": "^0.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"xo": "^0.12.1"
|
||||
},
|
||||
"keywords": [
|
||||
"color",
|
||||
"colour",
|
||||
"rgb",
|
||||
"css"
|
||||
]
|
||||
}
|
||||
21
backend/node_modules/color/LICENSE
generated
vendored
Normal file
21
backend/node_modules/color/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 2012 Heather Arthur
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
123
backend/node_modules/color/README.md
generated
vendored
Normal file
123
backend/node_modules/color/README.md
generated
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
# color
|
||||
|
||||
> JavaScript library for immutable color conversion and manipulation with support for CSS color strings.
|
||||
|
||||
```js
|
||||
const color = Color('#7743CE').alpha(0.5).lighten(0.5);
|
||||
console.log(color.hsl().string()); // 'hsla(262, 59%, 81%, 0.5)'
|
||||
|
||||
console.log(color.cmyk().round().array()); // [ 16, 25, 0, 8, 0.5 ]
|
||||
|
||||
console.log(color.ansi256().object()); // { ansi256: 183, alpha: 0.5 }
|
||||
```
|
||||
|
||||
## Install
|
||||
```console
|
||||
$ npm install color
|
||||
```
|
||||
|
||||
## Usage
|
||||
```js
|
||||
const Color = require('color');
|
||||
```
|
||||
|
||||
### Constructors
|
||||
```js
|
||||
const color = Color('rgb(255, 255, 255)')
|
||||
const color = Color({r: 255, g: 255, b: 255})
|
||||
const color = Color.rgb(255, 255, 255)
|
||||
const color = Color.rgb([255, 255, 255])
|
||||
```
|
||||
|
||||
Set the values for individual channels with `alpha`, `red`, `green`, `blue`, `hue`, `saturationl` (hsl), `saturationv` (hsv), `lightness`, `whiteness`, `blackness`, `cyan`, `magenta`, `yellow`, `black`
|
||||
|
||||
String constructors are handled by [color-string](https://www.npmjs.com/package/color-string)
|
||||
|
||||
### Getters
|
||||
```js
|
||||
color.hsl();
|
||||
```
|
||||
Convert a color to a different space (`hsl()`, `cmyk()`, etc.).
|
||||
|
||||
```js
|
||||
color.object(); // {r: 255, g: 255, b: 255}
|
||||
```
|
||||
Get a hash of the color value. Reflects the color's current model (see above).
|
||||
|
||||
```js
|
||||
color.rgb().array() // [255, 255, 255]
|
||||
```
|
||||
Get an array of the values with `array()`. Reflects the color's current model (see above).
|
||||
|
||||
```js
|
||||
color.rgbNumber() // 16777215 (0xffffff)
|
||||
```
|
||||
Get the rgb number value.
|
||||
|
||||
```js
|
||||
color.hex() // #ffffff
|
||||
```
|
||||
Get the hex value. (**NOTE:** `.hex()` does not return alpha values; use `.hexa()` for an RGBA representation)
|
||||
|
||||
```js
|
||||
color.red() // 255
|
||||
```
|
||||
Get the value for an individual channel.
|
||||
|
||||
### CSS Strings
|
||||
```js
|
||||
color.hsl().string() // 'hsl(320, 50%, 100%)'
|
||||
```
|
||||
|
||||
Calling `.string()` with a number rounds the numbers to that decimal place. It defaults to 1.
|
||||
|
||||
### Luminosity
|
||||
```js
|
||||
color.luminosity(); // 0.412
|
||||
```
|
||||
The [WCAG luminosity](http://www.w3.org/TR/WCAG20/#relativeluminancedef) of the color. 0 is black, 1 is white.
|
||||
|
||||
```js
|
||||
color.contrast(Color("blue")) // 12
|
||||
```
|
||||
The [WCAG contrast ratio](http://www.w3.org/TR/WCAG20/#contrast-ratiodef) to another color, from 1 (same color) to 21 (contrast b/w white and black).
|
||||
|
||||
```js
|
||||
color.isLight(); // true
|
||||
color.isDark(); // false
|
||||
```
|
||||
Get whether the color is "light" or "dark", useful for deciding text color.
|
||||
|
||||
### Manipulation
|
||||
```js
|
||||
color.negate() // rgb(0, 100, 255) -> rgb(255, 155, 0)
|
||||
|
||||
color.lighten(0.5) // hsl(100, 50%, 50%) -> hsl(100, 50%, 75%)
|
||||
color.lighten(0.5) // hsl(100, 50%, 0) -> hsl(100, 50%, 0)
|
||||
color.darken(0.5) // hsl(100, 50%, 50%) -> hsl(100, 50%, 25%)
|
||||
color.darken(0.5) // hsl(100, 50%, 0) -> hsl(100, 50%, 0)
|
||||
|
||||
color.lightness(50) // hsl(100, 50%, 10%) -> hsl(100, 50%, 50%)
|
||||
|
||||
color.saturate(0.5) // hsl(100, 50%, 50%) -> hsl(100, 75%, 50%)
|
||||
color.desaturate(0.5) // hsl(100, 50%, 50%) -> hsl(100, 25%, 50%)
|
||||
color.grayscale() // #5CBF54 -> #969696
|
||||
|
||||
color.whiten(0.5) // hwb(100, 50%, 50%) -> hwb(100, 75%, 50%)
|
||||
color.blacken(0.5) // hwb(100, 50%, 50%) -> hwb(100, 50%, 75%)
|
||||
|
||||
color.fade(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 0.4)
|
||||
color.opaquer(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 1.0)
|
||||
|
||||
color.rotate(180) // hsl(60, 20%, 20%) -> hsl(240, 20%, 20%)
|
||||
color.rotate(-90) // hsl(60, 20%, 20%) -> hsl(330, 20%, 20%)
|
||||
|
||||
color.mix(Color("yellow")) // cyan -> rgb(128, 255, 128)
|
||||
color.mix(Color("yellow"), 0.3) // cyan -> rgb(77, 255, 179)
|
||||
|
||||
// chaining
|
||||
color.green(100).grayscale().lighten(0.6)
|
||||
```
|
||||
|
||||
## Propers
|
||||
The API was inspired by [color-js](https://github.com/brehaut/color-js). Manipulation functions by CSS tools like Sass, LESS, and Stylus.
|
||||
496
backend/node_modules/color/index.js
generated
vendored
Normal file
496
backend/node_modules/color/index.js
generated
vendored
Normal file
@@ -0,0 +1,496 @@
|
||||
const colorString = require('color-string');
|
||||
const convert = require('color-convert');
|
||||
|
||||
const skippedModels = [
|
||||
// To be honest, I don't really feel like keyword belongs in color convert, but eh.
|
||||
'keyword',
|
||||
|
||||
// Gray conflicts with some method names, and has its own method defined.
|
||||
'gray',
|
||||
|
||||
// Shouldn't really be in color-convert either...
|
||||
'hex',
|
||||
];
|
||||
|
||||
const hashedModelKeys = {};
|
||||
for (const model of Object.keys(convert)) {
|
||||
hashedModelKeys[[...convert[model].labels].sort().join('')] = model;
|
||||
}
|
||||
|
||||
const limiters = {};
|
||||
|
||||
function Color(object, model) {
|
||||
if (!(this instanceof Color)) {
|
||||
return new Color(object, model);
|
||||
}
|
||||
|
||||
if (model && model in skippedModels) {
|
||||
model = null;
|
||||
}
|
||||
|
||||
if (model && !(model in convert)) {
|
||||
throw new Error('Unknown model: ' + model);
|
||||
}
|
||||
|
||||
let i;
|
||||
let channels;
|
||||
|
||||
if (object == null) { // eslint-disable-line no-eq-null,eqeqeq
|
||||
this.model = 'rgb';
|
||||
this.color = [0, 0, 0];
|
||||
this.valpha = 1;
|
||||
} else if (object instanceof Color) {
|
||||
this.model = object.model;
|
||||
this.color = [...object.color];
|
||||
this.valpha = object.valpha;
|
||||
} else if (typeof object === 'string') {
|
||||
const result = colorString.get(object);
|
||||
if (result === null) {
|
||||
throw new Error('Unable to parse color from string: ' + object);
|
||||
}
|
||||
|
||||
this.model = result.model;
|
||||
channels = convert[this.model].channels;
|
||||
this.color = result.value.slice(0, channels);
|
||||
this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;
|
||||
} else if (object.length > 0) {
|
||||
this.model = model || 'rgb';
|
||||
channels = convert[this.model].channels;
|
||||
const newArray = Array.prototype.slice.call(object, 0, channels);
|
||||
this.color = zeroArray(newArray, channels);
|
||||
this.valpha = typeof object[channels] === 'number' ? object[channels] : 1;
|
||||
} else if (typeof object === 'number') {
|
||||
// This is always RGB - can be converted later on.
|
||||
this.model = 'rgb';
|
||||
this.color = [
|
||||
(object >> 16) & 0xFF,
|
||||
(object >> 8) & 0xFF,
|
||||
object & 0xFF,
|
||||
];
|
||||
this.valpha = 1;
|
||||
} else {
|
||||
this.valpha = 1;
|
||||
|
||||
const keys = Object.keys(object);
|
||||
if ('alpha' in object) {
|
||||
keys.splice(keys.indexOf('alpha'), 1);
|
||||
this.valpha = typeof object.alpha === 'number' ? object.alpha : 0;
|
||||
}
|
||||
|
||||
const hashedKeys = keys.sort().join('');
|
||||
if (!(hashedKeys in hashedModelKeys)) {
|
||||
throw new Error('Unable to parse color from object: ' + JSON.stringify(object));
|
||||
}
|
||||
|
||||
this.model = hashedModelKeys[hashedKeys];
|
||||
|
||||
const {labels} = convert[this.model];
|
||||
const color = [];
|
||||
for (i = 0; i < labels.length; i++) {
|
||||
color.push(object[labels[i]]);
|
||||
}
|
||||
|
||||
this.color = zeroArray(color);
|
||||
}
|
||||
|
||||
// Perform limitations (clamping, etc.)
|
||||
if (limiters[this.model]) {
|
||||
channels = convert[this.model].channels;
|
||||
for (i = 0; i < channels; i++) {
|
||||
const limit = limiters[this.model][i];
|
||||
if (limit) {
|
||||
this.color[i] = limit(this.color[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.valpha = Math.max(0, Math.min(1, this.valpha));
|
||||
|
||||
if (Object.freeze) {
|
||||
Object.freeze(this);
|
||||
}
|
||||
}
|
||||
|
||||
Color.prototype = {
|
||||
toString() {
|
||||
return this.string();
|
||||
},
|
||||
|
||||
toJSON() {
|
||||
return this[this.model]();
|
||||
},
|
||||
|
||||
string(places) {
|
||||
let self = this.model in colorString.to ? this : this.rgb();
|
||||
self = self.round(typeof places === 'number' ? places : 1);
|
||||
const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
|
||||
return colorString.to[self.model](args);
|
||||
},
|
||||
|
||||
percentString(places) {
|
||||
const self = this.rgb().round(typeof places === 'number' ? places : 1);
|
||||
const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
|
||||
return colorString.to.rgb.percent(args);
|
||||
},
|
||||
|
||||
array() {
|
||||
return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
|
||||
},
|
||||
|
||||
object() {
|
||||
const result = {};
|
||||
const {channels} = convert[this.model];
|
||||
const {labels} = convert[this.model];
|
||||
|
||||
for (let i = 0; i < channels; i++) {
|
||||
result[labels[i]] = this.color[i];
|
||||
}
|
||||
|
||||
if (this.valpha !== 1) {
|
||||
result.alpha = this.valpha;
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
unitArray() {
|
||||
const rgb = this.rgb().color;
|
||||
rgb[0] /= 255;
|
||||
rgb[1] /= 255;
|
||||
rgb[2] /= 255;
|
||||
|
||||
if (this.valpha !== 1) {
|
||||
rgb.push(this.valpha);
|
||||
}
|
||||
|
||||
return rgb;
|
||||
},
|
||||
|
||||
unitObject() {
|
||||
const rgb = this.rgb().object();
|
||||
rgb.r /= 255;
|
||||
rgb.g /= 255;
|
||||
rgb.b /= 255;
|
||||
|
||||
if (this.valpha !== 1) {
|
||||
rgb.alpha = this.valpha;
|
||||
}
|
||||
|
||||
return rgb;
|
||||
},
|
||||
|
||||
round(places) {
|
||||
places = Math.max(places || 0, 0);
|
||||
return new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);
|
||||
},
|
||||
|
||||
alpha(value) {
|
||||
if (value !== undefined) {
|
||||
return new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);
|
||||
}
|
||||
|
||||
return this.valpha;
|
||||
},
|
||||
|
||||
// Rgb
|
||||
red: getset('rgb', 0, maxfn(255)),
|
||||
green: getset('rgb', 1, maxfn(255)),
|
||||
blue: getset('rgb', 2, maxfn(255)),
|
||||
|
||||
hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360),
|
||||
|
||||
saturationl: getset('hsl', 1, maxfn(100)),
|
||||
lightness: getset('hsl', 2, maxfn(100)),
|
||||
|
||||
saturationv: getset('hsv', 1, maxfn(100)),
|
||||
value: getset('hsv', 2, maxfn(100)),
|
||||
|
||||
chroma: getset('hcg', 1, maxfn(100)),
|
||||
gray: getset('hcg', 2, maxfn(100)),
|
||||
|
||||
white: getset('hwb', 1, maxfn(100)),
|
||||
wblack: getset('hwb', 2, maxfn(100)),
|
||||
|
||||
cyan: getset('cmyk', 0, maxfn(100)),
|
||||
magenta: getset('cmyk', 1, maxfn(100)),
|
||||
yellow: getset('cmyk', 2, maxfn(100)),
|
||||
black: getset('cmyk', 3, maxfn(100)),
|
||||
|
||||
x: getset('xyz', 0, maxfn(95.047)),
|
||||
y: getset('xyz', 1, maxfn(100)),
|
||||
z: getset('xyz', 2, maxfn(108.833)),
|
||||
|
||||
l: getset('lab', 0, maxfn(100)),
|
||||
a: getset('lab', 1),
|
||||
b: getset('lab', 2),
|
||||
|
||||
keyword(value) {
|
||||
if (value !== undefined) {
|
||||
return new Color(value);
|
||||
}
|
||||
|
||||
return convert[this.model].keyword(this.color);
|
||||
},
|
||||
|
||||
hex(value) {
|
||||
if (value !== undefined) {
|
||||
return new Color(value);
|
||||
}
|
||||
|
||||
return colorString.to.hex(this.rgb().round().color);
|
||||
},
|
||||
|
||||
hexa(value) {
|
||||
if (value !== undefined) {
|
||||
return new Color(value);
|
||||
}
|
||||
|
||||
const rgbArray = this.rgb().round().color;
|
||||
|
||||
let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();
|
||||
if (alphaHex.length === 1) {
|
||||
alphaHex = '0' + alphaHex;
|
||||
}
|
||||
|
||||
return colorString.to.hex(rgbArray) + alphaHex;
|
||||
},
|
||||
|
||||
rgbNumber() {
|
||||
const rgb = this.rgb().color;
|
||||
return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);
|
||||
},
|
||||
|
||||
luminosity() {
|
||||
// http://www.w3.org/TR/WCAG20/#relativeluminancedef
|
||||
const rgb = this.rgb().color;
|
||||
|
||||
const lum = [];
|
||||
for (const [i, element] of rgb.entries()) {
|
||||
const chan = element / 255;
|
||||
lum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
|
||||
}
|
||||
|
||||
return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
|
||||
},
|
||||
|
||||
contrast(color2) {
|
||||
// http://www.w3.org/TR/WCAG20/#contrast-ratiodef
|
||||
const lum1 = this.luminosity();
|
||||
const lum2 = color2.luminosity();
|
||||
|
||||
if (lum1 > lum2) {
|
||||
return (lum1 + 0.05) / (lum2 + 0.05);
|
||||
}
|
||||
|
||||
return (lum2 + 0.05) / (lum1 + 0.05);
|
||||
},
|
||||
|
||||
level(color2) {
|
||||
// https://www.w3.org/TR/WCAG/#contrast-enhanced
|
||||
const contrastRatio = this.contrast(color2);
|
||||
if (contrastRatio >= 7) {
|
||||
return 'AAA';
|
||||
}
|
||||
|
||||
return (contrastRatio >= 4.5) ? 'AA' : '';
|
||||
},
|
||||
|
||||
isDark() {
|
||||
// YIQ equation from http://24ways.org/2010/calculating-color-contrast
|
||||
const rgb = this.rgb().color;
|
||||
const yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;
|
||||
return yiq < 128;
|
||||
},
|
||||
|
||||
isLight() {
|
||||
return !this.isDark();
|
||||
},
|
||||
|
||||
negate() {
|
||||
const rgb = this.rgb();
|
||||
for (let i = 0; i < 3; i++) {
|
||||
rgb.color[i] = 255 - rgb.color[i];
|
||||
}
|
||||
|
||||
return rgb;
|
||||
},
|
||||
|
||||
lighten(ratio) {
|
||||
const hsl = this.hsl();
|
||||
hsl.color[2] += hsl.color[2] * ratio;
|
||||
return hsl;
|
||||
},
|
||||
|
||||
darken(ratio) {
|
||||
const hsl = this.hsl();
|
||||
hsl.color[2] -= hsl.color[2] * ratio;
|
||||
return hsl;
|
||||
},
|
||||
|
||||
saturate(ratio) {
|
||||
const hsl = this.hsl();
|
||||
hsl.color[1] += hsl.color[1] * ratio;
|
||||
return hsl;
|
||||
},
|
||||
|
||||
desaturate(ratio) {
|
||||
const hsl = this.hsl();
|
||||
hsl.color[1] -= hsl.color[1] * ratio;
|
||||
return hsl;
|
||||
},
|
||||
|
||||
whiten(ratio) {
|
||||
const hwb = this.hwb();
|
||||
hwb.color[1] += hwb.color[1] * ratio;
|
||||
return hwb;
|
||||
},
|
||||
|
||||
blacken(ratio) {
|
||||
const hwb = this.hwb();
|
||||
hwb.color[2] += hwb.color[2] * ratio;
|
||||
return hwb;
|
||||
},
|
||||
|
||||
grayscale() {
|
||||
// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
|
||||
const rgb = this.rgb().color;
|
||||
const value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
|
||||
return Color.rgb(value, value, value);
|
||||
},
|
||||
|
||||
fade(ratio) {
|
||||
return this.alpha(this.valpha - (this.valpha * ratio));
|
||||
},
|
||||
|
||||
opaquer(ratio) {
|
||||
return this.alpha(this.valpha + (this.valpha * ratio));
|
||||
},
|
||||
|
||||
rotate(degrees) {
|
||||
const hsl = this.hsl();
|
||||
let hue = hsl.color[0];
|
||||
hue = (hue + degrees) % 360;
|
||||
hue = hue < 0 ? 360 + hue : hue;
|
||||
hsl.color[0] = hue;
|
||||
return hsl;
|
||||
},
|
||||
|
||||
mix(mixinColor, weight) {
|
||||
// Ported from sass implementation in C
|
||||
// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
|
||||
if (!mixinColor || !mixinColor.rgb) {
|
||||
throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor);
|
||||
}
|
||||
|
||||
const color1 = mixinColor.rgb();
|
||||
const color2 = this.rgb();
|
||||
const p = weight === undefined ? 0.5 : weight;
|
||||
|
||||
const w = 2 * p - 1;
|
||||
const a = color1.alpha() - color2.alpha();
|
||||
|
||||
const w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2;
|
||||
const w2 = 1 - w1;
|
||||
|
||||
return Color.rgb(
|
||||
w1 * color1.red() + w2 * color2.red(),
|
||||
w1 * color1.green() + w2 * color2.green(),
|
||||
w1 * color1.blue() + w2 * color2.blue(),
|
||||
color1.alpha() * p + color2.alpha() * (1 - p));
|
||||
},
|
||||
};
|
||||
|
||||
// Model conversion methods and static constructors
|
||||
for (const model of Object.keys(convert)) {
|
||||
if (skippedModels.includes(model)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const {channels} = convert[model];
|
||||
|
||||
// Conversion methods
|
||||
Color.prototype[model] = function (...args) {
|
||||
if (this.model === model) {
|
||||
return new Color(this);
|
||||
}
|
||||
|
||||
if (args.length > 0) {
|
||||
return new Color(args, model);
|
||||
}
|
||||
|
||||
return new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model);
|
||||
};
|
||||
|
||||
// 'static' construction methods
|
||||
Color[model] = function (...args) {
|
||||
let color = args[0];
|
||||
if (typeof color === 'number') {
|
||||
color = zeroArray(args, channels);
|
||||
}
|
||||
|
||||
return new Color(color, model);
|
||||
};
|
||||
}
|
||||
|
||||
function roundTo(number, places) {
|
||||
return Number(number.toFixed(places));
|
||||
}
|
||||
|
||||
function roundToPlace(places) {
|
||||
return function (number) {
|
||||
return roundTo(number, places);
|
||||
};
|
||||
}
|
||||
|
||||
function getset(model, channel, modifier) {
|
||||
model = Array.isArray(model) ? model : [model];
|
||||
|
||||
for (const m of model) {
|
||||
(limiters[m] || (limiters[m] = []))[channel] = modifier;
|
||||
}
|
||||
|
||||
model = model[0];
|
||||
|
||||
return function (value) {
|
||||
let result;
|
||||
|
||||
if (value !== undefined) {
|
||||
if (modifier) {
|
||||
value = modifier(value);
|
||||
}
|
||||
|
||||
result = this[model]();
|
||||
result.color[channel] = value;
|
||||
return result;
|
||||
}
|
||||
|
||||
result = this[model]().color[channel];
|
||||
if (modifier) {
|
||||
result = modifier(result);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
function maxfn(max) {
|
||||
return function (v) {
|
||||
return Math.max(0, Math.min(max, v));
|
||||
};
|
||||
}
|
||||
|
||||
function assertArray(value) {
|
||||
return Array.isArray(value) ? value : [value];
|
||||
}
|
||||
|
||||
function zeroArray(array, length) {
|
||||
for (let i = 0; i < length; i++) {
|
||||
if (typeof array[i] !== 'number') {
|
||||
array[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
|
||||
module.exports = Color;
|
||||
47
backend/node_modules/color/package.json
generated
vendored
Normal file
47
backend/node_modules/color/package.json
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "color",
|
||||
"version": "4.2.3",
|
||||
"description": "Color conversion and manipulation with CSS string support",
|
||||
"sideEffects": false,
|
||||
"keywords": [
|
||||
"color",
|
||||
"colour",
|
||||
"css"
|
||||
],
|
||||
"authors": [
|
||||
"Josh Junon <josh@junon.me>",
|
||||
"Heather Arthur <fayearthur@gmail.com>",
|
||||
"Maxime Thirouin"
|
||||
],
|
||||
"license": "MIT",
|
||||
"repository": "Qix-/color",
|
||||
"xo": {
|
||||
"rules": {
|
||||
"no-cond-assign": 0,
|
||||
"new-cap": 0,
|
||||
"unicorn/prefer-module": 0,
|
||||
"no-mixed-operators": 0,
|
||||
"complexity": 0,
|
||||
"unicorn/numeric-separators-style": 0
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"pretest": "xo",
|
||||
"test": "mocha"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1",
|
||||
"color-string": "^1.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "9.0.2",
|
||||
"xo": "0.42.0"
|
||||
}
|
||||
}
|
||||
22
backend/node_modules/decompress-response/index.d.ts
generated
vendored
Normal file
22
backend/node_modules/decompress-response/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/// <reference types="node"/>
|
||||
import {IncomingMessage} from 'http';
|
||||
|
||||
/**
|
||||
Decompress a HTTP response if needed.
|
||||
|
||||
@param response - The HTTP incoming stream with compressed data.
|
||||
@returns The decompressed HTTP response stream.
|
||||
|
||||
@example
|
||||
```
|
||||
import {http} from 'http';
|
||||
import decompressResponse = require('decompress-response');
|
||||
|
||||
http.get('https://sindresorhus.com', response => {
|
||||
response = decompressResponse(response);
|
||||
});
|
||||
```
|
||||
*/
|
||||
declare function decompressResponse(response: IncomingMessage): IncomingMessage;
|
||||
|
||||
export = decompressResponse;
|
||||
58
backend/node_modules/decompress-response/index.js
generated
vendored
Normal file
58
backend/node_modules/decompress-response/index.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
'use strict';
|
||||
const {Transform, PassThrough} = require('stream');
|
||||
const zlib = require('zlib');
|
||||
const mimicResponse = require('mimic-response');
|
||||
|
||||
module.exports = response => {
|
||||
const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase();
|
||||
|
||||
if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) {
|
||||
return response;
|
||||
}
|
||||
|
||||
// TODO: Remove this when targeting Node.js 12.
|
||||
const isBrotli = contentEncoding === 'br';
|
||||
if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') {
|
||||
response.destroy(new Error('Brotli is not supported on Node.js < 12'));
|
||||
return response;
|
||||
}
|
||||
|
||||
let isEmpty = true;
|
||||
|
||||
const checker = new Transform({
|
||||
transform(data, _encoding, callback) {
|
||||
isEmpty = false;
|
||||
|
||||
callback(null, data);
|
||||
},
|
||||
|
||||
flush(callback) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
|
||||
const finalStream = new PassThrough({
|
||||
autoDestroy: false,
|
||||
destroy(error, callback) {
|
||||
response.destroy();
|
||||
|
||||
callback(error);
|
||||
}
|
||||
});
|
||||
|
||||
const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip();
|
||||
|
||||
decompressStream.once('error', error => {
|
||||
if (isEmpty && !response.readable) {
|
||||
finalStream.end();
|
||||
return;
|
||||
}
|
||||
|
||||
finalStream.destroy(error);
|
||||
});
|
||||
|
||||
mimicResponse(response, finalStream);
|
||||
response.pipe(checker).pipe(decompressStream).pipe(finalStream);
|
||||
|
||||
return finalStream;
|
||||
};
|
||||
9
backend/node_modules/decompress-response/license
generated
vendored
Normal file
9
backend/node_modules/decompress-response/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
56
backend/node_modules/decompress-response/package.json
generated
vendored
Normal file
56
backend/node_modules/decompress-response/package.json
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"name": "decompress-response",
|
||||
"version": "6.0.0",
|
||||
"description": "Decompress a HTTP response if needed",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/decompress-response",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"decompress",
|
||||
"response",
|
||||
"http",
|
||||
"https",
|
||||
"zlib",
|
||||
"gzip",
|
||||
"zip",
|
||||
"deflate",
|
||||
"unzip",
|
||||
"ungzip",
|
||||
"incoming",
|
||||
"message",
|
||||
"stream",
|
||||
"compressed",
|
||||
"brotli"
|
||||
],
|
||||
"dependencies": {
|
||||
"mimic-response": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^14.0.1",
|
||||
"ava": "^2.2.0",
|
||||
"get-stream": "^5.0.0",
|
||||
"pify": "^5.0.0",
|
||||
"tsd": "^0.11.0",
|
||||
"xo": "^0.30.0"
|
||||
},
|
||||
"xo": {
|
||||
"rules": {
|
||||
"@typescript-eslint/prefer-readonly-parameter-types": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
48
backend/node_modules/decompress-response/readme.md
generated
vendored
Normal file
48
backend/node_modules/decompress-response/readme.md
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
# decompress-response [](https://travis-ci.com/sindresorhus/decompress-response)
|
||||
|
||||
> Decompress a HTTP response if needed
|
||||
|
||||
Decompresses the [response](https://nodejs.org/api/http.html#http_class_http_incomingmessage) from [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) if it's gzipped, deflated or compressed with Brotli, otherwise just passes it through.
|
||||
|
||||
Used by [`got`](https://github.com/sindresorhus/got).
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install decompress-response
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const http = require('http');
|
||||
const decompressResponse = require('decompress-response');
|
||||
|
||||
http.get('https://sindresorhus.com', response => {
|
||||
response = decompressResponse(response);
|
||||
});
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### decompressResponse(response)
|
||||
|
||||
Returns the decompressed HTTP response stream.
|
||||
|
||||
#### response
|
||||
|
||||
Type: [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
|
||||
|
||||
The HTTP incoming stream with compressed data.
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-decompress-response?utm_source=npm-decompress-response&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||
</b>
|
||||
<br>
|
||||
<sub>
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
||||
46
backend/node_modules/deep-extend/CHANGELOG.md
generated
vendored
Normal file
46
backend/node_modules/deep-extend/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
v0.6.0
|
||||
------
|
||||
|
||||
- Updated "devDependencies" versions to fix vulnerability alerts
|
||||
- Dropped support of io.js and node.js v0.12.x and lower since new versions of
|
||||
"devDependencies" couldn't work with those old node.js versions
|
||||
(minimal supported version of node.js now is v4.0.0)
|
||||
|
||||
v0.5.1
|
||||
------
|
||||
|
||||
- Fix prototype pollution vulnerability (thanks to @mwakerman for the PR)
|
||||
- Avoid using deprecated Buffer API (thanks to @ChALkeR for the PR)
|
||||
|
||||
v0.5.0
|
||||
------
|
||||
|
||||
- Auto-testing provided by Travis CI;
|
||||
- Support older Node.JS versions (`v0.11.x` and `v0.10.x`);
|
||||
- Removed tests files from npm package.
|
||||
|
||||
v0.4.2
|
||||
------
|
||||
|
||||
- Fix for `null` as an argument.
|
||||
|
||||
v0.4.1
|
||||
------
|
||||
|
||||
- Removed test code from <b>npm</b> package
|
||||
([see pull request #21](https://github.com/unclechu/node-deep-extend/pull/21));
|
||||
- Increased minimal version of Node from `0.4.0` to `0.12.0`
|
||||
(because can't run tests on lesser version anyway).
|
||||
|
||||
v0.4.0
|
||||
------
|
||||
|
||||
- **WARNING!** Broken backward compatibility with `v0.3.x`;
|
||||
- Fixed bug with extending arrays instead of cloning;
|
||||
- Deep cloning for arrays;
|
||||
- Check for own property;
|
||||
- Fixed some documentation issues;
|
||||
- Strict JS mode.
|
||||
20
backend/node_modules/deep-extend/LICENSE
generated
vendored
Normal file
20
backend/node_modules/deep-extend/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2018, Viacheslav Lotsmanov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
91
backend/node_modules/deep-extend/README.md
generated
vendored
Normal file
91
backend/node_modules/deep-extend/README.md
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
Deep Extend
|
||||
===========
|
||||
|
||||
Recursive object extending.
|
||||
|
||||
[](https://travis-ci.org/unclechu/node-deep-extend)
|
||||
|
||||
[](https://nodei.co/npm/deep-extend/)
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
```bash
|
||||
$ npm install deep-extend
|
||||
```
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
```javascript
|
||||
var deepExtend = require('deep-extend');
|
||||
var obj1 = {
|
||||
a: 1,
|
||||
b: 2,
|
||||
d: {
|
||||
a: 1,
|
||||
b: [],
|
||||
c: { test1: 123, test2: 321 }
|
||||
},
|
||||
f: 5,
|
||||
g: 123,
|
||||
i: 321,
|
||||
j: [1, 2]
|
||||
};
|
||||
var obj2 = {
|
||||
b: 3,
|
||||
c: 5,
|
||||
d: {
|
||||
b: { first: 'one', second: 'two' },
|
||||
c: { test2: 222 }
|
||||
},
|
||||
e: { one: 1, two: 2 },
|
||||
f: [],
|
||||
g: (void 0),
|
||||
h: /abc/g,
|
||||
i: null,
|
||||
j: [3, 4]
|
||||
};
|
||||
|
||||
deepExtend(obj1, obj2);
|
||||
|
||||
console.log(obj1);
|
||||
/*
|
||||
{ a: 1,
|
||||
b: 3,
|
||||
d:
|
||||
{ a: 1,
|
||||
b: { first: 'one', second: 'two' },
|
||||
c: { test1: 123, test2: 222 } },
|
||||
f: [],
|
||||
g: undefined,
|
||||
c: 5,
|
||||
e: { one: 1, two: 2 },
|
||||
h: /abc/g,
|
||||
i: null,
|
||||
j: [3, 4] }
|
||||
*/
|
||||
```
|
||||
|
||||
Unit testing
|
||||
------------
|
||||
|
||||
```bash
|
||||
$ npm test
|
||||
```
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
[CHANGELOG.md](./CHANGELOG.md)
|
||||
|
||||
Any issues?
|
||||
-----------
|
||||
|
||||
Please, report about issues
|
||||
[here](https://github.com/unclechu/node-deep-extend/issues).
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
[MIT](./LICENSE)
|
||||
1
backend/node_modules/deep-extend/index.js
generated
vendored
Normal file
1
backend/node_modules/deep-extend/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('./lib/deep-extend');
|
||||
150
backend/node_modules/deep-extend/lib/deep-extend.js
generated
vendored
Normal file
150
backend/node_modules/deep-extend/lib/deep-extend.js
generated
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
/*!
|
||||
* @description Recursive object extending
|
||||
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
||||
* @license MIT
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
function isSpecificValue(val) {
|
||||
return (
|
||||
val instanceof Buffer
|
||||
|| val instanceof Date
|
||||
|| val instanceof RegExp
|
||||
) ? true : false;
|
||||
}
|
||||
|
||||
function cloneSpecificValue(val) {
|
||||
if (val instanceof Buffer) {
|
||||
var x = Buffer.alloc
|
||||
? Buffer.alloc(val.length)
|
||||
: new Buffer(val.length);
|
||||
val.copy(x);
|
||||
return x;
|
||||
} else if (val instanceof Date) {
|
||||
return new Date(val.getTime());
|
||||
} else if (val instanceof RegExp) {
|
||||
return new RegExp(val);
|
||||
} else {
|
||||
throw new Error('Unexpected situation');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursive cloning array.
|
||||
*/
|
||||
function deepCloneArray(arr) {
|
||||
var clone = [];
|
||||
arr.forEach(function (item, index) {
|
||||
if (typeof item === 'object' && item !== null) {
|
||||
if (Array.isArray(item)) {
|
||||
clone[index] = deepCloneArray(item);
|
||||
} else if (isSpecificValue(item)) {
|
||||
clone[index] = cloneSpecificValue(item);
|
||||
} else {
|
||||
clone[index] = deepExtend({}, item);
|
||||
}
|
||||
} else {
|
||||
clone[index] = item;
|
||||
}
|
||||
});
|
||||
return clone;
|
||||
}
|
||||
|
||||
function safeGetProperty(object, property) {
|
||||
return property === '__proto__' ? undefined : object[property];
|
||||
}
|
||||
|
||||
/**
|
||||
* Extening object that entered in first argument.
|
||||
*
|
||||
* Returns extended object or false if have no target object or incorrect type.
|
||||
*
|
||||
* If you wish to clone source object (without modify it), just use empty new
|
||||
* object as first argument, like this:
|
||||
* deepExtend({}, yourObj_1, [yourObj_N]);
|
||||
*/
|
||||
var deepExtend = module.exports = function (/*obj_1, [obj_2], [obj_N]*/) {
|
||||
if (arguments.length < 1 || typeof arguments[0] !== 'object') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arguments.length < 2) {
|
||||
return arguments[0];
|
||||
}
|
||||
|
||||
var target = arguments[0];
|
||||
|
||||
// convert arguments to array and cut off target object
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
|
||||
var val, src, clone;
|
||||
|
||||
args.forEach(function (obj) {
|
||||
// skip argument if isn't an object, is null, or is an array
|
||||
if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Object.keys(obj).forEach(function (key) {
|
||||
src = safeGetProperty(target, key); // source value
|
||||
val = safeGetProperty(obj, key); // new value
|
||||
|
||||
// recursion prevention
|
||||
if (val === target) {
|
||||
return;
|
||||
|
||||
/**
|
||||
* if new value isn't object then just overwrite by new value
|
||||
* instead of extending.
|
||||
*/
|
||||
} else if (typeof val !== 'object' || val === null) {
|
||||
target[key] = val;
|
||||
return;
|
||||
|
||||
// just clone arrays (and recursive clone objects inside)
|
||||
} else if (Array.isArray(val)) {
|
||||
target[key] = deepCloneArray(val);
|
||||
return;
|
||||
|
||||
// custom cloning and overwrite for specific objects
|
||||
} else if (isSpecificValue(val)) {
|
||||
target[key] = cloneSpecificValue(val);
|
||||
return;
|
||||
|
||||
// overwrite by new value if source isn't object or array
|
||||
} else if (typeof src !== 'object' || src === null || Array.isArray(src)) {
|
||||
target[key] = deepExtend({}, val);
|
||||
return;
|
||||
|
||||
// source value and new value is objects both, extending...
|
||||
} else {
|
||||
target[key] = deepExtend(src, val);
|
||||
return;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return target;
|
||||
};
|
||||
62
backend/node_modules/deep-extend/package.json
generated
vendored
Normal file
62
backend/node_modules/deep-extend/package.json
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"name": "deep-extend",
|
||||
"description": "Recursive object extending",
|
||||
"license": "MIT",
|
||||
"version": "0.6.0",
|
||||
"homepage": "https://github.com/unclechu/node-deep-extend",
|
||||
"keywords": [
|
||||
"deep-extend",
|
||||
"extend",
|
||||
"deep",
|
||||
"recursive",
|
||||
"xtend",
|
||||
"clone",
|
||||
"merge",
|
||||
"json"
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "https://raw.githubusercontent.com/unclechu/node-deep-extend/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/unclechu/node-deep-extend.git"
|
||||
},
|
||||
"author": "Viacheslav Lotsmanov <lotsmanov89@gmail.com>",
|
||||
"bugs": "https://github.com/unclechu/node-deep-extend/issues",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Romain Prieto",
|
||||
"url": "https://github.com/rprieto"
|
||||
},
|
||||
{
|
||||
"name": "Max Maximov",
|
||||
"url": "https://github.com/maxmaximov"
|
||||
},
|
||||
{
|
||||
"name": "Marshall Bowers",
|
||||
"url": "https://github.com/maxdeviant"
|
||||
},
|
||||
{
|
||||
"name": "Misha Wakerman",
|
||||
"url": "https://github.com/mwakerman"
|
||||
}
|
||||
],
|
||||
"main": "lib/deep-extend.js",
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "./node_modules/.bin/mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "5.2.0",
|
||||
"should": "13.2.1"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"lib/"
|
||||
]
|
||||
}
|
||||
6
backend/node_modules/expand-template/.travis.yml
generated
vendored
Normal file
6
backend/node_modules/expand-template/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- 6
|
||||
- 8
|
||||
- 10
|
||||
21
backend/node_modules/expand-template/LICENSE
generated
vendored
Normal file
21
backend/node_modules/expand-template/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 Lars-Magnus Skog
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
43
backend/node_modules/expand-template/README.md
generated
vendored
Normal file
43
backend/node_modules/expand-template/README.md
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# expand-template
|
||||
|
||||
> Expand placeholders in a template string.
|
||||
|
||||
[](https://www.npmjs.com/package/expand-template)
|
||||

|
||||
[](https://travis-ci.org/ralphtheninja/expand-template)
|
||||
[](https://standardjs.com)
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm i expand-template -S
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Default functionality expands templates using `{}` as separators for string placeholders.
|
||||
|
||||
```js
|
||||
var expand = require('expand-template')()
|
||||
var template = '{foo}/{foo}/{bar}/{bar}'
|
||||
console.log(expand(template, {
|
||||
foo: 'BAR',
|
||||
bar: 'FOO'
|
||||
}))
|
||||
// -> BAR/BAR/FOO/FOO
|
||||
```
|
||||
|
||||
Custom separators:
|
||||
|
||||
```js
|
||||
var expand = require('expand-template')({ sep: '[]' })
|
||||
var template = '[foo]/[foo]/[bar]/[bar]'
|
||||
console.log(expand(template, {
|
||||
foo: 'BAR',
|
||||
bar: 'FOO'
|
||||
}))
|
||||
// -> BAR/BAR/FOO/FOO
|
||||
```
|
||||
|
||||
## License
|
||||
All code, unless stated otherwise, is dual-licensed under [`WTFPL`](http://www.wtfpl.net/txt/copying/) and [`MIT`](https://opensource.org/licenses/MIT).
|
||||
26
backend/node_modules/expand-template/index.js
generated
vendored
Normal file
26
backend/node_modules/expand-template/index.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
module.exports = function (opts) {
|
||||
var sep = opts ? opts.sep : '{}'
|
||||
var len = sep.length
|
||||
|
||||
var whitespace = '\\s*'
|
||||
var left = escape(sep.substring(0, len / 2)) + whitespace
|
||||
var right = whitespace + escape(sep.substring(len / 2, len))
|
||||
|
||||
return function (template, values) {
|
||||
Object.keys(values).forEach(function (key) {
|
||||
var value = String(values[key]).replace(/\$/g, '$$$$')
|
||||
template = template.replace(regExp(key), value)
|
||||
})
|
||||
return template
|
||||
}
|
||||
|
||||
function escape (s) {
|
||||
return [].map.call(s, function (char) {
|
||||
return '\\' + char
|
||||
}).join('')
|
||||
}
|
||||
|
||||
function regExp (key) {
|
||||
return new RegExp(left + key + right, 'g')
|
||||
}
|
||||
}
|
||||
29
backend/node_modules/expand-template/package.json
generated
vendored
Normal file
29
backend/node_modules/expand-template/package.json
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "expand-template",
|
||||
"version": "2.0.3",
|
||||
"description": "Expand placeholders in a template string",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ralphtheninja/expand-template.git"
|
||||
},
|
||||
"homepage": "https://github.com/ralphtheninja/expand-template",
|
||||
"scripts": {
|
||||
"test": "tape test.js && standard"
|
||||
},
|
||||
"keywords": [
|
||||
"template",
|
||||
"expand",
|
||||
"replace"
|
||||
],
|
||||
"author": "LM <ralphtheninja@riseup.net>",
|
||||
"license": "(MIT OR WTFPL)",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"standard": "^12.0.0",
|
||||
"tape": "^4.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
}
|
||||
67
backend/node_modules/expand-template/test.js
generated
vendored
Normal file
67
backend/node_modules/expand-template/test.js
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
var test = require('tape')
|
||||
var Expand = require('./')
|
||||
|
||||
test('default expands {} placeholders', function (t) {
|
||||
var expand = Expand()
|
||||
t.equal(typeof expand, 'function', 'is a function')
|
||||
t.equal(expand('{foo}/{bar}', {
|
||||
foo: 'BAR', bar: 'FOO'
|
||||
}), 'BAR/FOO')
|
||||
t.equal(expand('{foo}{foo}{foo}', {
|
||||
foo: 'FOO'
|
||||
}), 'FOOFOOFOO', 'expands one placeholder many times')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('support for custom separators', function (t) {
|
||||
var expand = Expand({ sep: '[]' })
|
||||
t.equal(expand('[foo]/[bar]', {
|
||||
foo: 'BAR', bar: 'FOO'
|
||||
}), 'BAR/FOO')
|
||||
t.equal(expand('[foo][foo][foo]', {
|
||||
foo: 'FOO'
|
||||
}), 'FOOFOOFOO', 'expands one placeholder many times')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('support for longer custom separators', function (t) {
|
||||
var expand = Expand({ sep: '[[]]' })
|
||||
t.equal(expand('[[foo]]/[[bar]]', {
|
||||
foo: 'BAR', bar: 'FOO'
|
||||
}), 'BAR/FOO')
|
||||
t.equal(expand('[[foo]][[foo]][[foo]]', {
|
||||
foo: 'FOO'
|
||||
}), 'FOOFOOFOO', 'expands one placeholder many times')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('whitespace-insensitive', function (t) {
|
||||
var expand = Expand({ sep: '[]' })
|
||||
t.equal(expand('[ foo ]/[ bar ]', {
|
||||
foo: 'BAR', bar: 'FOO'
|
||||
}), 'BAR/FOO')
|
||||
t.equal(expand('[ foo ][ foo ][ foo]', {
|
||||
foo: 'FOO'
|
||||
}), 'FOOFOOFOO', 'expands one placeholder many times')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('dollar escape', function (t) {
|
||||
var expand = Expand()
|
||||
t.equal(expand('before {foo} after', {
|
||||
foo: '$'
|
||||
}), 'before $ after')
|
||||
t.equal(expand('before {foo} after', {
|
||||
foo: '$&'
|
||||
}), 'before $& after')
|
||||
t.equal(expand('before {foo} after', {
|
||||
foo: '$`'
|
||||
}), 'before $` after')
|
||||
t.equal(expand('before {foo} after', {
|
||||
foo: '$\''
|
||||
}), 'before $\' after')
|
||||
t.equal(expand('before {foo} after', {
|
||||
foo: '$0'
|
||||
}), 'before $0 after')
|
||||
t.end()
|
||||
})
|
||||
21
backend/node_modules/fs-constants/LICENSE
generated
vendored
Normal file
21
backend/node_modules/fs-constants/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 Mathias Buus
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
26
backend/node_modules/fs-constants/README.md
generated
vendored
Normal file
26
backend/node_modules/fs-constants/README.md
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# fs-constants
|
||||
|
||||
Small module that allows you to get the fs constants across
|
||||
Node and the browser.
|
||||
|
||||
```
|
||||
npm install fs-constants
|
||||
```
|
||||
|
||||
Previously you would use `require('constants')` for this in node but that has been
|
||||
deprecated and changed to `require('fs').constants` which does not browserify.
|
||||
|
||||
This module uses `require('constants')` in the browser and `require('fs').constants` in node to work around this
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
``` js
|
||||
var constants = require('fs-constants')
|
||||
|
||||
console.log('constants:', constants)
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
1
backend/node_modules/fs-constants/browser.js
generated
vendored
Normal file
1
backend/node_modules/fs-constants/browser.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('constants')
|
||||
1
backend/node_modules/fs-constants/index.js
generated
vendored
Normal file
1
backend/node_modules/fs-constants/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('fs').constants || require('constants')
|
||||
19
backend/node_modules/fs-constants/package.json
generated
vendored
Normal file
19
backend/node_modules/fs-constants/package.json
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "fs-constants",
|
||||
"version": "1.0.0",
|
||||
"description": "Require constants across node and the browser",
|
||||
"main": "index.js",
|
||||
"browser": "browser.js",
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mafintosh/fs-constants.git"
|
||||
},
|
||||
"author": "Mathias Buus (@mafintosh)",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/mafintosh/fs-constants/issues"
|
||||
},
|
||||
"homepage": "https://github.com/mafintosh/fs-constants"
|
||||
}
|
||||
4
backend/node_modules/github-from-package/.travis.yml
generated
vendored
Normal file
4
backend/node_modules/github-from-package/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.6
|
||||
- 0.8
|
||||
18
backend/node_modules/github-from-package/LICENSE
generated
vendored
Normal file
18
backend/node_modules/github-from-package/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
This software is released under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
8
backend/node_modules/github-from-package/example/package.json
generated
vendored
Normal file
8
backend/node_modules/github-from-package/example/package.json
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "beep-boop",
|
||||
"version": "1.2.3",
|
||||
"repository" : {
|
||||
"type" : "git",
|
||||
"url": "git@github.com:substack/beep-boop.git"
|
||||
}
|
||||
}
|
||||
3
backend/node_modules/github-from-package/example/url.js
generated
vendored
Normal file
3
backend/node_modules/github-from-package/example/url.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
var github = require('../');
|
||||
var url = github(require('./package.json'));
|
||||
console.log(url);
|
||||
17
backend/node_modules/github-from-package/index.js
generated
vendored
Normal file
17
backend/node_modules/github-from-package/index.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
module.exports = function (pkg) {
|
||||
var m;
|
||||
if (m = match(JSON.stringify(pkg.repository))) {
|
||||
return m;
|
||||
}
|
||||
else if (m = match(JSON.stringify(pkg))) {
|
||||
return m;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
function match (str) {
|
||||
var m = /\bgithub.com[:\/]([^\/"]+)\/([^\/"]+)/.exec(str);
|
||||
if (m) {
|
||||
return 'https://github.com/' + m[1] + '/' + m[2].replace(/\.git$/, '');
|
||||
}
|
||||
}
|
||||
30
backend/node_modules/github-from-package/package.json
generated
vendored
Normal file
30
backend/node_modules/github-from-package/package.json
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name" : "github-from-package",
|
||||
"version" : "0.0.0",
|
||||
"description" : "return the github url from a package.json file",
|
||||
"main" : "index.js",
|
||||
"devDependencies" : {
|
||||
"tap" : "~0.3.0",
|
||||
"tape" : "~0.1.5"
|
||||
},
|
||||
"scripts" : {
|
||||
"test" : "tap test/*.js"
|
||||
},
|
||||
"repository" : {
|
||||
"type" : "git",
|
||||
"url" : "git://github.com/substack/github-from-package.git"
|
||||
},
|
||||
"homepage" : "https://github.com/substack/github-from-package",
|
||||
"keywords" : [
|
||||
"github",
|
||||
"package.json",
|
||||
"npm",
|
||||
"repository"
|
||||
],
|
||||
"author" : {
|
||||
"name" : "James Halliday",
|
||||
"email" : "mail@substack.net",
|
||||
"url" : "http://substack.net"
|
||||
},
|
||||
"license" : "MIT"
|
||||
}
|
||||
53
backend/node_modules/github-from-package/readme.markdown
generated
vendored
Normal file
53
backend/node_modules/github-from-package/readme.markdown
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# github-from-package
|
||||
|
||||
return the github url from a package.json file
|
||||
|
||||
[](http://travis-ci.org/substack/github-from-package)
|
||||
|
||||
# example
|
||||
|
||||
For the `./package.json` file:
|
||||
|
||||
``` json
|
||||
{
|
||||
"name": "beep-boop",
|
||||
"version": "1.2.3",
|
||||
"repository" : {
|
||||
"type" : "git",
|
||||
"url": "git@github.com:substack/beep-boop.git"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
``` js
|
||||
var github = require('github-from-package');
|
||||
var url = github(require('./package.json'));
|
||||
console.log(url);
|
||||
```
|
||||
|
||||
```
|
||||
https://github.com/substack/beep-boop
|
||||
```
|
||||
|
||||
# methods
|
||||
|
||||
``` js
|
||||
var github = require('github-from-package')
|
||||
```
|
||||
|
||||
## var url = github(pkg)
|
||||
|
||||
Return the most likely github url from the package.json contents `pkg`. If no
|
||||
github url can be determined, return `undefined`.
|
||||
|
||||
# install
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```
|
||||
npm install github-from-package
|
||||
```
|
||||
|
||||
# license
|
||||
|
||||
MIT
|
||||
8
backend/node_modules/github-from-package/test/a.json
generated
vendored
Normal file
8
backend/node_modules/github-from-package/test/a.json
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "beep-boop",
|
||||
"version": "1.2.3",
|
||||
"repository" : {
|
||||
"type" : "git",
|
||||
"url": "git@github.com:substack/beep-boop.git"
|
||||
}
|
||||
}
|
||||
5
backend/node_modules/github-from-package/test/b.json
generated
vendored
Normal file
5
backend/node_modules/github-from-package/test/b.json
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "beep-boop",
|
||||
"version": "1.2.3",
|
||||
"repository" : "git@github.com:substack/beep-boop.git"
|
||||
}
|
||||
5
backend/node_modules/github-from-package/test/c.json
generated
vendored
Normal file
5
backend/node_modules/github-from-package/test/c.json
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "beep-boop",
|
||||
"version": "1.2.3",
|
||||
"repository" : "https://github.com/substack/beep-boop.git"
|
||||
}
|
||||
7
backend/node_modules/github-from-package/test/d.json
generated
vendored
Normal file
7
backend/node_modules/github-from-package/test/d.json
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "beep-boop",
|
||||
"version": "1.2.3",
|
||||
"repository" : {
|
||||
"url": "https://github.com/substack/beep-boop"
|
||||
}
|
||||
}
|
||||
5
backend/node_modules/github-from-package/test/e.json
generated
vendored
Normal file
5
backend/node_modules/github-from-package/test/e.json
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "beep-boop",
|
||||
"version": "1.2.3",
|
||||
"homepage": "https://github.com/substack/beep-boop/issues"
|
||||
}
|
||||
19
backend/node_modules/github-from-package/test/url.js
generated
vendored
Normal file
19
backend/node_modules/github-from-package/test/url.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
var test = require('tape');
|
||||
var github = require('../');
|
||||
var packages = {
|
||||
a : require('./a.json'),
|
||||
b : require('./b.json'),
|
||||
c : require('./c.json'),
|
||||
d : require('./d.json'),
|
||||
e : require('./e.json')
|
||||
};
|
||||
|
||||
test(function (t) {
|
||||
t.plan(5);
|
||||
var url = 'https://github.com/substack/beep-boop';
|
||||
t.equal(url, github(packages.a), 'a.json comparison');
|
||||
t.equal(url, github(packages.b), 'b.json comparison');
|
||||
t.equal(url, github(packages.c), 'c.json comparison');
|
||||
t.equal(url, github(packages.d), 'd.json comparison');
|
||||
t.equal(url, github(packages.e), 'e.json comparison');
|
||||
});
|
||||
15
backend/node_modules/ini/LICENSE
generated
vendored
Normal file
15
backend/node_modules/ini/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
102
backend/node_modules/ini/README.md
generated
vendored
Normal file
102
backend/node_modules/ini/README.md
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
An ini format parser and serializer for node.
|
||||
|
||||
Sections are treated as nested objects. Items before the first
|
||||
heading are saved on the object directly.
|
||||
|
||||
## Usage
|
||||
|
||||
Consider an ini-file `config.ini` that looks like this:
|
||||
|
||||
; this comment is being ignored
|
||||
scope = global
|
||||
|
||||
[database]
|
||||
user = dbuser
|
||||
password = dbpassword
|
||||
database = use_this_database
|
||||
|
||||
[paths.default]
|
||||
datadir = /var/lib/data
|
||||
array[] = first value
|
||||
array[] = second value
|
||||
array[] = third value
|
||||
|
||||
You can read, manipulate and write the ini-file like so:
|
||||
|
||||
var fs = require('fs')
|
||||
, ini = require('ini')
|
||||
|
||||
var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'))
|
||||
|
||||
config.scope = 'local'
|
||||
config.database.database = 'use_another_database'
|
||||
config.paths.default.tmpdir = '/tmp'
|
||||
delete config.paths.default.datadir
|
||||
config.paths.default.array.push('fourth value')
|
||||
|
||||
fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' }))
|
||||
|
||||
This will result in a file called `config_modified.ini` being written
|
||||
to the filesystem with the following content:
|
||||
|
||||
[section]
|
||||
scope=local
|
||||
[section.database]
|
||||
user=dbuser
|
||||
password=dbpassword
|
||||
database=use_another_database
|
||||
[section.paths.default]
|
||||
tmpdir=/tmp
|
||||
array[]=first value
|
||||
array[]=second value
|
||||
array[]=third value
|
||||
array[]=fourth value
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### decode(inistring)
|
||||
|
||||
Decode the ini-style formatted `inistring` into a nested object.
|
||||
|
||||
### parse(inistring)
|
||||
|
||||
Alias for `decode(inistring)`
|
||||
|
||||
### encode(object, [options])
|
||||
|
||||
Encode the object `object` into an ini-style formatted string. If the
|
||||
optional parameter `section` is given, then all top-level properties
|
||||
of the object are put into this section and the `section`-string is
|
||||
prepended to all sub-sections, see the usage example above.
|
||||
|
||||
The `options` object may contain the following:
|
||||
|
||||
* `section` A string which will be the first `section` in the encoded
|
||||
ini data. Defaults to none.
|
||||
* `whitespace` Boolean to specify whether to put whitespace around the
|
||||
`=` character. By default, whitespace is omitted, to be friendly to
|
||||
some persnickety old parsers that don't tolerate it well. But some
|
||||
find that it's more human-readable and pretty with the whitespace.
|
||||
|
||||
For backwards compatibility reasons, if a `string` options is passed
|
||||
in, then it is assumed to be the `section` value.
|
||||
|
||||
### stringify(object, [options])
|
||||
|
||||
Alias for `encode(object, [options])`
|
||||
|
||||
### safe(val)
|
||||
|
||||
Escapes the string `val` such that it is safe to be used as a key or
|
||||
value in an ini-file. Basically escapes quotes. For example
|
||||
|
||||
ini.safe('"unsafe string"')
|
||||
|
||||
would result in
|
||||
|
||||
"\"unsafe string\""
|
||||
|
||||
### unsafe(val)
|
||||
|
||||
Unescapes the string `val`
|
||||
206
backend/node_modules/ini/ini.js
generated
vendored
Normal file
206
backend/node_modules/ini/ini.js
generated
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
exports.parse = exports.decode = decode
|
||||
|
||||
exports.stringify = exports.encode = encode
|
||||
|
||||
exports.safe = safe
|
||||
exports.unsafe = unsafe
|
||||
|
||||
var eol = typeof process !== 'undefined' &&
|
||||
process.platform === 'win32' ? '\r\n' : '\n'
|
||||
|
||||
function encode (obj, opt) {
|
||||
var children = []
|
||||
var out = ''
|
||||
|
||||
if (typeof opt === 'string') {
|
||||
opt = {
|
||||
section: opt,
|
||||
whitespace: false,
|
||||
}
|
||||
} else {
|
||||
opt = opt || {}
|
||||
opt.whitespace = opt.whitespace === true
|
||||
}
|
||||
|
||||
var separator = opt.whitespace ? ' = ' : '='
|
||||
|
||||
Object.keys(obj).forEach(function (k, _, __) {
|
||||
var val = obj[k]
|
||||
if (val && Array.isArray(val)) {
|
||||
val.forEach(function (item) {
|
||||
out += safe(k + '[]') + separator + safe(item) + '\n'
|
||||
})
|
||||
} else if (val && typeof val === 'object')
|
||||
children.push(k)
|
||||
else
|
||||
out += safe(k) + separator + safe(val) + eol
|
||||
})
|
||||
|
||||
if (opt.section && out.length)
|
||||
out = '[' + safe(opt.section) + ']' + eol + out
|
||||
|
||||
children.forEach(function (k, _, __) {
|
||||
var nk = dotSplit(k).join('\\.')
|
||||
var section = (opt.section ? opt.section + '.' : '') + nk
|
||||
var child = encode(obj[k], {
|
||||
section: section,
|
||||
whitespace: opt.whitespace,
|
||||
})
|
||||
if (out.length && child.length)
|
||||
out += eol
|
||||
|
||||
out += child
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
|
||||
function dotSplit (str) {
|
||||
return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002')
|
||||
.replace(/\\\./g, '\u0001')
|
||||
.split(/\./).map(function (part) {
|
||||
return part.replace(/\1/g, '\\.')
|
||||
.replace(/\2LITERAL\\1LITERAL\2/g, '\u0001')
|
||||
})
|
||||
}
|
||||
|
||||
function decode (str) {
|
||||
var out = {}
|
||||
var p = out
|
||||
var section = null
|
||||
// section |key = value
|
||||
var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i
|
||||
var lines = str.split(/[\r\n]+/g)
|
||||
|
||||
lines.forEach(function (line, _, __) {
|
||||
if (!line || line.match(/^\s*[;#]/))
|
||||
return
|
||||
var match = line.match(re)
|
||||
if (!match)
|
||||
return
|
||||
if (match[1] !== undefined) {
|
||||
section = unsafe(match[1])
|
||||
if (section === '__proto__') {
|
||||
// not allowed
|
||||
// keep parsing the section, but don't attach it.
|
||||
p = {}
|
||||
return
|
||||
}
|
||||
p = out[section] = out[section] || {}
|
||||
return
|
||||
}
|
||||
var key = unsafe(match[2])
|
||||
if (key === '__proto__')
|
||||
return
|
||||
var value = match[3] ? unsafe(match[4]) : true
|
||||
switch (value) {
|
||||
case 'true':
|
||||
case 'false':
|
||||
case 'null': value = JSON.parse(value)
|
||||
}
|
||||
|
||||
// Convert keys with '[]' suffix to an array
|
||||
if (key.length > 2 && key.slice(-2) === '[]') {
|
||||
key = key.substring(0, key.length - 2)
|
||||
if (key === '__proto__')
|
||||
return
|
||||
if (!p[key])
|
||||
p[key] = []
|
||||
else if (!Array.isArray(p[key]))
|
||||
p[key] = [p[key]]
|
||||
}
|
||||
|
||||
// safeguard against resetting a previously defined
|
||||
// array by accidentally forgetting the brackets
|
||||
if (Array.isArray(p[key]))
|
||||
p[key].push(value)
|
||||
else
|
||||
p[key] = value
|
||||
})
|
||||
|
||||
// {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}}
|
||||
// use a filter to return the keys that have to be deleted.
|
||||
Object.keys(out).filter(function (k, _, __) {
|
||||
if (!out[k] ||
|
||||
typeof out[k] !== 'object' ||
|
||||
Array.isArray(out[k]))
|
||||
return false
|
||||
|
||||
// see if the parent section is also an object.
|
||||
// if so, add it to that, and mark this one for deletion
|
||||
var parts = dotSplit(k)
|
||||
var p = out
|
||||
var l = parts.pop()
|
||||
var nl = l.replace(/\\\./g, '.')
|
||||
parts.forEach(function (part, _, __) {
|
||||
if (part === '__proto__')
|
||||
return
|
||||
if (!p[part] || typeof p[part] !== 'object')
|
||||
p[part] = {}
|
||||
p = p[part]
|
||||
})
|
||||
if (p === out && nl === l)
|
||||
return false
|
||||
|
||||
p[nl] = out[k]
|
||||
return true
|
||||
}).forEach(function (del, _, __) {
|
||||
delete out[del]
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
|
||||
function isQuoted (val) {
|
||||
return (val.charAt(0) === '"' && val.slice(-1) === '"') ||
|
||||
(val.charAt(0) === "'" && val.slice(-1) === "'")
|
||||
}
|
||||
|
||||
function safe (val) {
|
||||
return (typeof val !== 'string' ||
|
||||
val.match(/[=\r\n]/) ||
|
||||
val.match(/^\[/) ||
|
||||
(val.length > 1 &&
|
||||
isQuoted(val)) ||
|
||||
val !== val.trim())
|
||||
? JSON.stringify(val)
|
||||
: val.replace(/;/g, '\\;').replace(/#/g, '\\#')
|
||||
}
|
||||
|
||||
function unsafe (val, doUnesc) {
|
||||
val = (val || '').trim()
|
||||
if (isQuoted(val)) {
|
||||
// remove the single quotes before calling JSON.parse
|
||||
if (val.charAt(0) === "'")
|
||||
val = val.substr(1, val.length - 2)
|
||||
|
||||
try {
|
||||
val = JSON.parse(val)
|
||||
} catch (_) {}
|
||||
} else {
|
||||
// walk the val to find the first not-escaped ; character
|
||||
var esc = false
|
||||
var unesc = ''
|
||||
for (var i = 0, l = val.length; i < l; i++) {
|
||||
var c = val.charAt(i)
|
||||
if (esc) {
|
||||
if ('\\;#'.indexOf(c) !== -1)
|
||||
unesc += c
|
||||
else
|
||||
unesc += '\\' + c
|
||||
|
||||
esc = false
|
||||
} else if (';#'.indexOf(c) !== -1)
|
||||
break
|
||||
else if (c === '\\')
|
||||
esc = true
|
||||
else
|
||||
unesc += c
|
||||
}
|
||||
if (esc)
|
||||
unesc += '\\'
|
||||
|
||||
return unesc.trim()
|
||||
}
|
||||
return val
|
||||
}
|
||||
33
backend/node_modules/ini/package.json
generated
vendored
Normal file
33
backend/node_modules/ini/package.json
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
|
||||
"name": "ini",
|
||||
"description": "An ini encoder/decoder for node",
|
||||
"version": "1.3.8",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/isaacs/ini.git"
|
||||
},
|
||||
"main": "ini.js",
|
||||
"scripts": {
|
||||
"eslint": "eslint",
|
||||
"lint": "npm run eslint -- ini.js test/*.js",
|
||||
"lintfix": "npm run lint -- --fix",
|
||||
"test": "tap",
|
||||
"posttest": "npm run lint",
|
||||
"preversion": "npm test",
|
||||
"postversion": "npm publish",
|
||||
"prepublishOnly": "git push origin --follow-tags"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.9.0",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
"eslint-plugin-standard": "^4.0.1",
|
||||
"tap": "14"
|
||||
},
|
||||
"license": "ISC",
|
||||
"files": [
|
||||
"ini.js"
|
||||
]
|
||||
}
|
||||
17
backend/node_modules/mimic-response/index.d.ts
generated
vendored
Normal file
17
backend/node_modules/mimic-response/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import {IncomingMessage} from 'http';
|
||||
|
||||
/**
|
||||
Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
|
||||
|
||||
Makes `toStream` include the properties from `fromStream`.
|
||||
|
||||
@param fromStream - The stream to copy the properties from.
|
||||
@param toStream - The stream to copy the properties to.
|
||||
@return The same object as `toStream`.
|
||||
*/
|
||||
declare function mimicResponse<T extends NodeJS.ReadableStream>(
|
||||
fromStream: IncomingMessage, // eslint-disable-line @typescript-eslint/prefer-readonly-parameter-types
|
||||
toStream: T,
|
||||
): T & IncomingMessage;
|
||||
|
||||
export = mimicResponse;
|
||||
77
backend/node_modules/mimic-response/index.js
generated
vendored
Normal file
77
backend/node_modules/mimic-response/index.js
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
'use strict';
|
||||
|
||||
// We define these manually to ensure they're always copied
|
||||
// even if they would move up the prototype chain
|
||||
// https://nodejs.org/api/http.html#http_class_http_incomingmessage
|
||||
const knownProperties = [
|
||||
'aborted',
|
||||
'complete',
|
||||
'headers',
|
||||
'httpVersion',
|
||||
'httpVersionMinor',
|
||||
'httpVersionMajor',
|
||||
'method',
|
||||
'rawHeaders',
|
||||
'rawTrailers',
|
||||
'setTimeout',
|
||||
'socket',
|
||||
'statusCode',
|
||||
'statusMessage',
|
||||
'trailers',
|
||||
'url'
|
||||
];
|
||||
|
||||
module.exports = (fromStream, toStream) => {
|
||||
if (toStream._readableState.autoDestroy) {
|
||||
throw new Error('The second stream must have the `autoDestroy` option set to `false`');
|
||||
}
|
||||
|
||||
const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties));
|
||||
|
||||
const properties = {};
|
||||
|
||||
for (const property of fromProperties) {
|
||||
// Don't overwrite existing properties.
|
||||
if (property in toStream) {
|
||||
continue;
|
||||
}
|
||||
|
||||
properties[property] = {
|
||||
get() {
|
||||
const value = fromStream[property];
|
||||
const isFunction = typeof value === 'function';
|
||||
|
||||
return isFunction ? value.bind(fromStream) : value;
|
||||
},
|
||||
set(value) {
|
||||
fromStream[property] = value;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: false
|
||||
};
|
||||
}
|
||||
|
||||
Object.defineProperties(toStream, properties);
|
||||
|
||||
fromStream.once('aborted', () => {
|
||||
toStream.destroy();
|
||||
|
||||
toStream.emit('aborted');
|
||||
});
|
||||
|
||||
fromStream.once('close', () => {
|
||||
if (fromStream.complete) {
|
||||
if (toStream.readable) {
|
||||
toStream.once('end', () => {
|
||||
toStream.emit('close');
|
||||
});
|
||||
} else {
|
||||
toStream.emit('close');
|
||||
}
|
||||
} else {
|
||||
toStream.emit('close');
|
||||
}
|
||||
});
|
||||
|
||||
return toStream;
|
||||
};
|
||||
9
backend/node_modules/mimic-response/license
generated
vendored
Normal file
9
backend/node_modules/mimic-response/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
42
backend/node_modules/mimic-response/package.json
generated
vendored
Normal file
42
backend/node_modules/mimic-response/package.json
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "mimic-response",
|
||||
"version": "3.1.0",
|
||||
"description": "Mimic a Node.js HTTP response stream",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/mimic-response",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"mimic",
|
||||
"response",
|
||||
"stream",
|
||||
"http",
|
||||
"https",
|
||||
"request",
|
||||
"get",
|
||||
"core"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/node": "^14.0.1",
|
||||
"ava": "^2.4.0",
|
||||
"create-test-server": "^2.4.0",
|
||||
"p-event": "^4.1.0",
|
||||
"pify": "^5.0.0",
|
||||
"tsd": "^0.11.0",
|
||||
"xo": "^0.30.0"
|
||||
}
|
||||
}
|
||||
78
backend/node_modules/mimic-response/readme.md
generated
vendored
Normal file
78
backend/node_modules/mimic-response/readme.md
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
# mimic-response [](https://travis-ci.com/sindresorhus/mimic-response)
|
||||
|
||||
> Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install mimic-response
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const stream = require('stream');
|
||||
const mimicResponse = require('mimic-response');
|
||||
|
||||
const responseStream = getHttpResponseStream();
|
||||
const myStream = new stream.PassThrough();
|
||||
|
||||
mimicResponse(responseStream, myStream);
|
||||
|
||||
console.log(myStream.statusCode);
|
||||
//=> 200
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### mimicResponse(from, to)
|
||||
|
||||
**Note #1:** The `from.destroy(error)` function is not proxied. You have to call it manually:
|
||||
|
||||
```js
|
||||
const stream = require('stream');
|
||||
const mimicResponse = require('mimic-response');
|
||||
|
||||
const responseStream = getHttpResponseStream();
|
||||
|
||||
const myStream = new stream.PassThrough({
|
||||
destroy(error, callback) {
|
||||
responseStream.destroy();
|
||||
|
||||
callback(error);
|
||||
}
|
||||
});
|
||||
|
||||
myStream.destroy();
|
||||
```
|
||||
|
||||
Please note that `myStream` and `responseStream` never throws. The error is passed to the request instead.
|
||||
|
||||
#### from
|
||||
|
||||
Type: `Stream`
|
||||
|
||||
[Node.js HTTP response stream.](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
|
||||
|
||||
#### to
|
||||
|
||||
Type: `Stream`
|
||||
|
||||
Any stream.
|
||||
|
||||
## Related
|
||||
|
||||
- [mimic-fn](https://github.com/sindresorhus/mimic-fn) - Make a function mimic another one
|
||||
- [clone-response](https://github.com/lukechilds/clone-response) - Clone a Node.js response stream
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-mimic-response?utm_source=npm-mimic-response&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||
</b>
|
||||
<br>
|
||||
<sub>
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
||||
29
backend/node_modules/minimist/.eslintrc
generated
vendored
Normal file
29
backend/node_modules/minimist/.eslintrc
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb/eslint-config/node/0.4",
|
||||
|
||||
"rules": {
|
||||
"array-element-newline": 0,
|
||||
"complexity": 0,
|
||||
"func-style": [2, "declaration"],
|
||||
"max-lines-per-function": 0,
|
||||
"max-nested-callbacks": 1,
|
||||
"max-statements-per-line": 1,
|
||||
"max-statements": 0,
|
||||
"multiline-comment-style": 0,
|
||||
"no-continue": 1,
|
||||
"no-param-reassign": 1,
|
||||
"no-restricted-syntax": 1,
|
||||
"object-curly-newline": 0,
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": "test/**",
|
||||
"rules": {
|
||||
"camelcase": 0,
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
12
backend/node_modules/minimist/.github/FUNDING.yml
generated
vendored
Normal file
12
backend/node_modules/minimist/.github/FUNDING.yml
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/minimist
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
14
backend/node_modules/minimist/.nycrc
generated
vendored
Normal file
14
backend/node_modules/minimist/.nycrc
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"lines": 86,
|
||||
"statements": 85.93,
|
||||
"functions": 82.43,
|
||||
"branches": 76.06,
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"example",
|
||||
"test"
|
||||
]
|
||||
}
|
||||
298
backend/node_modules/minimist/CHANGELOG.md
generated
vendored
Normal file
298
backend/node_modules/minimist/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,298 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.2.8](https://github.com/minimistjs/minimist/compare/v1.2.7...v1.2.8) - 2023-02-09
|
||||
|
||||
### Merged
|
||||
|
||||
- [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17)
|
||||
- [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12)
|
||||
- [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10)
|
||||
|
||||
### Fixed
|
||||
|
||||
- [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15)
|
||||
- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8)
|
||||
- [Fix] Fix long option followed by single dash [`#15`](https://github.com/minimistjs/minimist/issues/15)
|
||||
- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9)
|
||||
- [Fix] Fix handling of short option with non-trivial equals [`#5`](https://github.com/minimistjs/minimist/issues/5)
|
||||
- [Tests] Remove duplicate test [`#8`](https://github.com/minimistjs/minimist/issues/8)
|
||||
- [Fix] opt.string works with multiple aliases [`#9`](https://github.com/minimistjs/minimist/issues/9)
|
||||
|
||||
### Commits
|
||||
|
||||
- Merge tag 'v0.2.3' [`a026794`](https://github.com/minimistjs/minimist/commit/a0267947c7870fc5847cf2d437fbe33f392767da)
|
||||
- [eslint] fix indentation and whitespace [`5368ca4`](https://github.com/minimistjs/minimist/commit/5368ca4147e974138a54cc0dc4cea8f756546b70)
|
||||
- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7)
|
||||
- [eslint] more cleanup [`62fde7d`](https://github.com/minimistjs/minimist/commit/62fde7d935f83417fb046741531a9e2346a36976)
|
||||
- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1)
|
||||
- [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c)
|
||||
- [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91)
|
||||
- [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4)
|
||||
- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982)
|
||||
- [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0)
|
||||
- [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07)
|
||||
- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b)
|
||||
- [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa)
|
||||
- [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e)
|
||||
- Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf)
|
||||
- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`3124ed3`](https://github.com/minimistjs/minimist/commit/3124ed3e46306301ebb3c834874ce0241555c2c4)
|
||||
- [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6)
|
||||
- [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c)
|
||||
- [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a)
|
||||
- [actions] Avoid 0.6 tests due to build failures [`ba92fe6`](https://github.com/minimistjs/minimist/commit/ba92fe6ebbdc0431cca9a2ea8f27beb492f5e4ec)
|
||||
- [Dev Deps] update `tape` [`950eaa7`](https://github.com/minimistjs/minimist/commit/950eaa74f112e04d23e9c606c67472c46739b473)
|
||||
- [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b)
|
||||
- Merge tag 'v0.2.2' [`980d7ac`](https://github.com/minimistjs/minimist/commit/980d7ac61a0b4bd552711251ac107d506b23e41f)
|
||||
|
||||
## [v1.2.7](https://github.com/minimistjs/minimist/compare/v1.2.6...v1.2.7) - 2022-10-10
|
||||
|
||||
### Commits
|
||||
|
||||
- [meta] add `auto-changelog` [`0ebf4eb`](https://github.com/minimistjs/minimist/commit/0ebf4ebcd5f7787a5524d31a849ef41316b83c3c)
|
||||
- [actions] add reusable workflows [`e115b63`](https://github.com/minimistjs/minimist/commit/e115b63fa9d3909f33b00a2db647ff79068388de)
|
||||
- [eslint] add eslint; rules to enable later are warnings [`f58745b`](https://github.com/minimistjs/minimist/commit/f58745b9bb84348e1be72af7dbba5840c7c13013)
|
||||
- [Dev Deps] switch from `covert` to `nyc` [`ab03356`](https://github.com/minimistjs/minimist/commit/ab033567b9c8b31117cb026dc7f1e592ce455c65)
|
||||
- [readme] rename and add badges [`236f4a0`](https://github.com/minimistjs/minimist/commit/236f4a07e4ebe5ee44f1496ec6974991ab293ffd)
|
||||
- [meta] create FUNDING.yml; add `funding` in package.json [`783a49b`](https://github.com/minimistjs/minimist/commit/783a49bfd47e8335d3098a8cac75662cf71eb32a)
|
||||
- [meta] use `npmignore` to autogenerate an npmignore file [`f81ece6`](https://github.com/minimistjs/minimist/commit/f81ece6aaec2fa14e69ff4f1e0407a8c4e2635a2)
|
||||
- Only apps should have lockfiles [`56cad44`](https://github.com/minimistjs/minimist/commit/56cad44c7f879b9bb5ec18fcc349308024a89bfc)
|
||||
- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`49c5f9f`](https://github.com/minimistjs/minimist/commit/49c5f9fb7e6a92db9eb340cc679de92fb3aacded)
|
||||
- [Tests] add `aud` in `posttest` [`228ae93`](https://github.com/minimistjs/minimist/commit/228ae938f3cd9db9dfd8bd7458b076a7b2aef280)
|
||||
- [meta] add `safe-publish-latest` [`01fc23f`](https://github.com/minimistjs/minimist/commit/01fc23f5104f85c75059972e01dd33796ab529ff)
|
||||
- [meta] update repo URLs [`6b164c7`](https://github.com/minimistjs/minimist/commit/6b164c7d68e0b6bf32f894699effdfb7c63041dd)
|
||||
|
||||
## [v1.2.6](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.6) - 2022-03-21
|
||||
|
||||
### Commits
|
||||
|
||||
- test from prototype pollution PR [`bc8ecee`](https://github.com/minimistjs/minimist/commit/bc8ecee43875261f4f17eb20b1243d3ed15e70eb)
|
||||
- isConstructorOrProto adapted from PR [`c2b9819`](https://github.com/minimistjs/minimist/commit/c2b981977fa834b223b408cfb860f933c9811e4d)
|
||||
- security notice for additional prototype pollution issue [`ef88b93`](https://github.com/minimistjs/minimist/commit/ef88b9325f77b5ee643ccfc97e2ebda577e4c4e2)
|
||||
|
||||
## [v1.2.5](https://github.com/minimistjs/minimist/compare/v1.2.4...v1.2.5) - 2020-03-12
|
||||
|
||||
## [v1.2.4](https://github.com/minimistjs/minimist/compare/v1.2.3...v1.2.4) - 2020-03-11
|
||||
|
||||
### Commits
|
||||
|
||||
- security notice [`4cf1354`](https://github.com/minimistjs/minimist/commit/4cf1354839cb972e38496d35e12f806eea92c11f)
|
||||
- additional test for constructor prototype pollution [`1043d21`](https://github.com/minimistjs/minimist/commit/1043d212c3caaf871966e710f52cfdf02f9eea4b)
|
||||
|
||||
## [v1.2.3](https://github.com/minimistjs/minimist/compare/v1.2.2...v1.2.3) - 2020-03-10
|
||||
|
||||
### Commits
|
||||
|
||||
- more failing proto pollution tests [`13c01a5`](https://github.com/minimistjs/minimist/commit/13c01a5327736903704984b7f65616b8476850cc)
|
||||
- even more aggressive checks for protocol pollution [`38a4d1c`](https://github.com/minimistjs/minimist/commit/38a4d1caead72ef99e824bb420a2528eec03d9ab)
|
||||
|
||||
## [v1.2.2](https://github.com/minimistjs/minimist/compare/v1.2.1...v1.2.2) - 2020-03-10
|
||||
|
||||
### Commits
|
||||
|
||||
- failing test for protocol pollution [`0efed03`](https://github.com/minimistjs/minimist/commit/0efed0340ec8433638758f7ca0c77cb20a0bfbab)
|
||||
- cleanup [`67d3722`](https://github.com/minimistjs/minimist/commit/67d3722413448d00a62963d2d30c34656a92d7e2)
|
||||
- console.dir -> console.log [`47acf72`](https://github.com/minimistjs/minimist/commit/47acf72c715a630bf9ea013867f47f1dd69dfc54)
|
||||
- don't assign onto __proto__ [`63e7ed0`](https://github.com/minimistjs/minimist/commit/63e7ed05aa4b1889ec2f3b196426db4500cbda94)
|
||||
|
||||
## [v1.2.1](https://github.com/minimistjs/minimist/compare/v1.2.0...v1.2.1) - 2020-03-10
|
||||
|
||||
### Merged
|
||||
|
||||
- move the `opts['--']` example back where it belongs [`#63`](https://github.com/minimistjs/minimist/pull/63)
|
||||
|
||||
### Commits
|
||||
|
||||
- add test [`6be5dae`](https://github.com/minimistjs/minimist/commit/6be5dae35a32a987bcf4137fcd6c19c5200ee909)
|
||||
- fix bad boolean regexp [`ac3fc79`](https://github.com/minimistjs/minimist/commit/ac3fc796e63b95128fdbdf67ea7fad71bd59aa76)
|
||||
|
||||
## [v1.2.0](https://github.com/minimistjs/minimist/compare/v1.1.3...v1.2.0) - 2015-08-24
|
||||
|
||||
### Commits
|
||||
|
||||
- failing -k=v short test [`63416b8`](https://github.com/minimistjs/minimist/commit/63416b8cd1d0d70e4714564cce465a36e4dd26d7)
|
||||
- kv short fix [`6bbe145`](https://github.com/minimistjs/minimist/commit/6bbe14529166245e86424f220a2321442fe88dc3)
|
||||
- failing kv short test [`f72ab7f`](https://github.com/minimistjs/minimist/commit/f72ab7f4572adc52902c9b6873cc969192f01b10)
|
||||
- fixed kv test [`f5a48c3`](https://github.com/minimistjs/minimist/commit/f5a48c3e50e40ca54f00c8e84de4b4d6e9897fa8)
|
||||
- enforce space between arg key and value [`86b321a`](https://github.com/minimistjs/minimist/commit/86b321affe648a8e016c095a4f0efa9d9074f502)
|
||||
|
||||
## [v1.1.3](https://github.com/minimistjs/minimist/compare/v1.1.2...v1.1.3) - 2015-08-06
|
||||
|
||||
### Commits
|
||||
|
||||
- add failing test - boolean alias array [`0fa3c5b`](https://github.com/minimistjs/minimist/commit/0fa3c5b3dd98551ddecf5392831b4c21211743fc)
|
||||
- fix boolean values with multiple aliases [`9c0a6e7`](https://github.com/minimistjs/minimist/commit/9c0a6e7de25a273b11bbf9a7464f0bd833779795)
|
||||
|
||||
## [v1.1.2](https://github.com/minimistjs/minimist/compare/v1.1.1...v1.1.2) - 2015-07-22
|
||||
|
||||
### Commits
|
||||
|
||||
- Convert boolean arguments to boolean values [`8f3dc27`](https://github.com/minimistjs/minimist/commit/8f3dc27cf833f1d54671b6d0bcb55c2fe19672a9)
|
||||
- use non-ancient npm, node 0.12 and iojs [`61ed1d0`](https://github.com/minimistjs/minimist/commit/61ed1d034b9ec7282764ce76f3992b1a0b4906ae)
|
||||
- an older npm for 0.8 [`25cf778`](https://github.com/minimistjs/minimist/commit/25cf778b1220e7838a526832ad6972f75244054f)
|
||||
|
||||
## [v1.1.1](https://github.com/minimistjs/minimist/compare/v1.1.0...v1.1.1) - 2015-03-10
|
||||
|
||||
### Commits
|
||||
|
||||
- check that they type of a value is a boolean, not just that it is currently set to a boolean [`6863198`](https://github.com/minimistjs/minimist/commit/6863198e36139830ff1f20ffdceaddd93f2c1db9)
|
||||
- upgrade tape, fix type issues from old tape version [`806712d`](https://github.com/minimistjs/minimist/commit/806712df91604ed02b8e39aa372b84aea659ee34)
|
||||
- test for setting a boolean to a null default [`8c444fe`](https://github.com/minimistjs/minimist/commit/8c444fe89384ded7d441c120915ea60620b01dd3)
|
||||
- if the previous value was a boolean, without an default (or with an alias) don't make an array either [`e5f419a`](https://github.com/minimistjs/minimist/commit/e5f419a3b5b3bc3f9e5ac71b7040621af70ed2dd)
|
||||
|
||||
## [v1.1.0](https://github.com/minimistjs/minimist/compare/v1.0.0...v1.1.0) - 2014-08-10
|
||||
|
||||
### Commits
|
||||
|
||||
- add support for handling "unknown" options not registered with the parser. [`6f3cc5d`](https://github.com/minimistjs/minimist/commit/6f3cc5d4e84524932a6ef2ce3592acc67cdd4383)
|
||||
- reformat package.json [`02ed371`](https://github.com/minimistjs/minimist/commit/02ed37115194d3697ff358e8e25e5e66bab1d9f8)
|
||||
- coverage script [`e5531ba`](https://github.com/minimistjs/minimist/commit/e5531ba0479da3b8138d3d8cac545d84ccb1c8df)
|
||||
- extra fn to get 100% coverage again [`a6972da`](https://github.com/minimistjs/minimist/commit/a6972da89e56bf77642f8ec05a13b6558db93498)
|
||||
|
||||
## [v1.0.0](https://github.com/minimistjs/minimist/compare/v0.2.3...v1.0.0) - 2014-08-10
|
||||
|
||||
### Commits
|
||||
|
||||
- added stopEarly option [`471c7e4`](https://github.com/minimistjs/minimist/commit/471c7e4a7e910fc7ad8f9df850a186daf32c64e9)
|
||||
- fix list [`fef6ae7`](https://github.com/minimistjs/minimist/commit/fef6ae79c38b9dc1c49569abb7cd04eb965eac5e)
|
||||
|
||||
## [v0.2.3](https://github.com/minimistjs/minimist/compare/v0.2.2...v0.2.3) - 2023-02-09
|
||||
|
||||
### Merged
|
||||
|
||||
- [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17)
|
||||
- [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12)
|
||||
- [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10)
|
||||
|
||||
### Fixed
|
||||
|
||||
- [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15)
|
||||
- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8)
|
||||
- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9)
|
||||
|
||||
### Commits
|
||||
|
||||
- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7)
|
||||
- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1)
|
||||
- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982)
|
||||
- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79)
|
||||
- [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b)
|
||||
|
||||
## [v0.2.2](https://github.com/minimistjs/minimist/compare/v0.2.1...v0.2.2) - 2022-10-10
|
||||
|
||||
### Commits
|
||||
|
||||
- [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c)
|
||||
- [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91)
|
||||
- [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4)
|
||||
- [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0)
|
||||
- [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07)
|
||||
- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b)
|
||||
- [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa)
|
||||
- [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e)
|
||||
- Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf)
|
||||
- [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6)
|
||||
- [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c)
|
||||
- [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a)
|
||||
|
||||
## [v0.2.1](https://github.com/minimistjs/minimist/compare/v0.2.0...v0.2.1) - 2020-03-12
|
||||
|
||||
## [v0.2.0](https://github.com/minimistjs/minimist/compare/v0.1.0...v0.2.0) - 2014-06-19
|
||||
|
||||
### Commits
|
||||
|
||||
- support all-boolean mode [`450a97f`](https://github.com/minimistjs/minimist/commit/450a97f6e2bc85c7a4a13185c19a818d9a5ebe69)
|
||||
|
||||
## [v0.1.0](https://github.com/minimistjs/minimist/compare/v0.0.10...v0.1.0) - 2014-05-12
|
||||
|
||||
### Commits
|
||||
|
||||
- Provide a mechanism to segregate -- arguments [`ce4a1e6`](https://github.com/minimistjs/minimist/commit/ce4a1e63a7e8d5ab88d2a3768adefa6af98a445a)
|
||||
- documented argv['--'] [`14db0e6`](https://github.com/minimistjs/minimist/commit/14db0e6dbc6d2b9e472adaa54dad7004b364634f)
|
||||
- Adding a test-case for notFlags segregation [`715c1e3`](https://github.com/minimistjs/minimist/commit/715c1e3714be223f998f6c537af6b505f0236c16)
|
||||
|
||||
## [v0.0.10](https://github.com/minimistjs/minimist/compare/v0.0.9...v0.0.10) - 2014-05-11
|
||||
|
||||
### Commits
|
||||
|
||||
- dedicated boolean test [`46e448f`](https://github.com/minimistjs/minimist/commit/46e448f9f513cfeb2bcc8b688b9b47ba1e515c2b)
|
||||
- dedicated num test [`9bf2d36`](https://github.com/minimistjs/minimist/commit/9bf2d36f1d3b8795be90b8f7de0a937f098aa394)
|
||||
- aliased values treated as strings [`1ab743b`](https://github.com/minimistjs/minimist/commit/1ab743bad4484d69f1259bed42f9531de01119de)
|
||||
- cover the case of already numbers, at 100% coverage [`b2bb044`](https://github.com/minimistjs/minimist/commit/b2bb04436599d77a2ce029e8e555e25b3aa55d13)
|
||||
- another test for higher coverage [`3662624`](https://github.com/minimistjs/minimist/commit/3662624be976d5489d486a856849c048d13be903)
|
||||
|
||||
## [v0.0.9](https://github.com/minimistjs/minimist/compare/v0.0.8...v0.0.9) - 2014-05-08
|
||||
|
||||
### Commits
|
||||
|
||||
- Eliminate `longest` fn. [`824f642`](https://github.com/minimistjs/minimist/commit/824f642038d1b02ede68b6261d1d65163390929a)
|
||||
|
||||
## [v0.0.8](https://github.com/minimistjs/minimist/compare/v0.0.7...v0.0.8) - 2014-02-20
|
||||
|
||||
### Commits
|
||||
|
||||
- return '' if flag is string and empty [`fa63ed4`](https://github.com/minimistjs/minimist/commit/fa63ed4651a4ef4eefddce34188e0d98d745a263)
|
||||
- handle joined single letters [`66c248f`](https://github.com/minimistjs/minimist/commit/66c248f0241d4d421d193b022e9e365f11178534)
|
||||
|
||||
## [v0.0.7](https://github.com/minimistjs/minimist/compare/v0.0.6...v0.0.7) - 2014-02-08
|
||||
|
||||
### Commits
|
||||
|
||||
- another swap of .test for .match [`d1da408`](https://github.com/minimistjs/minimist/commit/d1da40819acbe846d89a5c02721211e3c1260dde)
|
||||
|
||||
## [v0.0.6](https://github.com/minimistjs/minimist/compare/v0.0.5...v0.0.6) - 2014-02-08
|
||||
|
||||
### Commits
|
||||
|
||||
- use .test() instead of .match() to not crash on non-string values in the arguments array [`7e0d1ad`](https://github.com/minimistjs/minimist/commit/7e0d1add8c9e5b9b20a4d3d0f9a94d824c578da1)
|
||||
|
||||
## [v0.0.5](https://github.com/minimistjs/minimist/compare/v0.0.4...v0.0.5) - 2013-09-18
|
||||
|
||||
### Commits
|
||||
|
||||
- Improve '--' handling. [`b11822c`](https://github.com/minimistjs/minimist/commit/b11822c09cc9d2460f30384d12afc0b953c037a4)
|
||||
|
||||
## [v0.0.4](https://github.com/minimistjs/minimist/compare/v0.0.3...v0.0.4) - 2013-09-17
|
||||
|
||||
## [v0.0.3](https://github.com/minimistjs/minimist/compare/v0.0.2...v0.0.3) - 2013-09-12
|
||||
|
||||
### Commits
|
||||
|
||||
- failing test for single dash preceeding a double dash [`b465514`](https://github.com/minimistjs/minimist/commit/b465514b82c9ae28972d714facd951deb2ad762b)
|
||||
- fix for the dot test [`6a095f1`](https://github.com/minimistjs/minimist/commit/6a095f1d364c8fab2d6753d2291a0649315d297a)
|
||||
|
||||
## [v0.0.2](https://github.com/minimistjs/minimist/compare/v0.0.1...v0.0.2) - 2013-08-28
|
||||
|
||||
### Commits
|
||||
|
||||
- allow dotted aliases & defaults [`321c33e`](https://github.com/minimistjs/minimist/commit/321c33e755485faaeb44eeb1c05d33b2e0a5a7c4)
|
||||
- use a better version of ff [`e40f611`](https://github.com/minimistjs/minimist/commit/e40f61114cf7be6f7947f7b3eed345853a67dbbb)
|
||||
|
||||
## [v0.0.1](https://github.com/minimistjs/minimist/compare/v0.0.0...v0.0.1) - 2013-06-25
|
||||
|
||||
### Commits
|
||||
|
||||
- remove trailing commas [`6ff0fa0`](https://github.com/minimistjs/minimist/commit/6ff0fa055064f15dbe06d50b89d5173a6796e1db)
|
||||
|
||||
## v0.0.0 - 2013-06-25
|
||||
|
||||
### Commits
|
||||
|
||||
- half of the parse test ported [`3079326`](https://github.com/minimistjs/minimist/commit/307932601325087de6cf94188eb798ffc4f3088a)
|
||||
- stripped down code and a passing test from optimist [`7cced88`](https://github.com/minimistjs/minimist/commit/7cced88d82e399d1a03ed23eb667f04d3f320d10)
|
||||
- ported parse tests completely over [`9448754`](https://github.com/minimistjs/minimist/commit/944875452e0820df6830b1408c26a0f7d3e1db04)
|
||||
- docs, package.json [`a5bf46a`](https://github.com/minimistjs/minimist/commit/a5bf46ac9bb3bd114a9c340276c62c1091e538d5)
|
||||
- move more short tests into short.js [`503edb5`](https://github.com/minimistjs/minimist/commit/503edb5c41d89c0d40831ee517154fc13b0f18b9)
|
||||
- default bool test was wrong, not the code [`1b9f5db`](https://github.com/minimistjs/minimist/commit/1b9f5db4741b49962846081b68518de824992097)
|
||||
- passing long tests ripped out of parse.js [`7972c4a`](https://github.com/minimistjs/minimist/commit/7972c4aff1f4803079e1668006658e2a761a0428)
|
||||
- badges [`84c0370`](https://github.com/minimistjs/minimist/commit/84c037063664d42878aace715fe6572ce01b6f3b)
|
||||
- all the tests now ported, some failures [`64239ed`](https://github.com/minimistjs/minimist/commit/64239edfe92c711c4eb0da254fcdfad2a5fdb605)
|
||||
- failing short test [`f8a5341`](https://github.com/minimistjs/minimist/commit/f8a534112dd1138d2fad722def56a848480c446f)
|
||||
- fixed the numeric test [`6b034f3`](https://github.com/minimistjs/minimist/commit/6b034f37c79342c60083ed97fd222e16928aac51)
|
||||
18
backend/node_modules/minimist/LICENSE
generated
vendored
Normal file
18
backend/node_modules/minimist/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
This software is released under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
121
backend/node_modules/minimist/README.md
generated
vendored
Normal file
121
backend/node_modules/minimist/README.md
generated
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
# minimist <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
parse argument options
|
||||
|
||||
This module is the guts of optimist's argument parser without all the
|
||||
fanciful decoration.
|
||||
|
||||
# example
|
||||
|
||||
``` js
|
||||
var argv = require('minimist')(process.argv.slice(2));
|
||||
console.log(argv);
|
||||
```
|
||||
|
||||
```
|
||||
$ node example/parse.js -a beep -b boop
|
||||
{ _: [], a: 'beep', b: 'boop' }
|
||||
```
|
||||
|
||||
```
|
||||
$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
|
||||
{
|
||||
_: ['foo', 'bar', 'baz'],
|
||||
x: 3,
|
||||
y: 4,
|
||||
n: 5,
|
||||
a: true,
|
||||
b: true,
|
||||
c: true,
|
||||
beep: 'boop'
|
||||
}
|
||||
```
|
||||
|
||||
# security
|
||||
|
||||
Previous versions had a prototype pollution bug that could cause privilege
|
||||
escalation in some circumstances when handling untrusted user input.
|
||||
|
||||
Please use version 1.2.6 or later:
|
||||
|
||||
* https://security.snyk.io/vuln/SNYK-JS-MINIMIST-2429795 (version <=1.2.5)
|
||||
* https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 (version <=1.2.3)
|
||||
|
||||
# methods
|
||||
|
||||
``` js
|
||||
var parseArgs = require('minimist')
|
||||
```
|
||||
|
||||
## var argv = parseArgs(args, opts={})
|
||||
|
||||
Return an argument object `argv` populated with the array arguments from `args`.
|
||||
|
||||
`argv._` contains all the arguments that didn't have an option associated with
|
||||
them.
|
||||
|
||||
Numeric-looking arguments will be returned as numbers unless `opts.string` or
|
||||
`opts.boolean` is set for that argument name.
|
||||
|
||||
Any arguments after `'--'` will not be parsed and will end up in `argv._`.
|
||||
|
||||
options can be:
|
||||
|
||||
* `opts.string` - a string or array of strings argument names to always treat as
|
||||
strings
|
||||
* `opts.boolean` - a boolean, string or array of strings to always treat as
|
||||
booleans. if `true` will treat all double hyphenated arguments without equal signs
|
||||
as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
|
||||
* `opts.alias` - an object mapping string names to strings or arrays of string
|
||||
argument names to use as aliases
|
||||
* `opts.default` - an object mapping string argument names to default values
|
||||
* `opts.stopEarly` - when true, populate `argv._` with everything after the
|
||||
first non-option
|
||||
* `opts['--']` - when true, populate `argv._` with everything before the `--`
|
||||
and `argv['--']` with everything after the `--`. Here's an example:
|
||||
|
||||
```
|
||||
> require('./')('one two three -- four five --six'.split(' '), { '--': true })
|
||||
{
|
||||
_: ['one', 'two', 'three'],
|
||||
'--': ['four', 'five', '--six']
|
||||
}
|
||||
```
|
||||
|
||||
Note that with `opts['--']` set, parsing for arguments still stops after the
|
||||
`--`.
|
||||
|
||||
* `opts.unknown` - a function which is invoked with a command line parameter not
|
||||
defined in the `opts` configuration object. If the function returns `false`, the
|
||||
unknown option is not added to `argv`.
|
||||
|
||||
# install
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```
|
||||
npm install minimist
|
||||
```
|
||||
|
||||
# license
|
||||
|
||||
MIT
|
||||
|
||||
[package-url]: https://npmjs.org/package/minimist
|
||||
[npm-version-svg]: https://versionbadg.es/minimistjs/minimist.svg
|
||||
[npm-badge-png]: https://nodei.co/npm/minimist.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/minimist.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/minimist.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=minimist
|
||||
[codecov-image]: https://codecov.io/gh/minimistjs/minimist/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/minimistjs/minimist/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/minimistjs/minimist
|
||||
[actions-url]: https://github.com/minimistjs/minimist/actions
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user