@d0paminedriven/fs 3.0.0 → 4.1.0
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/dist/{chunk-SPP3NFBL.js → chunk-ELR74GDM.js} +58 -12
- package/dist/fs/index.cjs +57 -11
- package/dist/fs/index.d.cts +14 -4
- package/dist/fs/index.d.ts +14 -4
- package/dist/fs/index.js +1 -1
- package/dist/index.cjs +57 -11
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types/index.d.cts +31 -1
- package/dist/types/index.d.ts +31 -1
- package/package.json +6 -6
|
@@ -146,7 +146,8 @@ var Fs = class {
|
|
|
146
146
|
return { ...this.omitFields(targ, keys) };
|
|
147
147
|
}
|
|
148
148
|
exists(target) {
|
|
149
|
-
if (!/\//gm.test(target))
|
|
149
|
+
if (!/\//gm.test(target))
|
|
150
|
+
return fsSync.existsSync(resolve(join(this.cwd, target)));
|
|
150
151
|
return fsSync.existsSync(relative(this.cwd ?? process.cwd(), target));
|
|
151
152
|
}
|
|
152
153
|
arrToArrOfArrs = /* @__PURE__ */ __name(({
|
|
@@ -191,18 +192,23 @@ var Fs = class {
|
|
|
191
192
|
}
|
|
192
193
|
readDir(path, options) {
|
|
193
194
|
if (this.isRootPathTargeted(path)) {
|
|
194
|
-
return this.handleBuffStrArrUnion(
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
195
|
+
return this.handleBuffStrArrUnion(
|
|
196
|
+
fsSync.readdirSync(resolve(join(this.cwd, "./")), options)
|
|
197
|
+
);
|
|
198
|
+
} else
|
|
199
|
+
return this.handleBuffStrArrUnion(
|
|
200
|
+
fsSync.readdirSync(
|
|
201
|
+
relative(this.cwd ??= process.cwd(), path),
|
|
202
|
+
options
|
|
203
|
+
)
|
|
204
|
+
);
|
|
201
205
|
}
|
|
202
206
|
executeCommand = /* @__PURE__ */ __name(({
|
|
203
207
|
command,
|
|
204
208
|
...options
|
|
205
|
-
}) => Buffer.from(execSync(command, { ...options }).toJSON().data).toString(
|
|
209
|
+
}) => Buffer.from(execSync(command, { ...options }).toJSON().data).toString(
|
|
210
|
+
"utf-8"
|
|
211
|
+
), "executeCommand");
|
|
206
212
|
fileGenTimestamp(d) {
|
|
207
213
|
const date = d.toISOString();
|
|
208
214
|
return `/* file-autogenerated by @d0paminedriven/fs on ${date.split(/([T])/gm)?.[0]} at ${date.split(/([T])/gm)[2]?.split(/([Z])/gm)?.[0]} UTC */`;
|
|
@@ -214,7 +220,8 @@ var Fs = class {
|
|
|
214
220
|
return this.fileGenTimestamp(d).replace("/*", "<!--").replace("*/", "-->");
|
|
215
221
|
}
|
|
216
222
|
existsSync(path) {
|
|
217
|
-
if (!/\//gm.test(path))
|
|
223
|
+
if (!/\//gm.test(path))
|
|
224
|
+
return fsSync.existsSync(resolve(join(this.cwd, path)));
|
|
218
225
|
return fsSync.existsSync(relative(this.cwd ?? process.cwd(), path));
|
|
219
226
|
}
|
|
220
227
|
pathHandler(path) {
|
|
@@ -276,6 +283,41 @@ var Fs = class {
|
|
|
276
283
|
);
|
|
277
284
|
}
|
|
278
285
|
}, "writeFileAsync");
|
|
286
|
+
dirExists(dir) {
|
|
287
|
+
const resolved = relative(this.cwd, dir);
|
|
288
|
+
try {
|
|
289
|
+
return fsSync.statSync(resolved).isDirectory();
|
|
290
|
+
} catch {
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
async unlink(path) {
|
|
295
|
+
if (this.existsSync(path)) {
|
|
296
|
+
return await fsAsync.unlink(relative(this.cwd, path));
|
|
297
|
+
} else {
|
|
298
|
+
throw new Error(`input path ${path} does not exist`);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
async rmdir(dir, options) {
|
|
302
|
+
const resolved = relative(this.cwd, dir);
|
|
303
|
+
if (this.dirExists(dir)) {
|
|
304
|
+
return fsAsync.rmdir(relative(this.cwd, dir), options);
|
|
305
|
+
} else {
|
|
306
|
+
throw new Error(`directory ${resolved} does not exist`);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
rm(dir) {
|
|
310
|
+
const resolved = resolve(this.cwd, dir);
|
|
311
|
+
if (this.dirExists(dir)) {
|
|
312
|
+
return fsSync.rm(resolved, { force: true, recursive: true }, (err) => {
|
|
313
|
+
if (err?.message) {
|
|
314
|
+
console.error(err?.message);
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
} else {
|
|
318
|
+
throw new Error(`directory ${resolved} does not exist`);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
279
321
|
fileToBuffer = /* @__PURE__ */ __name((path) => Buffer.from(
|
|
280
322
|
fsSync.readFileSync(relative(this.cwd ?? process.cwd(), path)).toJSON().data
|
|
281
323
|
), "fileToBuffer");
|
|
@@ -390,6 +432,8 @@ var Fs = class {
|
|
|
390
432
|
js: this.jsVal,
|
|
391
433
|
json: "application/json",
|
|
392
434
|
jsonld: "application/ld+json",
|
|
435
|
+
ktx: "image/ktx",
|
|
436
|
+
ktx2: "image/ktx2",
|
|
393
437
|
m3u8: "application/vnd.apple.mpegurl",
|
|
394
438
|
m4a: "audio/mp4",
|
|
395
439
|
m4v: "video/mp4",
|
|
@@ -482,7 +526,9 @@ var Fs = class {
|
|
|
482
526
|
p.pathname.split(/\//g).reverse()[0] ?? ""
|
|
483
527
|
);
|
|
484
528
|
if (doesUrlPathContainFileExtension === false)
|
|
485
|
-
console.warn(
|
|
529
|
+
console.warn(
|
|
530
|
+
`no file extension detected in input url ${path}, attempting fetch`
|
|
531
|
+
);
|
|
486
532
|
const response = await fetch(path);
|
|
487
533
|
if (!response.ok) {
|
|
488
534
|
throw new Error(`Failed to fetch asset: ${response.statusText}`);
|
|
@@ -725,4 +771,4 @@ var Fs = class {
|
|
|
725
771
|
export {
|
|
726
772
|
Fs
|
|
727
773
|
};
|
|
728
|
-
//# sourceMappingURL=chunk-
|
|
774
|
+
//# sourceMappingURL=chunk-ELR74GDM.js.map
|
package/dist/fs/index.cjs
CHANGED
|
@@ -187,7 +187,8 @@ var Fs = class {
|
|
|
187
187
|
return { ...this.omitFields(targ, keys) };
|
|
188
188
|
}
|
|
189
189
|
exists(target) {
|
|
190
|
-
if (!/\//gm.test(target))
|
|
190
|
+
if (!/\//gm.test(target))
|
|
191
|
+
return import_fs.default.existsSync((0, import_path.resolve)((0, import_path.join)(this.cwd, target)));
|
|
191
192
|
return import_fs.default.existsSync((0, import_path.relative)(this.cwd ?? process.cwd(), target));
|
|
192
193
|
}
|
|
193
194
|
arrToArrOfArrs = /* @__PURE__ */ __name(({
|
|
@@ -232,18 +233,23 @@ var Fs = class {
|
|
|
232
233
|
}
|
|
233
234
|
readDir(path, options) {
|
|
234
235
|
if (this.isRootPathTargeted(path)) {
|
|
235
|
-
return this.handleBuffStrArrUnion(
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
236
|
+
return this.handleBuffStrArrUnion(
|
|
237
|
+
import_fs.default.readdirSync((0, import_path.resolve)((0, import_path.join)(this.cwd, "./")), options)
|
|
238
|
+
);
|
|
239
|
+
} else
|
|
240
|
+
return this.handleBuffStrArrUnion(
|
|
241
|
+
import_fs.default.readdirSync(
|
|
242
|
+
(0, import_path.relative)(this.cwd ??= process.cwd(), path),
|
|
243
|
+
options
|
|
244
|
+
)
|
|
245
|
+
);
|
|
242
246
|
}
|
|
243
247
|
executeCommand = /* @__PURE__ */ __name(({
|
|
244
248
|
command,
|
|
245
249
|
...options
|
|
246
|
-
}) => Buffer.from((0, import_child_process.execSync)(command, { ...options }).toJSON().data).toString(
|
|
250
|
+
}) => Buffer.from((0, import_child_process.execSync)(command, { ...options }).toJSON().data).toString(
|
|
251
|
+
"utf-8"
|
|
252
|
+
), "executeCommand");
|
|
247
253
|
fileGenTimestamp(d) {
|
|
248
254
|
const date = d.toISOString();
|
|
249
255
|
return `/* file-autogenerated by @d0paminedriven/fs on ${date.split(/([T])/gm)?.[0]} at ${date.split(/([T])/gm)[2]?.split(/([Z])/gm)?.[0]} UTC */`;
|
|
@@ -255,7 +261,8 @@ var Fs = class {
|
|
|
255
261
|
return this.fileGenTimestamp(d).replace("/*", "<!--").replace("*/", "-->");
|
|
256
262
|
}
|
|
257
263
|
existsSync(path) {
|
|
258
|
-
if (!/\//gm.test(path))
|
|
264
|
+
if (!/\//gm.test(path))
|
|
265
|
+
return import_fs.default.existsSync((0, import_path.resolve)((0, import_path.join)(this.cwd, path)));
|
|
259
266
|
return import_fs.default.existsSync((0, import_path.relative)(this.cwd ?? process.cwd(), path));
|
|
260
267
|
}
|
|
261
268
|
pathHandler(path) {
|
|
@@ -317,6 +324,41 @@ var Fs = class {
|
|
|
317
324
|
);
|
|
318
325
|
}
|
|
319
326
|
}, "writeFileAsync");
|
|
327
|
+
dirExists(dir) {
|
|
328
|
+
const resolved = (0, import_path.relative)(this.cwd, dir);
|
|
329
|
+
try {
|
|
330
|
+
return import_fs.default.statSync(resolved).isDirectory();
|
|
331
|
+
} catch {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
async unlink(path) {
|
|
336
|
+
if (this.existsSync(path)) {
|
|
337
|
+
return await import_promises.default.unlink((0, import_path.relative)(this.cwd, path));
|
|
338
|
+
} else {
|
|
339
|
+
throw new Error(`input path ${path} does not exist`);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
async rmdir(dir, options) {
|
|
343
|
+
const resolved = (0, import_path.relative)(this.cwd, dir);
|
|
344
|
+
if (this.dirExists(dir)) {
|
|
345
|
+
return import_promises.default.rmdir((0, import_path.relative)(this.cwd, dir), options);
|
|
346
|
+
} else {
|
|
347
|
+
throw new Error(`directory ${resolved} does not exist`);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
rm(dir) {
|
|
351
|
+
const resolved = (0, import_path.resolve)(this.cwd, dir);
|
|
352
|
+
if (this.dirExists(dir)) {
|
|
353
|
+
return import_fs.default.rm(resolved, { force: true, recursive: true }, (err) => {
|
|
354
|
+
if (err?.message) {
|
|
355
|
+
console.error(err?.message);
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
} else {
|
|
359
|
+
throw new Error(`directory ${resolved} does not exist`);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
320
362
|
fileToBuffer = /* @__PURE__ */ __name((path) => Buffer.from(
|
|
321
363
|
import_fs.default.readFileSync((0, import_path.relative)(this.cwd ?? process.cwd(), path)).toJSON().data
|
|
322
364
|
), "fileToBuffer");
|
|
@@ -431,6 +473,8 @@ var Fs = class {
|
|
|
431
473
|
js: this.jsVal,
|
|
432
474
|
json: "application/json",
|
|
433
475
|
jsonld: "application/ld+json",
|
|
476
|
+
ktx: "image/ktx",
|
|
477
|
+
ktx2: "image/ktx2",
|
|
434
478
|
m3u8: "application/vnd.apple.mpegurl",
|
|
435
479
|
m4a: "audio/mp4",
|
|
436
480
|
m4v: "video/mp4",
|
|
@@ -523,7 +567,9 @@ var Fs = class {
|
|
|
523
567
|
p.pathname.split(/\//g).reverse()[0] ?? ""
|
|
524
568
|
);
|
|
525
569
|
if (doesUrlPathContainFileExtension === false)
|
|
526
|
-
console.warn(
|
|
570
|
+
console.warn(
|
|
571
|
+
`no file extension detected in input url ${path}, attempting fetch`
|
|
572
|
+
);
|
|
527
573
|
const response = await fetch(path);
|
|
528
574
|
if (!response.ok) {
|
|
529
575
|
throw new Error(`Failed to fetch asset: ${response.statusText}`);
|
package/dist/fs/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import expand from 'dotenv-expand';
|
|
2
2
|
import sharp from 'sharp';
|
|
3
|
-
import { RemoveFields, Unenumerate, ReadDirOptions, ExecuteCommandProps, MkDirSyncOptions, WriteStreamDataShape, WriteStreamOptions, WriteFileAsyncDataUnion, WriteFileAsyncOptions, ParsedUrlInfo } from '../types/index.cjs';
|
|
3
|
+
import { RemoveFields, Unenumerate, ReadDirOptions, ExecuteCommandProps, MkDirSyncOptions, WriteStreamDataShape, WriteStreamOptions, WriteFileAsyncDataUnion, WriteFileAsyncOptions, RmDirOptions, ParsedUrlInfo } from '../types/index.cjs';
|
|
4
4
|
import 'stream';
|
|
5
5
|
import 'buffer';
|
|
6
6
|
|
|
@@ -47,6 +47,10 @@ declare class Fs {
|
|
|
47
47
|
generateDirIfDNE<const T extends string>(path: T, options?: MkDirSyncOptions): string | undefined;
|
|
48
48
|
withWs<const T extends string>(path: T, data: WriteStreamDataShape, options?: WriteStreamOptions): string | boolean | undefined;
|
|
49
49
|
writeFileAsync: <const T extends string>(path: T, data: WriteFileAsyncDataUnion, options?: WriteFileAsyncOptions) => Promise<string | void>;
|
|
50
|
+
dirExists<const T extends string>(dir: T): boolean;
|
|
51
|
+
unlink<const P extends string>(path: P): Promise<void>;
|
|
52
|
+
rmdir<const D extends string>(dir: D, options?: RmDirOptions): Promise<void>;
|
|
53
|
+
rm<const D extends string>(dir: D): void;
|
|
50
54
|
fileToBuffer: <const T extends string>(path: T) => Buffer<ArrayBuffer>;
|
|
51
55
|
dirContainsDir<const From extends string, const To extends string>(readDir: From, targetDir: To, options?: ReadDirOptions): boolean;
|
|
52
56
|
isServerSide(): boolean;
|
|
@@ -104,6 +108,8 @@ declare class Fs {
|
|
|
104
108
|
readonly js: "application/node" | "text/javascript";
|
|
105
109
|
readonly json: "application/json";
|
|
106
110
|
readonly jsonld: "application/ld+json";
|
|
111
|
+
readonly ktx: "image/ktx";
|
|
112
|
+
readonly ktx2: "image/ktx2";
|
|
107
113
|
readonly m3u8: "application/vnd.apple.mpegurl";
|
|
108
114
|
readonly m4a: "audio/mp4";
|
|
109
115
|
readonly m4v: "video/mp4";
|
|
@@ -211,6 +217,8 @@ declare class Fs {
|
|
|
211
217
|
readonly js: "application/node" | "text/javascript";
|
|
212
218
|
readonly json: "application/json";
|
|
213
219
|
readonly jsonld: "application/ld+json";
|
|
220
|
+
readonly ktx: "image/ktx";
|
|
221
|
+
readonly ktx2: "image/ktx2";
|
|
214
222
|
readonly m3u8: "application/vnd.apple.mpegurl";
|
|
215
223
|
readonly m4a: "audio/mp4";
|
|
216
224
|
readonly m4v: "video/mp4";
|
|
@@ -317,6 +325,8 @@ declare class Fs {
|
|
|
317
325
|
readonly js: "application/node" | "text/javascript";
|
|
318
326
|
readonly json: "application/json";
|
|
319
327
|
readonly jsonld: "application/ld+json";
|
|
328
|
+
readonly ktx: "image/ktx";
|
|
329
|
+
readonly ktx2: "image/ktx2";
|
|
320
330
|
readonly m3u8: "application/vnd.apple.mpegurl";
|
|
321
331
|
readonly m4a: "audio/mp4";
|
|
322
332
|
readonly m4v: "video/mp4";
|
|
@@ -382,12 +392,12 @@ declare class Fs {
|
|
|
382
392
|
readonly "7z": "application/x-7z-compressed";
|
|
383
393
|
}[T];
|
|
384
394
|
assetToBuffer<const T extends string>(path: T): Promise<{
|
|
385
|
-
readonly b64encodedData: `data:application/node;base64, ${string}` | `data:text/javascript;base64, ${string}` | `data:application/x-gzip;base64, ${string}` | `data:application/gzip;base64, ${string}` | `data:application/octet-stream;base64, ${string}` | `data:text/plain;base64, ${string}` | `data:model/obj;base64, ${string}` | `data:text/typescript;base64, ${string}` | `data:video/mp2t;base64, ${string}` | `data:video/vnd.dlna.mpeg-tts;base64, ${string}` | `data:application/font-sfnt;base64, ${string}` | `data:font/ttf;base64, ${string}` | `data:application/zip;base64, ${string}` | `data:application/x-zip-compressed;base64, ${string}` | `data:audio/aac;base64, ${string}` | `data:application/x-abiword;base64, ${string}` | `data:image/aces;base64, ${string}` | `data:image/apng;base64, ${string}` | `data:application/x-freearc;base64, ${string}` | `data:image/avci;base64, ${string}` | `data:image/avif;base64, ${string}` | `data:video/x-msvideo;base64, ${string}` | `data:application/vnd.amazon.ebook;base64, ${string}` | `data:image/bmp;base64, ${string}` | `data:application/x-bzip;base64, ${string}` | `data:application/x-bzip2;base64, ${string}` | `data:application/x-cdf;base64, ${string}` | `data:application/x-csh;base64, ${string}` | `data:text/css;base64, ${string}` | `data:text/csv;base64, ${string}` | `data:application/msword;base64, ${string}` | `data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64, ${string}` | `data:image/dpx;base64, ${string}` | `data:image/emf;base64, ${string}` | `data:application/vnd.ms-fontobject;base64, ${string}` | `data:application/epub+zip;base64, ${string}` | `data:image/gif;base64, ${string}` | `data:model/gltf-binary;base64, ${string}` | `data:model/gltf+json;base64, ${string}` | `data:haptics/hjif;base64, ${string}` | `data:haptics/hmpg;base64, ${string}` | `data:text/html;base64, ${string}` | `data:image/vnd.microsoft.icon;base64, ${string}` | `data:text/calendar;base64, ${string}` | `data:haptics/ivs;base64, ${string}` | `data:application/java-archive;base64, ${string}` | `data:image/jpeg;base64, ${string}` | `data:application/json;base64, ${string}` | `data:application/ld+json;base64, ${string}` | `data:application/vnd.apple.mpegurl;base64, ${string}` | `data:audio/mp4;base64, ${string}` | `data:video/mp4;base64, ${string}` | `data:text/markdown;base64, ${string}` | `data:application/x-mdx;base64, ${string}` | `data:audio/midi;base64, ${string}` | `data:audio/x-midi;base64, ${string}` | `data:audio/mpeg;base64, ${string}` | `data:video/mpeg;base64, ${string}` | `data:application/vnd.apple.installer+xml;base64, ${string}` | `data:application/x-ndjson;base64, ${string}` | `data:application/vnd.oasis.opendocument.presentation;base64, ${string}` | `data:application/vnd.oasis.opendocument.spreadsheet;base64, ${string}` | `data:application/vnd.oasis.opendocument.text;base64, ${string}` | `data:audio/ogg;base64, ${string}` | `data:video/ogg;base64, ${string}` | `data:application/ogg;base64, ${string}` | `data:font/otf;base64, ${string}` | `data:image/png;base64, ${string}` | `data:application/pdf;base64, ${string}` | `data:application/x-httpd-php;base64, ${string}` | `data:application/vnd.apple.pkpass;base64, ${string}` | `data:application/vnd.ms-powerpoint;base64, ${string}` | `data:application/vnd.openxmlformats-officedocument.presentationml.presentation;base64, ${string}` | `data:text/x-python;base64, ${string}` | `data:application/x-python-code;base64, ${string}` | `data:application/vnd.rar;base64, ${string}` | `data:application/rtf;base64, ${string}` | `data:application/x-sh;base64, ${string}` | `data:application/sql;base64, ${string}` | `data:image/svg+xml;base64, ${string}` | `data:application/x-tar;base64, ${string}` | `data:image/tiff;base64, ${string}` | `data:application/toml;base64, ${string}` | `data:model/vnd.usdz+zip;base64, ${string}` | `data:application/vnd.visio;base64, ${string}` | `data:text/vtt;base64, ${string}` | `data:application/wasm;base64, ${string}` | `data:audio/wav;base64, ${string}` | `data:video/webm;base64, ${string}` | `data:image/webp;base64, ${string}` | `data:font/woff;base64, ${string}` | `data:font/woff2;base64, ${string}` | `data:application/xhtml+xml;base64, ${string}` | `data:application/vnd.ms-excel;base64, ${string}` | `data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64, ${string}` | `data:application/xml;base64, ${string}` | `data:application/vnd.mozilla.xul+xml;base64, ${string}` | `data:application/yaml;base64, ${string}` | `data:video/3gpp;base64, ${string}` | `data:video/3gpp2;base64, ${string}` | `data:application/x-7z-compressed;base64, ${string}`;
|
|
386
|
-
readonly extension: "aac" | "abw" | "aces" | "apng" | "arc" | "avci" | "avif" | "avi" | "azw" | "bin" | "bmp" | "bz" | "bz2" | "cda" | "cjs" | "csh" | "css" | "csv" | "doc" | "docx" | "dpx" | "emf" | "eot" | "epub" | "gif" | "glb" | "gltf" | "gz" | "hjif" | "hmpg" | "htm" | "html" | "ico" | "ics" | "ivs" | "jar" | "jpeg" | "jpg" | "js" | "json" | "jsonld" | "m3u8" | "m4a" | "m4v" | "md" | "mdx" | "mid" | "midi" | "mjs" | "mp3" | "mp4" | "mpeg" | "mpkg" | "ndjson" | "obj" | "odp" | "ods" | "odt" | "oga" | "ogg" | "ogv" | "ogx" | "opus" | "otf" | "png" | "pdf" | "php" | "pkpass" | "ppt" | "pptx" | "py" | "pyc" | "rar" | "rtf" | "sh" | "sql" | "svg" | "tar" | "tif" | "tiff" | "toml" | "ts" | "ttf" | "txt" | "usdz" | "vsd" | "vtt" | "wasm" | "wav" | "weba" | "webp" | "woff" | "woff2" | "xhtml" | "xls" | "xlsx" | "xml" | "xul" | "yaml" | "yml" | "zip" | "3gp" | "3g2" | "7z";
|
|
395
|
+
readonly b64encodedData: `data:application/node;base64, ${string}` | `data:text/javascript;base64, ${string}` | `data:application/x-gzip;base64, ${string}` | `data:application/gzip;base64, ${string}` | `data:application/octet-stream;base64, ${string}` | `data:text/plain;base64, ${string}` | `data:model/obj;base64, ${string}` | `data:text/typescript;base64, ${string}` | `data:video/mp2t;base64, ${string}` | `data:video/vnd.dlna.mpeg-tts;base64, ${string}` | `data:application/font-sfnt;base64, ${string}` | `data:font/ttf;base64, ${string}` | `data:application/zip;base64, ${string}` | `data:application/x-zip-compressed;base64, ${string}` | `data:audio/aac;base64, ${string}` | `data:application/x-abiword;base64, ${string}` | `data:image/aces;base64, ${string}` | `data:image/apng;base64, ${string}` | `data:application/x-freearc;base64, ${string}` | `data:image/avci;base64, ${string}` | `data:image/avif;base64, ${string}` | `data:video/x-msvideo;base64, ${string}` | `data:application/vnd.amazon.ebook;base64, ${string}` | `data:image/bmp;base64, ${string}` | `data:application/x-bzip;base64, ${string}` | `data:application/x-bzip2;base64, ${string}` | `data:application/x-cdf;base64, ${string}` | `data:application/x-csh;base64, ${string}` | `data:text/css;base64, ${string}` | `data:text/csv;base64, ${string}` | `data:application/msword;base64, ${string}` | `data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64, ${string}` | `data:image/dpx;base64, ${string}` | `data:image/emf;base64, ${string}` | `data:application/vnd.ms-fontobject;base64, ${string}` | `data:application/epub+zip;base64, ${string}` | `data:image/gif;base64, ${string}` | `data:model/gltf-binary;base64, ${string}` | `data:model/gltf+json;base64, ${string}` | `data:haptics/hjif;base64, ${string}` | `data:haptics/hmpg;base64, ${string}` | `data:text/html;base64, ${string}` | `data:image/vnd.microsoft.icon;base64, ${string}` | `data:text/calendar;base64, ${string}` | `data:haptics/ivs;base64, ${string}` | `data:application/java-archive;base64, ${string}` | `data:image/jpeg;base64, ${string}` | `data:application/json;base64, ${string}` | `data:application/ld+json;base64, ${string}` | `data:image/ktx;base64, ${string}` | `data:image/ktx2;base64, ${string}` | `data:application/vnd.apple.mpegurl;base64, ${string}` | `data:audio/mp4;base64, ${string}` | `data:video/mp4;base64, ${string}` | `data:text/markdown;base64, ${string}` | `data:application/x-mdx;base64, ${string}` | `data:audio/midi;base64, ${string}` | `data:audio/x-midi;base64, ${string}` | `data:audio/mpeg;base64, ${string}` | `data:video/mpeg;base64, ${string}` | `data:application/vnd.apple.installer+xml;base64, ${string}` | `data:application/x-ndjson;base64, ${string}` | `data:application/vnd.oasis.opendocument.presentation;base64, ${string}` | `data:application/vnd.oasis.opendocument.spreadsheet;base64, ${string}` | `data:application/vnd.oasis.opendocument.text;base64, ${string}` | `data:audio/ogg;base64, ${string}` | `data:video/ogg;base64, ${string}` | `data:application/ogg;base64, ${string}` | `data:font/otf;base64, ${string}` | `data:image/png;base64, ${string}` | `data:application/pdf;base64, ${string}` | `data:application/x-httpd-php;base64, ${string}` | `data:application/vnd.apple.pkpass;base64, ${string}` | `data:application/vnd.ms-powerpoint;base64, ${string}` | `data:application/vnd.openxmlformats-officedocument.presentationml.presentation;base64, ${string}` | `data:text/x-python;base64, ${string}` | `data:application/x-python-code;base64, ${string}` | `data:application/vnd.rar;base64, ${string}` | `data:application/rtf;base64, ${string}` | `data:application/x-sh;base64, ${string}` | `data:application/sql;base64, ${string}` | `data:image/svg+xml;base64, ${string}` | `data:application/x-tar;base64, ${string}` | `data:image/tiff;base64, ${string}` | `data:application/toml;base64, ${string}` | `data:model/vnd.usdz+zip;base64, ${string}` | `data:application/vnd.visio;base64, ${string}` | `data:text/vtt;base64, ${string}` | `data:application/wasm;base64, ${string}` | `data:audio/wav;base64, ${string}` | `data:video/webm;base64, ${string}` | `data:image/webp;base64, ${string}` | `data:font/woff;base64, ${string}` | `data:font/woff2;base64, ${string}` | `data:application/xhtml+xml;base64, ${string}` | `data:application/vnd.ms-excel;base64, ${string}` | `data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64, ${string}` | `data:application/xml;base64, ${string}` | `data:application/vnd.mozilla.xul+xml;base64, ${string}` | `data:application/yaml;base64, ${string}` | `data:video/3gpp;base64, ${string}` | `data:video/3gpp2;base64, ${string}` | `data:application/x-7z-compressed;base64, ${string}`;
|
|
396
|
+
readonly extension: "aac" | "abw" | "aces" | "apng" | "arc" | "avci" | "avif" | "avi" | "azw" | "bin" | "bmp" | "bz" | "bz2" | "cda" | "cjs" | "csh" | "css" | "csv" | "doc" | "docx" | "dpx" | "emf" | "eot" | "epub" | "gif" | "glb" | "gltf" | "gz" | "hjif" | "hmpg" | "htm" | "html" | "ico" | "ics" | "ivs" | "jar" | "jpeg" | "jpg" | "js" | "json" | "jsonld" | "ktx" | "ktx2" | "m3u8" | "m4a" | "m4v" | "md" | "mdx" | "mid" | "midi" | "mjs" | "mp3" | "mp4" | "mpeg" | "mpkg" | "ndjson" | "obj" | "odp" | "ods" | "odt" | "oga" | "ogg" | "ogv" | "ogx" | "opus" | "otf" | "png" | "pdf" | "php" | "pkpass" | "ppt" | "pptx" | "py" | "pyc" | "rar" | "rtf" | "sh" | "sql" | "svg" | "tar" | "tif" | "tiff" | "toml" | "ts" | "ttf" | "txt" | "usdz" | "vsd" | "vtt" | "wasm" | "wav" | "weba" | "webp" | "woff" | "woff2" | "xhtml" | "xls" | "xlsx" | "xml" | "xul" | "yaml" | "yml" | "zip" | "3gp" | "3g2" | "7z";
|
|
387
397
|
}>;
|
|
388
398
|
assetToBufferView<const T extends string>(path: T): Promise<{
|
|
389
399
|
readonly b64encodedData: string;
|
|
390
|
-
readonly extension: "aac" | "abw" | "aces" | "apng" | "arc" | "avci" | "avif" | "avi" | "azw" | "bin" | "bmp" | "bz" | "bz2" | "cda" | "cjs" | "csh" | "css" | "csv" | "doc" | "docx" | "dpx" | "emf" | "eot" | "epub" | "gif" | "glb" | "gltf" | "gz" | "hjif" | "hmpg" | "htm" | "html" | "ico" | "ics" | "ivs" | "jar" | "jpeg" | "jpg" | "js" | "json" | "jsonld" | "m3u8" | "m4a" | "m4v" | "md" | "mdx" | "mid" | "midi" | "mjs" | "mp3" | "mp4" | "mpeg" | "mpkg" | "ndjson" | "obj" | "odp" | "ods" | "odt" | "oga" | "ogg" | "ogv" | "ogx" | "opus" | "otf" | "png" | "pdf" | "php" | "pkpass" | "ppt" | "pptx" | "py" | "pyc" | "rar" | "rtf" | "sh" | "sql" | "svg" | "tar" | "tif" | "tiff" | "toml" | "ts" | "ttf" | "txt" | "usdz" | "vsd" | "vtt" | "wasm" | "wav" | "weba" | "webp" | "woff" | "woff2" | "xhtml" | "xls" | "xlsx" | "xml" | "xul" | "yaml" | "yml" | "zip" | "3gp" | "3g2" | "7z";
|
|
400
|
+
readonly extension: "aac" | "abw" | "aces" | "apng" | "arc" | "avci" | "avif" | "avi" | "azw" | "bin" | "bmp" | "bz" | "bz2" | "cda" | "cjs" | "csh" | "css" | "csv" | "doc" | "docx" | "dpx" | "emf" | "eot" | "epub" | "gif" | "glb" | "gltf" | "gz" | "hjif" | "hmpg" | "htm" | "html" | "ico" | "ics" | "ivs" | "jar" | "jpeg" | "jpg" | "js" | "json" | "jsonld" | "ktx" | "ktx2" | "m3u8" | "m4a" | "m4v" | "md" | "mdx" | "mid" | "midi" | "mjs" | "mp3" | "mp4" | "mpeg" | "mpkg" | "ndjson" | "obj" | "odp" | "ods" | "odt" | "oga" | "ogg" | "ogv" | "ogx" | "opus" | "otf" | "png" | "pdf" | "php" | "pkpass" | "ppt" | "pptx" | "py" | "pyc" | "rar" | "rtf" | "sh" | "sql" | "svg" | "tar" | "tif" | "tiff" | "toml" | "ts" | "ttf" | "txt" | "usdz" | "vsd" | "vtt" | "wasm" | "wav" | "weba" | "webp" | "woff" | "woff2" | "xhtml" | "xls" | "xlsx" | "xml" | "xul" | "yaml" | "yml" | "zip" | "3gp" | "3g2" | "7z";
|
|
391
401
|
}>;
|
|
392
402
|
formatHelper<const T extends string>(f: T): string;
|
|
393
403
|
range(from: number, to: number): number[];
|
package/dist/fs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import expand from 'dotenv-expand';
|
|
2
2
|
import sharp from 'sharp';
|
|
3
|
-
import { RemoveFields, Unenumerate, ReadDirOptions, ExecuteCommandProps, MkDirSyncOptions, WriteStreamDataShape, WriteStreamOptions, WriteFileAsyncDataUnion, WriteFileAsyncOptions, ParsedUrlInfo } from '../types/index.js';
|
|
3
|
+
import { RemoveFields, Unenumerate, ReadDirOptions, ExecuteCommandProps, MkDirSyncOptions, WriteStreamDataShape, WriteStreamOptions, WriteFileAsyncDataUnion, WriteFileAsyncOptions, RmDirOptions, ParsedUrlInfo } from '../types/index.js';
|
|
4
4
|
import 'stream';
|
|
5
5
|
import 'buffer';
|
|
6
6
|
|
|
@@ -47,6 +47,10 @@ declare class Fs {
|
|
|
47
47
|
generateDirIfDNE<const T extends string>(path: T, options?: MkDirSyncOptions): string | undefined;
|
|
48
48
|
withWs<const T extends string>(path: T, data: WriteStreamDataShape, options?: WriteStreamOptions): string | boolean | undefined;
|
|
49
49
|
writeFileAsync: <const T extends string>(path: T, data: WriteFileAsyncDataUnion, options?: WriteFileAsyncOptions) => Promise<string | void>;
|
|
50
|
+
dirExists<const T extends string>(dir: T): boolean;
|
|
51
|
+
unlink<const P extends string>(path: P): Promise<void>;
|
|
52
|
+
rmdir<const D extends string>(dir: D, options?: RmDirOptions): Promise<void>;
|
|
53
|
+
rm<const D extends string>(dir: D): void;
|
|
50
54
|
fileToBuffer: <const T extends string>(path: T) => Buffer<ArrayBuffer>;
|
|
51
55
|
dirContainsDir<const From extends string, const To extends string>(readDir: From, targetDir: To, options?: ReadDirOptions): boolean;
|
|
52
56
|
isServerSide(): boolean;
|
|
@@ -104,6 +108,8 @@ declare class Fs {
|
|
|
104
108
|
readonly js: "application/node" | "text/javascript";
|
|
105
109
|
readonly json: "application/json";
|
|
106
110
|
readonly jsonld: "application/ld+json";
|
|
111
|
+
readonly ktx: "image/ktx";
|
|
112
|
+
readonly ktx2: "image/ktx2";
|
|
107
113
|
readonly m3u8: "application/vnd.apple.mpegurl";
|
|
108
114
|
readonly m4a: "audio/mp4";
|
|
109
115
|
readonly m4v: "video/mp4";
|
|
@@ -211,6 +217,8 @@ declare class Fs {
|
|
|
211
217
|
readonly js: "application/node" | "text/javascript";
|
|
212
218
|
readonly json: "application/json";
|
|
213
219
|
readonly jsonld: "application/ld+json";
|
|
220
|
+
readonly ktx: "image/ktx";
|
|
221
|
+
readonly ktx2: "image/ktx2";
|
|
214
222
|
readonly m3u8: "application/vnd.apple.mpegurl";
|
|
215
223
|
readonly m4a: "audio/mp4";
|
|
216
224
|
readonly m4v: "video/mp4";
|
|
@@ -317,6 +325,8 @@ declare class Fs {
|
|
|
317
325
|
readonly js: "application/node" | "text/javascript";
|
|
318
326
|
readonly json: "application/json";
|
|
319
327
|
readonly jsonld: "application/ld+json";
|
|
328
|
+
readonly ktx: "image/ktx";
|
|
329
|
+
readonly ktx2: "image/ktx2";
|
|
320
330
|
readonly m3u8: "application/vnd.apple.mpegurl";
|
|
321
331
|
readonly m4a: "audio/mp4";
|
|
322
332
|
readonly m4v: "video/mp4";
|
|
@@ -382,12 +392,12 @@ declare class Fs {
|
|
|
382
392
|
readonly "7z": "application/x-7z-compressed";
|
|
383
393
|
}[T];
|
|
384
394
|
assetToBuffer<const T extends string>(path: T): Promise<{
|
|
385
|
-
readonly b64encodedData: `data:application/node;base64, ${string}` | `data:text/javascript;base64, ${string}` | `data:application/x-gzip;base64, ${string}` | `data:application/gzip;base64, ${string}` | `data:application/octet-stream;base64, ${string}` | `data:text/plain;base64, ${string}` | `data:model/obj;base64, ${string}` | `data:text/typescript;base64, ${string}` | `data:video/mp2t;base64, ${string}` | `data:video/vnd.dlna.mpeg-tts;base64, ${string}` | `data:application/font-sfnt;base64, ${string}` | `data:font/ttf;base64, ${string}` | `data:application/zip;base64, ${string}` | `data:application/x-zip-compressed;base64, ${string}` | `data:audio/aac;base64, ${string}` | `data:application/x-abiword;base64, ${string}` | `data:image/aces;base64, ${string}` | `data:image/apng;base64, ${string}` | `data:application/x-freearc;base64, ${string}` | `data:image/avci;base64, ${string}` | `data:image/avif;base64, ${string}` | `data:video/x-msvideo;base64, ${string}` | `data:application/vnd.amazon.ebook;base64, ${string}` | `data:image/bmp;base64, ${string}` | `data:application/x-bzip;base64, ${string}` | `data:application/x-bzip2;base64, ${string}` | `data:application/x-cdf;base64, ${string}` | `data:application/x-csh;base64, ${string}` | `data:text/css;base64, ${string}` | `data:text/csv;base64, ${string}` | `data:application/msword;base64, ${string}` | `data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64, ${string}` | `data:image/dpx;base64, ${string}` | `data:image/emf;base64, ${string}` | `data:application/vnd.ms-fontobject;base64, ${string}` | `data:application/epub+zip;base64, ${string}` | `data:image/gif;base64, ${string}` | `data:model/gltf-binary;base64, ${string}` | `data:model/gltf+json;base64, ${string}` | `data:haptics/hjif;base64, ${string}` | `data:haptics/hmpg;base64, ${string}` | `data:text/html;base64, ${string}` | `data:image/vnd.microsoft.icon;base64, ${string}` | `data:text/calendar;base64, ${string}` | `data:haptics/ivs;base64, ${string}` | `data:application/java-archive;base64, ${string}` | `data:image/jpeg;base64, ${string}` | `data:application/json;base64, ${string}` | `data:application/ld+json;base64, ${string}` | `data:application/vnd.apple.mpegurl;base64, ${string}` | `data:audio/mp4;base64, ${string}` | `data:video/mp4;base64, ${string}` | `data:text/markdown;base64, ${string}` | `data:application/x-mdx;base64, ${string}` | `data:audio/midi;base64, ${string}` | `data:audio/x-midi;base64, ${string}` | `data:audio/mpeg;base64, ${string}` | `data:video/mpeg;base64, ${string}` | `data:application/vnd.apple.installer+xml;base64, ${string}` | `data:application/x-ndjson;base64, ${string}` | `data:application/vnd.oasis.opendocument.presentation;base64, ${string}` | `data:application/vnd.oasis.opendocument.spreadsheet;base64, ${string}` | `data:application/vnd.oasis.opendocument.text;base64, ${string}` | `data:audio/ogg;base64, ${string}` | `data:video/ogg;base64, ${string}` | `data:application/ogg;base64, ${string}` | `data:font/otf;base64, ${string}` | `data:image/png;base64, ${string}` | `data:application/pdf;base64, ${string}` | `data:application/x-httpd-php;base64, ${string}` | `data:application/vnd.apple.pkpass;base64, ${string}` | `data:application/vnd.ms-powerpoint;base64, ${string}` | `data:application/vnd.openxmlformats-officedocument.presentationml.presentation;base64, ${string}` | `data:text/x-python;base64, ${string}` | `data:application/x-python-code;base64, ${string}` | `data:application/vnd.rar;base64, ${string}` | `data:application/rtf;base64, ${string}` | `data:application/x-sh;base64, ${string}` | `data:application/sql;base64, ${string}` | `data:image/svg+xml;base64, ${string}` | `data:application/x-tar;base64, ${string}` | `data:image/tiff;base64, ${string}` | `data:application/toml;base64, ${string}` | `data:model/vnd.usdz+zip;base64, ${string}` | `data:application/vnd.visio;base64, ${string}` | `data:text/vtt;base64, ${string}` | `data:application/wasm;base64, ${string}` | `data:audio/wav;base64, ${string}` | `data:video/webm;base64, ${string}` | `data:image/webp;base64, ${string}` | `data:font/woff;base64, ${string}` | `data:font/woff2;base64, ${string}` | `data:application/xhtml+xml;base64, ${string}` | `data:application/vnd.ms-excel;base64, ${string}` | `data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64, ${string}` | `data:application/xml;base64, ${string}` | `data:application/vnd.mozilla.xul+xml;base64, ${string}` | `data:application/yaml;base64, ${string}` | `data:video/3gpp;base64, ${string}` | `data:video/3gpp2;base64, ${string}` | `data:application/x-7z-compressed;base64, ${string}`;
|
|
386
|
-
readonly extension: "aac" | "abw" | "aces" | "apng" | "arc" | "avci" | "avif" | "avi" | "azw" | "bin" | "bmp" | "bz" | "bz2" | "cda" | "cjs" | "csh" | "css" | "csv" | "doc" | "docx" | "dpx" | "emf" | "eot" | "epub" | "gif" | "glb" | "gltf" | "gz" | "hjif" | "hmpg" | "htm" | "html" | "ico" | "ics" | "ivs" | "jar" | "jpeg" | "jpg" | "js" | "json" | "jsonld" | "m3u8" | "m4a" | "m4v" | "md" | "mdx" | "mid" | "midi" | "mjs" | "mp3" | "mp4" | "mpeg" | "mpkg" | "ndjson" | "obj" | "odp" | "ods" | "odt" | "oga" | "ogg" | "ogv" | "ogx" | "opus" | "otf" | "png" | "pdf" | "php" | "pkpass" | "ppt" | "pptx" | "py" | "pyc" | "rar" | "rtf" | "sh" | "sql" | "svg" | "tar" | "tif" | "tiff" | "toml" | "ts" | "ttf" | "txt" | "usdz" | "vsd" | "vtt" | "wasm" | "wav" | "weba" | "webp" | "woff" | "woff2" | "xhtml" | "xls" | "xlsx" | "xml" | "xul" | "yaml" | "yml" | "zip" | "3gp" | "3g2" | "7z";
|
|
395
|
+
readonly b64encodedData: `data:application/node;base64, ${string}` | `data:text/javascript;base64, ${string}` | `data:application/x-gzip;base64, ${string}` | `data:application/gzip;base64, ${string}` | `data:application/octet-stream;base64, ${string}` | `data:text/plain;base64, ${string}` | `data:model/obj;base64, ${string}` | `data:text/typescript;base64, ${string}` | `data:video/mp2t;base64, ${string}` | `data:video/vnd.dlna.mpeg-tts;base64, ${string}` | `data:application/font-sfnt;base64, ${string}` | `data:font/ttf;base64, ${string}` | `data:application/zip;base64, ${string}` | `data:application/x-zip-compressed;base64, ${string}` | `data:audio/aac;base64, ${string}` | `data:application/x-abiword;base64, ${string}` | `data:image/aces;base64, ${string}` | `data:image/apng;base64, ${string}` | `data:application/x-freearc;base64, ${string}` | `data:image/avci;base64, ${string}` | `data:image/avif;base64, ${string}` | `data:video/x-msvideo;base64, ${string}` | `data:application/vnd.amazon.ebook;base64, ${string}` | `data:image/bmp;base64, ${string}` | `data:application/x-bzip;base64, ${string}` | `data:application/x-bzip2;base64, ${string}` | `data:application/x-cdf;base64, ${string}` | `data:application/x-csh;base64, ${string}` | `data:text/css;base64, ${string}` | `data:text/csv;base64, ${string}` | `data:application/msword;base64, ${string}` | `data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64, ${string}` | `data:image/dpx;base64, ${string}` | `data:image/emf;base64, ${string}` | `data:application/vnd.ms-fontobject;base64, ${string}` | `data:application/epub+zip;base64, ${string}` | `data:image/gif;base64, ${string}` | `data:model/gltf-binary;base64, ${string}` | `data:model/gltf+json;base64, ${string}` | `data:haptics/hjif;base64, ${string}` | `data:haptics/hmpg;base64, ${string}` | `data:text/html;base64, ${string}` | `data:image/vnd.microsoft.icon;base64, ${string}` | `data:text/calendar;base64, ${string}` | `data:haptics/ivs;base64, ${string}` | `data:application/java-archive;base64, ${string}` | `data:image/jpeg;base64, ${string}` | `data:application/json;base64, ${string}` | `data:application/ld+json;base64, ${string}` | `data:image/ktx;base64, ${string}` | `data:image/ktx2;base64, ${string}` | `data:application/vnd.apple.mpegurl;base64, ${string}` | `data:audio/mp4;base64, ${string}` | `data:video/mp4;base64, ${string}` | `data:text/markdown;base64, ${string}` | `data:application/x-mdx;base64, ${string}` | `data:audio/midi;base64, ${string}` | `data:audio/x-midi;base64, ${string}` | `data:audio/mpeg;base64, ${string}` | `data:video/mpeg;base64, ${string}` | `data:application/vnd.apple.installer+xml;base64, ${string}` | `data:application/x-ndjson;base64, ${string}` | `data:application/vnd.oasis.opendocument.presentation;base64, ${string}` | `data:application/vnd.oasis.opendocument.spreadsheet;base64, ${string}` | `data:application/vnd.oasis.opendocument.text;base64, ${string}` | `data:audio/ogg;base64, ${string}` | `data:video/ogg;base64, ${string}` | `data:application/ogg;base64, ${string}` | `data:font/otf;base64, ${string}` | `data:image/png;base64, ${string}` | `data:application/pdf;base64, ${string}` | `data:application/x-httpd-php;base64, ${string}` | `data:application/vnd.apple.pkpass;base64, ${string}` | `data:application/vnd.ms-powerpoint;base64, ${string}` | `data:application/vnd.openxmlformats-officedocument.presentationml.presentation;base64, ${string}` | `data:text/x-python;base64, ${string}` | `data:application/x-python-code;base64, ${string}` | `data:application/vnd.rar;base64, ${string}` | `data:application/rtf;base64, ${string}` | `data:application/x-sh;base64, ${string}` | `data:application/sql;base64, ${string}` | `data:image/svg+xml;base64, ${string}` | `data:application/x-tar;base64, ${string}` | `data:image/tiff;base64, ${string}` | `data:application/toml;base64, ${string}` | `data:model/vnd.usdz+zip;base64, ${string}` | `data:application/vnd.visio;base64, ${string}` | `data:text/vtt;base64, ${string}` | `data:application/wasm;base64, ${string}` | `data:audio/wav;base64, ${string}` | `data:video/webm;base64, ${string}` | `data:image/webp;base64, ${string}` | `data:font/woff;base64, ${string}` | `data:font/woff2;base64, ${string}` | `data:application/xhtml+xml;base64, ${string}` | `data:application/vnd.ms-excel;base64, ${string}` | `data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64, ${string}` | `data:application/xml;base64, ${string}` | `data:application/vnd.mozilla.xul+xml;base64, ${string}` | `data:application/yaml;base64, ${string}` | `data:video/3gpp;base64, ${string}` | `data:video/3gpp2;base64, ${string}` | `data:application/x-7z-compressed;base64, ${string}`;
|
|
396
|
+
readonly extension: "aac" | "abw" | "aces" | "apng" | "arc" | "avci" | "avif" | "avi" | "azw" | "bin" | "bmp" | "bz" | "bz2" | "cda" | "cjs" | "csh" | "css" | "csv" | "doc" | "docx" | "dpx" | "emf" | "eot" | "epub" | "gif" | "glb" | "gltf" | "gz" | "hjif" | "hmpg" | "htm" | "html" | "ico" | "ics" | "ivs" | "jar" | "jpeg" | "jpg" | "js" | "json" | "jsonld" | "ktx" | "ktx2" | "m3u8" | "m4a" | "m4v" | "md" | "mdx" | "mid" | "midi" | "mjs" | "mp3" | "mp4" | "mpeg" | "mpkg" | "ndjson" | "obj" | "odp" | "ods" | "odt" | "oga" | "ogg" | "ogv" | "ogx" | "opus" | "otf" | "png" | "pdf" | "php" | "pkpass" | "ppt" | "pptx" | "py" | "pyc" | "rar" | "rtf" | "sh" | "sql" | "svg" | "tar" | "tif" | "tiff" | "toml" | "ts" | "ttf" | "txt" | "usdz" | "vsd" | "vtt" | "wasm" | "wav" | "weba" | "webp" | "woff" | "woff2" | "xhtml" | "xls" | "xlsx" | "xml" | "xul" | "yaml" | "yml" | "zip" | "3gp" | "3g2" | "7z";
|
|
387
397
|
}>;
|
|
388
398
|
assetToBufferView<const T extends string>(path: T): Promise<{
|
|
389
399
|
readonly b64encodedData: string;
|
|
390
|
-
readonly extension: "aac" | "abw" | "aces" | "apng" | "arc" | "avci" | "avif" | "avi" | "azw" | "bin" | "bmp" | "bz" | "bz2" | "cda" | "cjs" | "csh" | "css" | "csv" | "doc" | "docx" | "dpx" | "emf" | "eot" | "epub" | "gif" | "glb" | "gltf" | "gz" | "hjif" | "hmpg" | "htm" | "html" | "ico" | "ics" | "ivs" | "jar" | "jpeg" | "jpg" | "js" | "json" | "jsonld" | "m3u8" | "m4a" | "m4v" | "md" | "mdx" | "mid" | "midi" | "mjs" | "mp3" | "mp4" | "mpeg" | "mpkg" | "ndjson" | "obj" | "odp" | "ods" | "odt" | "oga" | "ogg" | "ogv" | "ogx" | "opus" | "otf" | "png" | "pdf" | "php" | "pkpass" | "ppt" | "pptx" | "py" | "pyc" | "rar" | "rtf" | "sh" | "sql" | "svg" | "tar" | "tif" | "tiff" | "toml" | "ts" | "ttf" | "txt" | "usdz" | "vsd" | "vtt" | "wasm" | "wav" | "weba" | "webp" | "woff" | "woff2" | "xhtml" | "xls" | "xlsx" | "xml" | "xul" | "yaml" | "yml" | "zip" | "3gp" | "3g2" | "7z";
|
|
400
|
+
readonly extension: "aac" | "abw" | "aces" | "apng" | "arc" | "avci" | "avif" | "avi" | "azw" | "bin" | "bmp" | "bz" | "bz2" | "cda" | "cjs" | "csh" | "css" | "csv" | "doc" | "docx" | "dpx" | "emf" | "eot" | "epub" | "gif" | "glb" | "gltf" | "gz" | "hjif" | "hmpg" | "htm" | "html" | "ico" | "ics" | "ivs" | "jar" | "jpeg" | "jpg" | "js" | "json" | "jsonld" | "ktx" | "ktx2" | "m3u8" | "m4a" | "m4v" | "md" | "mdx" | "mid" | "midi" | "mjs" | "mp3" | "mp4" | "mpeg" | "mpkg" | "ndjson" | "obj" | "odp" | "ods" | "odt" | "oga" | "ogg" | "ogv" | "ogx" | "opus" | "otf" | "png" | "pdf" | "php" | "pkpass" | "ppt" | "pptx" | "py" | "pyc" | "rar" | "rtf" | "sh" | "sql" | "svg" | "tar" | "tif" | "tiff" | "toml" | "ts" | "ttf" | "txt" | "usdz" | "vsd" | "vtt" | "wasm" | "wav" | "weba" | "webp" | "woff" | "woff2" | "xhtml" | "xls" | "xlsx" | "xml" | "xul" | "yaml" | "yml" | "zip" | "3gp" | "3g2" | "7z";
|
|
391
401
|
}>;
|
|
392
402
|
formatHelper<const T extends string>(f: T): string;
|
|
393
403
|
range(from: number, to: number): number[];
|
package/dist/fs/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -190,7 +190,8 @@ var Fs = class {
|
|
|
190
190
|
return { ...this.omitFields(targ, keys) };
|
|
191
191
|
}
|
|
192
192
|
exists(target) {
|
|
193
|
-
if (!/\//gm.test(target))
|
|
193
|
+
if (!/\//gm.test(target))
|
|
194
|
+
return import_fs.default.existsSync((0, import_path.resolve)((0, import_path.join)(this.cwd, target)));
|
|
194
195
|
return import_fs.default.existsSync((0, import_path.relative)(this.cwd ?? process.cwd(), target));
|
|
195
196
|
}
|
|
196
197
|
arrToArrOfArrs = /* @__PURE__ */ __name(({
|
|
@@ -235,18 +236,23 @@ var Fs = class {
|
|
|
235
236
|
}
|
|
236
237
|
readDir(path, options) {
|
|
237
238
|
if (this.isRootPathTargeted(path)) {
|
|
238
|
-
return this.handleBuffStrArrUnion(
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
239
|
+
return this.handleBuffStrArrUnion(
|
|
240
|
+
import_fs.default.readdirSync((0, import_path.resolve)((0, import_path.join)(this.cwd, "./")), options)
|
|
241
|
+
);
|
|
242
|
+
} else
|
|
243
|
+
return this.handleBuffStrArrUnion(
|
|
244
|
+
import_fs.default.readdirSync(
|
|
245
|
+
(0, import_path.relative)(this.cwd ??= process.cwd(), path),
|
|
246
|
+
options
|
|
247
|
+
)
|
|
248
|
+
);
|
|
245
249
|
}
|
|
246
250
|
executeCommand = /* @__PURE__ */ __name(({
|
|
247
251
|
command,
|
|
248
252
|
...options
|
|
249
|
-
}) => Buffer.from((0, import_child_process.execSync)(command, { ...options }).toJSON().data).toString(
|
|
253
|
+
}) => Buffer.from((0, import_child_process.execSync)(command, { ...options }).toJSON().data).toString(
|
|
254
|
+
"utf-8"
|
|
255
|
+
), "executeCommand");
|
|
250
256
|
fileGenTimestamp(d) {
|
|
251
257
|
const date = d.toISOString();
|
|
252
258
|
return `/* file-autogenerated by @d0paminedriven/fs on ${date.split(/([T])/gm)?.[0]} at ${date.split(/([T])/gm)[2]?.split(/([Z])/gm)?.[0]} UTC */`;
|
|
@@ -258,7 +264,8 @@ var Fs = class {
|
|
|
258
264
|
return this.fileGenTimestamp(d).replace("/*", "<!--").replace("*/", "-->");
|
|
259
265
|
}
|
|
260
266
|
existsSync(path) {
|
|
261
|
-
if (!/\//gm.test(path))
|
|
267
|
+
if (!/\//gm.test(path))
|
|
268
|
+
return import_fs.default.existsSync((0, import_path.resolve)((0, import_path.join)(this.cwd, path)));
|
|
262
269
|
return import_fs.default.existsSync((0, import_path.relative)(this.cwd ?? process.cwd(), path));
|
|
263
270
|
}
|
|
264
271
|
pathHandler(path) {
|
|
@@ -320,6 +327,41 @@ var Fs = class {
|
|
|
320
327
|
);
|
|
321
328
|
}
|
|
322
329
|
}, "writeFileAsync");
|
|
330
|
+
dirExists(dir) {
|
|
331
|
+
const resolved = (0, import_path.relative)(this.cwd, dir);
|
|
332
|
+
try {
|
|
333
|
+
return import_fs.default.statSync(resolved).isDirectory();
|
|
334
|
+
} catch {
|
|
335
|
+
return false;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
async unlink(path) {
|
|
339
|
+
if (this.existsSync(path)) {
|
|
340
|
+
return await import_promises.default.unlink((0, import_path.relative)(this.cwd, path));
|
|
341
|
+
} else {
|
|
342
|
+
throw new Error(`input path ${path} does not exist`);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
async rmdir(dir, options) {
|
|
346
|
+
const resolved = (0, import_path.relative)(this.cwd, dir);
|
|
347
|
+
if (this.dirExists(dir)) {
|
|
348
|
+
return import_promises.default.rmdir((0, import_path.relative)(this.cwd, dir), options);
|
|
349
|
+
} else {
|
|
350
|
+
throw new Error(`directory ${resolved} does not exist`);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
rm(dir) {
|
|
354
|
+
const resolved = (0, import_path.resolve)(this.cwd, dir);
|
|
355
|
+
if (this.dirExists(dir)) {
|
|
356
|
+
return import_fs.default.rm(resolved, { force: true, recursive: true }, (err) => {
|
|
357
|
+
if (err?.message) {
|
|
358
|
+
console.error(err?.message);
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
} else {
|
|
362
|
+
throw new Error(`directory ${resolved} does not exist`);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
323
365
|
fileToBuffer = /* @__PURE__ */ __name((path) => Buffer.from(
|
|
324
366
|
import_fs.default.readFileSync((0, import_path.relative)(this.cwd ?? process.cwd(), path)).toJSON().data
|
|
325
367
|
), "fileToBuffer");
|
|
@@ -434,6 +476,8 @@ var Fs = class {
|
|
|
434
476
|
js: this.jsVal,
|
|
435
477
|
json: "application/json",
|
|
436
478
|
jsonld: "application/ld+json",
|
|
479
|
+
ktx: "image/ktx",
|
|
480
|
+
ktx2: "image/ktx2",
|
|
437
481
|
m3u8: "application/vnd.apple.mpegurl",
|
|
438
482
|
m4a: "audio/mp4",
|
|
439
483
|
m4v: "video/mp4",
|
|
@@ -526,7 +570,9 @@ var Fs = class {
|
|
|
526
570
|
p.pathname.split(/\//g).reverse()[0] ?? ""
|
|
527
571
|
);
|
|
528
572
|
if (doesUrlPathContainFileExtension === false)
|
|
529
|
-
console.warn(
|
|
573
|
+
console.warn(
|
|
574
|
+
`no file extension detected in input url ${path}, attempting fetch`
|
|
575
|
+
);
|
|
530
576
|
const response = await fetch(path);
|
|
531
577
|
if (!response.ok) {
|
|
532
578
|
throw new Error(`Failed to fetch asset: ${response.statusText}`);
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Fs } from './fs/index.cjs';
|
|
2
|
-
export { Abortable, ArrayBufferView, ArrayOrReadOnlyArray, BashEnv, BufferEncodingUnion, CoercionUnion, CommonExecOptions, CommonOptions, ConditionalPromise, ConditionalToRequired, Depth, Dict, Equal, ExcludeFieldEnumerable, ExecSyncOptions, ExecSyncOptionsWithBufferEncoding, ExecSyncOptionsWithStringEncoding, ExecuteCommandProps, Expect, Extends, FieldToConditionallyNever, IOType, InferDepth, InjectScriptsProps, MkDirOptions, MkDirSyncOptions, MkDirSyncProps, Mode, ObjEncodingOptions, OmitSrc, OpenMode, ParsedUrlInfo, ProcessEnv, ProcessEnvOptions, ReadDirOptions, ReadDirProps, RemoveFields, RequiredToConditional, Signals, StdioOptions, TypedArray, Unenumerate, UnwrapPromise, Without, WriteFileAsyncDataUnion, WriteFileAsyncOptions, WriteFileAsyncProps, WriteStreamDataShape, WriteStreamOptions, WriteStreamProps, XOR } from './types/index.cjs';
|
|
2
|
+
export { Abortable, ArrayBufferView, ArrayOrReadOnlyArray, BashEnv, BufferEncodingUnion, CoercionUnion, CommonExecOptions, CommonOptions, ConditionalPromise, ConditionalToRequired, Depth, Dict, Equal, ExcludeFieldEnumerable, ExecSyncOptions, ExecSyncOptionsWithBufferEncoding, ExecSyncOptionsWithStringEncoding, ExecuteCommandProps, Expect, Extends, FieldToConditionallyNever, IOType, InferDepth, InjectScriptsProps, MkDirOptions, MkDirSyncOptions, MkDirSyncProps, Mode, ObjEncodingOptions, OmitSrc, OpenMode, ParsedUrlInfo, ProcessEnv, ProcessEnvOptions, ReadDirOptions, ReadDirProps, RemoveFields, RequiredToConditional, RmDirOptions, RmDirProps, Signals, StdioOptions, TypedArray, Unenumerate, UnwrapPromise, Without, WriteFileAsyncDataUnion, WriteFileAsyncOptions, WriteFileAsyncProps, WriteStreamDataShape, WriteStreamOptions, WriteStreamProps, XOR } from './types/index.cjs';
|
|
3
3
|
import 'dotenv-expand';
|
|
4
4
|
import 'sharp';
|
|
5
5
|
import 'stream';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Fs } from './fs/index.js';
|
|
2
|
-
export { Abortable, ArrayBufferView, ArrayOrReadOnlyArray, BashEnv, BufferEncodingUnion, CoercionUnion, CommonExecOptions, CommonOptions, ConditionalPromise, ConditionalToRequired, Depth, Dict, Equal, ExcludeFieldEnumerable, ExecSyncOptions, ExecSyncOptionsWithBufferEncoding, ExecSyncOptionsWithStringEncoding, ExecuteCommandProps, Expect, Extends, FieldToConditionallyNever, IOType, InferDepth, InjectScriptsProps, MkDirOptions, MkDirSyncOptions, MkDirSyncProps, Mode, ObjEncodingOptions, OmitSrc, OpenMode, ParsedUrlInfo, ProcessEnv, ProcessEnvOptions, ReadDirOptions, ReadDirProps, RemoveFields, RequiredToConditional, Signals, StdioOptions, TypedArray, Unenumerate, UnwrapPromise, Without, WriteFileAsyncDataUnion, WriteFileAsyncOptions, WriteFileAsyncProps, WriteStreamDataShape, WriteStreamOptions, WriteStreamProps, XOR } from './types/index.js';
|
|
2
|
+
export { Abortable, ArrayBufferView, ArrayOrReadOnlyArray, BashEnv, BufferEncodingUnion, CoercionUnion, CommonExecOptions, CommonOptions, ConditionalPromise, ConditionalToRequired, Depth, Dict, Equal, ExcludeFieldEnumerable, ExecSyncOptions, ExecSyncOptionsWithBufferEncoding, ExecSyncOptionsWithStringEncoding, ExecuteCommandProps, Expect, Extends, FieldToConditionallyNever, IOType, InferDepth, InjectScriptsProps, MkDirOptions, MkDirSyncOptions, MkDirSyncProps, Mode, ObjEncodingOptions, OmitSrc, OpenMode, ParsedUrlInfo, ProcessEnv, ProcessEnvOptions, ReadDirOptions, ReadDirProps, RemoveFields, RequiredToConditional, RmDirOptions, RmDirProps, Signals, StdioOptions, TypedArray, Unenumerate, UnwrapPromise, Without, WriteFileAsyncDataUnion, WriteFileAsyncOptions, WriteFileAsyncProps, WriteStreamDataShape, WriteStreamOptions, WriteStreamProps, XOR } from './types/index.js';
|
|
3
3
|
import 'dotenv-expand';
|
|
4
4
|
import 'sharp';
|
|
5
5
|
import 'stream';
|
package/dist/index.js
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -118,6 +118,36 @@ type WriteFileAsyncProps<T extends string = string> = {
|
|
|
118
118
|
flag?: OpenMode | undefined;
|
|
119
119
|
} & Abortable) | BufferEncodingUnion | null;
|
|
120
120
|
};
|
|
121
|
+
type RmDirOptions = {
|
|
122
|
+
/**
|
|
123
|
+
* If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
|
|
124
|
+
* `EPERM` error is encountered, Node.js will retry the operation with a linear
|
|
125
|
+
* backoff wait of `retryDelay` ms longer on each try. This option represents the
|
|
126
|
+
* number of retries. This option is ignored if the `recursive` option is not
|
|
127
|
+
* `true`.
|
|
128
|
+
* @default 0
|
|
129
|
+
*/
|
|
130
|
+
maxRetries?: number | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning
|
|
133
|
+
* `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file.
|
|
134
|
+
* Use `fs.rm(path, { recursive: true, force: true })` instead.
|
|
135
|
+
*
|
|
136
|
+
* If `true`, perform a recursive directory removal. In
|
|
137
|
+
* recursive mode, operations are retried on failure.
|
|
138
|
+
* @default false
|
|
139
|
+
*/
|
|
140
|
+
recursive?: boolean | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* The amount of time in milliseconds to wait between retries.
|
|
143
|
+
* This option is ignored if the `recursive` option is not `true`.
|
|
144
|
+
* @default 100
|
|
145
|
+
*/
|
|
146
|
+
retryDelay?: number | undefined;
|
|
147
|
+
};
|
|
148
|
+
type RmDirProps = {
|
|
149
|
+
options?: RmDirOptions;
|
|
150
|
+
}['options'];
|
|
121
151
|
type ReadDirProps<T extends string> = {
|
|
122
152
|
path: T;
|
|
123
153
|
options?: ReadDirOptions;
|
|
@@ -214,4 +244,4 @@ type ParsedUrlInfo = {
|
|
|
214
244
|
hash: string;
|
|
215
245
|
};
|
|
216
246
|
|
|
217
|
-
export type { Abortable, ArrayBufferView, ArrayOrReadOnlyArray, BashEnv, BufferEncodingUnion, CoercionUnion, CommonExecOptions, CommonOptions, ConditionalPromise, ConditionalToRequired, Depth, Dict, Equal, ExcludeFieldEnumerable, ExecSyncOptions, ExecSyncOptionsWithBufferEncoding, ExecSyncOptionsWithStringEncoding, ExecuteCommandProps, Expect, Extends, FieldToConditionallyNever, IOType, InferDepth, InjectScriptsProps, MkDirOptions, MkDirSyncOptions, MkDirSyncProps, Mode, ObjEncodingOptions, OmitSrc, OpenMode, ParsedUrlInfo, ProcessEnv, ProcessEnvOptions, ReadDirOptions, ReadDirProps, RemoveFields, RequiredToConditional, Signals, StdioOptions, TypedArray, Unenumerate, UnwrapPromise, Without, WriteFileAsyncDataUnion, WriteFileAsyncOptions, WriteFileAsyncProps, WriteStreamDataShape, WriteStreamOptions, WriteStreamProps, XOR };
|
|
247
|
+
export type { Abortable, ArrayBufferView, ArrayOrReadOnlyArray, BashEnv, BufferEncodingUnion, CoercionUnion, CommonExecOptions, CommonOptions, ConditionalPromise, ConditionalToRequired, Depth, Dict, Equal, ExcludeFieldEnumerable, ExecSyncOptions, ExecSyncOptionsWithBufferEncoding, ExecSyncOptionsWithStringEncoding, ExecuteCommandProps, Expect, Extends, FieldToConditionallyNever, IOType, InferDepth, InjectScriptsProps, MkDirOptions, MkDirSyncOptions, MkDirSyncProps, Mode, ObjEncodingOptions, OmitSrc, OpenMode, ParsedUrlInfo, ProcessEnv, ProcessEnvOptions, ReadDirOptions, ReadDirProps, RemoveFields, RequiredToConditional, RmDirOptions, RmDirProps, Signals, StdioOptions, TypedArray, Unenumerate, UnwrapPromise, Without, WriteFileAsyncDataUnion, WriteFileAsyncOptions, WriteFileAsyncProps, WriteStreamDataShape, WriteStreamOptions, WriteStreamProps, XOR };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -118,6 +118,36 @@ type WriteFileAsyncProps<T extends string = string> = {
|
|
|
118
118
|
flag?: OpenMode | undefined;
|
|
119
119
|
} & Abortable) | BufferEncodingUnion | null;
|
|
120
120
|
};
|
|
121
|
+
type RmDirOptions = {
|
|
122
|
+
/**
|
|
123
|
+
* If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
|
|
124
|
+
* `EPERM` error is encountered, Node.js will retry the operation with a linear
|
|
125
|
+
* backoff wait of `retryDelay` ms longer on each try. This option represents the
|
|
126
|
+
* number of retries. This option is ignored if the `recursive` option is not
|
|
127
|
+
* `true`.
|
|
128
|
+
* @default 0
|
|
129
|
+
*/
|
|
130
|
+
maxRetries?: number | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning
|
|
133
|
+
* `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file.
|
|
134
|
+
* Use `fs.rm(path, { recursive: true, force: true })` instead.
|
|
135
|
+
*
|
|
136
|
+
* If `true`, perform a recursive directory removal. In
|
|
137
|
+
* recursive mode, operations are retried on failure.
|
|
138
|
+
* @default false
|
|
139
|
+
*/
|
|
140
|
+
recursive?: boolean | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* The amount of time in milliseconds to wait between retries.
|
|
143
|
+
* This option is ignored if the `recursive` option is not `true`.
|
|
144
|
+
* @default 100
|
|
145
|
+
*/
|
|
146
|
+
retryDelay?: number | undefined;
|
|
147
|
+
};
|
|
148
|
+
type RmDirProps = {
|
|
149
|
+
options?: RmDirOptions;
|
|
150
|
+
}['options'];
|
|
121
151
|
type ReadDirProps<T extends string> = {
|
|
122
152
|
path: T;
|
|
123
153
|
options?: ReadDirOptions;
|
|
@@ -214,4 +244,4 @@ type ParsedUrlInfo = {
|
|
|
214
244
|
hash: string;
|
|
215
245
|
};
|
|
216
246
|
|
|
217
|
-
export type { Abortable, ArrayBufferView, ArrayOrReadOnlyArray, BashEnv, BufferEncodingUnion, CoercionUnion, CommonExecOptions, CommonOptions, ConditionalPromise, ConditionalToRequired, Depth, Dict, Equal, ExcludeFieldEnumerable, ExecSyncOptions, ExecSyncOptionsWithBufferEncoding, ExecSyncOptionsWithStringEncoding, ExecuteCommandProps, Expect, Extends, FieldToConditionallyNever, IOType, InferDepth, InjectScriptsProps, MkDirOptions, MkDirSyncOptions, MkDirSyncProps, Mode, ObjEncodingOptions, OmitSrc, OpenMode, ParsedUrlInfo, ProcessEnv, ProcessEnvOptions, ReadDirOptions, ReadDirProps, RemoveFields, RequiredToConditional, Signals, StdioOptions, TypedArray, Unenumerate, UnwrapPromise, Without, WriteFileAsyncDataUnion, WriteFileAsyncOptions, WriteFileAsyncProps, WriteStreamDataShape, WriteStreamOptions, WriteStreamProps, XOR };
|
|
247
|
+
export type { Abortable, ArrayBufferView, ArrayOrReadOnlyArray, BashEnv, BufferEncodingUnion, CoercionUnion, CommonExecOptions, CommonOptions, ConditionalPromise, ConditionalToRequired, Depth, Dict, Equal, ExcludeFieldEnumerable, ExecSyncOptions, ExecSyncOptionsWithBufferEncoding, ExecSyncOptionsWithStringEncoding, ExecuteCommandProps, Expect, Extends, FieldToConditionallyNever, IOType, InferDepth, InjectScriptsProps, MkDirOptions, MkDirSyncOptions, MkDirSyncProps, Mode, ObjEncodingOptions, OmitSrc, OpenMode, ParsedUrlInfo, ProcessEnv, ProcessEnvOptions, ReadDirOptions, ReadDirProps, RemoveFields, RequiredToConditional, RmDirOptions, RmDirProps, Signals, StdioOptions, TypedArray, Unenumerate, UnwrapPromise, Without, WriteFileAsyncDataUnion, WriteFileAsyncOptions, WriteFileAsyncProps, WriteStreamDataShape, WriteStreamOptions, WriteStreamProps, XOR };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d0paminedriven/fs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "convenient fs helpers",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"sharp": "^0.34.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@microsoft/api-extractor": "^7.52.
|
|
43
|
-
"@swc/core": "^1.11.
|
|
44
|
-
"@swc/wasm": "^1.11.
|
|
45
|
-
"@types/node": "^22.
|
|
42
|
+
"@microsoft/api-extractor": "^7.52.7",
|
|
43
|
+
"@swc/core": "^1.11.24",
|
|
44
|
+
"@swc/wasm": "^1.11.24",
|
|
45
|
+
"@types/node": "^22.15.3",
|
|
46
46
|
"chokidar": "^4.0.3",
|
|
47
47
|
"dotenv-cli": "^8.0.0",
|
|
48
|
-
"dotenv-expand": "^12.0.
|
|
48
|
+
"dotenv-expand": "^12.0.2",
|
|
49
49
|
"eslint": "latest",
|
|
50
50
|
"jiti": "^2.4.2",
|
|
51
51
|
"prettier": "latest",
|