cf-workers-native 0.1.4 → 0.1.5

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 (161) hide show
  1. package/dist/browser/documents/page-source.js +1 -1
  2. package/dist/browser/fetch/host-call.js +6 -1
  3. package/dist/browser/fetch/native-network.d.ts +1 -1
  4. package/dist/browser/fetch/relay.js +2 -0
  5. package/dist/browser/isolated/transport.js +3 -2
  6. package/dist/browser/request/index.js +3 -2
  7. package/dist/cloudflare/workers/worker-runtime.js +2 -1
  8. package/dist/compat/console/index.d.ts +35 -0
  9. package/dist/compat/console/index.js +92 -0
  10. package/dist/compat/crypto/LICENSE-3RD-PARTY.md +19 -0
  11. package/dist/compat/crypto/LICENSE-APACHE +177 -0
  12. package/dist/compat/crypto/LICENSE.emscripten +102 -0
  13. package/dist/compat/crypto/LICENSE.musl +193 -0
  14. package/dist/compat/crypto/LICENSE.openssl +177 -0
  15. package/dist/compat/crypto/asymmetric.d.ts +13 -0
  16. package/dist/compat/crypto/asymmetric.js +239 -0
  17. package/dist/compat/crypto/brorand.cjs +74 -0
  18. package/dist/compat/crypto/brorand.d.cts +6 -0
  19. package/dist/compat/crypto/certificate.d.ts +14 -0
  20. package/dist/compat/crypto/certificate.js +66 -0
  21. package/dist/compat/crypto/ecdh.d.ts +15 -0
  22. package/dist/compat/crypto/ecdh.js +109 -0
  23. package/dist/compat/crypto/hkdf.d.ts +2 -0
  24. package/dist/compat/crypto/hkdf.js +52 -0
  25. package/dist/compat/crypto/index.cjs +2 -0
  26. package/dist/compat/crypto/index.d.cts +2 -0
  27. package/dist/compat/crypto/index.d.ts +30 -0
  28. package/dist/compat/crypto/index.js +83 -0
  29. package/dist/compat/crypto/key-formats.d.ts +6 -0
  30. package/dist/compat/crypto/key-formats.js +120 -0
  31. package/dist/compat/crypto/key-state.d.ts +9 -0
  32. package/dist/compat/crypto/key-state.js +4 -0
  33. package/dist/compat/crypto/keys.d.ts +50 -0
  34. package/dist/compat/crypto/keys.js +209 -0
  35. package/dist/compat/crypto/metadata.d.ts +4 -0
  36. package/dist/compat/crypto/metadata.js +22 -0
  37. package/dist/compat/crypto/native-crypto.d.ts +68 -0
  38. package/dist/compat/crypto/native-crypto.js +569 -0
  39. package/dist/compat/crypto/prime.d.ts +19 -0
  40. package/dist/compat/crypto/prime.js +146 -0
  41. package/dist/compat/crypto/random.d.ts +7 -0
  42. package/dist/compat/crypto/random.js +123 -0
  43. package/dist/compat/crypto/rsa.d.ts +5 -0
  44. package/dist/compat/crypto/rsa.js +173 -0
  45. package/dist/compat/crypto/scrypt.d.ts +25 -0
  46. package/dist/compat/crypto/scrypt.js +150 -0
  47. package/dist/compat/crypto/sign-errors.d.ts +8 -0
  48. package/dist/compat/crypto/sign-errors.js +13 -0
  49. package/dist/compat/crypto/sign-handle.d.ts +22 -0
  50. package/dist/compat/crypto/sign-handle.js +105 -0
  51. package/dist/compat/crypto/signatures.d.ts +28 -0
  52. package/dist/compat/crypto/signatures.js +252 -0
  53. package/dist/compat/crypto/symmetric.d.ts +29 -0
  54. package/dist/compat/crypto/symmetric.js +104 -0
  55. package/dist/compat/crypto/validation.d.ts +3 -0
  56. package/dist/compat/crypto/validation.js +19 -0
  57. package/dist/compat/crypto/x509.d.ts +30 -0
  58. package/dist/compat/crypto/x509.js +406 -0
  59. package/dist/compat/events/errors.d.ts +8 -0
  60. package/dist/compat/events/errors.js +39 -0
  61. package/dist/compat/events/index.cjs +2 -0
  62. package/dist/compat/events/index.d.cts +2 -0
  63. package/dist/compat/events/index.d.ts +64 -0
  64. package/dist/compat/events/index.js +792 -0
  65. package/dist/compat/events/intrinsics.d.ts +1 -0
  66. package/dist/compat/events/intrinsics.js +2 -0
  67. package/dist/compat/fs/embedded.d.ts +85 -0
  68. package/dist/compat/fs/embedded.js +255 -0
  69. package/dist/compat/fs/index.d.ts +7 -84
  70. package/dist/compat/fs/index.js +218 -252
  71. package/dist/compat/fs/mode.d.ts +1 -0
  72. package/dist/compat/fs/mode.js +13 -0
  73. package/dist/compat/fs/promises/index.d.ts +1 -1
  74. package/dist/compat/fs/promises/index.js +1 -1
  75. package/dist/compat/fs/writable.d.ts +6 -0
  76. package/dist/compat/fs/writable.js +142 -0
  77. package/dist/compat/http/symbols.d.ts +5 -0
  78. package/dist/compat/http/symbols.js +9 -0
  79. package/dist/compat/http-common/index.d.ts +37 -0
  80. package/dist/compat/http-common/index.js +43 -0
  81. package/dist/compat/http-outgoing/index.d.ts +13 -0
  82. package/dist/compat/http-outgoing/index.js +32 -0
  83. package/dist/compat/http-server/index.d.ts +18 -0
  84. package/dist/compat/http-server/index.js +107 -0
  85. package/dist/compat/module/builtins.d.ts +1 -0
  86. package/dist/compat/module/builtins.js +101 -0
  87. package/dist/compat/module/index.d.ts +4 -2
  88. package/dist/compat/module/index.js +22 -17
  89. package/dist/compat/module/metadata.d.ts +44 -0
  90. package/dist/compat/module/metadata.js +127 -0
  91. package/dist/compat/net/internal-net.js +4 -0
  92. package/dist/compat/net/sockets.d.ts +5 -0
  93. package/dist/compat/net/sockets.js +74 -13
  94. package/dist/compat/process/index.cjs +2 -0
  95. package/dist/compat/process/index.d.cts +4 -0
  96. package/dist/compat/process/index.d.ts +18 -0
  97. package/dist/compat/process/index.js +140 -0
  98. package/dist/compat/process/metadata.d.ts +135 -0
  99. package/dist/compat/process/metadata.js +251 -0
  100. package/dist/compat/process/state.d.ts +4 -0
  101. package/dist/compat/process/state.js +4 -0
  102. package/dist/compat/stream-web/LICENSE +22 -0
  103. package/dist/compat/stream-web/ponyfill.d.ts +1 -1
  104. package/dist/compat/stream-web/ponyfill.js +2369 -1775
  105. package/dist/compat/stream-web/runtime.d.ts +1 -1
  106. package/dist/compat/stream-web/runtime.js +3 -2
  107. package/dist/compat/stream-wrap/LICENSE-3RD-PARTY.md +11 -0
  108. package/dist/compat/stream-wrap/LICENSE-APACHE +177 -0
  109. package/dist/compat/stream-wrap/index.d.ts +1 -0
  110. package/dist/compat/stream-wrap/index.js +1 -0
  111. package/dist/compat/tls/LICENSE-3RD-PARTY.md +11 -0
  112. package/dist/compat/tls/LICENSE-APACHE +177 -0
  113. package/dist/compat/tls/constants.d.ts +7 -0
  114. package/dist/compat/tls/constants.js +14 -0
  115. package/dist/compat/tls/errors.d.ts +35 -0
  116. package/dist/compat/tls/errors.js +68 -0
  117. package/dist/compat/tls/helpers.d.ts +9 -0
  118. package/dist/compat/tls/helpers.js +207 -0
  119. package/dist/compat/tls/index.d.ts +26 -0
  120. package/dist/compat/tls/index.js +50 -0
  121. package/dist/compat/tls/jsstream.d.ts +19 -0
  122. package/dist/compat/tls/jsstream.js +186 -0
  123. package/dist/compat/tls/native-session.d.ts +3 -0
  124. package/dist/compat/tls/native-session.js +187 -0
  125. package/dist/compat/tls/wrap.d.ts +65 -0
  126. package/dist/compat/tls/wrap.js +544 -0
  127. package/dist/compat/tls-wrap/LICENSE-3RD-PARTY.md +11 -0
  128. package/dist/compat/tls-wrap/LICENSE-APACHE +177 -0
  129. package/dist/compat/tls-wrap/index.d.ts +7 -0
  130. package/dist/compat/tls-wrap/index.js +3 -0
  131. package/dist/compat/util/index.js +43 -1
  132. package/dist/compat/util/types/index.d.ts +3 -0
  133. package/dist/compat/util/types/index.js +5 -0
  134. package/dist/compat/zlib/LICENSE.brotli +19 -0
  135. package/dist/compat/zlib/LICENSE.emscripten +102 -0
  136. package/dist/compat/zlib/LICENSE.musl +193 -0
  137. package/dist/compat/zlib/LICENSE.zstd +30 -0
  138. package/dist/compat/zlib/compression.d.ts +55 -0
  139. package/dist/compat/zlib/compression.js +259 -0
  140. package/dist/compat/zlib/constants.d.ts +172 -0
  141. package/dist/compat/zlib/constants.js +173 -0
  142. package/dist/compat/zlib/index.d.ts +180 -0
  143. package/dist/compat/zlib/index.js +177 -0
  144. package/dist/compat/zlib/native-codecs.d.ts +17 -0
  145. package/dist/compat/zlib/native-codecs.js +168 -0
  146. package/dist/shared/globals/inject.d.ts +2 -1
  147. package/dist/shared/globals/inject.js +2 -1
  148. package/dist/shared/globals/runtime.d.ts +1 -2
  149. package/dist/shared/globals/runtime.js +1 -2
  150. package/dist/shared/request-scope.d.ts +4 -0
  151. package/dist/shared/request-scope.js +11 -0
  152. package/dist/tooling/async.js +36 -14
  153. package/dist/tooling/shared.d.ts +1 -0
  154. package/dist/tooling/shared.js +20 -1
  155. package/dist/tooling/vite.js +4 -3
  156. package/native/android/src/main/java/jp/rdlabo/workerscapacitor/WorkerSockets.java +56 -8
  157. package/native/android/src/main/java/jp/rdlabo/workerscapacitor/WorkersCapacitorPlugin.java +4 -2
  158. package/native/ios/NetworkBridge.swift +11 -1
  159. package/native/ios/SocketBridge.swift +37 -2
  160. package/native/ios/WorkersCapacitorPlugin.swift +4 -0
  161. package/package.json +3 -1
