@scelar/nodepod 1.0.1 → 1.0.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.
Files changed (119) hide show
  1. package/dist/__tests__/smoke.test.d.ts +1 -0
  2. package/dist/constants/cdn-urls.d.ts +12 -0
  3. package/dist/constants/config.d.ts +121 -0
  4. package/dist/cross-origin.d.ts +5 -0
  5. package/dist/engine-factory.d.ts +24 -0
  6. package/dist/engine-types.d.ts +40 -0
  7. package/dist/helpers/byte-encoding.d.ts +4 -0
  8. package/dist/helpers/digest.d.ts +1 -0
  9. package/dist/helpers/event-loop.d.ts +12 -0
  10. package/dist/helpers/wasm-cache.d.ts +6 -0
  11. package/dist/iframe-sandbox.d.ts +25 -0
  12. package/dist/index.d.ts +86 -0
  13. package/dist/isolation-helpers.d.ts +13 -0
  14. package/dist/memory-volume.d.ts +147 -0
  15. package/dist/module-transformer.d.ts +6 -0
  16. package/dist/packages/archive-extractor.d.ts +28 -0
  17. package/dist/packages/browser-bundler.d.ts +14 -0
  18. package/dist/packages/installer.d.ts +41 -0
  19. package/dist/packages/registry-client.d.ts +46 -0
  20. package/dist/packages/version-resolver.d.ts +37 -0
  21. package/dist/polyfills/assert.d.ts +54 -0
  22. package/dist/polyfills/async_hooks.d.ts +46 -0
  23. package/dist/polyfills/buffer.d.ts +111 -0
  24. package/dist/polyfills/child_process.d.ts +141 -0
  25. package/dist/polyfills/chokidar.d.ts +63 -0
  26. package/dist/polyfills/cluster.d.ts +55 -0
  27. package/dist/polyfills/console.d.ts +72 -0
  28. package/dist/polyfills/constants.d.ts +207 -0
  29. package/dist/polyfills/crypto.d.ts +189 -0
  30. package/dist/polyfills/dgram.d.ts +37 -0
  31. package/dist/polyfills/diagnostics_channel.d.ts +27 -0
  32. package/dist/polyfills/dns.d.ts +76 -0
  33. package/dist/polyfills/domain.d.ts +27 -0
  34. package/dist/polyfills/esbuild.d.ts +106 -0
  35. package/dist/polyfills/events.d.ts +39 -0
  36. package/dist/polyfills/fs.d.ts +274 -0
  37. package/dist/polyfills/fsevents.d.ts +62 -0
  38. package/dist/polyfills/http.d.ts +215 -0
  39. package/dist/polyfills/http2.d.ts +119 -0
  40. package/dist/polyfills/https.d.ts +24 -0
  41. package/dist/polyfills/inspector.d.ts +29 -0
  42. package/dist/polyfills/lightningcss.d.ts +70 -0
  43. package/dist/polyfills/module.d.ts +35 -0
  44. package/dist/polyfills/net.d.ts +91 -0
  45. package/dist/polyfills/os.d.ts +240 -0
  46. package/dist/polyfills/path.d.ts +95 -0
  47. package/dist/polyfills/perf_hooks.d.ts +48 -0
  48. package/dist/polyfills/process.d.ts +190 -0
  49. package/dist/polyfills/punycode.d.ts +21 -0
  50. package/dist/polyfills/querystring.d.ts +18 -0
  51. package/dist/polyfills/quic.d.ts +42 -0
  52. package/dist/polyfills/readdirp.d.ts +48 -0
  53. package/dist/polyfills/readline.d.ts +87 -0
  54. package/dist/polyfills/repl.d.ts +45 -0
  55. package/dist/polyfills/rollup.d.ts +37 -0
  56. package/dist/polyfills/sea.d.ts +11 -0
  57. package/dist/polyfills/sqlite.d.ts +30 -0
  58. package/dist/polyfills/stream.d.ts +160 -0
  59. package/dist/polyfills/string_decoder.d.ts +16 -0
  60. package/dist/polyfills/tailwindcss-oxide.d.ts +42 -0
  61. package/dist/polyfills/test.d.ts +60 -0
  62. package/dist/polyfills/timers.d.ts +23 -0
  63. package/dist/polyfills/tls.d.ts +61 -0
  64. package/dist/polyfills/trace_events.d.ts +22 -0
  65. package/dist/polyfills/tty.d.ts +38 -0
  66. package/dist/polyfills/url.d.ts +55 -0
  67. package/dist/polyfills/util.d.ts +135 -0
  68. package/dist/polyfills/v8.d.ts +97 -0
  69. package/dist/polyfills/vm.d.ts +66 -0
  70. package/dist/polyfills/volume-registry.d.ts +3 -0
  71. package/dist/polyfills/wasi.d.ts +16 -0
  72. package/dist/polyfills/worker_threads.d.ts +111 -0
  73. package/dist/polyfills/ws.d.ts +92 -0
  74. package/dist/polyfills/zlib.d.ts +278 -0
  75. package/dist/request-proxy.d.ts +63 -0
  76. package/dist/script-engine.d.ts +79 -0
  77. package/dist/sdk/nodepod-fs.d.ts +27 -0
  78. package/dist/sdk/nodepod-process.d.ts +28 -0
  79. package/dist/sdk/nodepod-terminal.d.ts +48 -0
  80. package/dist/sdk/nodepod.d.ts +39 -0
  81. package/dist/sdk/types.d.ts +53 -0
  82. package/dist/shell/commands/bun.d.ts +4 -0
  83. package/dist/shell/commands/directory.d.ts +2 -0
  84. package/dist/shell/commands/file-ops.d.ts +2 -0
  85. package/dist/shell/commands/git.d.ts +2 -0
  86. package/dist/shell/commands/node.d.ts +4 -0
  87. package/dist/shell/commands/npm.d.ts +3 -0
  88. package/dist/shell/commands/pm-types.d.ts +25 -0
  89. package/dist/shell/commands/pnpm.d.ts +3 -0
  90. package/dist/shell/commands/search.d.ts +2 -0
  91. package/dist/shell/commands/shell-env.d.ts +3 -0
  92. package/dist/shell/commands/text-processing.d.ts +2 -0
  93. package/dist/shell/commands/yarn.d.ts +3 -0
  94. package/dist/shell/shell-builtins.d.ts +2 -0
  95. package/dist/shell/shell-helpers.d.ts +28 -0
  96. package/dist/shell/shell-interpreter.d.ts +48 -0
  97. package/dist/shell/shell-parser.d.ts +6 -0
  98. package/dist/shell/shell-types.d.ts +48 -0
  99. package/dist/syntax-transforms.d.ts +3 -0
  100. package/dist/threading/engine-worker.d.ts +1 -0
  101. package/dist/threading/inline-worker.d.ts +2 -0
  102. package/dist/threading/offload-types.d.ts +87 -0
  103. package/dist/threading/offload-worker.d.ts +1 -0
  104. package/dist/threading/offload.d.ts +16 -0
  105. package/dist/threading/process-context.d.ts +40 -0
  106. package/dist/threading/process-handle.d.ts +42 -0
  107. package/dist/threading/process-manager.d.ts +52 -0
  108. package/dist/threading/process-worker-entry.d.ts +24 -0
  109. package/dist/threading/shared-vfs.d.ts +36 -0
  110. package/dist/threading/sync-channel.d.ts +21 -0
  111. package/dist/threading/task-queue.d.ts +15 -0
  112. package/dist/threading/vfs-bridge.d.ts +25 -0
  113. package/dist/threading/worker-pool.d.ts +38 -0
  114. package/dist/threading/worker-protocol.d.ts +264 -0
  115. package/dist/threading/worker-vfs.d.ts +34 -0
  116. package/dist/types/fs-streams.d.ts +122 -0
  117. package/dist/types/manifest.d.ts +17 -0
  118. package/dist/worker-sandbox.d.ts +19 -0
  119. package/package.json +1 -1
