@idlebox/node 1.3.12 → 1.4.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.
Files changed (165) hide show
  1. package/lib/cjs/__create_index.generated.cjs +2 -0
  2. package/lib/cjs/__create_index.generated.cjs.map +1 -1
  3. package/lib/cjs/child_process/respawn.cjs +1 -1
  4. package/lib/cjs/child_process/respawn.cjs.map +1 -1
  5. package/lib/cjs/crypto/md5.cjs.map +1 -1
  6. package/lib/cjs/crypto/sha256.cjs.map +1 -1
  7. package/lib/cjs/error/nodejs-error-code.generated.cjs +6 -1
  8. package/lib/cjs/error/nodejs-error-code.generated.cjs.map +1 -1
  9. package/lib/esm/__create_index.generated.d.ts +72 -0
  10. package/lib/esm/__create_index.generated.d.ts.map +10 -0
  11. package/lib/esm/__create_index.generated.js +121 -0
  12. package/lib/esm/__create_index.generated.js.map +10 -0
  13. package/lib/esm/__virtual_tsconfig.tsbuildinfo +1 -0
  14. package/lib/esm/asyncLoad.d.ts +15 -0
  15. package/lib/esm/asyncLoad.d.ts.map +10 -0
  16. package/lib/esm/{asyncLoad.mjs → asyncLoad.js} +1 -1
  17. package/lib/esm/{asyncLoad.mjs.map → asyncLoad.js.map} +1 -1
  18. package/lib/esm/child_process/error.d.ts +16 -0
  19. package/lib/esm/child_process/error.d.ts.map +10 -0
  20. package/lib/esm/child_process/{error.mjs → error.js} +1 -1
  21. package/lib/esm/child_process/{error.mjs.map → error.js.map} +1 -1
  22. package/lib/esm/child_process/execa.d.ts +17 -0
  23. package/lib/esm/child_process/execa.d.ts.map +10 -0
  24. package/lib/esm/child_process/{execa.mjs → execa.js} +2 -2
  25. package/lib/esm/child_process/{execa.mjs.map → execa.js.map} +2 -2
  26. package/lib/esm/child_process/lateError.d.ts +23 -0
  27. package/lib/esm/child_process/lateError.d.ts.map +10 -0
  28. package/lib/esm/child_process/{lateError.mjs → lateError.js} +3 -3
  29. package/lib/esm/child_process/{lateError.mjs.map → lateError.js.map} +2 -2
  30. package/lib/esm/child_process/respawn.d.ts +19 -0
  31. package/lib/esm/child_process/respawn.d.ts.map +10 -0
  32. package/lib/esm/child_process/{respawn.mjs → respawn.js} +4 -4
  33. package/lib/esm/child_process/{respawn.mjs.map → respawn.js.map} +2 -2
  34. package/lib/esm/cli-io/output.d.ts +2 -0
  35. package/lib/esm/cli-io/output.d.ts.map +10 -0
  36. package/lib/esm/cli-io/{output.mjs → output.js} +1 -1
  37. package/lib/esm/cli-io/{output.mjs.map → output.js.map} +1 -1
  38. package/lib/esm/crypto/md5.d.ts +2 -0
  39. package/lib/esm/crypto/md5.d.ts.map +10 -0
  40. package/lib/esm/crypto/{md5.mjs → md5.js} +1 -1
  41. package/lib/esm/crypto/{md5.mjs.map → md5.js.map} +2 -2
  42. package/lib/esm/crypto/sha256.d.ts +2 -0
  43. package/lib/esm/crypto/sha256.d.ts.map +10 -0
  44. package/lib/esm/crypto/{sha256.mjs → sha256.js} +1 -1
  45. package/lib/esm/crypto/{sha256.mjs.map → sha256.js.map} +2 -2
  46. package/lib/esm/environment/findBinary.d.ts +2 -0
  47. package/lib/esm/environment/findBinary.d.ts.map +10 -0
  48. package/lib/esm/environment/{findBinary.mjs → findBinary.js} +3 -3
  49. package/lib/esm/environment/{findBinary.mjs.map → findBinary.js.map} +2 -2
  50. package/lib/esm/environment/getEnvironment.d.ts +8 -0
  51. package/lib/esm/environment/getEnvironment.d.ts.map +10 -0
  52. package/lib/esm/environment/{getEnvironment.mjs → getEnvironment.js} +1 -1
  53. package/lib/esm/environment/{getEnvironment.mjs.map → getEnvironment.js.map} +1 -1
  54. package/lib/esm/environment/npmConfig.d.ts +2 -0
  55. package/lib/esm/environment/npmConfig.d.ts.map +10 -0
  56. package/lib/esm/environment/{npmConfig.mjs → npmConfig.js} +2 -2
  57. package/lib/esm/environment/{npmConfig.mjs.map → npmConfig.js.map} +2 -2
  58. package/lib/esm/environment/pathEnvironment.d.ts +12 -0
  59. package/lib/esm/environment/pathEnvironment.d.ts.map +10 -0
  60. package/lib/esm/environment/{pathEnvironment.mjs → pathEnvironment.js} +2 -2
  61. package/lib/esm/environment/{pathEnvironment.mjs.map → pathEnvironment.js.map} +2 -2
  62. package/lib/esm/error/linux.d.ts +125 -0
  63. package/lib/esm/error/linux.d.ts.map +10 -0
  64. package/lib/esm/error/{linux.mjs → linux.js} +1 -1
  65. package/lib/esm/error/{linux.mjs.map → linux.js.map} +1 -1
  66. package/lib/{cjs/__create_index.generated.d.cts → esm/error/nodejs-error-code.generated.d.ts} +7 -431
  67. package/lib/esm/error/nodejs-error-code.generated.d.ts.map +10 -0
  68. package/lib/esm/error/{nodejs-error-code.generated.mjs → nodejs-error-code.generated.js} +7 -2
  69. package/lib/esm/error/nodejs-error-code.generated.js.map +10 -0
  70. package/lib/esm/error/types.d.ts +24 -0
  71. package/lib/esm/error/types.d.ts.map +10 -0
  72. package/lib/esm/error/{types.mjs → types.js} +3 -3
  73. package/lib/esm/error/{types.mjs.map → types.js.map} +2 -2
  74. package/lib/esm/events/dumpEventEmitter.d.ts +3 -0
  75. package/lib/esm/events/dumpEventEmitter.d.ts.map +10 -0
  76. package/lib/esm/events/{dumpEventEmitter.mjs → dumpEventEmitter.js} +1 -1
  77. package/lib/esm/events/{dumpEventEmitter.mjs.map → dumpEventEmitter.js.map} +1 -1
  78. package/lib/esm/fs/commandExists.d.ts +3 -0
  79. package/lib/esm/fs/commandExists.d.ts.map +10 -0
  80. package/lib/esm/fs/{commandExists.mjs → commandExists.js} +2 -2
  81. package/lib/esm/fs/{commandExists.mjs.map → commandExists.js.map} +2 -2
  82. package/lib/esm/fs/emptyDir.d.ts +7 -0
  83. package/lib/esm/fs/emptyDir.d.ts.map +10 -0
  84. package/lib/esm/fs/{emptyDir.mjs → emptyDir.js} +1 -1
  85. package/lib/esm/fs/{emptyDir.mjs.map → emptyDir.js.map} +1 -1
  86. package/lib/esm/fs/exists.d.ts +5 -0
  87. package/lib/esm/fs/exists.d.ts.map +10 -0
  88. package/lib/esm/fs/{exists.mjs → exists.js} +2 -2
  89. package/lib/esm/fs/{exists.mjs.map → exists.js.map} +2 -2
  90. package/lib/esm/fs/tempFolder.d.ts +3 -0
  91. package/lib/esm/fs/tempFolder.d.ts.map +10 -0
  92. package/lib/esm/fs/{tempFolder.mjs → tempFolder.js} +2 -2
  93. package/lib/esm/fs/{tempFolder.mjs.map → tempFolder.js.map} +2 -2
  94. package/lib/esm/fs/weiteChanged.d.ts +3 -0
  95. package/lib/esm/fs/weiteChanged.d.ts.map +10 -0
  96. package/lib/esm/fs/{weiteChanged.mjs → weiteChanged.js} +2 -2
  97. package/lib/esm/fs/{weiteChanged.mjs.map → weiteChanged.js.map} +2 -2
  98. package/lib/esm/log/terminal.d.ts +20 -0
  99. package/lib/esm/log/terminal.d.ts.map +10 -0
  100. package/lib/esm/log/{terminal.mjs → terminal.js} +1 -1
  101. package/lib/esm/log/{terminal.mjs.map → terminal.js.map} +1 -1
  102. package/lib/esm/path-resolve/findPackageRoot.d.ts +2 -0
  103. package/lib/esm/path-resolve/findPackageRoot.d.ts.map +10 -0
  104. package/lib/esm/path-resolve/{findPackageRoot.mjs → findPackageRoot.js} +2 -2
  105. package/lib/esm/path-resolve/{findPackageRoot.mjs.map → findPackageRoot.js.map} +2 -2
  106. package/lib/esm/path-resolve/findUp.d.ts +3 -0
  107. package/lib/esm/path-resolve/findUp.d.ts.map +10 -0
  108. package/lib/esm/path-resolve/{findUp.mjs → findUp.js} +2 -2
  109. package/lib/esm/path-resolve/{findUp.mjs.map → findUp.js.map} +2 -2
  110. package/lib/esm/path-resolve/getAllUp.d.ts +2 -0
  111. package/lib/esm/path-resolve/getAllUp.d.ts.map +10 -0
  112. package/lib/esm/path-resolve/{getAllUp.mjs → getAllUp.js} +1 -1
  113. package/lib/esm/path-resolve/{getAllUp.mjs.map → getAllUp.js.map} +1 -1
  114. package/lib/esm/path-resolve/lrelative.d.ts +2 -0
  115. package/lib/esm/path-resolve/lrelative.d.ts.map +10 -0
  116. package/lib/esm/path-resolve/{lrelative.mjs → lrelative.js} +1 -1
  117. package/lib/esm/path-resolve/{lrelative.mjs.map → lrelative.js.map} +1 -1
  118. package/lib/esm/path-resolve/nodeResolvePathArray.d.ts +2 -0
  119. package/lib/esm/path-resolve/nodeResolvePathArray.d.ts.map +10 -0
  120. package/lib/esm/path-resolve/{nodeResolvePathArray.mjs → nodeResolvePathArray.js} +1 -1
  121. package/lib/esm/path-resolve/{nodeResolvePathArray.mjs.map → nodeResolvePathArray.js.map} +1 -1
  122. package/lib/esm/path-resolve/resolvePath.d.ts +14 -0
  123. package/lib/esm/path-resolve/resolvePath.d.ts.map +10 -0
  124. package/lib/esm/path-resolve/{resolvePath.mjs → resolvePath.js} +1 -1
  125. package/lib/esm/path-resolve/{resolvePath.mjs.map → resolvePath.js.map} +1 -1
  126. package/lib/esm/preload.d.ts +2 -0
  127. package/lib/esm/preload.d.ts.map +10 -0
  128. package/lib/esm/preload.js +2 -0
  129. package/lib/esm/{preload.mjs.map → preload.js.map} +1 -1
  130. package/lib/esm/stream/blackHoleStream.d.ts +5 -0
  131. package/lib/esm/stream/blackHoleStream.d.ts.map +10 -0
  132. package/lib/esm/stream/{blackHoleStream.mjs → blackHoleStream.js} +1 -1
  133. package/lib/esm/stream/{blackHoleStream.mjs.map → blackHoleStream.js.map} +1 -1
  134. package/lib/esm/stream/collectingStream.d.ts +20 -0
  135. package/lib/esm/stream/collectingStream.d.ts.map +10 -0
  136. package/lib/esm/stream/{collectingStream.mjs → collectingStream.js} +2 -2
  137. package/lib/esm/stream/{collectingStream.mjs.map → collectingStream.js.map} +2 -2
  138. package/lib/esm/stream/disposableStream.d.ts +4 -0
  139. package/lib/esm/stream/disposableStream.d.ts.map +10 -0
  140. package/lib/esm/stream/{disposableStream.mjs → disposableStream.js} +1 -1
  141. package/lib/esm/stream/{disposableStream.mjs.map → disposableStream.js.map} +1 -1
  142. package/lib/esm/stream/drainStream.d.ts +2 -0
  143. package/lib/esm/stream/drainStream.d.ts.map +10 -0
  144. package/lib/esm/stream/{drainStream.mjs → drainStream.js} +1 -1
  145. package/lib/esm/stream/{drainStream.mjs.map → drainStream.js.map} +1 -1
  146. package/lib/esm/stream/loggerStream.d.ts +15 -0
  147. package/lib/esm/stream/loggerStream.d.ts.map +10 -0
  148. package/lib/esm/stream/{loggerStream.mjs → loggerStream.js} +1 -1
  149. package/lib/esm/stream/{loggerStream.mjs.map → loggerStream.js.map} +1 -1
  150. package/lib/esm/stream/streamPromise.d.ts +7 -0
  151. package/lib/esm/stream/streamPromise.d.ts.map +10 -0
  152. package/lib/esm/stream/{streamPromise.mjs → streamPromise.js} +1 -1
  153. package/lib/esm/stream/{streamPromise.mjs.map → streamPromise.js.map} +1 -1
  154. package/package.json +12 -13
  155. package/src/child_process/respawn.ts +1 -1
  156. package/src/crypto/md5.ts +1 -1
  157. package/src/crypto/sha256.ts +1 -1
  158. package/src/error/cache.generated.json +8 -1
  159. package/src/error/nodejs-error-code.generated.ts +6 -1
  160. package/src/tsconfig.json +4 -6
  161. package/lib/esm/__create_index.generated.d.mts +0 -2858
  162. package/lib/esm/__create_index.generated.mjs +0 -119
  163. package/lib/esm/__create_index.generated.mjs.map +0 -10
  164. package/lib/esm/error/nodejs-error-code.generated.mjs.map +0 -10
  165. package/lib/esm/preload.mjs +0 -2
