cloudstructs 0.6.0 → 0.6.3
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/.gitattributes +1 -0
- package/.jsii +3 -3
- package/lib/codecommit-mirror/index.js +2 -2
- package/lib/ecs-service-roller/index.js +2 -2
- package/lib/email-receiver/receiver.js +1 -1
- package/lib/saml-identity-provider/index.js +2 -2
- package/lib/slack-app/manifest.js +1 -1
- package/lib/slack-app/slack-app.js +2 -2
- package/lib/slack-events/index.js +1 -1
- package/lib/slack-textract/index.js +1 -1
- package/lib/state-machine-cr-provider/index.js +1 -1
- package/lib/static-website/index.js +1 -1
- package/lib/toolkit-cleaner/index.js +1 -1
- package/lib/url-shortener/index.js +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +4 -3
- package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +22 -8
- package/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +2 -1
- package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/logger/node_modules/@types/node/path.d.ts +30 -19
- package/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +29 -0
- package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/readline/promises.d.ts +143 -0
- package/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +19 -16
- package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +187 -0
- package/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +4 -3
- package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +22 -8
- package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +2 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/path.d.ts +30 -19
- package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +29 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/readline/promises.d.ts +143 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/readline.d.ts +19 -16
- package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +187 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +4 -3
- package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +22 -8
- package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +2 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +30 -19
- package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +29 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +143 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +19 -16
- package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +187 -0
- package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +2 -2
- package/node_modules/@types/is-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/buffer.d.ts +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/is-stream/node_modules/@types/node/fs/promises.d.ts +4 -3
- package/node_modules/@types/is-stream/node_modules/@types/node/fs.d.ts +22 -8
- package/node_modules/@types/is-stream/node_modules/@types/node/http2.d.ts +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +2 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/net.d.ts +2 -2
- package/node_modules/@types/is-stream/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/is-stream/node_modules/@types/node/path.d.ts +30 -19
- package/node_modules/@types/is-stream/node_modules/@types/node/perf_hooks.d.ts +29 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/process.d.ts +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/readline/promises.d.ts +143 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/readline.d.ts +19 -16
- package/node_modules/@types/is-stream/node_modules/@types/node/util.d.ts +187 -0
- package/node_modules/@types/is-stream/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/@types/is-stream/node_modules/@types/node/worker_threads.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +4 -3
- package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +22 -8
- package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +2 -1
- package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +30 -19
- package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +29 -0
- package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +143 -0
- package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +19 -16
- package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +187 -0
- package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +4 -3
- package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +22 -8
- package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +2 -1
- package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +30 -19
- package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +29 -0
- package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +143 -0
- package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +19 -16
- package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +187 -0
- package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +2 -2
- package/package.json +8 -8
|
@@ -393,8 +393,8 @@ declare module 'events' {
|
|
|
393
393
|
* called multiple times to remove each instance.
|
|
394
394
|
*
|
|
395
395
|
* Once an event is emitted, all listeners attached to it at the
|
|
396
|
-
* time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting
|
|
397
|
-
* not remove them from`emit()` in progress. Subsequent events behave as expected.
|
|
396
|
+
* time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
|
|
397
|
+
* will not remove them from`emit()` in progress. Subsequent events behave as expected.
|
|
398
398
|
*
|
|
399
399
|
* ```js
|
|
400
400
|
* const myEmitter = new MyEmitter();
|
|
@@ -596,7 +596,7 @@ declare module 'events' {
|
|
|
596
596
|
*/
|
|
597
597
|
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
598
598
|
/**
|
|
599
|
-
* Adds a **one-time**`listener` function for the event named `eventName` to
|
|
599
|
+
* Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
|
|
600
600
|
* listener is removed, and then invoked.
|
|
601
601
|
*
|
|
602
602
|
* ```js
|
|
@@ -33,6 +33,7 @@ declare module 'fs/promises' {
|
|
|
33
33
|
WatchEventType,
|
|
34
34
|
CopyOptions,
|
|
35
35
|
ReadStream,
|
|
36
|
+
TimeLike,
|
|
36
37
|
WriteStream,
|
|
37
38
|
} from 'node:fs';
|
|
38
39
|
interface FileChangeInfo<T extends string | Buffer> {
|
|
@@ -329,7 +330,7 @@ declare module 'fs/promises' {
|
|
|
329
330
|
* Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success.
|
|
330
331
|
* @since v10.0.0
|
|
331
332
|
*/
|
|
332
|
-
utimes(atime:
|
|
333
|
+
utimes(atime: TimeLike, mtime: TimeLike): Promise<void>;
|
|
333
334
|
/**
|
|
334
335
|
* Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
|
|
335
336
|
* [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
|
|
@@ -762,7 +763,7 @@ declare module 'fs/promises' {
|
|
|
762
763
|
* @since v14.5.0, v12.19.0
|
|
763
764
|
* @return Fulfills with `undefined` upon success.
|
|
764
765
|
*/
|
|
765
|
-
function lutimes(path: PathLike, atime:
|
|
766
|
+
function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
|
|
766
767
|
/**
|
|
767
768
|
* Changes the ownership of a file.
|
|
768
769
|
* @since v10.0.0
|
|
@@ -780,7 +781,7 @@ declare module 'fs/promises' {
|
|
|
780
781
|
* @since v10.0.0
|
|
781
782
|
* @return Fulfills with `undefined` upon success.
|
|
782
783
|
*/
|
|
783
|
-
function utimes(path: PathLike, atime:
|
|
784
|
+
function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
|
|
784
785
|
/**
|
|
785
786
|
* Determines the actual location of `path` using the same semantics as the`fs.realpath.native()` function.
|
|
786
787
|
*
|
|
@@ -1395,7 +1395,7 @@ declare module 'fs' {
|
|
|
1395
1395
|
* Use `fs.rm(path, { recursive: true, force: true })` instead.
|
|
1396
1396
|
*
|
|
1397
1397
|
* If `true`, perform a recursive directory removal. In
|
|
1398
|
-
* recursive mode
|
|
1398
|
+
* recursive mode, operations are retried on failure.
|
|
1399
1399
|
* @default false
|
|
1400
1400
|
*/
|
|
1401
1401
|
recursive?: boolean | undefined;
|
|
@@ -3791,7 +3791,7 @@ declare module 'fs' {
|
|
|
3791
3791
|
export interface StatSyncOptions extends StatOptions {
|
|
3792
3792
|
throwIfNoEntry?: boolean | undefined;
|
|
3793
3793
|
}
|
|
3794
|
-
|
|
3794
|
+
interface CopyOptionsBase {
|
|
3795
3795
|
/**
|
|
3796
3796
|
* Dereference symlinks
|
|
3797
3797
|
* @default false
|
|
@@ -3803,11 +3803,6 @@ declare module 'fs' {
|
|
|
3803
3803
|
* @default false
|
|
3804
3804
|
*/
|
|
3805
3805
|
errorOnExist?: boolean;
|
|
3806
|
-
/**
|
|
3807
|
-
* Function to filter copied files/directories. Return
|
|
3808
|
-
* `true` to copy the item, `false` to ignore it.
|
|
3809
|
-
*/
|
|
3810
|
-
filter?(source: string, destination: string): boolean;
|
|
3811
3806
|
/**
|
|
3812
3807
|
* Overwrite existing file or directory. _The copy
|
|
3813
3808
|
* operation will ignore errors if you set this to false and the destination
|
|
@@ -3826,6 +3821,25 @@ declare module 'fs' {
|
|
|
3826
3821
|
* @default false
|
|
3827
3822
|
*/
|
|
3828
3823
|
recursive?: boolean;
|
|
3824
|
+
/**
|
|
3825
|
+
* When true, path resolution for symlinks will be skipped
|
|
3826
|
+
* @default false
|
|
3827
|
+
*/
|
|
3828
|
+
verbatimSymlinks?: boolean;
|
|
3829
|
+
}
|
|
3830
|
+
export interface CopyOptions extends CopyOptionsBase {
|
|
3831
|
+
/**
|
|
3832
|
+
* Function to filter copied files/directories. Return
|
|
3833
|
+
* `true` to copy the item, `false` to ignore it.
|
|
3834
|
+
*/
|
|
3835
|
+
filter?(source: string, destination: string): boolean | Promise<boolean>;
|
|
3836
|
+
}
|
|
3837
|
+
export interface CopySyncOptions extends CopyOptionsBase {
|
|
3838
|
+
/**
|
|
3839
|
+
* Function to filter copied files/directories. Return
|
|
3840
|
+
* `true` to copy the item, `false` to ignore it.
|
|
3841
|
+
*/
|
|
3842
|
+
filter?(source: string, destination: string): boolean;
|
|
3829
3843
|
}
|
|
3830
3844
|
/**
|
|
3831
3845
|
* Asynchronously copies the entire directory structure from `src` to `dest`,
|
|
@@ -3851,7 +3865,7 @@ declare module 'fs' {
|
|
|
3851
3865
|
* @param src source path to copy.
|
|
3852
3866
|
* @param dest destination path to copy to.
|
|
3853
3867
|
*/
|
|
3854
|
-
export function cpSync(source: string | URL, destination: string | URL, opts?:
|
|
3868
|
+
export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void;
|
|
3855
3869
|
}
|
|
3856
3870
|
declare module 'node:fs' {
|
|
3857
3871
|
export * from 'fs';
|
|
@@ -1642,7 +1642,7 @@ declare module 'http2' {
|
|
|
1642
1642
|
* be called multiple times to provide successive parts of the body.
|
|
1643
1643
|
*
|
|
1644
1644
|
* In the `http` module, the response body is omitted when the
|
|
1645
|
-
* request is a HEAD request. Similarly, the `204` and `304`
|
|
1645
|
+
* request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body.
|
|
1646
1646
|
*
|
|
1647
1647
|
* `chunk` can be a string or a buffer. If `chunk` is a string,
|
|
1648
1648
|
* the second parameter specifies how to encode it into a byte stream.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for non-npm package Node.js 18.
|
|
1
|
+
// Type definitions for non-npm package Node.js 18.7
|
|
2
2
|
// Project: https://nodejs.org/
|
|
3
3
|
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
|
4
4
|
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
/// <reference path="punycode.d.ts" />
|
|
109
109
|
/// <reference path="querystring.d.ts" />
|
|
110
110
|
/// <reference path="readline.d.ts" />
|
|
111
|
+
/// <reference path="readline/promises.d.ts" />
|
|
111
112
|
/// <reference path="repl.d.ts" />
|
|
112
113
|
/// <reference path="stream.d.ts" />
|
|
113
114
|
/// <reference path="stream/promises.d.ts" />
|
|
@@ -205,7 +205,7 @@ declare module 'net' {
|
|
|
205
205
|
*/
|
|
206
206
|
unref(): this;
|
|
207
207
|
/**
|
|
208
|
-
* Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket
|
|
208
|
+
* Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior).
|
|
209
209
|
* If the socket is `ref`ed calling `ref` again will have no effect.
|
|
210
210
|
* @since v0.9.1
|
|
211
211
|
* @return The socket itself.
|
|
@@ -504,7 +504,7 @@ declare module 'net' {
|
|
|
504
504
|
*/
|
|
505
505
|
getConnections(cb: (error: Error | null, count: number) => void): void;
|
|
506
506
|
/**
|
|
507
|
-
* Opposite of `unref()`, calling `ref()` on a previously `unref`ed server
|
|
507
|
+
* Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior).
|
|
508
508
|
* If the server is `ref`ed calling `ref()` again will have no effect.
|
|
509
509
|
* @since v0.9.1
|
|
510
510
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.7.3",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -220,6 +220,6 @@
|
|
|
220
220
|
},
|
|
221
221
|
"scripts": {},
|
|
222
222
|
"dependencies": {},
|
|
223
|
-
"typesPublisherContentHash": "
|
|
223
|
+
"typesPublisherContentHash": "8dea3d15b6bef937e990a6b11572d052d6b749766317804596d909c7e26211e5",
|
|
224
224
|
"typeScriptVersion": "4.0"
|
|
225
225
|
}
|
|
@@ -69,18 +69,19 @@ declare module 'path' {
|
|
|
69
69
|
* Normalize a string path, reducing '..' and '.' parts.
|
|
70
70
|
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
|
|
71
71
|
*
|
|
72
|
-
* @param
|
|
72
|
+
* @param path string path to normalize.
|
|
73
|
+
* @throws {TypeError} if `path` is not a string.
|
|
73
74
|
*/
|
|
74
|
-
normalize(
|
|
75
|
+
normalize(path: string): string;
|
|
75
76
|
/**
|
|
76
77
|
* Join all arguments together and normalize the resulting path.
|
|
77
|
-
* Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
|
|
78
78
|
*
|
|
79
79
|
* @param paths paths to join.
|
|
80
|
+
* @throws {TypeError} if any of the path segments is not a string.
|
|
80
81
|
*/
|
|
81
82
|
join(...paths: string[]): string;
|
|
82
83
|
/**
|
|
83
|
-
* The right-most parameter is considered {to}.
|
|
84
|
+
* The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
|
|
84
85
|
*
|
|
85
86
|
* Starting from leftmost {from} parameter, resolves {to} to an absolute path.
|
|
86
87
|
*
|
|
@@ -89,41 +90,50 @@ declare module 'path' {
|
|
|
89
90
|
* the current working directory is used as well. The resulting path is normalized,
|
|
90
91
|
* and trailing slashes are removed unless the path gets resolved to the root directory.
|
|
91
92
|
*
|
|
92
|
-
* @param
|
|
93
|
+
* @param paths A sequence of paths or path segments.
|
|
94
|
+
* @throws {TypeError} if any of the arguments is not a string.
|
|
93
95
|
*/
|
|
94
|
-
resolve(...
|
|
96
|
+
resolve(...paths: string[]): string;
|
|
95
97
|
/**
|
|
96
98
|
* Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
|
|
97
99
|
*
|
|
100
|
+
* If the given {path} is a zero-length string, `false` will be returned.
|
|
101
|
+
*
|
|
98
102
|
* @param path path to test.
|
|
103
|
+
* @throws {TypeError} if `path` is not a string.
|
|
99
104
|
*/
|
|
100
|
-
isAbsolute(
|
|
105
|
+
isAbsolute(path: string): boolean;
|
|
101
106
|
/**
|
|
102
|
-
* Solve the relative path from {from} to {to}.
|
|
107
|
+
* Solve the relative path from {from} to {to} based on the current working directory.
|
|
103
108
|
* At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
|
|
109
|
+
*
|
|
110
|
+
* @throws {TypeError} if either `from` or `to` is not a string.
|
|
104
111
|
*/
|
|
105
112
|
relative(from: string, to: string): string;
|
|
106
113
|
/**
|
|
107
114
|
* Return the directory name of a path. Similar to the Unix dirname command.
|
|
108
115
|
*
|
|
109
|
-
* @param
|
|
116
|
+
* @param path the path to evaluate.
|
|
117
|
+
* @throws {TypeError} if `path` is not a string.
|
|
110
118
|
*/
|
|
111
|
-
dirname(
|
|
119
|
+
dirname(path: string): string;
|
|
112
120
|
/**
|
|
113
121
|
* Return the last portion of a path. Similar to the Unix basename command.
|
|
114
122
|
* Often used to extract the file name from a fully qualified path.
|
|
115
123
|
*
|
|
116
|
-
* @param
|
|
124
|
+
* @param path the path to evaluate.
|
|
117
125
|
* @param ext optionally, an extension to remove from the result.
|
|
126
|
+
* @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
|
|
118
127
|
*/
|
|
119
|
-
basename(
|
|
128
|
+
basename(path: string, ext?: string): string;
|
|
120
129
|
/**
|
|
121
130
|
* Return the extension of the path, from the last '.' to end of string in the last portion of the path.
|
|
122
|
-
* If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
|
|
131
|
+
* If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
|
|
123
132
|
*
|
|
124
|
-
* @param
|
|
133
|
+
* @param path the path to evaluate.
|
|
134
|
+
* @throws {TypeError} if `path` is not a string.
|
|
125
135
|
*/
|
|
126
|
-
extname(
|
|
136
|
+
extname(path: string): string;
|
|
127
137
|
/**
|
|
128
138
|
* The platform-specific file separator. '\\' or '/'.
|
|
129
139
|
*/
|
|
@@ -135,15 +145,16 @@ declare module 'path' {
|
|
|
135
145
|
/**
|
|
136
146
|
* Returns an object from a path string - the opposite of format().
|
|
137
147
|
*
|
|
138
|
-
* @param
|
|
148
|
+
* @param path path to evaluate.
|
|
149
|
+
* @throws {TypeError} if `path` is not a string.
|
|
139
150
|
*/
|
|
140
|
-
parse(
|
|
151
|
+
parse(path: string): ParsedPath;
|
|
141
152
|
/**
|
|
142
153
|
* Returns a path string from an object - the opposite of parse().
|
|
143
154
|
*
|
|
144
|
-
* @param
|
|
155
|
+
* @param pathObject path to evaluate.
|
|
145
156
|
*/
|
|
146
|
-
format(
|
|
157
|
+
format(pathObject: FormatInputPathObject): string;
|
|
147
158
|
/**
|
|
148
159
|
* On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
|
|
149
160
|
* If path is not a string, path will be returned without modifications.
|
|
@@ -191,6 +191,35 @@ declare module 'perf_hooks' {
|
|
|
191
191
|
* @param name
|
|
192
192
|
*/
|
|
193
193
|
clearMarks(name?: string): void;
|
|
194
|
+
/**
|
|
195
|
+
* If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
|
|
196
|
+
* If name is provided, removes only the named measure.
|
|
197
|
+
* @param name
|
|
198
|
+
* @since v16.7.0
|
|
199
|
+
*/
|
|
200
|
+
clearMeasures(name?: string): void;
|
|
201
|
+
/**
|
|
202
|
+
* Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.
|
|
203
|
+
* If you are only interested in performance entries of certain types or that have certain names, see
|
|
204
|
+
* `performance.getEntriesByType()` and `performance.getEntriesByName()`.
|
|
205
|
+
* @since v16.7.0
|
|
206
|
+
*/
|
|
207
|
+
getEntries(): PerformanceEntry[];
|
|
208
|
+
/**
|
|
209
|
+
* Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
|
|
210
|
+
* whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`.
|
|
211
|
+
* @param name
|
|
212
|
+
* @param type
|
|
213
|
+
* @since v16.7.0
|
|
214
|
+
*/
|
|
215
|
+
getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
|
|
216
|
+
/**
|
|
217
|
+
* Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`
|
|
218
|
+
* whose `performanceEntry.entryType` is equal to `type`.
|
|
219
|
+
* @param type
|
|
220
|
+
* @since v16.7.0
|
|
221
|
+
*/
|
|
222
|
+
getEntriesByType(type: EntryType): PerformanceEntry[];
|
|
194
223
|
/**
|
|
195
224
|
* Creates a new PerformanceMark entry in the Performance Timeline.
|
|
196
225
|
* A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
|
|
@@ -590,7 +590,7 @@ declare module 'process' {
|
|
|
590
590
|
*
|
|
591
591
|
* The reason this is problematic is because writes to `process.stdout` in Node.js
|
|
592
592
|
* are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js
|
|
593
|
-
* event loop. Calling `process.exit()`, however, forces the process to
|
|
593
|
+
* event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed.
|
|
594
594
|
*
|
|
595
595
|
* Rather than calling `process.exit()` directly, the code _should_ set the`process.exitCode` and allow the process to exit naturally by avoiding
|
|
596
596
|
* scheduling any additional work for the event loop:
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `readline/promise` module provides an API for reading lines of input from a Readable stream one line at a time.
|
|
3
|
+
*
|
|
4
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline/promises.js)
|
|
5
|
+
* @since v17.0.0
|
|
6
|
+
*/
|
|
7
|
+
declare module 'readline/promises' {
|
|
8
|
+
import { Interface as _Interface, ReadLineOptions, Completer, AsyncCompleter, Direction } from 'node:readline';
|
|
9
|
+
import { Abortable } from 'node:events';
|
|
10
|
+
|
|
11
|
+
class Interface extends _Interface {
|
|
12
|
+
/**
|
|
13
|
+
* The rl.question() method displays the query by writing it to the output, waits for user input to be provided on input,
|
|
14
|
+
* then invokes the callback function passing the provided input as the first argument.
|
|
15
|
+
*
|
|
16
|
+
* When called, rl.question() will resume the input stream if it has been paused.
|
|
17
|
+
*
|
|
18
|
+
* If the readlinePromises.Interface was created with output set to null or undefined the query is not written.
|
|
19
|
+
*
|
|
20
|
+
* If the question is called after rl.close(), it returns a rejected promise.
|
|
21
|
+
*
|
|
22
|
+
* Example usage:
|
|
23
|
+
*
|
|
24
|
+
* ```js
|
|
25
|
+
* const answer = await rl.question('What is your favorite food? ');
|
|
26
|
+
* console.log(`Oh, so your favorite food is ${answer}`);
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* Using an AbortSignal to cancel a question.
|
|
30
|
+
*
|
|
31
|
+
* ```js
|
|
32
|
+
* const signal = AbortSignal.timeout(10_000);
|
|
33
|
+
*
|
|
34
|
+
* signal.addEventListener('abort', () => {
|
|
35
|
+
* console.log('The food question timed out');
|
|
36
|
+
* }, { once: true });
|
|
37
|
+
*
|
|
38
|
+
* const answer = await rl.question('What is your favorite food? ', { signal });
|
|
39
|
+
* console.log(`Oh, so your favorite food is ${answer}`);
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @since v17.0.0
|
|
43
|
+
* @param query A statement or query to write to output, prepended to the prompt.
|
|
44
|
+
*/
|
|
45
|
+
question(query: string): Promise<string>;
|
|
46
|
+
question(query: string, options: Abortable): Promise<string>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
class Readline {
|
|
50
|
+
/**
|
|
51
|
+
* @param stream A TTY stream.
|
|
52
|
+
*/
|
|
53
|
+
constructor(stream: NodeJS.WritableStream, options?: { autoCommit?: boolean });
|
|
54
|
+
/**
|
|
55
|
+
* The `rl.clearLine()` method adds to the internal list of pending action an action that clears current line of the associated `stream` in a specified direction identified by `dir`.
|
|
56
|
+
* Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
|
|
57
|
+
*/
|
|
58
|
+
clearLine(dir: Direction): this;
|
|
59
|
+
/**
|
|
60
|
+
* The `rl.clearScreenDown()` method adds to the internal list of pending action an action that clears the associated `stream` from the current position of the cursor down.
|
|
61
|
+
* Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
|
|
62
|
+
*/
|
|
63
|
+
clearScreenDown(): this;
|
|
64
|
+
/**
|
|
65
|
+
* The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions.
|
|
66
|
+
*/
|
|
67
|
+
commit(): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* The `rl.cursorTo()` method adds to the internal list of pending action an action that moves cursor to the specified position in the associated `stream`.
|
|
70
|
+
* Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
|
|
71
|
+
*/
|
|
72
|
+
cursorTo(x: number, y?: number): this;
|
|
73
|
+
/**
|
|
74
|
+
* The `rl.moveCursor()` method adds to the internal list of pending action an action that moves the cursor relative to its current position in the associated `stream`.
|
|
75
|
+
* Call `rl.commit()` to see the effect of this method, unless autoCommit: true was passed to the constructor.
|
|
76
|
+
*/
|
|
77
|
+
moveCursor(dx: number, dy: number): this;
|
|
78
|
+
/**
|
|
79
|
+
* The `rl.rollback()` method clears the internal list of pending actions without sending it to the associated `stream`.
|
|
80
|
+
*/
|
|
81
|
+
rollback(): this;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.
|
|
86
|
+
*
|
|
87
|
+
* ```js
|
|
88
|
+
* const readlinePromises = require('node:readline/promises');
|
|
89
|
+
* const rl = readlinePromises.createInterface({
|
|
90
|
+
* input: process.stdin,
|
|
91
|
+
* output: process.stdout
|
|
92
|
+
* });
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* Once the `readlinePromises.Interface` instance is created, the most common case is to listen for the `'line'` event:
|
|
96
|
+
*
|
|
97
|
+
* ```js
|
|
98
|
+
* rl.on('line', (line) => {
|
|
99
|
+
* console.log(`Received: ${line}`);
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* If `terminal` is `true` for this instance then the `output` stream will get the best compatibility if it defines an `output.columns` property,
|
|
104
|
+
* and emits a `'resize'` event on the `output`, if or when the columns ever change (`process.stdout` does this automatically when it is a TTY).
|
|
105
|
+
*
|
|
106
|
+
* ## Use of the `completer` function
|
|
107
|
+
*
|
|
108
|
+
* The `completer` function takes the current line entered by the user as an argument, and returns an `Array` with 2 entries:
|
|
109
|
+
*
|
|
110
|
+
* - An Array with matching entries for the completion.
|
|
111
|
+
* - The substring that was used for the matching.
|
|
112
|
+
*
|
|
113
|
+
* For instance: `[[substr1, substr2, ...], originalsubstring]`.
|
|
114
|
+
*
|
|
115
|
+
* ```js
|
|
116
|
+
* function completer(line) {
|
|
117
|
+
* const completions = '.help .error .exit .quit .q'.split(' ');
|
|
118
|
+
* const hits = completions.filter((c) => c.startsWith(line));
|
|
119
|
+
* // Show all completions if none found
|
|
120
|
+
* return [hits.length ? hits : completions, line];
|
|
121
|
+
* }
|
|
122
|
+
* ```
|
|
123
|
+
*
|
|
124
|
+
* The `completer` function can also returns a `Promise`, or be asynchronous:
|
|
125
|
+
*
|
|
126
|
+
* ```js
|
|
127
|
+
* async function completer(linePartial) {
|
|
128
|
+
* await someAsyncWork();
|
|
129
|
+
* return [['123'], linePartial];
|
|
130
|
+
* }
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
function createInterface(
|
|
134
|
+
input: NodeJS.ReadableStream,
|
|
135
|
+
output?: NodeJS.WritableStream,
|
|
136
|
+
completer?: Completer | AsyncCompleter,
|
|
137
|
+
terminal?: boolean,
|
|
138
|
+
): Interface;
|
|
139
|
+
function createInterface(options: ReadLineOptions): Interface;
|
|
140
|
+
}
|
|
141
|
+
declare module 'node:readline/promises' {
|
|
142
|
+
export * from 'readline/promises';
|
|
143
|
+
}
|
|
@@ -34,7 +34,10 @@
|
|
|
34
34
|
*/
|
|
35
35
|
declare module 'readline' {
|
|
36
36
|
import { Abortable, EventEmitter } from 'node:events';
|
|
37
|
-
|
|
37
|
+
import * as promises from 'node:readline/promises';
|
|
38
|
+
|
|
39
|
+
export { promises };
|
|
40
|
+
export interface Key {
|
|
38
41
|
sequence?: string | undefined;
|
|
39
42
|
name?: string | undefined;
|
|
40
43
|
ctrl?: boolean | undefined;
|
|
@@ -48,7 +51,7 @@ declare module 'readline' {
|
|
|
48
51
|
* and is read from, the `input` stream.
|
|
49
52
|
* @since v0.1.104
|
|
50
53
|
*/
|
|
51
|
-
class Interface extends EventEmitter {
|
|
54
|
+
export class Interface extends EventEmitter {
|
|
52
55
|
readonly terminal: boolean;
|
|
53
56
|
/**
|
|
54
57
|
* The current input data being processed by node.
|
|
@@ -315,11 +318,11 @@ declare module 'readline' {
|
|
|
315
318
|
prependOnceListener(event: 'history', listener: (history: string[]) => void): this;
|
|
316
319
|
[Symbol.asyncIterator](): AsyncIterableIterator<string>;
|
|
317
320
|
}
|
|
318
|
-
type ReadLine = Interface; // type forwarded for backwards compatibility
|
|
319
|
-
type Completer = (line: string) => CompleterResult;
|
|
320
|
-
type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void;
|
|
321
|
-
type CompleterResult = [string[], string];
|
|
322
|
-
interface ReadLineOptions {
|
|
321
|
+
export type ReadLine = Interface; // type forwarded for backwards compatibility
|
|
322
|
+
export type Completer = (line: string) => CompleterResult;
|
|
323
|
+
export type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => void;
|
|
324
|
+
export type CompleterResult = [string[], string];
|
|
325
|
+
export interface ReadLineOptions {
|
|
323
326
|
input: NodeJS.ReadableStream;
|
|
324
327
|
output?: NodeJS.WritableStream | undefined;
|
|
325
328
|
completer?: Completer | AsyncCompleter | undefined;
|
|
@@ -380,8 +383,8 @@ declare module 'readline' {
|
|
|
380
383
|
* ```
|
|
381
384
|
* @since v0.1.98
|
|
382
385
|
*/
|
|
383
|
-
function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
|
|
384
|
-
function createInterface(options: ReadLineOptions): Interface;
|
|
386
|
+
export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
|
|
387
|
+
export function createInterface(options: ReadLineOptions): Interface;
|
|
385
388
|
/**
|
|
386
389
|
* The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
|
|
387
390
|
*
|
|
@@ -503,9 +506,9 @@ declare module 'readline' {
|
|
|
503
506
|
* ```
|
|
504
507
|
* @since v0.7.7
|
|
505
508
|
*/
|
|
506
|
-
function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
|
|
507
|
-
type Direction = -1 | 0 | 1;
|
|
508
|
-
interface CursorPos {
|
|
509
|
+
export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
|
|
510
|
+
export type Direction = -1 | 0 | 1;
|
|
511
|
+
export interface CursorPos {
|
|
509
512
|
rows: number;
|
|
510
513
|
cols: number;
|
|
511
514
|
}
|
|
@@ -516,7 +519,7 @@ declare module 'readline' {
|
|
|
516
519
|
* @param callback Invoked once the operation completes.
|
|
517
520
|
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
|
518
521
|
*/
|
|
519
|
-
function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
|
|
522
|
+
export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
|
|
520
523
|
/**
|
|
521
524
|
* The `readline.clearScreenDown()` method clears the given `TTY` stream from
|
|
522
525
|
* the current position of the cursor down.
|
|
@@ -524,7 +527,7 @@ declare module 'readline' {
|
|
|
524
527
|
* @param callback Invoked once the operation completes.
|
|
525
528
|
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
|
526
529
|
*/
|
|
527
|
-
function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
|
|
530
|
+
export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
|
|
528
531
|
/**
|
|
529
532
|
* The `readline.cursorTo()` method moves cursor to the specified position in a
|
|
530
533
|
* given `TTY` `stream`.
|
|
@@ -532,7 +535,7 @@ declare module 'readline' {
|
|
|
532
535
|
* @param callback Invoked once the operation completes.
|
|
533
536
|
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
|
534
537
|
*/
|
|
535
|
-
function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
|
|
538
|
+
export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
|
|
536
539
|
/**
|
|
537
540
|
* The `readline.moveCursor()` method moves the cursor _relative_ to its current
|
|
538
541
|
* position in a given `TTY` `stream`.
|
|
@@ -643,7 +646,7 @@ declare module 'readline' {
|
|
|
643
646
|
* @param callback Invoked once the operation completes.
|
|
644
647
|
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
|
645
648
|
*/
|
|
646
|
-
function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
|
|
649
|
+
export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
|
|
647
650
|
}
|
|
648
651
|
declare module 'node:readline' {
|
|
649
652
|
export * from 'readline';
|