This commit is contained in:
parent
1f8378c8cf
commit
b27a419c2f
519 changed files with 38941 additions and 23 deletions
|
@ -12,7 +12,7 @@ RUN npx tsc
|
|||
|
||||
|
||||
### NEW ###
|
||||
RUN npm install -g http-server
|
||||
#RUN npm install -g http-server
|
||||
RUN npx tsc event.ts
|
||||
RUN npx tsc broker.ts
|
||||
|
||||
|
|
1
node_modules/.bin/he
generated
vendored
Symbolic link
1
node_modules/.bin/he
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../he/bin/he
|
1
node_modules/.bin/http-server
generated
vendored
Symbolic link
1
node_modules/.bin/http-server
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../http-server/bin/http-server
|
1
node_modules/.bin/mime
generated
vendored
Symbolic link
1
node_modules/.bin/mime
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../mime/cli.js
|
1
node_modules/.bin/opener
generated
vendored
Symbolic link
1
node_modules/.bin/opener
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../opener/bin/opener-bin.js
|
470
node_modules/.package-lock.json
generated
vendored
470
node_modules/.package-lock.json
generated
vendored
|
@ -1203,7 +1203,6 @@
|
|||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1"
|
||||
|
@ -1250,7 +1249,6 @@
|
|||
"version": "3.2.6",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
|
||||
"integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/babel-jest": {
|
||||
|
@ -1376,6 +1374,18 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/basic-auth": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
|
||||
"integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safe-buffer": "5.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
|
@ -1463,6 +1473,35 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/call-bind-apply-helpers": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
||||
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bound": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
|
||||
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.2",
|
||||
"get-intrinsic": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/callsites": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
|
||||
|
@ -1508,7 +1547,6 @@
|
|||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
|
@ -1591,7 +1629,6 @@
|
|||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-name": "~1.1.4"
|
||||
|
@ -1604,7 +1641,6 @@
|
|||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
|
@ -1621,6 +1657,15 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/corser": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz",
|
||||
"integrity": "sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/create-jest": {
|
||||
"version": "29.7.0",
|
||||
"resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz",
|
||||
|
@ -1669,7 +1714,6 @@
|
|||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
|
@ -1738,6 +1782,20 @@
|
|||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/dunder-proto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/ejs": {
|
||||
"version": "3.1.10",
|
||||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz",
|
||||
|
@ -1791,6 +1849,36 @@
|
|||
"is-arrayish": "^0.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/es-define-property": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
||||
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-errors": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
||||
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-object-atoms": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
||||
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
|
||||
|
@ -1825,6 +1913,12 @@
|
|||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/eventemitter3": {
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
|
||||
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/execa": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
|
||||
|
@ -1952,6 +2046,26 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.9",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
|
||||
"integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
|
@ -1963,7 +2077,6 @@
|
|||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
|
@ -1989,6 +2102,30 @@
|
|||
"node": "6.* || 8.* || >= 10.*"
|
||||
}
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
||||
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.2",
|
||||
"es-define-property": "^1.0.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.1.1",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-proto": "^1.0.1",
|
||||
"gopd": "^1.2.0",
|
||||
"has-symbols": "^1.1.0",
|
||||
"hasown": "^2.0.2",
|
||||
"math-intrinsics": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/get-package-type": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz",
|
||||
|
@ -1999,6 +2136,19 @@
|
|||
"node": ">=8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/get-proto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dunder-proto": "^1.0.1",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/get-stream": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
|
||||
|
@ -2044,6 +2194,18 @@
|
|||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/gopd": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
||||
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.11",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||
|
@ -2055,17 +2217,27 @@
|
|||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
|
||||
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
|
@ -2074,6 +2246,27 @@
|
|||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/he": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
||||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"he": "bin/he"
|
||||
}
|
||||
},
|
||||
"node_modules/html-encoding-sniffer": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz",
|
||||
"integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"whatwg-encoding": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/html-escaper": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
|
||||
|
@ -2081,6 +2274,47 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/http-proxy": {
|
||||
"version": "1.18.1",
|
||||
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
|
||||
"integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"eventemitter3": "^4.0.0",
|
||||
"follow-redirects": "^1.0.0",
|
||||
"requires-port": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/http-server": {
|
||||
"version": "14.1.1",
|
||||
"resolved": "https://registry.npmjs.org/http-server/-/http-server-14.1.1.tgz",
|
||||
"integrity": "sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"basic-auth": "^2.0.1",
|
||||
"chalk": "^4.1.2",
|
||||
"corser": "^2.0.1",
|
||||
"he": "^1.2.0",
|
||||
"html-encoding-sniffer": "^3.0.0",
|
||||
"http-proxy": "^1.18.1",
|
||||
"mime": "^1.6.0",
|
||||
"minimist": "^1.2.6",
|
||||
"opener": "^1.5.1",
|
||||
"portfinder": "^1.0.28",
|
||||
"secure-compare": "3.0.1",
|
||||
"union": "~0.5.0",
|
||||
"url-join": "^4.0.1"
|
||||
},
|
||||
"bin": {
|
||||
"http-server": "bin/http-server"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/human-signals": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
|
||||
|
@ -2091,6 +2325,18 @@
|
|||
"node": ">=10.17.0"
|
||||
}
|
||||
},
|
||||
"node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/import-local": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz",
|
||||
|
@ -3069,6 +3315,15 @@
|
|||
"tmpl": "1.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/math-intrinsics": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
||||
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/merge-stream": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||
|
@ -3090,6 +3345,18 @@
|
|||
"node": ">=8.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
||||
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"mime": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/mimic-fn": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
|
||||
|
@ -3113,11 +3380,19 @@
|
|||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/natural-compare": {
|
||||
|
@ -3173,6 +3448,18 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/object-inspect": {
|
||||
"version": "1.13.4",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
|
||||
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
|
@ -3199,6 +3486,15 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/opener": {
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz",
|
||||
"integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==",
|
||||
"license": "(WTFPL OR MIT)",
|
||||
"bin": {
|
||||
"opener": "bin/opener-bin.js"
|
||||
}
|
||||
},
|
||||
"node_modules/p-limit": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||
|
@ -3353,6 +3649,19 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/portfinder": {
|
||||
"version": "1.0.35",
|
||||
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.35.tgz",
|
||||
"integrity": "sha512-73JaFg4NwYNAufDtS5FsFu/PdM49ahJrO1i44aCRsDWju1z5wuGDaqyFUQWR6aJoK2JPDWlaYYAGFNIGTSUHSw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"async": "^3.2.6",
|
||||
"debug": "^4.3.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.12"
|
||||
}
|
||||
},
|
||||
"node_modules/pretty-format": {
|
||||
"version": "29.7.0",
|
||||
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz",
|
||||
|
@ -3412,6 +3721,21 @@
|
|||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.14.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
|
||||
"integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/react-is": {
|
||||
"version": "18.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
|
||||
|
@ -3429,6 +3753,12 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/requires-port": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.10",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
|
||||
|
@ -3483,6 +3813,24 @@
|
|||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/secure-compare": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz",
|
||||
"integrity": "sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
|
@ -3516,6 +3864,78 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
||||
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"object-inspect": "^1.13.3",
|
||||
"side-channel-list": "^1.0.0",
|
||||
"side-channel-map": "^1.0.1",
|
||||
"side-channel-weakmap": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel-list": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
||||
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"object-inspect": "^1.13.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel-map": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
|
||||
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bound": "^1.0.2",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.5",
|
||||
"object-inspect": "^1.13.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel-weakmap": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
|
||||
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bound": "^1.0.2",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.5",
|
||||
"object-inspect": "^1.13.3",
|
||||
"side-channel-map": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/signal-exit": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||
|
@ -3660,7 +4080,6 @@
|
|||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has-flag": "^4.0.0"
|
||||
|
@ -3881,6 +4300,17 @@
|
|||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/union": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz",
|
||||
"integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==",
|
||||
"dependencies": {
|
||||
"qs": "^6.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/update-browserslist-db": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
|
||||
|
@ -3912,6 +4342,12 @@
|
|||
"browserslist": ">= 4.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/url-join": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz",
|
||||
"integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/v8-compile-cache-lib": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
|
||||
|
@ -3955,6 +4391,18 @@
|
|||
"makeerror": "1.0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/whatwg-encoding": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz",
|
||||
"integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"iconv-lite": "0.6.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/which": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
|
|
52
node_modules/basic-auth/HISTORY.md
generated
vendored
Normal file
52
node_modules/basic-auth/HISTORY.md
generated
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
2.0.1 / 2018-09-19
|
||||
==================
|
||||
|
||||
* deps: safe-buffer@5.1.2
|
||||
|
||||
2.0.0 / 2017-09-12
|
||||
==================
|
||||
|
||||
* Drop support for Node.js below 0.8
|
||||
* Remove `auth(ctx)` signature -- pass in header or `auth(ctx.req)`
|
||||
* Use `safe-buffer` for improved Buffer API
|
||||
|
||||
1.1.0 / 2016-11-18
|
||||
==================
|
||||
|
||||
* Add `auth.parse` for low-level string parsing
|
||||
|
||||
1.0.4 / 2016-05-10
|
||||
==================
|
||||
|
||||
* Improve error message when `req` argument is not an object
|
||||
* Improve error message when `req` missing `headers` property
|
||||
|
||||
1.0.3 / 2015-07-01
|
||||
==================
|
||||
|
||||
* Fix regression accepting a Koa context
|
||||
|
||||
1.0.2 / 2015-06-12
|
||||
==================
|
||||
|
||||
* Improve error message when `req` argument missing
|
||||
* perf: enable strict mode
|
||||
* perf: hoist regular expression
|
||||
* perf: parse with regular expressions
|
||||
* perf: remove argument reassignment
|
||||
|
||||
1.0.1 / 2015-05-04
|
||||
==================
|
||||
|
||||
* Update readme
|
||||
|
||||
1.0.0 / 2014-07-01
|
||||
==================
|
||||
|
||||
* Support empty password
|
||||
* Support empty username
|
||||
|
||||
0.0.1 / 2013-11-30
|
||||
==================
|
||||
|
||||
* Initial release
|
24
node_modules/basic-auth/LICENSE
generated
vendored
Normal file
24
node_modules/basic-auth/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
(The MIT License)
|
||||
|
||||
Copyright (c) 2013 TJ Holowaychuk
|
||||
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
||||
Copyright (c) 2015-2016 Douglas Christopher Wilson <doug@somethingdoug.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.
|
113
node_modules/basic-auth/README.md
generated
vendored
Normal file
113
node_modules/basic-auth/README.md
generated
vendored
Normal file
|
@ -0,0 +1,113 @@
|
|||
# basic-auth
|
||||
|
||||
[![NPM Version][npm-image]][npm-url]
|
||||
[![NPM Downloads][downloads-image]][downloads-url]
|
||||
[![Node.js Version][node-version-image]][node-version-url]
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
Generic basic auth Authorization header field parser for whatever.
|
||||
|
||||
## Installation
|
||||
|
||||
This is a [Node.js](https://nodejs.org/en/) module available through the
|
||||
[npm registry](https://www.npmjs.com/). Installation is done using the
|
||||
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
|
||||
|
||||
```
|
||||
$ npm install basic-auth
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
<!-- eslint-disable no-unused-vars -->
|
||||
|
||||
```js
|
||||
var auth = require('basic-auth')
|
||||
```
|
||||
|
||||
### auth(req)
|
||||
|
||||
Get the basic auth credentials from the given request. The `Authorization`
|
||||
header is parsed and if the header is invalid, `undefined` is returned,
|
||||
otherwise an object with `name` and `pass` properties.
|
||||
|
||||
### auth.parse(string)
|
||||
|
||||
Parse a basic auth authorization header string. This will return an object
|
||||
with `name` and `pass` properties, or `undefined` if the string is invalid.
|
||||
|
||||
## Example
|
||||
|
||||
Pass a Node.js request object to the module export. If parsing fails
|
||||
`undefined` is returned, otherwise an object with `.name` and `.pass`.
|
||||
|
||||
<!-- eslint-disable no-unused-vars, no-undef -->
|
||||
|
||||
```js
|
||||
var auth = require('basic-auth')
|
||||
var user = auth(req)
|
||||
// => { name: 'something', pass: 'whatever' }
|
||||
```
|
||||
|
||||
A header string from any other location can also be parsed with
|
||||
`auth.parse`, for example a `Proxy-Authorization` header:
|
||||
|
||||
<!-- eslint-disable no-unused-vars, no-undef -->
|
||||
|
||||
```js
|
||||
var auth = require('basic-auth')
|
||||
var user = auth.parse(req.getHeader('Proxy-Authorization'))
|
||||
```
|
||||
|
||||
### With vanilla node.js http server
|
||||
|
||||
```js
|
||||
var http = require('http')
|
||||
var auth = require('basic-auth')
|
||||
var compare = require('tsscmp')
|
||||
|
||||
// Create server
|
||||
var server = http.createServer(function (req, res) {
|
||||
var credentials = auth(req)
|
||||
|
||||
// Check credentials
|
||||
// The "check" function will typically be against your user store
|
||||
if (!credentials || !check(credentials.name, credentials.pass)) {
|
||||
res.statusCode = 401
|
||||
res.setHeader('WWW-Authenticate', 'Basic realm="example"')
|
||||
res.end('Access denied')
|
||||
} else {
|
||||
res.end('Access granted')
|
||||
}
|
||||
})
|
||||
|
||||
// Basic function to validate credentials for example
|
||||
function check (name, pass) {
|
||||
var valid = true
|
||||
|
||||
// Simple method to prevent short-circut and use timing-safe compare
|
||||
valid = compare(name, 'john') && valid
|
||||
valid = compare(pass, 'secret') && valid
|
||||
|
||||
return valid
|
||||
}
|
||||
|
||||
// Listen
|
||||
server.listen(3000)
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/basic-auth/master
|
||||
[coveralls-url]: https://coveralls.io/r/jshttp/basic-auth?branch=master
|
||||
[downloads-image]: https://badgen.net/npm/dm/basic-auth
|
||||
[downloads-url]: https://npmjs.org/package/basic-auth
|
||||
[node-version-image]: https://badgen.net/npm/node/basic-auth
|
||||
[node-version-url]: https://nodejs.org/en/download
|
||||
[npm-image]: https://badgen.net/npm/v/basic-auth
|
||||
[npm-url]: https://npmjs.org/package/basic-auth
|
||||
[travis-image]: https://badgen.net/travis/jshttp/basic-auth/master
|
||||
[travis-url]: https://travis-ci.org/jshttp/basic-auth
|
133
node_modules/basic-auth/index.js
generated
vendored
Normal file
133
node_modules/basic-auth/index.js
generated
vendored
Normal file
|
@ -0,0 +1,133 @@
|
|||
/*!
|
||||
* basic-auth
|
||||
* Copyright(c) 2013 TJ Holowaychuk
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015-2016 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
* @private
|
||||
*/
|
||||
|
||||
var Buffer = require('safe-buffer').Buffer
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
* @public
|
||||
*/
|
||||
|
||||
module.exports = auth
|
||||
module.exports.parse = parse
|
||||
|
||||
/**
|
||||
* RegExp for basic auth credentials
|
||||
*
|
||||
* credentials = auth-scheme 1*SP token68
|
||||
* auth-scheme = "Basic" ; case insensitive
|
||||
* token68 = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" ) *"="
|
||||
* @private
|
||||
*/
|
||||
|
||||
var CREDENTIALS_REGEXP = /^ *(?:[Bb][Aa][Ss][Ii][Cc]) +([A-Za-z0-9._~+/-]+=*) *$/
|
||||
|
||||
/**
|
||||
* RegExp for basic auth user/pass
|
||||
*
|
||||
* user-pass = userid ":" password
|
||||
* userid = *<TEXT excluding ":">
|
||||
* password = *TEXT
|
||||
* @private
|
||||
*/
|
||||
|
||||
var USER_PASS_REGEXP = /^([^:]*):(.*)$/
|
||||
|
||||
/**
|
||||
* Parse the Authorization header field of a request.
|
||||
*
|
||||
* @param {object} req
|
||||
* @return {object} with .name and .pass
|
||||
* @public
|
||||
*/
|
||||
|
||||
function auth (req) {
|
||||
if (!req) {
|
||||
throw new TypeError('argument req is required')
|
||||
}
|
||||
|
||||
if (typeof req !== 'object') {
|
||||
throw new TypeError('argument req is required to be an object')
|
||||
}
|
||||
|
||||
// get header
|
||||
var header = getAuthorization(req)
|
||||
|
||||
// parse header
|
||||
return parse(header)
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode base64 string.
|
||||
* @private
|
||||
*/
|
||||
|
||||
function decodeBase64 (str) {
|
||||
return Buffer.from(str, 'base64').toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Authorization header from request object.
|
||||
* @private
|
||||
*/
|
||||
|
||||
function getAuthorization (req) {
|
||||
if (!req.headers || typeof req.headers !== 'object') {
|
||||
throw new TypeError('argument req is required to have headers property')
|
||||
}
|
||||
|
||||
return req.headers.authorization
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse basic auth to object.
|
||||
*
|
||||
* @param {string} string
|
||||
* @return {object}
|
||||
* @public
|
||||
*/
|
||||
|
||||
function parse (string) {
|
||||
if (typeof string !== 'string') {
|
||||
return undefined
|
||||
}
|
||||
|
||||
// parse header
|
||||
var match = CREDENTIALS_REGEXP.exec(string)
|
||||
|
||||
if (!match) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
// decode user pass
|
||||
var userPass = USER_PASS_REGEXP.exec(decodeBase64(match[1]))
|
||||
|
||||
if (!userPass) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
// return credentials object
|
||||
return new Credentials(userPass[1], userPass[2])
|
||||
}
|
||||
|
||||
/**
|
||||
* Object to represent user credentials.
|
||||
* @private
|
||||
*/
|
||||
|
||||
function Credentials (name, pass) {
|
||||
this.name = name
|
||||
this.pass = pass
|
||||
}
|
41
node_modules/basic-auth/package.json
generated
vendored
Normal file
41
node_modules/basic-auth/package.json
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "basic-auth",
|
||||
"description": "node.js basic auth parser",
|
||||
"version": "2.0.1",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"basic",
|
||||
"auth",
|
||||
"authorization",
|
||||
"basicauth"
|
||||
],
|
||||
"repository": "jshttp/basic-auth",
|
||||
"dependencies": {
|
||||
"safe-buffer": "5.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "5.6.0",
|
||||
"eslint-config-standard": "12.0.0",
|
||||
"eslint-plugin-import": "2.14.0",
|
||||
"eslint-plugin-markdown": "1.0.0-beta.6",
|
||||
"eslint-plugin-node": "7.0.1",
|
||||
"eslint-plugin-promise": "4.0.1",
|
||||
"eslint-plugin-standard": "4.0.0",
|
||||
"istanbul": "0.4.5",
|
||||
"mocha": "5.2.0"
|
||||
},
|
||||
"files": [
|
||||
"HISTORY.md",
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --plugin markdown --ext js,md .",
|
||||
"test": "mocha --check-leaks --reporter spec --bail",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
|
||||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
|
||||
}
|
||||
}
|
17
node_modules/call-bind-apply-helpers/.eslintrc
generated
vendored
Normal file
17
node_modules/call-bind-apply-helpers/.eslintrc
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"func-name-matching": 0,
|
||||
"id-length": 0,
|
||||
"new-cap": [2, {
|
||||
"capIsNewExceptions": [
|
||||
"GetIntrinsic",
|
||||
],
|
||||
}],
|
||||
"no-extra-parens": 0,
|
||||
"no-magic-numbers": 0,
|
||||
},
|
||||
}
|
12
node_modules/call-bind-apply-helpers/.github/FUNDING.yml
generated
vendored
Normal file
12
node_modules/call-bind-apply-helpers/.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/call-bind-apply-helpers
|
||||
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']
|
9
node_modules/call-bind-apply-helpers/.nycrc
generated
vendored
Normal file
9
node_modules/call-bind-apply-helpers/.nycrc
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
30
node_modules/call-bind-apply-helpers/CHANGELOG.md
generated
vendored
Normal file
30
node_modules/call-bind-apply-helpers/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
# 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.0.2](https://github.com/ljharb/call-bind-apply-helpers/compare/v1.0.1...v1.0.2) - 2025-02-12
|
||||
|
||||
### Commits
|
||||
|
||||
- [types] improve inferred types [`e6f9586`](https://github.com/ljharb/call-bind-apply-helpers/commit/e6f95860a3c72879cb861a858cdfb8138fbedec1)
|
||||
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `@types/tape`, `es-value-fixtures`, `for-each`, `has-strict-mode`, `object-inspect` [`e43d540`](https://github.com/ljharb/call-bind-apply-helpers/commit/e43d5409f97543bfbb11f345d47d8ce4e066d8c1)
|
||||
|
||||
## [v1.0.1](https://github.com/ljharb/call-bind-apply-helpers/compare/v1.0.0...v1.0.1) - 2024-12-08
|
||||
|
||||
### Commits
|
||||
|
||||
- [types] `reflectApply`: fix types [`4efc396`](https://github.com/ljharb/call-bind-apply-helpers/commit/4efc3965351a4f02cc55e836fa391d3d11ef2ef8)
|
||||
- [Fix] `reflectApply`: oops, Reflect is not a function [`83cc739`](https://github.com/ljharb/call-bind-apply-helpers/commit/83cc7395de6b79b7730bdf092f1436f0b1263c75)
|
||||
- [Dev Deps] update `@arethetypeswrong/cli` [`80bd5d3`](https://github.com/ljharb/call-bind-apply-helpers/commit/80bd5d3ae58b4f6b6995ce439dd5a1bcb178a940)
|
||||
|
||||
## v1.0.0 - 2024-12-05
|
||||
|
||||
### Commits
|
||||
|
||||
- Initial implementation, tests, readme [`7879629`](https://github.com/ljharb/call-bind-apply-helpers/commit/78796290f9b7430c9934d6f33d94ae9bc89fce04)
|
||||
- Initial commit [`3f1dc16`](https://github.com/ljharb/call-bind-apply-helpers/commit/3f1dc164afc43285631b114a5f9dd9137b2b952f)
|
||||
- npm init [`081df04`](https://github.com/ljharb/call-bind-apply-helpers/commit/081df048c312fcee400922026f6e97281200a603)
|
||||
- Only apps should have lockfiles [`5b9ca0f`](https://github.com/ljharb/call-bind-apply-helpers/commit/5b9ca0fe8101ebfaf309c549caac4e0a017ed930)
|
21
node_modules/call-bind-apply-helpers/LICENSE
generated
vendored
Normal file
21
node_modules/call-bind-apply-helpers/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 Jordan Harband
|
||||
|
||||
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
node_modules/call-bind-apply-helpers/README.md
generated
vendored
Normal file
62
node_modules/call-bind-apply-helpers/README.md
generated
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
# call-bind-apply-helpers <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![dependency status][deps-svg]][deps-url]
|
||||
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
Helper functions around Function call/apply/bind, for use in `call-bind`.
|
||||
|
||||
The only packages that should likely ever use this package directly are `call-bind` and `get-intrinsic`.
|
||||
Please use `call-bind` unless you have a very good reason not to.
|
||||
|
||||
## Getting started
|
||||
|
||||
```sh
|
||||
npm install --save call-bind-apply-helpers
|
||||
```
|
||||
|
||||
## Usage/Examples
|
||||
|
||||
```js
|
||||
const assert = require('assert');
|
||||
const callBindBasic = require('call-bind-apply-helpers');
|
||||
|
||||
function f(a, b) {
|
||||
assert.equal(this, 1);
|
||||
assert.equal(a, 2);
|
||||
assert.equal(b, 3);
|
||||
assert.equal(arguments.length, 2);
|
||||
}
|
||||
|
||||
const fBound = callBindBasic([f, 1]);
|
||||
|
||||
delete Function.prototype.call;
|
||||
delete Function.prototype.bind;
|
||||
|
||||
fBound(2, 3);
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
Clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/call-bind-apply-helpers
|
||||
[npm-version-svg]: https://versionbadg.es/ljharb/call-bind-apply-helpers.svg
|
||||
[deps-svg]: https://david-dm.org/ljharb/call-bind-apply-helpers.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/call-bind-apply-helpers
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/call-bind-apply-helpers/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/call-bind-apply-helpers#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/call-bind-apply-helpers.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/call-bind-apply-helpers.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/call-bind-apply-helpers.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=call-bind-apply-helpers
|
||||
[codecov-image]: https://codecov.io/gh/ljharb/call-bind-apply-helpers/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/ljharb/call-bind-apply-helpers/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bind-apply-helpers
|
||||
[actions-url]: https://github.com/ljharb/call-bind-apply-helpers/actions
|
1
node_modules/call-bind-apply-helpers/actualApply.d.ts
generated
vendored
Normal file
1
node_modules/call-bind-apply-helpers/actualApply.d.ts
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export = Reflect.apply;
|
10
node_modules/call-bind-apply-helpers/actualApply.js
generated
vendored
Normal file
10
node_modules/call-bind-apply-helpers/actualApply.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
var bind = require('function-bind');
|
||||
|
||||
var $apply = require('./functionApply');
|
||||
var $call = require('./functionCall');
|
||||
var $reflectApply = require('./reflectApply');
|
||||
|
||||
/** @type {import('./actualApply')} */
|
||||
module.exports = $reflectApply || bind.call($call, $apply);
|
19
node_modules/call-bind-apply-helpers/applyBind.d.ts
generated
vendored
Normal file
19
node_modules/call-bind-apply-helpers/applyBind.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
import actualApply from './actualApply';
|
||||
|
||||
type TupleSplitHead<T extends any[], N extends number> = T['length'] extends N
|
||||
? T
|
||||
: T extends [...infer R, any]
|
||||
? TupleSplitHead<R, N>
|
||||
: never
|
||||
|
||||
type TupleSplitTail<T, N extends number, O extends any[] = []> = O['length'] extends N
|
||||
? T
|
||||
: T extends [infer F, ...infer R]
|
||||
? TupleSplitTail<[...R], N, [...O, F]>
|
||||
: never
|
||||
|
||||
type TupleSplit<T extends any[], N extends number> = [TupleSplitHead<T, N>, TupleSplitTail<T, N>]
|
||||
|
||||
declare function applyBind(...args: TupleSplit<Parameters<typeof actualApply>, 2>[1]): ReturnType<typeof actualApply>;
|
||||
|
||||
export = applyBind;
|
10
node_modules/call-bind-apply-helpers/applyBind.js
generated
vendored
Normal file
10
node_modules/call-bind-apply-helpers/applyBind.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
var bind = require('function-bind');
|
||||
var $apply = require('./functionApply');
|
||||
var actualApply = require('./actualApply');
|
||||
|
||||
/** @type {import('./applyBind')} */
|
||||
module.exports = function applyBind() {
|
||||
return actualApply(bind, $apply, arguments);
|
||||
};
|
1
node_modules/call-bind-apply-helpers/functionApply.d.ts
generated
vendored
Normal file
1
node_modules/call-bind-apply-helpers/functionApply.d.ts
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export = Function.prototype.apply;
|
4
node_modules/call-bind-apply-helpers/functionApply.js
generated
vendored
Normal file
4
node_modules/call-bind-apply-helpers/functionApply.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('./functionApply')} */
|
||||
module.exports = Function.prototype.apply;
|
1
node_modules/call-bind-apply-helpers/functionCall.d.ts
generated
vendored
Normal file
1
node_modules/call-bind-apply-helpers/functionCall.d.ts
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export = Function.prototype.call;
|
4
node_modules/call-bind-apply-helpers/functionCall.js
generated
vendored
Normal file
4
node_modules/call-bind-apply-helpers/functionCall.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('./functionCall')} */
|
||||
module.exports = Function.prototype.call;
|
64
node_modules/call-bind-apply-helpers/index.d.ts
generated
vendored
Normal file
64
node_modules/call-bind-apply-helpers/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
type RemoveFromTuple<
|
||||
Tuple extends readonly unknown[],
|
||||
RemoveCount extends number,
|
||||
Index extends 1[] = []
|
||||
> = Index["length"] extends RemoveCount
|
||||
? Tuple
|
||||
: Tuple extends [infer First, ...infer Rest]
|
||||
? RemoveFromTuple<Rest, RemoveCount, [...Index, 1]>
|
||||
: Tuple;
|
||||
|
||||
type ConcatTuples<
|
||||
Prefix extends readonly unknown[],
|
||||
Suffix extends readonly unknown[]
|
||||
> = [...Prefix, ...Suffix];
|
||||
|
||||
type ExtractFunctionParams<T> = T extends (this: infer TThis, ...args: infer P extends readonly unknown[]) => infer R
|
||||
? { thisArg: TThis; params: P; returnType: R }
|
||||
: never;
|
||||
|
||||
type BindFunction<
|
||||
T extends (this: any, ...args: any[]) => any,
|
||||
TThis,
|
||||
TBoundArgs extends readonly unknown[],
|
||||
ReceiverBound extends boolean
|
||||
> = ExtractFunctionParams<T> extends {
|
||||
thisArg: infer OrigThis;
|
||||
params: infer P extends readonly unknown[];
|
||||
returnType: infer R;
|
||||
}
|
||||
? ReceiverBound extends true
|
||||
? (...args: RemoveFromTuple<P, Extract<TBoundArgs["length"], number>>) => R extends [OrigThis, ...infer Rest]
|
||||
? [TThis, ...Rest] // Replace `this` with `thisArg`
|
||||
: R
|
||||
: <U, RemainingArgs extends RemoveFromTuple<P, Extract<TBoundArgs["length"], number>>>(
|
||||
thisArg: U,
|
||||
...args: RemainingArgs
|
||||
) => R extends [OrigThis, ...infer Rest]
|
||||
? [U, ...ConcatTuples<TBoundArgs, Rest>] // Preserve bound args in return type
|
||||
: R
|
||||
: never;
|
||||
|
||||
declare function callBind<
|
||||
const T extends (this: any, ...args: any[]) => any,
|
||||
Extracted extends ExtractFunctionParams<T>,
|
||||
const TBoundArgs extends Partial<Extracted["params"]> & readonly unknown[],
|
||||
const TThis extends Extracted["thisArg"]
|
||||
>(
|
||||
args: [fn: T, thisArg: TThis, ...boundArgs: TBoundArgs]
|
||||
): BindFunction<T, TThis, TBoundArgs, true>;
|
||||
|
||||
declare function callBind<
|
||||
const T extends (this: any, ...args: any[]) => any,
|
||||
Extracted extends ExtractFunctionParams<T>,
|
||||
const TBoundArgs extends Partial<Extracted["params"]> & readonly unknown[]
|
||||
>(
|
||||
args: [fn: T, ...boundArgs: TBoundArgs]
|
||||
): BindFunction<T, Extracted["thisArg"], TBoundArgs, false>;
|
||||
|
||||
declare function callBind<const TArgs extends readonly unknown[]>(
|
||||
args: [fn: Exclude<TArgs[0], Function>, ...rest: TArgs]
|
||||
): never;
|
||||
|
||||
// export as namespace callBind;
|
||||
export = callBind;
|
15
node_modules/call-bind-apply-helpers/index.js
generated
vendored
Normal file
15
node_modules/call-bind-apply-helpers/index.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
var bind = require('function-bind');
|
||||
var $TypeError = require('es-errors/type');
|
||||
|
||||
var $call = require('./functionCall');
|
||||
var $actualApply = require('./actualApply');
|
||||
|
||||
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
|
||||
module.exports = function callBindBasic(args) {
|
||||
if (args.length < 1 || typeof args[0] !== 'function') {
|
||||
throw new $TypeError('a function is required');
|
||||
}
|
||||
return $actualApply(bind, $call, args);
|
||||
};
|
85
node_modules/call-bind-apply-helpers/package.json
generated
vendored
Normal file
85
node_modules/call-bind-apply-helpers/package.json
generated
vendored
Normal file
|
@ -0,0 +1,85 @@
|
|||
{
|
||||
"name": "call-bind-apply-helpers",
|
||||
"version": "1.0.2",
|
||||
"description": "Helper functions around Function call/apply/bind, for use in `call-bind`",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
".": "./index.js",
|
||||
"./actualApply": "./actualApply.js",
|
||||
"./applyBind": "./applyBind.js",
|
||||
"./functionApply": "./functionApply.js",
|
||||
"./functionCall": "./functionCall.js",
|
||||
"./reflectApply": "./reflectApply.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=auto",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prelint": "evalmd README.md",
|
||||
"lint": "eslint --ext=.js,.mjs .",
|
||||
"postlint": "tsc -p . && attw -P",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "npx npm@'>=10.2' audit --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/call-bind-apply-helpers.git"
|
||||
},
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/call-bind-apply-helpers/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/call-bind-apply-helpers#readme",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@arethetypeswrong/cli": "^0.17.3",
|
||||
"@ljharb/eslint-config": "^21.1.1",
|
||||
"@ljharb/tsconfig": "^0.2.3",
|
||||
"@types/for-each": "^0.3.3",
|
||||
"@types/function-bind": "^1.1.10",
|
||||
"@types/object-inspect": "^1.13.0",
|
||||
"@types/tape": "^5.8.1",
|
||||
"auto-changelog": "^2.5.0",
|
||||
"encoding": "^0.1.13",
|
||||
"es-value-fixtures": "^1.7.1",
|
||||
"eslint": "=8.8.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"for-each": "^0.3.5",
|
||||
"has-strict-mode": "^1.1.0",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"object-inspect": "^1.13.4",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.9.0",
|
||||
"typescript": "next"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
}
|
3
node_modules/call-bind-apply-helpers/reflectApply.d.ts
generated
vendored
Normal file
3
node_modules/call-bind-apply-helpers/reflectApply.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
declare const reflectApply: false | typeof Reflect.apply;
|
||||
|
||||
export = reflectApply;
|
4
node_modules/call-bind-apply-helpers/reflectApply.js
generated
vendored
Normal file
4
node_modules/call-bind-apply-helpers/reflectApply.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('./reflectApply')} */
|
||||
module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
63
node_modules/call-bind-apply-helpers/test/index.js
generated
vendored
Normal file
63
node_modules/call-bind-apply-helpers/test/index.js
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
'use strict';
|
||||
|
||||
var callBind = require('../');
|
||||
var hasStrictMode = require('has-strict-mode')();
|
||||
var forEach = require('for-each');
|
||||
var inspect = require('object-inspect');
|
||||
var v = require('es-value-fixtures');
|
||||
|
||||
var test = require('tape');
|
||||
|
||||
test('callBindBasic', function (t) {
|
||||
forEach(v.nonFunctions, function (nonFunction) {
|
||||
t['throws'](
|
||||
// @ts-expect-error
|
||||
function () { callBind([nonFunction]); },
|
||||
TypeError,
|
||||
inspect(nonFunction) + ' is not a function'
|
||||
);
|
||||
});
|
||||
|
||||
var sentinel = { sentinel: true };
|
||||
/** @type {<T, A extends number, B extends number>(this: T, a: A, b: B) => [T | undefined, A, B]} */
|
||||
var func = function (a, b) {
|
||||
// eslint-disable-next-line no-invalid-this
|
||||
return [!hasStrictMode && this === global ? undefined : this, a, b];
|
||||
};
|
||||
t.equal(func.length, 2, 'original function length is 2');
|
||||
|
||||
/** type {(thisArg: unknown, a: number, b: number) => [unknown, number, number]} */
|
||||
var bound = callBind([func]);
|
||||
/** type {((a: number, b: number) => [typeof sentinel, typeof a, typeof b])} */
|
||||
var boundR = callBind([func, sentinel]);
|
||||
/** type {((b: number) => [typeof sentinel, number, typeof b])} */
|
||||
var boundArg = callBind([func, sentinel, /** @type {const} */ (1)]);
|
||||
|
||||
// @ts-expect-error
|
||||
t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with no args');
|
||||
|
||||
// @ts-expect-error
|
||||
t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args');
|
||||
// @ts-expect-error
|
||||
t.deepEqual(bound(1, 2), [hasStrictMode ? 1 : Object(1), 2, undefined], 'bound func too few args');
|
||||
// @ts-expect-error
|
||||
t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args');
|
||||
// @ts-expect-error
|
||||
t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args');
|
||||
|
||||
t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args');
|
||||
t.deepEqual(bound(1, 2, 3), [hasStrictMode ? 1 : Object(1), 2, 3], 'bound func with right args');
|
||||
t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args');
|
||||
t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg');
|
||||
|
||||
// @ts-expect-error
|
||||
t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args');
|
||||
// @ts-expect-error
|
||||
t.deepEqual(bound(1, 2, 3, 4), [hasStrictMode ? 1 : Object(1), 2, 3], 'bound func with too many args');
|
||||
// @ts-expect-error
|
||||
t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args');
|
||||
// @ts-expect-error
|
||||
t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args');
|
||||
|
||||
t.end();
|
||||
});
|
9
node_modules/call-bind-apply-helpers/tsconfig.json
generated
vendored
Normal file
9
node_modules/call-bind-apply-helpers/tsconfig.json
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"extends": "@ljharb/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "es2021",
|
||||
},
|
||||
"exclude": [
|
||||
"coverage",
|
||||
],
|
||||
}
|
13
node_modules/call-bound/.eslintrc
generated
vendored
Normal file
13
node_modules/call-bound/.eslintrc
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"new-cap": [2, {
|
||||
"capIsNewExceptions": [
|
||||
"GetIntrinsic",
|
||||
],
|
||||
}],
|
||||
},
|
||||
}
|
12
node_modules/call-bound/.github/FUNDING.yml
generated
vendored
Normal file
12
node_modules/call-bound/.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/call-bound
|
||||
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']
|
9
node_modules/call-bound/.nycrc
generated
vendored
Normal file
9
node_modules/call-bound/.nycrc
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
42
node_modules/call-bound/CHANGELOG.md
generated
vendored
Normal file
42
node_modules/call-bound/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
# 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.0.4](https://github.com/ljharb/call-bound/compare/v1.0.3...v1.0.4) - 2025-03-03
|
||||
|
||||
### Commits
|
||||
|
||||
- [types] improve types [`e648922`](https://github.com/ljharb/call-bound/commit/e6489222a9e54f350fbf952ceabe51fd8b6027ff)
|
||||
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `@types/tape`, `es-value-fixtures`, `for-each`, `has-strict-mode`, `object-inspect` [`a42a5eb`](https://github.com/ljharb/call-bound/commit/a42a5ebe6c1b54fcdc7997c7dc64fdca9e936719)
|
||||
- [Deps] update `call-bind-apply-helpers`, `get-intrinsic` [`f529eac`](https://github.com/ljharb/call-bound/commit/f529eac132404c17156bbc23ab2297a25d0f20b8)
|
||||
|
||||
## [v1.0.3](https://github.com/ljharb/call-bound/compare/v1.0.2...v1.0.3) - 2024-12-15
|
||||
|
||||
### Commits
|
||||
|
||||
- [Refactor] use `call-bind-apply-helpers` instead of `call-bind` [`5e0b134`](https://github.com/ljharb/call-bound/commit/5e0b13496df14fb7d05dae9412f088da8d3f75be)
|
||||
- [Deps] update `get-intrinsic` [`41fc967`](https://github.com/ljharb/call-bound/commit/41fc96732a22c7b7e8f381f93ccc54bb6293be2e)
|
||||
- [readme] fix example [`79a0137`](https://github.com/ljharb/call-bound/commit/79a0137723f7c6d09c9c05452bbf8d5efb5d6e49)
|
||||
- [meta] add `sideEffects` flag [`08b07be`](https://github.com/ljharb/call-bound/commit/08b07be7f1c03f67dc6f3cdaf0906259771859f7)
|
||||
|
||||
## [v1.0.2](https://github.com/ljharb/call-bound/compare/v1.0.1...v1.0.2) - 2024-12-10
|
||||
|
||||
### Commits
|
||||
|
||||
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `gopd` [`e6a5ffe`](https://github.com/ljharb/call-bound/commit/e6a5ffe849368fe4f74dfd6cdeca1b9baa39e8d5)
|
||||
- [Deps] update `call-bind`, `get-intrinsic` [`2aeb5b5`](https://github.com/ljharb/call-bound/commit/2aeb5b521dc2b2683d1345c753ea1161de2d1c14)
|
||||
- [types] improve return type [`1a0c9fe`](https://github.com/ljharb/call-bound/commit/1a0c9fe3114471e7ca1f57d104e2efe713bb4871)
|
||||
|
||||
## v1.0.1 - 2024-12-05
|
||||
|
||||
### Commits
|
||||
|
||||
- Initial implementation, tests, readme, types [`6d94121`](https://github.com/ljharb/call-bound/commit/6d94121a9243602e506334069f7a03189fe3363d)
|
||||
- Initial commit [`0eae867`](https://github.com/ljharb/call-bound/commit/0eae867334ea025c33e6e91cdecfc9df96680cf9)
|
||||
- npm init [`71b2479`](https://github.com/ljharb/call-bound/commit/71b2479c6723e0b7d91a6b663613067e98b7b275)
|
||||
- Only apps should have lockfiles [`c3754a9`](https://github.com/ljharb/call-bound/commit/c3754a949b7f9132b47e2d18c1729889736741eb)
|
||||
- [actions] skip `npm ls` in node < 10 [`74275a5`](https://github.com/ljharb/call-bound/commit/74275a5186b8caf6309b6b97472bdcb0df4683a8)
|
||||
- [Dev Deps] add missing peer dep [`1354de8`](https://github.com/ljharb/call-bound/commit/1354de8679413e4ae9c523d85f76fa7a5e032d97)
|
21
node_modules/call-bound/LICENSE
generated
vendored
Normal file
21
node_modules/call-bound/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 Jordan Harband
|
||||
|
||||
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.
|
53
node_modules/call-bound/README.md
generated
vendored
Normal file
53
node_modules/call-bound/README.md
generated
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
# call-bound <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![dependency status][deps-svg]][deps-url]
|
||||
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.
|
||||
|
||||
## Getting started
|
||||
|
||||
```sh
|
||||
npm install --save call-bound
|
||||
```
|
||||
|
||||
## Usage/Examples
|
||||
|
||||
```js
|
||||
const assert = require('assert');
|
||||
const callBound = require('call-bound');
|
||||
|
||||
const slice = callBound('Array.prototype.slice');
|
||||
|
||||
delete Function.prototype.call;
|
||||
delete Function.prototype.bind;
|
||||
delete Array.prototype.slice;
|
||||
|
||||
assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
Clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/call-bound
|
||||
[npm-version-svg]: https://versionbadg.es/ljharb/call-bound.svg
|
||||
[deps-svg]: https://david-dm.org/ljharb/call-bound.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/call-bound
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/call-bound/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/call-bound#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/call-bound.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/call-bound.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/call-bound.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=call-bound
|
||||
[codecov-image]: https://codecov.io/gh/ljharb/call-bound/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/ljharb/call-bound/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bound
|
||||
[actions-url]: https://github.com/ljharb/call-bound/actions
|
94
node_modules/call-bound/index.d.ts
generated
vendored
Normal file
94
node_modules/call-bound/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,94 @@
|
|||
type Intrinsic = typeof globalThis;
|
||||
|
||||
type IntrinsicName = keyof Intrinsic | `%${keyof Intrinsic}%`;
|
||||
|
||||
type IntrinsicPath = IntrinsicName | `${StripPercents<IntrinsicName>}.${string}` | `%${StripPercents<IntrinsicName>}.${string}%`;
|
||||
|
||||
type AllowMissing = boolean;
|
||||
|
||||
type StripPercents<T extends string> = T extends `%${infer U}%` ? U : T;
|
||||
|
||||
type BindMethodPrecise<F> =
|
||||
F extends (this: infer This, ...args: infer Args) => infer R
|
||||
? (obj: This, ...args: Args) => R
|
||||
: F extends {
|
||||
(this: infer This1, ...args: infer Args1): infer R1;
|
||||
(this: infer This2, ...args: infer Args2): infer R2
|
||||
}
|
||||
? {
|
||||
(obj: This1, ...args: Args1): R1;
|
||||
(obj: This2, ...args: Args2): R2
|
||||
}
|
||||
: never
|
||||
|
||||
// Extract method type from a prototype
|
||||
type GetPrototypeMethod<T extends keyof typeof globalThis, M extends string> =
|
||||
(typeof globalThis)[T] extends { prototype: any }
|
||||
? M extends keyof (typeof globalThis)[T]['prototype']
|
||||
? (typeof globalThis)[T]['prototype'][M]
|
||||
: never
|
||||
: never
|
||||
|
||||
// Get static property/method
|
||||
type GetStaticMember<T extends keyof typeof globalThis, P extends string> =
|
||||
P extends keyof (typeof globalThis)[T] ? (typeof globalThis)[T][P] : never
|
||||
|
||||
// Type that maps string path to actual bound function or value with better precision
|
||||
type BoundIntrinsic<S extends string> =
|
||||
S extends `${infer Obj}.prototype.${infer Method}`
|
||||
? Obj extends keyof typeof globalThis
|
||||
? BindMethodPrecise<GetPrototypeMethod<Obj, Method & string>>
|
||||
: unknown
|
||||
: S extends `${infer Obj}.${infer Prop}`
|
||||
? Obj extends keyof typeof globalThis
|
||||
? GetStaticMember<Obj, Prop & string>
|
||||
: unknown
|
||||
: unknown
|
||||
|
||||
declare function arraySlice<T>(array: readonly T[], start?: number, end?: number): T[];
|
||||
declare function arraySlice<T>(array: ArrayLike<T>, start?: number, end?: number): T[];
|
||||
declare function arraySlice<T>(array: IArguments, start?: number, end?: number): T[];
|
||||
|
||||
// Special cases for methods that need explicit typing
|
||||
interface SpecialCases {
|
||||
'%Object.prototype.isPrototypeOf%': (thisArg: {}, obj: unknown) => boolean;
|
||||
'%String.prototype.replace%': {
|
||||
(str: string, searchValue: string | RegExp, replaceValue: string): string;
|
||||
(str: string, searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string
|
||||
};
|
||||
'%Object.prototype.toString%': (obj: {}) => string;
|
||||
'%Object.prototype.hasOwnProperty%': (obj: {}, v: PropertyKey) => boolean;
|
||||
'%Array.prototype.slice%': typeof arraySlice;
|
||||
'%Array.prototype.map%': <T, U>(array: readonly T[], callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any) => U[];
|
||||
'%Array.prototype.filter%': <T>(array: readonly T[], predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any) => T[];
|
||||
'%Array.prototype.indexOf%': <T>(array: readonly T[], searchElement: T, fromIndex?: number) => number;
|
||||
'%Function.prototype.apply%': <T, A extends any[], R>(fn: (...args: A) => R, thisArg: any, args: A) => R;
|
||||
'%Function.prototype.call%': <T, A extends any[], R>(fn: (...args: A) => R, thisArg: any, ...args: A) => R;
|
||||
'%Function.prototype.bind%': <T, A extends any[], R>(fn: (...args: A) => R, thisArg: any, ...args: A) => (...remainingArgs: A) => R;
|
||||
'%Promise.prototype.then%': {
|
||||
<T, R>(promise: Promise<T>, onfulfilled: (value: T) => R | PromiseLike<R>): Promise<R>;
|
||||
<T, R>(promise: Promise<T>, onfulfilled: ((value: T) => R | PromiseLike<R>) | undefined | null, onrejected: (reason: any) => R | PromiseLike<R>): Promise<R>;
|
||||
};
|
||||
'%RegExp.prototype.test%': (regexp: RegExp, str: string) => boolean;
|
||||
'%RegExp.prototype.exec%': (regexp: RegExp, str: string) => RegExpExecArray | null;
|
||||
'%Error.prototype.toString%': (error: Error) => string;
|
||||
'%TypeError.prototype.toString%': (error: TypeError) => string;
|
||||
'%String.prototype.split%': (
|
||||
obj: unknown,
|
||||
splitter: string | RegExp | {
|
||||
[Symbol.split](string: string, limit?: number): string[];
|
||||
},
|
||||
limit?: number | undefined
|
||||
) => string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a bound function for a prototype method, or a value for a static property.
|
||||
*
|
||||
* @param name - The name of the intrinsic (e.g. 'Array.prototype.slice')
|
||||
* @param {AllowMissing} [allowMissing] - Whether to allow missing intrinsics (default: false)
|
||||
*/
|
||||
declare function callBound<K extends keyof SpecialCases | StripPercents<keyof SpecialCases>, S extends IntrinsicPath>(name: K, allowMissing?: AllowMissing): SpecialCases[`%${StripPercents<K>}%`];
|
||||
declare function callBound<K extends keyof SpecialCases | StripPercents<keyof SpecialCases>, S extends IntrinsicPath>(name: S, allowMissing?: AllowMissing): BoundIntrinsic<S>;
|
||||
|
||||
export = callBound;
|
19
node_modules/call-bound/index.js
generated
vendored
Normal file
19
node_modules/call-bound/index.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var callBindBasic = require('call-bind-apply-helpers');
|
||||
|
||||
/** @type {(thisArg: string, searchString: string, position?: number) => number} */
|
||||
var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);
|
||||
|
||||
/** @type {import('.')} */
|
||||
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
||||
/* eslint no-extra-parens: 0 */
|
||||
|
||||
var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing));
|
||||
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
||||
return callBindBasic(/** @type {const} */ ([intrinsic]));
|
||||
}
|
||||
return intrinsic;
|
||||
};
|
99
node_modules/call-bound/package.json
generated
vendored
Normal file
99
node_modules/call-bound/package.json
generated
vendored
Normal file
|
@ -0,0 +1,99 @@
|
|||
{
|
||||
"name": "call-bound",
|
||||
"version": "1.0.4",
|
||||
"description": "Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
".": "./index.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=auto",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prelint": "evalmd README.md",
|
||||
"lint": "eslint --ext=.js,.mjs .",
|
||||
"postlint": "tsc -p . && attw -P",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "npx npm@'>=10.2' audit --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/call-bound.git"
|
||||
},
|
||||
"keywords": [
|
||||
"javascript",
|
||||
"ecmascript",
|
||||
"es",
|
||||
"js",
|
||||
"callbind",
|
||||
"callbound",
|
||||
"call",
|
||||
"bind",
|
||||
"bound",
|
||||
"call-bind",
|
||||
"call-bound",
|
||||
"function",
|
||||
"es-abstract"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/call-bound/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/call-bound#readme",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.2",
|
||||
"get-intrinsic": "^1.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@arethetypeswrong/cli": "^0.17.4",
|
||||
"@ljharb/eslint-config": "^21.1.1",
|
||||
"@ljharb/tsconfig": "^0.3.0",
|
||||
"@types/call-bind": "^1.0.5",
|
||||
"@types/get-intrinsic": "^1.2.3",
|
||||
"@types/tape": "^5.8.1",
|
||||
"auto-changelog": "^2.5.0",
|
||||
"encoding": "^0.1.13",
|
||||
"es-value-fixtures": "^1.7.1",
|
||||
"eslint": "=8.8.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"for-each": "^0.3.5",
|
||||
"gopd": "^1.2.0",
|
||||
"has-strict-mode": "^1.1.0",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"object-inspect": "^1.13.4",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.9.0",
|
||||
"typescript": "next"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
}
|
61
node_modules/call-bound/test/index.js
generated
vendored
Normal file
61
node_modules/call-bound/test/index.js
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
|
||||
var callBound = require('../');
|
||||
|
||||
/** @template {true} T @template U @typedef {T extends U ? T : never} AssertType */
|
||||
|
||||
test('callBound', function (t) {
|
||||
// static primitive
|
||||
t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself');
|
||||
t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself');
|
||||
|
||||
// static non-function object
|
||||
t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself');
|
||||
t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself');
|
||||
t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself');
|
||||
t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself');
|
||||
|
||||
// static function
|
||||
t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself');
|
||||
t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself');
|
||||
|
||||
// prototype primitive
|
||||
t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself');
|
||||
t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself');
|
||||
|
||||
var x = callBound('Object.prototype.toString');
|
||||
var y = callBound('%Object.prototype.toString%');
|
||||
|
||||
// prototype function
|
||||
t.notEqual(x, Object.prototype.toString, 'Object.prototype.toString does not yield itself');
|
||||
t.notEqual(y, Object.prototype.toString, '%Object.prototype.toString% does not yield itself');
|
||||
t.equal(x(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original');
|
||||
t.equal(y(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original');
|
||||
|
||||
t['throws'](
|
||||
// @ts-expect-error
|
||||
function () { callBound('does not exist'); },
|
||||
SyntaxError,
|
||||
'nonexistent intrinsic throws'
|
||||
);
|
||||
t['throws'](
|
||||
// @ts-expect-error
|
||||
function () { callBound('does not exist', true); },
|
||||
SyntaxError,
|
||||
'allowMissing arg still throws for unknown intrinsic'
|
||||
);
|
||||
|
||||
t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) {
|
||||
st['throws'](
|
||||
function () { callBound('WeakRef'); },
|
||||
TypeError,
|
||||
'real but absent intrinsic throws'
|
||||
);
|
||||
st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
10
node_modules/call-bound/tsconfig.json
generated
vendored
Normal file
10
node_modules/call-bound/tsconfig.json
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "@ljharb/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"lib": ["es2024"],
|
||||
},
|
||||
"exclude": [
|
||||
"coverage",
|
||||
],
|
||||
}
|
2
node_modules/corser/.npmignore
generated
vendored
Normal file
2
node_modules/corser/.npmignore
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
example/
|
||||
test/
|
4
node_modules/corser/.travis.yml
generated
vendored
Normal file
4
node_modules/corser/.travis.yml
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- "node"
|
||||
sudo: false
|
19
node_modules/corser/LICENSE
generated
vendored
Normal file
19
node_modules/corser/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
Copyright (C) 2012 Alexander Grüneberg
|
||||
|
||||
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.
|
202
node_modules/corser/README.md
generated
vendored
Normal file
202
node_modules/corser/README.md
generated
vendored
Normal file
|
@ -0,0 +1,202 @@
|
|||
Corser
|
||||
=======
|
||||
|
||||
[](http://www.repostatus.org/#active)
|
||||
[](http://travis-ci.org/agrueneberg/Corser)
|
||||
|
||||
A highly configurable, middleware compatible implementation of [CORS](http://www.w3.org/TR/cors/) for [Node.js](http://nodejs.org/).
|
||||
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
### 2.0.1 (August 16, 2016)
|
||||
|
||||
* Add workaround for [Chrome 52 sending empty `Access-Control-Request-Headers` header](https://bugs.chromium.org/p/chromium/issues/detail?id=633729).
|
||||
|
||||
### 2.0.0 (March 22, 2014)
|
||||
|
||||
* Preflight requests are automatically closed. If there is a need for handling `OPTIONS` requests, check the `endPreflightRequests` option.
|
||||
* The parameters of the callback function in dynamic origin checking are now `(err, matches)` instead of just `(matches)`.
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
### How to use Corser as a middleware in Express
|
||||
|
||||
See `example/express/` for a working example.
|
||||
|
||||
var express, corser, app;
|
||||
|
||||
express = require("express");
|
||||
corser = require("corser");
|
||||
|
||||
app = express();
|
||||
|
||||
app.use(corser.create());
|
||||
|
||||
app.get("/", function (req, res) {
|
||||
res.writeHead(200);
|
||||
res.end("Nice weather today, huh?");
|
||||
});
|
||||
|
||||
app.listen(1337);
|
||||
|
||||
### How to use Corser as a middleware in Connect
|
||||
|
||||
See `example/connect/` for a working example.
|
||||
|
||||
var connect, corser, app;
|
||||
|
||||
connect = require("connect");
|
||||
corser = require("corser");
|
||||
|
||||
app = connect();
|
||||
|
||||
app.use(corser.create());
|
||||
|
||||
app.use(function (req, res) {
|
||||
res.writeHead(200);
|
||||
res.end("Nice weather today, huh?");
|
||||
});
|
||||
|
||||
app.listen(1337);
|
||||
|
||||
### How to use Corser with plain `http`
|
||||
|
||||
var http, corser, corserRequestListener;
|
||||
|
||||
http = require("http");
|
||||
corser = require("corser");
|
||||
|
||||
// Create Corser request listener.
|
||||
corserRequestListener = corser.create();
|
||||
|
||||
http.createServer(function (req, res) {
|
||||
// Route req and res through the request listener.
|
||||
corserRequestListener(req, res, function () {
|
||||
res.writeHead(200);
|
||||
res.end("Nice weather today, huh?");
|
||||
});
|
||||
}).listen(1337);
|
||||
|
||||
|
||||
API
|
||||
---
|
||||
|
||||
### Creating a Corser request listener
|
||||
|
||||
Creating a Corser request listener that generates the appropriate response headers to enable CORS is as simple as:
|
||||
|
||||
corser.create()
|
||||
|
||||
This is the equivalent of setting a response header of `Access-Control-Allow-Origin: *`. If you want to restrict the origins, or allow more sophisticated request or response headers, you have to pass a configuration object to `corser.create`.
|
||||
|
||||
Corser will automatically end preflight requests for you. A preflight request is a special `OPTIONS` request that the browser sends under certain conditions to negotiate with the server what methods, request headers and response headers are allowed for a CORS request. If you need to use the `OPTIONS` method for other stuff, just set `endPreflightRequests` to `false` and terminate those requests yourself:
|
||||
|
||||
var corserRequestListener;
|
||||
|
||||
corserRequestListener = corser.create({
|
||||
endPreflightRequests: false
|
||||
});
|
||||
|
||||
corserRequestListener(req, res, function () {
|
||||
if (req.method === "OPTIONS") {
|
||||
// End CORS preflight request.
|
||||
res.writeHead(204);
|
||||
res.end();
|
||||
} else {
|
||||
// Implement other HTTP methods.
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
#### Configuration Object
|
||||
|
||||
A configuration object with the following properties can be passed to `corser.create`.
|
||||
|
||||
##### `origins`
|
||||
|
||||
A case-sensitive whitelist of origins. Unless unbound, if the request comes from an origin that is not in this list, it will not be handled by CORS.
|
||||
|
||||
To allow for dynamic origin checking, a function `(origin, callback)` can be passed instead of an array. `origin` is the Origin header, `callback` is a function `(err, matches)`, where `matches` is a boolean flag that indicates whether the given Origin header matches or not.
|
||||
|
||||
Default: unbound, i.e. every origin is accepted.
|
||||
|
||||
##### `methods`
|
||||
|
||||
An uppercase whitelist of methods. If the request uses a method that is not in this list, it will not be handled by CORS.
|
||||
|
||||
Setting a value here will overwrite the list of default simple methods. To not lose them, concat the methods you want to add with `corser.simpleMethods`: `corser.simpleMethods.concat(["PUT", "DELETE"])`.
|
||||
|
||||
Default: simple methods (`GET`, `HEAD`, `POST`).
|
||||
|
||||
##### `requestHeaders`
|
||||
|
||||
A case-insensitive whitelist of request headers. If the request uses a request header that is not in this list, it will not be handled by CORS.
|
||||
|
||||
Setting a value here will overwrite the list of default simple request headers. To not lose them, concat the request headers you want to add with `corser.simpleRequestHeaders`: `corser.simpleRequestHeaders.concat(["Authorization"])`.
|
||||
|
||||
Default: simple request headers (`Accept`, `Accept-Language`, `Content-Language`, `Content-Type`, `Last-Event-ID`).
|
||||
|
||||
##### `responseHeaders`
|
||||
|
||||
A case-insensitive whitelist of response headers. Any response header that is not in this list will be filtered out by the user-agent (the browser).
|
||||
|
||||
Setting a value here will overwrite the list of default simple response headers. To not lose them, concat the response headers you want to add with `corser.simpleResponseHeaders`: `corser.simpleResponseHeaders.concat(["ETag"])`.
|
||||
|
||||
Default: simple response headers (`Cache-Control`, `Content-Language`, `Content-Type`, `Expires`, `Last-Modified`, `Pragma`).
|
||||
|
||||
##### `supportsCredentials`
|
||||
|
||||
A boolean that indicates if cookie credentials can be transferred as part of a CORS request. Currently, only a few HTML5 elements can benefit from this setting.
|
||||
|
||||
Default: `false`.
|
||||
|
||||
##### `maxAge`
|
||||
|
||||
An integer that indicates the maximum amount of time in seconds that a preflight request is kept in the client-side preflight result cache.
|
||||
|
||||
Default: not set.
|
||||
|
||||
##### `endPreflightRequests`
|
||||
|
||||
A boolean that indicates if CORS preflight requests should be automatically closed.
|
||||
|
||||
Default: `true`.
|
||||
|
||||
|
||||
FAQ
|
||||
---
|
||||
|
||||
### Ajax call returns `Origin X is not allowed by Access-Control-Allow-Origin`
|
||||
|
||||
Check if the `Origin` header of your request matches one of the origins provided in the `origins` property of the configuration object. If you didn't set any `origins` property, jump to the next question.
|
||||
|
||||
|
||||
### Ajax call still returns `Origin X is not allowed by Access-Control-Allow-Origin`
|
||||
|
||||
Your request might use a non-simple method or one or more non-simple headers. According to the specification, the set of simple methods is `GET`, `HEAD`, and `POST`, and the set of simple request headers is `Accept`, `Accept-Language`, `Content-Language`, `Content-Type`, and `Last-Event-ID`. If your request uses **any** other method or header, you have to explicitly list them in the `methods` or `requestHeaders` property of the configuration object.
|
||||
|
||||
|
||||
#### Example
|
||||
|
||||
You want to allow requests that use an `X-Requested-With` header. Pass the following configuration object to `corser.create`:
|
||||
|
||||
corser.create({
|
||||
requestHeaders: corser.simpleRequestHeaders.concat(["X-Requested-With"])
|
||||
});
|
||||
|
||||
|
||||
### Getting a response header returns `Refused to get unsafe header "X"`
|
||||
|
||||
Your browser blocks every non-simple response headers that was not explicitly allowed in the preflight request. The set of simple response headers is `Cache-Control`, `Content-Language`, `Content-Type`, `Expires`, `Last-Modified`, `Pragma`. If you want to access **any** other response header, you have to explicitly list them in the `responseHeaders` property of the configuration object.
|
||||
|
||||
#### Example
|
||||
|
||||
You want to allow clients to read the `ETag` header of a response. Pass the following configuration object to `corser.create`:
|
||||
|
||||
corser.create({
|
||||
responseHeaders: corser.simpleResponseHeaders.concat(["ETag"])
|
||||
});
|
228
node_modules/corser/lib/corser.js
generated
vendored
Normal file
228
node_modules/corser/lib/corser.js
generated
vendored
Normal file
|
@ -0,0 +1,228 @@
|
|||
/**
|
||||
* Specification: http://www.w3.org/TR/2012/WD-cors-20120403/
|
||||
* W3C Working Draft 3 April 2012
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
/*jshint node:true */
|
||||
|
||||
var simpleMethods, simpleRequestHeaders, simpleResponseHeaders, toLowerCase, checkOriginMatch;
|
||||
|
||||
// A method is said to be a simple method if it is a case-sensitive match for one of the following:
|
||||
Object.defineProperty(exports, "simpleMethods", {
|
||||
get: function () {
|
||||
return [
|
||||
"GET",
|
||||
"HEAD",
|
||||
"POST"
|
||||
];
|
||||
}
|
||||
});
|
||||
simpleMethods = exports.simpleMethods;
|
||||
|
||||
// A header is said to be a simple header if the header field name is an ASCII case-insensitive match for one of
|
||||
// the following:
|
||||
Object.defineProperty(exports, "simpleRequestHeaders", {
|
||||
get: function () {
|
||||
return [
|
||||
"accept",
|
||||
"accept-language",
|
||||
"content-language",
|
||||
"content-type"
|
||||
];
|
||||
}
|
||||
});
|
||||
simpleRequestHeaders = exports.simpleRequestHeaders;
|
||||
|
||||
// A header is said to be a simple response header if the header field name is an ASCII case-insensitive
|
||||
// match for one of the following:
|
||||
Object.defineProperty(exports, "simpleResponseHeaders", {
|
||||
get: function () {
|
||||
return [
|
||||
"cache-control",
|
||||
"content-language",
|
||||
"content-type",
|
||||
"expires",
|
||||
"last-modified",
|
||||
"pragma"
|
||||
];
|
||||
}
|
||||
});
|
||||
simpleResponseHeaders = exports.simpleResponseHeaders;
|
||||
|
||||
toLowerCase = function (array) {
|
||||
return array.map(function (el) {
|
||||
return el.toLowerCase();
|
||||
});
|
||||
};
|
||||
|
||||
checkOriginMatch = function (originHeader, origins, callback) {
|
||||
if (typeof origins === "function") {
|
||||
origins(originHeader, function (err, allow) {
|
||||
callback(err, allow);
|
||||
});
|
||||
} else if (origins.length > 0) {
|
||||
callback(null, origins.some(function (origin) {
|
||||
return origin === originHeader;
|
||||
}));
|
||||
} else {
|
||||
// Always matching is acceptable since the list of origins can be unbounded.
|
||||
callback(null, true);
|
||||
}
|
||||
};
|
||||
|
||||
exports.create = function (options) {
|
||||
options = options || {};
|
||||
options.origins = options.origins || [];
|
||||
options.methods = options.methods || simpleMethods;
|
||||
if (options.hasOwnProperty("requestHeaders") === true) {
|
||||
options.requestHeaders = toLowerCase(options.requestHeaders);
|
||||
} else {
|
||||
options.requestHeaders = simpleRequestHeaders;
|
||||
}
|
||||
if (options.hasOwnProperty("responseHeaders") === true) {
|
||||
options.responseHeaders = toLowerCase(options.responseHeaders);
|
||||
} else {
|
||||
options.responseHeaders = simpleResponseHeaders;
|
||||
}
|
||||
options.maxAge = options.maxAge || null;
|
||||
options.supportsCredentials = options.supportsCredentials || false;
|
||||
if (options.hasOwnProperty("endPreflightRequests") === false) {
|
||||
options.endPreflightRequests = true;
|
||||
}
|
||||
return function (req, res, next) {
|
||||
var methodMatches, headersMatch, requestMethod, requestHeaders, exposedHeaders, endPreflight;
|
||||
// If the Origin header is not present terminate this set of steps.
|
||||
if (!req.headers.hasOwnProperty("origin")) {
|
||||
// The request is outside the scope of the CORS specification. If there is no Origin header,
|
||||
// it could be a same-origin request. Let's let the user-agent handle this situation.
|
||||
next();
|
||||
} else {
|
||||
// If the value of the Origin header is not a case-sensitive match for any of the values in
|
||||
// list of origins, do not set any additional headers and terminate this set of steps.
|
||||
checkOriginMatch(req.headers.origin, options.origins, function (err, originMatches) {
|
||||
if (err !== null) {
|
||||
next(err);
|
||||
} else {
|
||||
if (typeof originMatches !== "boolean" || originMatches === false) {
|
||||
next();
|
||||
} else {
|
||||
// Respond to preflight request.
|
||||
if (req.method === "OPTIONS") {
|
||||
endPreflight = function () {
|
||||
if (options.endPreflightRequests === true) {
|
||||
res.writeHead(204);
|
||||
res.end();
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
};
|
||||
// If there is no Access-Control-Request-Method header or if parsing failed, do not set
|
||||
// any additional headers and terminate this set of steps.
|
||||
if (!req.headers.hasOwnProperty("access-control-request-method")) {
|
||||
endPreflight();
|
||||
} else {
|
||||
requestMethod = req.headers["access-control-request-method"];
|
||||
// If there are no Access-Control-Request-Headers headers let header field-names be the
|
||||
// empty list. If parsing failed do not set any additional headers and terminate this set
|
||||
// of steps.
|
||||
// Checking for an empty header is a workaround for a bug Chrome 52:
|
||||
// https://bugs.chromium.org/p/chromium/issues/detail?id=633729
|
||||
if (req.headers.hasOwnProperty("access-control-request-headers") && req.headers["access-control-request-headers"] !== "") {
|
||||
requestHeaders = toLowerCase(req.headers["access-control-request-headers"].split(/,\s*/));
|
||||
} else {
|
||||
requestHeaders = [];
|
||||
}
|
||||
// If method is not a case-sensitive match for any of the values in list of methods do not
|
||||
// set any additional headers and terminate this set of steps.
|
||||
methodMatches = options.methods.indexOf(requestMethod) !== -1;
|
||||
if (methodMatches === false) {
|
||||
endPreflight();
|
||||
} else {
|
||||
// If any of the header field-names is not a ASCII case-insensitive match for any of
|
||||
// the values in list of headers do not set any additional headers and terminate this
|
||||
// set of steps.
|
||||
headersMatch = requestHeaders.every(function (requestHeader) {
|
||||
// Browsers automatically add Origin to Access-Control-Request-Headers. However,
|
||||
// Origin is not one of the simple request headers. Therefore, the header is
|
||||
// accepted even if it is not in the list of request headers because CORS would
|
||||
// not work without it.
|
||||
if (requestHeader === "origin") {
|
||||
return true;
|
||||
} else {
|
||||
if (options.requestHeaders.indexOf(requestHeader) !== -1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (headersMatch === false) {
|
||||
endPreflight();
|
||||
} else {
|
||||
if (options.supportsCredentials === true) {
|
||||
// If the resource supports credentials add a single Access-Control-Allow-Origin
|
||||
// header, with the value of the Origin header as value, and add a single
|
||||
// Access-Control-Allow-Credentials header with the literal string "true"
|
||||
// as value.
|
||||
res.setHeader("Access-Control-Allow-Origin", req.headers.origin);
|
||||
res.setHeader("Access-Control-Allow-Credentials", "true");
|
||||
} else {
|
||||
// Otherwise, add a single Access-Control-Allow-Origin header, with either the
|
||||
// value of the Origin header or the string "*" as value.
|
||||
if (options.origins.length > 0 || typeof options.origins === "function") {
|
||||
res.setHeader("Access-Control-Allow-Origin", req.headers.origin);
|
||||
} else {
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
}
|
||||
}
|
||||
// Optionally add a single Access-Control-Max-Age header with as value the amount
|
||||
// of seconds the user agent is allowed to cache the result of the request.
|
||||
if (options.maxAge !== null) {
|
||||
res.setHeader("Access-Control-Max-Age", options.maxAge);
|
||||
}
|
||||
// Add one or more Access-Control-Allow-Methods headers consisting of (a subset
|
||||
// of) the list of methods.
|
||||
res.setHeader("Access-Control-Allow-Methods", options.methods.join(","));
|
||||
// Add one or more Access-Control-Allow-Headers headers consisting of (a subset
|
||||
// of) the list of headers.
|
||||
res.setHeader("Access-Control-Allow-Headers", options.requestHeaders.join(","));
|
||||
// And out.
|
||||
endPreflight();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (options.supportsCredentials === true) {
|
||||
// If the resource supports credentials add a single Access-Control-Allow-Origin header,
|
||||
// with the value of the Origin header as value, and add a single
|
||||
// Access-Control-Allow-Credentials header with the literal string "true" as value.
|
||||
res.setHeader("Access-Control-Allow-Origin", req.headers.origin);
|
||||
res.setHeader("Access-Control-Allow-Credentials", "true");
|
||||
} else {
|
||||
// Otherwise, add a single Access-Control-Allow-Origin header, with either the value of
|
||||
// the Origin header or the literal string "*" as value.
|
||||
// If the list of origins is empty, use "*" as value.
|
||||
if (options.origins.length > 0 || typeof options.origins === "function") {
|
||||
res.setHeader("Access-Control-Allow-Origin", req.headers.origin);
|
||||
} else {
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
}
|
||||
}
|
||||
// If the list of exposed headers is not empty add one or more Access-Control-Expose-Headers
|
||||
// headers, with as values the header field names given in the list of exposed headers.
|
||||
exposedHeaders = options.responseHeaders.filter(function (optionsResponseHeader) {
|
||||
return simpleResponseHeaders.indexOf(optionsResponseHeader) === -1;
|
||||
});
|
||||
if (exposedHeaders.length > 0) {
|
||||
res.setHeader("Access-Control-Expose-Headers", exposedHeaders.join(","));
|
||||
}
|
||||
// And out.
|
||||
next();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
24
node_modules/corser/package.json
generated
vendored
Normal file
24
node_modules/corser/package.json
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "corser",
|
||||
"version": "2.0.1",
|
||||
"description": "A highly configurable, middleware compatible implementation of CORS.",
|
||||
"keywords": ["cors", "cross-origin resource sharing", "connect", "express", "middleware"],
|
||||
"bugs": "https://github.com/agrueneberg/Corser/issues",
|
||||
"license": "MIT",
|
||||
"author": "Alexander Grüneberg <alexander.grueneberg@googlemail.com>",
|
||||
"main": "./lib/corser.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/agrueneberg/Corser.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "./node_modules/.bin/mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "1.3.x",
|
||||
"expect.js": "0.1.x"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
}
|
5
node_modules/dunder-proto/.eslintrc
generated
vendored
Normal file
5
node_modules/dunder-proto/.eslintrc
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
}
|
12
node_modules/dunder-proto/.github/FUNDING.yml
generated
vendored
Normal file
12
node_modules/dunder-proto/.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/dunder-proto
|
||||
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']
|
13
node_modules/dunder-proto/.nycrc
generated
vendored
Normal file
13
node_modules/dunder-proto/.nycrc
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"lines": 86,
|
||||
"statements": 85.93,
|
||||
"functions": 82.43,
|
||||
"branches": 76.06,
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
24
node_modules/dunder-proto/CHANGELOG.md
generated
vendored
Normal file
24
node_modules/dunder-proto/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
# 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.0.1](https://github.com/es-shims/dunder-proto/compare/v1.0.0...v1.0.1) - 2024-12-16
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] do not crash when `--disable-proto=throw` [`6c367d9`](https://github.com/es-shims/dunder-proto/commit/6c367d919bc1604778689a297bbdbfea65752847)
|
||||
- [Tests] ensure noproto tests only use the current version of dunder-proto [`b02365b`](https://github.com/es-shims/dunder-proto/commit/b02365b9cf889c4a2cac7be0c3cfc90a789af36c)
|
||||
- [Dev Deps] update `@arethetypeswrong/cli`, `@types/tape` [`e3c5c3b`](https://github.com/es-shims/dunder-proto/commit/e3c5c3bd81cf8cef7dff2eca19e558f0e307f666)
|
||||
- [Deps] update `call-bind-apply-helpers` [`19f1da0`](https://github.com/es-shims/dunder-proto/commit/19f1da028b8dd0d05c85bfd8f7eed2819b686450)
|
||||
|
||||
## v1.0.0 - 2024-12-06
|
||||
|
||||
### Commits
|
||||
|
||||
- Initial implementation, tests, readme, types [`a5b74b0`](https://github.com/es-shims/dunder-proto/commit/a5b74b0082f5270cb0905cd9a2e533cee7498373)
|
||||
- Initial commit [`73fb5a3`](https://github.com/es-shims/dunder-proto/commit/73fb5a353b51ac2ab00c9fdeb0114daffd4c07a8)
|
||||
- npm init [`80152dc`](https://github.com/es-shims/dunder-proto/commit/80152dc98155da4eb046d9f67a87ed96e8280a1d)
|
||||
- Only apps should have lockfiles [`03e6660`](https://github.com/es-shims/dunder-proto/commit/03e6660a1d70dc401f3e217a031475ec537243dd)
|
21
node_modules/dunder-proto/LICENSE
generated
vendored
Normal file
21
node_modules/dunder-proto/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 ECMAScript Shims
|
||||
|
||||
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.
|
54
node_modules/dunder-proto/README.md
generated
vendored
Normal file
54
node_modules/dunder-proto/README.md
generated
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
# dunder-proto <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]
|
||||
|
||||
If available, the `Object.prototype.__proto__` accessor and mutator, call-bound.
|
||||
|
||||
## Getting started
|
||||
|
||||
```sh
|
||||
npm install --save dunder-proto
|
||||
```
|
||||
|
||||
## Usage/Examples
|
||||
|
||||
```js
|
||||
const assert = require('assert');
|
||||
const getDunder = require('dunder-proto/get');
|
||||
const setDunder = require('dunder-proto/set');
|
||||
|
||||
const obj = {};
|
||||
|
||||
assert.equal('toString' in obj, true);
|
||||
assert.equal(getDunder(obj), Object.prototype);
|
||||
|
||||
setDunder(obj, null);
|
||||
|
||||
assert.equal('toString' in obj, false);
|
||||
assert.equal(getDunder(obj), null);
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
Clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/dunder-proto
|
||||
[npm-version-svg]: https://versionbadg.es/es-shims/dunder-proto.svg
|
||||
[deps-svg]: https://david-dm.org/es-shims/dunder-proto.svg
|
||||
[deps-url]: https://david-dm.org/es-shims/dunder-proto
|
||||
[dev-deps-svg]: https://david-dm.org/es-shims/dunder-proto/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/es-shims/dunder-proto#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/dunder-proto.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/dunder-proto.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/dunder-proto.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=dunder-proto
|
||||
[codecov-image]: https://codecov.io/gh/es-shims/dunder-proto/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/es-shims/dunder-proto/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/dunder-proto
|
||||
[actions-url]: https://github.com/es-shims/dunder-proto/actions
|
5
node_modules/dunder-proto/get.d.ts
generated
vendored
Normal file
5
node_modules/dunder-proto/get.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
declare function getDunderProto(target: {}): object | null;
|
||||
|
||||
declare const x: false | typeof getDunderProto;
|
||||
|
||||
export = x;
|
30
node_modules/dunder-proto/get.js
generated
vendored
Normal file
30
node_modules/dunder-proto/get.js
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
'use strict';
|
||||
|
||||
var callBind = require('call-bind-apply-helpers');
|
||||
var gOPD = require('gopd');
|
||||
|
||||
var hasProtoAccessor;
|
||||
try {
|
||||
// eslint-disable-next-line no-extra-parens, no-proto
|
||||
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
|
||||
} catch (e) {
|
||||
if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-extra-parens
|
||||
var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
|
||||
|
||||
var $Object = Object;
|
||||
var $getPrototypeOf = $Object.getPrototypeOf;
|
||||
|
||||
/** @type {import('./get')} */
|
||||
module.exports = desc && typeof desc.get === 'function'
|
||||
? callBind([desc.get])
|
||||
: typeof $getPrototypeOf === 'function'
|
||||
? /** @type {import('./get')} */ function getDunder(value) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
return $getPrototypeOf(value == null ? value : $Object(value));
|
||||
}
|
||||
: false;
|
76
node_modules/dunder-proto/package.json
generated
vendored
Normal file
76
node_modules/dunder-proto/package.json
generated
vendored
Normal file
|
@ -0,0 +1,76 @@
|
|||
{
|
||||
"name": "dunder-proto",
|
||||
"version": "1.0.1",
|
||||
"description": "If available, the `Object.prototype.__proto__` accessor and mutator, call-bound",
|
||||
"main": false,
|
||||
"exports": {
|
||||
"./get": "./get.js",
|
||||
"./set": "./set.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prelint": "evalmd README.md",
|
||||
"lint": "eslint --ext=.js,.mjs .",
|
||||
"postlint": "tsc -p . && attw -P",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "npx npm@'>= 10.2' audit --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/es-shims/dunder-proto.git"
|
||||
},
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/es-shims/dunder-proto/issues"
|
||||
},
|
||||
"homepage": "https://github.com/es-shims/dunder-proto#readme",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@arethetypeswrong/cli": "^0.17.1",
|
||||
"@ljharb/eslint-config": "^21.1.1",
|
||||
"@ljharb/tsconfig": "^0.2.2",
|
||||
"@types/tape": "^5.7.0",
|
||||
"auto-changelog": "^2.5.0",
|
||||
"encoding": "^0.1.13",
|
||||
"eslint": "=8.8.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.9.0",
|
||||
"typescript": "next"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js"
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
}
|
5
node_modules/dunder-proto/set.d.ts
generated
vendored
Normal file
5
node_modules/dunder-proto/set.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
declare function setDunderProto<P extends null | object>(target: {}, proto: P): P;
|
||||
|
||||
declare const x: false | typeof setDunderProto;
|
||||
|
||||
export = x;
|
35
node_modules/dunder-proto/set.js
generated
vendored
Normal file
35
node_modules/dunder-proto/set.js
generated
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
'use strict';
|
||||
|
||||
var callBind = require('call-bind-apply-helpers');
|
||||
var gOPD = require('gopd');
|
||||
var $TypeError = require('es-errors/type');
|
||||
|
||||
/** @type {{ __proto__?: object | null }} */
|
||||
var obj = {};
|
||||
try {
|
||||
obj.__proto__ = null; // eslint-disable-line no-proto
|
||||
} catch (e) {
|
||||
if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
var hasProtoMutator = !('toString' in obj);
|
||||
|
||||
// eslint-disable-next-line no-extra-parens
|
||||
var desc = gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
|
||||
|
||||
/** @type {import('./set')} */
|
||||
module.exports = hasProtoMutator && (
|
||||
// eslint-disable-next-line no-extra-parens
|
||||
(!!desc && typeof desc.set === 'function' && /** @type {import('./set')} */ (callBind([desc.set])))
|
||||
|| /** @type {import('./set')} */ function setDunder(object, proto) {
|
||||
// this is node v0.10 or older, which doesn't have Object.setPrototypeOf and has undeniable __proto__
|
||||
if (object == null) { // eslint-disable-line eqeqeq
|
||||
throw new $TypeError('set Object.prototype.__proto__ called on null or undefined');
|
||||
}
|
||||
// eslint-disable-next-line no-proto, no-param-reassign, no-extra-parens
|
||||
/** @type {{ __proto__?: object | null }} */ (object).__proto__ = proto;
|
||||
return proto;
|
||||
}
|
||||
);
|
34
node_modules/dunder-proto/test/get.js
generated
vendored
Normal file
34
node_modules/dunder-proto/test/get.js
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
|
||||
var getDunderProto = require('../get');
|
||||
|
||||
test('getDunderProto', { skip: !getDunderProto }, function (t) {
|
||||
if (!getDunderProto) {
|
||||
throw 'should never happen; this is just for type narrowing'; // eslint-disable-line no-throw-literal
|
||||
}
|
||||
|
||||
// @ts-expect-error
|
||||
t['throws'](function () { getDunderProto(); }, TypeError, 'throws if no argument');
|
||||
// @ts-expect-error
|
||||
t['throws'](function () { getDunderProto(undefined); }, TypeError, 'throws with undefined');
|
||||
// @ts-expect-error
|
||||
t['throws'](function () { getDunderProto(null); }, TypeError, 'throws with null');
|
||||
|
||||
t.equal(getDunderProto({}), Object.prototype);
|
||||
t.equal(getDunderProto([]), Array.prototype);
|
||||
t.equal(getDunderProto(function () {}), Function.prototype);
|
||||
t.equal(getDunderProto(/./g), RegExp.prototype);
|
||||
t.equal(getDunderProto(42), Number.prototype);
|
||||
t.equal(getDunderProto(true), Boolean.prototype);
|
||||
t.equal(getDunderProto('foo'), String.prototype);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('no dunder proto', { skip: !!getDunderProto }, function (t) {
|
||||
t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype');
|
||||
|
||||
t.end();
|
||||
});
|
4
node_modules/dunder-proto/test/index.js
generated
vendored
Normal file
4
node_modules/dunder-proto/test/index.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
require('./get');
|
||||
require('./set');
|
50
node_modules/dunder-proto/test/set.js
generated
vendored
Normal file
50
node_modules/dunder-proto/test/set.js
generated
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
|
||||
var setDunderProto = require('../set');
|
||||
|
||||
test('setDunderProto', { skip: !setDunderProto }, function (t) {
|
||||
if (!setDunderProto) {
|
||||
throw 'should never happen; this is just for type narrowing'; // eslint-disable-line no-throw-literal
|
||||
}
|
||||
|
||||
// @ts-expect-error
|
||||
t['throws'](function () { setDunderProto(); }, TypeError, 'throws if no arguments');
|
||||
// @ts-expect-error
|
||||
t['throws'](function () { setDunderProto(undefined); }, TypeError, 'throws with undefined and nothing');
|
||||
// @ts-expect-error
|
||||
t['throws'](function () { setDunderProto(undefined, undefined); }, TypeError, 'throws with undefined and undefined');
|
||||
// @ts-expect-error
|
||||
t['throws'](function () { setDunderProto(null); }, TypeError, 'throws with null and undefined');
|
||||
// @ts-expect-error
|
||||
t['throws'](function () { setDunderProto(null, undefined); }, TypeError, 'throws with null and undefined');
|
||||
|
||||
/** @type {{ inherited?: boolean }} */
|
||||
var obj = {};
|
||||
t.ok('toString' in obj, 'object initially has toString');
|
||||
|
||||
setDunderProto(obj, null);
|
||||
t.notOk('toString' in obj, 'object no longer has toString');
|
||||
|
||||
t.notOk('inherited' in obj, 'object lacks inherited property');
|
||||
setDunderProto(obj, { inherited: true });
|
||||
t.equal(obj.inherited, true, 'object has inherited property');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('no dunder proto', { skip: !!setDunderProto }, function (t) {
|
||||
if ('__proto__' in Object.prototype) {
|
||||
t['throws'](
|
||||
// @ts-expect-error
|
||||
function () { ({}).__proto__ = null; }, // eslint-disable-line no-proto
|
||||
Error,
|
||||
'throws when setting Object.prototype.__proto__'
|
||||
);
|
||||
} else {
|
||||
t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype');
|
||||
}
|
||||
|
||||
t.end();
|
||||
});
|
9
node_modules/dunder-proto/tsconfig.json
generated
vendored
Normal file
9
node_modules/dunder-proto/tsconfig.json
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"extends": "@ljharb/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ES2021",
|
||||
},
|
||||
"exclude": [
|
||||
"coverage",
|
||||
],
|
||||
}
|
13
node_modules/es-define-property/.eslintrc
generated
vendored
Normal file
13
node_modules/es-define-property/.eslintrc
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"new-cap": ["error", {
|
||||
"capIsNewExceptions": [
|
||||
"GetIntrinsic",
|
||||
],
|
||||
}],
|
||||
},
|
||||
}
|
12
node_modules/es-define-property/.github/FUNDING.yml
generated
vendored
Normal file
12
node_modules/es-define-property/.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/es-define-property
|
||||
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 a single custom sponsorship URL
|
9
node_modules/es-define-property/.nycrc
generated
vendored
Normal file
9
node_modules/es-define-property/.nycrc
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
29
node_modules/es-define-property/CHANGELOG.md
generated
vendored
Normal file
29
node_modules/es-define-property/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
# 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.0.1](https://github.com/ljharb/es-define-property/compare/v1.0.0...v1.0.1) - 2024-12-06
|
||||
|
||||
### Commits
|
||||
|
||||
- [types] use shared tsconfig [`954a663`](https://github.com/ljharb/es-define-property/commit/954a66360326e508a0e5daa4b07493d58f5e110e)
|
||||
- [actions] split out node 10-20, and 20+ [`3a8e84b`](https://github.com/ljharb/es-define-property/commit/3a8e84b23883f26ff37b3e82ff283834228e18c6)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/tape`, `auto-changelog`, `gopd`, `tape` [`86ae27b`](https://github.com/ljharb/es-define-property/commit/86ae27bb8cc857b23885136fad9cbe965ae36612)
|
||||
- [Refactor] avoid using `get-intrinsic` [`02480c0`](https://github.com/ljharb/es-define-property/commit/02480c0353ef6118965282977c3864aff53d98b1)
|
||||
- [Tests] replace `aud` with `npm audit` [`f6093ff`](https://github.com/ljharb/es-define-property/commit/f6093ff74ab51c98015c2592cd393bd42478e773)
|
||||
- [Tests] configure testling [`7139e66`](https://github.com/ljharb/es-define-property/commit/7139e66959247a56086d9977359caef27c6849e7)
|
||||
- [Dev Deps] update `tape` [`b901b51`](https://github.com/ljharb/es-define-property/commit/b901b511a75e001a40ce1a59fef7d9ffcfc87482)
|
||||
- [Tests] fix types in tests [`469d269`](https://github.com/ljharb/es-define-property/commit/469d269fd141b1e773ec053a9fa35843493583e0)
|
||||
- [Dev Deps] add missing peer dep [`733acfb`](https://github.com/ljharb/es-define-property/commit/733acfb0c4c96edf337e470b89a25a5b3724c352)
|
||||
|
||||
## v1.0.0 - 2024-02-12
|
||||
|
||||
### Commits
|
||||
|
||||
- Initial implementation, tests, readme, types [`3e154e1`](https://github.com/ljharb/es-define-property/commit/3e154e11a2fee09127220f5e503bf2c0a31dd480)
|
||||
- Initial commit [`07d98de`](https://github.com/ljharb/es-define-property/commit/07d98de34a4dc31ff5e83a37c0c3f49e0d85cd50)
|
||||
- npm init [`c4eb634`](https://github.com/ljharb/es-define-property/commit/c4eb6348b0d3886aac36cef34ad2ee0665ea6f3e)
|
||||
- Only apps should have lockfiles [`7af86ec`](https://github.com/ljharb/es-define-property/commit/7af86ec1d311ec0b17fdfe616a25f64276903856)
|
21
node_modules/es-define-property/LICENSE
generated
vendored
Normal file
21
node_modules/es-define-property/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 Jordan Harband
|
||||
|
||||
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.
|
49
node_modules/es-define-property/README.md
generated
vendored
Normal file
49
node_modules/es-define-property/README.md
generated
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
# es-define-property <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]
|
||||
|
||||
`Object.defineProperty`, but not IE 8's broken one.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
const assert = require('assert');
|
||||
|
||||
const $defineProperty = require('es-define-property');
|
||||
|
||||
if ($defineProperty) {
|
||||
assert.equal($defineProperty, Object.defineProperty);
|
||||
} else if (Object.defineProperty) {
|
||||
assert.equal($defineProperty, false, 'this is IE 8');
|
||||
} else {
|
||||
assert.equal($defineProperty, false, 'this is an ES3 engine');
|
||||
}
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
## Security
|
||||
|
||||
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
|
||||
|
||||
[package-url]: https://npmjs.org/package/es-define-property
|
||||
[npm-version-svg]: https://versionbadg.es/ljharb/es-define-property.svg
|
||||
[deps-svg]: https://david-dm.org/ljharb/es-define-property.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/es-define-property
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/es-define-property/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/es-define-property#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/es-define-property.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/es-define-property.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/es-define-property.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=es-define-property
|
||||
[codecov-image]: https://codecov.io/gh/ljharb/es-define-property/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/ljharb/es-define-property/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-define-property
|
||||
[actions-url]: https://github.com/ljharb/es-define-property/actions
|
3
node_modules/es-define-property/index.d.ts
generated
vendored
Normal file
3
node_modules/es-define-property/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
declare const defineProperty: false | typeof Object.defineProperty;
|
||||
|
||||
export = defineProperty;
|
14
node_modules/es-define-property/index.js
generated
vendored
Normal file
14
node_modules/es-define-property/index.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('.')} */
|
||||
var $defineProperty = Object.defineProperty || false;
|
||||
if ($defineProperty) {
|
||||
try {
|
||||
$defineProperty({}, 'a', { value: 1 });
|
||||
} catch (e) {
|
||||
// IE 8 has a broken defineProperty
|
||||
$defineProperty = false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = $defineProperty;
|
81
node_modules/es-define-property/package.json
generated
vendored
Normal file
81
node_modules/es-define-property/package.json
generated
vendored
Normal file
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
"name": "es-define-property",
|
||||
"version": "1.0.1",
|
||||
"description": "`Object.defineProperty`, but not IE 8's broken one.",
|
||||
"main": "index.js",
|
||||
"types": "./index.d.ts",
|
||||
"exports": {
|
||||
".": "./index.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prelint": "evalmd README.md",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"postlint": "tsc -p .",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "npx npm@'>= 10.2' audit --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/es-define-property.git"
|
||||
},
|
||||
"keywords": [
|
||||
"javascript",
|
||||
"ecmascript",
|
||||
"object",
|
||||
"define",
|
||||
"property",
|
||||
"defineProperty",
|
||||
"Object.defineProperty"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/es-define-property/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/es-define-property#readme",
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.1.1",
|
||||
"@ljharb/tsconfig": "^0.2.2",
|
||||
"@types/gopd": "^1.0.3",
|
||||
"@types/tape": "^5.6.5",
|
||||
"auto-changelog": "^2.5.0",
|
||||
"encoding": "^0.1.13",
|
||||
"eslint": "^8.8.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"gopd": "^1.2.0",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.9.0",
|
||||
"typescript": "next"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
}
|
||||
}
|
56
node_modules/es-define-property/test/index.js
generated
vendored
Normal file
56
node_modules/es-define-property/test/index.js
generated
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
'use strict';
|
||||
|
||||
var $defineProperty = require('../');
|
||||
|
||||
var test = require('tape');
|
||||
var gOPD = require('gopd');
|
||||
|
||||
test('defineProperty: supported', { skip: !$defineProperty }, function (t) {
|
||||
t.plan(4);
|
||||
|
||||
t.equal(typeof $defineProperty, 'function', 'defineProperty is supported');
|
||||
if ($defineProperty && gOPD) { // this `if` check is just to shut TS up
|
||||
/** @type {{ a: number, b?: number, c?: number }} */
|
||||
var o = { a: 1 };
|
||||
|
||||
$defineProperty(o, 'b', { enumerable: true, value: 2 });
|
||||
t.deepEqual(
|
||||
gOPD(o, 'b'),
|
||||
{
|
||||
configurable: false,
|
||||
enumerable: true,
|
||||
value: 2,
|
||||
writable: false
|
||||
},
|
||||
'property descriptor is as expected'
|
||||
);
|
||||
|
||||
$defineProperty(o, 'c', { enumerable: false, value: 3, writable: true });
|
||||
t.deepEqual(
|
||||
gOPD(o, 'c'),
|
||||
{
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
value: 3,
|
||||
writable: true
|
||||
},
|
||||
'property descriptor is as expected'
|
||||
);
|
||||
}
|
||||
|
||||
t.equal($defineProperty, Object.defineProperty, 'defineProperty is Object.defineProperty');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('defineProperty: not supported', { skip: !!$defineProperty }, function (t) {
|
||||
t.notOk($defineProperty, 'defineProperty is not supported');
|
||||
|
||||
t.match(
|
||||
typeof $defineProperty,
|
||||
/^(?:undefined|boolean)$/,
|
||||
'`typeof defineProperty` is `undefined` or `boolean`'
|
||||
);
|
||||
|
||||
t.end();
|
||||
});
|
10
node_modules/es-define-property/tsconfig.json
generated
vendored
Normal file
10
node_modules/es-define-property/tsconfig.json
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "@ljharb/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "es2022",
|
||||
},
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test/list-exports"
|
||||
],
|
||||
}
|
5
node_modules/es-errors/.eslintrc
generated
vendored
Normal file
5
node_modules/es-errors/.eslintrc
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
}
|
12
node_modules/es-errors/.github/FUNDING.yml
generated
vendored
Normal file
12
node_modules/es-errors/.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/es-errors
|
||||
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 a single custom sponsorship URL
|
40
node_modules/es-errors/CHANGELOG.md
generated
vendored
Normal file
40
node_modules/es-errors/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
# 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.3.0](https://github.com/ljharb/es-errors/compare/v1.2.1...v1.3.0) - 2024-02-05
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] add `EvalError` and `URIError` [`1927627`](https://github.com/ljharb/es-errors/commit/1927627ba68cb6c829d307231376c967db53acdf)
|
||||
|
||||
## [v1.2.1](https://github.com/ljharb/es-errors/compare/v1.2.0...v1.2.1) - 2024-02-04
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] add missing `exports` entry [`5bb5f28`](https://github.com/ljharb/es-errors/commit/5bb5f280f98922701109d6ebb82eea2257cecc7e)
|
||||
|
||||
## [v1.2.0](https://github.com/ljharb/es-errors/compare/v1.1.0...v1.2.0) - 2024-02-04
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] add `ReferenceError` [`6d8cf5b`](https://github.com/ljharb/es-errors/commit/6d8cf5bbb6f3f598d02cf6f30e468ba2caa8e143)
|
||||
|
||||
## [v1.1.0](https://github.com/ljharb/es-errors/compare/v1.0.0...v1.1.0) - 2024-02-04
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] add base Error [`2983ab6`](https://github.com/ljharb/es-errors/commit/2983ab65f7bc5441276cb021dc3aa03c78881698)
|
||||
|
||||
## v1.0.0 - 2024-02-03
|
||||
|
||||
### Commits
|
||||
|
||||
- Initial implementation, tests, readme, type [`8f47631`](https://github.com/ljharb/es-errors/commit/8f476317e9ad76f40ad648081829b1a1a3a1288b)
|
||||
- Initial commit [`ea5d099`](https://github.com/ljharb/es-errors/commit/ea5d099ef18e550509ab9e2be000526afd81c385)
|
||||
- npm init [`6f5ebf9`](https://github.com/ljharb/es-errors/commit/6f5ebf9cead474dadd72b9e63dad315820a089ae)
|
||||
- Only apps should have lockfiles [`e1a0aeb`](https://github.com/ljharb/es-errors/commit/e1a0aeb7b80f5cfc56be54d6b2100e915d47def8)
|
||||
- [meta] add `sideEffects` flag [`a9c7d46`](https://github.com/ljharb/es-errors/commit/a9c7d460a492f1d8a241c836bc25a322a19cc043)
|
21
node_modules/es-errors/LICENSE
generated
vendored
Normal file
21
node_modules/es-errors/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 Jordan Harband
|
||||
|
||||
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.
|
55
node_modules/es-errors/README.md
generated
vendored
Normal file
55
node_modules/es-errors/README.md
generated
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
# es-errors <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]
|
||||
|
||||
A simple cache for a few of the JS Error constructors.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
const assert = require('assert');
|
||||
|
||||
const Base = require('es-errors');
|
||||
const Eval = require('es-errors/eval');
|
||||
const Range = require('es-errors/range');
|
||||
const Ref = require('es-errors/ref');
|
||||
const Syntax = require('es-errors/syntax');
|
||||
const Type = require('es-errors/type');
|
||||
const URI = require('es-errors/uri');
|
||||
|
||||
assert.equal(Base, Error);
|
||||
assert.equal(Eval, EvalError);
|
||||
assert.equal(Range, RangeError);
|
||||
assert.equal(Ref, ReferenceError);
|
||||
assert.equal(Syntax, SyntaxError);
|
||||
assert.equal(Type, TypeError);
|
||||
assert.equal(URI, URIError);
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
## Security
|
||||
|
||||
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
|
||||
|
||||
[package-url]: https://npmjs.org/package/es-errors
|
||||
[npm-version-svg]: https://versionbadg.es/ljharb/es-errors.svg
|
||||
[deps-svg]: https://david-dm.org/ljharb/es-errors.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/es-errors
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/es-errors/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/es-errors#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/es-errors.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/es-errors.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/es-errors.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=es-errors
|
||||
[codecov-image]: https://codecov.io/gh/ljharb/es-errors/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/ljharb/es-errors/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-errors
|
||||
[actions-url]: https://github.com/ljharb/es-errors/actions
|
3
node_modules/es-errors/eval.d.ts
generated
vendored
Normal file
3
node_modules/es-errors/eval.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
declare const EvalError: EvalErrorConstructor;
|
||||
|
||||
export = EvalError;
|
4
node_modules/es-errors/eval.js
generated
vendored
Normal file
4
node_modules/es-errors/eval.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('./eval')} */
|
||||
module.exports = EvalError;
|
3
node_modules/es-errors/index.d.ts
generated
vendored
Normal file
3
node_modules/es-errors/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
declare const Error: ErrorConstructor;
|
||||
|
||||
export = Error;
|
4
node_modules/es-errors/index.js
generated
vendored
Normal file
4
node_modules/es-errors/index.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('.')} */
|
||||
module.exports = Error;
|
80
node_modules/es-errors/package.json
generated
vendored
Normal file
80
node_modules/es-errors/package.json
generated
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
"name": "es-errors",
|
||||
"version": "1.3.0",
|
||||
"description": "A simple cache for a few of the JS Error constructors.",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
".": "./index.js",
|
||||
"./eval": "./eval.js",
|
||||
"./range": "./range.js",
|
||||
"./ref": "./ref.js",
|
||||
"./syntax": "./syntax.js",
|
||||
"./type": "./type.js",
|
||||
"./uri": "./uri.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"pretest": "npm run lint",
|
||||
"test": "npm run tests-only",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"posttest": "aud --production",
|
||||
"prelint": "evalmd README.md",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/es-errors.git"
|
||||
},
|
||||
"keywords": [
|
||||
"javascript",
|
||||
"ecmascript",
|
||||
"error",
|
||||
"typeerror",
|
||||
"syntaxerror",
|
||||
"rangeerror"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/es-errors/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/es-errors#readme",
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.1.0",
|
||||
"@types/tape": "^5.6.4",
|
||||
"aud": "^2.0.4",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"eclint": "^2.8.1",
|
||||
"eslint": "^8.8.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.7.4",
|
||||
"typescript": "next"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
}
|
3
node_modules/es-errors/range.d.ts
generated
vendored
Normal file
3
node_modules/es-errors/range.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
declare const RangeError: RangeErrorConstructor;
|
||||
|
||||
export = RangeError;
|
4
node_modules/es-errors/range.js
generated
vendored
Normal file
4
node_modules/es-errors/range.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('./range')} */
|
||||
module.exports = RangeError;
|
3
node_modules/es-errors/ref.d.ts
generated
vendored
Normal file
3
node_modules/es-errors/ref.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
declare const ReferenceError: ReferenceErrorConstructor;
|
||||
|
||||
export = ReferenceError;
|
4
node_modules/es-errors/ref.js
generated
vendored
Normal file
4
node_modules/es-errors/ref.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('./ref')} */
|
||||
module.exports = ReferenceError;
|
3
node_modules/es-errors/syntax.d.ts
generated
vendored
Normal file
3
node_modules/es-errors/syntax.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
declare const SyntaxError: SyntaxErrorConstructor;
|
||||
|
||||
export = SyntaxError;
|
4
node_modules/es-errors/syntax.js
generated
vendored
Normal file
4
node_modules/es-errors/syntax.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('./syntax')} */
|
||||
module.exports = SyntaxError;
|
19
node_modules/es-errors/test/index.js
generated
vendored
Normal file
19
node_modules/es-errors/test/index.js
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
|
||||
var E = require('../');
|
||||
var R = require('../range');
|
||||
var Ref = require('../ref');
|
||||
var S = require('../syntax');
|
||||
var T = require('../type');
|
||||
|
||||
test('errors', function (t) {
|
||||
t.equal(E, Error);
|
||||
t.equal(R, RangeError);
|
||||
t.equal(Ref, ReferenceError);
|
||||
t.equal(S, SyntaxError);
|
||||
t.equal(T, TypeError);
|
||||
|
||||
t.end();
|
||||
});
|
49
node_modules/es-errors/tsconfig.json
generated
vendored
Normal file
49
node_modules/es-errors/tsconfig.json
generated
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
||||
|
||||
/* Projects */
|
||||
|
||||
/* Language and Environment */
|
||||
"target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
||||
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
||||
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
||||
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
||||
|
||||
/* Modules */
|
||||
"module": "commonjs", /* Specify what module code is generated. */
|
||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
// "typeRoots": ["types"], /* Specify multiple folders that act like `./node_modules/@types`. */
|
||||
"resolveJsonModule": true, /* Enable importing .json files. */
|
||||
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
||||
|
||||
/* JavaScript Support */
|
||||
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
|
||||
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
||||
"maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
|
||||
|
||||
/* Emit */
|
||||
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
||||
"declarationMap": true, /* Create sourcemaps for d.ts files. */
|
||||
"noEmit": true, /* Disable emitting files from a compilation. */
|
||||
|
||||
/* Interop Constraints */
|
||||
"allowSyntheticDefaultImports": true, /* Allow `import x from y` when a module doesn't have a default export. */
|
||||
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
|
||||
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
||||
|
||||
/* Type Checking */
|
||||
"strict": true, /* Enable all strict type-checking options. */
|
||||
|
||||
/* Completeness */
|
||||
// "skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
},
|
||||
"exclude": [
|
||||
"coverage",
|
||||
],
|
||||
}
|
3
node_modules/es-errors/type.d.ts
generated
vendored
Normal file
3
node_modules/es-errors/type.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
declare const TypeError: TypeErrorConstructor
|
||||
|
||||
export = TypeError;
|
4
node_modules/es-errors/type.js
generated
vendored
Normal file
4
node_modules/es-errors/type.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('./type')} */
|
||||
module.exports = TypeError;
|
3
node_modules/es-errors/uri.d.ts
generated
vendored
Normal file
3
node_modules/es-errors/uri.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
declare const URIError: URIErrorConstructor;
|
||||
|
||||
export = URIError;
|
4
node_modules/es-errors/uri.js
generated
vendored
Normal file
4
node_modules/es-errors/uri.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
/** @type {import('./uri')} */
|
||||
module.exports = URIError;
|
16
node_modules/es-object-atoms/.eslintrc
generated
vendored
Normal file
16
node_modules/es-object-atoms/.eslintrc
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"eqeqeq": ["error", "allow-null"],
|
||||
"id-length": "off",
|
||||
"new-cap": ["error", {
|
||||
"capIsNewExceptions": [
|
||||
"RequireObjectCoercible",
|
||||
"ToObject",
|
||||
],
|
||||
}],
|
||||
},
|
||||
}
|
12
node_modules/es-object-atoms/.github/FUNDING.yml
generated
vendored
Normal file
12
node_modules/es-object-atoms/.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/es-object
|
||||
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 a single custom sponsorship URL
|
37
node_modules/es-object-atoms/CHANGELOG.md
generated
vendored
Normal file
37
node_modules/es-object-atoms/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
# 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.1.1](https://github.com/ljharb/es-object-atoms/compare/v1.1.0...v1.1.1) - 2025-01-14
|
||||
|
||||
### Commits
|
||||
|
||||
- [types] `ToObject`: improve types [`cfe8c8a`](https://github.com/ljharb/es-object-atoms/commit/cfe8c8a105c44820cb22e26f62d12ef0ad9715c8)
|
||||
|
||||
## [v1.1.0](https://github.com/ljharb/es-object-atoms/compare/v1.0.1...v1.1.0) - 2025-01-14
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] add `isObject` [`51e4042`](https://github.com/ljharb/es-object-atoms/commit/51e4042df722eb3165f40dc5f4bf33d0197ecb07)
|
||||
|
||||
## [v1.0.1](https://github.com/ljharb/es-object-atoms/compare/v1.0.0...v1.0.1) - 2025-01-13
|
||||
|
||||
### Commits
|
||||
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `auto-changelog`, `tape` [`38ab9eb`](https://github.com/ljharb/es-object-atoms/commit/38ab9eb00b62c2f4668644f5e513d9b414ebd595)
|
||||
- [types] improve types [`7d1beb8`](https://github.com/ljharb/es-object-atoms/commit/7d1beb887958b78b6a728a210a1c8370ab7e2aa1)
|
||||
- [Tests] replace `aud` with `npm audit` [`25863ba`](https://github.com/ljharb/es-object-atoms/commit/25863baf99178f1d1ad33d1120498db28631907e)
|
||||
- [Dev Deps] add missing peer dep [`c012309`](https://github.com/ljharb/es-object-atoms/commit/c0123091287e6132d6f4240496340c427433df28)
|
||||
|
||||
## v1.0.0 - 2024-03-16
|
||||
|
||||
### Commits
|
||||
|
||||
- Initial implementation, tests, readme, types [`f1499db`](https://github.com/ljharb/es-object-atoms/commit/f1499db7d3e1741e64979c61d645ab3137705e82)
|
||||
- Initial commit [`99eedc7`](https://github.com/ljharb/es-object-atoms/commit/99eedc7b5fde38a50a28d3c8b724706e3e4c5f6a)
|
||||
- [meta] rename repo [`fc851fa`](https://github.com/ljharb/es-object-atoms/commit/fc851fa70616d2d182aaf0bd02c2ed7084dea8fa)
|
||||
- npm init [`b909377`](https://github.com/ljharb/es-object-atoms/commit/b909377c50049bd0ec575562d20b0f9ebae8947f)
|
||||
- Only apps should have lockfiles [`7249edd`](https://github.com/ljharb/es-object-atoms/commit/7249edd2178c1b9ddfc66ffcc6d07fdf0d28efc1)
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue