cdk-common 2.0.1351 → 2.0.1353
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 +38 -2
- package/API.md +36 -0
- package/lib/main.js +1 -1
- package/lib/managed-policies.d.ts +7 -1
- package/lib/managed-policies.js +7 -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/assert/strict.d.ts +5 -11
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +9 -169
- package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +8 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.buffer.d.ts +1 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +44 -168
- package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +16 -64
- package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +240 -332
- package/node_modules/@types/concat-stream/node_modules/@types/node/console.d.ts +49 -351
- package/node_modules/@types/concat-stream/node_modules/@types/node/constants.d.ts +3 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +279 -1631
- package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +15 -51
- package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns/promises.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +131 -132
- package/node_modules/@types/concat-stream/node_modules/@types/node/domain.d.ts +13 -17
- package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +869 -791
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +7 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +417 -455
- package/node_modules/@types/concat-stream/node_modules/@types/node/globals.d.ts +6 -26
- package/node_modules/@types/concat-stream/node_modules/@types/node/globals.typedarray.d.ts +60 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +263 -254
- package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +528 -804
- package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +59 -239
- package/node_modules/@types/concat-stream/node_modules/@types/node/index.d.ts +15 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector/promises.d.ts +41 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +6 -59
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.generated.d.ts +3 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +47 -122
- package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +63 -184
- package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +6 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/path.d.ts +120 -133
- package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +282 -643
- package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +156 -128
- package/node_modules/@types/concat-stream/node_modules/@types/node/punycode.d.ts +5 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/querystring.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/quic.d.ts +910 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +67 -120
- package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +75 -98
- package/node_modules/@types/concat-stream/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/web.d.ts +176 -453
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +555 -478
- package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/test/reporters.d.ts +96 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +80 -180
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers.d.ts +4 -130
- package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +102 -177
- package/node_modules/@types/concat-stream/node_modules/@types/node/trace_events.d.ts +9 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/index.d.ts +15 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.7/index.d.ts +15 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/tty.d.ts +58 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +54 -592
- package/node_modules/@types/concat-stream/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +120 -792
- package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +32 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +13 -13
- package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/crypto.d.ts +7 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/fetch.d.ts +4 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/streams.d.ts +93 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +176 -358
- package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +8 -71
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/assert/strict.d.ts +5 -11
- package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +9 -169
- package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +8 -8
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.buffer.d.ts +1 -7
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +44 -168
- package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +16 -64
- package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +240 -332
- package/node_modules/@types/form-data/node_modules/@types/node/console.d.ts +49 -351
- package/node_modules/@types/form-data/node_modules/@types/node/constants.d.ts +3 -4
- package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +279 -1631
- package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +15 -51
- package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/dns/promises.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +131 -132
- package/node_modules/@types/form-data/node_modules/@types/node/domain.d.ts +13 -17
- package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +869 -791
- package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +7 -8
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +417 -455
- package/node_modules/@types/form-data/node_modules/@types/node/globals.d.ts +6 -26
- package/node_modules/@types/form-data/node_modules/@types/node/globals.typedarray.d.ts +60 -0
- package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +263 -254
- package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +528 -804
- package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +59 -239
- package/node_modules/@types/form-data/node_modules/@types/node/index.d.ts +15 -1
- package/node_modules/@types/form-data/node_modules/@types/node/inspector/promises.d.ts +41 -0
- package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +6 -59
- package/node_modules/@types/form-data/node_modules/@types/node/inspector.generated.d.ts +3 -10
- package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +47 -122
- package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +63 -184
- package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +6 -6
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/form-data/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/form-data/node_modules/@types/node/path.d.ts +120 -133
- package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +282 -643
- package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +156 -128
- package/node_modules/@types/form-data/node_modules/@types/node/punycode.d.ts +5 -5
- package/node_modules/@types/form-data/node_modules/@types/node/querystring.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/quic.d.ts +910 -0
- package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +67 -120
- package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +75 -98
- package/node_modules/@types/form-data/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/form-data/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/node_modules/@types/form-data/node_modules/@types/node/stream/web.d.ts +176 -453
- package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +555 -478
- package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/test/reporters.d.ts +96 -0
- package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +80 -180
- package/node_modules/@types/form-data/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/timers.d.ts +4 -130
- package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +102 -177
- package/node_modules/@types/form-data/node_modules/@types/node/trace_events.d.ts +9 -9
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -7
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/index.d.ts +15 -1
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.7/index.d.ts +15 -1
- package/node_modules/@types/form-data/node_modules/@types/node/tty.d.ts +58 -16
- package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +54 -592
- package/node_modules/@types/form-data/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +120 -792
- package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +32 -5
- package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +13 -13
- package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/crypto.d.ts +7 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/fetch.d.ts +4 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/streams.d.ts +93 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +176 -358
- package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +8 -71
- package/package.json +4 -4
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* The module exports two specific components:
|
|
6
6
|
*
|
|
7
7
|
* * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
|
|
8
|
-
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-
|
|
9
|
-
* [`process.stderr`](https://nodejs.org/docs/latest-
|
|
8
|
+
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdout) and
|
|
9
|
+
* [`process.stderr`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
|
|
10
10
|
*
|
|
11
11
|
* _**Warning**_: The global console object's methods are neither consistently
|
|
12
12
|
* synchronous like the browser APIs they resemble, nor are they consistently
|
|
13
|
-
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-
|
|
13
|
+
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v25.x/api/process.html#a-note-on-process-io) for
|
|
14
14
|
* more information.
|
|
15
15
|
*
|
|
16
16
|
* Example using the global `console`:
|
|
@@ -54,276 +54,63 @@
|
|
|
54
54
|
* myConsole.warn(`Danger ${name}! Danger!`);
|
|
55
55
|
* // Prints: Danger Will Robinson! Danger!, to err
|
|
56
56
|
* ```
|
|
57
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
57
|
+
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/console.js)
|
|
58
58
|
*/
|
|
59
|
-
declare module "console" {
|
|
60
|
-
import console = require("node:console");
|
|
61
|
-
export = console;
|
|
62
|
-
}
|
|
63
59
|
declare module "node:console" {
|
|
64
60
|
import { InspectOptions } from "node:util";
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
namespace console {
|
|
62
|
+
interface ConsoleOptions {
|
|
63
|
+
stdout: NodeJS.WritableStream;
|
|
64
|
+
stderr?: NodeJS.WritableStream | undefined;
|
|
69
65
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* starts with `"Assertion failed"`. If provided, `message` is formatted using
|
|
73
|
-
* [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args).
|
|
74
|
-
*
|
|
75
|
-
* If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
|
|
76
|
-
*
|
|
77
|
-
* ```js
|
|
78
|
-
* console.assert(true, 'does nothing');
|
|
79
|
-
*
|
|
80
|
-
* console.assert(false, 'Whoops %s work', 'didn\'t');
|
|
81
|
-
* // Assertion failed: Whoops didn't work
|
|
82
|
-
*
|
|
83
|
-
* console.assert();
|
|
84
|
-
* // Assertion failed
|
|
85
|
-
* ```
|
|
86
|
-
* @since v0.1.101
|
|
87
|
-
* @param value The value tested for being truthy.
|
|
88
|
-
* @param message All arguments besides `value` are used as error message.
|
|
66
|
+
* Ignore errors when writing to the underlying streams.
|
|
67
|
+
* @default true
|
|
89
68
|
*/
|
|
90
|
-
|
|
69
|
+
ignoreErrors?: boolean | undefined;
|
|
91
70
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* current terminal viewport for the Node.js
|
|
98
|
-
* binary.
|
|
99
|
-
* @since v8.3.0
|
|
71
|
+
* Set color support for this `Console` instance. Setting to true enables coloring while inspecting
|
|
72
|
+
* values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color
|
|
73
|
+
* support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the
|
|
74
|
+
* respective stream. This option can not be used, if `inspectOptions.colors` is set as well.
|
|
75
|
+
* @default 'auto'
|
|
100
76
|
*/
|
|
101
|
-
|
|
77
|
+
colorMode?: boolean | "auto" | undefined;
|
|
102
78
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* ```js
|
|
107
|
-
* > console.count()
|
|
108
|
-
* default: 1
|
|
109
|
-
* undefined
|
|
110
|
-
* > console.count('default')
|
|
111
|
-
* default: 2
|
|
112
|
-
* undefined
|
|
113
|
-
* > console.count('abc')
|
|
114
|
-
* abc: 1
|
|
115
|
-
* undefined
|
|
116
|
-
* > console.count('xyz')
|
|
117
|
-
* xyz: 1
|
|
118
|
-
* undefined
|
|
119
|
-
* > console.count('abc')
|
|
120
|
-
* abc: 2
|
|
121
|
-
* undefined
|
|
122
|
-
* > console.count()
|
|
123
|
-
* default: 3
|
|
124
|
-
* undefined
|
|
125
|
-
* >
|
|
126
|
-
* ```
|
|
127
|
-
* @since v8.3.0
|
|
128
|
-
* @param [label='default'] The display label for the counter.
|
|
79
|
+
* Specifies options that are passed along to
|
|
80
|
+
* [`util.inspect()`](https://nodejs.org/docs/latest-v25.x/api/util.html#utilinspectobject-options).
|
|
129
81
|
*/
|
|
130
|
-
|
|
82
|
+
inspectOptions?: InspectOptions | ReadonlyMap<NodeJS.WritableStream, InspectOptions> | undefined;
|
|
131
83
|
/**
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* ```js
|
|
135
|
-
* > console.count('abc');
|
|
136
|
-
* abc: 1
|
|
137
|
-
* undefined
|
|
138
|
-
* > console.countReset('abc');
|
|
139
|
-
* undefined
|
|
140
|
-
* > console.count('abc');
|
|
141
|
-
* abc: 1
|
|
142
|
-
* undefined
|
|
143
|
-
* >
|
|
144
|
-
* ```
|
|
145
|
-
* @since v8.3.0
|
|
146
|
-
* @param [label='default'] The display label for the counter.
|
|
84
|
+
* Set group indentation.
|
|
85
|
+
* @default 2
|
|
147
86
|
*/
|
|
87
|
+
groupIndentation?: number | undefined;
|
|
88
|
+
}
|
|
89
|
+
interface Console {
|
|
90
|
+
readonly Console: {
|
|
91
|
+
prototype: Console;
|
|
92
|
+
new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
|
|
93
|
+
new(options: ConsoleOptions): Console;
|
|
94
|
+
};
|
|
95
|
+
assert(condition?: unknown, ...data: any[]): void;
|
|
96
|
+
clear(): void;
|
|
97
|
+
count(label?: string): void;
|
|
148
98
|
countReset(label?: string): void;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
* @since v8.0.0
|
|
152
|
-
*/
|
|
153
|
-
debug(message?: any, ...optionalParams: any[]): void;
|
|
154
|
-
/**
|
|
155
|
-
* Uses [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`.
|
|
156
|
-
* This function bypasses any custom `inspect()` function defined on `obj`.
|
|
157
|
-
* @since v0.1.101
|
|
158
|
-
*/
|
|
159
|
-
dir(obj: any, options?: InspectOptions): void;
|
|
160
|
-
/**
|
|
161
|
-
* This method calls `console.log()` passing it the arguments received.
|
|
162
|
-
* This method does not produce any XML formatting.
|
|
163
|
-
* @since v8.0.0
|
|
164
|
-
*/
|
|
99
|
+
debug(...data: any[]): void;
|
|
100
|
+
dir(item?: any, options?: InspectOptions): void;
|
|
165
101
|
dirxml(...data: any[]): void;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
|
|
170
|
-
* (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)).
|
|
171
|
-
*
|
|
172
|
-
* ```js
|
|
173
|
-
* const code = 5;
|
|
174
|
-
* console.error('error #%d', code);
|
|
175
|
-
* // Prints: error #5, to stderr
|
|
176
|
-
* console.error('error', code);
|
|
177
|
-
* // Prints: error 5, to stderr
|
|
178
|
-
* ```
|
|
179
|
-
*
|
|
180
|
-
* If formatting elements (e.g. `%d`) are not found in the first string then
|
|
181
|
-
* [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) is called on each argument and the
|
|
182
|
-
* resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)
|
|
183
|
-
* for more information.
|
|
184
|
-
* @since v0.1.100
|
|
185
|
-
*/
|
|
186
|
-
error(message?: any, ...optionalParams: any[]): void;
|
|
187
|
-
/**
|
|
188
|
-
* Increases indentation of subsequent lines by spaces for `groupIndentation` length.
|
|
189
|
-
*
|
|
190
|
-
* If one or more `label`s are provided, those are printed first without the
|
|
191
|
-
* additional indentation.
|
|
192
|
-
* @since v8.5.0
|
|
193
|
-
*/
|
|
194
|
-
group(...label: any[]): void;
|
|
195
|
-
/**
|
|
196
|
-
* An alias for {@link group}.
|
|
197
|
-
* @since v8.5.0
|
|
198
|
-
*/
|
|
199
|
-
groupCollapsed(...label: any[]): void;
|
|
200
|
-
/**
|
|
201
|
-
* Decreases indentation of subsequent lines by spaces for `groupIndentation` length.
|
|
202
|
-
* @since v8.5.0
|
|
203
|
-
*/
|
|
102
|
+
error(...data: any[]): void;
|
|
103
|
+
group(...data: any[]): void;
|
|
104
|
+
groupCollapsed(...data: any[]): void;
|
|
204
105
|
groupEnd(): void;
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
*/
|
|
209
|
-
info(message?: any, ...optionalParams: any[]): void;
|
|
210
|
-
/**
|
|
211
|
-
* Prints to `stdout` with newline. Multiple arguments can be passed, with the
|
|
212
|
-
* first used as the primary message and all additional used as substitution
|
|
213
|
-
* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
|
|
214
|
-
* (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)).
|
|
215
|
-
*
|
|
216
|
-
* ```js
|
|
217
|
-
* const count = 5;
|
|
218
|
-
* console.log('count: %d', count);
|
|
219
|
-
* // Prints: count: 5, to stdout
|
|
220
|
-
* console.log('count:', count);
|
|
221
|
-
* // Prints: count: 5, to stdout
|
|
222
|
-
* ```
|
|
223
|
-
*
|
|
224
|
-
* See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
|
|
225
|
-
* @since v0.1.100
|
|
226
|
-
*/
|
|
227
|
-
log(message?: any, ...optionalParams: any[]): void;
|
|
228
|
-
/**
|
|
229
|
-
* Try to construct a table with the columns of the properties of `tabularData` (or use `properties`) and rows of `tabularData` and log it. Falls back to just
|
|
230
|
-
* logging the argument if it can't be parsed as tabular.
|
|
231
|
-
*
|
|
232
|
-
* ```js
|
|
233
|
-
* // These can't be parsed as tabular data
|
|
234
|
-
* console.table(Symbol());
|
|
235
|
-
* // Symbol()
|
|
236
|
-
*
|
|
237
|
-
* console.table(undefined);
|
|
238
|
-
* // undefined
|
|
239
|
-
*
|
|
240
|
-
* console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
|
|
241
|
-
* // ┌─────────┬─────┬─────┐
|
|
242
|
-
* // │ (index) │ a │ b │
|
|
243
|
-
* // ├─────────┼─────┼─────┤
|
|
244
|
-
* // │ 0 │ 1 │ 'Y' │
|
|
245
|
-
* // │ 1 │ 'Z' │ 2 │
|
|
246
|
-
* // └─────────┴─────┴─────┘
|
|
247
|
-
*
|
|
248
|
-
* console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
|
|
249
|
-
* // ┌─────────┬─────┐
|
|
250
|
-
* // │ (index) │ a │
|
|
251
|
-
* // ├─────────┼─────┤
|
|
252
|
-
* // │ 0 │ 1 │
|
|
253
|
-
* // │ 1 │ 'Z' │
|
|
254
|
-
* // └─────────┴─────┘
|
|
255
|
-
* ```
|
|
256
|
-
* @since v10.0.0
|
|
257
|
-
* @param properties Alternate properties for constructing the table.
|
|
258
|
-
*/
|
|
259
|
-
table(tabularData: any, properties?: readonly string[]): void;
|
|
260
|
-
/**
|
|
261
|
-
* Starts a timer that can be used to compute the duration of an operation. Timers
|
|
262
|
-
* are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in
|
|
263
|
-
* suitable time units to `stdout`. For example, if the elapsed
|
|
264
|
-
* time is 3869ms, `console.timeEnd()` displays "3.869s".
|
|
265
|
-
* @since v0.1.104
|
|
266
|
-
* @param [label='default']
|
|
267
|
-
*/
|
|
106
|
+
info(...data: any[]): void;
|
|
107
|
+
log(...data: any[]): void;
|
|
108
|
+
table(tabularData?: any, properties?: string[]): void;
|
|
268
109
|
time(label?: string): void;
|
|
269
|
-
/**
|
|
270
|
-
* Stops a timer that was previously started by calling {@link time} and
|
|
271
|
-
* prints the result to `stdout`:
|
|
272
|
-
*
|
|
273
|
-
* ```js
|
|
274
|
-
* console.time('bunch-of-stuff');
|
|
275
|
-
* // Do a bunch of stuff.
|
|
276
|
-
* console.timeEnd('bunch-of-stuff');
|
|
277
|
-
* // Prints: bunch-of-stuff: 225.438ms
|
|
278
|
-
* ```
|
|
279
|
-
* @since v0.1.104
|
|
280
|
-
* @param [label='default']
|
|
281
|
-
*/
|
|
282
110
|
timeEnd(label?: string): void;
|
|
283
|
-
/**
|
|
284
|
-
* For a timer that was previously started by calling {@link time}, prints
|
|
285
|
-
* the elapsed time and other `data` arguments to `stdout`:
|
|
286
|
-
*
|
|
287
|
-
* ```js
|
|
288
|
-
* console.time('process');
|
|
289
|
-
* const value = expensiveProcess1(); // Returns 42
|
|
290
|
-
* console.timeLog('process', value);
|
|
291
|
-
* // Prints "process: 365.227ms 42".
|
|
292
|
-
* doExpensiveProcess2(value);
|
|
293
|
-
* console.timeEnd('process');
|
|
294
|
-
* ```
|
|
295
|
-
* @since v10.7.0
|
|
296
|
-
* @param [label='default']
|
|
297
|
-
*/
|
|
298
111
|
timeLog(label?: string, ...data: any[]): void;
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
* formatted message and stack trace to the current position in the code.
|
|
302
|
-
*
|
|
303
|
-
* ```js
|
|
304
|
-
* console.trace('Show me');
|
|
305
|
-
* // Prints: (stack trace will vary based on where trace is called)
|
|
306
|
-
* // Trace: Show me
|
|
307
|
-
* // at repl:2:9
|
|
308
|
-
* // at REPLServer.defaultEval (repl.js:248:27)
|
|
309
|
-
* // at bound (domain.js:287:14)
|
|
310
|
-
* // at REPLServer.runBound [as eval] (domain.js:300:12)
|
|
311
|
-
* // at REPLServer.<anonymous> (repl.js:412:12)
|
|
312
|
-
* // at emitOne (events.js:82:20)
|
|
313
|
-
* // at REPLServer.emit (events.js:169:7)
|
|
314
|
-
* // at REPLServer.Interface._onLine (readline.js:210:10)
|
|
315
|
-
* // at REPLServer.Interface._line (readline.js:549:8)
|
|
316
|
-
* // at REPLServer.Interface._ttyWrite (readline.js:826:14)
|
|
317
|
-
* ```
|
|
318
|
-
* @since v0.1.104
|
|
319
|
-
*/
|
|
320
|
-
trace(message?: any, ...optionalParams: any[]): void;
|
|
321
|
-
/**
|
|
322
|
-
* The `console.warn()` function is an alias for {@link error}.
|
|
323
|
-
* @since v0.1.100
|
|
324
|
-
*/
|
|
325
|
-
warn(message?: any, ...optionalParams: any[]): void;
|
|
326
|
-
// --- Inspector mode only ---
|
|
112
|
+
trace(...data: any[]): void;
|
|
113
|
+
warn(...data: any[]): void;
|
|
327
114
|
/**
|
|
328
115
|
* This method does not display anything unless used in the inspector. The `console.profile()`
|
|
329
116
|
* method starts a JavaScript CPU profile with an optional label until {@link profileEnd}
|
|
@@ -354,100 +141,11 @@ declare module "node:console" {
|
|
|
354
141
|
*/
|
|
355
142
|
timeStamp(label?: string): void;
|
|
356
143
|
}
|
|
357
|
-
/**
|
|
358
|
-
* The `console` module provides a simple debugging console that is similar to the
|
|
359
|
-
* JavaScript console mechanism provided by web browsers.
|
|
360
|
-
*
|
|
361
|
-
* The module exports two specific components:
|
|
362
|
-
*
|
|
363
|
-
* * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream.
|
|
364
|
-
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and
|
|
365
|
-
* [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
|
|
366
|
-
*
|
|
367
|
-
* _**Warning**_: The global console object's methods are neither consistently
|
|
368
|
-
* synchronous like the browser APIs they resemble, nor are they consistently
|
|
369
|
-
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for
|
|
370
|
-
* more information.
|
|
371
|
-
*
|
|
372
|
-
* Example using the global `console`:
|
|
373
|
-
*
|
|
374
|
-
* ```js
|
|
375
|
-
* console.log('hello world');
|
|
376
|
-
* // Prints: hello world, to stdout
|
|
377
|
-
* console.log('hello %s', 'world');
|
|
378
|
-
* // Prints: hello world, to stdout
|
|
379
|
-
* console.error(new Error('Whoops, something bad happened'));
|
|
380
|
-
* // Prints error message and stack trace to stderr:
|
|
381
|
-
* // Error: Whoops, something bad happened
|
|
382
|
-
* // at [eval]:5:15
|
|
383
|
-
* // at Script.runInThisContext (node:vm:132:18)
|
|
384
|
-
* // at Object.runInThisContext (node:vm:309:38)
|
|
385
|
-
* // at node:internal/process/execution:77:19
|
|
386
|
-
* // at [eval]-wrapper:6:22
|
|
387
|
-
* // at evalScript (node:internal/process/execution:76:60)
|
|
388
|
-
* // at node:internal/main/eval_string:23:3
|
|
389
|
-
*
|
|
390
|
-
* const name = 'Will Robinson';
|
|
391
|
-
* console.warn(`Danger ${name}! Danger!`);
|
|
392
|
-
* // Prints: Danger Will Robinson! Danger!, to stderr
|
|
393
|
-
* ```
|
|
394
|
-
*
|
|
395
|
-
* Example using the `Console` class:
|
|
396
|
-
*
|
|
397
|
-
* ```js
|
|
398
|
-
* const out = getStreamSomehow();
|
|
399
|
-
* const err = getStreamSomehow();
|
|
400
|
-
* const myConsole = new console.Console(out, err);
|
|
401
|
-
*
|
|
402
|
-
* myConsole.log('hello world');
|
|
403
|
-
* // Prints: hello world, to out
|
|
404
|
-
* myConsole.log('hello %s', 'world');
|
|
405
|
-
* // Prints: hello world, to out
|
|
406
|
-
* myConsole.error(new Error('Whoops, something bad happened'));
|
|
407
|
-
* // Prints: [Error: Whoops, something bad happened], to err
|
|
408
|
-
*
|
|
409
|
-
* const name = 'Will Robinson';
|
|
410
|
-
* myConsole.warn(`Danger ${name}! Danger!`);
|
|
411
|
-
* // Prints: Danger Will Robinson! Danger!, to err
|
|
412
|
-
* ```
|
|
413
|
-
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
|
|
414
|
-
*/
|
|
415
|
-
namespace console {
|
|
416
|
-
interface ConsoleConstructorOptions {
|
|
417
|
-
stdout: NodeJS.WritableStream;
|
|
418
|
-
stderr?: NodeJS.WritableStream | undefined;
|
|
419
|
-
/**
|
|
420
|
-
* Ignore errors when writing to the underlying streams.
|
|
421
|
-
* @default true
|
|
422
|
-
*/
|
|
423
|
-
ignoreErrors?: boolean | undefined;
|
|
424
|
-
/**
|
|
425
|
-
* Set color support for this `Console` instance. Setting to true enables coloring while inspecting
|
|
426
|
-
* values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color
|
|
427
|
-
* support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the
|
|
428
|
-
* respective stream. This option can not be used, if `inspectOptions.colors` is set as well.
|
|
429
|
-
* @default auto
|
|
430
|
-
*/
|
|
431
|
-
colorMode?: boolean | "auto" | undefined;
|
|
432
|
-
/**
|
|
433
|
-
* Specifies options that are passed along to
|
|
434
|
-
* `util.inspect()`. Can be an options object or, if different options
|
|
435
|
-
* for stdout and stderr are desired, a `Map` from stream objects to options.
|
|
436
|
-
*/
|
|
437
|
-
inspectOptions?: InspectOptions | ReadonlyMap<NodeJS.WritableStream, InspectOptions> | undefined;
|
|
438
|
-
/**
|
|
439
|
-
* Set group indentation.
|
|
440
|
-
* @default 2
|
|
441
|
-
*/
|
|
442
|
-
groupIndentation?: number | undefined;
|
|
443
|
-
}
|
|
444
|
-
interface ConsoleConstructor {
|
|
445
|
-
prototype: Console;
|
|
446
|
-
new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
|
|
447
|
-
new(options: ConsoleConstructorOptions): Console;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
var console: Console;
|
|
451
144
|
}
|
|
452
|
-
|
|
145
|
+
var console: console.Console;
|
|
146
|
+
export = console;
|
|
147
|
+
}
|
|
148
|
+
declare module "console" {
|
|
149
|
+
import console = require("node:console");
|
|
150
|
+
export = console;
|
|
453
151
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* to the `constants` property exposed by the relevant module. For instance,
|
|
5
5
|
* `require('node:fs').constants` and `require('node:os').constants`.
|
|
6
6
|
*/
|
|
7
|
-
declare module "constants" {
|
|
7
|
+
declare module "node:constants" {
|
|
8
8
|
const constants:
|
|
9
9
|
& typeof import("node:os").constants.dlopen
|
|
10
10
|
& typeof import("node:os").constants.errno
|
|
@@ -14,8 +14,7 @@ declare module "constants" {
|
|
|
14
14
|
& typeof import("node:crypto").constants;
|
|
15
15
|
export = constants;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import constants = require("constants");
|
|
17
|
+
declare module "constants" {
|
|
18
|
+
import constants = require("node:constants");
|
|
20
19
|
export = constants;
|
|
21
20
|
}
|