codemod 2.0.0-alpha.1 → 2.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -2
- package/codemod +17 -30
- package/package.json +78 -10
- package/register.d.mts +11 -0
- package/register.mjs +60 -0
- package/runtime/addon.mjs +59 -0
- package/runtime/ast-grep.mjs +93 -0
- package/runtime/context.mjs +77 -0
- package/runtime/hooks.mjs +9 -0
- package/runtime/host.d.mts +120 -0
- package/runtime/host.mjs +390 -0
- package/runtime/llm.mjs +11 -0
- package/runtime/metrics.mjs +45 -0
- package/runtime/modules.mjs +19 -0
- package/runtime/orchestrator.mjs +657 -0
- package/runtime/runtime.mjs +48 -0
- package/runtime/workflow.mjs +135 -0
- package/testing/index.d.mts +203 -0
- package/testing/index.mjs +638 -0
- package/types/index.d.ts +8 -0
- package/types/langs/angular.d.ts +5 -0
- package/types/langs/c.d.ts +5 -0
- package/types/langs/c_sharp.d.ts +5 -0
- package/types/langs/cpp.d.ts +5 -0
- package/types/langs/css.d.ts +5 -0
- package/types/langs/elixir.d.ts +5 -0
- package/types/langs/go.d.ts +5 -0
- package/types/langs/html.d.ts +5 -0
- package/types/langs/java.d.ts +5 -0
- package/types/langs/javascript.d.ts +5 -0
- package/types/langs/json.d.ts +5 -0
- package/types/langs/kotlin.d.ts +5 -0
- package/types/langs/php.d.ts +5 -0
- package/types/langs/python.d.ts +5 -0
- package/types/langs/ruby.d.ts +5 -0
- package/types/langs/rust.d.ts +5 -0
- package/types/langs/scala.d.ts +5 -0
- package/types/langs/toml.d.ts +5 -0
- package/types/langs/tsx.d.ts +5 -0
- package/types/langs/typescript.d.ts +5 -0
- package/types/langs/xml.d.ts +5 -0
- package/types/langs/yaml.d.ts +5 -0
- package/types/llm.d.ts +6 -0
- package/types/llrt/abort.d.ts +69 -0
- package/types/llrt/assert.d.ts +39 -0
- package/types/llrt/async_hooks.d.ts +210 -0
- package/types/llrt/buffer.d.ts +1186 -0
- package/types/llrt/child_process.d.ts +447 -0
- package/types/llrt/console.d.ts +210 -0
- package/types/llrt/crypto.d.ts +854 -0
- package/types/llrt/dgram.d.ts +381 -0
- package/types/llrt/dns.d.ts +124 -0
- package/types/llrt/dom-events.d.ts +51 -0
- package/types/llrt/events.d.ts +245 -0
- package/types/llrt/exceptions.d.ts +26 -0
- package/types/llrt/fetch.d.ts +332 -0
- package/types/llrt/fs/promises.d.ts +554 -0
- package/types/llrt/fs.d.ts +360 -0
- package/types/llrt/globals.d.ts +23 -0
- package/types/llrt/https.d.ts +27 -0
- package/types/llrt/index.d.ts +33 -0
- package/types/llrt/module.d.ts +285 -0
- package/types/llrt/navigator.d.ts +9 -0
- package/types/llrt/net.d.ts +488 -0
- package/types/llrt/os.d.ts +293 -0
- package/types/llrt/path.d.ts +150 -0
- package/types/llrt/perf_hooks.d.ts +23 -0
- package/types/llrt/process.d.ts +502 -0
- package/types/llrt/stream/web.d.ts +526 -0
- package/types/llrt/stream.d.ts +366 -0
- package/types/llrt/string_decoder.d.ts +63 -0
- package/types/llrt/timers.d.ts +72 -0
- package/types/llrt/timezone.d.ts +101 -0
- package/types/llrt/tty.d.ts +11 -0
- package/types/llrt/url.d.ts +774 -0
- package/types/llrt/util.d.ts +240 -0
- package/types/llrt/zlib.d.ts +177 -0
- package/types/main.d.ts +5 -0
- package/types/metrics.d.ts +5 -0
- package/types/modules/ast-grep.d.ts +634 -0
- package/types/modules/langs.d.ts +87 -0
- package/types/modules/llm.d.ts +23 -0
- package/types/modules/metrics.d.ts +107 -0
- package/types/modules/runtime.d.ts +66 -0
- package/types/modules/workflow.d.ts +750 -0
- package/types/runtime.d.ts +6 -0
- package/types/workflow.d.ts +5 -0
- package/vite.d.mts +24 -0
- package/vite.mjs +26 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `fs` module enables interacting with the file system in a
|
|
3
|
+
* way modeled on standard POSIX functions.
|
|
4
|
+
*
|
|
5
|
+
* To use the promise-based APIs:
|
|
6
|
+
*
|
|
7
|
+
* ```js
|
|
8
|
+
* import * as fs from 'fs/promises';
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* To use the sync APIs:
|
|
12
|
+
*
|
|
13
|
+
* ```js
|
|
14
|
+
* import * as fs from 'fs';
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* All file system operations have synchronous and promise-based forms.
|
|
18
|
+
*/
|
|
19
|
+
declare module "fs" {
|
|
20
|
+
import * as promises from "fs/promises";
|
|
21
|
+
import { Buffer, BufferEncoding } from "buffer";
|
|
22
|
+
export { promises };
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Valid types for path values in "fs".
|
|
26
|
+
*/
|
|
27
|
+
export type PathLike = string;
|
|
28
|
+
export type Mode = number;
|
|
29
|
+
|
|
30
|
+
export interface StatsBase<T> {
|
|
31
|
+
isFile(): boolean;
|
|
32
|
+
isDirectory(): boolean;
|
|
33
|
+
isBlockDevice(): boolean;
|
|
34
|
+
isCharacterDevice(): boolean;
|
|
35
|
+
isSymbolicLink(): boolean;
|
|
36
|
+
isFIFO(): boolean;
|
|
37
|
+
isSocket(): boolean;
|
|
38
|
+
dev: T;
|
|
39
|
+
ino: T;
|
|
40
|
+
mode: T;
|
|
41
|
+
nlink: T;
|
|
42
|
+
uid: T;
|
|
43
|
+
gid: T;
|
|
44
|
+
rdev: T;
|
|
45
|
+
size: T;
|
|
46
|
+
blksize: T;
|
|
47
|
+
blocks: T;
|
|
48
|
+
atimeMs: T;
|
|
49
|
+
mtimeMs: T;
|
|
50
|
+
ctimeMs: T;
|
|
51
|
+
birthtimeMs: T;
|
|
52
|
+
atime: Date;
|
|
53
|
+
mtime: Date;
|
|
54
|
+
ctime: Date;
|
|
55
|
+
birthtime: Date;
|
|
56
|
+
}
|
|
57
|
+
export interface Stats extends StatsBase<number> {}
|
|
58
|
+
/**
|
|
59
|
+
* A `fs.Stats` object provides information about a file.
|
|
60
|
+
*
|
|
61
|
+
* `Stat` objects are not to be created directly using the `new` keyword.
|
|
62
|
+
*
|
|
63
|
+
* ```console
|
|
64
|
+
* Stats {
|
|
65
|
+
* dev: 2114,
|
|
66
|
+
* ino: 48064969,
|
|
67
|
+
* mode: 33188,
|
|
68
|
+
* nlink: 1,
|
|
69
|
+
* uid: 85,
|
|
70
|
+
* gid: 100,
|
|
71
|
+
* rdev: 0,
|
|
72
|
+
* size: 527,
|
|
73
|
+
* blksize: 4096,
|
|
74
|
+
* blocks: 8,
|
|
75
|
+
* atimeMs: 1318289051000.1,
|
|
76
|
+
* mtimeMs: 1318289051000.1,
|
|
77
|
+
* ctimeMs: 1318289051000.1,
|
|
78
|
+
* birthtimeMs: 1318289051000.1,
|
|
79
|
+
* atime: Mon, 10 Oct 2011 23:24:11 GMT,
|
|
80
|
+
* mtime: Mon, 10 Oct 2011 23:24:11 GMT,
|
|
81
|
+
* ctime: Mon, 10 Oct 2011 23:24:11 GMT,
|
|
82
|
+
* birthtime: Mon, 10 Oct 2011 23:24:11 GMT }
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export class Stats {}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* A representation of a directory entry, which can be a file or a subdirectory
|
|
89
|
+
* within the directory. A directory entry is a combination of the file name and file type pairs.
|
|
90
|
+
*
|
|
91
|
+
* Additionally, when {@link promises.readdir} or {@link readdirSync} is called with
|
|
92
|
+
* the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings.
|
|
93
|
+
*/
|
|
94
|
+
export class Dirent {
|
|
95
|
+
/**
|
|
96
|
+
* Returns `true` if the `fs.Dirent` object describes a regular file.
|
|
97
|
+
*/
|
|
98
|
+
isFile(): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Returns `true` if the `fs.Dirent` object describes a file system
|
|
101
|
+
* directory.
|
|
102
|
+
*/
|
|
103
|
+
isDirectory(): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Returns `true` if the `fs.Dirent` object describes a block device.
|
|
106
|
+
*/
|
|
107
|
+
isBlockDevice(): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Returns `true` if the `fs.Dirent` object describes a character device.
|
|
110
|
+
*/
|
|
111
|
+
isCharacterDevice(): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Returns `true` if the `fs.Dirent` object describes a symbolic link.
|
|
114
|
+
*/
|
|
115
|
+
isSymbolicLink(): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Returns `true` if the `fs.Dirent` object describes a first-in-first-out
|
|
118
|
+
* (FIFO) pipe.
|
|
119
|
+
*/
|
|
120
|
+
isFIFO(): boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Returns `true` if the `fs.Dirent` object describes a socket.
|
|
123
|
+
*/
|
|
124
|
+
isSocket(): boolean;
|
|
125
|
+
/**
|
|
126
|
+
* The file name that this `fs.Dirent` object refers to.
|
|
127
|
+
*/
|
|
128
|
+
name: string;
|
|
129
|
+
/**
|
|
130
|
+
* The base path that this `fs.Dirent` object refers to.
|
|
131
|
+
*/
|
|
132
|
+
parentPath: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface StatSyncFn extends Function {
|
|
136
|
+
(path: PathLike): Stats;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Synchronous stat - Get file status.
|
|
140
|
+
* @param path A path to a file.
|
|
141
|
+
*/
|
|
142
|
+
export const statSync: StatSyncFn;
|
|
143
|
+
|
|
144
|
+
export interface RmDirOptions {
|
|
145
|
+
/**
|
|
146
|
+
* @deprecated Use `fs.rm(path, { recursive: true, force: true })` instead.
|
|
147
|
+
*
|
|
148
|
+
* If `true`, perform a recursive directory removal. In
|
|
149
|
+
* recursive mode, operations are retried on failure.
|
|
150
|
+
* @default false
|
|
151
|
+
*/
|
|
152
|
+
recursive?: boolean | undefined;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Synchronous symlink(2) - Create a new symbolic link to an existing file.
|
|
156
|
+
* @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
|
|
157
|
+
* @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
|
|
158
|
+
* @param [type='null']
|
|
159
|
+
*/
|
|
160
|
+
export function symlinkSync(
|
|
161
|
+
target: PathLike,
|
|
162
|
+
path: PathLike,
|
|
163
|
+
type?: "dir" | "file" | "junction" | null
|
|
164
|
+
): void;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`.
|
|
168
|
+
*
|
|
169
|
+
* Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error
|
|
170
|
+
* on Windows and an `ENOTDIR` error on POSIX.
|
|
171
|
+
*
|
|
172
|
+
* To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`.
|
|
173
|
+
*/
|
|
174
|
+
export function rmdirSync(path: PathLike, options?: RmDirOptions): void;
|
|
175
|
+
|
|
176
|
+
export interface RmOptions {
|
|
177
|
+
/**
|
|
178
|
+
* When `true`, exceptions will be ignored if `path` does not exist.
|
|
179
|
+
* @default false
|
|
180
|
+
*/
|
|
181
|
+
force?: boolean | undefined;
|
|
182
|
+
/**
|
|
183
|
+
* If `true`, perform a recursive directory removal. In
|
|
184
|
+
* recursive mode, operations are retried on failure.
|
|
185
|
+
* @default false
|
|
186
|
+
*/
|
|
187
|
+
recursive?: boolean | undefined;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). Returns `undefined`.
|
|
192
|
+
*/
|
|
193
|
+
export function rmSync(path: PathLike, options?: RmOptions): void;
|
|
194
|
+
|
|
195
|
+
export interface MakeDirectoryOptions {
|
|
196
|
+
/**
|
|
197
|
+
* Indicates whether parent folders should be created.
|
|
198
|
+
* If a folder was created, the path to the first created folder will be returned.
|
|
199
|
+
* @default false
|
|
200
|
+
*/
|
|
201
|
+
recursive?: boolean | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* A file mode. If not specified
|
|
204
|
+
* @default 0o777
|
|
205
|
+
*/
|
|
206
|
+
mode?: Mode | undefined;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Synchronously creates a directory. Returns the `path`.
|
|
211
|
+
*
|
|
212
|
+
* See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
|
|
213
|
+
*/
|
|
214
|
+
export function mkdirSync(
|
|
215
|
+
path: PathLike,
|
|
216
|
+
options?: MakeDirectoryOptions
|
|
217
|
+
): string;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Returns the created directory path.
|
|
221
|
+
*
|
|
222
|
+
* For detailed information, see the documentation of the asynchronous version of
|
|
223
|
+
* this API: {@link promises.mkdtemp}.
|
|
224
|
+
*/
|
|
225
|
+
export function mkdtempSync(prefix: string): string;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Reads the contents of the directory.
|
|
229
|
+
*
|
|
230
|
+
* See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details.
|
|
231
|
+
*
|
|
232
|
+
* If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects.
|
|
233
|
+
*/
|
|
234
|
+
export function readdirSync(
|
|
235
|
+
path: PathLike,
|
|
236
|
+
options?: {
|
|
237
|
+
withFileTypes?: false | undefined;
|
|
238
|
+
recursive?: boolean | undefined;
|
|
239
|
+
}
|
|
240
|
+
): string[];
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Synchronous readdir (2) - read a directory.
|
|
244
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
245
|
+
* @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
|
|
246
|
+
*/
|
|
247
|
+
export function readdirSync(
|
|
248
|
+
path: PathLike,
|
|
249
|
+
options: {
|
|
250
|
+
withFileTypes: true;
|
|
251
|
+
recursive?: boolean | undefined;
|
|
252
|
+
}
|
|
253
|
+
): Dirent[];
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Returns the contents of the `path`.
|
|
257
|
+
*
|
|
258
|
+
* For detailed information, see the documentation of the asynchronous version of
|
|
259
|
+
* this API: {@link promises.readFile}.
|
|
260
|
+
*
|
|
261
|
+
* If the `encoding` option is specified then this function returns a
|
|
262
|
+
* string. Otherwise it returns a buffer.
|
|
263
|
+
*
|
|
264
|
+
* @param path A path to a file.
|
|
265
|
+
*/
|
|
266
|
+
export function readFileSync(
|
|
267
|
+
path: PathLike,
|
|
268
|
+
options?: {
|
|
269
|
+
encoding?: null | undefined;
|
|
270
|
+
} | null
|
|
271
|
+
): Buffer;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Synchronously reads the entire contents of a file.
|
|
275
|
+
* @param path A path to a file.
|
|
276
|
+
* @param options Either the encoding for the result, or an object that contains the encoding.
|
|
277
|
+
*/
|
|
278
|
+
export function readFileSync(
|
|
279
|
+
path: PathLike,
|
|
280
|
+
options:
|
|
281
|
+
| {
|
|
282
|
+
encoding: BufferEncoding;
|
|
283
|
+
}
|
|
284
|
+
| BufferEncoding
|
|
285
|
+
): string;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Returns `undefined`.
|
|
289
|
+
*
|
|
290
|
+
* For detailed information, see the documentation of the asynchronous version of
|
|
291
|
+
* this API: {@link promises.writeFile}.
|
|
292
|
+
* @param file A path to a file.
|
|
293
|
+
*/
|
|
294
|
+
export function writeFileSync(
|
|
295
|
+
file: PathLike,
|
|
296
|
+
data:
|
|
297
|
+
| string
|
|
298
|
+
| Buffer
|
|
299
|
+
| QuickJS.ArrayBufferView
|
|
300
|
+
| ArrayBuffer
|
|
301
|
+
| SharedArrayBuffer,
|
|
302
|
+
options?:
|
|
303
|
+
| {
|
|
304
|
+
mode?: Mode | undefined;
|
|
305
|
+
}
|
|
306
|
+
| undefined
|
|
307
|
+
): void;
|
|
308
|
+
|
|
309
|
+
export namespace constants {
|
|
310
|
+
// File Access Constants
|
|
311
|
+
/** Constant for fs.access(). File is visible to the calling process. */
|
|
312
|
+
const F_OK: number;
|
|
313
|
+
/** Constant for fs.access(). File can be read by the calling process. */
|
|
314
|
+
const R_OK: number;
|
|
315
|
+
/** Constant for fs.access(). File can be written by the calling process. */
|
|
316
|
+
const W_OK: number;
|
|
317
|
+
/** Constant for fs.access(). File can be executed by the calling process. */
|
|
318
|
+
const X_OK: number;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Synchronously tests a user's permissions for the file or directory specified
|
|
323
|
+
* by `path`. The `mode` argument is an optional integer that specifies the
|
|
324
|
+
* accessibility checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and
|
|
325
|
+
* `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
|
|
326
|
+
* possible values of `mode`.
|
|
327
|
+
*
|
|
328
|
+
* If any of the accessibility checks fail, an `Error` will be thrown. Otherwise,
|
|
329
|
+
* the method will return `undefined`.
|
|
330
|
+
*
|
|
331
|
+
* ```js
|
|
332
|
+
* import { accessSync, constants } from 'fs';
|
|
333
|
+
*
|
|
334
|
+
* try {
|
|
335
|
+
* accessSync('etc/passwd', constants.R_OK | constants.W_OK);
|
|
336
|
+
* console.log('can read/write');
|
|
337
|
+
* } catch (err) {
|
|
338
|
+
* console.error('no access!');
|
|
339
|
+
* }
|
|
340
|
+
* ```
|
|
341
|
+
* @param [mode=fs.constants.F_OK]
|
|
342
|
+
*/
|
|
343
|
+
export function accessSync(path: PathLike, mode?: Mode): void;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* For detailed information, see the documentation of the asynchronous version of
|
|
347
|
+
* this API: {@link chmod}.
|
|
348
|
+
*
|
|
349
|
+
* See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
|
|
350
|
+
*/
|
|
351
|
+
export function chmodSync(path: PathLike, mode: Mode): void;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Synchronously renames a file or directory from `oldPath` to `newPath`.
|
|
355
|
+
*
|
|
356
|
+
* For detailed information, see the documentation of the asynchronous version of
|
|
357
|
+
* this API: {@link promises.rename}.
|
|
358
|
+
*/
|
|
359
|
+
export function renameSync(oldPath: PathLike, newPath: PathLike): void;
|
|
360
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Performance } from "perf_hooks";
|
|
2
|
+
|
|
3
|
+
export {};
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
namespace QuickJS {
|
|
7
|
+
type TypedArray =
|
|
8
|
+
| Uint8Array
|
|
9
|
+
| Uint8ClampedArray
|
|
10
|
+
| Uint16Array
|
|
11
|
+
| Uint32Array
|
|
12
|
+
| Int8Array
|
|
13
|
+
| Int16Array
|
|
14
|
+
| Int32Array
|
|
15
|
+
| BigUint64Array
|
|
16
|
+
| BigInt64Array
|
|
17
|
+
| Float32Array
|
|
18
|
+
| Float64Array;
|
|
19
|
+
type ArrayBufferView = TypedArray | DataView;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var performance: Performance;
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTPS is the HTTP protocol over TLS/SSL.
|
|
3
|
+
*/
|
|
4
|
+
declare module "https" {
|
|
5
|
+
import { Buffer } from "buffer";
|
|
6
|
+
|
|
7
|
+
interface AgentOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Optionally override the trusted CA certificates. Default is to trust
|
|
10
|
+
* the well-known CAs curated by Mozilla. Mozilla's CAs are completely
|
|
11
|
+
* replaced when CAs are explicitly specified using this option.
|
|
12
|
+
*/
|
|
13
|
+
ca?: string | Buffer | Array<string | Buffer> | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Whether to reject unauthorized certificates. Default is `true`.
|
|
16
|
+
*/
|
|
17
|
+
rejectUnauthorized?: boolean | undefined;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* An `Agent` is responsible for managing connection persistence
|
|
21
|
+
* and reuse for HTTP clients. Currently only a small subset of the options
|
|
22
|
+
* are supported.
|
|
23
|
+
*/
|
|
24
|
+
class Agent {
|
|
25
|
+
constructor(opts?: AgentOptions);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference path="./abort.d.ts" />
|
|
2
|
+
/// <reference path="./assert.d.ts" />
|
|
3
|
+
/// <reference path="./async_hooks.d.ts" />
|
|
4
|
+
/// <reference path="./buffer.d.ts" />
|
|
5
|
+
/// <reference path="./child_process.d.ts" />
|
|
6
|
+
/// <reference path="./console.d.ts" />
|
|
7
|
+
/// <reference path="./crypto.d.ts" />
|
|
8
|
+
/// <reference path="./dgram.d.ts" />
|
|
9
|
+
/// <reference path="./dns.d.ts" />
|
|
10
|
+
/// <reference path="./dom-events.d.ts" />
|
|
11
|
+
/// <reference path="./events.d.ts" />
|
|
12
|
+
/// <reference path="./exceptions.d.ts" />
|
|
13
|
+
/// <reference path="./fetch.d.ts" />
|
|
14
|
+
/// <reference path="./fs.d.ts" />
|
|
15
|
+
/// <reference path="./fs/promises.d.ts" />
|
|
16
|
+
/// <reference path="./globals.d.ts" />
|
|
17
|
+
/// <reference path="./https.d.ts" />
|
|
18
|
+
/// <reference path="./module.d.ts" />
|
|
19
|
+
/// <reference path="./navigator.d.ts" />
|
|
20
|
+
/// <reference path="./net.d.ts" />
|
|
21
|
+
/// <reference path="./os.d.ts" />
|
|
22
|
+
/// <reference path="./path.d.ts" />
|
|
23
|
+
/// <reference path="./perf_hooks.d.ts" />
|
|
24
|
+
/// <reference path="./process.d.ts" />
|
|
25
|
+
/// <reference path="./stream.d.ts" />
|
|
26
|
+
/// <reference path="./stream/web.d.ts" />
|
|
27
|
+
/// <reference path="./string_decoder.d.ts" />
|
|
28
|
+
/// <reference path="./timers.d.ts" />
|
|
29
|
+
/// <reference path="./timezone.d.ts" />
|
|
30
|
+
/// <reference path="./tty.d.ts" />
|
|
31
|
+
/// <reference path="./url.d.ts" />
|
|
32
|
+
/// <reference path="./util.d.ts" />
|
|
33
|
+
/// <reference path="./zlib.d.ts" />
|