@@ -0,0 +1,160 @@
1
+ import { EventEmitter } from "./events";
2
+ export interface Readable extends EventEmitter {
3
+ readable: boolean;
4
+ readableEnded: boolean;
5
+ readableFlowing: boolean | null;
6
+ destroyed: boolean;
7
+ closed: boolean;
8
+ errored: Error | null;
9
+ readableObjectMode: boolean;
10
+ readableHighWaterMark: number;
11
+ readableDidRead: boolean;
12
+ readableAborted: boolean;
13
+ _readableState: any;
14
+ _read(size: number): void;
15
+ _destroy(err: Error | null, cb: (err?: Error | null) => void): void;
16
+ readonly readableLength: number;
17
+ readonly readableEncoding: BufferEncoding | null;
18
+ _rawBind(evt: string | symbol, fn: (...args: unknown[]) => void): this;
19
+ on(evt: string | symbol, fn: (...args: any[]) => void): this;
20
+ addListener(evt: string | symbol, fn: (...args: any[]) => void): this;
21
+ once(evt: string | symbol, fn: (...args: any[]) => void): this;
22
+ push(chunk: any): boolean;
23
+ unshift(chunk: any): void;
24
+ read(amount?: number): any;
25
+ resume(): this;
26
+ pause(): this;
27
+ isPaused(): boolean;
28
+ pipe(target: any): any;
29
+ unpipe(target?: any): this;
30
+ setEncoding(enc: string): this;
31
+ close(cb?: (err?: Error | null) => void): void;
32
+ destroy(fault?: Error): this;
33
+ wrap(oldStream: EventEmitter): this;
34
+ [Symbol.asyncIterator](): AsyncIterableIterator<unknown>;
35
+ }
36
+ interface ReadableConstructor {
37
+ new (opts?: any): Readable;
38
+ (this: any, opts?: any): void;
39
+ prototype: any;
40
+ toWeb(readable: Readable): ReadableStream<Uint8Array>;
41
+ fromWeb(webStream: ReadableStream, opts?: any): Readable;
42
+ from(source: Iterable<unknown> | AsyncIterable<unknown>, opts?: any): Readable;
43
+ }
44
+ export declare const Readable: ReadableConstructor;
45
+ export interface Writable extends EventEmitter {
46
+ writable: boolean;
47
+ writableEnded: boolean;
48
+ writableFinished: boolean;
49
+ writableNeedDrain: boolean;
50
+ destroyed: boolean;
51
+ closed: boolean;
52
+ errored: Error | null;
53
+ writableObjectMode: boolean;
54
+ writableHighWaterMark: number;
55
+ writableCorked: number;
56
+ _writableState: any;
57
+ _write(chunk: any, encoding: string, callback: (err?: Error | null) => void): void;
58
+ _writev?(chunks: Array<{
59
+ chunk: any;
60
+ encoding: string;
61
+ }>, callback: (err?: Error | null) => void): void;
62
+ _final(callback: (err?: Error | null) => void): void;
63
+ _destroy(err: Error | null, cb: (err?: Error | null) => void): void;
64
+ readonly writableLength: number;
65
+ write(chunk: any, encOrCb?: any, cb?: any): boolean;
66
+ end(chunkOrCb?: any, encOrCb?: any, cb?: any): this;
67
+ getBuffer(): Buffer;
68
+ getBufferAsString(enc?: BufferEncoding): string;
69
+ close(cb?: (err?: Error | null) => void): void;
70
+ destroy(fault?: Error): this;
71
+ cork(): void;
72
+ uncork(): void;
73
+ setDefaultEncoding(enc: string): this;
74
+ }
75
+ interface WritableConstructor {
76
+ new (opts?: any): Writable;
77
+ (this: any, opts?: any): void;
78
+ prototype: any;
79
+ toWeb(writable: Writable): WritableStream<Uint8Array>;
80
+ fromWeb(webStream: WritableStream, opts?: any): Writable;
81
+ }
82
+ export declare const Writable: WritableConstructor;
83
+ export interface Duplex extends Readable {
84
+ writable: boolean;
85
+ writableEnded: boolean;
86
+ writableFinished: boolean;
87
+ writableNeedDrain: boolean;
88
+ writableObjectMode: boolean;
89
+ writableHighWaterMark: number;
90
+ writableCorked: number;
91
+ allowHalfOpen: boolean;
92
+ _writableState: any;
93
+ _write(chunk: any, encoding: string, callback: (err?: Error | null) => void): void;
94
+ _writev?(chunks: Array<{
95
+ chunk: any;
96
+ encoding: string;
97
+ }>, callback: (err?: Error | null) => void): void;
98
+ _final(callback: (err?: Error | null) => void): void;
99
+ readonly writableLength: number;
100
+ write(chunk: any, encOrCb?: any, cb?: any): boolean;
101
+ end(chunkOrCb?: any, encOrCb?: any, cb?: any): this;
102
+ cork(): void;
103
+ uncork(): void;
104
+ setDefaultEncoding(enc: string): this;
105
+ }
106
+ interface DuplexConstructor {
107
+ new (opts?: any): Duplex;
108
+ (this: any, opts?: any): void;
109
+ prototype: any;
110
+ from(source: any, opts?: any): Duplex;
111
+ toWeb(duplex: any): any;
112
+ fromWeb(source: any, opts?: any): any;
113
+ }
114
+ export declare const Duplex: DuplexConstructor;
115
+ export interface PassThrough extends Duplex {
116
+ }
117
+ interface PassThroughConstructor {
118
+ new (opts?: any): PassThrough;
119
+ (this: any, opts?: any): void;
120
+ prototype: any;
121
+ }
122
+ export declare const PassThrough: PassThroughConstructor;
123
+ export interface Transform extends Duplex {
124
+ _transform(chunk: any, encoding: string, done: (err?: Error | null, output?: any) => void): void;
125
+ _flush(done: (err?: Error | null, output?: any) => void): void;
126
+ }
127
+ interface TransformConstructor {
128
+ new (opts?: any): Transform;
129
+ (this: any, opts?: any): void;
130
+ prototype: any;
131
+ }
132
+ export declare const Transform: TransformConstructor;
133
+ export interface Stream extends EventEmitter {
134
+ pipe(dest: any): any;
135
+ }
136
+ interface StreamConstructor {
137
+ new (): Stream;
138
+ (this: any): void;
139
+ prototype: any;
140
+ }
141
+ export declare const Stream: StreamConstructor;
142
+ export declare function addAbortSignal(signal: AbortSignal, stream: any): any;
143
+ export declare function pipeline(...args: unknown[]): unknown;
144
+ export declare function finished(stream: unknown, optsOrCb?: {
145
+ error?: boolean;
146
+ } | ((err?: Error) => void), cb?: (err?: Error) => void): () => void;
147
+ export declare function getDefaultHighWaterMark(objectMode?: boolean): number;
148
+ export declare function setDefaultHighWaterMark(objectMode: boolean, value: number): void;
149
+ export declare const promises: {
150
+ pipeline: (...streams: unknown[]) => Promise<void>;
151
+ finished: (stream: unknown, opts?: {
152
+ error?: boolean;
153
+ }) => Promise<void>;
154
+ };
155
+ export declare function compose(..._streams: unknown[]): Duplex;
156
+ export declare function isReadable(stream: unknown): boolean;
157
+ export declare function isWritable(stream: unknown): boolean;
158
+ export declare function isDisturbed(stream: unknown): boolean;
159
+ export declare function isErrored(stream: unknown): boolean;
160
+ export default Stream;
@@ -0,0 +1,16 @@
1
+ export interface StringDecoder {
2
+ encoding: string;
3
+ write(buf: Uint8Array | Buffer): string;
4
+ end(buf?: Uint8Array | Buffer): string;
5
+ }
6
+ export declare const StringDecoder: {
7
+ new (encoding?: string): StringDecoder;
8
+ prototype: any;
9
+ };
10
+ declare const _default: {
11
+ StringDecoder: {
12
+ new (encoding?: string): StringDecoder;
13
+ prototype: any;
14
+ };
15
+ };
16
+ export default _default;
@@ -0,0 +1,42 @@
1
+ interface SourceEntry {
2
+ base: string;
3
+ pattern: string;
4
+ negated?: boolean;
5
+ }
6
+ interface ChangedContent {
7
+ file?: string;
8
+ content?: string;
9
+ extension: string;
10
+ }
11
+ export interface Scanner {
12
+ _sources: SourceEntry[];
13
+ _fileList: string[] | null;
14
+ _scannedCandidates: string[] | null;
15
+ _collectFiles(): string[];
16
+ scan(): string[];
17
+ scanFiles(changedContent: ChangedContent[]): string[];
18
+ getCandidatesWithPositions(changedContent: ChangedContent[]): Array<{
19
+ candidate: string;
20
+ position: number;
21
+ }>;
22
+ readonly files: string[];
23
+ readonly globs: Array<{
24
+ base: string;
25
+ pattern: string;
26
+ }>;
27
+ readonly normalizedSources: SourceEntry[];
28
+ }
29
+ interface ScannerConstructor {
30
+ new (opts?: {
31
+ sources?: SourceEntry[];
32
+ }): Scanner;
33
+ (this: any, opts?: {
34
+ sources?: SourceEntry[];
35
+ }): void;
36
+ prototype: any;
37
+ }
38
+ export declare const Scanner: ScannerConstructor;
39
+ declare const _default: {
40
+ Scanner: ScannerConstructor;
41
+ };
42
+ export default _default;
@@ -0,0 +1,60 @@
1
+ export interface TestContext {
2
+ name: string;
3
+ signal: AbortSignal;
4
+ _controller: AbortController;
5
+ diagnostic(msg: string): void;
6
+ plan(_count: number): void;
7
+ todo(msg?: string): void;
8
+ skip(msg?: string): void;
9
+ abort(): void;
10
+ }
11
+ interface TestContextConstructor {
12
+ new (name: string): TestContext;
13
+ (this: any, name: string): void;
14
+ prototype: any;
15
+ }
16
+ export declare const TestContext: TestContextConstructor;
17
+ type TestFn = (t: TestContext) => void | Promise<void>;
18
+ type HookFn = () => void | Promise<void>;
19
+ interface TestOpts {
20
+ name: string;
21
+ skip?: boolean;
22
+ todo?: boolean;
23
+ only?: boolean;
24
+ }
25
+ export declare function describe(name: string, fn: () => void | Promise<void>): void;
26
+ export declare function describe(options: TestOpts, fn: () => void | Promise<void>): void;
27
+ export declare function it(name: string, fn?: TestFn): void;
28
+ export declare function it(options: TestOpts, fn?: TestFn): void;
29
+ export { it as test };
30
+ export declare function before(fn: HookFn): void;
31
+ export declare function after(fn: HookFn): void;
32
+ export declare function beforeEach(fn: HookFn): void;
33
+ export declare function afterEach(fn: HookFn): void;
34
+ export declare function skip(name?: string, _fn?: TestFn): void;
35
+ export declare function todo(name?: string, _fn?: TestFn): void;
36
+ export declare const mock: {
37
+ fn(impl?: Function): Function;
38
+ method(obj: Record<string, unknown>, methodName: string, impl?: Function): Function;
39
+ reset(): void;
40
+ restoreAll(): void;
41
+ };
42
+ declare const _default: {
43
+ describe: typeof describe;
44
+ it: typeof it;
45
+ test: typeof it;
46
+ before: typeof before;
47
+ after: typeof after;
48
+ beforeEach: typeof beforeEach;
49
+ afterEach: typeof afterEach;
50
+ skip: typeof skip;
51
+ todo: typeof todo;
52
+ mock: {
53
+ fn(impl?: Function): Function;
54
+ method(obj: Record<string, unknown>, methodName: string, impl?: Function): Function;
55
+ reset(): void;
56
+ restoreAll(): void;
57
+ };
58
+ TestContext: TestContextConstructor;
59
+ };
60
+ export default _default;
@@ -0,0 +1,23 @@
1
+ export declare const setTimeout: typeof globalThis.setTimeout;
2
+ export declare const setInterval: typeof globalThis.setInterval;
3
+ export declare const setImmediate: (fn: (...args: unknown[]) => void, ...args: unknown[]) => NodeJS.Timeout;
4
+ export declare const clearTimeout: typeof globalThis.clearTimeout;
5
+ export declare const clearInterval: typeof globalThis.clearInterval;
6
+ export declare const clearImmediate: typeof globalThis.clearTimeout;
7
+ export declare const promises: {
8
+ setTimeout: (ms: number, value?: unknown) => Promise<unknown>;
9
+ setInterval: typeof globalThis.setInterval;
10
+ setImmediate: (value?: unknown) => Promise<unknown>;
11
+ scheduler: {
12
+ wait: (ms: number) => Promise<unknown>;
13
+ };
14
+ };
15
+ declare const _default: {
16
+ setTimeout: typeof globalThis.setTimeout;
17
+ setInterval: typeof globalThis.setInterval;
18
+ setImmediate: (fn: (...args: unknown[]) => void, ...args: unknown[]) => NodeJS.Timeout;
19
+ clearTimeout: typeof globalThis.clearTimeout;
20
+ clearInterval: typeof globalThis.clearInterval;
21
+ clearImmediate: typeof globalThis.clearTimeout;
22
+ };
23
+ export default _default;
@@ -0,0 +1,61 @@
1
+ import { EventEmitter } from "./events";
2
+ export interface TLSSocket extends EventEmitter {
3
+ authorized: boolean;
4
+ encrypted: boolean;
5
+ getPeerCertificate(_detailed?: boolean): object;
6
+ getCipher(): {
7
+ name: string;
8
+ version: string;
9
+ } | null;
10
+ getProtocol(): string | null;
11
+ setServername(_name: string): void;
12
+ renegotiate(_opts: unknown, _cb: (err: Error | null) => void): boolean;
13
+ }
14
+ export declare const TLSSocket: {
15
+ new (_sock?: unknown, _opts?: unknown): TLSSocket;
16
+ prototype: any;
17
+ };
18
+ export interface Server extends EventEmitter {
19
+ listen(..._args: unknown[]): this;
20
+ close(_cb?: (err?: Error) => void): this;
21
+ address(): {
22
+ port: number;
23
+ family: string;
24
+ address: string;
25
+ } | string | null;
26
+ getTicketKeys(): Uint8Array;
27
+ setTicketKeys(_keys: Uint8Array): void;
28
+ setSecureContext(_opts: unknown): void;
29
+ }
30
+ export declare const Server: {
31
+ new (_opts?: unknown, _handler?: (sock: TLSSocket) => void): Server;
32
+ prototype: any;
33
+ };
34
+ export declare function createServer(_opts?: unknown, _handler?: (sock: TLSSocket) => void): Server;
35
+ export declare function connect(_opts: unknown, _cb?: () => void): TLSSocket;
36
+ export declare function createSecureContext(_opts?: unknown): object;
37
+ export type SecureContext = object;
38
+ export declare const getCiphers: () => string[];
39
+ export declare const DEFAULT_ECDH_CURVE = "auto";
40
+ export declare const DEFAULT_MAX_VERSION = "TLSv1.3";
41
+ export declare const DEFAULT_MIN_VERSION = "TLSv1.2";
42
+ export declare const rootCertificates: string[];
43
+ declare const _default: {
44
+ TLSSocket: {
45
+ new (_sock?: unknown, _opts?: unknown): TLSSocket;
46
+ prototype: any;
47
+ };
48
+ Server: {
49
+ new (_opts?: unknown, _handler?: (sock: TLSSocket) => void): Server;
50
+ prototype: any;
51
+ };
52
+ createServer: typeof createServer;
53
+ connect: typeof connect;
54
+ createSecureContext: typeof createSecureContext;
55
+ getCiphers: () => string[];
56
+ DEFAULT_ECDH_CURVE: string;
57
+ DEFAULT_MAX_VERSION: string;
58
+ DEFAULT_MIN_VERSION: string;
59
+ rootCertificates: string[];
60
+ };
61
+ export default _default;
@@ -0,0 +1,22 @@
1
+ export interface Tracing {
2
+ readonly categories: string;
3
+ readonly enabled: boolean;
4
+ enable(): void;
5
+ disable(): void;
6
+ }
7
+ interface TracingConstructor {
8
+ new (categories: string[]): Tracing;
9
+ (this: any, categories: string[]): void;
10
+ prototype: any;
11
+ }
12
+ export declare const Tracing: TracingConstructor;
13
+ export declare function createTracing(opts: {
14
+ categories: string[];
15
+ }): Tracing;
16
+ export declare function getEnabledCategories(): string | undefined;
17
+ declare const _default: {
18
+ createTracing: typeof createTracing;
19
+ getEnabledCategories: typeof getEnabledCategories;
20
+ Tracing: TracingConstructor;
21
+ };
22
+ export default _default;
@@ -0,0 +1,38 @@
1
+ export declare function isatty(_fd: number): boolean;
2
+ export interface ReadStream {
3
+ isTTY: boolean;
4
+ isRaw: boolean;
5
+ setRawMode(_mode: boolean): this;
6
+ }
7
+ export declare const ReadStream: {
8
+ new (): ReadStream;
9
+ prototype: any;
10
+ };
11
+ export interface WriteStream {
12
+ isTTY: boolean;
13
+ columns: number;
14
+ rows: number;
15
+ getColorDepth(): number;
16
+ hasColors(count?: number): boolean;
17
+ getWindowSize(): [number, number];
18
+ clearLine(_dir: number, _cb?: () => void): boolean;
19
+ clearScreenDown(_cb?: () => void): boolean;
20
+ cursorTo(_x: number, _y?: number | (() => void), _cb?: () => void): boolean;
21
+ moveCursor(_dx: number, _dy: number, _cb?: () => void): boolean;
22
+ }
23
+ export declare const WriteStream: {
24
+ new (): WriteStream;
25
+ prototype: any;
26
+ };
27
+ declare const _default: {
28
+ isatty: typeof isatty;
29
+ ReadStream: {
30
+ new (): ReadStream;
31
+ prototype: any;
32
+ };
33
+ WriteStream: {
34
+ new (): WriteStream;
35
+ prototype: any;
36
+ };
37
+ };
38
+ export default _default;
@@ -0,0 +1,55 @@
1
+ export interface Url {
2
+ protocol?: string | null;
3
+ slashes?: boolean | null;
4
+ auth?: string | null;
5
+ host?: string | null;
6
+ port?: string | null;
7
+ hostname?: string | null;
8
+ hash?: string | null;
9
+ search?: string | null;
10
+ query?: string | Record<string, string | string[]> | null;
11
+ pathname?: string | null;
12
+ path?: string | null;
13
+ href?: string;
14
+ }
15
+ export declare function parse(raw: string, parseQuery?: boolean, _slashesHost?: boolean): Url;
16
+ export declare function format(obj: Url): string;
17
+ export declare function resolve(base: string, target: string): string;
18
+ export declare const URL: {
19
+ new (url: string | URL, base?: string | URL): URL;
20
+ prototype: URL;
21
+ canParse(url: string | URL, base?: string | URL): boolean;
22
+ createObjectURL(obj: Blob | MediaSource): string;
23
+ parse(url: string | URL, base?: string | URL): URL | null;
24
+ revokeObjectURL(url: string): void;
25
+ };
26
+ export declare const URLSearchParams: {
27
+ new (init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
28
+ prototype: URLSearchParams;
29
+ };
30
+ export declare function fileURLToPath(input: string | URL): string;
31
+ export declare function pathToFileURL(fsPath: string): URL;
32
+ export declare function domainToASCII(domain: string): string;
33
+ export declare function domainToUnicode(domain: string): string;
34
+ declare const _default: {
35
+ parse: typeof parse;
36
+ format: typeof format;
37
+ resolve: typeof resolve;
38
+ URL: {
39
+ new (url: string | URL, base?: string | URL): URL;
40
+ prototype: URL;
41
+ canParse(url: string | URL, base?: string | URL): boolean;
42
+ createObjectURL(obj: Blob | MediaSource): string;
43
+ parse(url: string | URL, base?: string | URL): URL | null;
44
+ revokeObjectURL(url: string): void;
45
+ };
46
+ URLSearchParams: {
47
+ new (init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
48
+ prototype: URLSearchParams;
49
+ };
50
+ fileURLToPath: typeof fileURLToPath;
51
+ pathToFileURL: typeof pathToFileURL;
52
+ domainToASCII: typeof domainToASCII;
53
+ domainToUnicode: typeof domainToUnicode;
54
+ };
55
+ export default _default;
@@ -0,0 +1,135 @@
1
+ export declare function format(template: unknown, ...values: unknown[]): string;
2
+ export declare function inspect(target: unknown, opts?: {
3
+ depth?: number;
4
+ colors?: boolean;
5
+ }): string;
6
+ export declare function inherits(child: Function, parent: Function): void;
7
+ export declare function _extend(target: any, source: any): any;
8
+ export declare function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
9
+ export declare function promisify<T>(fn: (...args: any[]) => void): (...args: any[]) => Promise<T>;
10
+ export declare function callbackify<T>(fn: (...args: any[]) => Promise<T>): (...args: any[]) => void;
11
+ export declare function isDeepStrictEqual(a: unknown, b: unknown): boolean;
12
+ export declare function isArray(val: unknown): val is unknown[];
13
+ export declare function isBoolean(val: unknown): val is boolean;
14
+ export declare function isNull(val: unknown): val is null;
15
+ export declare function isNullOrUndefined(val: unknown): val is null | undefined;
16
+ export declare function isNumber(val: unknown): val is number;
17
+ export declare function isString(val: unknown): val is string;
18
+ export declare function isUndefined(val: unknown): val is undefined;
19
+ export declare function isRegExp(val: unknown): val is RegExp;
20
+ export declare function isObject(val: unknown): val is object;
21
+ export declare function isDate(val: unknown): val is Date;
22
+ export declare function isError(val: unknown): val is Error;
23
+ export declare function isFunction(val: unknown): val is Function;
24
+ export declare function isPrimitive(val: unknown): boolean;
25
+ export declare function isBuffer(val: unknown): boolean;
26
+ export declare function isPromise(val: unknown): val is Promise<unknown>;
27
+ export declare function debuglog(section: string): (...args: unknown[]) => void;
28
+ export declare const debug: typeof debuglog;
29
+ export declare function stripVTControlCharacters(text: string): string;
30
+ export declare const types: {
31
+ isArray: typeof isArray;
32
+ isBoolean: typeof isBoolean;
33
+ isNull: typeof isNull;
34
+ isNullOrUndefined: typeof isNullOrUndefined;
35
+ isNumber: typeof isNumber;
36
+ isString: typeof isString;
37
+ isUndefined: typeof isUndefined;
38
+ isRegExp: typeof isRegExp;
39
+ isObject: typeof isObject;
40
+ isDate: typeof isDate;
41
+ isError: typeof isError;
42
+ isFunction: typeof isFunction;
43
+ isPrimitive: typeof isPrimitive;
44
+ isBuffer: typeof isBuffer;
45
+ isPromise: typeof isPromise;
46
+ };
47
+ export declare function styleText(format: string | string[], text: string): string;
48
+ interface ParseArgsOptionConfig {
49
+ type: "string" | "boolean";
50
+ short?: string;
51
+ multiple?: boolean;
52
+ default?: string | boolean | string[] | boolean[];
53
+ }
54
+ interface ParseArgsConfig {
55
+ args?: string[];
56
+ options?: Record<string, ParseArgsOptionConfig>;
57
+ strict?: boolean;
58
+ allowPositionals?: boolean;
59
+ tokens?: boolean;
60
+ }
61
+ interface ParseArgsResult {
62
+ values: Record<string, string | boolean | (string | boolean)[] | undefined>;
63
+ positionals: string[];
64
+ tokens?: Array<{
65
+ kind: string;
66
+ name?: string;
67
+ value?: string | boolean;
68
+ index: number;
69
+ }>;
70
+ }
71
+ export declare function parseArgs(config?: ParseArgsConfig): ParseArgsResult;
72
+ export declare const TextEncoder: {
73
+ new (): TextEncoder;
74
+ prototype: TextEncoder;
75
+ };
76
+ export declare const TextDecoder: {
77
+ new (label?: string, options?: TextDecoderOptions): TextDecoder;
78
+ prototype: TextDecoder;
79
+ };
80
+ declare const _default: {
81
+ format: typeof format;
82
+ inspect: typeof inspect;
83
+ inherits: typeof inherits;
84
+ _extend: typeof _extend;
85
+ deprecate: typeof deprecate;
86
+ promisify: typeof promisify;
87
+ callbackify: typeof callbackify;
88
+ isDeepStrictEqual: typeof isDeepStrictEqual;
89
+ debuglog: typeof debuglog;
90
+ debug: typeof debuglog;
91
+ stripVTControlCharacters: typeof stripVTControlCharacters;
92
+ isArray: typeof isArray;
93
+ isBoolean: typeof isBoolean;
94
+ isNull: typeof isNull;
95
+ isNullOrUndefined: typeof isNullOrUndefined;
96
+ isNumber: typeof isNumber;
97
+ isString: typeof isString;
98
+ isUndefined: typeof isUndefined;
99
+ isRegExp: typeof isRegExp;
100
+ isObject: typeof isObject;
101
+ isDate: typeof isDate;
102
+ isError: typeof isError;
103
+ isFunction: typeof isFunction;
104
+ isPrimitive: typeof isPrimitive;
105
+ isBuffer: typeof isBuffer;
106
+ isPromise: typeof isPromise;
107
+ styleText: typeof styleText;
108
+ parseArgs: typeof parseArgs;
109
+ types: {
110
+ isArray: typeof isArray;
111
+ isBoolean: typeof isBoolean;
112
+ isNull: typeof isNull;
113
+ isNullOrUndefined: typeof isNullOrUndefined;
114
+ isNumber: typeof isNumber;
115
+ isString: typeof isString;
116
+ isUndefined: typeof isUndefined;
117
+ isRegExp: typeof isRegExp;
118
+ isObject: typeof isObject;
119
+ isDate: typeof isDate;
120
+ isError: typeof isError;
121
+ isFunction: typeof isFunction;
122
+ isPrimitive: typeof isPrimitive;
123
+ isBuffer: typeof isBuffer;
124
+ isPromise: typeof isPromise;
125
+ };
126
+ TextEncoder: {
127
+ new (): TextEncoder;
128
+ prototype: TextEncoder;
129
+ };
130
+ TextDecoder: {
131
+ new (label?: string, options?: TextDecoderOptions): TextDecoder;
132
+ prototype: TextDecoder;
133
+ };
134
+ };
135
+ export default _default;