@emulsify/cli 1.11.4 → 1.12.1
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/dist/index.js +1 -1
- package/dist/node_modules/.package-lock.json +34 -24
- package/dist/node_modules/@types/node/README.md +2 -2
- package/dist/node_modules/@types/node/assert.d.ts +23 -1
- package/dist/node_modules/@types/node/async_hooks.d.ts +64 -0
- package/dist/node_modules/@types/node/buffer.buffer.d.ts +124 -38
- package/dist/node_modules/@types/node/buffer.d.ts +19 -17
- package/dist/node_modules/@types/node/child_process.d.ts +88 -161
- package/dist/node_modules/@types/node/cluster.d.ts +5 -6
- package/dist/node_modules/@types/node/constants.d.ts +14 -12
- package/dist/node_modules/@types/node/crypto.d.ts +237 -166
- package/dist/node_modules/@types/node/dgram.d.ts +15 -14
- package/dist/node_modules/@types/node/diagnostics_channel.d.ts +39 -15
- package/dist/node_modules/@types/node/dns/promises.d.ts +11 -9
- package/dist/node_modules/@types/node/dns.d.ts +28 -21
- package/dist/node_modules/@types/node/events.d.ts +81 -35
- package/dist/node_modules/@types/node/fs/promises.d.ts +61 -36
- package/dist/node_modules/@types/node/fs.d.ts +251 -193
- package/dist/node_modules/@types/node/globals.d.ts +146 -442
- package/dist/node_modules/@types/node/globals.typedarray.d.ts +17 -0
- package/dist/node_modules/@types/node/http.d.ts +136 -31
- package/dist/node_modules/@types/node/http2.d.ts +102 -26
- package/dist/node_modules/@types/node/https.d.ts +94 -60
- package/dist/node_modules/@types/node/index.d.ts +5 -3
- package/dist/node_modules/@types/node/{inspector.d.ts → inspector.generated.d.ts} +272 -2
- package/dist/node_modules/@types/node/module.d.ts +362 -138
- package/dist/node_modules/@types/node/net.d.ts +27 -20
- package/dist/node_modules/@types/node/os.d.ts +14 -3
- package/dist/node_modules/@types/node/package.json +4 -89
- package/dist/node_modules/@types/node/perf_hooks.d.ts +37 -10
- package/dist/node_modules/@types/node/process.d.ts +108 -35
- package/dist/node_modules/@types/node/querystring.d.ts +2 -3
- package/dist/node_modules/@types/node/readline/promises.d.ts +1 -1
- package/dist/node_modules/@types/node/stream/consumers.d.ts +33 -7
- package/dist/node_modules/@types/node/stream/web.d.ts +13 -4
- package/dist/node_modules/@types/node/stream.d.ts +963 -1014
- package/dist/node_modules/@types/node/string_decoder.d.ts +2 -2
- package/dist/node_modules/@types/node/test.d.ts +1504 -1655
- package/dist/node_modules/@types/node/timers/promises.d.ts +28 -17
- package/dist/node_modules/@types/node/timers.d.ts +157 -111
- package/dist/node_modules/@types/node/tls.d.ts +105 -67
- package/dist/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +120 -37
- package/dist/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +15 -0
- package/dist/node_modules/@types/node/ts5.6/index.d.ts +5 -3
- package/dist/node_modules/@types/node/url.d.ts +10 -1
- package/dist/node_modules/@types/node/util.d.ts +28 -3
- package/dist/node_modules/@types/node/v8.d.ts +6 -5
- package/dist/node_modules/@types/node/vm.d.ts +147 -68
- package/dist/node_modules/@types/node/wasi.d.ts +1 -1
- package/dist/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/dist/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/dist/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/dist/node_modules/@types/node/web-globals/fetch.d.ts +46 -0
- package/dist/node_modules/@types/node/worker_threads.d.ts +60 -39
- package/dist/node_modules/@types/node/zlib.d.ts +21 -20
- package/dist/node_modules/debug/package.json +7 -3
- package/dist/node_modules/debug/src/browser.js +2 -1
- package/dist/node_modules/debug/src/common.js +57 -39
- package/dist/node_modules/fast-uri/.github/dependabot.yml +1 -1
- package/dist/node_modules/fast-uri/.github/workflows/ci.yml +81 -3
- package/dist/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +6 -2
- package/dist/node_modules/fast-uri/LICENSE +3 -1
- package/dist/node_modules/fast-uri/README.md +55 -37
- package/dist/node_modules/fast-uri/benchmark/benchmark.mjs +159 -0
- package/dist/node_modules/fast-uri/benchmark/equal.mjs +51 -0
- package/dist/node_modules/fast-uri/benchmark/non-simple-domain.mjs +22 -0
- package/dist/node_modules/fast-uri/benchmark/package.json +17 -0
- package/dist/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +24 -0
- package/dist/node_modules/fast-uri/benchmark/ws-is-secure.mjs +65 -0
- package/dist/node_modules/fast-uri/eslint.config.js +6 -0
- package/dist/node_modules/fast-uri/index.js +98 -61
- package/dist/node_modules/fast-uri/lib/schemes.js +160 -81
- package/dist/node_modules/fast-uri/lib/utils.js +217 -123
- package/dist/node_modules/fast-uri/package.json +44 -14
- package/dist/node_modules/fast-uri/test/ajv.test.js +7 -3
- package/dist/node_modules/fast-uri/test/equal.test.js +7 -2
- package/dist/node_modules/fast-uri/test/fixtures/uri-js-parse.json +501 -0
- package/dist/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +120 -0
- package/dist/node_modules/fast-uri/test/parse.test.js +31 -31
- package/dist/node_modules/fast-uri/test/resolve.test.js +52 -49
- package/dist/node_modules/fast-uri/test/rfc-3986.test.js +90 -0
- package/dist/node_modules/fast-uri/test/serialize.test.js +55 -47
- package/dist/node_modules/fast-uri/test/uri-js-compatibility.test.js +33 -0
- package/dist/node_modules/fast-uri/test/uri-js.test.js +230 -230
- package/dist/node_modules/fast-uri/test/util.test.js +23 -8
- package/dist/node_modules/fast-uri/tsconfig.json +9 -0
- package/dist/node_modules/fast-uri/types/index.d.ts +16 -9
- package/dist/node_modules/fast-uri/types/index.test-d.ts +9 -9
- package/dist/node_modules/fs-extra/LICENSE +1 -1
- package/dist/node_modules/fs-extra/README.md +3 -1
- package/dist/node_modules/fs-extra/lib/copy/copy-sync.js +11 -1
- package/dist/node_modules/fs-extra/lib/copy/copy.js +13 -15
- package/dist/node_modules/fs-extra/lib/fs/index.js +6 -0
- package/dist/node_modules/fs-extra/lib/util/async.js +29 -0
- package/dist/node_modules/fs-extra/lib/util/stat.js +2 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonfile/README.md +1 -1
- package/dist/node_modules/jsonfile/index.js +3 -3
- package/dist/node_modules/jsonfile/package.json +1 -1
- package/dist/node_modules/simple-git/dist/cjs/index.js +235 -235
- package/dist/node_modules/simple-git/dist/cjs/index.js.map +3 -3
- package/dist/node_modules/simple-git/dist/esm/index.js +229 -233
- package/dist/node_modules/simple-git/dist/esm/index.js.map +3 -3
- package/dist/node_modules/simple-git/dist/src/lib/git-logger.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/plugins/error-detection.plugin.d.ts +2 -3
- package/dist/node_modules/simple-git/dist/src/lib/plugins/simple-git-plugin.d.ts +2 -3
- package/dist/node_modules/simple-git/dist/src/lib/plugins/spawn-options-plugin.d.ts +0 -1
- package/dist/node_modules/simple-git/dist/src/lib/runners/scheduler.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/runners/tasks-pending-queue.d.ts +2 -2
- package/dist/node_modules/simple-git/dist/src/lib/tasks/apply-patch.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/clean.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/clone.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/log.d.ts +3 -3
- package/dist/node_modules/simple-git/dist/src/lib/tasks/push.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/remote.d.ts +4 -2
- package/dist/node_modules/simple-git/dist/src/lib/tasks/reset.d.ts +3 -3
- package/dist/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/task.d.ts +2 -2
- package/dist/node_modules/simple-git/dist/src/lib/types/handlers.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/types/index.d.ts +9 -13
- package/dist/node_modules/simple-git/dist/src/lib/types/tasks.d.ts +5 -6
- package/dist/node_modules/simple-git/dist/src/lib/utils/argument-filters.d.ts +5 -7
- package/dist/node_modules/simple-git/dist/src/lib/utils/git-output-streams.d.ts +0 -1
- package/dist/node_modules/simple-git/dist/src/lib/utils/line-parser.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/utils/task-options.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/utils/util.d.ts +11 -10
- package/dist/node_modules/simple-git/package.json +6 -6
- package/dist/node_modules/simple-git/readme.md +8 -0
- package/dist/node_modules/undici-types/dispatcher.d.ts +1 -0
- package/dist/node_modules/undici-types/eventsource.d.ts +0 -2
- package/dist/node_modules/undici-types/filereader.d.ts +1 -1
- package/dist/node_modules/undici-types/interceptors.d.ts +3 -1
- package/dist/node_modules/undici-types/package.json +1 -1
- package/dist/node_modules/undici-types/patch.d.ts +0 -38
- package/dist/node_modules/undici-types/readable.d.ts +5 -0
- package/dist/node_modules/undici-types/webidl.d.ts +6 -0
- package/dist/node_modules/undici-types/websocket.d.ts +0 -2
- package/dist/package-lock.json +912 -813
- package/dist/package.json +2 -2
- package/dist/util/getAvailableStarters.js +3 -3
- package/package.json +2 -2
- package/dist/node_modules/@types/node/dom-events.d.ts +0 -124
- package/dist/node_modules/fast-uri/benchmark.js +0 -105
- package/dist/node_modules/fast-uri/lib/scopedChars.js +0 -30
- package/dist/node_modules/fast-uri/test/.gitkeep +0 -0
- package/dist/node_modules/fast-uri/test/compatibility.test.js +0 -131
- package/dist/node_modules/jsonfile/CHANGELOG.md +0 -171
|
@@ -1186,7 +1186,7 @@ declare module "util" {
|
|
|
1186
1186
|
* @param content The raw contents of a `.env` file.
|
|
1187
1187
|
* @since v20.12.0
|
|
1188
1188
|
*/
|
|
1189
|
-
export function parseEnv(content: string):
|
|
1189
|
+
export function parseEnv(content: string): NodeJS.Dict<string>;
|
|
1190
1190
|
// https://nodejs.org/docs/latest/api/util.html#foreground-colors
|
|
1191
1191
|
type ForegroundColors =
|
|
1192
1192
|
| "black"
|
|
@@ -1241,6 +1241,18 @@ declare module "util" {
|
|
|
1241
1241
|
| "reset"
|
|
1242
1242
|
| "strikethrough"
|
|
1243
1243
|
| "underline";
|
|
1244
|
+
export interface StyleTextOptions {
|
|
1245
|
+
/**
|
|
1246
|
+
* When true, `stream` is checked to see if it can handle colors.
|
|
1247
|
+
* @default true
|
|
1248
|
+
*/
|
|
1249
|
+
validateStream?: boolean | undefined;
|
|
1250
|
+
/**
|
|
1251
|
+
* A stream that will be validated if it can be colored.
|
|
1252
|
+
* @default process.stdout
|
|
1253
|
+
*/
|
|
1254
|
+
stream?: NodeJS.WritableStream | undefined;
|
|
1255
|
+
}
|
|
1244
1256
|
/**
|
|
1245
1257
|
* Stability: 1.1 - Active development
|
|
1246
1258
|
*
|
|
@@ -1281,6 +1293,7 @@ declare module "util" {
|
|
|
1281
1293
|
| Modifiers
|
|
1282
1294
|
| Array<ForegroundColors | BackgroundColors | Modifiers>,
|
|
1283
1295
|
text: string,
|
|
1296
|
+
options?: StyleTextOptions,
|
|
1284
1297
|
): string;
|
|
1285
1298
|
/**
|
|
1286
1299
|
* An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API.
|
|
@@ -1364,7 +1377,7 @@ declare module "util" {
|
|
|
1364
1377
|
* encoded bytes.
|
|
1365
1378
|
* @param [input='an empty string'] The text to encode.
|
|
1366
1379
|
*/
|
|
1367
|
-
encode(input?: string):
|
|
1380
|
+
encode(input?: string): NodeJS.NonSharedUint8Array;
|
|
1368
1381
|
/**
|
|
1369
1382
|
* UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object
|
|
1370
1383
|
* containing the read Unicode code units and written UTF-8 bytes.
|
|
@@ -1465,7 +1478,7 @@ declare module "util" {
|
|
|
1465
1478
|
/**
|
|
1466
1479
|
* Array of argument strings.
|
|
1467
1480
|
*/
|
|
1468
|
-
args?: string[] | undefined;
|
|
1481
|
+
args?: readonly string[] | undefined;
|
|
1469
1482
|
/**
|
|
1470
1483
|
* Used to describe arguments known to the parser.
|
|
1471
1484
|
*/
|
|
@@ -1852,6 +1865,18 @@ declare module "util/types" {
|
|
|
1852
1865
|
* @since v10.0.0
|
|
1853
1866
|
*/
|
|
1854
1867
|
function isBigInt64Array(value: unknown): value is BigInt64Array;
|
|
1868
|
+
/**
|
|
1869
|
+
* Returns `true` if the value is a BigInt object, e.g. created
|
|
1870
|
+
* by `Object(BigInt(123))`.
|
|
1871
|
+
*
|
|
1872
|
+
* ```js
|
|
1873
|
+
* util.types.isBigIntObject(Object(BigInt(123))); // Returns true
|
|
1874
|
+
* util.types.isBigIntObject(BigInt(123)); // Returns false
|
|
1875
|
+
* util.types.isBigIntObject(123); // Returns false
|
|
1876
|
+
* ```
|
|
1877
|
+
* @since v10.4.0
|
|
1878
|
+
*/
|
|
1879
|
+
function isBigIntObject(object: unknown): object is BigInt;
|
|
1855
1880
|
/**
|
|
1856
1881
|
* Returns `true` if the value is a `BigUint64Array` instance.
|
|
1857
1882
|
*
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/v8.js)
|
|
8
8
|
*/
|
|
9
9
|
declare module "v8" {
|
|
10
|
+
import { NonSharedBuffer } from "node:buffer";
|
|
10
11
|
import { Readable } from "node:stream";
|
|
11
12
|
interface HeapSpaceInfo {
|
|
12
13
|
space_name: string;
|
|
@@ -43,12 +44,12 @@ declare module "v8" {
|
|
|
43
44
|
* If true, expose internals in the heap snapshot.
|
|
44
45
|
* @default false
|
|
45
46
|
*/
|
|
46
|
-
exposeInternals?: boolean;
|
|
47
|
+
exposeInternals?: boolean | undefined;
|
|
47
48
|
/**
|
|
48
49
|
* If true, expose numeric values in artificial fields.
|
|
49
50
|
* @default false
|
|
50
51
|
*/
|
|
51
|
-
exposeNumericValues?: boolean;
|
|
52
|
+
exposeNumericValues?: boolean | undefined;
|
|
52
53
|
}
|
|
53
54
|
/**
|
|
54
55
|
* Returns an integer representing a version tag derived from the V8 version,
|
|
@@ -339,7 +340,7 @@ declare module "v8" {
|
|
|
339
340
|
* the buffer is released. Calling this method results in undefined behavior
|
|
340
341
|
* if a previous write has failed.
|
|
341
342
|
*/
|
|
342
|
-
releaseBuffer():
|
|
343
|
+
releaseBuffer(): NonSharedBuffer;
|
|
343
344
|
/**
|
|
344
345
|
* Marks an `ArrayBuffer` as having its contents transferred out of band.
|
|
345
346
|
* Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`.
|
|
@@ -367,7 +368,7 @@ declare module "v8" {
|
|
|
367
368
|
* will require a way to compute the length of the buffer.
|
|
368
369
|
* For use inside of a custom `serializer._writeHostObject()`.
|
|
369
370
|
*/
|
|
370
|
-
writeRawBytes(buffer: NodeJS.
|
|
371
|
+
writeRawBytes(buffer: NodeJS.ArrayBufferView): void;
|
|
371
372
|
}
|
|
372
373
|
/**
|
|
373
374
|
* A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only
|
|
@@ -438,7 +439,7 @@ declare module "v8" {
|
|
|
438
439
|
* larger than `buffer.constants.MAX_LENGTH`.
|
|
439
440
|
* @since v8.0.0
|
|
440
441
|
*/
|
|
441
|
-
function serialize(value: any):
|
|
442
|
+
function serialize(value: any): NonSharedBuffer;
|
|
442
443
|
/**
|
|
443
444
|
* Uses a `DefaultDeserializer` with default options to read a JS value
|
|
444
445
|
* from a buffer.
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/vm.js)
|
|
38
38
|
*/
|
|
39
39
|
declare module "vm" {
|
|
40
|
+
import { NonSharedBuffer } from "node:buffer";
|
|
40
41
|
import { ImportAttributes } from "node:module";
|
|
41
42
|
interface Context extends NodeJS.Dict<any> {}
|
|
42
43
|
interface BaseOptions {
|
|
@@ -56,11 +57,16 @@ declare module "vm" {
|
|
|
56
57
|
*/
|
|
57
58
|
columnOffset?: number | undefined;
|
|
58
59
|
}
|
|
60
|
+
type DynamicModuleLoader<T> = (
|
|
61
|
+
specifier: string,
|
|
62
|
+
referrer: T,
|
|
63
|
+
importAttributes: ImportAttributes,
|
|
64
|
+
) => Module | Promise<Module>;
|
|
59
65
|
interface ScriptOptions extends BaseOptions {
|
|
60
66
|
/**
|
|
61
|
-
* V8's code cache data for the supplied source.
|
|
67
|
+
* Provides an optional data with V8's code cache data for the supplied source.
|
|
62
68
|
*/
|
|
63
|
-
cachedData?:
|
|
69
|
+
cachedData?: NodeJS.ArrayBufferView | undefined;
|
|
64
70
|
/** @deprecated in favor of `script.createCachedData()` */
|
|
65
71
|
produceCachedData?: boolean | undefined;
|
|
66
72
|
/**
|
|
@@ -69,7 +75,7 @@ declare module "vm" {
|
|
|
69
75
|
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v20.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
70
76
|
*/
|
|
71
77
|
importModuleDynamically?:
|
|
72
|
-
|
|
|
78
|
+
| DynamicModuleLoader<Script>
|
|
73
79
|
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
|
74
80
|
| undefined;
|
|
75
81
|
}
|
|
@@ -92,41 +98,46 @@ declare module "vm" {
|
|
|
92
98
|
*/
|
|
93
99
|
breakOnSigint?: boolean | undefined;
|
|
94
100
|
}
|
|
95
|
-
interface RunningScriptInNewContextOptions
|
|
101
|
+
interface RunningScriptInNewContextOptions
|
|
102
|
+
extends RunningScriptOptions, Pick<CreateContextOptions, "microtaskMode">
|
|
103
|
+
{
|
|
96
104
|
/**
|
|
97
105
|
* Human-readable name of the newly created context.
|
|
98
106
|
*/
|
|
99
|
-
contextName?: CreateContextOptions["name"];
|
|
107
|
+
contextName?: CreateContextOptions["name"] | undefined;
|
|
100
108
|
/**
|
|
101
109
|
* Origin corresponding to the newly created context for display purposes. The origin should be formatted like a URL,
|
|
102
110
|
* but with only the scheme, host, and port (if necessary), like the value of the `url.origin` property of a `URL` object.
|
|
103
111
|
* Most notably, this string should omit the trailing slash, as that denotes a path.
|
|
104
112
|
*/
|
|
105
|
-
contextOrigin?: CreateContextOptions["origin"];
|
|
106
|
-
contextCodeGeneration?: CreateContextOptions["codeGeneration"];
|
|
107
|
-
/**
|
|
108
|
-
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
|
109
|
-
*/
|
|
110
|
-
microtaskMode?: CreateContextOptions["microtaskMode"];
|
|
111
|
-
}
|
|
112
|
-
interface RunningCodeOptions extends RunningScriptOptions {
|
|
113
|
-
cachedData?: ScriptOptions["cachedData"];
|
|
114
|
-
importModuleDynamically?: ScriptOptions["importModuleDynamically"];
|
|
113
|
+
contextOrigin?: CreateContextOptions["origin"] | undefined;
|
|
114
|
+
contextCodeGeneration?: CreateContextOptions["codeGeneration"] | undefined;
|
|
115
115
|
}
|
|
116
|
-
interface
|
|
117
|
-
cachedData?: ScriptOptions["cachedData"];
|
|
118
|
-
importModuleDynamically?: ScriptOptions["importModuleDynamically"];
|
|
119
|
-
}
|
|
120
|
-
interface CompileFunctionOptions extends BaseOptions {
|
|
116
|
+
interface RunningCodeOptions extends RunningScriptOptions, Pick<ScriptOptions, "cachedData"> {
|
|
121
117
|
/**
|
|
122
|
-
*
|
|
118
|
+
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
119
|
+
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
120
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
123
121
|
*/
|
|
124
|
-
|
|
122
|
+
importModuleDynamically?:
|
|
123
|
+
| DynamicModuleLoader<Script>
|
|
124
|
+
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
|
125
|
+
| undefined;
|
|
126
|
+
}
|
|
127
|
+
interface RunningCodeInNewContextOptions
|
|
128
|
+
extends RunningScriptInNewContextOptions, Pick<ScriptOptions, "cachedData">
|
|
129
|
+
{
|
|
125
130
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
131
|
+
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
132
|
+
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
133
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
128
134
|
*/
|
|
129
|
-
|
|
135
|
+
importModuleDynamically?:
|
|
136
|
+
| DynamicModuleLoader<Script>
|
|
137
|
+
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
|
138
|
+
| undefined;
|
|
139
|
+
}
|
|
140
|
+
interface CompileFunctionOptions extends BaseOptions, Pick<ScriptOptions, "cachedData" | "produceCachedData"> {
|
|
130
141
|
/**
|
|
131
142
|
* The sandbox/context in which the said function should be compiled in.
|
|
132
143
|
*/
|
|
@@ -135,6 +146,15 @@ declare module "vm" {
|
|
|
135
146
|
* An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
|
|
136
147
|
*/
|
|
137
148
|
contextExtensions?: Object[] | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
151
|
+
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
152
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
153
|
+
*/
|
|
154
|
+
importModuleDynamically?:
|
|
155
|
+
| DynamicModuleLoader<ReturnType<typeof compileFunction>>
|
|
156
|
+
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
|
157
|
+
| undefined;
|
|
138
158
|
}
|
|
139
159
|
interface CreateContextOptions {
|
|
140
160
|
/**
|
|
@@ -169,6 +189,15 @@ declare module "vm" {
|
|
|
169
189
|
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
|
170
190
|
*/
|
|
171
191
|
microtaskMode?: "afterEvaluate" | undefined;
|
|
192
|
+
/**
|
|
193
|
+
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
194
|
+
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
195
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
196
|
+
*/
|
|
197
|
+
importModuleDynamically?:
|
|
198
|
+
| DynamicModuleLoader<Context>
|
|
199
|
+
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
|
200
|
+
| undefined;
|
|
172
201
|
}
|
|
173
202
|
type MeasureMemoryMode = "summary" | "detailed";
|
|
174
203
|
interface MeasureMemoryOptions {
|
|
@@ -230,16 +259,23 @@ declare module "vm" {
|
|
|
230
259
|
*/
|
|
231
260
|
runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any;
|
|
232
261
|
/**
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
262
|
+
* This method is a shortcut to `script.runInContext(vm.createContext(options), options)`.
|
|
263
|
+
* It does several things at once:
|
|
264
|
+
*
|
|
265
|
+
* 1. Creates a new context.
|
|
266
|
+
* 2. If `contextObject` is an object, contextifies it with the new context.
|
|
267
|
+
* If `contextObject` is undefined, creates a new object and contextifies it.
|
|
268
|
+
* If `contextObject` is `vm.constants.DONT_CONTEXTIFY`, don't contextify anything.
|
|
269
|
+
* 3. Runs the compiled code contained by the `vm.Script` object within the created context. The code
|
|
270
|
+
* does not have access to the scope in which this method is called.
|
|
271
|
+
* 4. Returns the result.
|
|
236
272
|
*
|
|
237
273
|
* The following example compiles code that sets a global variable, then executes
|
|
238
274
|
* the code multiple times in different contexts. The globals are set on and
|
|
239
275
|
* contained within each individual `context`.
|
|
240
276
|
*
|
|
241
277
|
* ```js
|
|
242
|
-
*
|
|
278
|
+
* const vm = require('node:vm');
|
|
243
279
|
*
|
|
244
280
|
* const script = new vm.Script('globalVar = "set"');
|
|
245
281
|
*
|
|
@@ -250,12 +286,22 @@ declare module "vm" {
|
|
|
250
286
|
*
|
|
251
287
|
* console.log(contexts);
|
|
252
288
|
* // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }]
|
|
289
|
+
*
|
|
290
|
+
* // This would throw if the context is created from a contextified object.
|
|
291
|
+
* // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary
|
|
292
|
+
* // global objects that can be frozen.
|
|
293
|
+
* const freezeScript = new vm.Script('Object.freeze(globalThis); globalThis;');
|
|
294
|
+
* const frozenContext = freezeScript.runInNewContext(vm.constants.DONT_CONTEXTIFY);
|
|
253
295
|
* ```
|
|
254
296
|
* @since v0.3.1
|
|
255
|
-
* @param contextObject
|
|
297
|
+
* @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
|
|
298
|
+
* If `undefined`, an empty contextified object will be created for backwards compatibility.
|
|
256
299
|
* @return the result of the very last statement executed in the script.
|
|
257
300
|
*/
|
|
258
|
-
runInNewContext(
|
|
301
|
+
runInNewContext(
|
|
302
|
+
contextObject?: Context | typeof constants.DONT_CONTEXTIFY,
|
|
303
|
+
options?: RunningScriptInNewContextOptions,
|
|
304
|
+
): any;
|
|
259
305
|
/**
|
|
260
306
|
* Runs the compiled code contained by the `vm.Script` within the context of the
|
|
261
307
|
* current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
|
|
@@ -316,17 +362,17 @@ declare module "vm" {
|
|
|
316
362
|
* ```
|
|
317
363
|
* @since v10.6.0
|
|
318
364
|
*/
|
|
319
|
-
createCachedData():
|
|
365
|
+
createCachedData(): NonSharedBuffer;
|
|
320
366
|
/** @deprecated in favor of `script.createCachedData()` */
|
|
321
|
-
cachedDataProduced?: boolean
|
|
367
|
+
cachedDataProduced?: boolean;
|
|
322
368
|
/**
|
|
323
369
|
* When `cachedData` is supplied to create the `vm.Script`, this value will be set
|
|
324
370
|
* to either `true` or `false` depending on acceptance of the data by V8.
|
|
325
371
|
* Otherwise the value is `undefined`.
|
|
326
372
|
* @since v5.7.0
|
|
327
373
|
*/
|
|
328
|
-
cachedDataRejected?: boolean
|
|
329
|
-
cachedData?:
|
|
374
|
+
cachedDataRejected?: boolean;
|
|
375
|
+
cachedData?: NonSharedBuffer;
|
|
330
376
|
/**
|
|
331
377
|
* When the script is compiled from a source that contains a source map magic
|
|
332
378
|
* comment, this property will be set to the URL of the source map.
|
|
@@ -344,20 +390,20 @@ declare module "vm" {
|
|
|
344
390
|
* ```
|
|
345
391
|
* @since v19.1.0, v18.13.0
|
|
346
392
|
*/
|
|
347
|
-
sourceMapURL
|
|
393
|
+
sourceMapURL: string | undefined;
|
|
348
394
|
}
|
|
349
395
|
/**
|
|
350
|
-
* If given
|
|
396
|
+
* If the given `contextObject` is an object, the `vm.createContext()` method will
|
|
351
397
|
* [prepare that object](https://nodejs.org/docs/latest-v20.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-v20.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
|
|
354
|
-
* scripts, the
|
|
355
|
-
* existing properties but also having the built-in objects and functions any
|
|
356
|
-
*
|
|
398
|
+
* and return a reference to it so that it can be used in calls to {@link runInContext} or
|
|
399
|
+
* [`script.runInContext()`](https://nodejs.org/docs/latest-v20.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
|
|
400
|
+
* Inside such scripts, the global object will be wrapped by the `contextObject`, retaining all of its
|
|
401
|
+
* existing properties but also having the built-in objects and functions any standard
|
|
402
|
+
* [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
|
|
357
403
|
* variables will remain unchanged.
|
|
358
404
|
*
|
|
359
405
|
* ```js
|
|
360
|
-
*
|
|
406
|
+
* const vm = require('node:vm');
|
|
361
407
|
*
|
|
362
408
|
* global.globalVar = 3;
|
|
363
409
|
*
|
|
@@ -374,7 +420,12 @@ declare module "vm" {
|
|
|
374
420
|
* ```
|
|
375
421
|
*
|
|
376
422
|
* If `contextObject` is omitted (or passed explicitly as `undefined`), a new,
|
|
377
|
-
* empty
|
|
423
|
+
* empty contextified object will be returned.
|
|
424
|
+
*
|
|
425
|
+
* When the global object in the newly created context is contextified, it has some quirks
|
|
426
|
+
* compared to ordinary global objects. For example, it cannot be frozen. To create a context
|
|
427
|
+
* without the contextifying quirks, pass `vm.constants.DONT_CONTEXTIFY` as the `contextObject`
|
|
428
|
+
* argument. See the documentation of `vm.constants.DONT_CONTEXTIFY` for details.
|
|
378
429
|
*
|
|
379
430
|
* The `vm.createContext()` method is primarily useful for creating a single
|
|
380
431
|
* context that can be used to run multiple scripts. For instance, if emulating a
|
|
@@ -385,11 +436,17 @@ declare module "vm" {
|
|
|
385
436
|
* The provided `name` and `origin` of the context are made visible through the
|
|
386
437
|
* Inspector API.
|
|
387
438
|
* @since v0.3.1
|
|
439
|
+
* @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
|
|
440
|
+
* If `undefined`, an empty contextified object will be created for backwards compatibility.
|
|
388
441
|
* @return contextified object.
|
|
389
442
|
*/
|
|
390
|
-
function createContext(
|
|
443
|
+
function createContext(
|
|
444
|
+
contextObject?: Context | typeof constants.DONT_CONTEXTIFY,
|
|
445
|
+
options?: CreateContextOptions,
|
|
446
|
+
): Context;
|
|
391
447
|
/**
|
|
392
|
-
* Returns `true` if the given `object` object has been
|
|
448
|
+
* Returns `true` if the given `object` object has been contextified using {@link createContext},
|
|
449
|
+
* or if it's the global object of a context created using `vm.constants.DONT_CONTEXTIFY`.
|
|
393
450
|
* @since v0.11.7
|
|
394
451
|
*/
|
|
395
452
|
function isContext(sandbox: Context): boolean;
|
|
@@ -422,18 +479,26 @@ declare module "vm" {
|
|
|
422
479
|
*/
|
|
423
480
|
function runInContext(code: string, contextifiedObject: Context, options?: RunningCodeOptions | string): any;
|
|
424
481
|
/**
|
|
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
|
-
*
|
|
482
|
+
* This method is a shortcut to
|
|
483
|
+
* `(new vm.Script(code, options)).runInContext(vm.createContext(options), options)`.
|
|
430
484
|
* If `options` is a string, then it specifies the filename.
|
|
431
485
|
*
|
|
486
|
+
* It does several things at once:
|
|
487
|
+
*
|
|
488
|
+
* 1. Creates a new context.
|
|
489
|
+
* 2. If `contextObject` is an object, contextifies it with the new context.
|
|
490
|
+
* If `contextObject` is undefined, creates a new object and contextifies it.
|
|
491
|
+
* If `contextObject` is `vm.constants.DONT_CONTEXTIFY`, don't contextify anything.
|
|
492
|
+
* 3. Compiles the code as a`vm.Script`
|
|
493
|
+
* 4. Runs the compield code within the created context. The code does not have access to the scope in
|
|
494
|
+
* which this method is called.
|
|
495
|
+
* 5. Returns the result.
|
|
496
|
+
*
|
|
432
497
|
* The following example compiles and executes code that increments a global
|
|
433
498
|
* variable and sets a new one. These globals are contained in the `contextObject`.
|
|
434
499
|
*
|
|
435
500
|
* ```js
|
|
436
|
-
*
|
|
501
|
+
* const vm = require('node:vm');
|
|
437
502
|
*
|
|
438
503
|
* const contextObject = {
|
|
439
504
|
* animal: 'cat',
|
|
@@ -443,15 +508,21 @@ declare module "vm" {
|
|
|
443
508
|
* vm.runInNewContext('count += 1; name = "kitty"', contextObject);
|
|
444
509
|
* console.log(contextObject);
|
|
445
510
|
* // Prints: { animal: 'cat', count: 3, name: 'kitty' }
|
|
511
|
+
*
|
|
512
|
+
* // This would throw if the context is created from a contextified object.
|
|
513
|
+
* // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary global objects that
|
|
514
|
+
* // can be frozen.
|
|
515
|
+
* const frozenContext = vm.runInNewContext('Object.freeze(globalThis); globalThis;', vm.constants.DONT_CONTEXTIFY);
|
|
446
516
|
* ```
|
|
447
517
|
* @since v0.3.1
|
|
448
518
|
* @param code The JavaScript code to compile and run.
|
|
449
|
-
* @param contextObject
|
|
519
|
+
* @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
|
|
520
|
+
* If `undefined`, an empty contextified object will be created for backwards compatibility.
|
|
450
521
|
* @return the result of the very last statement executed in the script.
|
|
451
522
|
*/
|
|
452
523
|
function runInNewContext(
|
|
453
524
|
code: string,
|
|
454
|
-
contextObject?: Context,
|
|
525
|
+
contextObject?: Context | typeof constants.DONT_CONTEXTIFY,
|
|
455
526
|
options?: RunningCodeInNewContextOptions | string,
|
|
456
527
|
): any;
|
|
457
528
|
/**
|
|
@@ -528,11 +599,7 @@ declare module "vm" {
|
|
|
528
599
|
code: string,
|
|
529
600
|
params?: readonly string[],
|
|
530
601
|
options?: CompileFunctionOptions,
|
|
531
|
-
): Function &
|
|
532
|
-
cachedData?: Script["cachedData"] | undefined;
|
|
533
|
-
cachedDataProduced?: Script["cachedDataProduced"] | undefined;
|
|
534
|
-
cachedDataRejected?: Script["cachedDataRejected"] | undefined;
|
|
535
|
-
};
|
|
602
|
+
): Function & Pick<Script, "cachedData" | "cachedDataProduced" | "cachedDataRejected">;
|
|
536
603
|
/**
|
|
537
604
|
* Measure the memory known to V8 and used by all contexts known to the
|
|
538
605
|
* current V8 isolate, or the main context.
|
|
@@ -589,10 +656,7 @@ declare module "vm" {
|
|
|
589
656
|
* @experimental
|
|
590
657
|
*/
|
|
591
658
|
function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
|
|
592
|
-
interface ModuleEvaluateOptions {
|
|
593
|
-
timeout?: RunningScriptOptions["timeout"] | undefined;
|
|
594
|
-
breakOnSigint?: RunningScriptOptions["breakOnSigint"] | undefined;
|
|
595
|
-
}
|
|
659
|
+
interface ModuleEvaluateOptions extends Pick<RunningScriptOptions, "breakOnSigint" | "timeout"> {}
|
|
596
660
|
type ModuleLinker = (
|
|
597
661
|
specifier: string,
|
|
598
662
|
referencingModule: Module,
|
|
@@ -801,21 +865,23 @@ declare module "vm" {
|
|
|
801
865
|
*/
|
|
802
866
|
link(linker: ModuleLinker): Promise<void>;
|
|
803
867
|
}
|
|
804
|
-
interface SourceTextModuleOptions {
|
|
868
|
+
interface SourceTextModuleOptions extends Pick<ScriptOptions, "cachedData" | "columnOffset" | "lineOffset"> {
|
|
805
869
|
/**
|
|
806
870
|
* String used in stack traces.
|
|
807
871
|
* @default 'vm:module(i)' where i is a context-specific ascending index.
|
|
808
872
|
*/
|
|
809
873
|
identifier?: string | undefined;
|
|
810
|
-
cachedData?: ScriptOptions["cachedData"] | undefined;
|
|
811
874
|
context?: Context | undefined;
|
|
812
|
-
lineOffset?: BaseOptions["lineOffset"] | undefined;
|
|
813
|
-
columnOffset?: BaseOptions["columnOffset"] | undefined;
|
|
814
875
|
/**
|
|
815
876
|
* Called during evaluation of this module to initialize the `import.meta`.
|
|
816
877
|
*/
|
|
817
878
|
initializeImportMeta?: ((meta: ImportMeta, module: SourceTextModule) => void) | undefined;
|
|
818
|
-
|
|
879
|
+
/**
|
|
880
|
+
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
881
|
+
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
882
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
883
|
+
*/
|
|
884
|
+
importModuleDynamically?: DynamicModuleLoader<SourceTextModule> | undefined;
|
|
819
885
|
}
|
|
820
886
|
/**
|
|
821
887
|
* This feature is only available with the `--experimental-vm-modules` command
|
|
@@ -915,6 +981,19 @@ declare module "vm" {
|
|
|
915
981
|
* @since v20.12.0
|
|
916
982
|
*/
|
|
917
983
|
const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
|
|
984
|
+
/**
|
|
985
|
+
* This constant, when used as the `contextObject` argument in vm APIs, instructs Node.js to create
|
|
986
|
+
* a context without wrapping its global object with another object in a Node.js-specific manner.
|
|
987
|
+
* As a result, the `globalThis` value inside the new context would behave more closely to an ordinary
|
|
988
|
+
* one.
|
|
989
|
+
*
|
|
990
|
+
* When `vm.constants.DONT_CONTEXTIFY` is used as the `contextObject` argument to {@link createContext},
|
|
991
|
+
* the returned object is a proxy-like object to the global object in the newly created context with
|
|
992
|
+
* fewer Node.js-specific quirks. It is reference equal to the `globalThis` value in the new context,
|
|
993
|
+
* can be modified from outside the context, and can be used to access built-ins in the new context directly.
|
|
994
|
+
* @since v20.18.0
|
|
995
|
+
*/
|
|
996
|
+
const DONT_CONTEXTIFY: number;
|
|
918
997
|
}
|
|
919
998
|
}
|
|
920
999
|
declare module "node:vm" {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
|
|
3
|
+
type _AbortController = typeof globalThis extends { onmessage: any } ? {} : AbortController;
|
|
4
|
+
interface AbortController {
|
|
5
|
+
readonly signal: AbortSignal;
|
|
6
|
+
abort(reason?: any): void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type _AbortSignal = typeof globalThis extends { onmessage: any } ? {} : AbortSignal;
|
|
10
|
+
interface AbortSignal extends EventTarget {
|
|
11
|
+
readonly aborted: boolean;
|
|
12
|
+
onabort: ((this: AbortSignal, ev: Event) => any) | null;
|
|
13
|
+
readonly reason: any;
|
|
14
|
+
throwIfAborted(): void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare global {
|
|
18
|
+
interface AbortController extends _AbortController {}
|
|
19
|
+
var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T
|
|
20
|
+
: {
|
|
21
|
+
prototype: AbortController;
|
|
22
|
+
new(): AbortController;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
interface AbortSignal extends _AbortSignal {}
|
|
26
|
+
var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T
|
|
27
|
+
: {
|
|
28
|
+
prototype: AbortSignal;
|
|
29
|
+
new(): AbortSignal;
|
|
30
|
+
abort(reason?: any): AbortSignal;
|
|
31
|
+
any(signals: AbortSignal[]): AbortSignal;
|
|
32
|
+
timeout(milliseconds: number): AbortSignal;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
|
|
3
|
+
type _DOMException = typeof globalThis extends { onmessage: any } ? {} : DOMException;
|
|
4
|
+
interface DOMException extends Error {
|
|
5
|
+
readonly code: number;
|
|
6
|
+
readonly message: string;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly INDEX_SIZE_ERR: 1;
|
|
9
|
+
readonly DOMSTRING_SIZE_ERR: 2;
|
|
10
|
+
readonly HIERARCHY_REQUEST_ERR: 3;
|
|
11
|
+
readonly WRONG_DOCUMENT_ERR: 4;
|
|
12
|
+
readonly INVALID_CHARACTER_ERR: 5;
|
|
13
|
+
readonly NO_DATA_ALLOWED_ERR: 6;
|
|
14
|
+
readonly NO_MODIFICATION_ALLOWED_ERR: 7;
|
|
15
|
+
readonly NOT_FOUND_ERR: 8;
|
|
16
|
+
readonly NOT_SUPPORTED_ERR: 9;
|
|
17
|
+
readonly INUSE_ATTRIBUTE_ERR: 10;
|
|
18
|
+
readonly INVALID_STATE_ERR: 11;
|
|
19
|
+
readonly SYNTAX_ERR: 12;
|
|
20
|
+
readonly INVALID_MODIFICATION_ERR: 13;
|
|
21
|
+
readonly NAMESPACE_ERR: 14;
|
|
22
|
+
readonly INVALID_ACCESS_ERR: 15;
|
|
23
|
+
readonly VALIDATION_ERR: 16;
|
|
24
|
+
readonly TYPE_MISMATCH_ERR: 17;
|
|
25
|
+
readonly SECURITY_ERR: 18;
|
|
26
|
+
readonly NETWORK_ERR: 19;
|
|
27
|
+
readonly ABORT_ERR: 20;
|
|
28
|
+
readonly URL_MISMATCH_ERR: 21;
|
|
29
|
+
readonly QUOTA_EXCEEDED_ERR: 22;
|
|
30
|
+
readonly TIMEOUT_ERR: 23;
|
|
31
|
+
readonly INVALID_NODE_TYPE_ERR: 24;
|
|
32
|
+
readonly DATA_CLONE_ERR: 25;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare global {
|
|
36
|
+
interface DOMException extends _DOMException {}
|
|
37
|
+
var DOMException: typeof globalThis extends { onmessage: any; DOMException: infer T } ? T
|
|
38
|
+
: {
|
|
39
|
+
prototype: DOMException;
|
|
40
|
+
new(message?: string, name?: string): DOMException;
|
|
41
|
+
new(message?: string, options?: { name?: string; cause?: unknown }): DOMException;
|
|
42
|
+
readonly INDEX_SIZE_ERR: 1;
|
|
43
|
+
readonly DOMSTRING_SIZE_ERR: 2;
|
|
44
|
+
readonly HIERARCHY_REQUEST_ERR: 3;
|
|
45
|
+
readonly WRONG_DOCUMENT_ERR: 4;
|
|
46
|
+
readonly INVALID_CHARACTER_ERR: 5;
|
|
47
|
+
readonly NO_DATA_ALLOWED_ERR: 6;
|
|
48
|
+
readonly NO_MODIFICATION_ALLOWED_ERR: 7;
|
|
49
|
+
readonly NOT_FOUND_ERR: 8;
|
|
50
|
+
readonly NOT_SUPPORTED_ERR: 9;
|
|
51
|
+
readonly INUSE_ATTRIBUTE_ERR: 10;
|
|
52
|
+
readonly INVALID_STATE_ERR: 11;
|
|
53
|
+
readonly SYNTAX_ERR: 12;
|
|
54
|
+
readonly INVALID_MODIFICATION_ERR: 13;
|
|
55
|
+
readonly NAMESPACE_ERR: 14;
|
|
56
|
+
readonly INVALID_ACCESS_ERR: 15;
|
|
57
|
+
readonly VALIDATION_ERR: 16;
|
|
58
|
+
readonly TYPE_MISMATCH_ERR: 17;
|
|
59
|
+
readonly SECURITY_ERR: 18;
|
|
60
|
+
readonly NETWORK_ERR: 19;
|
|
61
|
+
readonly ABORT_ERR: 20;
|
|
62
|
+
readonly URL_MISMATCH_ERR: 21;
|
|
63
|
+
readonly QUOTA_EXCEEDED_ERR: 22;
|
|
64
|
+
readonly TIMEOUT_ERR: 23;
|
|
65
|
+
readonly INVALID_NODE_TYPE_ERR: 24;
|
|
66
|
+
readonly DATA_CLONE_ERR: 25;
|
|
67
|
+
};
|
|
68
|
+
}
|