cloudstructs 0.9.19 → 0.9.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +3 -3
- package/assets/slack-textract/detect.lambda/index.js +21 -10
- package/lib/codecommit-mirror/index.js +2 -2
- package/lib/dmarc/index.js +1 -1
- package/lib/ecs-service-roller/index.js +2 -2
- package/lib/email-receiver/receiver.js +1 -1
- package/lib/mjml-template/index.js +1 -1
- package/lib/saml-identity-provider/index.js +2 -2
- package/lib/slack-app/manifest.js +1 -1
- package/lib/slack-app/slack-app.js +2 -2
- package/lib/slack-events/index.js +1 -1
- package/lib/slack-textract/index.js +1 -1
- package/lib/ssl-server-test/index.js +1 -1
- package/lib/state-machine-cr-provider/index.js +1 -1
- package/lib/static-website/index.js +1 -1
- package/lib/toolkit-cleaner/index.js +1 -1
- package/lib/url-shortener/index.js +1 -1
- package/node_modules/@babel/runtime/helpers/esm/superPropGet.js +4 -4
- package/node_modules/@babel/runtime/helpers/esm/superPropSet.js +2 -2
- package/node_modules/@babel/runtime/helpers/superPropGet.js +4 -4
- package/node_modules/@babel/runtime/helpers/superPropSet.js +2 -2
- package/node_modules/@babel/runtime/package.json +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/assert.d.ts +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@slack/logger/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@slack/logger/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@slack/logger/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +10 -9
- package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +15 -4
- package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +17 -48
- package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +37 -0
- package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +8 -10
- package/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +91 -0
- package/node_modules/@slack/logger/node_modules/@types/node/package.json +4 -3
- package/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +24 -0
- package/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@slack/logger/node_modules/@types/node/stream/web.d.ts +5 -2
- package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +17 -5
- package/node_modules/@slack/logger/node_modules/@types/node/ts5.6/index.d.ts +8 -10
- package/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +7 -4
- package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +15 -10
- package/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +81 -27
- package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +1 -1
- package/node_modules/@slack/web-api/dist/WebClient.d.ts +36 -4
- package/node_modules/@slack/web-api/dist/WebClient.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/WebClient.js +23 -10
- package/node_modules/@slack/web-api/dist/WebClient.js.map +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/assert.d.ts +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +10 -9
- package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +15 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/globals.d.ts +17 -48
- package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +37 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +8 -10
- package/node_modules/@slack/web-api/node_modules/@types/node/module.d.ts +91 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +4 -3
- package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +24 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/readline.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/stream/web.d.ts +5 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +17 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/ts5.6/index.d.ts +8 -10
- package/node_modules/@slack/web-api/node_modules/@types/node/url.d.ts +7 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +15 -10
- package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +81 -27
- package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +1 -1
- package/node_modules/@slack/web-api/package.json +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +10 -9
- package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +15 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +17 -48
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +37 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +8 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +91 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +4 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +24 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +5 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +17 -5
- package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/index.d.ts +8 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +7 -4
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +15 -10
- package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +81 -27
- package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@types/keyv/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +10 -9
- package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +15 -4
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +17 -48
- package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +37 -0
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +8 -10
- package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +91 -0
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +4 -3
- package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +24 -0
- package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +5 -2
- package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +17 -5
- package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/index.d.ts +8 -10
- package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +7 -4
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +15 -10
- package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +81 -27
- package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
- package/node_modules/@types/responselike/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +10 -9
- package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +15 -4
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +17 -48
- package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +37 -0
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +8 -10
- package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +91 -0
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +4 -3
- package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +24 -0
- package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +5 -2
- package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +17 -5
- package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/index.d.ts +8 -10
- package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +7 -4
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +15 -10
- package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +81 -27
- package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +1 -1
- package/node_modules/form-data/Readme.md +4 -4
- package/node_modules/form-data/lib/form_data.js +1 -1
- package/node_modules/form-data/package.json +9 -6
- package/node_modules/parse5/dist/cjs/common/doctype.d.ts +0 -1
- package/node_modules/parse5/dist/cjs/common/doctype.js +2 -4
- package/node_modules/parse5/dist/cjs/common/error-codes.d.ts +0 -1
- package/node_modules/parse5/dist/cjs/common/error-codes.js +1 -2
- package/node_modules/parse5/dist/cjs/common/foreign-content.d.ts +0 -1
- package/node_modules/parse5/dist/cjs/common/foreign-content.js +7 -9
- package/node_modules/parse5/dist/cjs/common/html.d.ts +32 -31
- package/node_modules/parse5/dist/cjs/common/html.js +41 -42
- package/node_modules/parse5/dist/cjs/common/token.d.ts +0 -1
- package/node_modules/parse5/dist/cjs/common/token.js +3 -4
- package/node_modules/parse5/dist/cjs/common/unicode.d.ts +1 -8
- package/node_modules/parse5/dist/cjs/common/unicode.js +7 -14
- package/node_modules/parse5/dist/cjs/index.d.ts +15 -4
- package/node_modules/parse5/dist/cjs/index.js +3 -6
- package/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +0 -1
- package/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +1 -2
- package/node_modules/parse5/dist/cjs/parser/index.d.ts +72 -8
- package/node_modules/parse5/dist/cjs/parser/index.js +81 -9
- package/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts +2 -2
- package/node_modules/parse5/dist/cjs/parser/open-element-stack.js +95 -87
- package/node_modules/parse5/dist/cjs/serializer/index.d.ts +1 -2
- package/node_modules/parse5/dist/cjs/serializer/index.js +8 -9
- package/node_modules/parse5/dist/cjs/tokenizer/index.d.ts +130 -131
- package/node_modules/parse5/dist/cjs/tokenizer/index.js +87 -281
- package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts +3 -4
- package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +8 -7
- package/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts +0 -1
- package/node_modules/parse5/dist/cjs/tree-adapters/default.js +9 -10
- package/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts +7 -2
- package/node_modules/parse5/dist/cjs/tree-adapters/interface.js +0 -1
- package/node_modules/parse5/dist/common/doctype.d.ts +0 -1
- package/node_modules/parse5/dist/common/doctype.js +0 -1
- package/node_modules/parse5/dist/common/error-codes.d.ts +0 -1
- package/node_modules/parse5/dist/common/error-codes.js +1 -2
- package/node_modules/parse5/dist/common/foreign-content.d.ts +0 -1
- package/node_modules/parse5/dist/common/foreign-content.js +0 -2
- package/node_modules/parse5/dist/common/html.d.ts +32 -31
- package/node_modules/parse5/dist/common/html.js +38 -38
- package/node_modules/parse5/dist/common/token.d.ts +0 -1
- package/node_modules/parse5/dist/common/token.js +1 -2
- package/node_modules/parse5/dist/common/unicode.d.ts +1 -8
- package/node_modules/parse5/dist/common/unicode.js +1 -8
- package/node_modules/parse5/dist/index.d.ts +15 -4
- package/node_modules/parse5/dist/index.js +0 -3
- package/node_modules/parse5/dist/parser/formatting-element-list.d.ts +0 -1
- package/node_modules/parse5/dist/parser/formatting-element-list.js +1 -2
- package/node_modules/parse5/dist/parser/index.d.ts +72 -8
- package/node_modules/parse5/dist/parser/index.js +82 -10
- package/node_modules/parse5/dist/parser/open-element-stack.d.ts +2 -2
- package/node_modules/parse5/dist/parser/open-element-stack.js +96 -88
- package/node_modules/parse5/dist/serializer/index.d.ts +1 -2
- package/node_modules/parse5/dist/serializer/index.js +6 -6
- package/node_modules/parse5/dist/tokenizer/index.d.ts +130 -131
- package/node_modules/parse5/dist/tokenizer/index.js +88 -282
- package/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +3 -4
- package/node_modules/parse5/dist/tokenizer/preprocessor.js +8 -7
- package/node_modules/parse5/dist/tree-adapters/default.d.ts +0 -1
- package/node_modules/parse5/dist/tree-adapters/default.js +9 -10
- package/node_modules/parse5/dist/tree-adapters/interface.d.ts +7 -2
- package/node_modules/parse5/dist/tree-adapters/interface.js +0 -1
- package/node_modules/parse5/package.json +4 -4
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.d.ts +1 -2
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.js +11 -12
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/index.d.ts +1 -2
- package/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js +9 -10
- package/node_modules/parse5-htmlparser2-tree-adapter/package.json +7 -6
- package/package.json +16 -16
- package/node_modules/@slack/logger/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +0 -1
- package/node_modules/form-data/README.md.bak +0 -358
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.8.6",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -217,8 +217,9 @@
|
|
|
217
217
|
},
|
|
218
218
|
"scripts": {},
|
|
219
219
|
"dependencies": {
|
|
220
|
-
"undici-types": "~6.19.
|
|
220
|
+
"undici-types": "~6.19.8"
|
|
221
221
|
},
|
|
222
|
-
"
|
|
222
|
+
"peerDependencies": {},
|
|
223
|
+
"typesPublisherContentHash": "b5e95f7873a1811a61b3409c809ee30655d0268d76d767dbe9efc27cb421459f",
|
|
223
224
|
"typeScriptVersion": "4.8"
|
|
224
225
|
}
|
|
@@ -116,6 +116,20 @@ declare module "perf_hooks" {
|
|
|
116
116
|
class PerformanceMeasure extends PerformanceEntry {
|
|
117
117
|
readonly entryType: "measure";
|
|
118
118
|
}
|
|
119
|
+
interface UVMetrics {
|
|
120
|
+
/**
|
|
121
|
+
* Number of event loop iterations.
|
|
122
|
+
*/
|
|
123
|
+
readonly loopCount: number;
|
|
124
|
+
/**
|
|
125
|
+
* Number of events that have been processed by the event handler.
|
|
126
|
+
*/
|
|
127
|
+
readonly events: number;
|
|
128
|
+
/**
|
|
129
|
+
* Number of events that were waiting to be processed when the event provider was called.
|
|
130
|
+
*/
|
|
131
|
+
readonly eventsWaiting: number;
|
|
132
|
+
}
|
|
119
133
|
/**
|
|
120
134
|
* _This property is an extension by Node.js. It is not available in Web browsers._
|
|
121
135
|
*
|
|
@@ -166,6 +180,16 @@ declare module "perf_hooks" {
|
|
|
166
180
|
* @since v8.5.0
|
|
167
181
|
*/
|
|
168
182
|
readonly nodeStart: number;
|
|
183
|
+
/**
|
|
184
|
+
* This is a wrapper to the `uv_metrics_info` function.
|
|
185
|
+
* It returns the current set of event loop metrics.
|
|
186
|
+
*
|
|
187
|
+
* It is recommended to use this property inside a function whose execution was
|
|
188
|
+
* scheduled using `setImmediate` to avoid collecting metrics before finishing all
|
|
189
|
+
* operations scheduled during the current loop iteration.
|
|
190
|
+
* @since v22.8.0, v20.18.0
|
|
191
|
+
*/
|
|
192
|
+
readonly uvMetricsInfo: UVMetrics;
|
|
169
193
|
/**
|
|
170
194
|
* The high resolution millisecond timestamp at which the V8 platform was
|
|
171
195
|
* initialized.
|
|
@@ -304,7 +304,7 @@ declare module "readline" {
|
|
|
304
304
|
prependOnceListener(event: "SIGINT", listener: () => void): this;
|
|
305
305
|
prependOnceListener(event: "SIGTSTP", listener: () => void): this;
|
|
306
306
|
prependOnceListener(event: "history", listener: (history: string[]) => void): this;
|
|
307
|
-
[Symbol.asyncIterator]():
|
|
307
|
+
[Symbol.asyncIterator](): NodeJS.AsyncIterator<string>;
|
|
308
308
|
}
|
|
309
309
|
export type ReadLine = Interface; // type forwarded for backwards compatibility
|
|
310
310
|
export type Completer = (line: string) => CompleterResult;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
declare module "stream/promises" {
|
|
2
2
|
import {
|
|
3
|
-
FinishedOptions,
|
|
3
|
+
FinishedOptions as _FinishedOptions,
|
|
4
4
|
PipelineDestination,
|
|
5
5
|
PipelineOptions,
|
|
6
6
|
PipelinePromise,
|
|
7
7
|
PipelineSource,
|
|
8
8
|
PipelineTransform,
|
|
9
9
|
} from "node:stream";
|
|
10
|
+
interface FinishedOptions extends _FinishedOptions {
|
|
11
|
+
/**
|
|
12
|
+
* If true, removes the listeners registered by this function before the promise is fulfilled.
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
cleanup?: boolean | undefined;
|
|
16
|
+
}
|
|
10
17
|
function finished(
|
|
11
18
|
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
|
|
12
19
|
options?: FinishedOptions,
|
|
@@ -166,6 +166,9 @@ declare module "stream/web" {
|
|
|
166
166
|
interface ReadableStreamErrorCallback {
|
|
167
167
|
(reason: any): void | PromiseLike<void>;
|
|
168
168
|
}
|
|
169
|
+
interface ReadableStreamAsyncIterator<T> extends NodeJS.AsyncIterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
|
|
170
|
+
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
|
|
171
|
+
}
|
|
169
172
|
/** This Streams API interface represents a readable stream of byte data. */
|
|
170
173
|
interface ReadableStream<R = any> {
|
|
171
174
|
readonly locked: boolean;
|
|
@@ -176,8 +179,8 @@ declare module "stream/web" {
|
|
|
176
179
|
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
|
|
177
180
|
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
|
|
178
181
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
179
|
-
values(options?: { preventCancel?: boolean }):
|
|
180
|
-
[Symbol.asyncIterator]():
|
|
182
|
+
values(options?: { preventCancel?: boolean }): ReadableStreamAsyncIterator<R>;
|
|
183
|
+
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<R>;
|
|
181
184
|
}
|
|
182
185
|
const ReadableStream: {
|
|
183
186
|
prototype: ReadableStream;
|
|
@@ -422,7 +422,7 @@ declare module "stream" {
|
|
|
422
422
|
* or exiting a `for await...of` iteration using a `break`, `return`, or `throw` will not destroy the stream.
|
|
423
423
|
* **Default: `true`**.
|
|
424
424
|
*/
|
|
425
|
-
iterator(options?: { destroyOnReturn?: boolean }):
|
|
425
|
+
iterator(options?: { destroyOnReturn?: boolean }): NodeJS.AsyncIterator<any>;
|
|
426
426
|
/**
|
|
427
427
|
* This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream.
|
|
428
428
|
* If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream.
|
|
@@ -651,7 +651,7 @@ declare module "stream" {
|
|
|
651
651
|
removeListener(event: "readable", listener: () => void): this;
|
|
652
652
|
removeListener(event: "resume", listener: () => void): this;
|
|
653
653
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
654
|
-
[Symbol.asyncIterator]():
|
|
654
|
+
[Symbol.asyncIterator](): NodeJS.AsyncIterator<any>;
|
|
655
655
|
/**
|
|
656
656
|
* Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished.
|
|
657
657
|
* @since v20.4.0
|
|
@@ -340,11 +340,22 @@ declare module "node:test" {
|
|
|
340
340
|
globPatterns?: readonly string[] | undefined;
|
|
341
341
|
/**
|
|
342
342
|
* Sets inspector port of test child process.
|
|
343
|
-
*
|
|
344
|
-
*
|
|
343
|
+
* This can be a number, or a function that takes no arguments and returns a
|
|
344
|
+
* number. If a nullish value is provided, each process gets its own port,
|
|
345
|
+
* incremented from the primary's `process.debugPort`. This option is ignored
|
|
346
|
+
* if the `isolation` option is set to `'none'` as no child processes are
|
|
347
|
+
* spawned.
|
|
345
348
|
* @default undefined
|
|
346
349
|
*/
|
|
347
350
|
inspectPort?: number | (() => number) | undefined;
|
|
351
|
+
/**
|
|
352
|
+
* Configures the type of test isolation. If set to
|
|
353
|
+
* `'process'`, each test file is run in a separate child process. If set to
|
|
354
|
+
* `'none'`, all test files run in the current process.
|
|
355
|
+
* @default 'process'
|
|
356
|
+
* @since v22.8.0
|
|
357
|
+
*/
|
|
358
|
+
isolation?: "process" | "none" | undefined;
|
|
348
359
|
/**
|
|
349
360
|
* If truthy, the test context will only run tests that have the `only` option set
|
|
350
361
|
*/
|
|
@@ -1635,9 +1646,10 @@ declare module "node:test" {
|
|
|
1635
1646
|
* This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing.
|
|
1636
1647
|
* By default, the snapshot filename is the same as the entry point filename with `.snapshot` appended.
|
|
1637
1648
|
* @since v22.3.0
|
|
1638
|
-
* @param fn A function
|
|
1639
|
-
* The function receives the path of the test file as its only argument.
|
|
1640
|
-
*
|
|
1649
|
+
* @param fn A function used to compute the location of the snapshot file.
|
|
1650
|
+
* The function receives the path of the test file as its only argument. If the
|
|
1651
|
+
* test is not associated with a file (for example in the REPL), the input is
|
|
1652
|
+
* undefined. `fn()` must return a string specifying the location of the snapshot file.
|
|
1641
1653
|
*/
|
|
1642
1654
|
function setResolveSnapshotPath(fn: (path: string | undefined) => string): void;
|
|
1643
1655
|
}
|
|
@@ -22,22 +22,22 @@
|
|
|
22
22
|
* IN THE SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
// NOTE: These definitions support
|
|
25
|
+
// NOTE: These definitions support Node.js and TypeScript 4.9 through 5.6.
|
|
26
26
|
|
|
27
|
-
// Reference required
|
|
27
|
+
// Reference required TypeScript libs:
|
|
28
28
|
/// <reference lib="es2020" />
|
|
29
|
-
/// <reference lib="esnext.asynciterable" />
|
|
30
|
-
/// <reference lib="esnext.intl" />
|
|
31
|
-
/// <reference lib="esnext.bigint" />
|
|
32
29
|
|
|
33
|
-
//
|
|
30
|
+
// TypeScript backwards-compatibility definitions:
|
|
31
|
+
/// <reference path="../compatibility/index.d.ts" />
|
|
32
|
+
|
|
33
|
+
// Definitions specific to TypeScript 4.9 through 5.6:
|
|
34
34
|
/// <reference path="./globals.typedarray.d.ts" />
|
|
35
35
|
/// <reference path="./buffer.buffer.d.ts" />
|
|
36
36
|
|
|
37
|
-
//
|
|
37
|
+
// Definitions for Node.js modules that are not specific to any version of TypeScript:
|
|
38
|
+
/// <reference path="../globals.d.ts" />
|
|
38
39
|
/// <reference path="../assert.d.ts" />
|
|
39
40
|
/// <reference path="../assert/strict.d.ts" />
|
|
40
|
-
/// <reference path="../globals.d.ts" />
|
|
41
41
|
/// <reference path="../async_hooks.d.ts" />
|
|
42
42
|
/// <reference path="../buffer.d.ts" />
|
|
43
43
|
/// <reference path="../child_process.d.ts" />
|
|
@@ -90,5 +90,3 @@
|
|
|
90
90
|
/// <reference path="../wasi.d.ts" />
|
|
91
91
|
/// <reference path="../worker_threads.d.ts" />
|
|
92
92
|
/// <reference path="../zlib.d.ts" />
|
|
93
|
-
|
|
94
|
-
/// <reference path="../globals.global.d.ts" />
|
|
@@ -757,6 +757,9 @@ declare module "url" {
|
|
|
757
757
|
*/
|
|
758
758
|
toJSON(): string;
|
|
759
759
|
}
|
|
760
|
+
interface URLSearchParamsIterator<T> extends NodeJS.Iterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
|
|
761
|
+
[Symbol.iterator](): URLSearchParamsIterator<T>;
|
|
762
|
+
}
|
|
760
763
|
/**
|
|
761
764
|
* The `URLSearchParams` API provides read and write access to the query of a `URL`. The `URLSearchParams` class can also be used standalone with one of the
|
|
762
765
|
* four following constructors.
|
|
@@ -827,7 +830,7 @@ declare module "url" {
|
|
|
827
830
|
*
|
|
828
831
|
* Alias for `urlSearchParams[@@iterator]()`.
|
|
829
832
|
*/
|
|
830
|
-
entries():
|
|
833
|
+
entries(): URLSearchParamsIterator<[string, string]>;
|
|
831
834
|
/**
|
|
832
835
|
* Iterates over each name-value pair in the query and invokes the given function.
|
|
833
836
|
*
|
|
@@ -881,7 +884,7 @@ declare module "url" {
|
|
|
881
884
|
* // foo
|
|
882
885
|
* ```
|
|
883
886
|
*/
|
|
884
|
-
keys():
|
|
887
|
+
keys(): URLSearchParamsIterator<string>;
|
|
885
888
|
/**
|
|
886
889
|
* Sets the value in the `URLSearchParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`,
|
|
887
890
|
* set the first such pair's value to `value` and remove all others. If not,
|
|
@@ -931,8 +934,8 @@ declare module "url" {
|
|
|
931
934
|
/**
|
|
932
935
|
* Returns an ES6 `Iterator` over the values of each name-value pair.
|
|
933
936
|
*/
|
|
934
|
-
values():
|
|
935
|
-
[Symbol.iterator]():
|
|
937
|
+
values(): URLSearchParamsIterator<string>;
|
|
938
|
+
[Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
|
|
936
939
|
}
|
|
937
940
|
import { URL as _URL, URLSearchParams as _URLSearchParams } from "url";
|
|
938
941
|
global {
|
|
@@ -1517,18 +1517,23 @@ declare module "util" {
|
|
|
1517
1517
|
string | boolean
|
|
1518
1518
|
>;
|
|
1519
1519
|
|
|
1520
|
+
type ApplyOptionalModifiers<O extends ParseArgsOptionsConfig, V extends Record<keyof O, unknown>> = (
|
|
1521
|
+
& { -readonly [LongOption in keyof O]?: V[LongOption] }
|
|
1522
|
+
& { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] }
|
|
1523
|
+
) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object
|
|
1524
|
+
|
|
1520
1525
|
type ParsedValues<T extends ParseArgsConfig> =
|
|
1521
1526
|
& IfDefaultsTrue<T["strict"], unknown, { [longOption: string]: undefined | string | boolean }>
|
|
1522
|
-
& (T["options"] extends ParseArgsOptionsConfig ?
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
| IfDefaultsFalse<
|
|
1527
|
+
& (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers<
|
|
1528
|
+
T["options"],
|
|
1529
|
+
{
|
|
1530
|
+
[LongOption in keyof T["options"]]: IfDefaultsFalse<
|
|
1527
1531
|
T["options"][LongOption]["multiple"],
|
|
1528
1532
|
Array<ExtractOptionValue<T, T["options"][LongOption]>>,
|
|
1529
1533
|
ExtractOptionValue<T, T["options"][LongOption]>
|
|
1530
1534
|
>;
|
|
1531
|
-
|
|
1535
|
+
}
|
|
1536
|
+
>
|
|
1532
1537
|
: {});
|
|
1533
1538
|
|
|
1534
1539
|
type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
|
|
@@ -1720,7 +1725,7 @@ declare module "util" {
|
|
|
1720
1725
|
* Each item of the iterator is a JavaScript `Array`. The first item of the array
|
|
1721
1726
|
* is the `name`, the second item of the array is the `value`.
|
|
1722
1727
|
*/
|
|
1723
|
-
entries():
|
|
1728
|
+
entries(): NodeJS.Iterator<[name: string, value: string]>;
|
|
1724
1729
|
/**
|
|
1725
1730
|
* Returns the value of the first name-value pair whose name is `name`. If there
|
|
1726
1731
|
* are no such pairs, `null` is returned.
|
|
@@ -1746,7 +1751,7 @@ declare module "util" {
|
|
|
1746
1751
|
* // bar
|
|
1747
1752
|
* ```
|
|
1748
1753
|
*/
|
|
1749
|
-
keys():
|
|
1754
|
+
keys(): NodeJS.Iterator<string>;
|
|
1750
1755
|
/**
|
|
1751
1756
|
* Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`,
|
|
1752
1757
|
* set the first such pair's value to `value`.
|
|
@@ -1765,11 +1770,11 @@ declare module "util" {
|
|
|
1765
1770
|
/**
|
|
1766
1771
|
* Returns an iterator over the values of each name-value pair.
|
|
1767
1772
|
*/
|
|
1768
|
-
values():
|
|
1773
|
+
values(): NodeJS.Iterator<string>;
|
|
1769
1774
|
/**
|
|
1770
1775
|
* Returns an iterator over each of the name-value pairs in the parameters.
|
|
1771
1776
|
*/
|
|
1772
|
-
[Symbol.iterator]:
|
|
1777
|
+
[Symbol.iterator](): NodeJS.Iterator<[name: string, value: string]>;
|
|
1773
1778
|
}
|
|
1774
1779
|
}
|
|
1775
1780
|
declare module "util/types" {
|
|
@@ -230,16 +230,23 @@ declare module "vm" {
|
|
|
230
230
|
*/
|
|
231
231
|
runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any;
|
|
232
232
|
/**
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
233
|
+
* This method is a shortcut to `script.runInContext(vm.createContext(options), options)`.
|
|
234
|
+
* It does several things at once:
|
|
235
|
+
*
|
|
236
|
+
* 1. Creates a new context.
|
|
237
|
+
* 2. If `contextObject` is an object, contextifies it with the new context.
|
|
238
|
+
* If `contextObject` is undefined, creates a new object and contextifies it.
|
|
239
|
+
* If `contextObject` is `vm.constants.DONT_CONTEXTIFY`, don't contextify anything.
|
|
240
|
+
* 3. Runs the compiled code contained by the `vm.Script` object within the created context. The code
|
|
241
|
+
* does not have access to the scope in which this method is called.
|
|
242
|
+
* 4. Returns the result.
|
|
236
243
|
*
|
|
237
244
|
* The following example compiles code that sets a global variable, then executes
|
|
238
245
|
* the code multiple times in different contexts. The globals are set on and
|
|
239
246
|
* contained within each individual `context`.
|
|
240
247
|
*
|
|
241
248
|
* ```js
|
|
242
|
-
*
|
|
249
|
+
* const vm = require('node:vm');
|
|
243
250
|
*
|
|
244
251
|
* const script = new vm.Script('globalVar = "set"');
|
|
245
252
|
*
|
|
@@ -250,12 +257,22 @@ declare module "vm" {
|
|
|
250
257
|
*
|
|
251
258
|
* console.log(contexts);
|
|
252
259
|
* // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }]
|
|
260
|
+
*
|
|
261
|
+
* // This would throw if the context is created from a contextified object.
|
|
262
|
+
* // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary
|
|
263
|
+
* // global objects that can be frozen.
|
|
264
|
+
* const freezeScript = new vm.Script('Object.freeze(globalThis); globalThis;');
|
|
265
|
+
* const frozenContext = freezeScript.runInNewContext(vm.constants.DONT_CONTEXTIFY);
|
|
253
266
|
* ```
|
|
254
267
|
* @since v0.3.1
|
|
255
|
-
* @param contextObject
|
|
268
|
+
* @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
|
|
269
|
+
* If `undefined`, an empty contextified object will be created for backwards compatibility.
|
|
256
270
|
* @return the result of the very last statement executed in the script.
|
|
257
271
|
*/
|
|
258
|
-
runInNewContext(
|
|
272
|
+
runInNewContext(
|
|
273
|
+
contextObject?: Context | typeof constants.DONT_CONTEXTIFY,
|
|
274
|
+
options?: RunningScriptInNewContextOptions,
|
|
275
|
+
): any;
|
|
259
276
|
/**
|
|
260
277
|
* Runs the compiled code contained by the `vm.Script` within the context of the
|
|
261
278
|
* current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
|
|
@@ -347,17 +364,17 @@ declare module "vm" {
|
|
|
347
364
|
sourceMapURL?: string | undefined;
|
|
348
365
|
}
|
|
349
366
|
/**
|
|
350
|
-
* If given
|
|
367
|
+
* If the given `contextObject` is an object, the `vm.createContext()` method will
|
|
351
368
|
* [prepare that object](https://nodejs.org/docs/latest-v22.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
|
|
352
|
-
* and return a reference to it so that it can be used in
|
|
353
|
-
* [`script.runInContext()`](https://nodejs.org/docs/latest-v22.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
|
|
354
|
-
* scripts, the
|
|
355
|
-
* existing properties but also having the built-in objects and functions any
|
|
356
|
-
*
|
|
369
|
+
* and return a reference to it so that it can be used in calls to {@link runInContext} or
|
|
370
|
+
* [`script.runInContext()`](https://nodejs.org/docs/latest-v22.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
|
|
371
|
+
* Inside such scripts, the global object will be wrapped by the `contextObject`, retaining all of its
|
|
372
|
+
* existing properties but also having the built-in objects and functions any standard
|
|
373
|
+
* [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
|
|
357
374
|
* variables will remain unchanged.
|
|
358
375
|
*
|
|
359
376
|
* ```js
|
|
360
|
-
*
|
|
377
|
+
* const vm = require('node:vm');
|
|
361
378
|
*
|
|
362
379
|
* global.globalVar = 3;
|
|
363
380
|
*
|
|
@@ -374,7 +391,12 @@ declare module "vm" {
|
|
|
374
391
|
* ```
|
|
375
392
|
*
|
|
376
393
|
* If `contextObject` is omitted (or passed explicitly as `undefined`), a new,
|
|
377
|
-
* empty
|
|
394
|
+
* empty contextified object will be returned.
|
|
395
|
+
*
|
|
396
|
+
* When the global object in the newly created context is contextified, it has some quirks
|
|
397
|
+
* compared to ordinary global objects. For example, it cannot be frozen. To create a context
|
|
398
|
+
* without the contextifying quirks, pass `vm.constants.DONT_CONTEXTIFY` as the `contextObject`
|
|
399
|
+
* argument. See the documentation of `vm.constants.DONT_CONTEXTIFY` for details.
|
|
378
400
|
*
|
|
379
401
|
* The `vm.createContext()` method is primarily useful for creating a single
|
|
380
402
|
* context that can be used to run multiple scripts. For instance, if emulating a
|
|
@@ -385,11 +407,17 @@ declare module "vm" {
|
|
|
385
407
|
* The provided `name` and `origin` of the context are made visible through the
|
|
386
408
|
* Inspector API.
|
|
387
409
|
* @since v0.3.1
|
|
410
|
+
* @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
|
|
411
|
+
* If `undefined`, an empty contextified object will be created for backwards compatibility.
|
|
388
412
|
* @return contextified object.
|
|
389
413
|
*/
|
|
390
|
-
function createContext(
|
|
414
|
+
function createContext(
|
|
415
|
+
contextObject?: Context | typeof constants.DONT_CONTEXTIFY,
|
|
416
|
+
options?: CreateContextOptions,
|
|
417
|
+
): Context;
|
|
391
418
|
/**
|
|
392
|
-
* Returns `true` if the given `object` object has been
|
|
419
|
+
* Returns `true` if the given `object` object has been contextified using {@link createContext},
|
|
420
|
+
* or if it's the global object of a context created using `vm.constants.DONT_CONTEXTIFY`.
|
|
393
421
|
* @since v0.11.7
|
|
394
422
|
*/
|
|
395
423
|
function isContext(sandbox: Context): boolean;
|
|
@@ -422,18 +450,26 @@ declare module "vm" {
|
|
|
422
450
|
*/
|
|
423
451
|
function runInContext(code: string, contextifiedObject: Context, options?: RunningCodeOptions | string): any;
|
|
424
452
|
/**
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
* runs it within the created context, then returns the result. Running code
|
|
428
|
-
* does not have access to the local scope.
|
|
429
|
-
*
|
|
453
|
+
* This method is a shortcut to
|
|
454
|
+
* `(new vm.Script(code, options)).runInContext(vm.createContext(options), options)`.
|
|
430
455
|
* If `options` is a string, then it specifies the filename.
|
|
431
456
|
*
|
|
457
|
+
* It does several things at once:
|
|
458
|
+
*
|
|
459
|
+
* 1. Creates a new context.
|
|
460
|
+
* 2. If `contextObject` is an object, contextifies it with the new context.
|
|
461
|
+
* If `contextObject` is undefined, creates a new object and contextifies it.
|
|
462
|
+
* If `contextObject` is `vm.constants.DONT_CONTEXTIFY`, don't contextify anything.
|
|
463
|
+
* 3. Compiles the code as a`vm.Script`
|
|
464
|
+
* 4. Runs the compield code within the created context. The code does not have access to the scope in
|
|
465
|
+
* which this method is called.
|
|
466
|
+
* 5. Returns the result.
|
|
467
|
+
*
|
|
432
468
|
* The following example compiles and executes code that increments a global
|
|
433
469
|
* variable and sets a new one. These globals are contained in the `contextObject`.
|
|
434
470
|
*
|
|
435
471
|
* ```js
|
|
436
|
-
*
|
|
472
|
+
* const vm = require('node:vm');
|
|
437
473
|
*
|
|
438
474
|
* const contextObject = {
|
|
439
475
|
* animal: 'cat',
|
|
@@ -443,15 +479,21 @@ declare module "vm" {
|
|
|
443
479
|
* vm.runInNewContext('count += 1; name = "kitty"', contextObject);
|
|
444
480
|
* console.log(contextObject);
|
|
445
481
|
* // Prints: { animal: 'cat', count: 3, name: 'kitty' }
|
|
482
|
+
*
|
|
483
|
+
* // This would throw if the context is created from a contextified object.
|
|
484
|
+
* // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary global objects that
|
|
485
|
+
* // can be frozen.
|
|
486
|
+
* const frozenContext = vm.runInNewContext('Object.freeze(globalThis); globalThis;', vm.constants.DONT_CONTEXTIFY);
|
|
446
487
|
* ```
|
|
447
488
|
* @since v0.3.1
|
|
448
489
|
* @param code The JavaScript code to compile and run.
|
|
449
|
-
* @param contextObject
|
|
490
|
+
* @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
|
|
491
|
+
* If `undefined`, an empty contextified object will be created for backwards compatibility.
|
|
450
492
|
* @return the result of the very last statement executed in the script.
|
|
451
493
|
*/
|
|
452
494
|
function runInNewContext(
|
|
453
495
|
code: string,
|
|
454
|
-
contextObject?: Context,
|
|
496
|
+
contextObject?: Context | typeof constants.DONT_CONTEXTIFY,
|
|
455
497
|
options?: RunningCodeInNewContextOptions | string,
|
|
456
498
|
): any;
|
|
457
499
|
/**
|
|
@@ -902,19 +944,31 @@ declare module "vm" {
|
|
|
902
944
|
}
|
|
903
945
|
/**
|
|
904
946
|
* Returns an object containing commonly used constants for VM operations.
|
|
905
|
-
* @since v20.12.0
|
|
947
|
+
* @since v21.7.0, v20.12.0
|
|
906
948
|
*/
|
|
907
949
|
namespace constants {
|
|
908
950
|
/**
|
|
909
|
-
* Stability: 1.1 - Active development
|
|
910
|
-
*
|
|
911
951
|
* A constant that can be used as the `importModuleDynamically` option to `vm.Script`
|
|
912
952
|
* and `vm.compileFunction()` so that Node.js uses the default ESM loader from the main
|
|
913
953
|
* context to load the requested module.
|
|
914
954
|
*
|
|
915
955
|
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
956
|
+
* @since v21.7.0, v20.12.0
|
|
916
957
|
*/
|
|
917
958
|
const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
|
|
959
|
+
/**
|
|
960
|
+
* This constant, when used as the `contextObject` argument in vm APIs, instructs Node.js to create
|
|
961
|
+
* a context without wrapping its global object with another object in a Node.js-specific manner.
|
|
962
|
+
* As a result, the `globalThis` value inside the new context would behave more closely to an ordinary
|
|
963
|
+
* one.
|
|
964
|
+
*
|
|
965
|
+
* When `vm.constants.DONT_CONTEXTIFY` is used as the `contextObject` argument to {@link createContext},
|
|
966
|
+
* the returned object is a proxy-like object to the global object in the newly created context with
|
|
967
|
+
* fewer Node.js-specific quirks. It is reference equal to the `globalThis` value in the new context,
|
|
968
|
+
* can be modified from outside the context, and can be used to access built-ins in the new context directly.
|
|
969
|
+
* @since v22.8.0
|
|
970
|
+
*/
|
|
971
|
+
const DONT_CONTEXTIFY: number;
|
|
918
972
|
}
|
|
919
973
|
}
|
|
920
974
|
declare module "node:vm" {
|
|
@@ -267,7 +267,7 @@ declare module "worker_threads" {
|
|
|
267
267
|
trackUnmanagedFds?: boolean | undefined;
|
|
268
268
|
/**
|
|
269
269
|
* An optional `name` to be appended to the worker title
|
|
270
|
-
* for
|
|
270
|
+
* for debugging/identification purposes, making the final title as
|
|
271
271
|
* `[worker ${id}] ${name}`.
|
|
272
272
|
*/
|
|
273
273
|
name?: string | undefined;
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 31 Oct 2024 18:02:52 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -45,7 +45,7 @@ declare module "assert" {
|
|
|
45
45
|
/** The `operator` property on the error instance. */
|
|
46
46
|
operator?: string | undefined;
|
|
47
47
|
/** If provided, the generated stack trace omits frames before this function. */
|
|
48
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
49
49
|
stackStartFn?: Function | undefined;
|
|
50
50
|
});
|
|
51
51
|
}
|
|
@@ -226,7 +226,7 @@ declare module "assert" {
|
|
|
226
226
|
expected: unknown,
|
|
227
227
|
message?: string | Error,
|
|
228
228
|
operator?: string,
|
|
229
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
229
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
230
230
|
stackStartFn?: Function,
|
|
231
231
|
): never;
|
|
232
232
|
/**
|
package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/disposable.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Polyfills for the explicit resource management types added in TypeScript 5.2.
|
|
2
|
+
// TODO: remove once this package no longer supports TS 5.1, and replace with a
|
|
3
|
+
// <reference> to TypeScript's disposable library in index.d.ts.
|
|
4
|
+
|
|
5
|
+
interface SymbolConstructor {
|
|
6
|
+
readonly dispose: unique symbol;
|
|
7
|
+
readonly asyncDispose: unique symbol;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Disposable {
|
|
11
|
+
[Symbol.dispose](): void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface AsyncDisposable {
|
|
15
|
+
[Symbol.asyncDispose](): PromiseLike<void>;
|
|
16
|
+
}
|
package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Declaration files in this directory contain types relating to TypeScript library features
|
|
2
|
+
// that are not included in all TypeScript versions supported by DefinitelyTyped, but
|
|
3
|
+
// which can be made backwards-compatible without needing `typesVersions`.
|
|
4
|
+
// If adding declarations to this directory, please specify which versions of TypeScript require them,
|
|
5
|
+
// so that they can be removed when no longer needed.
|
|
6
|
+
|
|
7
|
+
/// <reference path="disposable.d.ts" />
|
|
8
|
+
/// <reference path="indexable.d.ts" />
|
|
9
|
+
/// <reference path="iterators.d.ts" />
|
package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/indexable.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Polyfill for ES2022's .at() method on string/array prototypes, added to TypeScript in 4.6.
|
|
2
|
+
// TODO: these methods are not used within @types/node, and should be removed at the next
|
|
3
|
+
// major @types/node version; users should include the es2022 TypeScript libraries
|
|
4
|
+
// if they need these features.
|
|
5
|
+
|
|
6
|
+
interface RelativeIndexable<T> {
|
|
7
|
+
at(index: number): T | undefined;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface String extends RelativeIndexable<string> {}
|
|
11
|
+
interface Array<T> extends RelativeIndexable<T> {}
|
|
12
|
+
interface ReadonlyArray<T> extends RelativeIndexable<T> {}
|
|
13
|
+
interface Int8Array extends RelativeIndexable<number> {}
|
|
14
|
+
interface Uint8Array extends RelativeIndexable<number> {}
|
|
15
|
+
interface Uint8ClampedArray extends RelativeIndexable<number> {}
|
|
16
|
+
interface Int16Array extends RelativeIndexable<number> {}
|
|
17
|
+
interface Uint16Array extends RelativeIndexable<number> {}
|
|
18
|
+
interface Int32Array extends RelativeIndexable<number> {}
|
|
19
|
+
interface Uint32Array extends RelativeIndexable<number> {}
|
|
20
|
+
interface Float32Array extends RelativeIndexable<number> {}
|
|
21
|
+
interface Float64Array extends RelativeIndexable<number> {}
|
|
22
|
+
interface BigInt64Array extends RelativeIndexable<bigint> {}
|
|
23
|
+
interface BigUint64Array extends RelativeIndexable<bigint> {}
|
package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/iterators.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Backwards-compatible iterator interfaces, augmented with iterator helper methods by lib.esnext.iterator in TypeScript 5.6.
|
|
2
|
+
// The IterableIterator interface does not contain these methods, which creates assignability issues in places where IteratorObjects
|
|
3
|
+
// are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded.
|
|
4
|
+
// Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods
|
|
5
|
+
// if lib.esnext.iterator is loaded.
|
|
6
|
+
// TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn.
|
|
7
|
+
|
|
8
|
+
// Placeholders for TS <5.6
|
|
9
|
+
interface IteratorObject<T, TReturn, TNext> {}
|
|
10
|
+
interface AsyncIteratorObject<T, TReturn, TNext> {}
|
|
11
|
+
|
|
12
|
+
declare namespace NodeJS {
|
|
13
|
+
// Populate iterator methods for TS <5.6
|
|
14
|
+
interface Iterator<T, TReturn, TNext> extends globalThis.Iterator<T, TReturn, TNext> {}
|
|
15
|
+
interface AsyncIterator<T, TReturn, TNext> extends globalThis.AsyncIterator<T, TReturn, TNext> {}
|
|
16
|
+
|
|
17
|
+
// Polyfill for TS 5.6's instrinsic BuiltinIteratorReturn type, required for DOM-compatible iterators
|
|
18
|
+
type BuiltinIteratorReturn = ReturnType<any[][typeof Symbol.iterator]> extends
|
|
19
|
+
globalThis.Iterator<any, infer TReturn> ? TReturn
|
|
20
|
+
: any;
|
|
21
|
+
}
|