@emulsify/cli 1.4.2 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/handlers/componentInstall.js +8 -4
- package/dist/handlers/init.js +1 -1
- package/dist/handlers/systemInstall.js +3 -2
- package/dist/index.js +1 -0
- package/dist/node_modules/.package-lock.json +19 -28
- package/dist/node_modules/@types/node/README.md +3 -3
- package/dist/node_modules/@types/node/async_hooks.d.ts +1 -1
- package/dist/node_modules/@types/node/buffer.d.ts +64 -0
- package/dist/node_modules/@types/node/crypto.d.ts +28 -4
- package/dist/node_modules/@types/node/globals.d.ts +141 -8
- package/dist/node_modules/@types/node/http.d.ts +3 -1
- package/dist/node_modules/@types/node/http2.d.ts +4 -3
- package/dist/node_modules/@types/node/index.d.ts +0 -1
- package/dist/node_modules/@types/node/inspector.d.ts +1 -1
- package/dist/node_modules/@types/node/net.d.ts +15 -3
- package/dist/node_modules/@types/node/package.json +3 -8
- package/dist/node_modules/@types/node/process.d.ts +1 -1
- package/dist/node_modules/@types/node/stream.d.ts +8 -8
- package/dist/node_modules/@types/node/timers.d.ts +3 -3
- package/dist/node_modules/@types/node/tls.d.ts +2 -1
- package/dist/node_modules/@types/node/url.d.ts +31 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/README.md +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.d.ts +1 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js +9 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js +8 -9
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/parse.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/serialize.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.d.ts +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.js +3 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/ref_error.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.d.ts +5 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js +13 -11
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.d.ts +4 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.js +20 -17
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js +6 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.js.map +1 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/standalone/index.js +8 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/standalone/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/index.d.ts +6 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/jtd-schema.d.ts +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/ref.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js +10 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/ref.js +3 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js +4 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/codegen/code.ts +8 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/index.ts +8 -8
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/jtd/parse.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/jtd/serialize.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/ref_error.ts +4 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/resolve.ts +15 -12
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/validate/index.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/core.ts +9 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/runtime/uri.ts +6 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/standalone/index.ts +9 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/index.ts +7 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/json-schema.ts +1 -4
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/jtd-schema.ts +4 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/core/ref.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/discriminator/index.ts +11 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/jtd/ref.ts +3 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/validation/enum.ts +5 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/package.json +5 -3
- package/dist/node_modules/debug/README.md +3 -0
- package/dist/node_modules/debug/package.json +1 -1
- package/dist/node_modules/debug/src/common.js +1 -1
- package/dist/node_modules/fs-extra/README.md +3 -5
- package/dist/node_modules/fs-extra/lib/{copy-sync → copy}/copy-sync.js +11 -8
- package/dist/node_modules/fs-extra/lib/copy/copy.js +12 -9
- package/dist/node_modules/fs-extra/lib/copy/index.js +2 -1
- package/dist/node_modules/fs-extra/lib/empty/index.js +10 -19
- package/dist/node_modules/fs-extra/lib/ensure/index.js +15 -15
- package/dist/node_modules/fs-extra/lib/ensure/link.js +10 -7
- package/dist/node_modules/fs-extra/lib/ensure/symlink.js +34 -15
- package/dist/node_modules/fs-extra/lib/fs/index.js +8 -10
- package/dist/node_modules/fs-extra/lib/index.js +1 -12
- package/dist/node_modules/fs-extra/lib/json/output-json-sync.js +1 -1
- package/dist/node_modules/fs-extra/lib/json/output-json.js +1 -1
- package/dist/node_modules/fs-extra/lib/mkdirs/make-dir.js +16 -130
- package/dist/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/dist/node_modules/fs-extra/lib/move/index.js +2 -1
- package/dist/node_modules/fs-extra/lib/{move-sync → move}/move-sync.js +12 -5
- package/dist/node_modules/fs-extra/lib/move/move.js +14 -4
- package/dist/node_modules/fs-extra/lib/{output → output-file}/index.js +0 -0
- package/dist/node_modules/fs-extra/lib/remove/index.js +15 -2
- package/dist/node_modules/fs-extra/lib/util/stat.js +60 -45
- package/dist/node_modules/fs-extra/package.json +7 -10
- package/dist/node_modules/graceful-fs/LICENSE +1 -1
- package/dist/node_modules/graceful-fs/graceful-fs.js +23 -4
- package/dist/node_modules/graceful-fs/package.json +1 -1
- package/dist/node_modules/graceful-fs/polyfills.js +39 -30
- package/dist/node_modules/ramda/dist/ramda.js +4 -4
- package/dist/node_modules/ramda/dist/ramda.min.js +1 -1
- package/dist/node_modules/ramda/es/trim.js +1 -1
- package/dist/node_modules/ramda/package.json +1 -1
- package/dist/node_modules/ramda/src/trim.js +1 -1
- package/dist/package.json +4 -4
- package/dist/schemas/variant.json +28 -5
- package/dist/util/cache/cloneIntoCache.js +1 -7
- package/dist/util/getAvailableStarters.js +1 -1
- package/dist/util/platform/getInitSuccessMessageForPlatform.js +4 -3
- package/dist/util/project/buildComponentDependencyList.js +20 -0
- package/package.json +5 -5
- package/dist/node_modules/at-least-node/LICENSE +0 -6
- package/dist/node_modules/at-least-node/README.md +0 -25
- package/dist/node_modules/at-least-node/index.js +0 -5
- package/dist/node_modules/at-least-node/package.json +0 -32
- package/dist/node_modules/fs-extra/CHANGELOG.md +0 -902
- package/dist/node_modules/fs-extra/lib/copy-sync/index.js +0 -5
- package/dist/node_modules/fs-extra/lib/move-sync/index.js +0 -5
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ npm install -g @emulsify/cli
|
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
|
-
For more information on how to use emulsify-cli, please see the [usage documentation](
|
|
15
|
+
For more information on how to use emulsify-cli, please see the [usage documentation](https://docs.emulsify.info/supporting-projects/emulsify-cli/emulsify-cli-usage).
|
|
16
16
|
|
|
17
17
|
## Development
|
|
18
18
|
|
|
@@ -44,3 +44,7 @@ Emulsify-cli is developed using TypeScript. You can find all of the source files
|
|
|
44
44
|
- `npm run test`: runs Jest on the codebase. You can specify a path to a single test, and add any flags supported by Jest's CLI.
|
|
45
45
|
- `npm run type`: uses typescript to check all type signatures.
|
|
46
46
|
- `npm run twatch`: runs Jest without coverage, in verbose and watch mode. This is useful for running a single test during active development.
|
|
47
|
+
|
|
48
|
+
## Deployment
|
|
49
|
+
|
|
50
|
+
This project is automatically built and deployed to NPM via a GitHub Actions workflow. In order to deploy changes merged into the `develop` branch, simply merge `develop` into `main`, and call it a day.
|
|
@@ -9,6 +9,7 @@ const getGitRepoNameFromUrl_1 = __importDefault(require("../util/getGitRepoNameF
|
|
|
9
9
|
const getEmulsifyConfig_1 = __importDefault(require("../util/project/getEmulsifyConfig"));
|
|
10
10
|
const getJsonFromCachedFile_1 = __importDefault(require("../util/cache/getJsonFromCachedFile"));
|
|
11
11
|
const installComponentFromCache_1 = __importDefault(require("../util/project/installComponentFromCache"));
|
|
12
|
+
const buildComponentDependencyList_1 = __importDefault(require("../util/project/buildComponentDependencyList"));
|
|
12
13
|
const cloneIntoCache_1 = __importDefault(require("../util/cache/cloneIntoCache"));
|
|
13
14
|
const catchLater_1 = __importDefault(require("../util/catchLater"));
|
|
14
15
|
async function componentInstall(name, { force, all }) {
|
|
@@ -50,10 +51,13 @@ async function componentInstall(name, { force, all }) {
|
|
|
50
51
|
]));
|
|
51
52
|
}
|
|
52
53
|
else {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
const componentsWithDependencies = (0, buildComponentDependencyList_1.default)(variantConf.components, name);
|
|
55
|
+
componentsWithDependencies.forEach((componentName) => {
|
|
56
|
+
components.push([
|
|
57
|
+
componentName,
|
|
58
|
+
(0, catchLater_1.default)((0, installComponentFromCache_1.default)(systemConf, variantConf, componentName, force)),
|
|
59
|
+
]);
|
|
60
|
+
});
|
|
57
61
|
}
|
|
58
62
|
for (const [cname, promise] of components) {
|
|
59
63
|
try {
|
package/dist/handlers/init.js
CHANGED
|
@@ -75,7 +75,7 @@ function init(progress) {
|
|
|
75
75
|
message: 'init script executed, initialization complete',
|
|
76
76
|
});
|
|
77
77
|
(0, log_1.default)('success', `Created an Emulsify project in ${target}.`);
|
|
78
|
-
(0, getInitSuccessMessageForPlatform_1.default)(platformName).map(({ method, message }) => (0, log_1.default)(method, message));
|
|
78
|
+
(0, getInitSuccessMessageForPlatform_1.default)(platformName, target).map(({ method, message }) => (0, log_1.default)(method, message));
|
|
79
79
|
}
|
|
80
80
|
catch (e) {
|
|
81
81
|
(0, log_1.default)('error', `Unable to pull down ${repository}: ${String(e)}`, constants_2.EXIT_ERROR);
|
|
@@ -109,8 +109,9 @@ async function systemInstall(name, options) {
|
|
|
109
109
|
return (0, log_1.default)('error', 'Unable to update your Emulsify project configuration.', constants_1.EXIT_ERROR);
|
|
110
110
|
}
|
|
111
111
|
try {
|
|
112
|
-
const
|
|
113
|
-
|
|
112
|
+
const componentsList = variantConf.components;
|
|
113
|
+
const requiredComponents = componentsList.filter(({ required }) => required === true);
|
|
114
|
+
for (const component of options.all ? componentsList : requiredComponents) {
|
|
114
115
|
await (0, installComponentFromCache_1.default)(systemConf, variantConf, component.name, true);
|
|
115
116
|
}
|
|
116
117
|
await (0, installGeneralAssetsFromCache_1.default)(systemConf, variantConf);
|
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ system
|
|
|
34
34
|
.command('install [name]')
|
|
35
35
|
.option('-r --repository <repository>', 'Git repository containing the system you would like to install')
|
|
36
36
|
.option('-c --checkout <commit/branch/tag>', 'Commit, branch or tag of the base repository that should be checked out. MUST be provided if you are passing along a repository (-r or --repository). Tags or commit hashes are strongly preferable, because you want to ensure that you are using the same version of the system every time you install components, etc')
|
|
37
|
+
.option('-a --all', 'Use this to install all available components within the specified system. Without this flag, only the required system components will be installed.')
|
|
37
38
|
.description('Install a system within an Emulsify project. You must specify either the name of an out-of-the-box system (such as compound), or a link to a git repository containing the system you want to install', {
|
|
38
39
|
name: 'Name of the out-of-the-box system you would like to install',
|
|
39
40
|
})
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw=="
|
|
19
19
|
},
|
|
20
20
|
"node_modules/@types/node": {
|
|
21
|
-
"version": "14.18.
|
|
22
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.
|
|
23
|
-
"integrity": "sha512-
|
|
21
|
+
"version": "14.18.18",
|
|
22
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.18.tgz",
|
|
23
|
+
"integrity": "sha512-B9EoJFjhqcQ9OmQrNorItO+OwEOORNn3S31WuiHvZY/dm9ajkB7AKD/8toessEtHHNL+58jofbq7hMMY9v4yig=="
|
|
24
24
|
},
|
|
25
25
|
"node_modules/@types/progress": {
|
|
26
26
|
"version": "2.0.5",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"node_modules/ajv-formats/node_modules/ajv": {
|
|
65
|
-
"version": "8.
|
|
66
|
-
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.
|
|
67
|
-
"integrity": "sha512-
|
|
65
|
+
"version": "8.11.0",
|
|
66
|
+
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz",
|
|
67
|
+
"integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"fast-deep-equal": "^3.1.1",
|
|
70
70
|
"json-schema-traverse": "^1.0.0",
|
|
@@ -90,14 +90,6 @@
|
|
|
90
90
|
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
|
-
"node_modules/at-least-node": {
|
|
94
|
-
"version": "1.0.0",
|
|
95
|
-
"resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
|
|
96
|
-
"integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==",
|
|
97
|
-
"engines": {
|
|
98
|
-
"node": ">= 4.0.0"
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
93
|
"node_modules/chalk": {
|
|
102
94
|
"version": "4.1.2",
|
|
103
95
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
@@ -143,9 +135,9 @@
|
|
|
143
135
|
"integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw=="
|
|
144
136
|
},
|
|
145
137
|
"node_modules/debug": {
|
|
146
|
-
"version": "4.3.
|
|
147
|
-
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.
|
|
148
|
-
"integrity": "sha512
|
|
138
|
+
"version": "4.3.4",
|
|
139
|
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
|
140
|
+
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
|
149
141
|
"dependencies": {
|
|
150
142
|
"ms": "2.1.2"
|
|
151
143
|
},
|
|
@@ -164,23 +156,22 @@
|
|
|
164
156
|
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
|
165
157
|
},
|
|
166
158
|
"node_modules/fs-extra": {
|
|
167
|
-
"version": "
|
|
168
|
-
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-
|
|
169
|
-
"integrity": "sha512-
|
|
159
|
+
"version": "10.1.0",
|
|
160
|
+
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
|
|
161
|
+
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
|
|
170
162
|
"dependencies": {
|
|
171
|
-
"at-least-node": "^1.0.0",
|
|
172
163
|
"graceful-fs": "^4.2.0",
|
|
173
164
|
"jsonfile": "^6.0.1",
|
|
174
165
|
"universalify": "^2.0.0"
|
|
175
166
|
},
|
|
176
167
|
"engines": {
|
|
177
|
-
"node": ">=
|
|
168
|
+
"node": ">=12"
|
|
178
169
|
}
|
|
179
170
|
},
|
|
180
171
|
"node_modules/graceful-fs": {
|
|
181
|
-
"version": "4.2.
|
|
182
|
-
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.
|
|
183
|
-
"integrity": "sha512-
|
|
172
|
+
"version": "4.2.10",
|
|
173
|
+
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
|
|
174
|
+
"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
|
|
184
175
|
},
|
|
185
176
|
"node_modules/has-flag": {
|
|
186
177
|
"version": "4.0.0",
|
|
@@ -228,9 +219,9 @@
|
|
|
228
219
|
}
|
|
229
220
|
},
|
|
230
221
|
"node_modules/ramda": {
|
|
231
|
-
"version": "0.27.
|
|
232
|
-
"resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.
|
|
233
|
-
"integrity": "sha512-
|
|
222
|
+
"version": "0.27.2",
|
|
223
|
+
"resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.2.tgz",
|
|
224
|
+
"integrity": "sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA=="
|
|
234
225
|
},
|
|
235
226
|
"node_modules/require-from-string": {
|
|
236
227
|
"version": "2.0.2",
|
|
@@ -8,9 +8,9 @@ This package contains type definitions for Node.js (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v14.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 12 May 2022 21:31:47 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
|
-
* Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
13
|
+
* Global values: `AbortController`, `AbortSignal`, `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
16
|
-
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Seth Westphal](https://github.com/westy92), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [
|
|
16
|
+
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Seth Westphal](https://github.com/westy92), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [Bond](https://github.com/bondz), and [Linus Unnebäck](https://github.com/LinusU).
|
|
@@ -111,7 +111,7 @@ declare module 'async_hooks' {
|
|
|
111
111
|
* @param type The type of async event.
|
|
112
112
|
* @param triggerAsyncId The ID of the execution context that created
|
|
113
113
|
* this async event (default: `executionAsyncId()`), or an
|
|
114
|
-
* AsyncResourceOptions object (since
|
|
114
|
+
* AsyncResourceOptions object (since v9.3.0)
|
|
115
115
|
*/
|
|
116
116
|
constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
|
|
117
117
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare module 'buffer' {
|
|
2
|
+
import { BinaryLike } from 'node:crypto';
|
|
2
3
|
export const INSPECT_MAX_BYTES: number;
|
|
3
4
|
export const kMaxLength: number;
|
|
4
5
|
export const kStringMaxLength: number;
|
|
@@ -17,6 +18,69 @@ declare module 'buffer' {
|
|
|
17
18
|
new(size: number): Buffer;
|
|
18
19
|
prototype: Buffer;
|
|
19
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* @experimental
|
|
23
|
+
*/
|
|
24
|
+
export interface BlobOptions {
|
|
25
|
+
/**
|
|
26
|
+
* @default 'utf8'
|
|
27
|
+
*/
|
|
28
|
+
encoding?: BufferEncoding | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The Blob content-type. The intent is for `type` to convey
|
|
31
|
+
* the MIME media type of the data, however no validation of the type format
|
|
32
|
+
* is performed.
|
|
33
|
+
*/
|
|
34
|
+
type?: string | undefined;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
|
|
38
|
+
* multiple worker threads.
|
|
39
|
+
* @since v14.18.0
|
|
40
|
+
* @experimental
|
|
41
|
+
*/
|
|
42
|
+
export class Blob {
|
|
43
|
+
/**
|
|
44
|
+
* The total size of the `Blob` in bytes.
|
|
45
|
+
* @since v14.18.0
|
|
46
|
+
*/
|
|
47
|
+
readonly size: number;
|
|
48
|
+
/**
|
|
49
|
+
* The content-type of the `Blob`.
|
|
50
|
+
* @since v14.18.0
|
|
51
|
+
*/
|
|
52
|
+
readonly type: string;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a new `Blob` object containing a concatenation of the given sources.
|
|
55
|
+
*
|
|
56
|
+
* {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
|
|
57
|
+
* the 'Blob' and can therefore be safely modified after the 'Blob' is created.
|
|
58
|
+
*
|
|
59
|
+
* String sources are also copied into the `Blob`.
|
|
60
|
+
*/
|
|
61
|
+
constructor(sources: Array<BinaryLike | Blob>, options?: BlobOptions);
|
|
62
|
+
/**
|
|
63
|
+
* Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
|
|
64
|
+
* the `Blob` data.
|
|
65
|
+
* @since v14.18.0
|
|
66
|
+
*/
|
|
67
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
68
|
+
/**
|
|
69
|
+
* Creates and returns a new `Blob` containing a subset of this `Blob` objects
|
|
70
|
+
* data. The original `Blob` is not altered.
|
|
71
|
+
* @since v14.18.0
|
|
72
|
+
* @param start The starting index.
|
|
73
|
+
* @param end The ending index.
|
|
74
|
+
* @param type The content-type for the new `Blob`
|
|
75
|
+
*/
|
|
76
|
+
slice(start?: number, end?: number, type?: string): Blob;
|
|
77
|
+
/**
|
|
78
|
+
* Returns a promise that fulfills with the contents of the `Blob` decoded as a
|
|
79
|
+
* UTF-8 string.
|
|
80
|
+
* @since v14.18.0
|
|
81
|
+
*/
|
|
82
|
+
text(): Promise<string>;
|
|
83
|
+
}
|
|
20
84
|
|
|
21
85
|
export { BuffType as Buffer };
|
|
22
86
|
}
|
|
@@ -189,6 +189,7 @@ declare module 'crypto' {
|
|
|
189
189
|
|
|
190
190
|
type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
|
|
191
191
|
type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
|
|
192
|
+
type CipherOCBTypes = 'aes-128-ocb' | 'aes-192-ocb' | 'aes-256-ocb';
|
|
192
193
|
|
|
193
194
|
type BinaryLike = string | NodeJS.ArrayBufferView;
|
|
194
195
|
|
|
@@ -200,6 +201,9 @@ declare module 'crypto' {
|
|
|
200
201
|
interface CipherGCMOptions extends stream.TransformOptions {
|
|
201
202
|
authTagLength?: number | undefined;
|
|
202
203
|
}
|
|
204
|
+
interface CipherOCBOptions extends stream.TransformOptions {
|
|
205
|
+
authTagLength: number;
|
|
206
|
+
}
|
|
203
207
|
/** @deprecated since v10.0.0 use `createCipheriv()` */
|
|
204
208
|
function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
|
|
205
209
|
/** @deprecated since v10.0.0 use `createCipheriv()` */
|
|
@@ -210,13 +214,19 @@ declare module 'crypto' {
|
|
|
210
214
|
function createCipheriv(
|
|
211
215
|
algorithm: CipherCCMTypes,
|
|
212
216
|
key: CipherKey,
|
|
213
|
-
iv: BinaryLike
|
|
217
|
+
iv: BinaryLike,
|
|
214
218
|
options: CipherCCMOptions,
|
|
215
219
|
): CipherCCM;
|
|
220
|
+
function createCipheriv(
|
|
221
|
+
algorithm: CipherOCBTypes,
|
|
222
|
+
key: CipherKey,
|
|
223
|
+
iv: BinaryLike,
|
|
224
|
+
options: CipherOCBOptions,
|
|
225
|
+
): CipherOCB;
|
|
216
226
|
function createCipheriv(
|
|
217
227
|
algorithm: CipherGCMTypes,
|
|
218
228
|
key: CipherKey,
|
|
219
|
-
iv: BinaryLike
|
|
229
|
+
iv: BinaryLike,
|
|
220
230
|
options?: CipherGCMOptions,
|
|
221
231
|
): CipherGCM;
|
|
222
232
|
function createCipheriv(
|
|
@@ -246,6 +256,10 @@ declare module 'crypto' {
|
|
|
246
256
|
setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
247
257
|
getAuthTag(): Buffer;
|
|
248
258
|
}
|
|
259
|
+
interface CipherOCB extends Cipher {
|
|
260
|
+
setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
261
|
+
getAuthTag(): Buffer;
|
|
262
|
+
}
|
|
249
263
|
/** @deprecated since v10.0.0 use `createDecipheriv()` */
|
|
250
264
|
function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
|
|
251
265
|
/** @deprecated since v10.0.0 use `createDecipheriv()` */
|
|
@@ -256,13 +270,19 @@ declare module 'crypto' {
|
|
|
256
270
|
function createDecipheriv(
|
|
257
271
|
algorithm: CipherCCMTypes,
|
|
258
272
|
key: CipherKey,
|
|
259
|
-
iv: BinaryLike
|
|
273
|
+
iv: BinaryLike,
|
|
260
274
|
options: CipherCCMOptions,
|
|
261
275
|
): DecipherCCM;
|
|
276
|
+
function createDecipheriv(
|
|
277
|
+
algorithm: CipherOCBTypes,
|
|
278
|
+
key: CipherKey,
|
|
279
|
+
iv: BinaryLike,
|
|
280
|
+
options: CipherOCBOptions,
|
|
281
|
+
): DecipherOCB;
|
|
262
282
|
function createDecipheriv(
|
|
263
283
|
algorithm: CipherGCMTypes,
|
|
264
284
|
key: CipherKey,
|
|
265
|
-
iv: BinaryLike
|
|
285
|
+
iv: BinaryLike,
|
|
266
286
|
options?: CipherGCMOptions,
|
|
267
287
|
): DecipherGCM;
|
|
268
288
|
function createDecipheriv(
|
|
@@ -292,6 +312,10 @@ declare module 'crypto' {
|
|
|
292
312
|
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
|
293
313
|
setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
294
314
|
}
|
|
315
|
+
interface DecipherOCB extends Decipher {
|
|
316
|
+
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
|
317
|
+
setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
318
|
+
}
|
|
295
319
|
|
|
296
320
|
interface PrivateKeyInput {
|
|
297
321
|
key: string | Buffer;
|
|
@@ -52,15 +52,15 @@ declare namespace setTimeout {
|
|
|
52
52
|
function __promisify__(ms: number): Promise<void>;
|
|
53
53
|
function __promisify__<T>(ms: number, value: T): Promise<T>;
|
|
54
54
|
}
|
|
55
|
-
declare function clearTimeout(timeoutId: NodeJS.Timeout): void;
|
|
55
|
+
declare function clearTimeout(timeoutId: NodeJS.Timeout | undefined): void;
|
|
56
56
|
declare function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
|
|
57
|
-
declare function clearInterval(intervalId: NodeJS.Timeout): void;
|
|
57
|
+
declare function clearInterval(intervalId: NodeJS.Timeout | undefined): void;
|
|
58
58
|
declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
|
|
59
59
|
declare namespace setImmediate {
|
|
60
60
|
function __promisify__(): Promise<void>;
|
|
61
61
|
function __promisify__<T>(value: T): Promise<T>;
|
|
62
62
|
}
|
|
63
|
-
declare function clearImmediate(immediateId: NodeJS.Immediate): void;
|
|
63
|
+
declare function clearImmediate(immediateId: NodeJS.Immediate | undefined): void;
|
|
64
64
|
|
|
65
65
|
declare function queueMicrotask(callback: () => void): void;
|
|
66
66
|
|
|
@@ -75,6 +75,49 @@ type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2"
|
|
|
75
75
|
|
|
76
76
|
type WithImplicitCoercion<T> = T | { valueOf(): T };
|
|
77
77
|
|
|
78
|
+
//#region borrowed
|
|
79
|
+
// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
|
|
80
|
+
/**
|
|
81
|
+
* A controller object that allows you to abort one or more DOM requests as and when desired.
|
|
82
|
+
* @since v14.7.0
|
|
83
|
+
*/
|
|
84
|
+
interface AbortController {
|
|
85
|
+
/**
|
|
86
|
+
* Returns the AbortSignal object associated with this object.
|
|
87
|
+
* @since v14.7.0
|
|
88
|
+
*/
|
|
89
|
+
readonly signal: AbortSignal;
|
|
90
|
+
/**
|
|
91
|
+
* Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
|
|
92
|
+
* @since v14.7.0
|
|
93
|
+
*/
|
|
94
|
+
abort(): void;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
|
|
99
|
+
* @since v14.7.0
|
|
100
|
+
*/
|
|
101
|
+
interface AbortSignal {
|
|
102
|
+
/**
|
|
103
|
+
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
104
|
+
* @since v14.7.0
|
|
105
|
+
*/
|
|
106
|
+
readonly aborted: boolean;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
declare var AbortController: {
|
|
110
|
+
prototype: AbortController;
|
|
111
|
+
new(): AbortController;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
declare var AbortSignal: {
|
|
115
|
+
prototype: AbortSignal;
|
|
116
|
+
new(): AbortSignal;
|
|
117
|
+
// TODO: Add abort() static
|
|
118
|
+
};
|
|
119
|
+
//#endregion borrowed
|
|
120
|
+
|
|
78
121
|
/**
|
|
79
122
|
* Raw data is stored in instances of the Buffer class.
|
|
80
123
|
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
|
|
@@ -255,24 +298,89 @@ declare class Buffer extends Uint8Array {
|
|
|
255
298
|
writeBigInt64BE(value: bigint, offset?: number): number;
|
|
256
299
|
writeBigInt64LE(value: bigint, offset?: number): number;
|
|
257
300
|
writeBigUInt64BE(value: bigint, offset?: number): number;
|
|
301
|
+
/**
|
|
302
|
+
* @alias Buffer.writeBigUInt64BE
|
|
303
|
+
* @since v14.10.0, v12.19.0
|
|
304
|
+
*/
|
|
305
|
+
writeBigUint64BE(value: bigint, offset?: number): number;
|
|
258
306
|
writeBigUInt64LE(value: bigint, offset?: number): number;
|
|
307
|
+
/**
|
|
308
|
+
* @alias Buffer.writeBigUInt64LE
|
|
309
|
+
* @since v14.10.0, v12.19.0
|
|
310
|
+
*/
|
|
311
|
+
writeBigUint64LE(value: bigint, offset?: number): number;
|
|
259
312
|
writeUIntLE(value: number, offset: number, byteLength: number): number;
|
|
313
|
+
/**
|
|
314
|
+
* @alias Buffer.writeUIntLE
|
|
315
|
+
* @since v14.9.0, v12.19.0
|
|
316
|
+
*/
|
|
317
|
+
writeUintLE(value: number, offset: number, byteLength: number): number;
|
|
260
318
|
writeUIntBE(value: number, offset: number, byteLength: number): number;
|
|
319
|
+
/**
|
|
320
|
+
* @alias Buffer.writeUIntBE
|
|
321
|
+
* @since v14.9.0, v12.19.0
|
|
322
|
+
*/
|
|
323
|
+
writeUintBE(value: number, offset: number, byteLength: number): number;
|
|
261
324
|
writeIntLE(value: number, offset: number, byteLength: number): number;
|
|
262
325
|
writeIntBE(value: number, offset: number, byteLength: number): number;
|
|
263
326
|
readBigUInt64BE(offset?: number): bigint;
|
|
327
|
+
/**
|
|
328
|
+
* @alias Buffer.readBigUInt64BE
|
|
329
|
+
* @since v14.10.0, v12.19.0
|
|
330
|
+
*/
|
|
331
|
+
readBigUint64BE(offset?: number): bigint;
|
|
264
332
|
readBigUInt64LE(offset?: number): bigint;
|
|
333
|
+
/**
|
|
334
|
+
* @alias Buffer.readBigUInt64LE
|
|
335
|
+
* @since v14.10.0, v12.19.0
|
|
336
|
+
*/
|
|
337
|
+
readBigUint64LE(offset?: number): bigint;
|
|
265
338
|
readBigInt64BE(offset?: number): bigint;
|
|
266
339
|
readBigInt64LE(offset?: number): bigint;
|
|
267
340
|
readUIntLE(offset: number, byteLength: number): number;
|
|
341
|
+
/**
|
|
342
|
+
* @alias Buffer.readUIntLE
|
|
343
|
+
* @since v14.9.0, v12.19.0
|
|
344
|
+
*/
|
|
345
|
+
readUintLE(offset: number, byteLength: number): number;
|
|
268
346
|
readUIntBE(offset: number, byteLength: number): number;
|
|
347
|
+
/**
|
|
348
|
+
* @alias Buffer.readUIntBE
|
|
349
|
+
* @since v14.9.0, v12.19.0
|
|
350
|
+
*/
|
|
351
|
+
readUintBE(offset: number, byteLength: number): number;
|
|
269
352
|
readIntLE(offset: number, byteLength: number): number;
|
|
270
353
|
readIntBE(offset: number, byteLength: number): number;
|
|
271
354
|
readUInt8(offset?: number): number;
|
|
355
|
+
/**
|
|
356
|
+
* @alias Buffer.readUInt8
|
|
357
|
+
* @since v14.9.0, v12.19.0
|
|
358
|
+
*/
|
|
359
|
+
readUint8(offset?: number): number;
|
|
272
360
|
readUInt16LE(offset?: number): number;
|
|
361
|
+
/**
|
|
362
|
+
* @alias Buffer.readUInt16LE
|
|
363
|
+
* @since v14.9.0, v12.19.0
|
|
364
|
+
*/
|
|
365
|
+
readUint16LE(offset?: number): number;
|
|
273
366
|
readUInt16BE(offset?: number): number;
|
|
367
|
+
/**
|
|
368
|
+
* @alias Buffer.readUInt16BE
|
|
369
|
+
* @since v14.9.0, v12.19.0
|
|
370
|
+
*/
|
|
371
|
+
readUint16BE(offset?: number): number;
|
|
274
372
|
readUInt32LE(offset?: number): number;
|
|
373
|
+
/**
|
|
374
|
+
* @alias Buffer.readUInt32LE
|
|
375
|
+
* @since v14.9.0, v12.19.0
|
|
376
|
+
*/
|
|
377
|
+
readUint32LE(offset?: number): number;
|
|
275
378
|
readUInt32BE(offset?: number): number;
|
|
379
|
+
/**
|
|
380
|
+
* @alias Buffer.readUInt32BE
|
|
381
|
+
* @since v14.9.0, v12.19.0
|
|
382
|
+
*/
|
|
383
|
+
readUint32BE(offset?: number): number;
|
|
276
384
|
readInt8(offset?: number): number;
|
|
277
385
|
readInt16LE(offset?: number): number;
|
|
278
386
|
readInt16BE(offset?: number): number;
|
|
@@ -287,10 +395,35 @@ declare class Buffer extends Uint8Array {
|
|
|
287
395
|
swap32(): Buffer;
|
|
288
396
|
swap64(): Buffer;
|
|
289
397
|
writeUInt8(value: number, offset?: number): number;
|
|
398
|
+
/**
|
|
399
|
+
* @alias Buffer.writeUInt8
|
|
400
|
+
* @since v14.9.0, v12.19.0
|
|
401
|
+
*/
|
|
402
|
+
writeUint8(value: number, offset?: number): number;
|
|
290
403
|
writeUInt16LE(value: number, offset?: number): number;
|
|
404
|
+
/**
|
|
405
|
+
* @alias Buffer.writeUInt16LE
|
|
406
|
+
* @since v14.9.0, v12.19.0
|
|
407
|
+
*/
|
|
408
|
+
writeUint16LE(value: number, offset?: number): number;
|
|
291
409
|
writeUInt16BE(value: number, offset?: number): number;
|
|
410
|
+
/**
|
|
411
|
+
* @alias Buffer.writeUInt16BE
|
|
412
|
+
* @since v14.9.0, v12.19.0
|
|
413
|
+
*/
|
|
414
|
+
writeUint16BE(value: number, offset?: number): number;
|
|
292
415
|
writeUInt32LE(value: number, offset?: number): number;
|
|
416
|
+
/**
|
|
417
|
+
* @alias Buffer.writeUInt32LE
|
|
418
|
+
* @since v14.9.0, v12.19.0
|
|
419
|
+
*/
|
|
420
|
+
writeUint32LE(value: number, offset?: number): number;
|
|
293
421
|
writeUInt32BE(value: number, offset?: number): number;
|
|
422
|
+
/**
|
|
423
|
+
* @alias Buffer.writeUInt32BE
|
|
424
|
+
* @since v14.9.0, v12.19.0
|
|
425
|
+
*/
|
|
426
|
+
writeUint32BE(value: number, offset?: number): number;
|
|
294
427
|
writeInt8(value: number, offset?: number): number;
|
|
295
428
|
writeInt16LE(value: number, offset?: number): number;
|
|
296
429
|
writeInt16BE(value: number, offset?: number): number;
|
|
@@ -457,9 +590,9 @@ declare namespace NodeJS {
|
|
|
457
590
|
writable: boolean;
|
|
458
591
|
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
|
459
592
|
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
|
460
|
-
end(cb?: () => void):
|
|
461
|
-
end(data: string | Uint8Array, cb?: () => void):
|
|
462
|
-
end(str: string, encoding?: BufferEncoding, cb?: () => void):
|
|
593
|
+
end(cb?: () => void): this;
|
|
594
|
+
end(data: string | Uint8Array, cb?: () => void): this;
|
|
595
|
+
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
|
|
463
596
|
}
|
|
464
597
|
|
|
465
598
|
interface ReadWriteStream extends ReadableStream, WritableStream { }
|
|
@@ -591,11 +724,11 @@ declare namespace NodeJS {
|
|
|
591
724
|
id: string;
|
|
592
725
|
filename: string;
|
|
593
726
|
loaded: boolean;
|
|
594
|
-
/** @deprecated since
|
|
727
|
+
/** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
|
|
595
728
|
parent: Module | null | undefined;
|
|
596
729
|
children: Module[];
|
|
597
730
|
/**
|
|
598
|
-
* @since
|
|
731
|
+
* @since v11.14.0
|
|
599
732
|
*
|
|
600
733
|
* The directory name of the module. This is usually the same as the path.dirname() of the module.id.
|
|
601
734
|
*/
|
|
@@ -279,6 +279,8 @@ declare module 'http' {
|
|
|
279
279
|
aborted: boolean;
|
|
280
280
|
host: string;
|
|
281
281
|
protocol: string;
|
|
282
|
+
reusedSocket: boolean;
|
|
283
|
+
maxHeadersCount: number;
|
|
282
284
|
|
|
283
285
|
constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
|
|
284
286
|
|
|
@@ -406,7 +408,7 @@ declare module 'http' {
|
|
|
406
408
|
* Only valid for response obtained from http.ClientRequest.
|
|
407
409
|
*/
|
|
408
410
|
statusMessage?: string | undefined;
|
|
409
|
-
destroy(error?: Error):
|
|
411
|
+
destroy(error?: Error): this;
|
|
410
412
|
}
|
|
411
413
|
|
|
412
414
|
interface AgentOptions {
|
|
@@ -252,6 +252,7 @@ declare module 'http2' {
|
|
|
252
252
|
parent?: number | undefined;
|
|
253
253
|
weight?: number | undefined;
|
|
254
254
|
waitForTrailers?: boolean | undefined;
|
|
255
|
+
signal?: AbortSignal | undefined;
|
|
255
256
|
}
|
|
256
257
|
|
|
257
258
|
export interface SessionState {
|
|
@@ -660,9 +661,9 @@ declare module 'http2' {
|
|
|
660
661
|
statusCode: number;
|
|
661
662
|
statusMessage: '';
|
|
662
663
|
addTrailers(trailers: OutgoingHttpHeaders): void;
|
|
663
|
-
end(callback?: () => void):
|
|
664
|
-
end(data: string | Uint8Array, callback?: () => void):
|
|
665
|
-
end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void):
|
|
664
|
+
end(callback?: () => void): this;
|
|
665
|
+
end(data: string | Uint8Array, callback?: () => void): this;
|
|
666
|
+
end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this;
|
|
666
667
|
getHeader(name: string): string;
|
|
667
668
|
getHeaderNames(): string[];
|
|
668
669
|
getHeaders(): OutgoingHttpHeaders;
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
// Junxiao Shi <https://github.com/yoursunny>
|
|
36
36
|
// Ilia Baryshnikov <https://github.com/qwelias>
|
|
37
37
|
// ExE Boss <https://github.com/ExE-Boss>
|
|
38
|
-
// Surasak Chaisurin <https://github.com/Ryan-Willpower>
|
|
39
38
|
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
|
40
39
|
// Anna Henningsen <https://github.com/addaleax>
|
|
41
40
|
// Victor Perin <https://github.com/victorperin>
|
|
@@ -1917,7 +1917,7 @@ declare module 'inspector' {
|
|
|
1917
1917
|
* Connects a session to the main thread inspector back-end.
|
|
1918
1918
|
* An exception will be thrown if this API was not called on a Worker
|
|
1919
1919
|
* thread.
|
|
1920
|
-
* @since
|
|
1920
|
+
* @since v12.11.0
|
|
1921
1921
|
*/
|
|
1922
1922
|
connectToMainThread(): void;
|
|
1923
1923
|
|