@@ -0,0 +1 @@
1
+ export declare const AsyncIteratorPrototype: any;
@@ -0,0 +1,2 @@
1
+ // Native intrinsic discovery must survive the ordinary async lowering pipeline.
2
+ export const AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () { }).prototype);
@@ -0,0 +1,85 @@
1
+ /** Called by generated bundle code; consumers do not invoke this directly. */
2
+ export declare function registerVirtualFiles(entries: Record<string, string | Uint8Array | {
3
+ base64: string;
4
+ }>): void;
5
+ /** Test/reset helper. */
6
+ export declare function clearVirtualFiles(): void;
7
+ export declare class Stats {
8
+ #private;
9
+ constructor(size: number, directory: boolean, mtime: Date);
10
+ isFile(): boolean;
11
+ isDirectory(): boolean;
12
+ isSymbolicLink(): boolean;
13
+ isBlockDevice(): boolean;
14
+ isCharacterDevice(): boolean;
15
+ isFIFO(): boolean;
16
+ isSocket(): boolean;
17
+ get size(): number;
18
+ get mtime(): Date;
19
+ get mtimeMs(): number;
20
+ get birthtime(): Date;
21
+ get birthtimeMs(): number;
22
+ get ctime(): Date;
23
+ get ctimeMs(): number;
24
+ get atime(): Date;
25
+ get atimeMs(): number;
26
+ get mode(): 16877 | 33188;
27
+ get dev(): number;
28
+ get ino(): number;
29
+ get nlink(): number;
30
+ get uid(): number;
31
+ get gid(): number;
32
+ get rdev(): number;
33
+ get blksize(): number;
34
+ get blocks(): number;
35
+ }
36
+ export declare function readFileSync(path: unknown, options?: unknown): unknown;
37
+ export declare function readFile(path: unknown, options: unknown, callback?: (error: Error | null, data?: unknown) => void): void;
38
+ export declare function readdirSync(path: unknown): string[];
39
+ export declare function readdir(path: unknown, callback: (error: Error | null, entries?: string[]) => void): void;
40
+ export declare function existsSync(path: unknown): boolean;
41
+ export declare function statSync(path: unknown): Stats;
42
+ export declare function lstatSync(path: unknown): Stats;
43
+ export declare function stat(path: unknown, callback: (error: Error | null, stats?: Stats) => void): void;
44
+ export declare function realpathSync(path: unknown): string;
45
+ export declare const promises: {
46
+ readFile: (path: unknown, options?: unknown) => Promise<unknown>;
47
+ readdir: (path: unknown) => Promise<string[]>;
48
+ stat: (path: unknown) => Promise<Stats>;
49
+ lstat: (path: unknown) => Promise<Stats>;
50
+ realpath: (path: unknown) => Promise<string>;
51
+ access: (path: unknown) => Promise<void>;
52
+ };
53
+ export declare const constants: {
54
+ F_OK: number;
55
+ R_OK: number;
56
+ W_OK: number;
57
+ X_OK: number;
58
+ };
59
+ declare const _default: {
60
+ readFileSync: typeof readFileSync;
61
+ readFile: typeof readFile;
62
+ readdirSync: typeof readdirSync;
63
+ readdir: typeof readdir;
64
+ existsSync: typeof existsSync;
65
+ statSync: typeof statSync;
66
+ lstatSync: typeof lstatSync;
67
+ stat: typeof stat;
68
+ realpathSync: typeof realpathSync;
69
+ promises: {
70
+ readFile: (path: unknown, options?: unknown) => Promise<unknown>;
71
+ readdir: (path: unknown) => Promise<string[]>;
72
+ stat: (path: unknown) => Promise<Stats>;
73
+ lstat: (path: unknown) => Promise<Stats>;
74
+ realpath: (path: unknown) => Promise<string>;
75
+ access: (path: unknown) => Promise<void>;
76
+ };
77
+ constants: {
78
+ F_OK: number;
79
+ R_OK: number;
80
+ W_OK: number;
81
+ X_OK: number;
82
+ };
83
+ Stats: typeof Stats;
84
+ };
85
+ export default _default;
@@ -0,0 +1,255 @@
1
+ // Read-only in-memory filesystem for bundled worker assets. Build
2
+ // integrations register file contents at startup; bundled server code such
3
+ // as OpenNext's traced manifests then reads them through the node:fs
4
+ // surface. Mutating calls and real device filesystem access are not
5
+ // provided.
6
+ const encoder = new TextEncoder();
7
+ const files = new Map();
8
+ function normalize(path) {
9
+ if (typeof path !== "string")
10
+ throw new TypeError("path must be a string");
11
+ const raw = path.startsWith("file://") ? new URL(path).pathname : path;
12
+ const parts = [];
13
+ for (const segment of raw.split("/")) {
14
+ if (segment === "" || segment === ".")
15
+ continue;
16
+ if (segment === "..")
17
+ parts.pop();
18
+ else
19
+ parts.push(segment);
20
+ }
21
+ return "/" + parts.join("/");
22
+ }
23
+ /** Called by generated bundle code; consumers do not invoke this directly. */
24
+ export function registerVirtualFiles(entries) {
25
+ for (const [path, contents] of Object.entries(entries)) {
26
+ const key = normalize(path);
27
+ files.set(key, typeof contents === "string"
28
+ ? encoder.encode(contents)
29
+ : contents instanceof Uint8Array
30
+ ? new Uint8Array(contents)
31
+ : Uint8Array.from(atob(contents.base64), (c) => c.charCodeAt(0)));
32
+ }
33
+ }
34
+ /** Test/reset helper. */
35
+ export function clearVirtualFiles() {
36
+ files.clear();
37
+ }
38
+ function fileEntry(path) {
39
+ const direct = files.get(path);
40
+ if (direct !== undefined)
41
+ return direct;
42
+ // Bundled runtimes resolve relative to an empty dirname; treat relative
43
+ // and absolute lookups uniformly, then fall back to a suffix match so a
44
+ // build-absolute path resolves against a registered relative one.
45
+ for (const [key, contents] of files)
46
+ if (key === path || key.endsWith(path) || path.endsWith(key))
47
+ return contents;
48
+ return undefined;
49
+ }
50
+ function dirEntries(path) {
51
+ const prefix = path.endsWith("/") ? path : path + "/";
52
+ const names = new Set();
53
+ for (const key of files.keys()) {
54
+ if (!key.startsWith(prefix))
55
+ continue;
56
+ const rest = key.slice(prefix.length);
57
+ names.add(rest.split("/")[0]);
58
+ }
59
+ return [...names].sort();
60
+ }
61
+ function exists(path) {
62
+ return fileEntry(path) !== undefined || dirEntries(path).length > 0;
63
+ }
64
+ function enoent(syscall, path) {
65
+ const error = new Error(`ENOENT: no such file or directory, ${syscall} '${path}'`);
66
+ error.code = "ENOENT";
67
+ error.errno = -2;
68
+ error.syscall = syscall;
69
+ error.path = path;
70
+ return error;
71
+ }
72
+ export class Stats {
73
+ #size;
74
+ #directory;
75
+ #mtime;
76
+ constructor(size, directory, mtime) {
77
+ this.#size = size;
78
+ this.#directory = directory;
79
+ this.#mtime = mtime;
80
+ }
81
+ isFile() {
82
+ return !this.#directory;
83
+ }
84
+ isDirectory() {
85
+ return this.#directory;
86
+ }
87
+ isSymbolicLink() {
88
+ return false;
89
+ }
90
+ isBlockDevice() {
91
+ return false;
92
+ }
93
+ isCharacterDevice() {
94
+ return false;
95
+ }
96
+ isFIFO() {
97
+ return false;
98
+ }
99
+ isSocket() {
100
+ return false;
101
+ }
102
+ get size() {
103
+ return this.#size;
104
+ }
105
+ get mtime() {
106
+ return this.#mtime;
107
+ }
108
+ get mtimeMs() {
109
+ return this.#mtime.getTime();
110
+ }
111
+ get birthtime() {
112
+ return this.#mtime;
113
+ }
114
+ get birthtimeMs() {
115
+ return this.#mtime.getTime();
116
+ }
117
+ get ctime() {
118
+ return this.#mtime;
119
+ }
120
+ get ctimeMs() {
121
+ return this.#mtime.getTime();
122
+ }
123
+ get atime() {
124
+ return this.#mtime;
125
+ }
126
+ get atimeMs() {
127
+ return this.#mtime.getTime();
128
+ }
129
+ get mode() {
130
+ return this.#directory ? 0o40755 : 0o100644;
131
+ }
132
+ get dev() {
133
+ return 0;
134
+ }
135
+ get ino() {
136
+ return 0;
137
+ }
138
+ get nlink() {
139
+ return 1;
140
+ }
141
+ get uid() {
142
+ return 0;
143
+ }
144
+ get gid() {
145
+ return 0;
146
+ }
147
+ get rdev() {
148
+ return 0;
149
+ }
150
+ get blksize() {
151
+ return 4096;
152
+ }
153
+ get blocks() {
154
+ return Math.ceil(this.#size / 512);
155
+ }
156
+ }
157
+ function statFor(path, syscall) {
158
+ const data = fileEntry(path);
159
+ if (data !== undefined)
160
+ return new Stats(data.length, false, new Date(0));
161
+ if (dirEntries(path).length > 0 || path === "/")
162
+ return new Stats(0, true, new Date(0));
163
+ throw enoent(syscall, path);
164
+ }
165
+ function toPath(input) {
166
+ if (input instanceof URL)
167
+ return normalize(input.href);
168
+ if (typeof input !== "string" && !(input instanceof String))
169
+ throw new TypeError("path must be a string or URL");
170
+ return normalize(String(input));
171
+ }
172
+ function decode(data, encoding) {
173
+ if (encoding === "utf8" || encoding === "utf-8" || encoding == null)
174
+ return new TextDecoder().decode(data);
175
+ throw new Error(`Unsupported encoding '${encoding}'`);
176
+ }
177
+ export function readFileSync(path, options) {
178
+ const p = toPath(path);
179
+ const data = fileEntry(p);
180
+ if (data === undefined)
181
+ throw enoent("open", p);
182
+ const encoding = typeof options === "string"
183
+ ? options
184
+ : options?.encoding;
185
+ return encoding ? decode(data, encoding) : new Uint8Array(data);
186
+ }
187
+ export function readFile(path, options, callback) {
188
+ const cb = (typeof options === "function" ? options : callback);
189
+ const promise = Promise.resolve().then(() => readFileSync(path, options));
190
+ if (cb)
191
+ promise.then((data) => cb(null, data), (error) => cb(error));
192
+ }
193
+ export function readdirSync(path) {
194
+ const p = toPath(path);
195
+ const entries = dirEntries(p);
196
+ if (entries.length === 0 && fileEntry(p) === undefined && p !== "/")
197
+ throw enoent("scandir", p);
198
+ return entries;
199
+ }
200
+ export function readdir(path, callback) {
201
+ Promise.resolve()
202
+ .then(() => readdirSync(path))
203
+ .then((entries) => callback(null, entries), (error) => callback(error));
204
+ }
205
+ export function existsSync(path) {
206
+ return exists(toPath(path));
207
+ }
208
+ export function statSync(path) {
209
+ return statFor(toPath(path), "stat");
210
+ }
211
+ export function lstatSync(path) {
212
+ return statSync(path);
213
+ }
214
+ export function stat(path, callback) {
215
+ Promise.resolve()
216
+ .then(() => statSync(path))
217
+ .then((stats) => callback(null, stats), (error) => callback(error));
218
+ }
219
+ export function realpathSync(path) {
220
+ const p = toPath(path);
221
+ if (!exists(p))
222
+ throw enoent("realpath", p);
223
+ return p;
224
+ }
225
+ export const promises = {
226
+ readFile: (path, options) => Promise.resolve().then(() => readFileSync(path, options)),
227
+ readdir: (path) => Promise.resolve().then(() => readdirSync(path)),
228
+ stat: (path) => Promise.resolve().then(() => statSync(path)),
229
+ lstat: (path) => Promise.resolve().then(() => lstatSync(path)),
230
+ realpath: (path) => Promise.resolve().then(() => realpathSync(path)),
231
+ access: (path) => Promise.resolve().then(() => {
232
+ if (!exists(toPath(path)))
233
+ throw enoent("access", toPath(path));
234
+ }),
235
+ };
236
+ export const constants = {
237
+ F_OK: 0,
238
+ R_OK: 4,
239
+ W_OK: 2,
240
+ X_OK: 1,
241
+ };
242
+ export default {
243
+ readFileSync,
244
+ readFile,
245
+ readdirSync,
246
+ readdir,
247
+ existsSync,
248
+ statSync,
249
+ lstatSync,
250
+ stat,
251
+ realpathSync,
252
+ promises,
253
+ constants,
254
+ Stats,
255
+ };
@@ -1,85 +1,8 @@
1
- /** Called by generated bundle code; consumers do not invoke this directly. */
2
- export declare function registerVirtualFiles(entries: Record<string, string | Uint8Array | {
3
- base64: string;
4
- }>): void;
5
- /** Test/reset helper. */
1
+ import * as embedded from "./embedded.js";
2
+ export declare const registerVirtualFiles: typeof embedded.registerVirtualFiles;
6
3
  export declare function clearVirtualFiles(): void;
7
- export declare class Stats {
8
- #private;
9
- constructor(size: number, directory: boolean, mtime: Date);
10
- isFile(): boolean;
11
- isDirectory(): boolean;
12
- isSymbolicLink(): boolean;
13
- isBlockDevice(): boolean;
14
- isCharacterDevice(): boolean;
15
- isFIFO(): boolean;
16
- isSocket(): boolean;
17
- get size(): number;
18
- get mtime(): Date;
19
- get mtimeMs(): number;
20
- get birthtime(): Date;
21
- get birthtimeMs(): number;
22
- get ctime(): Date;
23
- get ctimeMs(): number;
24
- get atime(): Date;
25
- get atimeMs(): number;
26
- get mode(): 16877 | 33188;
27
- get dev(): number;
28
- get ino(): number;
29
- get nlink(): number;
30
- get uid(): number;
31
- get gid(): number;
32
- get rdev(): number;
33
- get blksize(): number;
34
- get blocks(): number;
35
- }
36
- export declare function readFileSync(path: unknown, options?: unknown): unknown;
37
- export declare function readFile(path: unknown, options: unknown, callback?: (error: Error | null, data?: unknown) => void): void;
38
- export declare function readdirSync(path: unknown): string[];
39
- export declare function readdir(path: unknown, callback: (error: Error | null, entries?: string[]) => void): void;
40
- export declare function existsSync(path: unknown): boolean;
41
- export declare function statSync(path: unknown): Stats;
42
- export declare function lstatSync(path: unknown): Stats;
43
- export declare function stat(path: unknown, callback: (error: Error | null, stats?: Stats) => void): void;
44
- export declare function realpathSync(path: unknown): string;
45
- export declare const promises: {
46
- readFile: (path: unknown, options?: unknown) => Promise<unknown>;
47
- readdir: (path: unknown) => Promise<string[]>;
48
- stat: (path: unknown) => Promise<Stats>;
49
- lstat: (path: unknown) => Promise<Stats>;
50
- realpath: (path: unknown) => Promise<string>;
51
- access: (path: unknown) => Promise<void>;
52
- };
53
- export declare const constants: {
54
- F_OK: number;
55
- R_OK: number;
56
- W_OK: number;
57
- X_OK: number;
58
- };
59
- declare const _default: {
60
- readFileSync: typeof readFileSync;
61
- readFile: typeof readFile;
62
- readdirSync: typeof readdirSync;
63
- readdir: typeof readdir;
64
- existsSync: typeof existsSync;
65
- statSync: typeof statSync;
66
- lstatSync: typeof lstatSync;
67
- stat: typeof stat;
68
- realpathSync: typeof realpathSync;
69
- promises: {
70
- readFile: (path: unknown, options?: unknown) => Promise<unknown>;
71
- readdir: (path: unknown) => Promise<string[]>;
72
- stat: (path: unknown) => Promise<Stats>;
73
- lstat: (path: unknown) => Promise<Stats>;
74
- realpath: (path: unknown) => Promise<string>;
75
- access: (path: unknown) => Promise<void>;
76
- };
77
- constants: {
78
- F_OK: number;
79
- R_OK: number;
80
- W_OK: number;
81
- X_OK: number;
82
- };
83
- Stats: typeof Stats;
84
- };
85
- export default _default;
4
+ declare const api: any;
5
+ declare const promises: any;
6
+ export { promises };
7
+ export declare const Dir: any, Dirent: any, F_OK: any, FileReadStream: any, FileWriteStream: any, R_OK: any, ReadStream: any, Stats: any, W_OK: any, WriteStream: any, X_OK: any, access: any, accessSync: any, appendFile: any, appendFileSync: any, chmod: any, chmodSync: any, chown: any, chownSync: any, close: any, closeSync: any, constants: any, copyFile: any, copyFileSync: any, cp: any, cpSync: any, createReadStream: any, createWriteStream: any, exists: any, existsSync: any, fchmod: any, fchmodSync: any, fchown: any, fchownSync: any, fdatasync: any, fdatasyncSync: any, fstat: any, fstatSync: any, fsync: any, fsyncSync: any, ftruncate: any, ftruncateSync: any, futimes: any, futimesSync: any, glob: any, globSync: any, lchmod: any, lchmodSync: any, lchown: any, lchownSync: any, link: any, linkSync: any, lstat: any, lstatSync: any, lutimes: any, lutimesSync: any, mkdir: any, mkdirSync: any, mkdtemp: any, mkdtempSync: any, open: any, openAsBlob: any, openSync: any, opendir: any, opendirSync: any, read: any, readFile: any, readFileSync: any, readSync: any, readdir: any, readdirSync: any, readlink: any, readlinkSync: any, readv: any, readvSync: any, realpath: any, realpathSync: any, rename: any, renameSync: any, rm: any, rmSync: any, rmdir: any, rmdirSync: any, stat: any, statSync: any, statfs: any, statfsSync: any, symlink: any, symlinkSync: any, truncate: any, truncateSync: any, unlink: any, unlinkSync: any, unwatchFile: any, utimes: any, utimesSync: any, watch: any, watchFile: any, write: any, writeFile: any, writeFileSync: any, writeSync: any, writev: any, writevSync: any;
8
+ export default api;