cdk-common 2.1.39 → 2.1.41
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/lib/main.js +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +6 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +24 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +126 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +12 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +29 -24
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/test/reporters.d.ts +1 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +9 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +24 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +50 -85
- package/node_modules/@types/concat-stream/node_modules/undici-types/client.d.ts +5 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/dispatcher.d.ts +1 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/package.json +1 -1
- package/node_modules/@types/concat-stream/node_modules/undici-types/webidl.d.ts +6 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/websocket.d.ts +2 -0
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +6 -9
- package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +24 -1
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +126 -6
- package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +12 -0
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +29 -24
- package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/test/reporters.d.ts +1 -0
- package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +9 -0
- package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +24 -2
- package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +50 -85
- package/node_modules/@types/form-data/node_modules/undici-types/client.d.ts +5 -0
- package/node_modules/@types/form-data/node_modules/undici-types/dispatcher.d.ts +1 -0
- package/node_modules/@types/form-data/node_modules/undici-types/package.json +1 -1
- package/node_modules/@types/form-data/node_modules/undici-types/webidl.d.ts +6 -0
- package/node_modules/@types/form-data/node_modules/undici-types/websocket.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1474,30 +1474,35 @@ declare module "node:process" {
|
|
|
1474
1474
|
* Will generate an object similar to:
|
|
1475
1475
|
*
|
|
1476
1476
|
* ```console
|
|
1477
|
-
* { node: '
|
|
1478
|
-
* acorn: '8.
|
|
1479
|
-
* ada: '
|
|
1480
|
-
*
|
|
1481
|
-
*
|
|
1482
|
-
* brotli: '1.0
|
|
1483
|
-
*
|
|
1484
|
-
* cldr: '
|
|
1485
|
-
* icu: '
|
|
1486
|
-
* llhttp: '
|
|
1487
|
-
* modules: '
|
|
1488
|
-
* napi: '
|
|
1489
|
-
*
|
|
1490
|
-
*
|
|
1491
|
-
*
|
|
1492
|
-
*
|
|
1493
|
-
*
|
|
1494
|
-
*
|
|
1495
|
-
*
|
|
1496
|
-
*
|
|
1497
|
-
*
|
|
1498
|
-
*
|
|
1499
|
-
*
|
|
1500
|
-
*
|
|
1477
|
+
* { node: '26.0.0-pre',
|
|
1478
|
+
* acorn: '8.15.0',
|
|
1479
|
+
* ada: '3.4.1',
|
|
1480
|
+
* amaro: '1.1.5',
|
|
1481
|
+
* ares: '1.34.6',
|
|
1482
|
+
* brotli: '1.2.0',
|
|
1483
|
+
* merve: '1.0.0',
|
|
1484
|
+
* cldr: '48.0',
|
|
1485
|
+
* icu: '78.2',
|
|
1486
|
+
* llhttp: '9.3.0',
|
|
1487
|
+
* modules: '144',
|
|
1488
|
+
* napi: '10',
|
|
1489
|
+
* nbytes: '0.1.1',
|
|
1490
|
+
* ncrypto: '0.0.1',
|
|
1491
|
+
* nghttp2: '1.68.0',
|
|
1492
|
+
* nghttp3: '',
|
|
1493
|
+
* ngtcp2: '',
|
|
1494
|
+
* openssl: '3.5.4',
|
|
1495
|
+
* simdjson: '4.2.4',
|
|
1496
|
+
* simdutf: '7.3.3',
|
|
1497
|
+
* sqlite: '3.51.2',
|
|
1498
|
+
* tz: '2025c',
|
|
1499
|
+
* undici: '7.18.2',
|
|
1500
|
+
* unicode: '17.0',
|
|
1501
|
+
* uv: '1.51.0',
|
|
1502
|
+
* uvwasi: '0.0.23',
|
|
1503
|
+
* v8: '14.3.127.18-node.10',
|
|
1504
|
+
* zlib: '1.3.1-e00f703',
|
|
1505
|
+
* zstd: '1.5.7' }
|
|
1501
1506
|
* ```
|
|
1502
1507
|
* @since v0.2.0
|
|
1503
1508
|
*/
|
|
@@ -1067,7 +1067,7 @@ declare module "node:stream" {
|
|
|
1067
1067
|
writableCorked?: number | undefined;
|
|
1068
1068
|
}
|
|
1069
1069
|
interface DuplexToWebOptions {
|
|
1070
|
-
|
|
1070
|
+
readableType?: web.ReadableStreamType | undefined;
|
|
1071
1071
|
}
|
|
1072
1072
|
interface DuplexEventMap extends ReadableEventMap, WritableEventMap {}
|
|
1073
1073
|
/**
|
|
@@ -8,6 +8,7 @@ declare module "node:test/reporters" {
|
|
|
8
8
|
| { type: "test:diagnostic"; data: EventData.TestDiagnostic }
|
|
9
9
|
| { type: "test:enqueue"; data: EventData.TestEnqueue }
|
|
10
10
|
| { type: "test:fail"; data: EventData.TestFail }
|
|
11
|
+
| { type: "test:interrupted"; data: EventData.TestInterrupted }
|
|
11
12
|
| { type: "test:pass"; data: EventData.TestPass }
|
|
12
13
|
| { type: "test:plan"; data: EventData.TestPlan }
|
|
13
14
|
| { type: "test:start"; data: EventData.TestStart }
|
|
@@ -334,6 +334,7 @@ declare module "node:test" {
|
|
|
334
334
|
* This options is not compatible with `isolation='none'`. These variables will override
|
|
335
335
|
* those from the main process, and are not merged with `process.env`.
|
|
336
336
|
* @since v25.6.0
|
|
337
|
+
* @default process.env
|
|
337
338
|
*/
|
|
338
339
|
env?: NodeJS.ProcessEnv | undefined;
|
|
339
340
|
}
|
|
@@ -345,6 +346,7 @@ declare module "node:test" {
|
|
|
345
346
|
"test:diagnostic": [data: EventData.TestDiagnostic];
|
|
346
347
|
"test:enqueue": [data: EventData.TestEnqueue];
|
|
347
348
|
"test:fail": [data: EventData.TestFail];
|
|
349
|
+
"test:interrupted": [data: EventData.TestInterrupted];
|
|
348
350
|
"test:pass": [data: EventData.TestPass];
|
|
349
351
|
"test:plan": [data: EventData.TestPlan];
|
|
350
352
|
"test:start": [data: EventData.TestStart];
|
|
@@ -736,6 +738,13 @@ declare module "node:test" {
|
|
|
736
738
|
*/
|
|
737
739
|
skip?: string | boolean;
|
|
738
740
|
}
|
|
741
|
+
interface TestInterrupted {
|
|
742
|
+
/**
|
|
743
|
+
* An array of objects containing information about the
|
|
744
|
+
* interrupted tests.
|
|
745
|
+
*/
|
|
746
|
+
tests: TestStart[];
|
|
747
|
+
}
|
|
739
748
|
interface TestPass extends LocationInfo {
|
|
740
749
|
/**
|
|
741
750
|
* Additional execution metadata.
|
|
@@ -229,9 +229,31 @@ declare module "node:url" {
|
|
|
229
229
|
* * `result` is returned.
|
|
230
230
|
* @since v0.1.25
|
|
231
231
|
* @legacy Use the WHATWG URL API instead.
|
|
232
|
-
* @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise).
|
|
232
|
+
* @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise).
|
|
233
|
+
*/
|
|
234
|
+
function format(urlObject: UrlObject): string;
|
|
235
|
+
/**
|
|
236
|
+
* `url.format(urlString)` is shorthand for `url.format(url.parse(urlString))`.
|
|
237
|
+
*
|
|
238
|
+
* Because it invokes the deprecated `url.parse()`, passing a string argument
|
|
239
|
+
* to `url.format()` is itself deprecated.
|
|
240
|
+
*
|
|
241
|
+
* Canonicalizing a URL string can be performed using the WHATWG URL API, by
|
|
242
|
+
* constructing a new URL object and calling `url.toString()`.
|
|
243
|
+
*
|
|
244
|
+
* ```js
|
|
245
|
+
* import { URL } from 'node:url';
|
|
246
|
+
*
|
|
247
|
+
* const unformatted = 'http://[fe80:0:0:0:0:0:0:1]:/a/b?a=b#abc';
|
|
248
|
+
* const formatted = new URL(unformatted).toString();
|
|
249
|
+
*
|
|
250
|
+
* console.log(formatted); // Prints: http://[fe80::1]/a/b?a=b#abc
|
|
251
|
+
* ```
|
|
252
|
+
* @since v0.1.25
|
|
253
|
+
* @deprecated Use the WHATWG URL API instead.
|
|
254
|
+
* @param urlString A string that will be passed to `url.parse()` and then formatted.
|
|
233
255
|
*/
|
|
234
|
-
function format(
|
|
256
|
+
function format(urlString: string): string;
|
|
235
257
|
/**
|
|
236
258
|
* The `url.resolve()` method resolves a target URL relative to a base URL in a
|
|
237
259
|
* manner similar to that of a web browser resolving an anchor tag.
|
|
@@ -200,16 +200,16 @@ declare module "node:vm" {
|
|
|
200
200
|
* The globals are contained in the `context` object.
|
|
201
201
|
*
|
|
202
202
|
* ```js
|
|
203
|
-
* import
|
|
203
|
+
* import { createContext, Script } from 'node:vm';
|
|
204
204
|
*
|
|
205
205
|
* const context = {
|
|
206
206
|
* animal: 'cat',
|
|
207
207
|
* count: 2,
|
|
208
208
|
* };
|
|
209
209
|
*
|
|
210
|
-
* const script = new
|
|
210
|
+
* const script = new Script('count += 1; name = "kitty";');
|
|
211
211
|
*
|
|
212
|
-
*
|
|
212
|
+
* createContext(context);
|
|
213
213
|
* for (let i = 0; i < 10; ++i) {
|
|
214
214
|
* script.runInContext(context);
|
|
215
215
|
* }
|
|
@@ -243,9 +243,9 @@ declare module "node:vm" {
|
|
|
243
243
|
* contained within each individual `context`.
|
|
244
244
|
*
|
|
245
245
|
* ```js
|
|
246
|
-
*
|
|
246
|
+
* import { constants, Script } from 'node:vm';
|
|
247
247
|
*
|
|
248
|
-
* const script = new
|
|
248
|
+
* const script = new Script('globalVar = "set"');
|
|
249
249
|
*
|
|
250
250
|
* const contexts = [{}, {}, {}];
|
|
251
251
|
* contexts.forEach((context) => {
|
|
@@ -256,10 +256,10 @@ declare module "node:vm" {
|
|
|
256
256
|
* // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }]
|
|
257
257
|
*
|
|
258
258
|
* // This would throw if the context is created from a contextified object.
|
|
259
|
-
* //
|
|
259
|
+
* // constants.DONT_CONTEXTIFY allows creating contexts with ordinary
|
|
260
260
|
* // global objects that can be frozen.
|
|
261
|
-
* const freezeScript = new
|
|
262
|
-
* const frozenContext = freezeScript.runInNewContext(
|
|
261
|
+
* const freezeScript = new Script('Object.freeze(globalThis); globalThis;');
|
|
262
|
+
* const frozenContext = freezeScript.runInNewContext(constants.DONT_CONTEXTIFY);
|
|
263
263
|
* ```
|
|
264
264
|
* @since v0.3.1
|
|
265
265
|
* @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
|
|
@@ -278,11 +278,11 @@ declare module "node:vm" {
|
|
|
278
278
|
* executes that code multiple times:
|
|
279
279
|
*
|
|
280
280
|
* ```js
|
|
281
|
-
* import
|
|
281
|
+
* import { Script } from 'node:vm';
|
|
282
282
|
*
|
|
283
283
|
* global.globalVar = 0;
|
|
284
284
|
*
|
|
285
|
-
* const script = new
|
|
285
|
+
* const script = new Script('globalVar += 1', { filename: 'myfile.vm' });
|
|
286
286
|
*
|
|
287
287
|
* for (let i = 0; i < 1000; ++i) {
|
|
288
288
|
* script.runInThisContext();
|
|
@@ -371,14 +371,14 @@ declare module "node:vm" {
|
|
|
371
371
|
* variables will remain unchanged.
|
|
372
372
|
*
|
|
373
373
|
* ```js
|
|
374
|
-
*
|
|
374
|
+
* import { createContext, runInContext } from 'node:vm';
|
|
375
375
|
*
|
|
376
376
|
* global.globalVar = 3;
|
|
377
377
|
*
|
|
378
378
|
* const context = { globalVar: 1 };
|
|
379
|
-
*
|
|
379
|
+
* createContext(context);
|
|
380
380
|
*
|
|
381
|
-
*
|
|
381
|
+
* runInContext('globalVar *= 2;', context);
|
|
382
382
|
*
|
|
383
383
|
* console.log(context);
|
|
384
384
|
* // Prints: { globalVar: 2 }
|
|
@@ -429,13 +429,13 @@ declare module "node:vm" {
|
|
|
429
429
|
* The following example compiles and executes different scripts using a single `contextified` object:
|
|
430
430
|
*
|
|
431
431
|
* ```js
|
|
432
|
-
* import
|
|
432
|
+
* import { createContext, runInContext } from 'node:vm';
|
|
433
433
|
*
|
|
434
434
|
* const contextObject = { globalVar: 1 };
|
|
435
|
-
*
|
|
435
|
+
* createContext(contextObject);
|
|
436
436
|
*
|
|
437
437
|
* for (let i = 0; i < 10; ++i) {
|
|
438
|
-
*
|
|
438
|
+
* runInContext('globalVar *= 2;', contextObject);
|
|
439
439
|
* }
|
|
440
440
|
* console.log(contextObject);
|
|
441
441
|
* // Prints: { globalVar: 1024 }
|
|
@@ -466,21 +466,24 @@ declare module "node:vm" {
|
|
|
466
466
|
* variable and sets a new one. These globals are contained in the `contextObject`.
|
|
467
467
|
*
|
|
468
468
|
* ```js
|
|
469
|
-
*
|
|
469
|
+
* import { runInNewContext, constants } from 'node:vm';
|
|
470
470
|
*
|
|
471
471
|
* const contextObject = {
|
|
472
472
|
* animal: 'cat',
|
|
473
473
|
* count: 2,
|
|
474
474
|
* };
|
|
475
475
|
*
|
|
476
|
-
*
|
|
476
|
+
* runInNewContext('count += 1; name = "kitty"', contextObject);
|
|
477
477
|
* console.log(contextObject);
|
|
478
478
|
* // Prints: { animal: 'cat', count: 3, name: 'kitty' }
|
|
479
479
|
*
|
|
480
480
|
* // This would throw if the context is created from a contextified object.
|
|
481
481
|
* // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary global objects that
|
|
482
482
|
* // can be frozen.
|
|
483
|
-
* const frozenContext =
|
|
483
|
+
* const frozenContext = runInNewContext(
|
|
484
|
+
* 'Object.freeze(globalThis); globalThis;',
|
|
485
|
+
* constants.DONT_CONTEXTIFY,
|
|
486
|
+
* );
|
|
484
487
|
* ```
|
|
485
488
|
* @since v0.3.1
|
|
486
489
|
* @param code The JavaScript code to compile and run.
|
|
@@ -504,10 +507,10 @@ declare module "node:vm" {
|
|
|
504
507
|
* the JavaScript [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) function to run the same code:
|
|
505
508
|
*
|
|
506
509
|
* ```js
|
|
507
|
-
* import
|
|
510
|
+
* import { runInThisContext } from 'node:vm';
|
|
508
511
|
* let localVar = 'initial value';
|
|
509
512
|
*
|
|
510
|
-
* const vmResult =
|
|
513
|
+
* const vmResult = runInThisContext('localVar = "vm";');
|
|
511
514
|
* console.log(`vmResult: '${vmResult}', localVar: '${localVar}'`);
|
|
512
515
|
* // Prints: vmResult: 'vm', localVar: 'initial value'
|
|
513
516
|
*
|
|
@@ -519,38 +522,6 @@ declare module "node:vm" {
|
|
|
519
522
|
* Because `vm.runInThisContext()` does not have access to the local scope, `localVar` is unchanged. In contrast,
|
|
520
523
|
* [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) _does_ have access to the
|
|
521
524
|
* local scope, so the value `localVar` is changed. In this way `vm.runInThisContext()` is much like an [indirect `eval()` call](https://es5.github.io/#x10.4.2), e.g.`(0,eval)('code')`.
|
|
522
|
-
*
|
|
523
|
-
* ## Example: Running an HTTP server within a VM
|
|
524
|
-
*
|
|
525
|
-
* When using either `script.runInThisContext()` or {@link runInThisContext}, the code is executed within the current V8 global
|
|
526
|
-
* context. The code passed to this VM context will have its own isolated scope.
|
|
527
|
-
*
|
|
528
|
-
* In order to run a simple web server using the `node:http` module the code passed
|
|
529
|
-
* to the context must either import `node:http` on its own, or have a
|
|
530
|
-
* reference to the `node:http` module passed to it. For instance:
|
|
531
|
-
*
|
|
532
|
-
* ```js
|
|
533
|
-
* 'use strict';
|
|
534
|
-
* import vm from 'node:vm';
|
|
535
|
-
*
|
|
536
|
-
* const code = `
|
|
537
|
-
* ((require) => {
|
|
538
|
-
* const http = require('node:http');
|
|
539
|
-
*
|
|
540
|
-
* http.createServer((request, response) => {
|
|
541
|
-
* response.writeHead(200, { 'Content-Type': 'text/plain' });
|
|
542
|
-
* response.end('Hello World\\n');
|
|
543
|
-
* }).listen(8124);
|
|
544
|
-
*
|
|
545
|
-
* console.log('Server running at http://127.0.0.1:8124/');
|
|
546
|
-
* })`;
|
|
547
|
-
*
|
|
548
|
-
* vm.runInThisContext(code)(require);
|
|
549
|
-
* ```
|
|
550
|
-
*
|
|
551
|
-
* The `require()` in the above case shares the state with the context it is
|
|
552
|
-
* passed from. This may introduce risks when untrusted code is executed, e.g.
|
|
553
|
-
* altering objects in the context in unwanted ways.
|
|
554
525
|
* @since v0.3.1
|
|
555
526
|
* @param code The JavaScript code to compile and run.
|
|
556
527
|
* @return the result of the very last statement executed in the script.
|
|
@@ -582,44 +553,32 @@ declare module "node:vm" {
|
|
|
582
553
|
* the memory occupied by each heap space in the current V8 instance.
|
|
583
554
|
*
|
|
584
555
|
* ```js
|
|
585
|
-
* import
|
|
556
|
+
* import { createContext, measureMemory } from 'node:vm';
|
|
586
557
|
* // Measure the memory used by the main context.
|
|
587
|
-
*
|
|
558
|
+
* measureMemory({ mode: 'summary' })
|
|
588
559
|
* // This is the same as vm.measureMemory()
|
|
589
560
|
* .then((result) => {
|
|
590
561
|
* // The current format is:
|
|
591
562
|
* // {
|
|
592
|
-
* // total: {
|
|
593
|
-
* //
|
|
594
|
-
* // }
|
|
563
|
+
* // total: { jsMemoryEstimate: 1601828, jsMemoryRange: [1601828, 5275288] },
|
|
564
|
+
* // WebAssembly: { code: 0, metadata: 33962 },
|
|
595
565
|
* // }
|
|
596
566
|
* console.log(result);
|
|
597
567
|
* });
|
|
598
568
|
*
|
|
599
|
-
* const context =
|
|
600
|
-
*
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
* // jsMemoryRange: [ 2438996, 2768636 ]
|
|
613
|
-
* // },
|
|
614
|
-
* // other: [
|
|
615
|
-
* // {
|
|
616
|
-
* // jsMemoryEstimate: 135736,
|
|
617
|
-
* // jsMemoryRange: [ 135736, 465376 ]
|
|
618
|
-
* // }
|
|
619
|
-
* // ]
|
|
620
|
-
* // }
|
|
621
|
-
* console.log(result);
|
|
622
|
-
* });
|
|
569
|
+
* const context = createContext({ a: 1 });
|
|
570
|
+
* measureMemory({ mode: 'detailed', execution: 'eager' }).then((result) => {
|
|
571
|
+
* // Reference the context here so that it won't be GC'ed
|
|
572
|
+
* // until the measurement is complete.
|
|
573
|
+
* console.log('Context:', context.a);
|
|
574
|
+
* // {
|
|
575
|
+
* // total: { jsMemoryEstimate: 1767100, jsMemoryRange: [1767100, 5440560] },
|
|
576
|
+
* // WebAssembly: { code: 0, metadata: 33962 },
|
|
577
|
+
* // current: { jsMemoryEstimate: 1601828, jsMemoryRange: [1601828, 5275288] },
|
|
578
|
+
* // other: [{ jsMemoryEstimate: 165272, jsMemoryRange: [Array] }],
|
|
579
|
+
* // }
|
|
580
|
+
* console.log(result);
|
|
581
|
+
* });
|
|
623
582
|
* ```
|
|
624
583
|
* @since v13.10.0
|
|
625
584
|
* @experimental
|
|
@@ -1092,15 +1051,21 @@ declare module "node:vm" {
|
|
|
1092
1051
|
* module graphs.
|
|
1093
1052
|
*
|
|
1094
1053
|
* ```js
|
|
1095
|
-
* import
|
|
1054
|
+
* import { SyntheticModule } from 'node:vm';
|
|
1096
1055
|
*
|
|
1097
1056
|
* const source = '{ "a": 1 }';
|
|
1098
|
-
* const
|
|
1057
|
+
* const syntheticModule = new SyntheticModule(['default'], function() {
|
|
1099
1058
|
* const obj = JSON.parse(source);
|
|
1100
1059
|
* this.setExport('default', obj);
|
|
1101
1060
|
* });
|
|
1102
1061
|
*
|
|
1103
|
-
* // Use `
|
|
1062
|
+
* // Use `syntheticModule` in linking
|
|
1063
|
+
* (async () => {
|
|
1064
|
+
* await syntheticModule.link(() => {});
|
|
1065
|
+
* await syntheticModule.evaluate();
|
|
1066
|
+
*
|
|
1067
|
+
* console.log('Default export:', syntheticModule.namespace.default);
|
|
1068
|
+
* })();
|
|
1104
1069
|
* ```
|
|
1105
1070
|
* @since v13.0.0, v12.16.0
|
|
1106
1071
|
* @experimental
|
|
@@ -102,6 +102,11 @@ export declare namespace Client {
|
|
|
102
102
|
* @default 524288
|
|
103
103
|
*/
|
|
104
104
|
connectionWindowSize?: number;
|
|
105
|
+
/**
|
|
106
|
+
* @description Time interval between PING frames dispatch
|
|
107
|
+
* @default 60000
|
|
108
|
+
*/
|
|
109
|
+
pingInterval?: number;
|
|
105
110
|
}
|
|
106
111
|
export interface SocketInfo {
|
|
107
112
|
localAddress?: string
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// These types are not exported, and are only used internally
|
|
2
|
+
import { BufferSource } from 'node:stream/web'
|
|
2
3
|
import * as undici from './index'
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -93,6 +94,11 @@ interface WebidlUtil {
|
|
|
93
94
|
IsResizableArrayBuffer (V: ArrayBufferLike): boolean
|
|
94
95
|
|
|
95
96
|
HasFlag (flag: number, attributes: number): boolean
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @see https://webidl.spec.whatwg.org/#dfn-get-buffer-source-copy
|
|
100
|
+
*/
|
|
101
|
+
getCopyOfBytesHeldByBufferSource (bufferSource: BufferSource): Uint8Array
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
interface WebidlConverters {
|
package/package.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"jsii-docgen": "^10.5.0",
|
|
55
55
|
"jsii-pacmak": "^1.129.0",
|
|
56
56
|
"jsii-rosetta": "5.9.x",
|
|
57
|
-
"projen": "0.99.
|
|
57
|
+
"projen": "0.99.60",
|
|
58
58
|
"ts-jest": "^27",
|
|
59
59
|
"typescript": "^5"
|
|
60
60
|
},
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"access": "public",
|
|
89
89
|
"provenance": true
|
|
90
90
|
},
|
|
91
|
-
"version": "2.1.
|
|
91
|
+
"version": "2.1.41",
|
|
92
92
|
"jest": {
|
|
93
93
|
"coverageProvider": "v8",
|
|
94
94
|
"testMatch": [
|