@emulsify/cli 1.10.2 → 1.11.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/README.md +6 -6
- package/dist/node_modules/.package-lock.json +22 -22
- package/dist/node_modules/@types/node/README.md +1 -1
- package/dist/node_modules/@types/node/assert.d.ts +2 -2
- package/dist/node_modules/@types/node/buffer.buffer.d.ts +385 -0
- package/dist/node_modules/@types/node/buffer.d.ts +42 -390
- package/dist/node_modules/@types/node/child_process.d.ts +32 -28
- package/dist/node_modules/@types/node/cluster.d.ts +1 -1
- package/dist/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/dist/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/dist/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/dist/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/dist/node_modules/@types/node/console.d.ts +2 -2
- package/dist/node_modules/@types/node/crypto.d.ts +3 -3
- package/dist/node_modules/@types/node/dns/promises.d.ts +6 -5
- package/dist/node_modules/@types/node/dns.d.ts +5 -5
- package/dist/node_modules/@types/node/domain.d.ts +2 -2
- package/dist/node_modules/@types/node/events.d.ts +3 -3
- package/dist/node_modules/@types/node/fs/promises.d.ts +2 -2
- package/dist/node_modules/@types/node/fs.d.ts +2 -2
- package/dist/node_modules/@types/node/globals.d.ts +124 -68
- package/dist/node_modules/@types/node/globals.typedarray.d.ts +21 -0
- package/dist/node_modules/@types/node/http.d.ts +43 -7
- package/dist/node_modules/@types/node/http2.d.ts +238 -101
- package/dist/node_modules/@types/node/https.d.ts +17 -23
- package/dist/node_modules/@types/node/index.d.ts +11 -9
- package/dist/node_modules/@types/node/inspector.d.ts +1061 -111
- package/dist/node_modules/@types/node/module.d.ts +3 -3
- package/dist/node_modules/@types/node/net.d.ts +8 -2
- package/dist/node_modules/@types/node/os.d.ts +1 -1
- package/dist/node_modules/@types/node/package.json +11 -3
- package/dist/node_modules/@types/node/path.d.ts +10 -1
- package/dist/node_modules/@types/node/perf_hooks.d.ts +49 -20
- package/dist/node_modules/@types/node/process.d.ts +142 -17
- package/dist/node_modules/@types/node/punycode.d.ts +1 -1
- package/dist/node_modules/@types/node/querystring.d.ts +1 -1
- package/dist/node_modules/@types/node/readline/promises.d.ts +1 -1
- package/dist/node_modules/@types/node/readline.d.ts +10 -10
- package/dist/node_modules/@types/node/repl.d.ts +4 -4
- package/dist/node_modules/@types/node/stream/promises.d.ts +8 -1
- package/dist/node_modules/@types/node/stream/web.d.ts +182 -25
- package/dist/node_modules/@types/node/stream.d.ts +36 -17
- package/dist/node_modules/@types/node/string_decoder.d.ts +3 -3
- package/dist/node_modules/@types/node/test.d.ts +313 -94
- package/dist/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/dist/node_modules/@types/node/timers.d.ts +1 -1
- package/dist/node_modules/@types/node/tls.d.ts +5 -5
- package/dist/node_modules/@types/node/trace_events.d.ts +4 -4
- package/dist/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
- package/dist/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
- package/dist/node_modules/@types/node/ts5.6/index.d.ts +91 -0
- package/dist/node_modules/@types/node/tty.d.ts +1 -1
- package/dist/node_modules/@types/node/url.d.ts +14 -11
- package/dist/node_modules/@types/node/util.d.ts +55 -49
- package/dist/node_modules/@types/node/v8.d.ts +12 -12
- package/dist/node_modules/@types/node/vm.d.ts +11 -12
- package/dist/node_modules/@types/node/worker_threads.d.ts +22 -22
- package/dist/node_modules/@types/node/zlib.d.ts +17 -8
- package/dist/node_modules/debug/README.md +1 -1
- package/dist/node_modules/debug/package.json +2 -2
- package/dist/node_modules/fast-uri/.github/workflows/ci.yml +2 -2
- package/dist/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +1 -1
- package/dist/node_modules/fast-uri/index.js +3 -9
- package/dist/node_modules/fast-uri/package.json +4 -4
- package/dist/node_modules/fast-uri/test/ajv.test.js +1 -1
- package/dist/node_modules/fast-uri/test/compatibility.test.js +3 -2
- package/dist/node_modules/fast-uri/test/equal.test.js +1 -2
- package/dist/node_modules/fast-uri/test/parse.test.js +1 -2
- package/dist/node_modules/fast-uri/test/resolve.test.js +1 -2
- package/dist/node_modules/fast-uri/test/serialize.test.js +1 -2
- package/dist/node_modules/fast-uri/test/uri-js.test.js +539 -567
- package/dist/node_modules/fast-uri/test/util.test.js +2 -3
- package/dist/node_modules/ms/index.js +1 -1
- package/dist/node_modules/ms/license.md +1 -1
- package/dist/node_modules/ms/package.json +5 -4
- package/dist/node_modules/ms/readme.md +1 -2
- package/dist/node_modules/simple-git/dist/cjs/index.js +14 -15
- package/dist/node_modules/simple-git/dist/cjs/index.js.map +2 -2
- package/dist/node_modules/simple-git/dist/esm/index.js +14 -15
- package/dist/node_modules/simple-git/dist/esm/index.js.map +2 -2
- package/dist/node_modules/simple-git/dist/typings/response.d.ts +7 -6
- package/dist/node_modules/simple-git/package.json +5 -5
- package/dist/node_modules/undici-types/LICENSE +21 -0
- package/dist/node_modules/undici-types/balanced-pool.d.ts +11 -0
- package/dist/node_modules/undici-types/client.d.ts +12 -1
- package/dist/node_modules/undici-types/diagnostics-channel.d.ts +1 -2
- package/dist/node_modules/undici-types/dispatcher.d.ts +18 -4
- package/dist/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/dist/node_modules/undici-types/errors.d.ts +21 -0
- package/dist/node_modules/undici-types/eventsource.d.ts +63 -0
- package/dist/node_modules/undici-types/fetch.d.ts +25 -25
- package/dist/node_modules/undici-types/formdata.d.ts +1 -1
- package/dist/node_modules/undici-types/handlers.d.ts +10 -4
- package/dist/node_modules/undici-types/index.d.ts +10 -2
- package/dist/node_modules/undici-types/interceptors.d.ts +12 -2
- package/dist/node_modules/undici-types/mock-interceptor.d.ts +4 -4
- package/dist/node_modules/undici-types/package.json +1 -1
- package/dist/node_modules/undici-types/pool.d.ts +11 -0
- package/dist/node_modules/undici-types/proxy-agent.d.ts +0 -2
- package/dist/node_modules/undici-types/readable.d.ts +2 -3
- package/dist/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/dist/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/dist/node_modules/undici-types/util.d.ts +18 -0
- package/dist/node_modules/undici-types/webidl.d.ts +10 -8
- package/dist/node_modules/undici-types/websocket.d.ts +22 -1
- package/dist/package-lock.json +834 -700
- package/dist/package.json +2 -2
- package/dist/util/system/getAvailableSystems.js +5 -0
- package/package.json +2 -2
- package/dist/node_modules/@types/node/globals.global.d.ts +0 -1
- package/dist/node_modules/fast-uri/.taprc +0 -3
|
@@ -85,7 +85,7 @@ declare module "url" {
|
|
|
85
85
|
* The `url.format()` method returns a formatted URL string derived from `urlObject`.
|
|
86
86
|
*
|
|
87
87
|
* ```js
|
|
88
|
-
*
|
|
88
|
+
* import url from 'node:url';
|
|
89
89
|
* url.format({
|
|
90
90
|
* protocol: 'https',
|
|
91
91
|
* hostname: 'example.com',
|
|
@@ -149,7 +149,7 @@ declare module "url" {
|
|
|
149
149
|
* The `url.format()` method returns a formatted URL string derived from `urlObject`.
|
|
150
150
|
*
|
|
151
151
|
* ```js
|
|
152
|
-
*
|
|
152
|
+
* import url from 'node:url';
|
|
153
153
|
* url.format({
|
|
154
154
|
* protocol: 'https',
|
|
155
155
|
* hostname: 'example.com',
|
|
@@ -214,7 +214,7 @@ declare module "url" {
|
|
|
214
214
|
* manner similar to that of a web browser resolving an anchor tag.
|
|
215
215
|
*
|
|
216
216
|
* ```js
|
|
217
|
-
*
|
|
217
|
+
* import url from 'node:url';
|
|
218
218
|
* url.resolve('/one/two/three', 'four'); // '/one/two/four'
|
|
219
219
|
* url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
|
|
220
220
|
* url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
|
|
@@ -392,10 +392,10 @@ declare module "url" {
|
|
|
392
392
|
* Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later.
|
|
393
393
|
*
|
|
394
394
|
* ```js
|
|
395
|
-
*
|
|
395
|
+
* import {
|
|
396
396
|
* Blob,
|
|
397
397
|
* resolveObjectURL,
|
|
398
|
-
* }
|
|
398
|
+
* } from 'node:buffer';
|
|
399
399
|
*
|
|
400
400
|
* const blob = new Blob(['hello']);
|
|
401
401
|
* const id = URL.createObjectURL(blob);
|
|
@@ -740,6 +740,9 @@ declare module "url" {
|
|
|
740
740
|
*/
|
|
741
741
|
toJSON(): string;
|
|
742
742
|
}
|
|
743
|
+
interface URLSearchParamsIterator<T> extends NodeJS.Iterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
|
|
744
|
+
[Symbol.iterator](): URLSearchParamsIterator<T>;
|
|
745
|
+
}
|
|
743
746
|
/**
|
|
744
747
|
* 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
|
|
745
748
|
* four following constructors.
|
|
@@ -810,7 +813,7 @@ declare module "url" {
|
|
|
810
813
|
*
|
|
811
814
|
* Alias for `urlSearchParams[@@iterator]()`.
|
|
812
815
|
*/
|
|
813
|
-
entries():
|
|
816
|
+
entries(): URLSearchParamsIterator<[string, string]>;
|
|
814
817
|
/**
|
|
815
818
|
* Iterates over each name-value pair in the query and invokes the given function.
|
|
816
819
|
*
|
|
@@ -864,7 +867,7 @@ declare module "url" {
|
|
|
864
867
|
* // foo
|
|
865
868
|
* ```
|
|
866
869
|
*/
|
|
867
|
-
keys():
|
|
870
|
+
keys(): URLSearchParamsIterator<string>;
|
|
868
871
|
/**
|
|
869
872
|
* 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`,
|
|
870
873
|
* set the first such pair's value to `value` and remove all others. If not,
|
|
@@ -914,8 +917,8 @@ declare module "url" {
|
|
|
914
917
|
/**
|
|
915
918
|
* Returns an ES6 `Iterator` over the values of each name-value pair.
|
|
916
919
|
*/
|
|
917
|
-
values():
|
|
918
|
-
[Symbol.iterator]():
|
|
920
|
+
values(): URLSearchParamsIterator<string>;
|
|
921
|
+
[Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
|
|
919
922
|
}
|
|
920
923
|
import { URL as _URL, URLSearchParams as _URLSearchParams } from "url";
|
|
921
924
|
global {
|
|
@@ -926,7 +929,7 @@ declare module "url" {
|
|
|
926
929
|
URLSearchParams: typeof _URLSearchParams;
|
|
927
930
|
}
|
|
928
931
|
/**
|
|
929
|
-
* `URL` class is a global reference for `
|
|
932
|
+
* `URL` class is a global reference for `import { URL } from 'node:url'`
|
|
930
933
|
* https://nodejs.org/api/url.html#the-whatwg-url-api
|
|
931
934
|
* @since v10.0.0
|
|
932
935
|
*/
|
|
@@ -936,7 +939,7 @@ declare module "url" {
|
|
|
936
939
|
} ? T
|
|
937
940
|
: typeof _URL;
|
|
938
941
|
/**
|
|
939
|
-
* `URLSearchParams` class is a global reference for `
|
|
942
|
+
* `URLSearchParams` class is a global reference for `import { URLSearchParams } from 'node:url'`
|
|
940
943
|
* https://nodejs.org/api/url.html#class-urlsearchparams
|
|
941
944
|
* @since v10.0.0
|
|
942
945
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* it:
|
|
5
5
|
*
|
|
6
6
|
* ```js
|
|
7
|
-
*
|
|
7
|
+
* import util from 'node:util';
|
|
8
8
|
* ```
|
|
9
9
|
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/util.js)
|
|
10
10
|
*/
|
|
@@ -200,7 +200,7 @@ declare module "util" {
|
|
|
200
200
|
* timestamp.
|
|
201
201
|
*
|
|
202
202
|
* ```js
|
|
203
|
-
*
|
|
203
|
+
* import util from 'node:util';
|
|
204
204
|
*
|
|
205
205
|
* util.log('Timestamped message.');
|
|
206
206
|
* ```
|
|
@@ -287,7 +287,7 @@ declare module "util" {
|
|
|
287
287
|
* Circular references point to their anchor by using a reference index:
|
|
288
288
|
*
|
|
289
289
|
* ```js
|
|
290
|
-
*
|
|
290
|
+
* import { inspect } from 'node:util';
|
|
291
291
|
*
|
|
292
292
|
* const obj = {};
|
|
293
293
|
* obj.a = [obj];
|
|
@@ -305,7 +305,7 @@ declare module "util" {
|
|
|
305
305
|
* The following example inspects all properties of the `util` object:
|
|
306
306
|
*
|
|
307
307
|
* ```js
|
|
308
|
-
*
|
|
308
|
+
* import util from 'node:util';
|
|
309
309
|
*
|
|
310
310
|
* console.log(util.inspect(util, { showHidden: true, depth: null }));
|
|
311
311
|
* ```
|
|
@@ -313,7 +313,7 @@ declare module "util" {
|
|
|
313
313
|
* The following example highlights the effect of the `compact` option:
|
|
314
314
|
*
|
|
315
315
|
* ```js
|
|
316
|
-
*
|
|
316
|
+
* import util from 'node:util';
|
|
317
317
|
*
|
|
318
318
|
* const o = {
|
|
319
319
|
* a: [1, 2, [[
|
|
@@ -370,7 +370,7 @@ declare module "util" {
|
|
|
370
370
|
* with no remaining strong references may be garbage collected at any time.
|
|
371
371
|
*
|
|
372
372
|
* ```js
|
|
373
|
-
*
|
|
373
|
+
* import { inspect } from 'node:util';
|
|
374
374
|
*
|
|
375
375
|
* const obj = { a: 1 };
|
|
376
376
|
* const obj2 = { b: 2 };
|
|
@@ -384,8 +384,8 @@ declare module "util" {
|
|
|
384
384
|
* impact the result of `util.inspect()`.
|
|
385
385
|
*
|
|
386
386
|
* ```js
|
|
387
|
-
*
|
|
388
|
-
*
|
|
387
|
+
* import { inspect } from 'node:util';
|
|
388
|
+
* import assert from 'node:assert';
|
|
389
389
|
*
|
|
390
390
|
* const o1 = {
|
|
391
391
|
* b: [2, 3, 1],
|
|
@@ -412,7 +412,7 @@ declare module "util" {
|
|
|
412
412
|
* numbers.
|
|
413
413
|
*
|
|
414
414
|
* ```js
|
|
415
|
-
*
|
|
415
|
+
* import { inspect } from 'node:util';
|
|
416
416
|
*
|
|
417
417
|
* const thousand = 1_000;
|
|
418
418
|
* const million = 1_000_000;
|
|
@@ -459,7 +459,7 @@ declare module "util" {
|
|
|
459
459
|
* Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`.
|
|
460
460
|
*
|
|
461
461
|
* ```js
|
|
462
|
-
*
|
|
462
|
+
* import util from 'node:util';
|
|
463
463
|
*
|
|
464
464
|
* util.isArray([]);
|
|
465
465
|
* // Returns: true
|
|
@@ -476,7 +476,7 @@ declare module "util" {
|
|
|
476
476
|
* Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`.
|
|
477
477
|
*
|
|
478
478
|
* ```js
|
|
479
|
-
*
|
|
479
|
+
* import util from 'node:util';
|
|
480
480
|
*
|
|
481
481
|
* util.isRegExp(/some regexp/);
|
|
482
482
|
* // Returns: true
|
|
@@ -493,7 +493,7 @@ declare module "util" {
|
|
|
493
493
|
* Returns `true` if the given `object` is a `Date`. Otherwise, returns `false`.
|
|
494
494
|
*
|
|
495
495
|
* ```js
|
|
496
|
-
*
|
|
496
|
+
* import util from 'node:util';
|
|
497
497
|
*
|
|
498
498
|
* util.isDate(new Date());
|
|
499
499
|
* // Returns: true
|
|
@@ -510,7 +510,7 @@ declare module "util" {
|
|
|
510
510
|
* Returns `true` if the given `object` is an `Error`. Otherwise, returns `false`.
|
|
511
511
|
*
|
|
512
512
|
* ```js
|
|
513
|
-
*
|
|
513
|
+
* import util from 'node:util';
|
|
514
514
|
*
|
|
515
515
|
* util.isError(new Error());
|
|
516
516
|
* // Returns: true
|
|
@@ -524,7 +524,7 @@ declare module "util" {
|
|
|
524
524
|
* possible to obtain an incorrect result when the `object` argument manipulates `@@toStringTag`.
|
|
525
525
|
*
|
|
526
526
|
* ```js
|
|
527
|
-
*
|
|
527
|
+
* import util from 'node:util';
|
|
528
528
|
* const obj = { name: 'Error', message: 'an error occurred' };
|
|
529
529
|
*
|
|
530
530
|
* util.isError(obj);
|
|
@@ -549,8 +549,8 @@ declare module "util" {
|
|
|
549
549
|
* through the `constructor.super_` property.
|
|
550
550
|
*
|
|
551
551
|
* ```js
|
|
552
|
-
*
|
|
553
|
-
*
|
|
552
|
+
* import util from 'node:util';
|
|
553
|
+
* import EventEmitter from 'node:events';
|
|
554
554
|
*
|
|
555
555
|
* function MyStream() {
|
|
556
556
|
* EventEmitter.call(this);
|
|
@@ -576,7 +576,7 @@ declare module "util" {
|
|
|
576
576
|
* ES6 example using `class` and `extends`:
|
|
577
577
|
*
|
|
578
578
|
* ```js
|
|
579
|
-
*
|
|
579
|
+
* import EventEmitter from 'node:events';
|
|
580
580
|
*
|
|
581
581
|
* class MyStream extends EventEmitter {
|
|
582
582
|
* write(data) {
|
|
@@ -605,7 +605,7 @@ declare module "util" {
|
|
|
605
605
|
* environment variable, then the returned function operates similar to `console.error()`. If not, then the returned function is a no-op.
|
|
606
606
|
*
|
|
607
607
|
* ```js
|
|
608
|
-
*
|
|
608
|
+
* import util from 'node:util';
|
|
609
609
|
* const debuglog = util.debuglog('foo');
|
|
610
610
|
*
|
|
611
611
|
* debuglog('hello from foo [%d]', 123);
|
|
@@ -624,7 +624,7 @@ declare module "util" {
|
|
|
624
624
|
* The `section` supports wildcard also:
|
|
625
625
|
*
|
|
626
626
|
* ```js
|
|
627
|
-
*
|
|
627
|
+
* import util from 'node:util';
|
|
628
628
|
* const debuglog = util.debuglog('foo-bar');
|
|
629
629
|
*
|
|
630
630
|
* debuglog('hi there, it\'s foo-bar [%d]', 2333);
|
|
@@ -644,7 +644,7 @@ declare module "util" {
|
|
|
644
644
|
* unnecessary wrapping.
|
|
645
645
|
*
|
|
646
646
|
* ```js
|
|
647
|
-
*
|
|
647
|
+
* import util from 'node:util';
|
|
648
648
|
* let debuglog = util.debuglog('internals', (debug) => {
|
|
649
649
|
* // Replace with a logging function that optimizes out
|
|
650
650
|
* // testing if the section is enabled
|
|
@@ -662,7 +662,7 @@ declare module "util" {
|
|
|
662
662
|
* Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`.
|
|
663
663
|
*
|
|
664
664
|
* ```js
|
|
665
|
-
*
|
|
665
|
+
* import util from 'node:util';
|
|
666
666
|
*
|
|
667
667
|
* util.isBoolean(1);
|
|
668
668
|
* // Returns: false
|
|
@@ -679,7 +679,7 @@ declare module "util" {
|
|
|
679
679
|
* Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`.
|
|
680
680
|
*
|
|
681
681
|
* ```js
|
|
682
|
-
*
|
|
682
|
+
* import util from 'node:util';
|
|
683
683
|
*
|
|
684
684
|
* util.isBuffer({ length: 0 });
|
|
685
685
|
* // Returns: false
|
|
@@ -696,7 +696,7 @@ declare module "util" {
|
|
|
696
696
|
* Returns `true` if the given `object` is a `Function`. Otherwise, returns `false`.
|
|
697
697
|
*
|
|
698
698
|
* ```js
|
|
699
|
-
*
|
|
699
|
+
* import util from 'node:util';
|
|
700
700
|
*
|
|
701
701
|
* function Foo() {}
|
|
702
702
|
* const Bar = () => {};
|
|
@@ -716,7 +716,7 @@ declare module "util" {
|
|
|
716
716
|
* Returns `true` if the given `object` is strictly `null`. Otherwise, returns`false`.
|
|
717
717
|
*
|
|
718
718
|
* ```js
|
|
719
|
-
*
|
|
719
|
+
* import util from 'node:util';
|
|
720
720
|
*
|
|
721
721
|
* util.isNull(0);
|
|
722
722
|
* // Returns: false
|
|
@@ -734,7 +734,7 @@ declare module "util" {
|
|
|
734
734
|
* returns `false`.
|
|
735
735
|
*
|
|
736
736
|
* ```js
|
|
737
|
-
*
|
|
737
|
+
* import util from 'node:util';
|
|
738
738
|
*
|
|
739
739
|
* util.isNullOrUndefined(0);
|
|
740
740
|
* // Returns: false
|
|
@@ -751,7 +751,7 @@ declare module "util" {
|
|
|
751
751
|
* Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`.
|
|
752
752
|
*
|
|
753
753
|
* ```js
|
|
754
|
-
*
|
|
754
|
+
* import util from 'node:util';
|
|
755
755
|
*
|
|
756
756
|
* util.isNumber(false);
|
|
757
757
|
* // Returns: false
|
|
@@ -771,7 +771,7 @@ declare module "util" {
|
|
|
771
771
|
* Otherwise, returns `false`.
|
|
772
772
|
*
|
|
773
773
|
* ```js
|
|
774
|
-
*
|
|
774
|
+
* import util from 'node:util';
|
|
775
775
|
*
|
|
776
776
|
* util.isObject(5);
|
|
777
777
|
* // Returns: false
|
|
@@ -790,7 +790,7 @@ declare module "util" {
|
|
|
790
790
|
* Returns `true` if the given `object` is a primitive type. Otherwise, returns`false`.
|
|
791
791
|
*
|
|
792
792
|
* ```js
|
|
793
|
-
*
|
|
793
|
+
* import util from 'node:util';
|
|
794
794
|
*
|
|
795
795
|
* util.isPrimitive(5);
|
|
796
796
|
* // Returns: true
|
|
@@ -819,7 +819,7 @@ declare module "util" {
|
|
|
819
819
|
* Returns `true` if the given `object` is a `string`. Otherwise, returns `false`.
|
|
820
820
|
*
|
|
821
821
|
* ```js
|
|
822
|
-
*
|
|
822
|
+
* import util from 'node:util';
|
|
823
823
|
*
|
|
824
824
|
* util.isString('');
|
|
825
825
|
* // Returns: true
|
|
@@ -838,7 +838,7 @@ declare module "util" {
|
|
|
838
838
|
* Returns `true` if the given `object` is a `Symbol`. Otherwise, returns `false`.
|
|
839
839
|
*
|
|
840
840
|
* ```js
|
|
841
|
-
*
|
|
841
|
+
* import util from 'node:util';
|
|
842
842
|
*
|
|
843
843
|
* util.isSymbol(5);
|
|
844
844
|
* // Returns: false
|
|
@@ -855,7 +855,7 @@ declare module "util" {
|
|
|
855
855
|
* Returns `true` if the given `object` is `undefined`. Otherwise, returns `false`.
|
|
856
856
|
*
|
|
857
857
|
* ```js
|
|
858
|
-
*
|
|
858
|
+
* import util from 'node:util';
|
|
859
859
|
*
|
|
860
860
|
* const foo = undefined;
|
|
861
861
|
* util.isUndefined(5);
|
|
@@ -874,7 +874,7 @@ declare module "util" {
|
|
|
874
874
|
* such a way that it is marked as deprecated.
|
|
875
875
|
*
|
|
876
876
|
* ```js
|
|
877
|
-
*
|
|
877
|
+
* import util from 'node:util';
|
|
878
878
|
*
|
|
879
879
|
* exports.obsoleteFunction = util.deprecate(() => {
|
|
880
880
|
* // Do something here.
|
|
@@ -890,7 +890,7 @@ declare module "util" {
|
|
|
890
890
|
* the warning will be emitted only once for that `code`.
|
|
891
891
|
*
|
|
892
892
|
* ```js
|
|
893
|
-
*
|
|
893
|
+
* import util from 'node:util';
|
|
894
894
|
*
|
|
895
895
|
* const fn1 = util.deprecate(someFunction, someMessage, 'DEP0001');
|
|
896
896
|
* const fn2 = util.deprecate(someOtherFunction, someOtherMessage, 'DEP0001');
|
|
@@ -944,7 +944,7 @@ declare module "util" {
|
|
|
944
944
|
* first argument will be the rejection reason (or `null` if the `Promise` resolved), and the second argument will be the resolved value.
|
|
945
945
|
*
|
|
946
946
|
* ```js
|
|
947
|
-
*
|
|
947
|
+
* import util from 'node:util';
|
|
948
948
|
*
|
|
949
949
|
* async function fn() {
|
|
950
950
|
* return 'hello world';
|
|
@@ -1070,8 +1070,8 @@ declare module "util" {
|
|
|
1070
1070
|
* that returns promises.
|
|
1071
1071
|
*
|
|
1072
1072
|
* ```js
|
|
1073
|
-
*
|
|
1074
|
-
*
|
|
1073
|
+
* import util from 'node:util';
|
|
1074
|
+
* import fs from 'node:fs';
|
|
1075
1075
|
*
|
|
1076
1076
|
* const stat = util.promisify(fs.stat);
|
|
1077
1077
|
* stat('.').then((stats) => {
|
|
@@ -1084,8 +1084,8 @@ declare module "util" {
|
|
|
1084
1084
|
* Or, equivalently using `async function`s:
|
|
1085
1085
|
*
|
|
1086
1086
|
* ```js
|
|
1087
|
-
*
|
|
1088
|
-
*
|
|
1087
|
+
* import util from 'node:util';
|
|
1088
|
+
* import fs from 'node:fs';
|
|
1089
1089
|
*
|
|
1090
1090
|
* const stat = util.promisify(fs.stat);
|
|
1091
1091
|
*
|
|
@@ -1108,7 +1108,7 @@ declare module "util" {
|
|
|
1108
1108
|
* work as expected unless handled specially:
|
|
1109
1109
|
*
|
|
1110
1110
|
* ```js
|
|
1111
|
-
*
|
|
1111
|
+
* import util from 'node:util';
|
|
1112
1112
|
*
|
|
1113
1113
|
* class Foo {
|
|
1114
1114
|
* constructor() {
|
|
@@ -1178,7 +1178,7 @@ declare module "util" {
|
|
|
1178
1178
|
* Given an example `.env` file:
|
|
1179
1179
|
*
|
|
1180
1180
|
* ```js
|
|
1181
|
-
*
|
|
1181
|
+
* import { parseEnv } from 'node:util';
|
|
1182
1182
|
*
|
|
1183
1183
|
* parseEnv('HELLO=world\nHELLO=oh my\n');
|
|
1184
1184
|
* // Returns: { HELLO: 'oh my' }
|
|
@@ -1247,7 +1247,7 @@ declare module "util" {
|
|
|
1247
1247
|
* This function returns a formatted text considering the `format` passed.
|
|
1248
1248
|
*
|
|
1249
1249
|
* ```js
|
|
1250
|
-
*
|
|
1250
|
+
* import { styleText } from 'node:util';
|
|
1251
1251
|
* const errorMessage = styleText('red', 'Error! Error!');
|
|
1252
1252
|
* console.log(errorMessage);
|
|
1253
1253
|
* ```
|
|
@@ -1383,7 +1383,7 @@ declare module "util" {
|
|
|
1383
1383
|
import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from "util";
|
|
1384
1384
|
global {
|
|
1385
1385
|
/**
|
|
1386
|
-
* `TextDecoder` class is a global reference for `
|
|
1386
|
+
* `TextDecoder` class is a global reference for `import { TextDecoder } from 'node:util'`
|
|
1387
1387
|
* https://nodejs.org/api/globals.html#textdecoder
|
|
1388
1388
|
* @since v11.0.0
|
|
1389
1389
|
*/
|
|
@@ -1393,7 +1393,7 @@ declare module "util" {
|
|
|
1393
1393
|
} ? TextDecoder
|
|
1394
1394
|
: typeof _TextDecoder;
|
|
1395
1395
|
/**
|
|
1396
|
-
* `TextEncoder` class is a global reference for `
|
|
1396
|
+
* `TextEncoder` class is a global reference for `import { TextEncoder } from 'node:util'`
|
|
1397
1397
|
* https://nodejs.org/api/globals.html#textencoder
|
|
1398
1398
|
* @since v11.0.0
|
|
1399
1399
|
*/
|
|
@@ -1480,6 +1480,12 @@ declare module "util" {
|
|
|
1480
1480
|
* Whether this command accepts positional arguments.
|
|
1481
1481
|
*/
|
|
1482
1482
|
allowPositionals?: boolean | undefined;
|
|
1483
|
+
/**
|
|
1484
|
+
* If `true`, allows explicitly setting boolean options to `false` by prefixing the option name with `--no-`.
|
|
1485
|
+
* @default false
|
|
1486
|
+
* @since v20.16.0
|
|
1487
|
+
*/
|
|
1488
|
+
allowNegative?: boolean | undefined;
|
|
1483
1489
|
/**
|
|
1484
1490
|
* Return the parsed tokens. This is useful for extending the built-in behavior,
|
|
1485
1491
|
* from adding additional checks through to reprocessing the tokens in different ways.
|
|
@@ -1711,7 +1717,7 @@ declare module "util" {
|
|
|
1711
1717
|
* Each item of the iterator is a JavaScript `Array`. The first item of the array
|
|
1712
1718
|
* is the `name`, the second item of the array is the `value`.
|
|
1713
1719
|
*/
|
|
1714
|
-
entries():
|
|
1720
|
+
entries(): NodeJS.Iterator<[name: string, value: string]>;
|
|
1715
1721
|
/**
|
|
1716
1722
|
* Returns the value of the first name-value pair whose name is `name`. If there
|
|
1717
1723
|
* are no such pairs, `null` is returned.
|
|
@@ -1737,7 +1743,7 @@ declare module "util" {
|
|
|
1737
1743
|
* // bar
|
|
1738
1744
|
* ```
|
|
1739
1745
|
*/
|
|
1740
|
-
keys():
|
|
1746
|
+
keys(): NodeJS.Iterator<string>;
|
|
1741
1747
|
/**
|
|
1742
1748
|
* 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`,
|
|
1743
1749
|
* set the first such pair's value to `value`.
|
|
@@ -1756,11 +1762,11 @@ declare module "util" {
|
|
|
1756
1762
|
/**
|
|
1757
1763
|
* Returns an iterator over the values of each name-value pair.
|
|
1758
1764
|
*/
|
|
1759
|
-
values():
|
|
1765
|
+
values(): NodeJS.Iterator<string>;
|
|
1760
1766
|
/**
|
|
1761
1767
|
* Returns an iterator over each of the name-value pairs in the parameters.
|
|
1762
1768
|
*/
|
|
1763
|
-
[Symbol.iterator]:
|
|
1769
|
+
[Symbol.iterator](): NodeJS.Iterator<[name: string, value: string]>;
|
|
1764
1770
|
}
|
|
1765
1771
|
}
|
|
1766
1772
|
declare module "util/types" {
|
|
@@ -1928,7 +1934,7 @@ declare module "util/types" {
|
|
|
1928
1934
|
* ```
|
|
1929
1935
|
*
|
|
1930
1936
|
* ```js
|
|
1931
|
-
* const native =
|
|
1937
|
+
* const native =require('napi_addon.node');
|
|
1932
1938
|
* const data = native.myNapi();
|
|
1933
1939
|
* util.types.isExternal(data); // returns true
|
|
1934
1940
|
* util.types.isExternal(0); // returns false
|
|
@@ -2078,7 +2084,7 @@ declare module "util/types" {
|
|
|
2078
2084
|
* which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false` for these errors:
|
|
2079
2085
|
*
|
|
2080
2086
|
* ```js
|
|
2081
|
-
*
|
|
2087
|
+
* import vm from 'node:vm';
|
|
2082
2088
|
* const context = vm.createContext({});
|
|
2083
2089
|
* const myError = vm.runInContext('new Error()', context);
|
|
2084
2090
|
* console.log(util.types.isNativeError(myError)); // true
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The `node:v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
|
|
3
3
|
*
|
|
4
4
|
* ```js
|
|
5
|
-
*
|
|
5
|
+
* import v8 from 'node:v8';
|
|
6
6
|
* ```
|
|
7
7
|
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/v8.js)
|
|
8
8
|
*/
|
|
@@ -176,7 +176,7 @@ declare module "v8" {
|
|
|
176
176
|
*
|
|
177
177
|
* ```js
|
|
178
178
|
* // Print GC events to stdout for one minute.
|
|
179
|
-
*
|
|
179
|
+
* import v8 from 'node:v8';
|
|
180
180
|
* v8.setFlagsFromString('--trace_gc');
|
|
181
181
|
* setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3);
|
|
182
182
|
* ```
|
|
@@ -243,7 +243,7 @@ declare module "v8" {
|
|
|
243
243
|
*
|
|
244
244
|
* ```js
|
|
245
245
|
* // Print heap snapshot to the console
|
|
246
|
-
*
|
|
246
|
+
* import v8 from 'node:v8';
|
|
247
247
|
* const stream = v8.getHeapSnapshot();
|
|
248
248
|
* stream.pipe(process.stdout);
|
|
249
249
|
* ```
|
|
@@ -268,12 +268,12 @@ declare module "v8" {
|
|
|
268
268
|
* for a duration depending on the heap size.
|
|
269
269
|
*
|
|
270
270
|
* ```js
|
|
271
|
-
*
|
|
272
|
-
*
|
|
271
|
+
* import { writeHeapSnapshot } from 'node:v8';
|
|
272
|
+
* import {
|
|
273
273
|
* Worker,
|
|
274
274
|
* isMainThread,
|
|
275
275
|
* parentPort,
|
|
276
|
-
* }
|
|
276
|
+
* } from 'node:worker_threads';
|
|
277
277
|
*
|
|
278
278
|
* if (isMainThread) {
|
|
279
279
|
* const worker = new Worker(__filename);
|
|
@@ -550,7 +550,7 @@ declare module "v8" {
|
|
|
550
550
|
* Here's an example.
|
|
551
551
|
*
|
|
552
552
|
* ```js
|
|
553
|
-
*
|
|
553
|
+
* import { GCProfiler } from 'node:v8';
|
|
554
554
|
* const profiler = new GCProfiler();
|
|
555
555
|
* profiler.start();
|
|
556
556
|
* setTimeout(() => {
|
|
@@ -736,12 +736,12 @@ declare module "v8" {
|
|
|
736
736
|
* ```js
|
|
737
737
|
* 'use strict';
|
|
738
738
|
*
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
739
|
+
* import fs from 'node:fs';
|
|
740
|
+
* import zlib from 'node:zlib';
|
|
741
|
+
* import path from 'node:path';
|
|
742
|
+
* import assert from 'node:assert';
|
|
743
743
|
*
|
|
744
|
-
*
|
|
744
|
+
* import v8 from 'node:v8';
|
|
745
745
|
*
|
|
746
746
|
* class BookShelf {
|
|
747
747
|
* storage = new Map();
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* code are reflected in the context object.
|
|
18
18
|
*
|
|
19
19
|
* ```js
|
|
20
|
-
*
|
|
20
|
+
* import vm from 'node:vm';
|
|
21
21
|
*
|
|
22
22
|
* const x = 1;
|
|
23
23
|
*
|
|
@@ -203,7 +203,7 @@ declare module "vm" {
|
|
|
203
203
|
* The globals are contained in the `context` object.
|
|
204
204
|
*
|
|
205
205
|
* ```js
|
|
206
|
-
*
|
|
206
|
+
* import vm from 'node:vm';
|
|
207
207
|
*
|
|
208
208
|
* const context = {
|
|
209
209
|
* animal: 'cat',
|
|
@@ -239,7 +239,7 @@ declare module "vm" {
|
|
|
239
239
|
* contained within each individual `context`.
|
|
240
240
|
*
|
|
241
241
|
* ```js
|
|
242
|
-
*
|
|
242
|
+
* import vm from 'node:vm';
|
|
243
243
|
*
|
|
244
244
|
* const script = new vm.Script('globalVar = "set"');
|
|
245
245
|
*
|
|
@@ -264,7 +264,7 @@ declare module "vm" {
|
|
|
264
264
|
* executes that code multiple times:
|
|
265
265
|
*
|
|
266
266
|
* ```js
|
|
267
|
-
*
|
|
267
|
+
* import vm from 'node:vm';
|
|
268
268
|
*
|
|
269
269
|
* global.globalVar = 0;
|
|
270
270
|
*
|
|
@@ -357,7 +357,7 @@ declare module "vm" {
|
|
|
357
357
|
* variables will remain unchanged.
|
|
358
358
|
*
|
|
359
359
|
* ```js
|
|
360
|
-
*
|
|
360
|
+
* import vm from 'node:vm';
|
|
361
361
|
*
|
|
362
362
|
* global.globalVar = 3;
|
|
363
363
|
*
|
|
@@ -404,7 +404,7 @@ declare module "vm" {
|
|
|
404
404
|
* The following example compiles and executes different scripts using a single `contextified` object:
|
|
405
405
|
*
|
|
406
406
|
* ```js
|
|
407
|
-
*
|
|
407
|
+
* import vm from 'node:vm';
|
|
408
408
|
*
|
|
409
409
|
* const contextObject = { globalVar: 1 };
|
|
410
410
|
* vm.createContext(contextObject);
|
|
@@ -433,7 +433,7 @@ declare module "vm" {
|
|
|
433
433
|
* variable and sets a new one. These globals are contained in the `contextObject`.
|
|
434
434
|
*
|
|
435
435
|
* ```js
|
|
436
|
-
*
|
|
436
|
+
* import vm from 'node:vm';
|
|
437
437
|
*
|
|
438
438
|
* const contextObject = {
|
|
439
439
|
* animal: 'cat',
|
|
@@ -465,7 +465,7 @@ declare module "vm" {
|
|
|
465
465
|
* the JavaScript [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) function to run the same code:
|
|
466
466
|
*
|
|
467
467
|
* ```js
|
|
468
|
-
*
|
|
468
|
+
* import vm from 'node:vm';
|
|
469
469
|
* let localVar = 'initial value';
|
|
470
470
|
*
|
|
471
471
|
* const vmResult = vm.runInThisContext('localVar = "vm";');
|
|
@@ -492,12 +492,11 @@ declare module "vm" {
|
|
|
492
492
|
*
|
|
493
493
|
* ```js
|
|
494
494
|
* 'use strict';
|
|
495
|
-
*
|
|
495
|
+
* import vm from 'node:vm';
|
|
496
496
|
*
|
|
497
497
|
* const code = `
|
|
498
498
|
* ((require) => {
|
|
499
499
|
* const http = require('node:http');
|
|
500
|
-
*
|
|
501
500
|
* http.createServer((request, response) => {
|
|
502
501
|
* response.writeHead(200, { 'Content-Type': 'text/plain' });
|
|
503
502
|
* response.end('Hello World\\n');
|
|
@@ -547,7 +546,7 @@ declare module "vm" {
|
|
|
547
546
|
* the memory occupied by each heap space in the current V8 instance.
|
|
548
547
|
*
|
|
549
548
|
* ```js
|
|
550
|
-
*
|
|
549
|
+
* import vm from 'node:vm';
|
|
551
550
|
* // Measure the memory used by the main context.
|
|
552
551
|
* vm.measureMemory({ mode: 'summary' })
|
|
553
552
|
* // This is the same as vm.measureMemory()
|
|
@@ -855,7 +854,7 @@ declare module "vm" {
|
|
|
855
854
|
* module graphs.
|
|
856
855
|
*
|
|
857
856
|
* ```js
|
|
858
|
-
*
|
|
857
|
+
* import vm from 'node:vm';
|
|
859
858
|
*
|
|
860
859
|
* const source = '{ "a": 1 }';
|
|
861
860
|
* const module = new vm.SyntheticModule(['default'], function() {
|