elit 2.0.1 → 3.0.1
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 +275 -128
- package/dist/build.d.mts +10 -1
- package/dist/build.d.ts +10 -1
- package/dist/build.js +670 -1
- package/dist/build.mjs +641 -1
- package/dist/chokidar.d.mts +134 -0
- package/dist/chokidar.d.ts +134 -0
- package/dist/chokidar.js +240 -0
- package/dist/chokidar.mjs +221 -0
- package/dist/cli.js +2792 -495
- package/dist/dom.d.mts +10 -3
- package/dist/dom.d.ts +10 -3
- package/dist/dom.js +676 -1
- package/dist/dom.mjs +647 -1
- package/dist/el.d.mts +16 -36
- package/dist/el.d.ts +16 -36
- package/dist/el.js +789 -1
- package/dist/el.mjs +583 -1
- package/dist/fs.d.mts +255 -0
- package/dist/fs.d.ts +255 -0
- package/dist/fs.js +513 -0
- package/dist/fs.mjs +469 -0
- package/dist/hmr.js +112 -1
- package/dist/hmr.mjs +91 -1
- package/dist/http.d.mts +163 -0
- package/dist/http.d.ts +163 -0
- package/dist/http.js +632 -0
- package/dist/http.mjs +605 -0
- package/dist/https.d.mts +108 -0
- package/dist/https.d.ts +108 -0
- package/dist/https.js +907 -0
- package/dist/https.mjs +901 -0
- package/dist/index.d.mts +613 -33
- package/dist/index.d.ts +613 -33
- package/dist/index.js +2589 -1
- package/dist/index.mjs +2312 -1
- package/dist/mime-types.d.mts +48 -0
- package/dist/mime-types.d.ts +48 -0
- package/dist/mime-types.js +197 -0
- package/dist/mime-types.mjs +166 -0
- package/dist/path.d.mts +163 -0
- package/dist/path.d.ts +163 -0
- package/dist/path.js +350 -0
- package/dist/path.mjs +310 -0
- package/dist/router.d.mts +3 -1
- package/dist/router.d.ts +3 -1
- package/dist/router.js +830 -1
- package/dist/router.mjs +801 -1
- package/dist/runtime.d.mts +97 -0
- package/dist/runtime.d.ts +97 -0
- package/dist/runtime.js +43 -0
- package/dist/runtime.mjs +15 -0
- package/dist/server.d.mts +5 -1
- package/dist/server.d.ts +5 -1
- package/dist/server.js +3267 -1
- package/dist/server.mjs +3241 -1
- package/dist/state.d.mts +3 -1
- package/dist/state.d.ts +3 -1
- package/dist/state.js +1036 -1
- package/dist/state.mjs +992 -1
- package/dist/style.d.mts +47 -1
- package/dist/style.d.ts +47 -1
- package/dist/style.js +551 -1
- package/dist/style.mjs +483 -1
- package/dist/{types-DOAdFFJB.d.ts → types-C0nGi6MX.d.mts} +29 -13
- package/dist/{types-DOAdFFJB.d.mts → types-Du6kfwTm.d.ts} +29 -13
- package/dist/types.d.mts +452 -3
- package/dist/types.d.ts +452 -3
- package/dist/types.js +18 -1
- package/dist/ws.d.mts +195 -0
- package/dist/ws.d.ts +195 -0
- package/dist/ws.js +380 -0
- package/dist/ws.mjs +358 -0
- package/dist/wss.d.mts +108 -0
- package/dist/wss.d.ts +108 -0
- package/dist/wss.js +1306 -0
- package/dist/wss.mjs +1300 -0
- package/package.json +53 -6
- package/dist/client.d.mts +0 -9
- package/dist/client.d.ts +0 -9
- package/dist/client.js +0 -1
- package/dist/client.mjs +0 -1
package/dist/fs.d.mts
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File System module with unified API across runtimes
|
|
3
|
+
* Compatible with Node.js 'fs' module API
|
|
4
|
+
* - Node.js: uses 'fs' module
|
|
5
|
+
* - Bun: uses Bun.file() and native APIs
|
|
6
|
+
* - Deno: uses Deno.readFile(), etc.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* File encoding types
|
|
10
|
+
*/
|
|
11
|
+
type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
|
|
12
|
+
/**
|
|
13
|
+
* Read file options
|
|
14
|
+
*/
|
|
15
|
+
interface ReadFileOptions {
|
|
16
|
+
encoding?: BufferEncoding | null;
|
|
17
|
+
flag?: string;
|
|
18
|
+
signal?: AbortSignal;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Write file options
|
|
22
|
+
*/
|
|
23
|
+
interface WriteFileOptions {
|
|
24
|
+
encoding?: BufferEncoding | null;
|
|
25
|
+
mode?: number;
|
|
26
|
+
flag?: string;
|
|
27
|
+
signal?: AbortSignal;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Mkdir options
|
|
31
|
+
*/
|
|
32
|
+
interface MkdirOptions {
|
|
33
|
+
recursive?: boolean;
|
|
34
|
+
mode?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Readdir options
|
|
38
|
+
*/
|
|
39
|
+
interface ReaddirOptions {
|
|
40
|
+
encoding?: BufferEncoding | null;
|
|
41
|
+
withFileTypes?: boolean;
|
|
42
|
+
recursive?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* File stats
|
|
46
|
+
*/
|
|
47
|
+
interface Stats {
|
|
48
|
+
isFile(): boolean;
|
|
49
|
+
isDirectory(): boolean;
|
|
50
|
+
isBlockDevice(): boolean;
|
|
51
|
+
isCharacterDevice(): boolean;
|
|
52
|
+
isSymbolicLink(): boolean;
|
|
53
|
+
isFIFO(): boolean;
|
|
54
|
+
isSocket(): boolean;
|
|
55
|
+
dev: number;
|
|
56
|
+
ino: number;
|
|
57
|
+
mode: number;
|
|
58
|
+
nlink: number;
|
|
59
|
+
uid: number;
|
|
60
|
+
gid: number;
|
|
61
|
+
rdev: number;
|
|
62
|
+
size: number;
|
|
63
|
+
blksize: number;
|
|
64
|
+
blocks: number;
|
|
65
|
+
atimeMs: number;
|
|
66
|
+
mtimeMs: number;
|
|
67
|
+
ctimeMs: number;
|
|
68
|
+
birthtimeMs: number;
|
|
69
|
+
atime: Date;
|
|
70
|
+
mtime: Date;
|
|
71
|
+
ctime: Date;
|
|
72
|
+
birthtime: Date;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Directory entry
|
|
76
|
+
*/
|
|
77
|
+
interface Dirent {
|
|
78
|
+
name: string;
|
|
79
|
+
isFile(): boolean;
|
|
80
|
+
isDirectory(): boolean;
|
|
81
|
+
isBlockDevice(): boolean;
|
|
82
|
+
isCharacterDevice(): boolean;
|
|
83
|
+
isSymbolicLink(): boolean;
|
|
84
|
+
isFIFO(): boolean;
|
|
85
|
+
isSocket(): boolean;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Read file (async)
|
|
89
|
+
*/
|
|
90
|
+
declare function readFile(path: string, options?: ReadFileOptions | BufferEncoding): Promise<string | Buffer>;
|
|
91
|
+
/**
|
|
92
|
+
* Read file (sync)
|
|
93
|
+
*/
|
|
94
|
+
declare function readFileSync(path: string, options?: ReadFileOptions | BufferEncoding): string | Buffer;
|
|
95
|
+
/**
|
|
96
|
+
* Write file (async)
|
|
97
|
+
*/
|
|
98
|
+
declare function writeFile(path: string, data: string | Buffer | Uint8Array, options?: WriteFileOptions | BufferEncoding): Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* Write file (sync)
|
|
101
|
+
*/
|
|
102
|
+
declare function writeFileSync(path: string, data: string | Buffer | Uint8Array, options?: WriteFileOptions | BufferEncoding): void;
|
|
103
|
+
/**
|
|
104
|
+
* Append file (async)
|
|
105
|
+
*/
|
|
106
|
+
declare function appendFile(path: string, data: string | Buffer, options?: WriteFileOptions | BufferEncoding): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Append file (sync)
|
|
109
|
+
*/
|
|
110
|
+
declare function appendFileSync(path: string, data: string | Buffer, options?: WriteFileOptions | BufferEncoding): void;
|
|
111
|
+
/**
|
|
112
|
+
* Check if file/directory exists (async)
|
|
113
|
+
*/
|
|
114
|
+
declare function exists(path: string): Promise<boolean>;
|
|
115
|
+
/**
|
|
116
|
+
* Check if file/directory exists (sync)
|
|
117
|
+
*/
|
|
118
|
+
declare function existsSync(path: string): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Get file stats (async)
|
|
121
|
+
*/
|
|
122
|
+
declare function stat(path: string): Promise<Stats>;
|
|
123
|
+
/**
|
|
124
|
+
* Get file stats (sync)
|
|
125
|
+
*/
|
|
126
|
+
declare function statSync(path: string): Stats;
|
|
127
|
+
/**
|
|
128
|
+
* Create directory (async)
|
|
129
|
+
*/
|
|
130
|
+
declare function mkdir(path: string, options?: MkdirOptions | number): Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* Create directory (sync)
|
|
133
|
+
*/
|
|
134
|
+
declare function mkdirSync(path: string, options?: MkdirOptions | number): void;
|
|
135
|
+
/**
|
|
136
|
+
* Read directory (async)
|
|
137
|
+
*/
|
|
138
|
+
declare function readdir(path: string, options?: ReaddirOptions | BufferEncoding): Promise<string[] | Dirent[]>;
|
|
139
|
+
/**
|
|
140
|
+
* Read directory (sync)
|
|
141
|
+
*/
|
|
142
|
+
declare function readdirSync(path: string, options?: ReaddirOptions | BufferEncoding): string[] | Dirent[];
|
|
143
|
+
/**
|
|
144
|
+
* Remove file (async)
|
|
145
|
+
*/
|
|
146
|
+
declare function unlink(path: string): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Remove file (sync)
|
|
149
|
+
*/
|
|
150
|
+
declare function unlinkSync(path: string): void;
|
|
151
|
+
/**
|
|
152
|
+
* Remove directory (async)
|
|
153
|
+
*/
|
|
154
|
+
declare function rmdir(path: string, options?: {
|
|
155
|
+
recursive?: boolean;
|
|
156
|
+
}): Promise<void>;
|
|
157
|
+
/**
|
|
158
|
+
* Remove directory (sync)
|
|
159
|
+
*/
|
|
160
|
+
declare function rmdirSync(path: string, options?: {
|
|
161
|
+
recursive?: boolean;
|
|
162
|
+
}): void;
|
|
163
|
+
/**
|
|
164
|
+
* Rename/move file (async)
|
|
165
|
+
*/
|
|
166
|
+
declare function rename(oldPath: string, newPath: string): Promise<void>;
|
|
167
|
+
/**
|
|
168
|
+
* Rename/move file (sync)
|
|
169
|
+
*/
|
|
170
|
+
declare function renameSync(oldPath: string, newPath: string): void;
|
|
171
|
+
/**
|
|
172
|
+
* Copy file (async)
|
|
173
|
+
*/
|
|
174
|
+
declare function copyFile(src: string, dest: string, flags?: number): Promise<void>;
|
|
175
|
+
/**
|
|
176
|
+
* Copy file (sync)
|
|
177
|
+
*/
|
|
178
|
+
declare function copyFileSync(src: string, dest: string, flags?: number): void;
|
|
179
|
+
/**
|
|
180
|
+
* Resolve pathname to absolute path (async)
|
|
181
|
+
*/
|
|
182
|
+
declare function realpath(path: string, options?: {
|
|
183
|
+
encoding?: BufferEncoding;
|
|
184
|
+
}): Promise<string>;
|
|
185
|
+
/**
|
|
186
|
+
* Resolve pathname to absolute path (sync)
|
|
187
|
+
*/
|
|
188
|
+
declare function realpathSync(path: string, options?: {
|
|
189
|
+
encoding?: BufferEncoding;
|
|
190
|
+
}): string;
|
|
191
|
+
/**
|
|
192
|
+
* Get current runtime
|
|
193
|
+
*/
|
|
194
|
+
declare function getRuntime(): 'node' | 'bun' | 'deno';
|
|
195
|
+
/**
|
|
196
|
+
* Promises API (re-export for compatibility)
|
|
197
|
+
*/
|
|
198
|
+
declare const promises: {
|
|
199
|
+
readFile: typeof readFile;
|
|
200
|
+
writeFile: typeof writeFile;
|
|
201
|
+
appendFile: typeof appendFile;
|
|
202
|
+
stat: typeof stat;
|
|
203
|
+
mkdir: typeof mkdir;
|
|
204
|
+
readdir: typeof readdir;
|
|
205
|
+
unlink: typeof unlink;
|
|
206
|
+
rmdir: typeof rmdir;
|
|
207
|
+
rename: typeof rename;
|
|
208
|
+
copyFile: typeof copyFile;
|
|
209
|
+
realpath: typeof realpath;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Default export
|
|
213
|
+
*/
|
|
214
|
+
declare const _default: {
|
|
215
|
+
readFile: typeof readFile;
|
|
216
|
+
readFileSync: typeof readFileSync;
|
|
217
|
+
writeFile: typeof writeFile;
|
|
218
|
+
writeFileSync: typeof writeFileSync;
|
|
219
|
+
appendFile: typeof appendFile;
|
|
220
|
+
appendFileSync: typeof appendFileSync;
|
|
221
|
+
exists: typeof exists;
|
|
222
|
+
existsSync: typeof existsSync;
|
|
223
|
+
stat: typeof stat;
|
|
224
|
+
statSync: typeof statSync;
|
|
225
|
+
mkdir: typeof mkdir;
|
|
226
|
+
mkdirSync: typeof mkdirSync;
|
|
227
|
+
readdir: typeof readdir;
|
|
228
|
+
readdirSync: typeof readdirSync;
|
|
229
|
+
unlink: typeof unlink;
|
|
230
|
+
unlinkSync: typeof unlinkSync;
|
|
231
|
+
rmdir: typeof rmdir;
|
|
232
|
+
rmdirSync: typeof rmdirSync;
|
|
233
|
+
rename: typeof rename;
|
|
234
|
+
renameSync: typeof renameSync;
|
|
235
|
+
copyFile: typeof copyFile;
|
|
236
|
+
copyFileSync: typeof copyFileSync;
|
|
237
|
+
realpath: typeof realpath;
|
|
238
|
+
realpathSync: typeof realpathSync;
|
|
239
|
+
promises: {
|
|
240
|
+
readFile: typeof readFile;
|
|
241
|
+
writeFile: typeof writeFile;
|
|
242
|
+
appendFile: typeof appendFile;
|
|
243
|
+
stat: typeof stat;
|
|
244
|
+
mkdir: typeof mkdir;
|
|
245
|
+
readdir: typeof readdir;
|
|
246
|
+
unlink: typeof unlink;
|
|
247
|
+
rmdir: typeof rmdir;
|
|
248
|
+
rename: typeof rename;
|
|
249
|
+
copyFile: typeof copyFile;
|
|
250
|
+
realpath: typeof realpath;
|
|
251
|
+
};
|
|
252
|
+
getRuntime: typeof getRuntime;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
export { type BufferEncoding, type Dirent, type MkdirOptions, type ReadFileOptions, type ReaddirOptions, type Stats, type WriteFileOptions, appendFile, appendFileSync, copyFile, copyFileSync, _default as default, exists, existsSync, getRuntime, mkdir, mkdirSync, promises, readFile, readFileSync, readdir, readdirSync, realpath, realpathSync, rename, renameSync, rmdir, rmdirSync, stat, statSync, unlink, unlinkSync, writeFile, writeFileSync };
|
package/dist/fs.d.ts
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File System module with unified API across runtimes
|
|
3
|
+
* Compatible with Node.js 'fs' module API
|
|
4
|
+
* - Node.js: uses 'fs' module
|
|
5
|
+
* - Bun: uses Bun.file() and native APIs
|
|
6
|
+
* - Deno: uses Deno.readFile(), etc.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* File encoding types
|
|
10
|
+
*/
|
|
11
|
+
type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
|
|
12
|
+
/**
|
|
13
|
+
* Read file options
|
|
14
|
+
*/
|
|
15
|
+
interface ReadFileOptions {
|
|
16
|
+
encoding?: BufferEncoding | null;
|
|
17
|
+
flag?: string;
|
|
18
|
+
signal?: AbortSignal;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Write file options
|
|
22
|
+
*/
|
|
23
|
+
interface WriteFileOptions {
|
|
24
|
+
encoding?: BufferEncoding | null;
|
|
25
|
+
mode?: number;
|
|
26
|
+
flag?: string;
|
|
27
|
+
signal?: AbortSignal;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Mkdir options
|
|
31
|
+
*/
|
|
32
|
+
interface MkdirOptions {
|
|
33
|
+
recursive?: boolean;
|
|
34
|
+
mode?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Readdir options
|
|
38
|
+
*/
|
|
39
|
+
interface ReaddirOptions {
|
|
40
|
+
encoding?: BufferEncoding | null;
|
|
41
|
+
withFileTypes?: boolean;
|
|
42
|
+
recursive?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* File stats
|
|
46
|
+
*/
|
|
47
|
+
interface Stats {
|
|
48
|
+
isFile(): boolean;
|
|
49
|
+
isDirectory(): boolean;
|
|
50
|
+
isBlockDevice(): boolean;
|
|
51
|
+
isCharacterDevice(): boolean;
|
|
52
|
+
isSymbolicLink(): boolean;
|
|
53
|
+
isFIFO(): boolean;
|
|
54
|
+
isSocket(): boolean;
|
|
55
|
+
dev: number;
|
|
56
|
+
ino: number;
|
|
57
|
+
mode: number;
|
|
58
|
+
nlink: number;
|
|
59
|
+
uid: number;
|
|
60
|
+
gid: number;
|
|
61
|
+
rdev: number;
|
|
62
|
+
size: number;
|
|
63
|
+
blksize: number;
|
|
64
|
+
blocks: number;
|
|
65
|
+
atimeMs: number;
|
|
66
|
+
mtimeMs: number;
|
|
67
|
+
ctimeMs: number;
|
|
68
|
+
birthtimeMs: number;
|
|
69
|
+
atime: Date;
|
|
70
|
+
mtime: Date;
|
|
71
|
+
ctime: Date;
|
|
72
|
+
birthtime: Date;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Directory entry
|
|
76
|
+
*/
|
|
77
|
+
interface Dirent {
|
|
78
|
+
name: string;
|
|
79
|
+
isFile(): boolean;
|
|
80
|
+
isDirectory(): boolean;
|
|
81
|
+
isBlockDevice(): boolean;
|
|
82
|
+
isCharacterDevice(): boolean;
|
|
83
|
+
isSymbolicLink(): boolean;
|
|
84
|
+
isFIFO(): boolean;
|
|
85
|
+
isSocket(): boolean;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Read file (async)
|
|
89
|
+
*/
|
|
90
|
+
declare function readFile(path: string, options?: ReadFileOptions | BufferEncoding): Promise<string | Buffer>;
|
|
91
|
+
/**
|
|
92
|
+
* Read file (sync)
|
|
93
|
+
*/
|
|
94
|
+
declare function readFileSync(path: string, options?: ReadFileOptions | BufferEncoding): string | Buffer;
|
|
95
|
+
/**
|
|
96
|
+
* Write file (async)
|
|
97
|
+
*/
|
|
98
|
+
declare function writeFile(path: string, data: string | Buffer | Uint8Array, options?: WriteFileOptions | BufferEncoding): Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* Write file (sync)
|
|
101
|
+
*/
|
|
102
|
+
declare function writeFileSync(path: string, data: string | Buffer | Uint8Array, options?: WriteFileOptions | BufferEncoding): void;
|
|
103
|
+
/**
|
|
104
|
+
* Append file (async)
|
|
105
|
+
*/
|
|
106
|
+
declare function appendFile(path: string, data: string | Buffer, options?: WriteFileOptions | BufferEncoding): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Append file (sync)
|
|
109
|
+
*/
|
|
110
|
+
declare function appendFileSync(path: string, data: string | Buffer, options?: WriteFileOptions | BufferEncoding): void;
|
|
111
|
+
/**
|
|
112
|
+
* Check if file/directory exists (async)
|
|
113
|
+
*/
|
|
114
|
+
declare function exists(path: string): Promise<boolean>;
|
|
115
|
+
/**
|
|
116
|
+
* Check if file/directory exists (sync)
|
|
117
|
+
*/
|
|
118
|
+
declare function existsSync(path: string): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Get file stats (async)
|
|
121
|
+
*/
|
|
122
|
+
declare function stat(path: string): Promise<Stats>;
|
|
123
|
+
/**
|
|
124
|
+
* Get file stats (sync)
|
|
125
|
+
*/
|
|
126
|
+
declare function statSync(path: string): Stats;
|
|
127
|
+
/**
|
|
128
|
+
* Create directory (async)
|
|
129
|
+
*/
|
|
130
|
+
declare function mkdir(path: string, options?: MkdirOptions | number): Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* Create directory (sync)
|
|
133
|
+
*/
|
|
134
|
+
declare function mkdirSync(path: string, options?: MkdirOptions | number): void;
|
|
135
|
+
/**
|
|
136
|
+
* Read directory (async)
|
|
137
|
+
*/
|
|
138
|
+
declare function readdir(path: string, options?: ReaddirOptions | BufferEncoding): Promise<string[] | Dirent[]>;
|
|
139
|
+
/**
|
|
140
|
+
* Read directory (sync)
|
|
141
|
+
*/
|
|
142
|
+
declare function readdirSync(path: string, options?: ReaddirOptions | BufferEncoding): string[] | Dirent[];
|
|
143
|
+
/**
|
|
144
|
+
* Remove file (async)
|
|
145
|
+
*/
|
|
146
|
+
declare function unlink(path: string): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Remove file (sync)
|
|
149
|
+
*/
|
|
150
|
+
declare function unlinkSync(path: string): void;
|
|
151
|
+
/**
|
|
152
|
+
* Remove directory (async)
|
|
153
|
+
*/
|
|
154
|
+
declare function rmdir(path: string, options?: {
|
|
155
|
+
recursive?: boolean;
|
|
156
|
+
}): Promise<void>;
|
|
157
|
+
/**
|
|
158
|
+
* Remove directory (sync)
|
|
159
|
+
*/
|
|
160
|
+
declare function rmdirSync(path: string, options?: {
|
|
161
|
+
recursive?: boolean;
|
|
162
|
+
}): void;
|
|
163
|
+
/**
|
|
164
|
+
* Rename/move file (async)
|
|
165
|
+
*/
|
|
166
|
+
declare function rename(oldPath: string, newPath: string): Promise<void>;
|
|
167
|
+
/**
|
|
168
|
+
* Rename/move file (sync)
|
|
169
|
+
*/
|
|
170
|
+
declare function renameSync(oldPath: string, newPath: string): void;
|
|
171
|
+
/**
|
|
172
|
+
* Copy file (async)
|
|
173
|
+
*/
|
|
174
|
+
declare function copyFile(src: string, dest: string, flags?: number): Promise<void>;
|
|
175
|
+
/**
|
|
176
|
+
* Copy file (sync)
|
|
177
|
+
*/
|
|
178
|
+
declare function copyFileSync(src: string, dest: string, flags?: number): void;
|
|
179
|
+
/**
|
|
180
|
+
* Resolve pathname to absolute path (async)
|
|
181
|
+
*/
|
|
182
|
+
declare function realpath(path: string, options?: {
|
|
183
|
+
encoding?: BufferEncoding;
|
|
184
|
+
}): Promise<string>;
|
|
185
|
+
/**
|
|
186
|
+
* Resolve pathname to absolute path (sync)
|
|
187
|
+
*/
|
|
188
|
+
declare function realpathSync(path: string, options?: {
|
|
189
|
+
encoding?: BufferEncoding;
|
|
190
|
+
}): string;
|
|
191
|
+
/**
|
|
192
|
+
* Get current runtime
|
|
193
|
+
*/
|
|
194
|
+
declare function getRuntime(): 'node' | 'bun' | 'deno';
|
|
195
|
+
/**
|
|
196
|
+
* Promises API (re-export for compatibility)
|
|
197
|
+
*/
|
|
198
|
+
declare const promises: {
|
|
199
|
+
readFile: typeof readFile;
|
|
200
|
+
writeFile: typeof writeFile;
|
|
201
|
+
appendFile: typeof appendFile;
|
|
202
|
+
stat: typeof stat;
|
|
203
|
+
mkdir: typeof mkdir;
|
|
204
|
+
readdir: typeof readdir;
|
|
205
|
+
unlink: typeof unlink;
|
|
206
|
+
rmdir: typeof rmdir;
|
|
207
|
+
rename: typeof rename;
|
|
208
|
+
copyFile: typeof copyFile;
|
|
209
|
+
realpath: typeof realpath;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Default export
|
|
213
|
+
*/
|
|
214
|
+
declare const _default: {
|
|
215
|
+
readFile: typeof readFile;
|
|
216
|
+
readFileSync: typeof readFileSync;
|
|
217
|
+
writeFile: typeof writeFile;
|
|
218
|
+
writeFileSync: typeof writeFileSync;
|
|
219
|
+
appendFile: typeof appendFile;
|
|
220
|
+
appendFileSync: typeof appendFileSync;
|
|
221
|
+
exists: typeof exists;
|
|
222
|
+
existsSync: typeof existsSync;
|
|
223
|
+
stat: typeof stat;
|
|
224
|
+
statSync: typeof statSync;
|
|
225
|
+
mkdir: typeof mkdir;
|
|
226
|
+
mkdirSync: typeof mkdirSync;
|
|
227
|
+
readdir: typeof readdir;
|
|
228
|
+
readdirSync: typeof readdirSync;
|
|
229
|
+
unlink: typeof unlink;
|
|
230
|
+
unlinkSync: typeof unlinkSync;
|
|
231
|
+
rmdir: typeof rmdir;
|
|
232
|
+
rmdirSync: typeof rmdirSync;
|
|
233
|
+
rename: typeof rename;
|
|
234
|
+
renameSync: typeof renameSync;
|
|
235
|
+
copyFile: typeof copyFile;
|
|
236
|
+
copyFileSync: typeof copyFileSync;
|
|
237
|
+
realpath: typeof realpath;
|
|
238
|
+
realpathSync: typeof realpathSync;
|
|
239
|
+
promises: {
|
|
240
|
+
readFile: typeof readFile;
|
|
241
|
+
writeFile: typeof writeFile;
|
|
242
|
+
appendFile: typeof appendFile;
|
|
243
|
+
stat: typeof stat;
|
|
244
|
+
mkdir: typeof mkdir;
|
|
245
|
+
readdir: typeof readdir;
|
|
246
|
+
unlink: typeof unlink;
|
|
247
|
+
rmdir: typeof rmdir;
|
|
248
|
+
rename: typeof rename;
|
|
249
|
+
copyFile: typeof copyFile;
|
|
250
|
+
realpath: typeof realpath;
|
|
251
|
+
};
|
|
252
|
+
getRuntime: typeof getRuntime;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
export { type BufferEncoding, type Dirent, type MkdirOptions, type ReadFileOptions, type ReaddirOptions, type Stats, type WriteFileOptions, appendFile, appendFileSync, copyFile, copyFileSync, _default as default, exists, existsSync, getRuntime, mkdir, mkdirSync, promises, readFile, readFileSync, readdir, readdirSync, realpath, realpathSync, rename, renameSync, rmdir, rmdirSync, stat, statSync, unlink, unlinkSync, writeFile, writeFileSync };
|