@@ -1,2858 +0,0 @@
1
- import { EventEmitter } from 'events';
2
- import { IDisposable } from '@idlebox/common';
3
- import { Options } from 'execa';
4
- import { PathArray } from '@idlebox/common';
5
- import { Readable } from 'stream';
6
- import { readFile } from 'fs/promises';
7
- import { Result } from 'execa';
8
- import { Transform } from 'stream';
9
- import { WrappedConsole } from '@idlebox/common';
10
- import { WrappedConsoleOptions } from '@idlebox/common';
11
- import { Writable } from 'stream';
12
-
13
- export declare type AsyncMainFunction = () => Promise<void | number>;
14
-
15
- export declare class BlackHoleStream extends Writable {
16
- _write(_chunk: Buffer, _encoding: string, callback: (error?: Error | null) => void): void;
17
- }
18
-
19
- /** @throws */
20
- export declare function checkChildProcessResult(result: IChildProcessStatus): void;
21
-
22
- export declare function cleanupEnvironment(name: string, env?: NodeJS.ProcessEnv): void;
23
-
24
- export declare class CollectingStream extends Writable {
25
- private buffer?;
26
- private _promise?;
27
- constructor(sourceStream?: NodeJS.ReadableStream);
28
- _write(chunk: Buffer, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
29
- getOutput(): string;
30
- promise(): Promise<string>;
31
- }
32
-
33
- declare const colorMap: {
34
- info: string;
35
- success: string;
36
- debug: string;
37
- error: string;
38
- trace: string;
39
- warn: string;
40
- assert: string;
41
- };
42
-
43
- export declare function commandInPath(cmd: string, alterExt?: string[]): Promise<string | undefined>;
44
-
45
- export declare function commandInPathSync(cmd: string, alterExt?: string[]): string | undefined;
46
-
47
- declare type ConvStdout<T extends ISpawnOptions> = T extends {
48
- stdout: 'inherit';
49
- } ? Omit<T, 'stdout'> & {
50
- stdout: 'pipe';
51
- } : T;
52
-
53
- export declare function createTempFolder(fullPath: string): IDisposable;
54
-
55
- export declare function deleteEnvironment(name: string, env?: NodeJS.ProcessEnv): void;
56
-
57
- export declare function disposableStream<T extends Writable | Readable>(stream: T): T & IDisposable;
58
-
59
- export declare function drainStream(stream: NodeJS.ReadableStream, size: number, start?: number, extra?: number): Promise<Buffer>;
60
-
61
- export declare function dumpEventEmitterEmit(ev: EventEmitter): void;
62
-
63
- /**
64
- * delete all content in a dir,
65
- * and create it if not exists
66
- * @public
67
- */
68
- export declare function emptyDir(path: string, create_if_nexists?: boolean): Promise<void>;
69
-
70
- export declare type ExecaReturnValue<options extends ISpawnOptions> = Result<ConvStdout<Omit<options, 'verbose'>> & ISpawnConst>;
71
-
72
- /**
73
- * 运行命令,如果出错,则输出缓冲的stderr(如果stdout是inherit,也同时输出stdout)
74
- * 如果程序正常结束,则程序向stderr输出的内容直接丢弃
75
- */
76
- export declare function execLazyError<T extends ISpawnOptions = ISpawnOptions>(cmd: string, args: string[], spawnOptions: T): Promise<ExecaReturnValue<T>>;
77
-
78
- export declare function exists(path: string): Promise<boolean>;
79
-
80
- export declare class ExitError extends Error {
81
- readonly code: number;
82
- constructor(message: string, code?: number);
83
- }
84
-
85
- export declare function findBinary(what: string, pathvar?: PathArray, cwd?: string): string;
86
-
87
- export declare function findPackageRoot(packageName: string, require?: NodeRequire): string;
88
-
89
- export declare function findUpUntil(from: string, file: string): Promise<string | null>;
90
-
91
- export declare function findUpUntilSync(from: string, file: string): string | null;
92
-
93
- export declare function getAllPathUpToRoot(from: string, append?: string): string[];
94
-
95
- export declare function getEnvironment(name: string, env?: NodeJS.ProcessEnv): IEnvironmentResult;
96
-
97
- export declare function getNpmConfigValue(field: string): Promise<string>;
98
-
99
- export declare class HexDumpLoggerStream extends Transform {
100
- private readonly logFn;
101
- private readonly prefix;
102
- constructor(logFn: LogFunction, prefix?: string);
103
- _transform(chunk: Buffer, encoding: BufferEncoding, callback: Function): void;
104
- }
105
-
106
- declare interface IChildProcessStatus {
107
- signal?: NodeJS.Signals | string | null;
108
- status?: number | null;
109
- error?: Error;
110
- signalCode?: NodeJS.Signals | string | null;
111
- exitCode?: number | null;
112
- signalDescription?: string;
113
- command?: string;
114
- killed?: boolean;
115
- failed?: boolean;
116
- timedOut?: boolean;
117
- }
118
-
119
- export declare interface ICommand {
120
- exec: string[];
121
- addonPath?: string[];
122
- cwd?: string;
123
- env?: ProcessEnv;
124
- }
125
-
126
- export declare interface IEnvironmentResult {
127
- value: string | undefined;
128
- name: string;
129
- }
130
-
131
- export declare function isExistsError(e: unknown): e is NodeException<LinuxError.EEXIST>;
132
-
133
- export declare function isFileTypeError(e: unknown): e is NodeException<LinuxError.EISDIR | LinuxError.ENOTDIR>;
134
-
135
- /**
136
- * MODULE_NOT_FOUND: require() not found
137
- * ERR_MODULE_NOT_FOUND: import() not found
138
- */
139
- export declare function isModuleResolutionError(ex: unknown): ex is NodeException<NodeError.MODULE_NOT_FOUND | NodeError.ERR_MODULE_NOT_FOUND>;
140
-
141
- export declare function isNodeError(e: unknown): e is NodeException;
142
-
143
- export declare function isNotExistsError(e: unknown): e is NodeException<LinuxError.ENOENT>;
144
-
145
- declare type ISpawnConst = {
146
- lines: false;
147
- reject: false;
148
- stderr: 'pipe';
149
- encoding: 'utf8';
150
- };
151
-
152
- export declare type ISpawnOptions = Omit<Options, 'lines' | 'reject' | 'stdio' | 'encoding' | 'all' | 'stderr' | 'verbose'> & {
153
- verbose?: boolean;
154
- };
155
-
156
- /** @description use isFileTypeError */
157
- export declare const isTypeError: typeof isFileTypeError;
158
-
159
- export declare interface JoinPathFunction {
160
- (from: string, to: string): string;
161
- }
162
-
163
- export declare enum LinuxError {
164
- EPERM = "EPERM",
165
- ENOENT = "ENOENT",
166
- ESRCH = "ESRCH",
167
- EINTR = "EINTR",
168
- EIO = "EIO",
169
- ENXIO = "ENXIO",
170
- E2BIG = "E2BIG",
171
- ENOEXEC = "ENOEXEC",
172
- EBADF = "EBADF",
173
- ECHILD = "ECHILD",
174
- EAGAIN = "EAGAIN",
175
- ENOMEM = "ENOMEM",
176
- EACCES = "EACCES",
177
- EFAULT = "EFAULT",
178
- ENOTBLK = "ENOTBLK",
179
- EBUSY = "EBUSY",
180
- EEXIST = "EEXIST",
181
- EXDEV = "EXDEV",
182
- ENODEV = "ENODEV",
183
- ENOTDIR = "ENOTDIR",
184
- EISDIR = "EISDIR",
185
- EINVAL = "EINVAL",
186
- ENFILE = "ENFILE",
187
- EMFILE = "EMFILE",
188
- ENOTTY = "ENOTTY",
189
- ETXTBSY = "ETXTBSY",
190
- EFBIG = "EFBIG",
191
- ENOSPC = "ENOSPC",
192
- ESPIPE = "ESPIPE",
193
- EROFS = "EROFS",
194
- EMLINK = "EMLINK",
195
- EPIPE = "EPIPE",
196
- EDOM = "EDOM",
197
- ERANGE = "ERANGE",
198
- ENOMSG = "ENOMSG",
199
- EIDRM = "EIDRM",
200
- ECHRNG = "ECHRNG",
201
- EL2NSYNC = "EL2NSYNC",
202
- EL3HLT = "EL3HLT",
203
- EL3RST = "EL3RST",
204
- ELNRNG = "ELNRNG",
205
- EUNATCH = "EUNATCH",
206
- ENOCSI = "ENOCSI",
207
- EL2HLT = "EL2HLT",
208
- EDEADLK = "EDEADLK",
209
- ENOLCK = "ENOLCK",
210
- EBADE = "EBADE",
211
- EBADR = "EBADR",
212
- EXFULL = "EXFULL",
213
- ENOANO = "ENOANO",
214
- EBADRQC = "EBADRQC",
215
- EBADSLT = "EBADSLT",
216
- EDEADLOCK = "EDEADLOCK",
217
- EBFONT = "EBFONT",
218
- ENOSTR = "ENOSTR",
219
- ENODATA = "ENODATA",
220
- ETIME = "ETIME",
221
- ENOSR = "ENOSR",
222
- ENONET = "ENONET",
223
- ENOPKG = "ENOPKG",
224
- EREMOTE = "EREMOTE",
225
- ENOLINK = "ENOLINK",
226
- EADV = "EADV",
227
- ESRMNT = "ESRMNT",
228
- ECOMM = "ECOMM",
229
- EPROTO = "EPROTO",
230
- EMULTIHOP = "EMULTIHOP",
231
- ELBIN = "ELBIN",
232
- EDOTDOT = "EDOTDOT",
233
- EBADMSG = "EBADMSG",
234
- EFTYPE = "EFTYPE",
235
- ENOTUNIQ = "ENOTUNIQ",
236
- EBADFD = "EBADFD",
237
- EREMCHG = "EREMCHG",
238
- ELIBACC = "ELIBACC",
239
- ELIBBAD = "ELIBBAD",
240
- ELIBSCN = "ELIBSCN",
241
- ELIBMAX = "ELIBMAX",
242
- ELIBEXEC = "ELIBEXEC",
243
- ENOSYS = "ENOSYS",
244
- ENMFILE = "ENMFILE",
245
- ENOTEMPTY = "ENOTEMPTY",
246
- ENAMETOOLONG = "ENAMETOOLONG",
247
- ELOOP = "ELOOP",
248
- EOPNOTSUPP = "EOPNOTSUPP",
249
- EPFNOSUPPORT = "EPFNOSUPPORT",
250
- ECONNRESET = "ECONNRESET",
251
- ENOBUFS = "ENOBUFS",
252
- EAFNOSUPPORT = "EAFNOSUPPORT",
253
- EPROTOTYPE = "EPROTOTYPE",
254
- ENOTSOCK = "ENOTSOCK",
255
- ENOPROTOOPT = "ENOPROTOOPT",
256
- ESHUTDOWN = "ESHUTDOWN",
257
- ECONNREFUSED = "ECONNREFUSED",
258
- EADDRINUSE = "EADDRINUSE",
259
- ECONNABORTED = "ECONNABORTED",
260
- ENETUNREACH = "ENETUNREACH",
261
- ENETDOWN = "ENETDOWN",
262
- ETIMEDOUT = "ETIMEDOUT",
263
- EHOSTDOWN = "EHOSTDOWN",
264
- EHOSTUNREACH = "EHOSTUNREACH",
265
- EINPROGRESS = "EINPROGRESS",
266
- EALREADY = "EALREADY",
267
- EDESTADDRREQ = "EDESTADDRREQ",
268
- EMSGSIZE = "EMSGSIZE",
269
- EPROTONOSUPPORT = "EPROTONOSUPPORT",
270
- ESOCKTNOSUPPORT = "ESOCKTNOSUPPORT",
271
- EADDRNOTAVAIL = "EADDRNOTAVAIL",
272
- ENETRESET = "ENETRESET",
273
- EISCONN = "EISCONN",
274
- ENOTCONN = "ENOTCONN",
275
- ETOOMANYREFS = "ETOOMANYREFS",
276
- EPROCLIM = "EPROCLIM",
277
- EUSERS = "EUSERS",
278
- EDQUOT = "EDQUOT",
279
- ESTALE = "ESTALE",
280
- ENOTSUP = "ENOTSUP",
281
- ENOMEDIUM = "ENOMEDIUM",
282
- ENOSHARE = "ENOSHARE",
283
- ECASECLASH = "ECASECLASH",
284
- EILSEQ = "EILSEQ",
285
- EOVERFLOW = "EOVERFLOW"
286
- }
287
-
288
- export declare type LogFunction = (message: string, ...args: any[]) => void;
289
-
290
- export declare class LoggerStream extends Transform {
291
- private readonly logFn;
292
- private readonly prefix;
293
- constructor(logFn: LogFunction, prefix?: string);
294
- _transform(chunk: Buffer, encoding: BufferEncoding, callback: Function): void;
295
- }
296
-
297
- export declare function lrelative(from: string, to: string): string;
298
-
299
- export declare function md5(data: Buffer | string): string;
300
-
301
- export declare enum NodeError {
302
- /**
303
- * <p>Used when an operation has been aborted (typically using an <code>AbortController</code>).</p>
304
- * <p>APIs <em>not</em> using <code>AbortSignal</code>s typically do not raise an error with this code.</p>
305
- * <p>This code does not use the regular <code>ERR_*</code> convention Node.js errors use in
306
- * order to be compatible with the web platform's <code>AbortError</code>.</p>
307
- * <p><a id="ERR_ACCESS_DENIED"></a></p>
308
- */
309
- ABORT_ERR = "ABORT_ERR",
310
- /**
311
- * <p>A special type of error that is triggered whenever Node.js tries to get access
312
- * to a resource restricted by the <a href="permissions.html#permission-model">Permission Model</a>.</p>
313
- * <p><a id="ERR_AMBIGUOUS_ARGUMENT"></a></p>
314
- */
315
- ERR_ACCESS_DENIED = "ERR_ACCESS_DENIED",
316
- /**
317
- * <p>A function argument is being used in a way that suggests that the function
318
- * signature may be misunderstood. This is thrown by the <code>node:assert</code> module when
319
- * the <code>message</code> parameter in <code>assert.throws(block, message)</code> matches the error
320
- * message thrown by <code>block</code> because that usage suggests that the user believes
321
- * <code>message</code> is the expected message rather than the message the <code>AssertionError</code>
322
- * will display if <code>block</code> does not throw.</p>
323
- * <p><a id="ERR_ARG_NOT_ITERABLE"></a></p>
324
- */
325
- ERR_AMBIGUOUS_ARGUMENT = "ERR_AMBIGUOUS_ARGUMENT",
326
- /**
327
- * <p>An iterable argument (i.e. a value that works with <code>for...of</code> loops) was
328
- * required, but not provided to a Node.js API.</p>
329
- * <p><a id="ERR_ASSERTION"></a></p>
330
- */
331
- ERR_ARG_NOT_ITERABLE = "ERR_ARG_NOT_ITERABLE",
332
- /**
333
- * <p>A special type of error that can be triggered whenever Node.js detects an
334
- * exceptional logic violation that should never occur. These are raised typically
335
- * by the <code>node:assert</code> module.</p>
336
- * <p><a id="ERR_ASYNC_CALLBACK"></a></p>
337
- */
338
- ERR_ASSERTION = "ERR_ASSERTION",
339
- /**
340
- * <p>An attempt was made to register something that is not a function as an
341
- * <code>AsyncHooks</code> callback.</p>
342
- * <p><a id="ERR_ASYNC_TYPE"></a></p>
343
- */
344
- ERR_ASYNC_CALLBACK = "ERR_ASYNC_CALLBACK",
345
- /**
346
- * <p>The type of an asynchronous resource was invalid. Users are also able
347
- * to define their own types if using the public embedder API.</p>
348
- * <p><a id="ERR_BROTLI_COMPRESSION_FAILED"></a></p>
349
- */
350
- ERR_ASYNC_TYPE = "ERR_ASYNC_TYPE",
351
- /**
352
- * <p>Data passed to a Brotli stream was not successfully compressed.</p>
353
- * <p><a id="ERR_BROTLI_INVALID_PARAM"></a></p>
354
- */
355
- ERR_BROTLI_COMPRESSION_FAILED = "ERR_BROTLI_COMPRESSION_FAILED",
356
- /**
357
- * <p>An invalid parameter key was passed during construction of a Brotli stream.</p>
358
- * <p><a id="ERR_BUFFER_CONTEXT_NOT_AVAILABLE"></a></p>
359
- */
360
- ERR_BROTLI_INVALID_PARAM = "ERR_BROTLI_INVALID_PARAM",
361
- /**
362
- * <p>An attempt was made to create a Node.js <code>Buffer</code> instance from addon or embedder
363
- * code, while in a JS engine Context that is not associated with a Node.js
364
- * instance. The data passed to the <code>Buffer</code> method will have been released
365
- * by the time the method returns.</p>
366
- * <p>When encountering this error, a possible alternative to creating a <code>Buffer</code>
367
- * instance is to create a normal <code>Uint8Array</code>, which only differs in the
368
- * prototype of the resulting object. <code>Uint8Array</code>s are generally accepted in all
369
- * Node.js core APIs where <code>Buffer</code>s are; they are available in all Contexts.</p>
370
- * <p><a id="ERR_BUFFER_OUT_OF_BOUNDS"></a></p>
371
- */
372
- ERR_BUFFER_CONTEXT_NOT_AVAILABLE = "ERR_BUFFER_CONTEXT_NOT_AVAILABLE",
373
- /**
374
- * <p>An operation outside the bounds of a <code>Buffer</code> was attempted.</p>
375
- * <p><a id="ERR_BUFFER_TOO_LARGE"></a></p>
376
- */
377
- ERR_BUFFER_OUT_OF_BOUNDS = "ERR_BUFFER_OUT_OF_BOUNDS",
378
- /**
379
- * <p>An attempt has been made to create a <code>Buffer</code> larger than the maximum allowed
380
- * size.</p>
381
- * <p><a id="ERR_CANNOT_WATCH_SIGINT"></a></p>
382
- */
383
- ERR_BUFFER_TOO_LARGE = "ERR_BUFFER_TOO_LARGE",
384
- /**
385
- * <p>Node.js was unable to watch for the <code>SIGINT</code> signal.</p>
386
- * <p><a id="ERR_CHILD_CLOSED_BEFORE_REPLY"></a></p>
387
- */
388
- ERR_CANNOT_WATCH_SIGINT = "ERR_CANNOT_WATCH_SIGINT",
389
- /**
390
- * <p>A child process was closed before the parent received a reply.</p>
391
- * <p><a id="ERR_CHILD_PROCESS_IPC_REQUIRED"></a></p>
392
- */
393
- ERR_CHILD_CLOSED_BEFORE_REPLY = "ERR_CHILD_CLOSED_BEFORE_REPLY",
394
- /**
395
- * <p>Used when a child process is being forked without specifying an IPC channel.</p>
396
- * <p><a id="ERR_CHILD_PROCESS_STDIO_MAXBUFFER"></a></p>
397
- */
398
- ERR_CHILD_PROCESS_IPC_REQUIRED = "ERR_CHILD_PROCESS_IPC_REQUIRED",
399
- /**
400
- * <p>Used when the main process is trying to read data from the child process's
401
- * STDERR/STDOUT, and the data's length is longer than the <code>maxBuffer</code> option.</p>
402
- * <p><a id="ERR_CLOSED_MESSAGE_PORT"></a></p>
403
- */
404
- ERR_CHILD_PROCESS_STDIO_MAXBUFFER = "ERR_CHILD_PROCESS_STDIO_MAXBUFFER",
405
- /**
406
- * <p>There was an attempt to use a <code>MessagePort</code> instance in a closed
407
- * state, usually after <code>.close()</code> has been called.</p>
408
- * <p><a id="ERR_CONSOLE_WRITABLE_STREAM"></a></p>
409
- */
410
- ERR_CLOSED_MESSAGE_PORT = "ERR_CLOSED_MESSAGE_PORT",
411
- /**
412
- * <p><code>Console</code> was instantiated without <code>stdout</code> stream, or <code>Console</code> has a
413
- * non-writable <code>stdout</code> or <code>stderr</code> stream.</p>
414
- * <p><a id="ERR_CONSTRUCT_CALL_INVALID"></a></p>
415
- */
416
- ERR_CONSOLE_WRITABLE_STREAM = "ERR_CONSOLE_WRITABLE_STREAM",
417
- /**
418
- * <p>A class constructor was called that is not callable.</p>
419
- * <p><a id="ERR_CONSTRUCT_CALL_REQUIRED"></a></p>
420
- */
421
- ERR_CONSTRUCT_CALL_INVALID = "ERR_CONSTRUCT_CALL_INVALID",
422
- /**
423
- * <p>A constructor for a class was called without <code>new</code>.</p>
424
- * <p><a id="ERR_CONTEXT_NOT_INITIALIZED"></a></p>
425
- */
426
- ERR_CONSTRUCT_CALL_REQUIRED = "ERR_CONSTRUCT_CALL_REQUIRED",
427
- /**
428
- * <p>The vm context passed into the API is not yet initialized. This could happen
429
- * when an error occurs (and is caught) during the creation of the
430
- * context, for example, when the allocation fails or the maximum call stack
431
- * size is reached when the context is created.</p>
432
- * <p><a id="ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED"></a></p>
433
- */
434
- ERR_CONTEXT_NOT_INITIALIZED = "ERR_CONTEXT_NOT_INITIALIZED",
435
- /**
436
- * <p>An OpenSSL engine was requested (for example, through the <code>clientCertEngine</code> or
437
- * <code>privateKeyEngine</code> TLS options) that is not supported by the version of OpenSSL
438
- * being used, likely due to the compile-time flag <code>OPENSSL_NO_ENGINE</code>.</p>
439
- * <p><a id="ERR_CRYPTO_ECDH_INVALID_FORMAT"></a></p>
440
- */
441
- ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED = "ERR_CRYPTO_CUSTOM_ENGINE_NOT_SUPPORTED",
442
- /**
443
- * <p>An invalid value for the <code>format</code> argument was passed to the <code>crypto.ECDH()</code>
444
- * class <code>getPublicKey()</code> method.</p>
445
- * <p><a id="ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY"></a></p>
446
- */
447
- ERR_CRYPTO_ECDH_INVALID_FORMAT = "ERR_CRYPTO_ECDH_INVALID_FORMAT",
448
- /**
449
- * <p>An invalid value for the <code>key</code> argument has been passed to the
450
- * <code>crypto.ECDH()</code> class <code>computeSecret()</code> method. It means that the public
451
- * key lies outside of the elliptic curve.</p>
452
- * <p><a id="ERR_CRYPTO_ENGINE_UNKNOWN"></a></p>
453
- */
454
- ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY = "ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY",
455
- /**
456
- * <p>An invalid crypto engine identifier was passed to
457
- * <a href="crypto.html#cryptosetengineengine-flags"><code>require('node:crypto').setEngine()</code></a>.</p>
458
- * <p><a id="ERR_CRYPTO_FIPS_FORCED"></a></p>
459
- */
460
- ERR_CRYPTO_ENGINE_UNKNOWN = "ERR_CRYPTO_ENGINE_UNKNOWN",
461
- /**
462
- * <p>The <a href="cli.html#--force-fips"><code>--force-fips</code></a> command-line argument was used but there was an attempt
463
- * to enable or disable FIPS mode in the <code>node:crypto</code> module.</p>
464
- * <p><a id="ERR_CRYPTO_FIPS_UNAVAILABLE"></a></p>
465
- */
466
- ERR_CRYPTO_FIPS_FORCED = "ERR_CRYPTO_FIPS_FORCED",
467
- /**
468
- * <p>An attempt was made to enable or disable FIPS mode, but FIPS mode was not
469
- * available.</p>
470
- * <p><a id="ERR_CRYPTO_HASH_FINALIZED"></a></p>
471
- */
472
- ERR_CRYPTO_FIPS_UNAVAILABLE = "ERR_CRYPTO_FIPS_UNAVAILABLE",
473
- /**
474
- * <p><a href="crypto.html#hashdigestencoding"><code>hash.digest()</code></a> was called multiple times. The <code>hash.digest()</code> method must
475
- * be called no more than one time per instance of a <code>Hash</code> object.</p>
476
- * <p><a id="ERR_CRYPTO_HASH_UPDATE_FAILED"></a></p>
477
- */
478
- ERR_CRYPTO_HASH_FINALIZED = "ERR_CRYPTO_HASH_FINALIZED",
479
- /**
480
- * <p><a href="crypto.html#hashupdatedata-inputencoding"><code>hash.update()</code></a> failed for any reason. This should rarely, if ever, happen.</p>
481
- * <p><a id="ERR_CRYPTO_INCOMPATIBLE_KEY"></a></p>
482
- */
483
- ERR_CRYPTO_HASH_UPDATE_FAILED = "ERR_CRYPTO_HASH_UPDATE_FAILED",
484
- /**
485
- * <p>The given crypto keys are incompatible with the attempted operation.</p>
486
- * <p><a id="ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS"></a></p>
487
- */
488
- ERR_CRYPTO_INCOMPATIBLE_KEY = "ERR_CRYPTO_INCOMPATIBLE_KEY",
489
- /**
490
- * <p>The selected public or private key encoding is incompatible with other options.</p>
491
- * <p><a id="ERR_CRYPTO_INITIALIZATION_FAILED"></a></p>
492
- */
493
- ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS = "ERR_CRYPTO_INCOMPATIBLE_KEY_OPTIONS",
494
- /**
495
- * <p>Initialization of the crypto subsystem failed.</p>
496
- * <p><a id="ERR_CRYPTO_INVALID_AUTH_TAG"></a></p>
497
- */
498
- ERR_CRYPTO_INITIALIZATION_FAILED = "ERR_CRYPTO_INITIALIZATION_FAILED",
499
- /**
500
- * <p>An invalid authentication tag was provided.</p>
501
- * <p><a id="ERR_CRYPTO_INVALID_COUNTER"></a></p>
502
- */
503
- ERR_CRYPTO_INVALID_AUTH_TAG = "ERR_CRYPTO_INVALID_AUTH_TAG",
504
- /**
505
- * <p>An invalid counter was provided for a counter-mode cipher.</p>
506
- * <p><a id="ERR_CRYPTO_INVALID_CURVE"></a></p>
507
- */
508
- ERR_CRYPTO_INVALID_COUNTER = "ERR_CRYPTO_INVALID_COUNTER",
509
- /**
510
- * <p>An invalid elliptic-curve was provided.</p>
511
- * <p><a id="ERR_CRYPTO_INVALID_DIGEST"></a></p>
512
- */
513
- ERR_CRYPTO_INVALID_CURVE = "ERR_CRYPTO_INVALID_CURVE",
514
- /**
515
- * <p>An invalid <a href="crypto.html#cryptogethashes">crypto digest algorithm</a> was specified.</p>
516
- * <p><a id="ERR_CRYPTO_INVALID_IV"></a></p>
517
- */
518
- ERR_CRYPTO_INVALID_DIGEST = "ERR_CRYPTO_INVALID_DIGEST",
519
- /**
520
- * <p>An invalid initialization vector was provided.</p>
521
- * <p><a id="ERR_CRYPTO_INVALID_JWK"></a></p>
522
- */
523
- ERR_CRYPTO_INVALID_IV = "ERR_CRYPTO_INVALID_IV",
524
- /**
525
- * <p>An invalid JSON Web Key was provided.</p>
526
- * <p><a id="ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE"></a></p>
527
- */
528
- ERR_CRYPTO_INVALID_JWK = "ERR_CRYPTO_INVALID_JWK",
529
- /**
530
- * <p>The given crypto key object's type is invalid for the attempted operation.</p>
531
- * <p><a id="ERR_CRYPTO_INVALID_KEYLEN"></a></p>
532
- */
533
- ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE = "ERR_CRYPTO_INVALID_KEY_OBJECT_TYPE",
534
- /**
535
- * <p>An invalid key length was provided.</p>
536
- * <p><a id="ERR_CRYPTO_INVALID_KEYPAIR"></a></p>
537
- */
538
- ERR_CRYPTO_INVALID_KEYLEN = "ERR_CRYPTO_INVALID_KEYLEN",
539
- /**
540
- * <p>An invalid key pair was provided.</p>
541
- * <p><a id="ERR_CRYPTO_INVALID_KEYTYPE"></a></p>
542
- */
543
- ERR_CRYPTO_INVALID_KEYPAIR = "ERR_CRYPTO_INVALID_KEYPAIR",
544
- /**
545
- * <p>An invalid key type was provided.</p>
546
- * <p><a id="ERR_CRYPTO_INVALID_MESSAGELEN"></a></p>
547
- */
548
- ERR_CRYPTO_INVALID_KEYTYPE = "ERR_CRYPTO_INVALID_KEYTYPE",
549
- /**
550
- * <p>An invalid message length was provided.</p>
551
- * <p><a id="ERR_CRYPTO_INVALID_SCRYPT_PARAMS"></a></p>
552
- */
553
- ERR_CRYPTO_INVALID_MESSAGELEN = "ERR_CRYPTO_INVALID_MESSAGELEN",
554
- /**
555
- * <p>Invalid scrypt algorithm parameters were provided.</p>
556
- * <p><a id="ERR_CRYPTO_INVALID_STATE"></a></p>
557
- */
558
- ERR_CRYPTO_INVALID_SCRYPT_PARAMS = "ERR_CRYPTO_INVALID_SCRYPT_PARAMS",
559
- /**
560
- * <p>A crypto method was used on an object that was in an invalid state. For
561
- * instance, calling <a href="crypto.html#ciphergetauthtag"><code>cipher.getAuthTag()</code></a> before calling <code>cipher.final()</code>.</p>
562
- * <p><a id="ERR_CRYPTO_INVALID_TAG_LENGTH"></a></p>
563
- */
564
- ERR_CRYPTO_INVALID_STATE = "ERR_CRYPTO_INVALID_STATE",
565
- /**
566
- * <p>An invalid authentication tag length was provided.</p>
567
- * <p><a id="ERR_CRYPTO_JOB_INIT_FAILED"></a></p>
568
- */
569
- ERR_CRYPTO_INVALID_TAG_LENGTH = "ERR_CRYPTO_INVALID_TAG_LENGTH",
570
- /**
571
- * <p>Initialization of an asynchronous crypto operation failed.</p>
572
- * <p><a id="ERR_CRYPTO_JWK_UNSUPPORTED_CURVE"></a></p>
573
- */
574
- ERR_CRYPTO_JOB_INIT_FAILED = "ERR_CRYPTO_JOB_INIT_FAILED",
575
- /**
576
- * <p>Key's Elliptic Curve is not registered for use in the
577
- * <a href="https://www.iana.org/assignments/jose/jose.xhtml#web-key-elliptic-curve">JSON Web Key Elliptic Curve Registry</a>.</p>
578
- * <p><a id="ERR_CRYPTO_JWK_UNSUPPORTED_KEY_TYPE"></a></p>
579
- */
580
- ERR_CRYPTO_JWK_UNSUPPORTED_CURVE = "ERR_CRYPTO_JWK_UNSUPPORTED_CURVE",
581
- /**
582
- * <p>Key's Asymmetric Key Type is not registered for use in the
583
- * <a href="https://www.iana.org/assignments/jose/jose.xhtml#web-key-types">JSON Web Key Types Registry</a>.</p>
584
- * <p><a id="ERR_CRYPTO_OPERATION_FAILED"></a></p>
585
- */
586
- ERR_CRYPTO_JWK_UNSUPPORTED_KEY_TYPE = "ERR_CRYPTO_JWK_UNSUPPORTED_KEY_TYPE",
587
- /**
588
- * <p>A crypto operation failed for an otherwise unspecified reason.</p>
589
- * <p><a id="ERR_CRYPTO_PBKDF2_ERROR"></a></p>
590
- */
591
- ERR_CRYPTO_OPERATION_FAILED = "ERR_CRYPTO_OPERATION_FAILED",
592
- /**
593
- * <p>The PBKDF2 algorithm failed for unspecified reasons. OpenSSL does not provide
594
- * more details and therefore neither does Node.js.</p>
595
- * <p><a id="ERR_CRYPTO_SCRYPT_INVALID_PARAMETER"></a></p>
596
- */
597
- ERR_CRYPTO_PBKDF2_ERROR = "ERR_CRYPTO_PBKDF2_ERROR",
598
- /**
599
- * <p>One or more <a href="crypto.html#cryptoscryptpassword-salt-keylen-options-callback"><code>crypto.scrypt()</code></a> or <a href="crypto.html#cryptoscryptsyncpassword-salt-keylen-options"><code>crypto.scryptSync()</code></a> parameters are
600
- * outside their legal range.</p>
601
- * <p><a id="ERR_CRYPTO_SCRYPT_NOT_SUPPORTED"></a></p>
602
- */
603
- ERR_CRYPTO_SCRYPT_INVALID_PARAMETER = "ERR_CRYPTO_SCRYPT_INVALID_PARAMETER",
604
- /**
605
- * <p>Node.js was compiled without <code>scrypt</code> support. Not possible with the official
606
- * release binaries but can happen with custom builds, including distro builds.</p>
607
- * <p><a id="ERR_CRYPTO_SIGN_KEY_REQUIRED"></a></p>
608
- */
609
- ERR_CRYPTO_SCRYPT_NOT_SUPPORTED = "ERR_CRYPTO_SCRYPT_NOT_SUPPORTED",
610
- /**
611
- * <p>A signing <code>key</code> was not provided to the <a href="crypto.html#signsignprivatekey-outputencoding"><code>sign.sign()</code></a> method.</p>
612
- * <p><a id="ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH"></a></p>
613
- */
614
- ERR_CRYPTO_SIGN_KEY_REQUIRED = "ERR_CRYPTO_SIGN_KEY_REQUIRED",
615
- /**
616
- * <p><a href="crypto.html#cryptotimingsafeequala-b"><code>crypto.timingSafeEqual()</code></a> was called with <code>Buffer</code>, <code>TypedArray</code>, or
617
- * <code>DataView</code> arguments of different lengths.</p>
618
- * <p><a id="ERR_CRYPTO_UNKNOWN_CIPHER"></a></p>
619
- */
620
- ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH = "ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH",
621
- /**
622
- * <p>An unknown cipher was specified.</p>
623
- * <p><a id="ERR_CRYPTO_UNKNOWN_DH_GROUP"></a></p>
624
- */
625
- ERR_CRYPTO_UNKNOWN_CIPHER = "ERR_CRYPTO_UNKNOWN_CIPHER",
626
- /**
627
- * <p>An unknown Diffie-Hellman group name was given. See
628
- * <a href="crypto.html#cryptogetdiffiehellmangroupname"><code>crypto.getDiffieHellman()</code></a> for a list of valid group names.</p>
629
- * <p><a id="ERR_CRYPTO_UNSUPPORTED_OPERATION"></a></p>
630
- */
631
- ERR_CRYPTO_UNKNOWN_DH_GROUP = "ERR_CRYPTO_UNKNOWN_DH_GROUP",
632
- /**
633
- * <p>An attempt to invoke an unsupported crypto operation was made.</p>
634
- * <p><a id="ERR_DEBUGGER_ERROR"></a></p>
635
- */
636
- ERR_CRYPTO_UNSUPPORTED_OPERATION = "ERR_CRYPTO_UNSUPPORTED_OPERATION",
637
- /**
638
- * <p>An error occurred with the <a href="debugger.html">debugger</a>.</p>
639
- * <p><a id="ERR_DEBUGGER_STARTUP_ERROR"></a></p>
640
- */
641
- ERR_DEBUGGER_ERROR = "ERR_DEBUGGER_ERROR",
642
- /**
643
- * <p>The <a href="debugger.html">debugger</a> timed out waiting for the required host/port to be free.</p>
644
- * <p><a id="ERR_DLOPEN_DISABLED"></a></p>
645
- */
646
- ERR_DEBUGGER_STARTUP_ERROR = "ERR_DEBUGGER_STARTUP_ERROR",
647
- /**
648
- * <p>Loading native addons has been disabled using <a href="cli.html#--no-addons"><code>--no-addons</code></a>.</p>
649
- * <p><a id="ERR_DLOPEN_FAILED"></a></p>
650
- */
651
- ERR_DLOPEN_DISABLED = "ERR_DLOPEN_DISABLED",
652
- /**
653
- * <p>A call to <code>process.dlopen()</code> failed.</p>
654
- * <p><a id="ERR_DIR_CLOSED"></a></p>
655
- */
656
- ERR_DLOPEN_FAILED = "ERR_DLOPEN_FAILED",
657
- /**
658
- * <p>The <a href="fs.html#class-fsdir"><code>fs.Dir</code></a> was previously closed.</p>
659
- * <p><a id="ERR_DIR_CONCURRENT_OPERATION"></a></p>
660
- */
661
- ERR_DIR_CLOSED = "ERR_DIR_CLOSED",
662
- /**
663
- * <p>A synchronous read or close call was attempted on an <a href="fs.html#class-fsdir"><code>fs.Dir</code></a> which has
664
- * ongoing asynchronous operations.</p>
665
- * <p><a id="ERR_DNS_SET_SERVERS_FAILED"></a></p>
666
- */
667
- ERR_DIR_CONCURRENT_OPERATION = "ERR_DIR_CONCURRENT_OPERATION",
668
- /**
669
- * <p><code>c-ares</code> failed to set the DNS server.</p>
670
- * <p><a id="ERR_DOMAIN_CALLBACK_NOT_AVAILABLE"></a></p>
671
- */
672
- ERR_DNS_SET_SERVERS_FAILED = "ERR_DNS_SET_SERVERS_FAILED",
673
- /**
674
- * <p>The <code>node:domain</code> module was not usable since it could not establish the
675
- * required error handling hooks, because
676
- * <a href="process.html#processsetuncaughtexceptioncapturecallbackfn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> had been called at an
677
- * earlier point in time.</p>
678
- * <p><a id="ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE"></a></p>
679
- */
680
- ERR_DOMAIN_CALLBACK_NOT_AVAILABLE = "ERR_DOMAIN_CALLBACK_NOT_AVAILABLE",
681
- /**
682
- * <p><a href="process.html#processsetuncaughtexceptioncapturecallbackfn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> could not be called
683
- * because the <code>node:domain</code> module has been loaded at an earlier point in time.</p>
684
- * <p>The stack trace is extended to include the point in time at which the
685
- * <code>node:domain</code> module had been loaded.</p>
686
- * <p><a id="ERR_DUPLICATE_STARTUP_SNAPSHOT_MAIN_FUNCTION"></a></p>
687
- */
688
- ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE = "ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE",
689
- /**
690
- * <p><a href="v8.html#v8startupsnapshotsetdeserializemainfunctioncallback-data"><code>v8.startupSnapshot.setDeserializeMainFunction()</code></a> could not be called
691
- * because it had already been called before.</p>
692
- * <p><a id="ERR_ENCODING_INVALID_ENCODED_DATA"></a></p>
693
- */
694
- ERR_DUPLICATE_STARTUP_SNAPSHOT_MAIN_FUNCTION = "ERR_DUPLICATE_STARTUP_SNAPSHOT_MAIN_FUNCTION",
695
- /**
696
- * <p>Data provided to <code>TextDecoder()</code> API was invalid according to the encoding
697
- * provided.</p>
698
- * <p><a id="ERR_ENCODING_NOT_SUPPORTED"></a></p>
699
- */
700
- ERR_ENCODING_INVALID_ENCODED_DATA = "ERR_ENCODING_INVALID_ENCODED_DATA",
701
- /**
702
- * <p>Encoding provided to <code>TextDecoder()</code> API was not one of the
703
- * <a href="util.html#whatwg-supported-encodings">WHATWG Supported Encodings</a>.</p>
704
- * <p><a id="ERR_EVAL_ESM_CANNOT_PRINT"></a></p>
705
- */
706
- ERR_ENCODING_NOT_SUPPORTED = "ERR_ENCODING_NOT_SUPPORTED",
707
- /**
708
- * <p><code>--print</code> cannot be used with ESM input.</p>
709
- * <p><a id="ERR_EVENT_RECURSION"></a></p>
710
- */
711
- ERR_EVAL_ESM_CANNOT_PRINT = "ERR_EVAL_ESM_CANNOT_PRINT",
712
- /**
713
- * <p>Thrown when an attempt is made to recursively dispatch an event on <code>EventTarget</code>.</p>
714
- * <p><a id="ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE"></a></p>
715
- */
716
- ERR_EVENT_RECURSION = "ERR_EVENT_RECURSION",
717
- /**
718
- * <p>The JS execution context is not associated with a Node.js environment.
719
- * This may occur when Node.js is used as an embedded library and some hooks
720
- * for the JS engine are not set up properly.</p>
721
- * <p><a id="ERR_FALSY_VALUE_REJECTION"></a></p>
722
- */
723
- ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE = "ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE",
724
- /**
725
- * <p>A <code>Promise</code> that was callbackified via <code>util.callbackify()</code> was rejected with a
726
- * falsy value.</p>
727
- * <p><a id="ERR_FEATURE_UNAVAILABLE_ON_PLATFORM"></a></p>
728
- */
729
- ERR_FALSY_VALUE_REJECTION = "ERR_FALSY_VALUE_REJECTION",
730
- /**
731
- * <p>Used when a feature that is not available
732
- * to the current platform which is running Node.js is used.</p>
733
- * <p><a id="ERR_FS_CP_DIR_TO_NON_DIR"></a></p>
734
- */
735
- ERR_FEATURE_UNAVAILABLE_ON_PLATFORM = "ERR_FEATURE_UNAVAILABLE_ON_PLATFORM",
736
- /**
737
- * <p>An attempt was made to copy a directory to a non-directory (file, symlink,
738
- * etc.) using <a href="fs.html#fscpsrc-dest-options-callback"><code>fs.cp()</code></a>.</p>
739
- * <p><a id="ERR_FS_CP_EEXIST"></a></p>
740
- */
741
- ERR_FS_CP_DIR_TO_NON_DIR = "ERR_FS_CP_DIR_TO_NON_DIR",
742
- /**
743
- * <p>An attempt was made to copy over a file that already existed with
744
- * <a href="fs.html#fscpsrc-dest-options-callback"><code>fs.cp()</code></a>, with the <code>force</code> and <code>errorOnExist</code> set to <code>true</code>.</p>
745
- * <p><a id="ERR_FS_CP_EINVAL"></a></p>
746
- */
747
- ERR_FS_CP_EEXIST = "ERR_FS_CP_EEXIST",
748
- /**
749
- * <p>When using <a href="fs.html#fscpsrc-dest-options-callback"><code>fs.cp()</code></a>, <code>src</code> or <code>dest</code> pointed to an invalid path.</p>
750
- * <p><a id="ERR_FS_CP_FIFO_PIPE"></a></p>
751
- */
752
- ERR_FS_CP_EINVAL = "ERR_FS_CP_EINVAL",
753
- /**
754
- * <p>An error is thrown when writing to an HTTP response which does not allow
755
- * contents. <a id="ERR_HTTP_BODY_NOT_ALLOWED"></a></p>
756
- */
757
- ERR_HTTP_BODY_NOT_ALLOWED = "ERR_HTTP_BODY_NOT_ALLOWED",
758
- /**
759
- * <p>Response body size doesn't match with the specified content-length header value.</p>
760
- * <p><a id="ERR_HTTP_CONTENT_LENGTH_MISMATCH"></a></p>
761
- */
762
- ERR_HTTP_CONTENT_LENGTH_MISMATCH = "ERR_HTTP_CONTENT_LENGTH_MISMATCH",
763
- /**
764
- * <p>An attempt was made to copy a named pipe with <a href="fs.html#fscpsrc-dest-options-callback"><code>fs.cp()</code></a>.</p>
765
- * <p><a id="ERR_FS_CP_NON_DIR_TO_DIR"></a></p>
766
- */
767
- ERR_FS_CP_FIFO_PIPE = "ERR_FS_CP_FIFO_PIPE",
768
- /**
769
- * <p>An attempt was made to copy a non-directory (file, symlink, etc.) to a directory
770
- * using <a href="fs.html#fscpsrc-dest-options-callback"><code>fs.cp()</code></a>.</p>
771
- * <p><a id="ERR_FS_CP_SOCKET"></a></p>
772
- */
773
- ERR_FS_CP_NON_DIR_TO_DIR = "ERR_FS_CP_NON_DIR_TO_DIR",
774
- /**
775
- * <p>An attempt was made to copy to a socket with <a href="fs.html#fscpsrc-dest-options-callback"><code>fs.cp()</code></a>.</p>
776
- * <p><a id="ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY"></a></p>
777
- */
778
- ERR_FS_CP_SOCKET = "ERR_FS_CP_SOCKET",
779
- /**
780
- * <p>When using <a href="fs.html#fscpsrc-dest-options-callback"><code>fs.cp()</code></a>, a symlink in <code>dest</code> pointed to a subdirectory
781
- * of <code>src</code>.</p>
782
- * <p><a id="ERR_FS_CP_UNKNOWN"></a></p>
783
- */
784
- ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY = "ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY",
785
- /**
786
- * <p>An attempt was made to copy to an unknown file type with <a href="fs.html#fscpsrc-dest-options-callback"><code>fs.cp()</code></a>.</p>
787
- * <p><a id="ERR_FS_EISDIR"></a></p>
788
- */
789
- ERR_FS_CP_UNKNOWN = "ERR_FS_CP_UNKNOWN",
790
- /**
791
- * <p>Path is a directory.</p>
792
- * <p><a id="ERR_FS_FILE_TOO_LARGE"></a></p>
793
- */
794
- ERR_FS_EISDIR = "ERR_FS_EISDIR",
795
- /**
796
- * <p>An attempt has been made to read a file whose size is larger than the maximum
797
- * allowed size for a <code>Buffer</code>.</p>
798
- * <p><a id="ERR_FS_INVALID_SYMLINK_TYPE"></a></p>
799
- */
800
- ERR_FS_FILE_TOO_LARGE = "ERR_FS_FILE_TOO_LARGE",
801
- /**
802
- * <p>An invalid symlink type was passed to the <a href="fs.html#fssymlinktarget-path-type-callback"><code>fs.symlink()</code></a> or
803
- * <a href="fs.html#fssymlinksynctarget-path-type"><code>fs.symlinkSync()</code></a> methods.</p>
804
- * <p><a id="ERR_HTTP_HEADERS_SENT"></a></p>
805
- */
806
- ERR_FS_INVALID_SYMLINK_TYPE = "ERR_FS_INVALID_SYMLINK_TYPE",
807
- /**
808
- * <p>An attempt was made to add more headers after the headers had already been sent.</p>
809
- * <p><a id="ERR_HTTP_INVALID_HEADER_VALUE"></a></p>
810
- */
811
- ERR_HTTP_HEADERS_SENT = "ERR_HTTP_HEADERS_SENT",
812
- /**
813
- * <p>An invalid HTTP header value was specified.</p>
814
- * <p><a id="ERR_HTTP_INVALID_STATUS_CODE"></a></p>
815
- */
816
- ERR_HTTP_INVALID_HEADER_VALUE = "ERR_HTTP_INVALID_HEADER_VALUE",
817
- /**
818
- * <p>Status code was outside the regular status code range (100-999).</p>
819
- * <p><a id="ERR_HTTP_REQUEST_TIMEOUT"></a></p>
820
- */
821
- ERR_HTTP_INVALID_STATUS_CODE = "ERR_HTTP_INVALID_STATUS_CODE",
822
- /**
823
- * <p>The client has not sent the entire request within the allowed time.</p>
824
- * <p><a id="ERR_HTTP_SOCKET_ASSIGNED"></a></p>
825
- */
826
- ERR_HTTP_REQUEST_TIMEOUT = "ERR_HTTP_REQUEST_TIMEOUT",
827
- /**
828
- * <p>The given <a href="http.html#class-httpserverresponse"><code>ServerResponse</code></a> was already assigned a socket.</p>
829
- * <p><a id="ERR_HTTP_SOCKET_ENCODING"></a></p>
830
- */
831
- ERR_HTTP_SOCKET_ASSIGNED = "ERR_HTTP_SOCKET_ASSIGNED",
832
- /**
833
- * <p>Changing the socket encoding is not allowed per <a href="https://tools.ietf.org/html/rfc7230#section-3">RFC 7230 Section 3</a>.</p>
834
- * <p><a id="ERR_HTTP_TRAILER_INVALID"></a></p>
835
- */
836
- ERR_HTTP_SOCKET_ENCODING = "ERR_HTTP_SOCKET_ENCODING",
837
- /**
838
- * <p>The <code>Trailer</code> header was set even though the transfer encoding does not support
839
- * that.</p>
840
- * <p><a id="ERR_HTTP2_ALTSVC_INVALID_ORIGIN"></a></p>
841
- */
842
- ERR_HTTP_TRAILER_INVALID = "ERR_HTTP_TRAILER_INVALID",
843
- /**
844
- * <p>HTTP/2 ALTSVC frames require a valid origin.</p>
845
- * <p><a id="ERR_HTTP2_ALTSVC_LENGTH"></a></p>
846
- */
847
- ERR_HTTP2_ALTSVC_INVALID_ORIGIN = "ERR_HTTP2_ALTSVC_INVALID_ORIGIN",
848
- /**
849
- * <p>HTTP/2 ALTSVC frames are limited to a maximum of 16,382 payload bytes.</p>
850
- * <p><a id="ERR_HTTP2_CONNECT_AUTHORITY"></a></p>
851
- */
852
- ERR_HTTP2_ALTSVC_LENGTH = "ERR_HTTP2_ALTSVC_LENGTH",
853
- /**
854
- * <p>For HTTP/2 requests using the <code>CONNECT</code> method, the <code>:authority</code> pseudo-header
855
- * is required.</p>
856
- * <p><a id="ERR_HTTP2_CONNECT_PATH"></a></p>
857
- */
858
- ERR_HTTP2_CONNECT_AUTHORITY = "ERR_HTTP2_CONNECT_AUTHORITY",
859
- /**
860
- * <p>For HTTP/2 requests using the <code>CONNECT</code> method, the <code>:path</code> pseudo-header is
861
- * forbidden.</p>
862
- * <p><a id="ERR_HTTP2_CONNECT_SCHEME"></a></p>
863
- */
864
- ERR_HTTP2_CONNECT_PATH = "ERR_HTTP2_CONNECT_PATH",
865
- /**
866
- * <p>For HTTP/2 requests using the <code>CONNECT</code> method, the <code>:scheme</code> pseudo-header is
867
- * forbidden.</p>
868
- * <p><a id="ERR_HTTP2_ERROR"></a></p>
869
- */
870
- ERR_HTTP2_CONNECT_SCHEME = "ERR_HTTP2_CONNECT_SCHEME",
871
- /**
872
- * <p>A non-specific HTTP/2 error has occurred.</p>
873
- * <p><a id="ERR_HTTP2_GOAWAY_SESSION"></a></p>
874
- */
875
- ERR_HTTP2_ERROR = "ERR_HTTP2_ERROR",
876
- /**
877
- * <p>New HTTP/2 Streams may not be opened after the <code>Http2Session</code> has received a
878
- * <code>GOAWAY</code> frame from the connected peer.</p>
879
- * <p><a id="ERR_HTTP2_HEADER_SINGLE_VALUE"></a></p>
880
- */
881
- ERR_HTTP2_GOAWAY_SESSION = "ERR_HTTP2_GOAWAY_SESSION",
882
- /**
883
- * <p>Multiple values were provided for an HTTP/2 header field that was required to
884
- * have only a single value.</p>
885
- * <p><a id="ERR_HTTP2_HEADERS_AFTER_RESPOND"></a></p>
886
- */
887
- ERR_HTTP2_HEADER_SINGLE_VALUE = "ERR_HTTP2_HEADER_SINGLE_VALUE",
888
- /**
889
- * <p>An additional headers was specified after an HTTP/2 response was initiated.</p>
890
- * <p><a id="ERR_HTTP2_HEADERS_SENT"></a></p>
891
- */
892
- ERR_HTTP2_HEADERS_AFTER_RESPOND = "ERR_HTTP2_HEADERS_AFTER_RESPOND",
893
- /**
894
- * <p>An attempt was made to send multiple response headers.</p>
895
- * <p><a id="ERR_HTTP2_INFO_STATUS_NOT_ALLOWED"></a></p>
896
- */
897
- ERR_HTTP2_HEADERS_SENT = "ERR_HTTP2_HEADERS_SENT",
898
- /**
899
- * <p>Informational HTTP status codes (<code>1xx</code>) may not be set as the response status
900
- * code on HTTP/2 responses.</p>
901
- * <p><a id="ERR_HTTP2_INVALID_CONNECTION_HEADERS"></a></p>
902
- */
903
- ERR_HTTP2_INFO_STATUS_NOT_ALLOWED = "ERR_HTTP2_INFO_STATUS_NOT_ALLOWED",
904
- /**
905
- * <p>HTTP/1 connection specific headers are forbidden to be used in HTTP/2
906
- * requests and responses.</p>
907
- * <p><a id="ERR_HTTP2_INVALID_HEADER_VALUE"></a></p>
908
- */
909
- ERR_HTTP2_INVALID_CONNECTION_HEADERS = "ERR_HTTP2_INVALID_CONNECTION_HEADERS",
910
- /**
911
- * <p>An invalid HTTP/2 header value was specified.</p>
912
- * <p><a id="ERR_HTTP2_INVALID_INFO_STATUS"></a></p>
913
- */
914
- ERR_HTTP2_INVALID_HEADER_VALUE = "ERR_HTTP2_INVALID_HEADER_VALUE",
915
- /**
916
- * <p>An invalid HTTP informational status code has been specified. Informational
917
- * status codes must be an integer between <code>100</code> and <code>199</code> (inclusive).</p>
918
- * <p><a id="ERR_HTTP2_INVALID_ORIGIN"></a></p>
919
- */
920
- ERR_HTTP2_INVALID_INFO_STATUS = "ERR_HTTP2_INVALID_INFO_STATUS",
921
- /**
922
- * <p>HTTP/2 <code>ORIGIN</code> frames require a valid origin.</p>
923
- * <p><a id="ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH"></a></p>
924
- */
925
- ERR_HTTP2_INVALID_ORIGIN = "ERR_HTTP2_INVALID_ORIGIN",
926
- /**
927
- * <p>Input <code>Buffer</code> and <code>Uint8Array</code> instances passed to the
928
- * <code>http2.getUnpackedSettings()</code> API must have a length that is a multiple of
929
- * six.</p>
930
- * <p><a id="ERR_HTTP2_INVALID_PSEUDOHEADER"></a></p>
931
- */
932
- ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH = "ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH",
933
- /**
934
- * <p>Only valid HTTP/2 pseudoheaders (<code>:status</code>, <code>:path</code>, <code>:authority</code>, <code>:scheme</code>,
935
- * and <code>:method</code>) may be used.</p>
936
- * <p><a id="ERR_HTTP2_INVALID_SESSION"></a></p>
937
- */
938
- ERR_HTTP2_INVALID_PSEUDOHEADER = "ERR_HTTP2_INVALID_PSEUDOHEADER",
939
- /**
940
- * <p>An action was performed on an <code>Http2Session</code> object that had already been
941
- * destroyed.</p>
942
- * <p><a id="ERR_HTTP2_INVALID_SETTING_VALUE"></a></p>
943
- */
944
- ERR_HTTP2_INVALID_SESSION = "ERR_HTTP2_INVALID_SESSION",
945
- /**
946
- * <p>An invalid value has been specified for an HTTP/2 setting.</p>
947
- * <p><a id="ERR_HTTP2_INVALID_STREAM"></a></p>
948
- */
949
- ERR_HTTP2_INVALID_SETTING_VALUE = "ERR_HTTP2_INVALID_SETTING_VALUE",
950
- /**
951
- * <p>An operation was performed on a stream that had already been destroyed.</p>
952
- * <p><a id="ERR_HTTP2_MAX_PENDING_SETTINGS_ACK"></a></p>
953
- */
954
- ERR_HTTP2_INVALID_STREAM = "ERR_HTTP2_INVALID_STREAM",
955
- /**
956
- * <p>Whenever an HTTP/2 <code>SETTINGS</code> frame is sent to a connected peer, the peer is
957
- * required to send an acknowledgment that it has received and applied the new
958
- * <code>SETTINGS</code>. By default, a maximum number of unacknowledged <code>SETTINGS</code> frames may
959
- * be sent at any given time. This error code is used when that limit has been
960
- * reached.</p>
961
- * <p><a id="ERR_HTTP2_NESTED_PUSH"></a></p>
962
- */
963
- ERR_HTTP2_MAX_PENDING_SETTINGS_ACK = "ERR_HTTP2_MAX_PENDING_SETTINGS_ACK",
964
- /**
965
- * <p>An attempt was made to initiate a new push stream from within a push stream.
966
- * Nested push streams are not permitted.</p>
967
- * <p><a id="ERR_HTTP2_NO_MEM"></a></p>
968
- */
969
- ERR_HTTP2_NESTED_PUSH = "ERR_HTTP2_NESTED_PUSH",
970
- /**
971
- * <p>Out of memory when using the <code>http2session.setLocalWindowSize(windowSize)</code> API.</p>
972
- * <p><a id="ERR_HTTP2_NO_SOCKET_MANIPULATION"></a></p>
973
- */
974
- ERR_HTTP2_NO_MEM = "ERR_HTTP2_NO_MEM",
975
- /**
976
- * <p>An attempt was made to directly manipulate (read, write, pause, resume, etc.) a
977
- * socket attached to an <code>Http2Session</code>.</p>
978
- * <p><a id="ERR_HTTP2_ORIGIN_LENGTH"></a></p>
979
- */
980
- ERR_HTTP2_NO_SOCKET_MANIPULATION = "ERR_HTTP2_NO_SOCKET_MANIPULATION",
981
- /**
982
- * <p>HTTP/2 <code>ORIGIN</code> frames are limited to a length of 16382 bytes.</p>
983
- * <p><a id="ERR_HTTP2_OUT_OF_STREAMS"></a></p>
984
- */
985
- ERR_HTTP2_ORIGIN_LENGTH = "ERR_HTTP2_ORIGIN_LENGTH",
986
- /**
987
- * <p>The number of streams created on a single HTTP/2 session reached the maximum
988
- * limit.</p>
989
- * <p><a id="ERR_HTTP2_PAYLOAD_FORBIDDEN"></a></p>
990
- */
991
- ERR_HTTP2_OUT_OF_STREAMS = "ERR_HTTP2_OUT_OF_STREAMS",
992
- /**
993
- * <p>A message payload was specified for an HTTP response code for which a payload is
994
- * forbidden.</p>
995
- * <p><a id="ERR_HTTP2_PING_CANCEL"></a></p>
996
- */
997
- ERR_HTTP2_PAYLOAD_FORBIDDEN = "ERR_HTTP2_PAYLOAD_FORBIDDEN",
998
- /**
999
- * <p>An HTTP/2 ping was canceled.</p>
1000
- * <p><a id="ERR_HTTP2_PING_LENGTH"></a></p>
1001
- */
1002
- ERR_HTTP2_PING_CANCEL = "ERR_HTTP2_PING_CANCEL",
1003
- /**
1004
- * <p>HTTP/2 ping payloads must be exactly 8 bytes in length.</p>
1005
- * <p><a id="ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED"></a></p>
1006
- */
1007
- ERR_HTTP2_PING_LENGTH = "ERR_HTTP2_PING_LENGTH",
1008
- /**
1009
- * <p>An HTTP/2 pseudo-header has been used inappropriately. Pseudo-headers are header
1010
- * key names that begin with the <code>:</code> prefix.</p>
1011
- * <p><a id="ERR_HTTP2_PUSH_DISABLED"></a></p>
1012
- */
1013
- ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED = "ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED",
1014
- /**
1015
- * <p>An attempt was made to create a push stream, which had been disabled by the
1016
- * client.</p>
1017
- * <p><a id="ERR_HTTP2_SEND_FILE"></a></p>
1018
- */
1019
- ERR_HTTP2_PUSH_DISABLED = "ERR_HTTP2_PUSH_DISABLED",
1020
- /**
1021
- * <p>An attempt was made to use the <code>Http2Stream.prototype.responseWithFile()</code> API to
1022
- * send a directory.</p>
1023
- * <p><a id="ERR_HTTP2_SEND_FILE_NOSEEK"></a></p>
1024
- */
1025
- ERR_HTTP2_SEND_FILE = "ERR_HTTP2_SEND_FILE",
1026
- /**
1027
- * <p>An attempt was made to use the <code>Http2Stream.prototype.responseWithFile()</code> API to
1028
- * send something other than a regular file, but <code>offset</code> or <code>length</code> options were
1029
- * provided.</p>
1030
- * <p><a id="ERR_HTTP2_SESSION_ERROR"></a></p>
1031
- */
1032
- ERR_HTTP2_SEND_FILE_NOSEEK = "ERR_HTTP2_SEND_FILE_NOSEEK",
1033
- /**
1034
- * <p>The <code>Http2Session</code> closed with a non-zero error code.</p>
1035
- * <p><a id="ERR_HTTP2_SETTINGS_CANCEL"></a></p>
1036
- */
1037
- ERR_HTTP2_SESSION_ERROR = "ERR_HTTP2_SESSION_ERROR",
1038
- /**
1039
- * <p>The <code>Http2Session</code> settings canceled.</p>
1040
- * <p><a id="ERR_HTTP2_SOCKET_BOUND"></a></p>
1041
- */
1042
- ERR_HTTP2_SETTINGS_CANCEL = "ERR_HTTP2_SETTINGS_CANCEL",
1043
- /**
1044
- * <p>An attempt was made to connect a <code>Http2Session</code> object to a <code>net.Socket</code> or
1045
- * <code>tls.TLSSocket</code> that had already been bound to another <code>Http2Session</code> object.</p>
1046
- * <p><a id="ERR_HTTP2_SOCKET_UNBOUND"></a></p>
1047
- */
1048
- ERR_HTTP2_SOCKET_BOUND = "ERR_HTTP2_SOCKET_BOUND",
1049
- /**
1050
- * <p>An attempt was made to use the <code>socket</code> property of an <code>Http2Session</code> that
1051
- * has already been closed.</p>
1052
- * <p><a id="ERR_HTTP2_STATUS_101"></a></p>
1053
- */
1054
- ERR_HTTP2_SOCKET_UNBOUND = "ERR_HTTP2_SOCKET_UNBOUND",
1055
- /**
1056
- * <p>Use of the <code>101</code> Informational status code is forbidden in HTTP/2.</p>
1057
- * <p><a id="ERR_HTTP2_STATUS_INVALID"></a></p>
1058
- */
1059
- ERR_HTTP2_STATUS_101 = "ERR_HTTP2_STATUS_101",
1060
- /**
1061
- * <p>An invalid HTTP status code has been specified. Status codes must be an integer
1062
- * between <code>100</code> and <code>599</code> (inclusive).</p>
1063
- * <p><a id="ERR_HTTP2_STREAM_CANCEL"></a></p>
1064
- */
1065
- ERR_HTTP2_STATUS_INVALID = "ERR_HTTP2_STATUS_INVALID",
1066
- /**
1067
- * <p>An <code>Http2Stream</code> was destroyed before any data was transmitted to the connected
1068
- * peer.</p>
1069
- * <p><a id="ERR_HTTP2_STREAM_ERROR"></a></p>
1070
- */
1071
- ERR_HTTP2_STREAM_CANCEL = "ERR_HTTP2_STREAM_CANCEL",
1072
- /**
1073
- * <p>A non-zero error code was been specified in an <code>RST_STREAM</code> frame.</p>
1074
- * <p><a id="ERR_HTTP2_STREAM_SELF_DEPENDENCY"></a></p>
1075
- */
1076
- ERR_HTTP2_STREAM_ERROR = "ERR_HTTP2_STREAM_ERROR",
1077
- /**
1078
- * <p>When setting the priority for an HTTP/2 stream, the stream may be marked as
1079
- * a dependency for a parent stream. This error code is used when an attempt is
1080
- * made to mark a stream and dependent of itself.</p>
1081
- * <p><a id="ERR_HTTP2_TOO_MANY_CUSTOM_SETTINGS"></a></p>
1082
- */
1083
- ERR_HTTP2_STREAM_SELF_DEPENDENCY = "ERR_HTTP2_STREAM_SELF_DEPENDENCY",
1084
- /**
1085
- * <p>The number of supported custom settings (10) has been exceeded.</p>
1086
- * <p><a id="ERR_HTTP2_TOO_MANY_INVALID_FRAMES"></a></p>
1087
- */
1088
- ERR_HTTP2_TOO_MANY_CUSTOM_SETTINGS = "ERR_HTTP2_TOO_MANY_CUSTOM_SETTINGS",
1089
- /**
1090
- * <p>The limit of acceptable invalid HTTP/2 protocol frames sent by the peer,
1091
- * as specified through the <code>maxSessionInvalidFrames</code> option, has been exceeded.</p>
1092
- * <p><a id="ERR_HTTP2_TRAILERS_ALREADY_SENT"></a></p>
1093
- */
1094
- ERR_HTTP2_TOO_MANY_INVALID_FRAMES = "ERR_HTTP2_TOO_MANY_INVALID_FRAMES",
1095
- /**
1096
- * <p>Trailing headers have already been sent on the <code>Http2Stream</code>.</p>
1097
- * <p><a id="ERR_HTTP2_TRAILERS_NOT_READY"></a></p>
1098
- */
1099
- ERR_HTTP2_TRAILERS_ALREADY_SENT = "ERR_HTTP2_TRAILERS_ALREADY_SENT",
1100
- /**
1101
- * <p>The <code>http2stream.sendTrailers()</code> method cannot be called until after the
1102
- * <code>'wantTrailers'</code> event is emitted on an <code>Http2Stream</code> object. The
1103
- * <code>'wantTrailers'</code> event will only be emitted if the <code>waitForTrailers</code> option
1104
- * is set for the <code>Http2Stream</code>.</p>
1105
- * <p><a id="ERR_HTTP2_UNSUPPORTED_PROTOCOL"></a></p>
1106
- */
1107
- ERR_HTTP2_TRAILERS_NOT_READY = "ERR_HTTP2_TRAILERS_NOT_READY",
1108
- /**
1109
- * <p><code>http2.connect()</code> was passed a URL that uses any protocol other than <code>http:</code> or
1110
- * <code>https:</code>.</p>
1111
- * <p><a id="ERR_ILLEGAL_CONSTRUCTOR"></a></p>
1112
- */
1113
- ERR_HTTP2_UNSUPPORTED_PROTOCOL = "ERR_HTTP2_UNSUPPORTED_PROTOCOL",
1114
- /**
1115
- * <p>An attempt was made to construct an object using a non-public constructor.</p>
1116
- * <p><a id="ERR_IMPORT_ATTRIBUTE_TYPE_INCOMPATIBLE"></a></p>
1117
- */
1118
- ERR_ILLEGAL_CONSTRUCTOR = "ERR_ILLEGAL_CONSTRUCTOR",
1119
- /**
1120
- * <p>An import <code>type</code> attribute was provided, but the specified module is of a
1121
- * different type.</p>
1122
- * <p><a id="ERR_IMPORT_ATTRIBUTE_MISSING"></a></p>
1123
- */
1124
- ERR_IMPORT_ATTRIBUTE_TYPE_INCOMPATIBLE = "ERR_IMPORT_ATTRIBUTE_TYPE_INCOMPATIBLE",
1125
- /**
1126
- * <p>An import attribute is missing, preventing the specified module to be imported.</p>
1127
- * <p><a id="ERR_IMPORT_ATTRIBUTE_UNSUPPORTED"></a></p>
1128
- */
1129
- ERR_IMPORT_ATTRIBUTE_MISSING = "ERR_IMPORT_ATTRIBUTE_MISSING",
1130
- /**
1131
- * <p>An import attribute is not supported by this version of Node.js.</p>
1132
- * <p><a id="ERR_INCOMPATIBLE_OPTION_PAIR"></a></p>
1133
- */
1134
- ERR_IMPORT_ATTRIBUTE_UNSUPPORTED = "ERR_IMPORT_ATTRIBUTE_UNSUPPORTED",
1135
- /**
1136
- * <p>An option pair is incompatible with each other and cannot be used at the same
1137
- * time.</p>
1138
- * <p><a id="ERR_INPUT_TYPE_NOT_ALLOWED"></a></p>
1139
- */
1140
- ERR_INCOMPATIBLE_OPTION_PAIR = "ERR_INCOMPATIBLE_OPTION_PAIR",
1141
- /**
1142
- * <p>The <code>--input-type</code> flag was used to attempt to execute a file. This flag can
1143
- * only be used with input via <code>--eval</code>, <code>--print</code>, or <code>STDIN</code>.</p>
1144
- * <p><a id="ERR_INSPECTOR_ALREADY_ACTIVATED"></a></p>
1145
- */
1146
- ERR_INPUT_TYPE_NOT_ALLOWED = "ERR_INPUT_TYPE_NOT_ALLOWED",
1147
- /**
1148
- * <p>While using the <code>node:inspector</code> module, an attempt was made to activate the
1149
- * inspector when it already started to listen on a port. Use <code>inspector.close()</code>
1150
- * before activating it on a different address.</p>
1151
- * <p><a id="ERR_INSPECTOR_ALREADY_CONNECTED"></a></p>
1152
- */
1153
- ERR_INSPECTOR_ALREADY_ACTIVATED = "ERR_INSPECTOR_ALREADY_ACTIVATED",
1154
- /**
1155
- * <p>While using the <code>node:inspector</code> module, an attempt was made to connect when the
1156
- * inspector was already connected.</p>
1157
- * <p><a id="ERR_INSPECTOR_CLOSED"></a></p>
1158
- */
1159
- ERR_INSPECTOR_ALREADY_CONNECTED = "ERR_INSPECTOR_ALREADY_CONNECTED",
1160
- /**
1161
- * <p>While using the <code>node:inspector</code> module, an attempt was made to use the
1162
- * inspector after the session had already closed.</p>
1163
- * <p><a id="ERR_INSPECTOR_COMMAND"></a></p>
1164
- */
1165
- ERR_INSPECTOR_CLOSED = "ERR_INSPECTOR_CLOSED",
1166
- /**
1167
- * <p>An error occurred while issuing a command via the <code>node:inspector</code> module.</p>
1168
- * <p><a id="ERR_INSPECTOR_NOT_ACTIVE"></a></p>
1169
- */
1170
- ERR_INSPECTOR_COMMAND = "ERR_INSPECTOR_COMMAND",
1171
- /**
1172
- * <p>The <code>inspector</code> is not active when <code>inspector.waitForDebugger()</code> is called.</p>
1173
- * <p><a id="ERR_INSPECTOR_NOT_AVAILABLE"></a></p>
1174
- */
1175
- ERR_INSPECTOR_NOT_ACTIVE = "ERR_INSPECTOR_NOT_ACTIVE",
1176
- /**
1177
- * <p>The <code>node:inspector</code> module is not available for use.</p>
1178
- * <p><a id="ERR_INSPECTOR_NOT_CONNECTED"></a></p>
1179
- */
1180
- ERR_INSPECTOR_NOT_AVAILABLE = "ERR_INSPECTOR_NOT_AVAILABLE",
1181
- /**
1182
- * <p>While using the <code>node:inspector</code> module, an attempt was made to use the
1183
- * inspector before it was connected.</p>
1184
- * <p><a id="ERR_INSPECTOR_NOT_WORKER"></a></p>
1185
- */
1186
- ERR_INSPECTOR_NOT_CONNECTED = "ERR_INSPECTOR_NOT_CONNECTED",
1187
- /**
1188
- * <p>An API was called on the main thread that can only be used from
1189
- * the worker thread.</p>
1190
- * <p><a id="ERR_INTERNAL_ASSERTION"></a></p>
1191
- */
1192
- ERR_INSPECTOR_NOT_WORKER = "ERR_INSPECTOR_NOT_WORKER",
1193
- /**
1194
- * <p>There was a bug in Node.js or incorrect usage of Node.js internals.
1195
- * To fix the error, open an issue at <a href="https://github.com/nodejs/node/issues">https://github.com/nodejs/node/issues</a>.</p>
1196
- * <p><a id="ERR_INVALID_ADDRESS_FAMILY"></a></p>
1197
- */
1198
- ERR_INTERNAL_ASSERTION = "ERR_INTERNAL_ASSERTION",
1199
- /**
1200
- * <p>The provided address family is not understood by the Node.js API.</p>
1201
- * <p><a id="ERR_INVALID_ARG_TYPE"></a></p>
1202
- */
1203
- ERR_INVALID_ADDRESS_FAMILY = "ERR_INVALID_ADDRESS_FAMILY",
1204
- /**
1205
- * <p>An argument of the wrong type was passed to a Node.js API.</p>
1206
- * <p><a id="ERR_INVALID_ARG_VALUE"></a></p>
1207
- */
1208
- ERR_INVALID_ARG_TYPE = "ERR_INVALID_ARG_TYPE",
1209
- /**
1210
- * <p>An invalid or unsupported value was passed for a given argument.</p>
1211
- * <p><a id="ERR_INVALID_ASYNC_ID"></a></p>
1212
- */
1213
- ERR_INVALID_ARG_VALUE = "ERR_INVALID_ARG_VALUE",
1214
- /**
1215
- * <p>An invalid <code>asyncId</code> or <code>triggerAsyncId</code> was passed using <code>AsyncHooks</code>. An id
1216
- * less than -1 should never happen.</p>
1217
- * <p><a id="ERR_INVALID_BUFFER_SIZE"></a></p>
1218
- */
1219
- ERR_INVALID_ASYNC_ID = "ERR_INVALID_ASYNC_ID",
1220
- /**
1221
- * <p>A swap was performed on a <code>Buffer</code> but its size was not compatible with the
1222
- * operation.</p>
1223
- * <p><a id="ERR_INVALID_CHAR"></a></p>
1224
- */
1225
- ERR_INVALID_BUFFER_SIZE = "ERR_INVALID_BUFFER_SIZE",
1226
- /**
1227
- * <p>Invalid characters were detected in headers.</p>
1228
- * <p><a id="ERR_INVALID_CURSOR_POS"></a></p>
1229
- */
1230
- ERR_INVALID_CHAR = "ERR_INVALID_CHAR",
1231
- /**
1232
- * <p>A cursor on a given stream cannot be moved to a specified row without a
1233
- * specified column.</p>
1234
- * <p><a id="ERR_INVALID_FD"></a></p>
1235
- */
1236
- ERR_INVALID_CURSOR_POS = "ERR_INVALID_CURSOR_POS",
1237
- /**
1238
- * <p>A file descriptor ('fd') was not valid (e.g. it was a negative value).</p>
1239
- * <p><a id="ERR_INVALID_FD_TYPE"></a></p>
1240
- */
1241
- ERR_INVALID_FD = "ERR_INVALID_FD",
1242
- /**
1243
- * <p>A file descriptor ('fd') type was not valid.</p>
1244
- * <p><a id="ERR_INVALID_FILE_URL_HOST"></a></p>
1245
- */
1246
- ERR_INVALID_FD_TYPE = "ERR_INVALID_FD_TYPE",
1247
- /**
1248
- * <p>A Node.js API that consumes <code>file:</code> URLs (such as certain functions in the
1249
- * <a href="fs.html"><code>fs</code></a> module) encountered a file URL with an incompatible host. This
1250
- * situation can only occur on Unix-like systems where only <code>localhost</code> or an empty
1251
- * host is supported.</p>
1252
- * <p><a id="ERR_INVALID_FILE_URL_PATH"></a></p>
1253
- */
1254
- ERR_INVALID_FILE_URL_HOST = "ERR_INVALID_FILE_URL_HOST",
1255
- /**
1256
- * <p>A Node.js API that consumes <code>file:</code> URLs (such as certain functions in the
1257
- * <a href="fs.html"><code>fs</code></a> module) encountered a file URL with an incompatible path. The exact
1258
- * semantics for determining whether a path can be used is platform-dependent.</p>
1259
- * <p><a id="ERR_INVALID_HANDLE_TYPE"></a></p>
1260
- */
1261
- ERR_INVALID_FILE_URL_PATH = "ERR_INVALID_FILE_URL_PATH",
1262
- /**
1263
- * <p>An attempt was made to send an unsupported "handle" over an IPC communication
1264
- * channel to a child process. See <a href="child_process.html#subprocesssendmessage-sendhandle-options-callback"><code>subprocess.send()</code></a> and <a href="process.html#processsendmessage-sendhandle-options-callback"><code>process.send()</code></a>
1265
- * for more information.</p>
1266
- * <p><a id="ERR_INVALID_HTTP_TOKEN"></a></p>
1267
- */
1268
- ERR_INVALID_HANDLE_TYPE = "ERR_INVALID_HANDLE_TYPE",
1269
- /**
1270
- * <p>An invalid HTTP token was supplied.</p>
1271
- * <p><a id="ERR_INVALID_IP_ADDRESS"></a></p>
1272
- */
1273
- ERR_INVALID_HTTP_TOKEN = "ERR_INVALID_HTTP_TOKEN",
1274
- /**
1275
- * <p>An IP address is not valid.</p>
1276
- * <p><a id="ERR_INVALID_MIME_SYNTAX"></a></p>
1277
- */
1278
- ERR_INVALID_IP_ADDRESS = "ERR_INVALID_IP_ADDRESS",
1279
- /**
1280
- * <p>The syntax of a MIME is not valid.</p>
1281
- * <p><a id="ERR_INVALID_MODULE"></a></p>
1282
- */
1283
- ERR_INVALID_MIME_SYNTAX = "ERR_INVALID_MIME_SYNTAX",
1284
- /**
1285
- * <p>An attempt was made to load a module that does not exist or was otherwise not
1286
- * valid.</p>
1287
- * <p><a id="ERR_INVALID_MODULE_SPECIFIER"></a></p>
1288
- */
1289
- ERR_INVALID_MODULE = "ERR_INVALID_MODULE",
1290
- /**
1291
- * <p>The imported module string is an invalid URL, package name, or package subpath
1292
- * specifier.</p>
1293
- * <p><a id="ERR_INVALID_OBJECT_DEFINE_PROPERTY"></a></p>
1294
- */
1295
- ERR_INVALID_MODULE_SPECIFIER = "ERR_INVALID_MODULE_SPECIFIER",
1296
- /**
1297
- * <p>An error occurred while setting an invalid attribute on the property of
1298
- * an object.</p>
1299
- * <p><a id="ERR_INVALID_PACKAGE_CONFIG"></a></p>
1300
- */
1301
- ERR_INVALID_OBJECT_DEFINE_PROPERTY = "ERR_INVALID_OBJECT_DEFINE_PROPERTY",
1302
- /**
1303
- * <p>An invalid <a href="packages.html#nodejs-packagejson-field-definitions"><code>package.json</code></a> file failed parsing.</p>
1304
- * <p><a id="ERR_INVALID_PACKAGE_TARGET"></a></p>
1305
- */
1306
- ERR_INVALID_PACKAGE_CONFIG = "ERR_INVALID_PACKAGE_CONFIG",
1307
- /**
1308
- * <p>The <code>package.json</code> <a href="packages.html#exports"><code>"exports"</code></a> field contains an invalid target mapping
1309
- * value for the attempted module resolution.</p>
1310
- * <p><a id="ERR_INVALID_PERFORMANCE_MARK"></a></p>
1311
- */
1312
- ERR_INVALID_PACKAGE_TARGET = "ERR_INVALID_PACKAGE_TARGET",
1313
- /**
1314
- * <p>While using the Performance Timing API (<code>perf_hooks</code>), a performance mark is
1315
- * invalid.</p>
1316
- * <p><a id="ERR_INVALID_PROTOCOL"></a></p>
1317
- */
1318
- ERR_INVALID_PERFORMANCE_MARK = "ERR_INVALID_PERFORMANCE_MARK",
1319
- /**
1320
- * <p>An invalid <code>options.protocol</code> was passed to <code>http.request()</code>.</p>
1321
- * <p><a id="ERR_INVALID_REPL_EVAL_CONFIG"></a></p>
1322
- */
1323
- ERR_INVALID_PROTOCOL = "ERR_INVALID_PROTOCOL",
1324
- /**
1325
- * <p>Both <code>breakEvalOnSigint</code> and <code>eval</code> options were set in the <a href="repl.html"><code>REPL</code></a> config,
1326
- * which is not supported.</p>
1327
- * <p><a id="ERR_INVALID_REPL_INPUT"></a></p>
1328
- */
1329
- ERR_INVALID_REPL_EVAL_CONFIG = "ERR_INVALID_REPL_EVAL_CONFIG",
1330
- /**
1331
- * <p>The input may not be used in the <a href="repl.html"><code>REPL</code></a>. The conditions under which this
1332
- * error is used are described in the <a href="repl.html"><code>REPL</code></a> documentation.</p>
1333
- * <p><a id="ERR_INVALID_RETURN_PROPERTY"></a></p>
1334
- */
1335
- ERR_INVALID_REPL_INPUT = "ERR_INVALID_REPL_INPUT",
1336
- /**
1337
- * <p>Thrown in case a function option does not provide a valid value for one of its
1338
- * returned object properties on execution.</p>
1339
- * <p><a id="ERR_INVALID_RETURN_PROPERTY_VALUE"></a></p>
1340
- */
1341
- ERR_INVALID_RETURN_PROPERTY = "ERR_INVALID_RETURN_PROPERTY",
1342
- /**
1343
- * <p>Thrown in case a function option does not provide an expected value
1344
- * type for one of its returned object properties on execution.</p>
1345
- * <p><a id="ERR_INVALID_RETURN_VALUE"></a></p>
1346
- */
1347
- ERR_INVALID_RETURN_PROPERTY_VALUE = "ERR_INVALID_RETURN_PROPERTY_VALUE",
1348
- /**
1349
- * <p>Thrown in case a function option does not return an expected value
1350
- * type on execution, such as when a function is expected to return a promise.</p>
1351
- * <p><a id="ERR_INVALID_STATE"></a></p>
1352
- */
1353
- ERR_INVALID_RETURN_VALUE = "ERR_INVALID_RETURN_VALUE",
1354
- /**
1355
- * <p>Indicates that an operation cannot be completed due to an invalid state.
1356
- * For instance, an object may have already been destroyed, or may be
1357
- * performing another operation.</p>
1358
- * <p><a id="ERR_INVALID_SYNC_FORK_INPUT"></a></p>
1359
- */
1360
- ERR_INVALID_STATE = "ERR_INVALID_STATE",
1361
- /**
1362
- * <p>A <code>Buffer</code>, <code>TypedArray</code>, <code>DataView</code>, or <code>string</code> was provided as stdio input to
1363
- * an asynchronous fork. See the documentation for the <a href="child_process.html"><code>child_process</code></a> module
1364
- * for more information.</p>
1365
- * <p><a id="ERR_INVALID_THIS"></a></p>
1366
- */
1367
- ERR_INVALID_SYNC_FORK_INPUT = "ERR_INVALID_SYNC_FORK_INPUT",
1368
- /**
1369
- * <p>A Node.js API function was called with an incompatible <code>this</code> value.</p>
1370
- * <pre><code class="language-js">const urlSearchParams = new URLSearchParams('foo=bar&#x26;baz=new');
1371
- *
1372
- * const buf = Buffer.alloc(1);
1373
- * urlSearchParams.has.call(buf, 'foo');
1374
- * // Throws a TypeError with code 'ERR_INVALID_THIS'
1375
- * </code></pre>
1376
- * <p><a id="ERR_INVALID_TUPLE"></a></p>
1377
- */
1378
- ERR_INVALID_THIS = "ERR_INVALID_THIS",
1379
- /**
1380
- * <p>An element in the <code>iterable</code> provided to the <a href="url.html#the-whatwg-url-api">WHATWG</a>
1381
- * <a href="url.html#new-urlsearchparamsiterable"><code>URLSearchParams</code> constructor</a> did not
1382
- * represent a <code>[name, value]</code> tuple – that is, if an element is not iterable, or
1383
- * does not consist of exactly two elements.</p>
1384
- * <p><a id="ERR_INVALID_URI"></a></p>
1385
- */
1386
- ERR_INVALID_TUPLE = "ERR_INVALID_TUPLE",
1387
- /**
1388
- * <p>An invalid URI was passed.</p>
1389
- * <p><a id="ERR_INVALID_URL"></a></p>
1390
- */
1391
- ERR_INVALID_URI = "ERR_INVALID_URI",
1392
- /**
1393
- * <p>An invalid URL was passed to the <a href="url.html#the-whatwg-url-api">WHATWG</a> <a href="url.html#new-urlinput-base"><code>URL</code>
1394
- * constructor</a> or the legacy <a href="url.html#urlparseurlstring-parsequerystring-slashesdenotehost"><code>url.parse()</code></a> to be parsed.
1395
- * The thrown error object typically has an additional property <code>'input'</code> that
1396
- * contains the URL that failed to parse.</p>
1397
- * <p><a id="ERR_INVALID_URL_SCHEME"></a></p>
1398
- */
1399
- ERR_INVALID_URL = "ERR_INVALID_URL",
1400
- /**
1401
- * <p>An attempt was made to use a URL of an incompatible scheme (protocol) for a
1402
- * specific purpose. It is only used in the <a href="url.html#the-whatwg-url-api">WHATWG URL API</a> support in the
1403
- * <a href="fs.html"><code>fs</code></a> module (which only accepts URLs with <code>'file'</code> scheme), but may be used
1404
- * in other Node.js APIs as well in the future.</p>
1405
- * <p><a id="ERR_IPC_CHANNEL_CLOSED"></a></p>
1406
- */
1407
- ERR_INVALID_URL_SCHEME = "ERR_INVALID_URL_SCHEME",
1408
- /**
1409
- * <p>An attempt was made to use an IPC communication channel that was already closed.</p>
1410
- * <p><a id="ERR_IPC_DISCONNECTED"></a></p>
1411
- */
1412
- ERR_IPC_CHANNEL_CLOSED = "ERR_IPC_CHANNEL_CLOSED",
1413
- /**
1414
- * <p>An attempt was made to disconnect an IPC communication channel that was already
1415
- * disconnected. See the documentation for the <a href="child_process.html"><code>child_process</code></a> module
1416
- * for more information.</p>
1417
- * <p><a id="ERR_IPC_ONE_PIPE"></a></p>
1418
- */
1419
- ERR_IPC_DISCONNECTED = "ERR_IPC_DISCONNECTED",
1420
- /**
1421
- * <p>An attempt was made to create a child Node.js process using more than one IPC
1422
- * communication channel. See the documentation for the <a href="child_process.html"><code>child_process</code></a> module
1423
- * for more information.</p>
1424
- * <p><a id="ERR_IPC_SYNC_FORK"></a></p>
1425
- */
1426
- ERR_IPC_ONE_PIPE = "ERR_IPC_ONE_PIPE",
1427
- /**
1428
- * <p>An attempt was made to open an IPC communication channel with a synchronously
1429
- * forked Node.js process. See the documentation for the <a href="child_process.html"><code>child_process</code></a> module
1430
- * for more information.</p>
1431
- * <p><a id="ERR_LOADER_CHAIN_INCOMPLETE"></a></p>
1432
- */
1433
- ERR_IPC_SYNC_FORK = "ERR_IPC_SYNC_FORK",
1434
- /**
1435
- * <p>An ESM loader hook returned without calling <code>next()</code> and without explicitly
1436
- * signaling a short circuit.</p>
1437
- * <p><a id="ERR_MEMORY_ALLOCATION_FAILED"></a></p>
1438
- */
1439
- ERR_LOADER_CHAIN_INCOMPLETE = "ERR_LOADER_CHAIN_INCOMPLETE",
1440
- /**
1441
- * <p>An attempt was made to allocate memory (usually in the C++ layer) but it
1442
- * failed.</p>
1443
- * <p><a id="ERR_MESSAGE_TARGET_CONTEXT_UNAVAILABLE"></a></p>
1444
- */
1445
- ERR_MEMORY_ALLOCATION_FAILED = "ERR_MEMORY_ALLOCATION_FAILED",
1446
- /**
1447
- * <p>A message posted to a <a href="worker_threads.html#class-messageport"><code>MessagePort</code></a> could not be deserialized in the target
1448
- * <a href="vm.html">vm</a> <code>Context</code>. Not all Node.js objects can be successfully instantiated in
1449
- * any context at this time, and attempting to transfer them using <code>postMessage()</code>
1450
- * can fail on the receiving side in that case.</p>
1451
- * <p><a id="ERR_METHOD_NOT_IMPLEMENTED"></a></p>
1452
- */
1453
- ERR_MESSAGE_TARGET_CONTEXT_UNAVAILABLE = "ERR_MESSAGE_TARGET_CONTEXT_UNAVAILABLE",
1454
- /**
1455
- * <p>A method is required but not implemented.</p>
1456
- * <p><a id="ERR_MISSING_ARGS"></a></p>
1457
- */
1458
- ERR_METHOD_NOT_IMPLEMENTED = "ERR_METHOD_NOT_IMPLEMENTED",
1459
- /**
1460
- * <p>A required argument of a Node.js API was not passed. This is only used for
1461
- * strict compliance with the API specification (which in some cases may accept
1462
- * <code>func(undefined)</code> but not <code>func()</code>). In most native Node.js APIs,
1463
- * <code>func(undefined)</code> and <code>func()</code> are treated identically, and the
1464
- * <a href="#err_invalid_arg_type"><code>ERR_INVALID_ARG_TYPE</code></a> error code may be used instead.</p>
1465
- * <p><a id="ERR_MISSING_OPTION"></a></p>
1466
- */
1467
- ERR_MISSING_ARGS = "ERR_MISSING_ARGS",
1468
- /**
1469
- * <p>For APIs that accept options objects, some options might be mandatory. This code
1470
- * is thrown if a required option is missing.</p>
1471
- * <p><a id="ERR_MISSING_PASSPHRASE"></a></p>
1472
- */
1473
- ERR_MISSING_OPTION = "ERR_MISSING_OPTION",
1474
- /**
1475
- * <p>An attempt was made to read an encrypted key without specifying a passphrase.</p>
1476
- * <p><a id="ERR_MISSING_PLATFORM_FOR_WORKER"></a></p>
1477
- */
1478
- ERR_MISSING_PASSPHRASE = "ERR_MISSING_PASSPHRASE",
1479
- /**
1480
- * <p>The V8 platform used by this instance of Node.js does not support creating
1481
- * Workers. This is caused by lack of embedder support for Workers. In particular,
1482
- * this error will not occur with standard builds of Node.js.</p>
1483
- * <p><a id="ERR_MODULE_NOT_FOUND"></a></p>
1484
- */
1485
- ERR_MISSING_PLATFORM_FOR_WORKER = "ERR_MISSING_PLATFORM_FOR_WORKER",
1486
- /**
1487
- * <p>A module file could not be resolved by the ECMAScript modules loader while
1488
- * attempting an <code>import</code> operation or when loading the program entry point.</p>
1489
- * <p><a id="ERR_MULTIPLE_CALLBACK"></a></p>
1490
- */
1491
- ERR_MODULE_NOT_FOUND = "ERR_MODULE_NOT_FOUND",
1492
- /**
1493
- * <p>A callback was called more than once.</p>
1494
- * <p>A callback is almost always meant to only be called once as the query
1495
- * can either be fulfilled or rejected but not both at the same time. The latter
1496
- * would be possible by calling a callback more than once.</p>
1497
- * <p><a id="ERR_NAPI_CONS_FUNCTION"></a></p>
1498
- */
1499
- ERR_MULTIPLE_CALLBACK = "ERR_MULTIPLE_CALLBACK",
1500
- /**
1501
- * <p>While using <code>Node-API</code>, a constructor passed was not a function.</p>
1502
- * <p><a id="ERR_NAPI_INVALID_DATAVIEW_ARGS"></a></p>
1503
- */
1504
- ERR_NAPI_CONS_FUNCTION = "ERR_NAPI_CONS_FUNCTION",
1505
- /**
1506
- * <p>While calling <code>napi_create_dataview()</code>, a given <code>offset</code> was outside the bounds
1507
- * of the dataview or <code>offset + length</code> was larger than a length of given <code>buffer</code>.</p>
1508
- * <p><a id="ERR_NAPI_INVALID_TYPEDARRAY_ALIGNMENT"></a></p>
1509
- */
1510
- ERR_NAPI_INVALID_DATAVIEW_ARGS = "ERR_NAPI_INVALID_DATAVIEW_ARGS",
1511
- /**
1512
- * <p>While calling <code>napi_create_typedarray()</code>, the provided <code>offset</code> was not a
1513
- * multiple of the element size.</p>
1514
- * <p><a id="ERR_NAPI_INVALID_TYPEDARRAY_LENGTH"></a></p>
1515
- */
1516
- ERR_NAPI_INVALID_TYPEDARRAY_ALIGNMENT = "ERR_NAPI_INVALID_TYPEDARRAY_ALIGNMENT",
1517
- /**
1518
- * <p>While calling <code>napi_create_typedarray()</code>, <code>(length * size_of_element) + byte_offset</code> was larger than the length of given <code>buffer</code>.</p>
1519
- * <p><a id="ERR_NAPI_TSFN_CALL_JS"></a></p>
1520
- */
1521
- ERR_NAPI_INVALID_TYPEDARRAY_LENGTH = "ERR_NAPI_INVALID_TYPEDARRAY_LENGTH",
1522
- /**
1523
- * <p>An error occurred while invoking the JavaScript portion of the thread-safe
1524
- * function.</p>
1525
- * <p><a id="ERR_NAPI_TSFN_GET_UNDEFINED"></a></p>
1526
- */
1527
- ERR_NAPI_TSFN_CALL_JS = "ERR_NAPI_TSFN_CALL_JS",
1528
- /**
1529
- * <p>An error occurred while attempting to retrieve the JavaScript <code>undefined</code>
1530
- * value.</p>
1531
- * <p><a id="ERR_NAPI_TSFN_START_IDLE_LOOP"></a></p>
1532
- */
1533
- ERR_NAPI_TSFN_GET_UNDEFINED = "ERR_NAPI_TSFN_GET_UNDEFINED",
1534
- /**
1535
- * <p>On the main thread, values are removed from the queue associated with the
1536
- * thread-safe function in an idle loop. This error indicates that an error
1537
- * has occurred when attempting to start the loop.</p>
1538
- * <p><a id="ERR_NAPI_TSFN_STOP_IDLE_LOOP"></a></p>
1539
- */
1540
- ERR_NAPI_TSFN_START_IDLE_LOOP = "ERR_NAPI_TSFN_START_IDLE_LOOP",
1541
- /**
1542
- * <p>Once no more items are left in the queue, the idle loop must be suspended. This
1543
- * error indicates that the idle loop has failed to stop.</p>
1544
- * <p><a id="ERR_NOT_BUILDING_SNAPSHOT"></a></p>
1545
- */
1546
- ERR_NAPI_TSFN_STOP_IDLE_LOOP = "ERR_NAPI_TSFN_STOP_IDLE_LOOP",
1547
- /**
1548
- * <p>An attempt was made to use operations that can only be used when building
1549
- * V8 startup snapshot even though Node.js isn't building one.</p>
1550
- * <p><a id="ERR_NOT_IN_SINGLE_EXECUTABLE_APPLICATION"></a></p>
1551
- */
1552
- ERR_NOT_BUILDING_SNAPSHOT = "ERR_NOT_BUILDING_SNAPSHOT",
1553
- /**
1554
- * <p>The operation cannot be performed when it's not in a single-executable
1555
- * application.</p>
1556
- * <p><a id="ERR_NOT_SUPPORTED_IN_SNAPSHOT"></a></p>
1557
- */
1558
- ERR_NOT_IN_SINGLE_EXECUTABLE_APPLICATION = "ERR_NOT_IN_SINGLE_EXECUTABLE_APPLICATION",
1559
- /**
1560
- * <p>An attempt was made to perform operations that are not supported when
1561
- * building a startup snapshot.</p>
1562
- * <p><a id="ERR_NO_CRYPTO"></a></p>
1563
- */
1564
- ERR_NOT_SUPPORTED_IN_SNAPSHOT = "ERR_NOT_SUPPORTED_IN_SNAPSHOT",
1565
- /**
1566
- * <p>An attempt was made to use crypto features while Node.js was not compiled with
1567
- * OpenSSL crypto support.</p>
1568
- * <p><a id="ERR_NO_ICU"></a></p>
1569
- */
1570
- ERR_NO_CRYPTO = "ERR_NO_CRYPTO",
1571
- /**
1572
- * <p>An attempt was made to use features that require <a href="intl.html#internationalization-support">ICU</a>, but Node.js was not
1573
- * compiled with ICU support.</p>
1574
- * <p><a id="ERR_NON_CONTEXT_AWARE_DISABLED"></a></p>
1575
- */
1576
- ERR_NO_ICU = "ERR_NO_ICU",
1577
- /**
1578
- * <p>A non-context-aware native addon was loaded in a process that disallows them.</p>
1579
- * <p><a id="ERR_OUT_OF_RANGE"></a></p>
1580
- */
1581
- ERR_NON_CONTEXT_AWARE_DISABLED = "ERR_NON_CONTEXT_AWARE_DISABLED",
1582
- /**
1583
- * <p>A given value is out of the accepted range.</p>
1584
- * <p><a id="ERR_PACKAGE_IMPORT_NOT_DEFINED"></a></p>
1585
- */
1586
- ERR_OUT_OF_RANGE = "ERR_OUT_OF_RANGE",
1587
- /**
1588
- * <p>The <code>package.json</code> <a href="packages.html#imports"><code>"imports"</code></a> field does not define the given internal
1589
- * package specifier mapping.</p>
1590
- * <p><a id="ERR_PACKAGE_PATH_NOT_EXPORTED"></a></p>
1591
- */
1592
- ERR_PACKAGE_IMPORT_NOT_DEFINED = "ERR_PACKAGE_IMPORT_NOT_DEFINED",
1593
- /**
1594
- * <p>The <code>package.json</code> <a href="packages.html#exports"><code>"exports"</code></a> field does not export the requested subpath.
1595
- * Because exports are encapsulated, private internal modules that are not exported
1596
- * cannot be imported through the package resolution, unless using an absolute URL.</p>
1597
- * <p><a id="ERR_PARSE_ARGS_INVALID_OPTION_VALUE"></a></p>
1598
- */
1599
- ERR_PACKAGE_PATH_NOT_EXPORTED = "ERR_PACKAGE_PATH_NOT_EXPORTED",
1600
- /**
1601
- * <p>When <code>strict</code> set to <code>true</code>, thrown by <a href="util.html#utilparseargsconfig"><code>util.parseArgs()</code></a> if a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type">&lt;boolean&gt;</a>
1602
- * value is provided for an option of type <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;string&gt;</a>, or if a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;string&gt;</a>
1603
- * value is provided for an option of type <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type">&lt;boolean&gt;</a>.</p>
1604
- * <p><a id="ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL"></a></p>
1605
- */
1606
- ERR_PARSE_ARGS_INVALID_OPTION_VALUE = "ERR_PARSE_ARGS_INVALID_OPTION_VALUE",
1607
- /**
1608
- * <p>Thrown by <a href="util.html#utilparseargsconfig"><code>util.parseArgs()</code></a>, when a positional argument is provided and
1609
- * <code>allowPositionals</code> is set to <code>false</code>.</p>
1610
- * <p><a id="ERR_PARSE_ARGS_UNKNOWN_OPTION"></a></p>
1611
- */
1612
- ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL = "ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL",
1613
- /**
1614
- * <p>When <code>strict</code> set to <code>true</code>, thrown by <a href="util.html#utilparseargsconfig"><code>util.parseArgs()</code></a> if an argument
1615
- * is not configured in <code>options</code>.</p>
1616
- * <p><a id="ERR_PERFORMANCE_INVALID_TIMESTAMP"></a></p>
1617
- */
1618
- ERR_PARSE_ARGS_UNKNOWN_OPTION = "ERR_PARSE_ARGS_UNKNOWN_OPTION",
1619
- /**
1620
- * <p>An invalid timestamp value was provided for a performance mark or measure.</p>
1621
- * <p><a id="ERR_PERFORMANCE_MEASURE_INVALID_OPTIONS"></a></p>
1622
- */
1623
- ERR_PERFORMANCE_INVALID_TIMESTAMP = "ERR_PERFORMANCE_INVALID_TIMESTAMP",
1624
- /**
1625
- * <p>Invalid options were provided for a performance measure.</p>
1626
- * <p><a id="ERR_PROTO_ACCESS"></a></p>
1627
- */
1628
- ERR_PERFORMANCE_MEASURE_INVALID_OPTIONS = "ERR_PERFORMANCE_MEASURE_INVALID_OPTIONS",
1629
- /**
1630
- * <p>Accessing <code>Object.prototype.__proto__</code> has been forbidden using
1631
- * <a href="cli.html#--disable-protomode"><code>--disable-proto=throw</code></a>. <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf"><code>Object.getPrototypeOf</code></a> and
1632
- * <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf"><code>Object.setPrototypeOf</code></a> should be used to get and set the prototype of an
1633
- * object.</p>
1634
- * <p><a id="ERR_REQUIRE_CYCLE_MODULE"></a></p>
1635
- */
1636
- ERR_PROTO_ACCESS = "ERR_PROTO_ACCESS",
1637
- /**
1638
- * <p>When trying to <code>require()</code> a <a href="esm.html">ES Module</a> under <code>--experimental-require-module</code>,
1639
- * a CommonJS to ESM or ESM to CommonJS edge participates in an immediate cycle.
1640
- * This is not allowed because ES Modules cannot be evaluated while they are
1641
- * already being evaluated.</p>
1642
- * <p>To avoid the cycle, the <code>require()</code> call involved in a cycle should not happen
1643
- * at the top-level of either an ES Module (via <code>createRequire()</code>) or a CommonJS
1644
- * module, and should be done lazily in an inner function.</p>
1645
- * <p><a id="ERR_REQUIRE_ASYNC_MODULE"></a></p>
1646
- */
1647
- ERR_REQUIRE_CYCLE_MODULE = "ERR_REQUIRE_CYCLE_MODULE",
1648
- /**
1649
- * <p>When trying to <code>require()</code> a <a href="esm.html">ES Module</a> under <code>--experimental-require-module</code>,
1650
- * the module turns out to be asynchronous. That is, it contains top-level await.</p>
1651
- * <p>To see where the top-level await is, use
1652
- * <code>--experimental-print-required-tla</code> (this would execute the modules
1653
- * before looking for the top-level awaits).</p>
1654
- * <p><a id="ERR_REQUIRE_ESM"></a></p>
1655
- */
1656
- ERR_REQUIRE_ASYNC_MODULE = "ERR_REQUIRE_ASYNC_MODULE",
1657
- /**
1658
- * <p>An attempt was made to <code>require()</code> an <a href="esm.html">ES Module</a>.</p>
1659
- * <p>To enable <code>require()</code> for synchronous module graphs (without
1660
- * top-level <code>await</code>), use <code>--experimental-require-module</code>.</p>
1661
- * <p><a id="ERR_SCRIPT_EXECUTION_INTERRUPTED"></a></p>
1662
- */
1663
- ERR_REQUIRE_ESM = "ERR_REQUIRE_ESM",
1664
- /**
1665
- * <p>Script execution was interrupted by <code>SIGINT</code> (For
1666
- * example, <kbd>Ctrl</kbd>+<kbd>C</kbd> was pressed.)</p>
1667
- * <p><a id="ERR_SCRIPT_EXECUTION_TIMEOUT"></a></p>
1668
- */
1669
- ERR_SCRIPT_EXECUTION_INTERRUPTED = "ERR_SCRIPT_EXECUTION_INTERRUPTED",
1670
- /**
1671
- * <p>Script execution timed out, possibly due to bugs in the script being executed.</p>
1672
- * <p><a id="ERR_SERVER_ALREADY_LISTEN"></a></p>
1673
- */
1674
- ERR_SCRIPT_EXECUTION_TIMEOUT = "ERR_SCRIPT_EXECUTION_TIMEOUT",
1675
- /**
1676
- * <p>The <a href="net.html#serverlisten"><code>server.listen()</code></a> method was called while a <code>net.Server</code> was already
1677
- * listening. This applies to all instances of <code>net.Server</code>, including HTTP, HTTPS,
1678
- * and HTTP/2 <code>Server</code> instances.</p>
1679
- * <p><a id="ERR_SERVER_NOT_RUNNING"></a></p>
1680
- */
1681
- ERR_SERVER_ALREADY_LISTEN = "ERR_SERVER_ALREADY_LISTEN",
1682
- /**
1683
- * <p>The <a href="net.html#serverclosecallback"><code>server.close()</code></a> method was called when a <code>net.Server</code> was not
1684
- * running. This applies to all instances of <code>net.Server</code>, including HTTP, HTTPS,
1685
- * and HTTP/2 <code>Server</code> instances.</p>
1686
- * <p><a id="ERR_SINGLE_EXECUTABLE_APPLICATION_ASSET_NOT_FOUND"></a></p>
1687
- */
1688
- ERR_SERVER_NOT_RUNNING = "ERR_SERVER_NOT_RUNNING",
1689
- /**
1690
- * <p>A key was passed to single executable application APIs to identify an asset,
1691
- * but no match could be found.</p>
1692
- * <p><a id="ERR_SOCKET_ALREADY_BOUND"></a></p>
1693
- */
1694
- ERR_SINGLE_EXECUTABLE_APPLICATION_ASSET_NOT_FOUND = "ERR_SINGLE_EXECUTABLE_APPLICATION_ASSET_NOT_FOUND",
1695
- /**
1696
- * <p>An attempt was made to bind a socket that has already been bound.</p>
1697
- * <p><a id="ERR_SOCKET_BAD_BUFFER_SIZE"></a></p>
1698
- */
1699
- ERR_SOCKET_ALREADY_BOUND = "ERR_SOCKET_ALREADY_BOUND",
1700
- /**
1701
- * <p>An invalid (negative) size was passed for either the <code>recvBufferSize</code> or
1702
- * <code>sendBufferSize</code> options in <a href="dgram.html#dgramcreatesocketoptions-callback"><code>dgram.createSocket()</code></a>.</p>
1703
- * <p><a id="ERR_SOCKET_BAD_PORT"></a></p>
1704
- */
1705
- ERR_SOCKET_BAD_BUFFER_SIZE = "ERR_SOCKET_BAD_BUFFER_SIZE",
1706
- /**
1707
- * <p>An API function expecting a port >= 0 and &#x3C; 65536 received an invalid value.</p>
1708
- * <p><a id="ERR_SOCKET_BAD_TYPE"></a></p>
1709
- */
1710
- ERR_SOCKET_BAD_PORT = "ERR_SOCKET_BAD_PORT",
1711
- /**
1712
- * <p>An API function expecting a socket type (<code>udp4</code> or <code>udp6</code>) received an invalid
1713
- * value.</p>
1714
- * <p><a id="ERR_SOCKET_BUFFER_SIZE"></a></p>
1715
- */
1716
- ERR_SOCKET_BAD_TYPE = "ERR_SOCKET_BAD_TYPE",
1717
- /**
1718
- * <p>While using <a href="dgram.html#dgramcreatesocketoptions-callback"><code>dgram.createSocket()</code></a>, the size of the receive or send <code>Buffer</code>
1719
- * could not be determined.</p>
1720
- * <p><a id="ERR_SOCKET_CLOSED"></a></p>
1721
- */
1722
- ERR_SOCKET_BUFFER_SIZE = "ERR_SOCKET_BUFFER_SIZE",
1723
- /**
1724
- * <p>An attempt was made to operate on an already closed socket.</p>
1725
- * <p><a id="ERR_SOCKET_CLOSED_BEFORE_CONNECTION"></a></p>
1726
- */
1727
- ERR_SOCKET_CLOSED = "ERR_SOCKET_CLOSED",
1728
- /**
1729
- * <p>When calling <a href="net.html#socketwritedata-encoding-callback"><code>net.Socket.write()</code></a> on a connecting socket and the socket was
1730
- * closed before the connection was established.</p>
1731
- * <p><a id="ERR_SOCKET_CONNECTION_TIMEOUT"></a></p>
1732
- */
1733
- ERR_SOCKET_CLOSED_BEFORE_CONNECTION = "ERR_SOCKET_CLOSED_BEFORE_CONNECTION",
1734
- /**
1735
- * <p>The socket was unable to connect to any address returned by the DNS within the
1736
- * allowed timeout when using the family autoselection algorithm.</p>
1737
- * <p><a id="ERR_SOCKET_DGRAM_IS_CONNECTED"></a></p>
1738
- */
1739
- ERR_SOCKET_CONNECTION_TIMEOUT = "ERR_SOCKET_CONNECTION_TIMEOUT",
1740
- /**
1741
- * <p>A <a href="dgram.html#socketconnectport-address-callback"><code>dgram.connect()</code></a> call was made on an already connected socket.</p>
1742
- * <p><a id="ERR_SOCKET_DGRAM_NOT_CONNECTED"></a></p>
1743
- */
1744
- ERR_SOCKET_DGRAM_IS_CONNECTED = "ERR_SOCKET_DGRAM_IS_CONNECTED",
1745
- /**
1746
- * <p>A <a href="dgram.html#socketdisconnect"><code>dgram.disconnect()</code></a> or <a href="dgram.html#socketremoteaddress"><code>dgram.remoteAddress()</code></a> call was made on a
1747
- * disconnected socket.</p>
1748
- * <p><a id="ERR_SOCKET_DGRAM_NOT_RUNNING"></a></p>
1749
- */
1750
- ERR_SOCKET_DGRAM_NOT_CONNECTED = "ERR_SOCKET_DGRAM_NOT_CONNECTED",
1751
- /**
1752
- * <p>A call was made and the UDP subsystem was not running.</p>
1753
- * <p><a id="ERR_SQLITE_ERROR"></a></p>
1754
- */
1755
- ERR_SOCKET_DGRAM_NOT_RUNNING = "ERR_SOCKET_DGRAM_NOT_RUNNING",
1756
- /**
1757
- * <p>An error was returned from <a href="sqlite.html">SQLite</a>.</p>
1758
- * <p><a id="ERR_SRI_PARSE"></a></p>
1759
- */
1760
- ERR_SQLITE_ERROR = "ERR_SQLITE_ERROR",
1761
- /**
1762
- * <p>A string was provided for a Subresource Integrity check, but was unable to be
1763
- * parsed. Check the format of integrity attributes by looking at the
1764
- * <a href="https://www.w3.org/TR/SRI/#the-integrity-attribute">Subresource Integrity specification</a>.</p>
1765
- * <p><a id="ERR_STREAM_ALREADY_FINISHED"></a></p>
1766
- */
1767
- ERR_SRI_PARSE = "ERR_SRI_PARSE",
1768
- /**
1769
- * <p>A stream method was called that cannot complete because the stream was
1770
- * finished.</p>
1771
- * <p><a id="ERR_STREAM_CANNOT_PIPE"></a></p>
1772
- */
1773
- ERR_STREAM_ALREADY_FINISHED = "ERR_STREAM_ALREADY_FINISHED",
1774
- /**
1775
- * <p>An attempt was made to call <a href="stream.html#readablepipedestination-options"><code>stream.pipe()</code></a> on a <a href="stream.html#class-streamwritable"><code>Writable</code></a> stream.</p>
1776
- * <p><a id="ERR_STREAM_DESTROYED"></a></p>
1777
- */
1778
- ERR_STREAM_CANNOT_PIPE = "ERR_STREAM_CANNOT_PIPE",
1779
- /**
1780
- * <p>A stream method was called that cannot complete because the stream was
1781
- * destroyed using <code>stream.destroy()</code>.</p>
1782
- * <p><a id="ERR_STREAM_NULL_VALUES"></a></p>
1783
- */
1784
- ERR_STREAM_DESTROYED = "ERR_STREAM_DESTROYED",
1785
- /**
1786
- * <p>An attempt was made to call <a href="stream.html#writablewritechunk-encoding-callback"><code>stream.write()</code></a> with a <code>null</code> chunk.</p>
1787
- * <p><a id="ERR_STREAM_PREMATURE_CLOSE"></a></p>
1788
- */
1789
- ERR_STREAM_NULL_VALUES = "ERR_STREAM_NULL_VALUES",
1790
- /**
1791
- * <p>An error returned by <code>stream.finished()</code> and <code>stream.pipeline()</code>, when a stream
1792
- * or a pipeline ends non gracefully with no explicit error.</p>
1793
- * <p><a id="ERR_STREAM_PUSH_AFTER_EOF"></a></p>
1794
- */
1795
- ERR_STREAM_PREMATURE_CLOSE = "ERR_STREAM_PREMATURE_CLOSE",
1796
- /**
1797
- * <p>An attempt was made to call <a href="stream.html#readablepushchunk-encoding"><code>stream.push()</code></a> after a <code>null</code>(EOF) had been
1798
- * pushed to the stream.</p>
1799
- * <p><a id="ERR_STREAM_UNSHIFT_AFTER_END_EVENT"></a></p>
1800
- */
1801
- ERR_STREAM_PUSH_AFTER_EOF = "ERR_STREAM_PUSH_AFTER_EOF",
1802
- /**
1803
- * <p>An attempt was made to call <a href="stream.html#readableunshiftchunk-encoding"><code>stream.unshift()</code></a> after the <code>'end'</code> event was
1804
- * emitted.</p>
1805
- * <p><a id="ERR_STREAM_WRAP"></a></p>
1806
- */
1807
- ERR_STREAM_UNSHIFT_AFTER_END_EVENT = "ERR_STREAM_UNSHIFT_AFTER_END_EVENT",
1808
- /**
1809
- * <p>Prevents an abort if a string decoder was set on the Socket or if the decoder
1810
- * is in <code>objectMode</code>.</p>
1811
- * <pre><code class="language-js">const Socket = require('node:net').Socket;
1812
- * const instance = new Socket();
1813
- *
1814
- * instance.setEncoding('utf8');
1815
- * </code></pre>
1816
- * <p><a id="ERR_STREAM_WRITE_AFTER_END"></a></p>
1817
- */
1818
- ERR_STREAM_WRAP = "ERR_STREAM_WRAP",
1819
- /**
1820
- * <p>An attempt was made to call <a href="stream.html#writablewritechunk-encoding-callback"><code>stream.write()</code></a> after <code>stream.end()</code> has been
1821
- * called.</p>
1822
- * <p><a id="ERR_STRING_TOO_LONG"></a></p>
1823
- */
1824
- ERR_STREAM_WRITE_AFTER_END = "ERR_STREAM_WRITE_AFTER_END",
1825
- /**
1826
- * <p>An attempt has been made to create a string longer than the maximum allowed
1827
- * length.</p>
1828
- * <p><a id="ERR_SYNTHETIC"></a></p>
1829
- */
1830
- ERR_STRING_TOO_LONG = "ERR_STRING_TOO_LONG",
1831
- /**
1832
- * <p>An artificial error object used to capture the call stack for diagnostic
1833
- * reports.</p>
1834
- * <p><a id="ERR_SYSTEM_ERROR"></a></p>
1835
- */
1836
- ERR_SYNTHETIC = "ERR_SYNTHETIC",
1837
- /**
1838
- * <p>An unspecified or non-specific system error has occurred within the Node.js
1839
- * process. The error object will have an <code>err.info</code> object property with
1840
- * additional details.</p>
1841
- * <p><a id="ERR_TAP_LEXER_ERROR"></a></p>
1842
- */
1843
- ERR_SYSTEM_ERROR = "ERR_SYSTEM_ERROR",
1844
- /**
1845
- * <p>An error representing a failing lexer state.</p>
1846
- * <p><a id="ERR_TAP_PARSER_ERROR"></a></p>
1847
- */
1848
- ERR_TAP_LEXER_ERROR = "ERR_TAP_LEXER_ERROR",
1849
- /**
1850
- * <p>An error representing a failing parser state. Additional information about
1851
- * the token causing the error is available via the <code>cause</code> property.</p>
1852
- * <p><a id="ERR_TAP_VALIDATION_ERROR"></a></p>
1853
- */
1854
- ERR_TAP_PARSER_ERROR = "ERR_TAP_PARSER_ERROR",
1855
- /**
1856
- * <p>This error represents a failed TAP validation.</p>
1857
- * <p><a id="ERR_TEST_FAILURE"></a></p>
1858
- */
1859
- ERR_TAP_VALIDATION_ERROR = "ERR_TAP_VALIDATION_ERROR",
1860
- /**
1861
- * <p>This error represents a failed test. Additional information about the failure
1862
- * is available via the <code>cause</code> property. The <code>failureType</code> property specifies
1863
- * what the test was doing when the failure occurred.</p>
1864
- * <p><a id="ERR_TLS_ALPN_CALLBACK_INVALID_RESULT"></a></p>
1865
- */
1866
- ERR_TEST_FAILURE = "ERR_TEST_FAILURE",
1867
- /**
1868
- * <p>This error is thrown when an <code>ALPNCallback</code> returns a value that is not in the
1869
- * list of ALPN protocols offered by the client.</p>
1870
- * <p><a id="ERR_TLS_ALPN_CALLBACK_WITH_PROTOCOLS"></a></p>
1871
- */
1872
- ERR_TLS_ALPN_CALLBACK_INVALID_RESULT = "ERR_TLS_ALPN_CALLBACK_INVALID_RESULT",
1873
- /**
1874
- * <p>This error is thrown when creating a <code>TLSServer</code> if the TLS options include
1875
- * both <code>ALPNProtocols</code> and <code>ALPNCallback</code>. These options are mutually exclusive.</p>
1876
- * <p><a id="ERR_TLS_CERT_ALTNAME_FORMAT"></a></p>
1877
- */
1878
- ERR_TLS_ALPN_CALLBACK_WITH_PROTOCOLS = "ERR_TLS_ALPN_CALLBACK_WITH_PROTOCOLS",
1879
- /**
1880
- * <p>This error is thrown by <code>checkServerIdentity</code> if a user-supplied
1881
- * <code>subjectaltname</code> property violates encoding rules. Certificate objects produced
1882
- * by Node.js itself always comply with encoding rules and will never cause
1883
- * this error.</p>
1884
- * <p><a id="ERR_TLS_CERT_ALTNAME_INVALID"></a></p>
1885
- */
1886
- ERR_TLS_CERT_ALTNAME_FORMAT = "ERR_TLS_CERT_ALTNAME_FORMAT",
1887
- /**
1888
- * <p>While using TLS, the host name/IP of the peer did not match any of the
1889
- * <code>subjectAltNames</code> in its certificate.</p>
1890
- * <p><a id="ERR_TLS_DH_PARAM_SIZE"></a></p>
1891
- */
1892
- ERR_TLS_CERT_ALTNAME_INVALID = "ERR_TLS_CERT_ALTNAME_INVALID",
1893
- /**
1894
- * <p>While using TLS, the parameter offered for the Diffie-Hellman (<code>DH</code>)
1895
- * key-agreement protocol is too small. By default, the key length must be greater
1896
- * than or equal to 1024 bits to avoid vulnerabilities, even though it is strongly
1897
- * recommended to use 2048 bits or larger for stronger security.</p>
1898
- * <p><a id="ERR_TLS_HANDSHAKE_TIMEOUT"></a></p>
1899
- */
1900
- ERR_TLS_DH_PARAM_SIZE = "ERR_TLS_DH_PARAM_SIZE",
1901
- /**
1902
- * <p>A TLS/SSL handshake timed out. In this case, the server must also abort the
1903
- * connection.</p>
1904
- * <p><a id="ERR_TLS_INVALID_CONTEXT"></a></p>
1905
- */
1906
- ERR_TLS_HANDSHAKE_TIMEOUT = "ERR_TLS_HANDSHAKE_TIMEOUT",
1907
- /**
1908
- * <p>The context must be a <code>SecureContext</code>.</p>
1909
- * <p><a id="ERR_TLS_INVALID_PROTOCOL_METHOD"></a></p>
1910
- */
1911
- ERR_TLS_INVALID_CONTEXT = "ERR_TLS_INVALID_CONTEXT",
1912
- /**
1913
- * <p>The specified <code>secureProtocol</code> method is invalid. It is either unknown, or
1914
- * disabled because it is insecure.</p>
1915
- * <p><a id="ERR_TLS_INVALID_PROTOCOL_VERSION"></a></p>
1916
- */
1917
- ERR_TLS_INVALID_PROTOCOL_METHOD = "ERR_TLS_INVALID_PROTOCOL_METHOD",
1918
- /**
1919
- * <p>Valid TLS protocol versions are <code>'TLSv1'</code>, <code>'TLSv1.1'</code>, or <code>'TLSv1.2'</code>.</p>
1920
- * <p><a id="ERR_TLS_INVALID_STATE"></a></p>
1921
- */
1922
- ERR_TLS_INVALID_PROTOCOL_VERSION = "ERR_TLS_INVALID_PROTOCOL_VERSION",
1923
- /**
1924
- * <p>The TLS socket must be connected and securely established. Ensure the 'secure'
1925
- * event is emitted before continuing.</p>
1926
- * <p><a id="ERR_TLS_PROTOCOL_VERSION_CONFLICT"></a></p>
1927
- */
1928
- ERR_TLS_INVALID_STATE = "ERR_TLS_INVALID_STATE",
1929
- /**
1930
- * <p>Attempting to set a TLS protocol <code>minVersion</code> or <code>maxVersion</code> conflicts with an
1931
- * attempt to set the <code>secureProtocol</code> explicitly. Use one mechanism or the other.</p>
1932
- * <p><a id="ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED"></a></p>
1933
- */
1934
- ERR_TLS_PROTOCOL_VERSION_CONFLICT = "ERR_TLS_PROTOCOL_VERSION_CONFLICT",
1935
- /**
1936
- * <p>Failed to set PSK identity hint. Hint may be too long.</p>
1937
- * <p><a id="ERR_TLS_RENEGOTIATION_DISABLED"></a></p>
1938
- */
1939
- ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED = "ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED",
1940
- /**
1941
- * <p>An attempt was made to renegotiate TLS on a socket instance with renegotiation
1942
- * disabled.</p>
1943
- * <p><a id="ERR_TLS_REQUIRED_SERVER_NAME"></a></p>
1944
- */
1945
- ERR_TLS_RENEGOTIATION_DISABLED = "ERR_TLS_RENEGOTIATION_DISABLED",
1946
- /**
1947
- * <p>While using TLS, the <code>server.addContext()</code> method was called without providing
1948
- * a host name in the first parameter.</p>
1949
- * <p><a id="ERR_TLS_SESSION_ATTACK"></a></p>
1950
- */
1951
- ERR_TLS_REQUIRED_SERVER_NAME = "ERR_TLS_REQUIRED_SERVER_NAME",
1952
- /**
1953
- * <p>An excessive amount of TLS renegotiations is detected, which is a potential
1954
- * vector for denial-of-service attacks.</p>
1955
- * <p><a id="ERR_TLS_SNI_FROM_SERVER"></a></p>
1956
- */
1957
- ERR_TLS_SESSION_ATTACK = "ERR_TLS_SESSION_ATTACK",
1958
- /**
1959
- * <p>An attempt was made to issue Server Name Indication from a TLS server-side
1960
- * socket, which is only valid from a client.</p>
1961
- * <p><a id="ERR_TRACE_EVENTS_CATEGORY_REQUIRED"></a></p>
1962
- */
1963
- ERR_TLS_SNI_FROM_SERVER = "ERR_TLS_SNI_FROM_SERVER",
1964
- /**
1965
- * <p>The <code>trace_events.createTracing()</code> method requires at least one trace event
1966
- * category.</p>
1967
- * <p><a id="ERR_TRACE_EVENTS_UNAVAILABLE"></a></p>
1968
- */
1969
- ERR_TRACE_EVENTS_CATEGORY_REQUIRED = "ERR_TRACE_EVENTS_CATEGORY_REQUIRED",
1970
- /**
1971
- * <p>The <code>node:trace_events</code> module could not be loaded because Node.js was compiled
1972
- * with the <code>--without-v8-platform</code> flag.</p>
1973
- * <p><a id="ERR_TRANSFORM_ALREADY_TRANSFORMING"></a></p>
1974
- */
1975
- ERR_TRACE_EVENTS_UNAVAILABLE = "ERR_TRACE_EVENTS_UNAVAILABLE",
1976
- /**
1977
- * <p>A <code>Transform</code> stream finished while it was still transforming.</p>
1978
- * <p><a id="ERR_TRANSFORM_WITH_LENGTH_0"></a></p>
1979
- */
1980
- ERR_TRANSFORM_ALREADY_TRANSFORMING = "ERR_TRANSFORM_ALREADY_TRANSFORMING",
1981
- /**
1982
- * <p>A <code>Transform</code> stream finished with data still in the write buffer.</p>
1983
- * <p><a id="ERR_TTY_INIT_FAILED"></a></p>
1984
- */
1985
- ERR_TRANSFORM_WITH_LENGTH_0 = "ERR_TRANSFORM_WITH_LENGTH_0",
1986
- /**
1987
- * <p>The initialization of a TTY failed due to a system error.</p>
1988
- * <p><a id="ERR_UNAVAILABLE_DURING_EXIT"></a></p>
1989
- */
1990
- ERR_TTY_INIT_FAILED = "ERR_TTY_INIT_FAILED",
1991
- /**
1992
- * <p>Function was called within a <a href="process.html#event-exit"><code>process.on('exit')</code></a> handler that shouldn't be
1993
- * called within <a href="process.html#event-exit"><code>process.on('exit')</code></a> handler.</p>
1994
- * <p><a id="ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET"></a></p>
1995
- */
1996
- ERR_UNAVAILABLE_DURING_EXIT = "ERR_UNAVAILABLE_DURING_EXIT",
1997
- /**
1998
- * <p><a href="process.html#processsetuncaughtexceptioncapturecallbackfn"><code>process.setUncaughtExceptionCaptureCallback()</code></a> was called twice,
1999
- * without first resetting the callback to <code>null</code>.</p>
2000
- * <p>This error is designed to prevent accidentally overwriting a callback registered
2001
- * from another module.</p>
2002
- * <p><a id="ERR_UNESCAPED_CHARACTERS"></a></p>
2003
- */
2004
- ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET = "ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET",
2005
- /**
2006
- * <p>A string that contained unescaped characters was received.</p>
2007
- * <p><a id="ERR_UNHANDLED_ERROR"></a></p>
2008
- */
2009
- ERR_UNESCAPED_CHARACTERS = "ERR_UNESCAPED_CHARACTERS",
2010
- /**
2011
- * <p>An unhandled error occurred (for instance, when an <code>'error'</code> event is emitted
2012
- * by an <a href="events.html#class-eventemitter"><code>EventEmitter</code></a> but an <code>'error'</code> handler is not registered).</p>
2013
- * <p><a id="ERR_UNKNOWN_BUILTIN_MODULE"></a></p>
2014
- */
2015
- ERR_UNHANDLED_ERROR = "ERR_UNHANDLED_ERROR",
2016
- /**
2017
- * <p>Used to identify a specific kind of internal Node.js error that should not
2018
- * typically be triggered by user code. Instances of this error point to an
2019
- * internal bug within the Node.js binary itself.</p>
2020
- * <p><a id="ERR_UNKNOWN_CREDENTIAL"></a></p>
2021
- */
2022
- ERR_UNKNOWN_BUILTIN_MODULE = "ERR_UNKNOWN_BUILTIN_MODULE",
2023
- /**
2024
- * <p>A Unix group or user identifier that does not exist was passed.</p>
2025
- * <p><a id="ERR_UNKNOWN_ENCODING"></a></p>
2026
- */
2027
- ERR_UNKNOWN_CREDENTIAL = "ERR_UNKNOWN_CREDENTIAL",
2028
- /**
2029
- * <p>An invalid or unknown encoding option was passed to an API.</p>
2030
- * <p><a id="ERR_UNKNOWN_FILE_EXTENSION"></a></p>
2031
- */
2032
- ERR_UNKNOWN_ENCODING = "ERR_UNKNOWN_ENCODING",
2033
- /**
2034
- * <p>An attempt was made to load a module with an unknown or unsupported file
2035
- * extension.</p>
2036
- * <p><a id="ERR_UNKNOWN_MODULE_FORMAT"></a></p>
2037
- */
2038
- ERR_UNKNOWN_FILE_EXTENSION = "ERR_UNKNOWN_FILE_EXTENSION",
2039
- /**
2040
- * <p>An attempt was made to load a module with an unknown or unsupported format.</p>
2041
- * <p><a id="ERR_UNKNOWN_SIGNAL"></a></p>
2042
- */
2043
- ERR_UNKNOWN_MODULE_FORMAT = "ERR_UNKNOWN_MODULE_FORMAT",
2044
- /**
2045
- * <p>An invalid or unknown process signal was passed to an API expecting a valid
2046
- * signal (such as <a href="child_process.html#subprocesskillsignal"><code>subprocess.kill()</code></a>).</p>
2047
- * <p><a id="ERR_UNSUPPORTED_DIR_IMPORT"></a></p>
2048
- */
2049
- ERR_UNKNOWN_SIGNAL = "ERR_UNKNOWN_SIGNAL",
2050
- /**
2051
- * <p><code>import</code> a directory URL is unsupported. Instead,
2052
- * <a href="packages.html#self-referencing-a-package-using-its-name">self-reference a package using its name</a> and <a href="packages.html#subpath-exports">define a custom subpath</a> in
2053
- * the <a href="packages.html#exports"><code>"exports"</code></a> field of the <a href="packages.html#nodejs-packagejson-field-definitions"><code>package.json</code></a> file.</p>
2054
- * <pre><code class="language-mjs">import './'; // unsupported
2055
- * import './index.js'; // supported
2056
- * import 'package-name'; // supported
2057
- * </code></pre>
2058
- * <p><a id="ERR_UNSUPPORTED_ESM_URL_SCHEME"></a></p>
2059
- */
2060
- ERR_UNSUPPORTED_DIR_IMPORT = "ERR_UNSUPPORTED_DIR_IMPORT",
2061
- /**
2062
- * <p><code>import</code> with URL schemes other than <code>file</code> and <code>data</code> is unsupported.</p>
2063
- * <p><a id="ERR_UNSUPPORTED_RESOLVE_REQUEST"></a></p>
2064
- */
2065
- ERR_UNSUPPORTED_ESM_URL_SCHEME = "ERR_UNSUPPORTED_ESM_URL_SCHEME",
2066
- /**
2067
- * <p>An attempt was made to resolve an invalid module referrer. This can happen when
2068
- * importing or calling <code>import.meta.resolve()</code> with either:</p>
2069
- * <ul>
2070
- * <li>a bare specifier that is not a builtin module from a module whose URL scheme
2071
- * is not <code>file</code>.</li>
2072
- * <li>a <a href="https://url.spec.whatwg.org/#relative-url-string">relative URL</a> from a module whose URL scheme is not a <a href="https://url.spec.whatwg.org/#special-scheme">special scheme</a>.</li>
2073
- * </ul>
2074
- * <pre><code class="language-mjs">try {
2075
- * // Trying to import the package 'bare-specifier' from a `data:` URL module:
2076
- * await import('data:text/javascript,import "bare-specifier"');
2077
- * } catch (e) {
2078
- * console.log(e.code); // ERR_UNSUPPORTED_RESOLVE_REQUEST
2079
- * }
2080
- * </code></pre>
2081
- * <p><a id="ERR_USE_AFTER_CLOSE"></a></p>
2082
- */
2083
- ERR_UNSUPPORTED_RESOLVE_REQUEST = "ERR_UNSUPPORTED_RESOLVE_REQUEST",
2084
- /**
2085
- * <p>An attempt was made to use something that was already closed.</p>
2086
- * <p><a id="ERR_VALID_PERFORMANCE_ENTRY_TYPE"></a></p>
2087
- */
2088
- ERR_USE_AFTER_CLOSE = "ERR_USE_AFTER_CLOSE",
2089
- /**
2090
- * <p>While using the Performance Timing API (<code>perf_hooks</code>), no valid performance
2091
- * entry types are found.</p>
2092
- * <p><a id="ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG"></a></p>
2093
- */
2094
- ERR_VALID_PERFORMANCE_ENTRY_TYPE = "ERR_VALID_PERFORMANCE_ENTRY_TYPE",
2095
- /**
2096
- * <p>A dynamic import callback was invoked without <code>--experimental-vm-modules</code>.</p>
2097
- * <p><a id="ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING"></a></p>
2098
- */
2099
- ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG = "ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG",
2100
- /**
2101
- * <p>A dynamic import callback was not specified.</p>
2102
- * <p><a id="ERR_VM_MODULE_ALREADY_LINKED"></a></p>
2103
- */
2104
- ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING = "ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING",
2105
- /**
2106
- * <p>The module attempted to be linked is not eligible for linking, because of one of
2107
- * the following reasons:</p>
2108
- * <ul>
2109
- * <li>It has already been linked (<code>linkingStatus</code> is <code>'linked'</code>)</li>
2110
- * <li>It is being linked (<code>linkingStatus</code> is <code>'linking'</code>)</li>
2111
- * <li>Linking has failed for this module (<code>linkingStatus</code> is <code>'errored'</code>)</li>
2112
- * </ul>
2113
- * <p><a id="ERR_VM_MODULE_CACHED_DATA_REJECTED"></a></p>
2114
- */
2115
- ERR_VM_MODULE_ALREADY_LINKED = "ERR_VM_MODULE_ALREADY_LINKED",
2116
- /**
2117
- * <p>The <code>cachedData</code> option passed to a module constructor is invalid.</p>
2118
- * <p><a id="ERR_VM_MODULE_CANNOT_CREATE_CACHED_DATA"></a></p>
2119
- */
2120
- ERR_VM_MODULE_CACHED_DATA_REJECTED = "ERR_VM_MODULE_CACHED_DATA_REJECTED",
2121
- /**
2122
- * <p>Cached data cannot be created for modules which have already been evaluated.</p>
2123
- * <p><a id="ERR_VM_MODULE_DIFFERENT_CONTEXT"></a></p>
2124
- */
2125
- ERR_VM_MODULE_CANNOT_CREATE_CACHED_DATA = "ERR_VM_MODULE_CANNOT_CREATE_CACHED_DATA",
2126
- /**
2127
- * <p>The module being returned from the linker function is from a different context
2128
- * than the parent module. Linked modules must share the same context.</p>
2129
- * <p><a id="ERR_VM_MODULE_LINK_FAILURE"></a></p>
2130
- */
2131
- ERR_VM_MODULE_DIFFERENT_CONTEXT = "ERR_VM_MODULE_DIFFERENT_CONTEXT",
2132
- /**
2133
- * <p>The module was unable to be linked due to a failure.</p>
2134
- * <p><a id="ERR_VM_MODULE_NOT_MODULE"></a></p>
2135
- */
2136
- ERR_VM_MODULE_LINK_FAILURE = "ERR_VM_MODULE_LINK_FAILURE",
2137
- /**
2138
- * <p>The fulfilled value of a linking promise is not a <code>vm.Module</code> object.</p>
2139
- * <p><a id="ERR_VM_MODULE_STATUS"></a></p>
2140
- */
2141
- ERR_VM_MODULE_NOT_MODULE = "ERR_VM_MODULE_NOT_MODULE",
2142
- /**
2143
- * <p>The current module's status does not allow for this operation. The specific
2144
- * meaning of the error depends on the specific function.</p>
2145
- * <p><a id="ERR_WASI_ALREADY_STARTED"></a></p>
2146
- */
2147
- ERR_VM_MODULE_STATUS = "ERR_VM_MODULE_STATUS",
2148
- /**
2149
- * <p>The WASI instance has already started.</p>
2150
- * <p><a id="ERR_WASI_NOT_STARTED"></a></p>
2151
- */
2152
- ERR_WASI_ALREADY_STARTED = "ERR_WASI_ALREADY_STARTED",
2153
- /**
2154
- * <p>The WASI instance has not been started.</p>
2155
- * <p><a id="ERR_WEBASSEMBLY_RESPONSE"></a></p>
2156
- */
2157
- ERR_WASI_NOT_STARTED = "ERR_WASI_NOT_STARTED",
2158
- /**
2159
- * <p>The <code>Response</code> that has been passed to <code>WebAssembly.compileStreaming</code> or to
2160
- * <code>WebAssembly.instantiateStreaming</code> is not a valid WebAssembly response.</p>
2161
- * <p><a id="ERR_WORKER_INIT_FAILED"></a></p>
2162
- */
2163
- ERR_WEBASSEMBLY_RESPONSE = "ERR_WEBASSEMBLY_RESPONSE",
2164
- /**
2165
- * <p>The <code>Worker</code> initialization failed.</p>
2166
- * <p><a id="ERR_WORKER_INVALID_EXEC_ARGV"></a></p>
2167
- */
2168
- ERR_WORKER_INIT_FAILED = "ERR_WORKER_INIT_FAILED",
2169
- /**
2170
- * <p>The <code>execArgv</code> option passed to the <code>Worker</code> constructor contains
2171
- * invalid flags.</p>
2172
- * <p><a id="ERR_WORKER_NOT_RUNNING"></a></p>
2173
- */
2174
- ERR_WORKER_INVALID_EXEC_ARGV = "ERR_WORKER_INVALID_EXEC_ARGV",
2175
- /**
2176
- * <p>An operation failed because the <code>Worker</code> instance is not currently running.</p>
2177
- * <p><a id="ERR_WORKER_OUT_OF_MEMORY"></a></p>
2178
- */
2179
- ERR_WORKER_NOT_RUNNING = "ERR_WORKER_NOT_RUNNING",
2180
- /**
2181
- * <p>The <code>Worker</code> instance terminated because it reached its memory limit.</p>
2182
- * <p><a id="ERR_WORKER_PATH"></a></p>
2183
- */
2184
- ERR_WORKER_OUT_OF_MEMORY = "ERR_WORKER_OUT_OF_MEMORY",
2185
- /**
2186
- * <p>The path for the main script of a worker is neither an absolute path
2187
- * nor a relative path starting with <code>./</code> or <code>../</code>.</p>
2188
- * <p><a id="ERR_WORKER_MESSAGING_ERRORED"></a></p>
2189
- */
2190
- ERR_WORKER_PATH = "ERR_WORKER_PATH",
2191
- /**
2192
- * <p>The destination thread threw an error while processing a message sent via <a href="worker_threads.html#workerpostmessagetothreadthreadid-value-transferlist-timeout"><code>postMessageToThread()</code></a>.</p>
2193
- * <p><a id="ERR_WORKER_MESSAGING_FAILED"></a></p>
2194
- */
2195
- ERR_WORKER_MESSAGING_ERRORED = "ERR_WORKER_MESSAGING_ERRORED",
2196
- /**
2197
- * <p>The thread requested in <a href="worker_threads.html#workerpostmessagetothreadthreadid-value-transferlist-timeout"><code>postMessageToThread()</code></a> is invalid or has no <code>workerMessage</code> listener.</p>
2198
- * <p><a id="ERR_WORKER_MESSAGING_SAME_THREAD"></a></p>
2199
- */
2200
- ERR_WORKER_MESSAGING_FAILED = "ERR_WORKER_MESSAGING_FAILED",
2201
- /**
2202
- * <p>The thread id requested in <a href="worker_threads.html#workerpostmessagetothreadthreadid-value-transferlist-timeout"><code>postMessageToThread()</code></a> is the current thread id.</p>
2203
- * <p><a id="ERR_WORKER_MESSAGING_TIMEOUT"></a></p>
2204
- */
2205
- ERR_WORKER_MESSAGING_SAME_THREAD = "ERR_WORKER_MESSAGING_SAME_THREAD",
2206
- /**
2207
- * <p>Sending a message via <a href="worker_threads.html#workerpostmessagetothreadthreadid-value-transferlist-timeout"><code>postMessageToThread()</code></a> timed out.</p>
2208
- * <p><a id="ERR_WORKER_UNSERIALIZABLE_ERROR"></a></p>
2209
- */
2210
- ERR_WORKER_MESSAGING_TIMEOUT = "ERR_WORKER_MESSAGING_TIMEOUT",
2211
- /**
2212
- * <p>All attempts at serializing an uncaught exception from a worker thread failed.</p>
2213
- * <p><a id="ERR_WORKER_UNSUPPORTED_OPERATION"></a></p>
2214
- */
2215
- ERR_WORKER_UNSERIALIZABLE_ERROR = "ERR_WORKER_UNSERIALIZABLE_ERROR",
2216
- /**
2217
- * <p>The requested functionality is not supported in worker threads.</p>
2218
- * <p><a id="ERR_ZLIB_INITIALIZATION_FAILED"></a></p>
2219
- */
2220
- ERR_WORKER_UNSUPPORTED_OPERATION = "ERR_WORKER_UNSUPPORTED_OPERATION",
2221
- /**
2222
- * <p>Creation of a <a href="zlib.html"><code>zlib</code></a> object failed due to incorrect configuration.</p>
2223
- * <p><a id="HPE_HEADER_OVERFLOW"></a></p>
2224
- */
2225
- ERR_ZLIB_INITIALIZATION_FAILED = "ERR_ZLIB_INITIALIZATION_FAILED",
2226
- /**
2227
- * <p>Too much HTTP header data was received. In order to protect against malicious or
2228
- * malconfigured clients, if more than <code>maxHeaderSize</code> of HTTP header data is received then
2229
- * HTTP parsing will abort without a request or response object being created, and
2230
- * an <code>Error</code> with this code will be emitted.</p>
2231
- * <p><a id="HPE_CHUNK_EXTENSIONS_OVERFLOW"></a></p>
2232
- */
2233
- HPE_HEADER_OVERFLOW = "HPE_HEADER_OVERFLOW",
2234
- /**
2235
- * <p>Too much data was received for a chunk extensions. In order to protect against
2236
- * malicious or malconfigured clients, if more than 16 KiB of data is received
2237
- * then an <code>Error</code> with this code will be emitted.</p>
2238
- * <p><a id="HPE_UNEXPECTED_CONTENT_LENGTH"></a></p>
2239
- */
2240
- HPE_CHUNK_EXTENSIONS_OVERFLOW = "HPE_CHUNK_EXTENSIONS_OVERFLOW",
2241
- /**
2242
- * <p>Server is sending both a <code>Content-Length</code> header and <code>Transfer-Encoding: chunked</code>.</p>
2243
- * <p><code>Transfer-Encoding: chunked</code> allows the server to maintain an HTTP persistent
2244
- * connection for dynamically generated content.
2245
- * In this case, the <code>Content-Length</code> HTTP header cannot be used.</p>
2246
- * <p>Use <code>Content-Length</code> or <code>Transfer-Encoding: chunked</code>.</p>
2247
- * <p><a id="MODULE_NOT_FOUND"></a></p>
2248
- */
2249
- HPE_UNEXPECTED_CONTENT_LENGTH = "HPE_UNEXPECTED_CONTENT_LENGTH",
2250
- /**
2251
- * <p>A module file could not be resolved by the CommonJS modules loader while
2252
- * attempting a <a href="modules.html#requireid"><code>require()</code></a> operation or when loading the program entry point.</p>
2253
- */
2254
- MODULE_NOT_FOUND = "MODULE_NOT_FOUND",
2255
- /**
2256
- * <p>The value passed to <code>postMessage()</code> contained an object that is not supported
2257
- * for transferring.</p>
2258
- * <p><a id="ERR_CRYPTO_HASH_DIGEST_NO_UTF16"></a></p>
2259
- * @deprecated
2260
- */
2261
- ERR_CANNOT_TRANSFER_OBJECT = "ERR_CANNOT_TRANSFER_OBJECT",
2262
- /**
2263
- * <p>The UTF-16 encoding was used with <a href="crypto.html#hashdigestencoding"><code>hash.digest()</code></a>. While the
2264
- * <code>hash.digest()</code> method does allow an <code>encoding</code> argument to be passed in,
2265
- * causing the method to return a string rather than a <code>Buffer</code>, the UTF-16
2266
- * encoding (e.g. <code>ucs</code> or <code>utf16le</code>) is not supported.</p>
2267
- * <p><a id="ERR_HTTP2_FRAME_ERROR"></a></p>
2268
- * @deprecated
2269
- */
2270
- ERR_CRYPTO_HASH_DIGEST_NO_UTF16 = "ERR_CRYPTO_HASH_DIGEST_NO_UTF16",
2271
- /**
2272
- * <p>Used when a failure occurs sending an individual frame on the HTTP/2
2273
- * session.</p>
2274
- * <p><a id="ERR_HTTP2_HEADERS_OBJECT"></a></p>
2275
- * @deprecated
2276
- */
2277
- ERR_HTTP2_FRAME_ERROR = "ERR_HTTP2_FRAME_ERROR",
2278
- /**
2279
- * <p>Used when an HTTP/2 Headers Object is expected.</p>
2280
- * <p><a id="ERR_HTTP2_HEADER_REQUIRED"></a></p>
2281
- * @deprecated
2282
- */
2283
- ERR_HTTP2_HEADERS_OBJECT = "ERR_HTTP2_HEADERS_OBJECT",
2284
- /**
2285
- * <p>Used when a required header is missing in an HTTP/2 message.</p>
2286
- * <p><a id="ERR_HTTP2_INFO_HEADERS_AFTER_RESPOND"></a></p>
2287
- * @deprecated
2288
- */
2289
- ERR_HTTP2_HEADER_REQUIRED = "ERR_HTTP2_HEADER_REQUIRED",
2290
- /**
2291
- * <p>HTTP/2 informational headers must only be sent <em>prior</em> to calling the
2292
- * <code>Http2Stream.prototype.respond()</code> method.</p>
2293
- * <p><a id="ERR_HTTP2_STREAM_CLOSED"></a></p>
2294
- * @deprecated
2295
- */
2296
- ERR_HTTP2_INFO_HEADERS_AFTER_RESPOND = "ERR_HTTP2_INFO_HEADERS_AFTER_RESPOND",
2297
- /**
2298
- * <p>Used when an action has been performed on an HTTP/2 Stream that has already
2299
- * been closed.</p>
2300
- * <p><a id="ERR_HTTP_INVALID_CHAR"></a></p>
2301
- * @deprecated
2302
- */
2303
- ERR_HTTP2_STREAM_CLOSED = "ERR_HTTP2_STREAM_CLOSED",
2304
- /**
2305
- * <p>Used when an invalid character is found in an HTTP response status message
2306
- * (reason phrase).</p>
2307
- * <p><a id="ERR_INDEX_OUT_OF_RANGE"></a></p>
2308
- * @deprecated
2309
- */
2310
- ERR_HTTP_INVALID_CHAR = "ERR_HTTP_INVALID_CHAR",
2311
- /**
2312
- * <p>A given index was out of the accepted range (e.g. negative offsets).</p>
2313
- * <p><a id="ERR_INVALID_OPT_VALUE"></a></p>
2314
- * @deprecated
2315
- */
2316
- ERR_INDEX_OUT_OF_RANGE = "ERR_INDEX_OUT_OF_RANGE",
2317
- /**
2318
- * <p>An invalid or unexpected value was passed in an options object.</p>
2319
- * <p><a id="ERR_INVALID_OPT_VALUE_ENCODING"></a></p>
2320
- * @deprecated
2321
- */
2322
- ERR_INVALID_OPT_VALUE = "ERR_INVALID_OPT_VALUE",
2323
- /**
2324
- * <p>An invalid or unknown file encoding was passed.</p>
2325
- * <p><a id="ERR_INVALID_TRANSFER_OBJECT"></a></p>
2326
- * @deprecated
2327
- */
2328
- ERR_INVALID_OPT_VALUE_ENCODING = "ERR_INVALID_OPT_VALUE_ENCODING",
2329
- /**
2330
- * <p>An invalid transfer object was passed to <code>postMessage()</code>.</p>
2331
- * <p><a id="ERR_IMPORT_ASSERTION_TYPE_FAILED"></a></p>
2332
- * @deprecated
2333
- */
2334
- ERR_INVALID_TRANSFER_OBJECT = "ERR_INVALID_TRANSFER_OBJECT",
2335
- /**
2336
- * <p>An import assertion has failed, preventing the specified module to be imported.</p>
2337
- * <p><a id="ERR_IMPORT_ASSERTION_TYPE_MISSING"></a></p>
2338
- * @deprecated
2339
- */
2340
- ERR_IMPORT_ASSERTION_TYPE_FAILED = "ERR_IMPORT_ASSERTION_TYPE_FAILED",
2341
- /**
2342
- * <p>An import assertion is missing, preventing the specified module to be imported.</p>
2343
- * <p><a id="ERR_IMPORT_ASSERTION_TYPE_UNSUPPORTED"></a></p>
2344
- * @deprecated
2345
- */
2346
- ERR_IMPORT_ASSERTION_TYPE_MISSING = "ERR_IMPORT_ASSERTION_TYPE_MISSING",
2347
- /**
2348
- * <p>An import attribute is not supported by this version of Node.js.</p>
2349
- * <p><a id="ERR_MANIFEST_ASSERT_INTEGRITY"></a></p>
2350
- * @deprecated
2351
- */
2352
- ERR_IMPORT_ASSERTION_TYPE_UNSUPPORTED = "ERR_IMPORT_ASSERTION_TYPE_UNSUPPORTED",
2353
- /**
2354
- * <p>An attempt was made to load a resource, but the resource did not match the
2355
- * integrity defined by the policy manifest. See the documentation for policy
2356
- * manifests for more information.</p>
2357
- * <p><a id="ERR_MANIFEST_DEPENDENCY_MISSING"></a></p>
2358
- * @deprecated
2359
- */
2360
- ERR_MANIFEST_ASSERT_INTEGRITY = "ERR_MANIFEST_ASSERT_INTEGRITY",
2361
- /**
2362
- * <p>An attempt was made to load a resource, but the resource was not listed as a
2363
- * dependency from the location that attempted to load it. See the documentation
2364
- * for policy manifests for more information.</p>
2365
- * <p><a id="ERR_MANIFEST_INTEGRITY_MISMATCH"></a></p>
2366
- * @deprecated
2367
- */
2368
- ERR_MANIFEST_DEPENDENCY_MISSING = "ERR_MANIFEST_DEPENDENCY_MISSING",
2369
- /**
2370
- * <p>An attempt was made to load a policy manifest, but the manifest had multiple
2371
- * entries for a resource which did not match each other. Update the manifest
2372
- * entries to match in order to resolve this error. See the documentation for
2373
- * policy manifests for more information.</p>
2374
- * <p><a id="ERR_MANIFEST_INVALID_RESOURCE_FIELD"></a></p>
2375
- * @deprecated
2376
- */
2377
- ERR_MANIFEST_INTEGRITY_MISMATCH = "ERR_MANIFEST_INTEGRITY_MISMATCH",
2378
- /**
2379
- * <p>A policy manifest resource had an invalid value for one of its fields. Update
2380
- * the manifest entry to match in order to resolve this error. See the
2381
- * documentation for policy manifests for more information.</p>
2382
- * <p><a id="ERR_MANIFEST_INVALID_SPECIFIER"></a></p>
2383
- * @deprecated
2384
- */
2385
- ERR_MANIFEST_INVALID_RESOURCE_FIELD = "ERR_MANIFEST_INVALID_RESOURCE_FIELD",
2386
- /**
2387
- * <p>A policy manifest resource had an invalid value for one of its dependency
2388
- * mappings. Update the manifest entry to match to resolve this error. See the
2389
- * documentation for policy manifests for more information.</p>
2390
- * <p><a id="ERR_MANIFEST_PARSE_POLICY"></a></p>
2391
- * @deprecated
2392
- */
2393
- ERR_MANIFEST_INVALID_SPECIFIER = "ERR_MANIFEST_INVALID_SPECIFIER",
2394
- /**
2395
- * <p>An attempt was made to load a policy manifest, but the manifest was unable to
2396
- * be parsed. See the documentation for policy manifests for more information.</p>
2397
- * <p><a id="ERR_MANIFEST_TDZ"></a></p>
2398
- * @deprecated
2399
- */
2400
- ERR_MANIFEST_PARSE_POLICY = "ERR_MANIFEST_PARSE_POLICY",
2401
- /**
2402
- * <p>An attempt was made to read from a policy manifest, but the manifest
2403
- * initialization has not yet taken place. This is likely a bug in Node.js.</p>
2404
- * <p><a id="ERR_MANIFEST_UNKNOWN_ONERROR"></a></p>
2405
- * @deprecated
2406
- */
2407
- ERR_MANIFEST_TDZ = "ERR_MANIFEST_TDZ",
2408
- /**
2409
- * <p>A policy manifest was loaded, but had an unknown value for its "onerror"
2410
- * behavior. See the documentation for policy manifests for more information.</p>
2411
- * <p><a id="ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST"></a></p>
2412
- * @deprecated
2413
- */
2414
- ERR_MANIFEST_UNKNOWN_ONERROR = "ERR_MANIFEST_UNKNOWN_ONERROR",
2415
- /**
2416
- * <p>This error code was replaced by <a href="#err_missing_transferable_in_transfer_list"><code>ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST</code></a>
2417
- * in Node.js v15.0.0, because it is no longer accurate as other types of
2418
- * transferable objects also exist now.</p>
2419
- * <p><a id="ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST"></a></p>
2420
- * @deprecated
2421
- */
2422
- ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST = "ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST",
2423
- /**
2424
- * <p>An object that needs to be explicitly listed in the <code>transferList</code> argument
2425
- * is in the object passed to a <a href="worker_threads.html#portpostmessagevalue-transferlist"><code>postMessage()</code></a> call, but is not provided
2426
- * in the <code>transferList</code> for that call. Usually, this is a <code>MessagePort</code>.</p>
2427
- * <p>In Node.js versions prior to v15.0.0, the error code being used here was
2428
- * <a href="#err_missing_message_port_in_transfer_list"><code>ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST</code></a>. However, the set of
2429
- * transferable object types has been expanded to cover more types than
2430
- * <code>MessagePort</code>.</p>
2431
- * <p><a id="ERR_NAPI_CONS_PROTOTYPE_OBJECT"></a></p>
2432
- * @deprecated
2433
- */
2434
- ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST = "ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST",
2435
- /**
2436
- * <p>Used by the <code>Node-API</code> when <code>Constructor.prototype</code> is not an object.</p>
2437
- * <p><a id="ERR_NO_LONGER_SUPPORTED"></a></p>
2438
- * @deprecated
2439
- */
2440
- ERR_NAPI_CONS_PROTOTYPE_OBJECT = "ERR_NAPI_CONS_PROTOTYPE_OBJECT",
2441
- /**
2442
- * <p>A Node.js API was called in an unsupported manner, such as
2443
- * <code>Buffer.write(string, encoding, offset[, length])</code>.</p>
2444
- * <p><a id="ERR_OPERATION_FAILED"></a></p>
2445
- * @deprecated
2446
- */
2447
- ERR_NO_LONGER_SUPPORTED = "ERR_NO_LONGER_SUPPORTED",
2448
- /**
2449
- * <p>An operation failed. This is typically used to signal the general failure
2450
- * of an asynchronous operation.</p>
2451
- * <p><a id="ERR_OUTOFMEMORY"></a></p>
2452
- * @deprecated
2453
- */
2454
- ERR_OPERATION_FAILED = "ERR_OPERATION_FAILED",
2455
- /**
2456
- * <p>Used generically to identify that an operation caused an out of memory
2457
- * condition.</p>
2458
- * <p><a id="ERR_PARSE_HISTORY_DATA"></a></p>
2459
- * @deprecated
2460
- */
2461
- ERR_OUTOFMEMORY = "ERR_OUTOFMEMORY",
2462
- /**
2463
- * <p>The <code>node:repl</code> module was unable to parse data from the REPL history file.</p>
2464
- * <p><a id="ERR_SOCKET_CANNOT_SEND"></a></p>
2465
- * @deprecated
2466
- */
2467
- ERR_PARSE_HISTORY_DATA = "ERR_PARSE_HISTORY_DATA",
2468
- /**
2469
- * <p>Data could not be sent on a socket.</p>
2470
- * <p><a id="ERR_STDERR_CLOSE"></a></p>
2471
- * @deprecated
2472
- */
2473
- ERR_SOCKET_CANNOT_SEND = "ERR_SOCKET_CANNOT_SEND",
2474
- /**
2475
- * <p>An attempt was made to close the <code>process.stderr</code> stream. By design, Node.js
2476
- * does not allow <code>stdout</code> or <code>stderr</code> streams to be closed by user code.</p>
2477
- * <p><a id="ERR_STDOUT_CLOSE"></a></p>
2478
- * @deprecated
2479
- */
2480
- ERR_STDERR_CLOSE = "ERR_STDERR_CLOSE",
2481
- /**
2482
- * <p>An attempt was made to close the <code>process.stdout</code> stream. By design, Node.js
2483
- * does not allow <code>stdout</code> or <code>stderr</code> streams to be closed by user code.</p>
2484
- * <p><a id="ERR_STREAM_READ_NOT_IMPLEMENTED"></a></p>
2485
- * @deprecated
2486
- */
2487
- ERR_STDOUT_CLOSE = "ERR_STDOUT_CLOSE",
2488
- /**
2489
- * <p>Used when an attempt is made to use a readable stream that has not implemented
2490
- * <a href="stream.html#readable_readsize"><code>readable._read()</code></a>.</p>
2491
- * <p><a id="ERR_TLS_RENEGOTIATION_FAILED"></a></p>
2492
- * @deprecated
2493
- */
2494
- ERR_STREAM_READ_NOT_IMPLEMENTED = "ERR_STREAM_READ_NOT_IMPLEMENTED",
2495
- /**
2496
- * <p>Used when a TLS renegotiation request has failed in a non-specific way.</p>
2497
- * <p><a id="ERR_TRANSFERRING_EXTERNALIZED_SHAREDARRAYBUFFER"></a></p>
2498
- * @deprecated
2499
- */
2500
- ERR_TLS_RENEGOTIATION_FAILED = "ERR_TLS_RENEGOTIATION_FAILED",
2501
- /**
2502
- * <p>A <code>SharedArrayBuffer</code> whose memory is not managed by the JavaScript engine
2503
- * or by Node.js was encountered during serialization. Such a <code>SharedArrayBuffer</code>
2504
- * cannot be serialized.</p>
2505
- * <p>This can only happen when native addons create <code>SharedArrayBuffer</code>s in
2506
- * "externalized" mode, or put existing <code>SharedArrayBuffer</code> into externalized mode.</p>
2507
- * <p><a id="ERR_UNKNOWN_STDIN_TYPE"></a></p>
2508
- * @deprecated
2509
- */
2510
- ERR_TRANSFERRING_EXTERNALIZED_SHAREDARRAYBUFFER = "ERR_TRANSFERRING_EXTERNALIZED_SHAREDARRAYBUFFER",
2511
- /**
2512
- * <p>An attempt was made to launch a Node.js process with an unknown <code>stdin</code> file
2513
- * type. This error is usually an indication of a bug within Node.js itself,
2514
- * although it is possible for user code to trigger it.</p>
2515
- * <p><a id="ERR_UNKNOWN_STREAM_TYPE"></a></p>
2516
- * @deprecated
2517
- */
2518
- ERR_UNKNOWN_STDIN_TYPE = "ERR_UNKNOWN_STDIN_TYPE",
2519
- /**
2520
- * <p>An attempt was made to launch a Node.js process with an unknown <code>stdout</code> or
2521
- * <code>stderr</code> file type. This error is usually an indication of a bug within Node.js
2522
- * itself, although it is possible for user code to trigger it.</p>
2523
- * <p><a id="ERR_V8BREAKITERATOR"></a></p>
2524
- * @deprecated
2525
- */
2526
- ERR_UNKNOWN_STREAM_TYPE = "ERR_UNKNOWN_STREAM_TYPE",
2527
- /**
2528
- * <p>The V8 <code>BreakIterator</code> API was used but the full ICU data set is not installed.</p>
2529
- * <p><a id="ERR_VALUE_OUT_OF_RANGE"></a></p>
2530
- * @deprecated
2531
- */
2532
- ERR_V8BREAKITERATOR = "ERR_V8BREAKITERATOR",
2533
- /**
2534
- * <p>Used when a given value is out of the accepted range.</p>
2535
- * <p><a id="ERR_VM_MODULE_NOT_LINKED"></a></p>
2536
- * @deprecated
2537
- */
2538
- ERR_VALUE_OUT_OF_RANGE = "ERR_VALUE_OUT_OF_RANGE",
2539
- /**
2540
- * <p>The module must be successfully linked before instantiation.</p>
2541
- * <p><a id="ERR_VM_MODULE_LINKING_ERRORED"></a></p>
2542
- * @deprecated
2543
- */
2544
- ERR_VM_MODULE_NOT_LINKED = "ERR_VM_MODULE_NOT_LINKED",
2545
- /**
2546
- * <p>The linker function returned a module for which linking has failed.</p>
2547
- * <p><a id="ERR_WORKER_UNSUPPORTED_EXTENSION"></a></p>
2548
- * @deprecated
2549
- */
2550
- ERR_VM_MODULE_LINKING_ERRORED = "ERR_VM_MODULE_LINKING_ERRORED",
2551
- /**
2552
- * <p>The pathname used for the main script of a worker has an
2553
- * unknown file extension.</p>
2554
- * <p><a id="ERR_ZLIB_BINDING_CLOSED"></a></p>
2555
- * @deprecated
2556
- */
2557
- ERR_WORKER_UNSUPPORTED_EXTENSION = "ERR_WORKER_UNSUPPORTED_EXTENSION",
2558
- /**
2559
- * <p>Used when an attempt is made to use a <code>zlib</code> object after it has already been
2560
- * closed.</p>
2561
- * <p><a id="ERR_CPU_USAGE"></a></p>
2562
- * @deprecated
2563
- */
2564
- ERR_ZLIB_BINDING_CLOSED = "ERR_ZLIB_BINDING_CLOSED",
2565
- /**
2566
- * <p>The native call from <code>process.cpuUsage</code> could not be processed.</p>
2567
- * <p><a id="openssl-error-codes"></a></p>
2568
- * @deprecated
2569
- */
2570
- ERR_CPU_USAGE = "ERR_CPU_USAGE"
2571
- }
2572
-
2573
- declare type NodeException<T extends string = any> = NodeJS.ErrnoException & {
2574
- code: T;
2575
- };
2576
-
2577
- export declare function nodeResolvePathArray(from: string, file?: string): string[];
2578
-
2579
- export declare const normalizePath: NormalizePathFunction;
2580
-
2581
- export declare interface NormalizePathFunction {
2582
- (path: string): string;
2583
- }
2584
-
2585
- declare type OnExit = (error?: Error) => Promise<any>;
2586
-
2587
- export declare enum OpenSSLError {
2588
- /**
2589
- * <p>The certificate is not yet valid: the notBefore date is after the current time.</p>
2590
- * <p><a id="CERT_HAS_EXPIRED"></a></p>
2591
- */
2592
- CERT_NOT_YET_VALID = "CERT_NOT_YET_VALID",
2593
- /**
2594
- * <p>The certificate has expired: the notAfter date is before the current time.</p>
2595
- * <p><a id="CRL_NOT_YET_VALID"></a></p>
2596
- */
2597
- CERT_HAS_EXPIRED = "CERT_HAS_EXPIRED",
2598
- /**
2599
- * <p>The certificate revocation list (CRL) has a future issue date.</p>
2600
- * <p><a id="CRL_HAS_EXPIRED"></a></p>
2601
- */
2602
- CRL_NOT_YET_VALID = "CRL_NOT_YET_VALID",
2603
- /**
2604
- * <p>The certificate revocation list (CRL) has expired.</p>
2605
- * <p><a id="CERT_REVOKED"></a></p>
2606
- */
2607
- CRL_HAS_EXPIRED = "CRL_HAS_EXPIRED",
2608
- /**
2609
- * <p>The certificate has been revoked; it is on a certificate revocation list (CRL).</p>
2610
- * <p><a id="Trust or Chain Related Errors"></a></p>
2611
- */
2612
- CERT_REVOKED = "CERT_REVOKED",
2613
- /**
2614
- * <p>The issuer certificate of a looked up certificate could not be found. This
2615
- * normally means the list of trusted certificates is not complete.</p>
2616
- * <p><a id="UNABLE_TO_GET_ISSUER_CERT_LOCALLY"></a></p>
2617
- */
2618
- UNABLE_TO_GET_ISSUER_CERT = "UNABLE_TO_GET_ISSUER_CERT",
2619
- /**
2620
- * <p>The certificate’s issuer is not known. This is the case if the issuer is not
2621
- * included in the trusted certificate list.</p>
2622
- * <p><a id="DEPTH_ZERO_SELF_SIGNED_CERT"></a></p>
2623
- */
2624
- UNABLE_TO_GET_ISSUER_CERT_LOCALLY = "UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
2625
- /**
2626
- * <p>The passed certificate is self-signed and the same certificate cannot be found
2627
- * in the list of trusted certificates.</p>
2628
- * <p><a id="SELF_SIGNED_CERT_IN_CHAIN"></a></p>
2629
- */
2630
- DEPTH_ZERO_SELF_SIGNED_CERT = "DEPTH_ZERO_SELF_SIGNED_CERT",
2631
- /**
2632
- * <p>The certificate’s issuer is not known. This is the case if the issuer is not
2633
- * included in the trusted certificate list.</p>
2634
- * <p><a id="CERT_CHAIN_TOO_LONG"></a></p>
2635
- */
2636
- SELF_SIGNED_CERT_IN_CHAIN = "SELF_SIGNED_CERT_IN_CHAIN",
2637
- /**
2638
- * <p>The certificate chain length is greater than the maximum depth.</p>
2639
- * <p><a id="UNABLE_TO_GET_CRL"></a></p>
2640
- */
2641
- CERT_CHAIN_TOO_LONG = "CERT_CHAIN_TOO_LONG",
2642
- /**
2643
- * <p>The CRL reference by the certificate could not be found.</p>
2644
- * <p><a id="UNABLE_TO_VERIFY_LEAF_SIGNATURE"></a></p>
2645
- */
2646
- UNABLE_TO_GET_CRL = "UNABLE_TO_GET_CRL",
2647
- /**
2648
- * <p>No signatures could be verified because the chain contains only one certificate
2649
- * and it is not self signed.</p>
2650
- * <p><a id="CERT_UNTRUSTED"></a></p>
2651
- */
2652
- UNABLE_TO_VERIFY_LEAF_SIGNATURE = "UNABLE_TO_VERIFY_LEAF_SIGNATURE",
2653
- /**
2654
- * <p>The root certificate authority (CA) is not marked as trusted for the specified
2655
- * purpose.</p>
2656
- * <p><a id="Basic Extension Errors"></a></p>
2657
- */
2658
- CERT_UNTRUSTED = "CERT_UNTRUSTED",
2659
- /**
2660
- * <p>A CA certificate is invalid. Either it is not a CA or its extensions are not
2661
- * consistent with the supplied purpose.</p>
2662
- * <p><a id="PATH_LENGTH_EXCEEDED"></a></p>
2663
- */
2664
- INVALID_CA = "INVALID_CA",
2665
- /**
2666
- * <p>The basicConstraints pathlength parameter has been exceeded.</p>
2667
- * <p><a id="Name Related Errors"></a></p>
2668
- */
2669
- PATH_LENGTH_EXCEEDED = "PATH_LENGTH_EXCEEDED",
2670
- /**
2671
- * <p>Certificate does not match provided name.</p>
2672
- * <p><a id="Usage and Policy Errors"></a></p>
2673
- */
2674
- HOSTNAME_MISMATCH = "HOSTNAME_MISMATCH",
2675
- /**
2676
- * <p>The supplied certificate cannot be used for the specified purpose.</p>
2677
- * <p><a id="CERT_REJECTED"></a></p>
2678
- */
2679
- INVALID_PURPOSE = "INVALID_PURPOSE",
2680
- /**
2681
- * <p>The root CA is marked to reject the specified purpose.</p>
2682
- * <p><a id="Formatting Errors"></a></p>
2683
- */
2684
- CERT_REJECTED = "CERT_REJECTED",
2685
- /**
2686
- * <p>The signature of the certificate is invalid.</p>
2687
- * <p><a id="CRL_SIGNATURE_FAILURE"></a></p>
2688
- */
2689
- CERT_SIGNATURE_FAILURE = "CERT_SIGNATURE_FAILURE",
2690
- /**
2691
- * <p>The signature of the certificate revocation list (CRL) is invalid.</p>
2692
- * <p><a id="ERROR_IN_CERT_NOT_BEFORE_FIELD"></a></p>
2693
- */
2694
- CRL_SIGNATURE_FAILURE = "CRL_SIGNATURE_FAILURE",
2695
- /**
2696
- * <p>The certificate notBefore field contains an invalid time.</p>
2697
- * <p><a id="ERROR_IN_CERT_NOT_AFTER_FIELD"></a></p>
2698
- */
2699
- ERROR_IN_CERT_NOT_BEFORE_FIELD = "ERROR_IN_CERT_NOT_BEFORE_FIELD",
2700
- /**
2701
- * <p>The certificate notAfter field contains an invalid time.</p>
2702
- * <p><a id="ERROR_IN_CRL_LAST_UPDATE_FIELD"></a></p>
2703
- */
2704
- ERROR_IN_CERT_NOT_AFTER_FIELD = "ERROR_IN_CERT_NOT_AFTER_FIELD",
2705
- /**
2706
- * <p>The CRL lastUpdate field contains an invalid time.</p>
2707
- * <p><a id="ERROR_IN_CRL_NEXT_UPDATE_FIELD"></a></p>
2708
- */
2709
- ERROR_IN_CRL_LAST_UPDATE_FIELD = "ERROR_IN_CRL_LAST_UPDATE_FIELD",
2710
- /**
2711
- * <p>The CRL nextUpdate field contains an invalid time.</p>
2712
- * <p><a id="UNABLE_TO_DECRYPT_CERT_SIGNATURE"></a></p>
2713
- */
2714
- ERROR_IN_CRL_NEXT_UPDATE_FIELD = "ERROR_IN_CRL_NEXT_UPDATE_FIELD",
2715
- /**
2716
- * <p>The certificate signature could not be decrypted. This means that the actual
2717
- * signature value could not be determined rather than it not matching the expected
2718
- * value, this is only meaningful for RSA keys.</p>
2719
- * <p><a id="UNABLE_TO_DECRYPT_CRL_SIGNATURE"></a></p>
2720
- */
2721
- UNABLE_TO_DECRYPT_CERT_SIGNATURE = "UNABLE_TO_DECRYPT_CERT_SIGNATURE",
2722
- /**
2723
- * <p>The certificate revocation list (CRL) signature could not be decrypted: this
2724
- * means that the actual signature value could not be determined rather than it not
2725
- * matching the expected value.</p>
2726
- * <p><a id="UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY"></a></p>
2727
- */
2728
- UNABLE_TO_DECRYPT_CRL_SIGNATURE = "UNABLE_TO_DECRYPT_CRL_SIGNATURE",
2729
- /**
2730
- * <p>The public key in the certificate SubjectPublicKeyInfo could not be read.</p>
2731
- * <p><a id="Other OpenSSL Errors"></a></p>
2732
- */
2733
- UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY = "UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY",
2734
- /**
2735
- * <p>An error occurred trying to allocate memory. This should never happen.</p>
2736
- * <p><a id="ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING"></a></p>
2737
- */
2738
- OUT_OF_MEM = "OUT_OF_MEM",
2739
- /**
2740
- * <p>Type stripping is not supported for files descendent of a <code>node_modules</code> directory.</p>
2741
- */
2742
- ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING = "ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING"
2743
- }
2744
-
2745
- export declare interface OpenSSLException extends Error {
2746
- opensslErrorStack?: string;
2747
- function?: string;
2748
- library?: string;
2749
- reason?: string;
2750
- }
2751
-
2752
- export declare function osTempDir(name?: string): string;
2753
-
2754
- export declare const PATH_SEPARATOR: string;
2755
-
2756
- export declare class PathEnvironment extends PathArray {
2757
- private readonly name;
2758
- private readonly env;
2759
- constructor(varName?: string, env?: NodeJS.ProcessEnv);
2760
- add(p: string): this;
2761
- clear(): void;
2762
- delete(p: string): boolean;
2763
- save(): void;
2764
- }
2765
-
2766
- export declare function printLine(char?: string): void;
2767
-
2768
- declare type ProcessEnv = Record<string, string> & {
2769
- Path?: never;
2770
- };
2771
-
2772
- export declare class RawCollectingStream extends Writable {
2773
- private buffer?;
2774
- private _promise?;
2775
- constructor(sourceStream?: NodeJS.ReadableStream);
2776
- _write(chunk: Buffer, _encoding: string, callback: (error?: Error | null) => void): void;
2777
- getOutput(): Buffer;
2778
- promise(): Promise<Buffer>;
2779
- }
2780
-
2781
- export declare const readFileIfExists: typeof readFile;
2782
-
2783
- export declare const relativePath: JoinPathFunction;
2784
-
2785
- export declare const resolvePath: ResolvePathFunction;
2786
-
2787
- export declare interface ResolvePathFunction {
2788
- (...pathSegments: string[]): string;
2789
- }
2790
-
2791
- /**
2792
- * Self restart in a pid/cgroup namespace on linux.
2793
- * Your application must inside mainFunc, not before or after it.
2794
- *
2795
- * ```typescript
2796
- * import {respawnInScope} from '@idlebox/node'
2797
- * respawnInScope(() => {
2798
- * import('./real-application');
2799
- * });
2800
- * ```
2801
- */
2802
- export declare function respawnInScope(mainFunc: Function): unknown | never;
2803
-
2804
- /**
2805
- * should do this before:
2806
- * ```
2807
- * setErrorLogRoot(require('path').dirname(__dirname));
2808
- * ```
2809
- **/
2810
- export declare function runMain(main: AsyncMainFunction, onExit?: OnExit): void;
2811
-
2812
- export declare function sha256(data: Buffer): string;
2813
-
2814
- export declare function spawnGetEverything({ exec, cwd, env, addonPath }: ICommand): Promise<string>;
2815
-
2816
- export declare function spawnGetOutput({ exec, cwd, env, addonPath }: ICommand): Promise<string>;
2817
-
2818
- export declare function spawnGetOutputSync({ exec, cwd, env, addonPath }: ICommand): string;
2819
-
2820
- export declare function spawnRecreateEventHandlers(): void;
2821
-
2822
- export declare function spawnWithoutOutput({ exec, cwd, env, addonPath }: ICommand): Promise<void>;
2823
-
2824
- export declare function spawnWithoutOutputSync({ exec, cwd, env, addonPath }: ICommand): void;
2825
-
2826
- export declare function streamHasEnd(S: NodeJS.ReadableStream | NodeJS.WritableStream): any;
2827
-
2828
- /**
2829
- * wait read/write stream end/close, as promise
2830
- * reject when stream emit error
2831
- */
2832
- export declare function streamPromise(stream: NodeJS.ReadableStream | NodeJS.WritableStream): Promise<void>;
2833
-
2834
- export declare function streamToBuffer(stream: NodeJS.ReadableStream, raw: false): Promise<string>;
2835
-
2836
- export declare function streamToBuffer(stream: NodeJS.ReadableStream, raw: true): Promise<Buffer>;
2837
-
2838
- declare interface TerminalConsoleOptions {
2839
- color?: boolean | Partial<typeof colorMap>;
2840
- }
2841
-
2842
- /**
2843
- * Spawn a command, replace current node process
2844
- * If can't do that (eg. on Windows), spawn as normal, but quit self after it quit.
2845
- */
2846
- export declare function trySpawnInScope(cmds: string[]): never;
2847
-
2848
- export declare class WrappedTerminalConsole extends WrappedConsole {
2849
- private readonly colors;
2850
- constructor(title: string, { color, ...opt }?: WrappedConsoleOptions & TerminalConsoleOptions);
2851
- protected processColorLabel(msg: any[], pos: number, level: string, prefix: string): void;
2852
- }
2853
-
2854
- export declare function writeFileIfChange(file: string, data: string | Buffer): Promise<boolean>;
2855
-
2856
- export declare function writeFileIfChangeSync(file: string, data: string | Buffer): boolean;
2857
-
2858
- export { }