@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,207 @@
1
+ export declare const SIGKILL = 9;
2
+ export declare const SIGTERM = 15;
3
+ export declare const SIGINT = 2;
4
+ export declare const SIGHUP = 1;
5
+ export declare const SIGQUIT = 3;
6
+ export declare const SIGABRT = 6;
7
+ export declare const SIGALRM = 14;
8
+ export declare const SIGUSR1 = 10;
9
+ export declare const SIGUSR2 = 12;
10
+ export declare const SIGPIPE = 13;
11
+ export declare const SIGCHLD = 17;
12
+ export declare const SIGCONT = 18;
13
+ export declare const SIGSTOP = 19;
14
+ export declare const SIGTSTP = 20;
15
+ export declare const F_OK = 0;
16
+ export declare const R_OK = 4;
17
+ export declare const W_OK = 2;
18
+ export declare const X_OK = 1;
19
+ export declare const O_RDONLY = 0;
20
+ export declare const O_WRONLY = 1;
21
+ export declare const O_RDWR = 2;
22
+ export declare const O_CREAT = 64;
23
+ export declare const O_EXCL = 128;
24
+ export declare const O_TRUNC = 512;
25
+ export declare const O_APPEND = 1024;
26
+ export declare const O_DIRECTORY = 65536;
27
+ export declare const O_NOFOLLOW = 131072;
28
+ export declare const O_SYNC = 1052672;
29
+ export declare const S_IFMT = 61440;
30
+ export declare const S_IFREG = 32768;
31
+ export declare const S_IFDIR = 16384;
32
+ export declare const S_IFCHR = 8192;
33
+ export declare const S_IFBLK = 24576;
34
+ export declare const S_IFIFO = 4096;
35
+ export declare const S_IFLNK = 40960;
36
+ export declare const S_IFSOCK = 49152;
37
+ export declare const EACCES = -13;
38
+ export declare const EEXIST = -17;
39
+ export declare const EISDIR = -21;
40
+ export declare const EMFILE = -24;
41
+ export declare const ENOENT = -2;
42
+ export declare const ENOTDIR = -20;
43
+ export declare const ENOTEMPTY = -39;
44
+ export declare const EPERM = -1;
45
+ export declare const EBADF = -9;
46
+ export declare const os: {
47
+ constants: {
48
+ signals: {
49
+ SIGKILL: number;
50
+ SIGTERM: number;
51
+ SIGINT: number;
52
+ SIGHUP: number;
53
+ SIGQUIT: number;
54
+ SIGABRT: number;
55
+ SIGALRM: number;
56
+ SIGUSR1: number;
57
+ SIGUSR2: number;
58
+ SIGPIPE: number;
59
+ SIGCHLD: number;
60
+ SIGCONT: number;
61
+ SIGSTOP: number;
62
+ SIGTSTP: number;
63
+ };
64
+ errno: {
65
+ EACCES: number;
66
+ EEXIST: number;
67
+ EISDIR: number;
68
+ EMFILE: number;
69
+ ENOENT: number;
70
+ ENOTDIR: number;
71
+ ENOTEMPTY: number;
72
+ EPERM: number;
73
+ EBADF: number;
74
+ };
75
+ };
76
+ };
77
+ export declare const fs: {
78
+ constants: {
79
+ F_OK: number;
80
+ R_OK: number;
81
+ W_OK: number;
82
+ X_OK: number;
83
+ O_RDONLY: number;
84
+ O_WRONLY: number;
85
+ O_RDWR: number;
86
+ O_CREAT: number;
87
+ O_EXCL: number;
88
+ O_TRUNC: number;
89
+ O_APPEND: number;
90
+ O_DIRECTORY: number;
91
+ O_NOFOLLOW: number;
92
+ O_SYNC: number;
93
+ S_IFMT: number;
94
+ S_IFREG: number;
95
+ S_IFDIR: number;
96
+ S_IFCHR: number;
97
+ S_IFBLK: number;
98
+ S_IFIFO: number;
99
+ S_IFLNK: number;
100
+ S_IFSOCK: number;
101
+ };
102
+ };
103
+ declare const _default: {
104
+ os: {
105
+ constants: {
106
+ signals: {
107
+ SIGKILL: number;
108
+ SIGTERM: number;
109
+ SIGINT: number;
110
+ SIGHUP: number;
111
+ SIGQUIT: number;
112
+ SIGABRT: number;
113
+ SIGALRM: number;
114
+ SIGUSR1: number;
115
+ SIGUSR2: number;
116
+ SIGPIPE: number;
117
+ SIGCHLD: number;
118
+ SIGCONT: number;
119
+ SIGSTOP: number;
120
+ SIGTSTP: number;
121
+ };
122
+ errno: {
123
+ EACCES: number;
124
+ EEXIST: number;
125
+ EISDIR: number;
126
+ EMFILE: number;
127
+ ENOENT: number;
128
+ ENOTDIR: number;
129
+ ENOTEMPTY: number;
130
+ EPERM: number;
131
+ EBADF: number;
132
+ };
133
+ };
134
+ };
135
+ fs: {
136
+ constants: {
137
+ F_OK: number;
138
+ R_OK: number;
139
+ W_OK: number;
140
+ X_OK: number;
141
+ O_RDONLY: number;
142
+ O_WRONLY: number;
143
+ O_RDWR: number;
144
+ O_CREAT: number;
145
+ O_EXCL: number;
146
+ O_TRUNC: number;
147
+ O_APPEND: number;
148
+ O_DIRECTORY: number;
149
+ O_NOFOLLOW: number;
150
+ O_SYNC: number;
151
+ S_IFMT: number;
152
+ S_IFREG: number;
153
+ S_IFDIR: number;
154
+ S_IFCHR: number;
155
+ S_IFBLK: number;
156
+ S_IFIFO: number;
157
+ S_IFLNK: number;
158
+ S_IFSOCK: number;
159
+ };
160
+ };
161
+ F_OK: number;
162
+ R_OK: number;
163
+ W_OK: number;
164
+ X_OK: number;
165
+ O_RDONLY: number;
166
+ O_WRONLY: number;
167
+ O_RDWR: number;
168
+ O_CREAT: number;
169
+ O_EXCL: number;
170
+ O_TRUNC: number;
171
+ O_APPEND: number;
172
+ O_DIRECTORY: number;
173
+ O_NOFOLLOW: number;
174
+ O_SYNC: number;
175
+ S_IFMT: number;
176
+ S_IFREG: number;
177
+ S_IFDIR: number;
178
+ S_IFCHR: number;
179
+ S_IFBLK: number;
180
+ S_IFIFO: number;
181
+ S_IFLNK: number;
182
+ S_IFSOCK: number;
183
+ EACCES: number;
184
+ EEXIST: number;
185
+ EISDIR: number;
186
+ EMFILE: number;
187
+ ENOENT: number;
188
+ ENOTDIR: number;
189
+ ENOTEMPTY: number;
190
+ EPERM: number;
191
+ EBADF: number;
192
+ SIGKILL: number;
193
+ SIGTERM: number;
194
+ SIGINT: number;
195
+ SIGHUP: number;
196
+ SIGQUIT: number;
197
+ SIGABRT: number;
198
+ SIGALRM: number;
199
+ SIGUSR1: number;
200
+ SIGUSR2: number;
201
+ SIGPIPE: number;
202
+ SIGCHLD: number;
203
+ SIGCONT: number;
204
+ SIGSTOP: number;
205
+ SIGTSTP: number;
206
+ };
207
+ export default _default;
@@ -0,0 +1,189 @@
1
+ import { EventEmitter } from "./events";
2
+ export declare function randomBytes(count: number): Buffer;
3
+ export declare function randomFillSync(target: Uint8Array | Buffer, start?: number, size?: number): Uint8Array | Buffer;
4
+ export declare function randomUUID(): string;
5
+ export declare function randomInt(lo: number, hi?: number): number;
6
+ export declare function getRandomValues<T extends ArrayBufferView>(arr: T): T;
7
+ export interface Hash {
8
+ update(input: string | Buffer | Uint8Array, enc?: string): Hash;
9
+ digestAsync(enc?: string): Promise<string | Buffer>;
10
+ digest(enc?: string): string | Buffer;
11
+ }
12
+ interface HashConstructor {
13
+ new (alg: string): Hash;
14
+ (this: any, alg: string): void;
15
+ prototype: any;
16
+ }
17
+ export declare const Hash: HashConstructor;
18
+ export declare function createHash(alg: string): Hash;
19
+ export declare function hash(algorithm: string, data: string | Buffer | Uint8Array, outputEncoding?: string): string | Buffer;
20
+ export interface Hmac {
21
+ update(input: string | Buffer | Uint8Array, enc?: string): Hmac;
22
+ digestAsync(enc?: string): Promise<string | Buffer>;
23
+ digest(enc?: string): string | Buffer;
24
+ }
25
+ interface HmacConstructor {
26
+ new (alg: string, secret: string | Buffer): Hmac;
27
+ (this: any, alg: string, secret: string | Buffer): void;
28
+ prototype: any;
29
+ }
30
+ export declare const Hmac: HmacConstructor;
31
+ export declare function createHmac(alg: string, secret: string | Buffer): Hmac;
32
+ type BinaryInput = string | Buffer | Uint8Array;
33
+ export declare function pbkdf2(password: BinaryInput, salt: BinaryInput, rounds: number, keyLen: number, hashName: string, cb: (err: Error | null, key: Buffer) => void): void;
34
+ export declare function pbkdf2Sync(password: BinaryInput, salt: BinaryInput, rounds: number, keyLen: number, hashName: string): Buffer;
35
+ export declare function scrypt(password: BinaryInput, salt: BinaryInput, keyLen: number, _opts: unknown, cb: (err: Error | null, key: Buffer) => void): void;
36
+ export declare function scryptSync(password: BinaryInput, salt: BinaryInput, keyLen: number, _opts?: unknown): Buffer;
37
+ type KeyMaterial = string | Buffer | KeyObject | {
38
+ key: string | Buffer;
39
+ passphrase?: string;
40
+ };
41
+ export declare function sign(alg: string | null | undefined, data: Buffer | Uint8Array, key: KeyMaterial, cb?: (err: Error | null, sig: Buffer) => void): Buffer | void;
42
+ export declare function verify(alg: string | null | undefined, data: Buffer | Uint8Array, key: KeyMaterial, sig: Buffer | Uint8Array, cb?: (err: Error | null, ok: boolean) => void): boolean | void;
43
+ export interface SignStream extends EventEmitter {
44
+ update(input: string | Buffer | Uint8Array, enc?: string): SignStream;
45
+ sign(privKey: KeyMaterial, outEnc?: string): Buffer | string;
46
+ }
47
+ interface SignStreamConstructor {
48
+ new (alg: string): SignStream;
49
+ (this: any, alg: string): void;
50
+ prototype: any;
51
+ }
52
+ export declare const SignStream: SignStreamConstructor;
53
+ export interface VerifyStream extends EventEmitter {
54
+ update(input: string | Buffer | Uint8Array, enc?: string): VerifyStream;
55
+ verify(pubKey: KeyMaterial, sig: Buffer | string, sigEnc?: string): boolean;
56
+ }
57
+ interface VerifyStreamConstructor {
58
+ new (alg: string): VerifyStream;
59
+ (this: any, alg: string): void;
60
+ prototype: any;
61
+ }
62
+ export declare const VerifyStream: VerifyStreamConstructor;
63
+ export declare function createSign(alg: string): SignStream;
64
+ export declare function createVerify(alg: string): VerifyStream;
65
+ export declare function createCipheriv(_alg: string, _key: BinaryInput, _iv: BinaryInput | null): any;
66
+ export declare function createDecipheriv(_alg: string, _key: BinaryInput, _iv: BinaryInput | null): any;
67
+ export interface KeyObject {
68
+ readonly type: string;
69
+ readonly asymmetricKeyType: string | undefined;
70
+ readonly symmetricKeySize: number | undefined;
71
+ export(opts?: {
72
+ type?: string;
73
+ format?: string;
74
+ }): Buffer | string;
75
+ }
76
+ interface KeyObjectConstructor {
77
+ new (kind: "public" | "private" | "secret", data: CryptoKey | Uint8Array, alg?: string): KeyObject;
78
+ (this: any, kind: "public" | "private" | "secret", data: CryptoKey | Uint8Array, alg?: string): void;
79
+ prototype: any;
80
+ }
81
+ export declare const KeyObject: KeyObjectConstructor;
82
+ export declare function createSecretKey(key: Buffer | string, enc?: string): KeyObject;
83
+ export declare function createPublicKey(key: KeyMaterial): KeyObject;
84
+ export declare function createPrivateKey(key: KeyMaterial): KeyObject;
85
+ export declare function timingSafeEqual(a: Buffer | Uint8Array, b: Buffer | Uint8Array): boolean;
86
+ export declare function getCiphers(): string[];
87
+ export declare function getHashes(): string[];
88
+ export declare const constants: {
89
+ SSL_OP_ALL: number;
90
+ RSA_PKCS1_PADDING: number;
91
+ RSA_PKCS1_OAEP_PADDING: number;
92
+ RSA_PKCS1_PSS_PADDING: number;
93
+ };
94
+ export declare function generateKeySync(type: string, options?: {
95
+ length?: number;
96
+ }): KeyObject;
97
+ export declare function generateKeyPairSync(type: string, options?: {
98
+ modulusLength?: number;
99
+ namedCurve?: string;
100
+ publicKeyEncoding?: {
101
+ type?: string;
102
+ format?: string;
103
+ };
104
+ privateKeyEncoding?: {
105
+ type?: string;
106
+ format?: string;
107
+ };
108
+ }): {
109
+ publicKey: KeyObject | string;
110
+ privateKey: KeyObject | string;
111
+ };
112
+ export declare function generatePrimeSync(size: number, _options?: {
113
+ bigint?: boolean;
114
+ safe?: boolean;
115
+ }): Buffer | bigint;
116
+ export declare function generatePrime(size: number, options: {
117
+ bigint?: boolean;
118
+ safe?: boolean;
119
+ } | undefined, cb: (err: Error | null, prime: Buffer | bigint) => void): void;
120
+ export declare function checkPrimeSync(_candidate: Buffer | bigint): boolean;
121
+ export declare function checkPrime(candidate: Buffer | bigint, cb: (err: Error | null, result: boolean) => void): void;
122
+ export declare function randomFill(buf: Uint8Array | Buffer, offsetOrCb: number | ((err: Error | null, buf: Uint8Array | Buffer) => void), sizeOrCb?: number | ((err: Error | null, buf: Uint8Array | Buffer) => void), cb?: (err: Error | null, buf: Uint8Array | Buffer) => void): void;
123
+ export declare function hkdfSync(hashAlg: string, ikm: BinaryInput, salt: BinaryInput, info: BinaryInput, keyLen: number): Buffer;
124
+ export declare function hkdf(hashAlg: string, ikm: BinaryInput, salt: BinaryInput, info: BinaryInput, keyLen: number, cb: (err: Error | null, derivedKey: Buffer) => void): void;
125
+ export declare function getDiffieHellman(_groupName: string): any;
126
+ export declare function createDiffieHellman(_sizeOrPrime: number | Buffer, _generator?: number | Buffer): any;
127
+ export declare function createECDH(_curveName: string): any;
128
+ export declare function getCurves(): string[];
129
+ export declare function setFips(_mode: number): void;
130
+ export declare function getFips(): number;
131
+ export declare function secureHeapUsed(): {
132
+ total: number;
133
+ min: number;
134
+ used: number;
135
+ };
136
+ export declare const webcrypto: Crypto;
137
+ declare const _default: {
138
+ randomBytes: typeof randomBytes;
139
+ randomFill: typeof randomFill;
140
+ randomFillSync: typeof randomFillSync;
141
+ randomUUID: typeof randomUUID;
142
+ randomInt: typeof randomInt;
143
+ getRandomValues: typeof getRandomValues;
144
+ createHash: typeof createHash;
145
+ hash: typeof hash;
146
+ createHmac: typeof createHmac;
147
+ createSign: typeof createSign;
148
+ createVerify: typeof createVerify;
149
+ createCipheriv: typeof createCipheriv;
150
+ createDecipheriv: typeof createDecipheriv;
151
+ sign: typeof sign;
152
+ verify: typeof verify;
153
+ pbkdf2: typeof pbkdf2;
154
+ pbkdf2Sync: typeof pbkdf2Sync;
155
+ scrypt: typeof scrypt;
156
+ scryptSync: typeof scryptSync;
157
+ hkdf: typeof hkdf;
158
+ hkdfSync: typeof hkdfSync;
159
+ timingSafeEqual: typeof timingSafeEqual;
160
+ getCiphers: typeof getCiphers;
161
+ getHashes: typeof getHashes;
162
+ getCurves: typeof getCurves;
163
+ constants: {
164
+ SSL_OP_ALL: number;
165
+ RSA_PKCS1_PADDING: number;
166
+ RSA_PKCS1_OAEP_PADDING: number;
167
+ RSA_PKCS1_PSS_PADDING: number;
168
+ };
169
+ KeyObject: KeyObjectConstructor;
170
+ createSecretKey: typeof createSecretKey;
171
+ createPublicKey: typeof createPublicKey;
172
+ createPrivateKey: typeof createPrivateKey;
173
+ generateKeySync: typeof generateKeySync;
174
+ generateKeyPairSync: typeof generateKeyPairSync;
175
+ generatePrimeSync: typeof generatePrimeSync;
176
+ generatePrime: typeof generatePrime;
177
+ checkPrimeSync: typeof checkPrimeSync;
178
+ checkPrime: typeof checkPrime;
179
+ createDiffieHellman: typeof createDiffieHellman;
180
+ getDiffieHellman: typeof getDiffieHellman;
181
+ createECDH: typeof createECDH;
182
+ setFips: typeof setFips;
183
+ getFips: typeof getFips;
184
+ secureHeapUsed: typeof secureHeapUsed;
185
+ webcrypto: Crypto;
186
+ Hash: HashConstructor;
187
+ Hmac: HmacConstructor;
188
+ };
189
+ export default _default;
@@ -0,0 +1,37 @@
1
+ import { EventEmitter } from "./events";
2
+ export interface Socket extends EventEmitter {
3
+ bind(_port?: number, _addr?: string, _cb?: () => void): this;
4
+ close(_cb?: () => void): void;
5
+ send(_msg: Uint8Array | string, _offset?: number, _length?: number, _port?: number, _addr?: string, _cb?: (err: Error | null, bytes: number) => void): void;
6
+ address(): {
7
+ address: string;
8
+ family: string;
9
+ port: number;
10
+ };
11
+ setBroadcast(_flag: boolean): void;
12
+ setTTL(_ttl: number): number;
13
+ setMulticastTTL(_ttl: number): number;
14
+ setMulticastLoopback(_flag: boolean): boolean;
15
+ setMulticastInterface(_iface: string): void;
16
+ addMembership(_group: string, _iface?: string): void;
17
+ dropMembership(_group: string, _iface?: string): void;
18
+ ref(): this;
19
+ unref(): this;
20
+ setRecvBufferSize(_sz: number): void;
21
+ setSendBufferSize(_sz: number): void;
22
+ getRecvBufferSize(): number;
23
+ getSendBufferSize(): number;
24
+ }
25
+ export declare const Socket: {
26
+ new (): Socket;
27
+ prototype: any;
28
+ };
29
+ export declare function createSocket(_type: string | object, _cb?: (msg: Uint8Array, rinfo: object) => void): Socket;
30
+ declare const _default: {
31
+ Socket: {
32
+ new (): Socket;
33
+ prototype: any;
34
+ };
35
+ createSocket: typeof createSocket;
36
+ };
37
+ export default _default;
@@ -0,0 +1,27 @@
1
+ export interface DiagChannel {
2
+ name: string;
3
+ readonly hasSubscribers: boolean;
4
+ subscribe(handler: (message: unknown, name: string) => void): void;
5
+ unsubscribe(handler: (message: unknown, name: string) => void): boolean;
6
+ publish(message: unknown): void;
7
+ }
8
+ export declare const DiagChannel: {
9
+ new (name: string): DiagChannel;
10
+ prototype: any;
11
+ };
12
+ export declare function channel(name: string): DiagChannel;
13
+ export declare function hasSubscribers(name: string): boolean;
14
+ export declare function subscribe(name: string, handler: (message: unknown, name: string) => void): void;
15
+ export declare function unsubscribe(name: string, handler: (message: unknown, name: string) => void): boolean;
16
+ export { DiagChannel as Channel };
17
+ declare const _default: {
18
+ channel: typeof channel;
19
+ hasSubscribers: typeof hasSubscribers;
20
+ subscribe: typeof subscribe;
21
+ unsubscribe: typeof unsubscribe;
22
+ Channel: {
23
+ new (name: string): DiagChannel;
24
+ prototype: any;
25
+ };
26
+ };
27
+ export default _default;
@@ -0,0 +1,76 @@
1
+ type SingleResult = (err: Error | null, addr?: string, fam?: number) => void;
2
+ type MultiResult = (err: Error | null, entries?: Array<{
3
+ address: string;
4
+ family: number;
5
+ }>) => void;
6
+ export declare function lookup(host: string, cb: SingleResult): void;
7
+ export declare function lookup(host: string, opts: {
8
+ family?: number;
9
+ all?: true;
10
+ }, cb: MultiResult): void;
11
+ export declare function lookup(host: string, opts: {
12
+ family?: number;
13
+ all?: boolean;
14
+ }, cb: SingleResult | MultiResult): void;
15
+ export declare function resolve(_host: string, cb: (err: Error | null, addrs?: string[]) => void): void;
16
+ export declare function resolve4(host: string, cb: (err: Error | null, addrs?: string[]) => void): void;
17
+ export declare function resolve6(_host: string, cb: (err: Error | null, addrs?: string[]) => void): void;
18
+ export declare function reverse(_ip: string, cb: (err: Error | null, names?: string[]) => void): void;
19
+ export declare function setServers(_list: string[]): void;
20
+ export declare function getServers(): string[];
21
+ export declare function setDefaultResultOrder(_order: string): void;
22
+ export declare function getDefaultResultOrder(): string;
23
+ export declare const promises: {
24
+ lookup(host: string, opts?: {
25
+ family?: number;
26
+ all?: boolean;
27
+ }): Promise<{
28
+ address: string;
29
+ family: number;
30
+ } | Array<{
31
+ address: string;
32
+ family: number;
33
+ }>>;
34
+ resolve(host: string): Promise<string[]>;
35
+ resolve4(host: string): Promise<string[]>;
36
+ resolve6(_host: string): Promise<string[]>;
37
+ reverse(_ip: string): Promise<string[]>;
38
+ setServers(_s: string[]): void;
39
+ getServers(): string[];
40
+ };
41
+ export declare const ADDRCONFIG = 0;
42
+ export declare const V4MAPPED = 0;
43
+ export declare const ALL = 0;
44
+ declare const _default: {
45
+ lookup: typeof lookup;
46
+ resolve: typeof resolve;
47
+ resolve4: typeof resolve4;
48
+ resolve6: typeof resolve6;
49
+ reverse: typeof reverse;
50
+ setServers: typeof setServers;
51
+ getServers: typeof getServers;
52
+ setDefaultResultOrder: typeof setDefaultResultOrder;
53
+ getDefaultResultOrder: typeof getDefaultResultOrder;
54
+ promises: {
55
+ lookup(host: string, opts?: {
56
+ family?: number;
57
+ all?: boolean;
58
+ }): Promise<{
59
+ address: string;
60
+ family: number;
61
+ } | Array<{
62
+ address: string;
63
+ family: number;
64
+ }>>;
65
+ resolve(host: string): Promise<string[]>;
66
+ resolve4(host: string): Promise<string[]>;
67
+ resolve6(_host: string): Promise<string[]>;
68
+ reverse(_ip: string): Promise<string[]>;
69
+ setServers(_s: string[]): void;
70
+ getServers(): string[];
71
+ };
72
+ ADDRCONFIG: number;
73
+ V4MAPPED: number;
74
+ ALL: number;
75
+ };
76
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import { EventEmitter } from "./events";
2
+ export interface Domain extends EventEmitter {
3
+ members: unknown[];
4
+ add(emitter: EventEmitter): void;
5
+ remove(emitter: EventEmitter): void;
6
+ bind<F extends (...args: unknown[]) => unknown>(fn: F): F;
7
+ intercept<F extends (...args: unknown[]) => unknown>(fn: F): F;
8
+ run<T>(fn: () => T): T;
9
+ dispose(): void;
10
+ enter(): void;
11
+ exit(): void;
12
+ }
13
+ export declare const Domain: {
14
+ new (): Domain;
15
+ prototype: any;
16
+ };
17
+ export declare function create(): Domain;
18
+ export declare let active: Domain | null;
19
+ declare const _default: {
20
+ Domain: {
21
+ new (): Domain;
22
+ prototype: any;
23
+ };
24
+ create: typeof create;
25
+ active: null;
26
+ };
27
+ export default _default;
@@ -0,0 +1,106 @@
1
+ import type { MemoryVolume } from "../memory-volume";
2
+ export interface TransformConfig {
3
+ loader?: "js" | "jsx" | "ts" | "tsx" | "json" | "css";
4
+ format?: "iife" | "cjs" | "esm";
5
+ target?: string | string[];
6
+ minify?: boolean;
7
+ sourcemap?: boolean | "inline" | "external";
8
+ jsx?: "transform" | "preserve";
9
+ jsxFactory?: string;
10
+ jsxFragment?: string;
11
+ }
12
+ export interface TransformOutput {
13
+ code: string;
14
+ map: string;
15
+ warnings: unknown[];
16
+ }
17
+ export interface BundleConfig {
18
+ entryPoints?: string[];
19
+ stdin?: {
20
+ contents: string;
21
+ resolveDir?: string;
22
+ loader?: "js" | "jsx" | "ts" | "tsx" | "json" | "css";
23
+ };
24
+ bundle?: boolean;
25
+ outdir?: string;
26
+ outfile?: string;
27
+ format?: "iife" | "cjs" | "esm";
28
+ platform?: "browser" | "node" | "neutral";
29
+ target?: string | string[];
30
+ minify?: boolean;
31
+ sourcemap?: boolean | "inline" | "external";
32
+ external?: string[];
33
+ write?: boolean;
34
+ plugins?: unknown[];
35
+ absWorkingDir?: string;
36
+ conditions?: string[];
37
+ mainFields?: string[];
38
+ }
39
+ export interface BundleOutput {
40
+ errors: unknown[];
41
+ warnings: unknown[];
42
+ outputFiles?: Array<{
43
+ path: string;
44
+ contents: Uint8Array;
45
+ text: string;
46
+ }>;
47
+ metafile?: {
48
+ inputs?: Record<string, unknown>;
49
+ outputs?: Record<string, unknown>;
50
+ };
51
+ }
52
+ export declare function setVolume(vol: MemoryVolume): void;
53
+ export declare function setWasmUrl(url: string): void;
54
+ export declare function initialize(opts?: {
55
+ wasmURL?: string;
56
+ }): Promise<void>;
57
+ export declare function transform(source: string, cfg?: TransformConfig): Promise<TransformOutput>;
58
+ export declare function build(cfg: BundleConfig): Promise<BundleOutput>;
59
+ export declare function formatMessages(messages: unknown[], opts?: {
60
+ kind?: "error" | "warning";
61
+ color?: boolean;
62
+ }): Promise<string[]>;
63
+ export declare const version = "0.21.5";
64
+ export declare function context(cfg: BundleConfig): Promise<{
65
+ rebuild: () => Promise<BundleOutput>;
66
+ watch: (opts?: unknown) => Promise<void>;
67
+ serve: (opts?: unknown) => Promise<{
68
+ host: string;
69
+ port: number;
70
+ }>;
71
+ cancel: () => Promise<void>;
72
+ dispose: () => Promise<void>;
73
+ }>;
74
+ export declare function stop(): void;
75
+ export declare function analyzeMetafile(metafile: string | {
76
+ inputs?: Record<string, unknown>;
77
+ outputs?: Record<string, unknown>;
78
+ }, _opts?: {
79
+ verbose?: boolean;
80
+ color?: boolean;
81
+ }): Promise<string>;
82
+ export declare function analyzeMetafileSync(metafile: string | {
83
+ inputs?: Record<string, unknown>;
84
+ outputs?: Record<string, unknown>;
85
+ }, _opts?: {
86
+ verbose?: boolean;
87
+ color?: boolean;
88
+ }): string;
89
+ export declare function transformSync(source: string, cfg?: TransformConfig): TransformOutput;
90
+ export declare function buildSync(cfg: BundleConfig): BundleOutput;
91
+ declare const _default: {
92
+ initialize: typeof initialize;
93
+ transform: typeof transform;
94
+ transformSync: typeof transformSync;
95
+ build: typeof build;
96
+ buildSync: typeof buildSync;
97
+ context: typeof context;
98
+ stop: typeof stop;
99
+ formatMessages: typeof formatMessages;
100
+ analyzeMetafile: typeof analyzeMetafile;
101
+ analyzeMetafileSync: typeof analyzeMetafileSync;
102
+ version: string;
103
+ setVolume: typeof setVolume;
104
+ setWasmUrl: typeof setWasmUrl;
105
+ };
106
+ export default _default;