@d0paminedriven/fs 0.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/index.cjs ADDED
@@ -0,0 +1,575 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
+ var __esm = (fn, res) => function __init() {
10
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
11
+ };
12
+ var __commonJS = (cb, mod) => function __require() {
13
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
14
+ };
15
+ var __export = (target, all) => {
16
+ for (var name in all)
17
+ __defProp(target, name, { get: all[name], enumerable: true });
18
+ };
19
+ var __copyProps = (to, from, except, desc) => {
20
+ if (from && typeof from === "object" || typeof from === "function") {
21
+ for (let key of __getOwnPropNames(from))
22
+ if (!__hasOwnProp.call(to, key) && key !== except)
23
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
24
+ }
25
+ return to;
26
+ };
27
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
28
+ // If the importer is in node compatibility mode or this is not an ESM
29
+ // file that has been converted to a CommonJS file using a Babel-
30
+ // compatible transform (i.e. "__esModule" has not been set), then set
31
+ // "default" to the CommonJS "module.exports" for node compatibility.
32
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
33
+ mod
34
+ ));
35
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
+
37
+ // ../../node_modules/tsup/assets/cjs_shims.js
38
+ var init_cjs_shims = __esm({
39
+ "../../node_modules/tsup/assets/cjs_shims.js"() {
40
+ "use strict";
41
+ }
42
+ });
43
+
44
+ // ../../node_modules/dotenv-expand/lib/main.js
45
+ var require_main = __commonJS({
46
+ "../../node_modules/dotenv-expand/lib/main.js"(exports2, module2) {
47
+ "use strict";
48
+ init_cjs_shims();
49
+ function _resolveEscapeSequences(value) {
50
+ return value.replace(/\\\$/g, "$");
51
+ }
52
+ __name(_resolveEscapeSequences, "_resolveEscapeSequences");
53
+ function expandValue(value, processEnv, runningParsed) {
54
+ const env = { ...runningParsed, ...processEnv };
55
+ const regex = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g;
56
+ let result = value;
57
+ let match;
58
+ const seen = /* @__PURE__ */ new Set();
59
+ while ((match = regex.exec(result)) !== null) {
60
+ seen.add(result);
61
+ const [template, bracedExpression, unbracedExpression] = match;
62
+ const expression = bracedExpression || unbracedExpression;
63
+ const opRegex = /(:\+|\+|:-|-)/;
64
+ const opMatch = expression.match(opRegex);
65
+ const splitter = opMatch ? opMatch[0] : null;
66
+ const r = expression.split(splitter);
67
+ let defaultValue;
68
+ let value2;
69
+ const key = r.shift();
70
+ if ([":+", "+"].includes(splitter)) {
71
+ defaultValue = env[key] ? r.join(splitter) : "";
72
+ value2 = null;
73
+ } else {
74
+ defaultValue = r.join(splitter);
75
+ value2 = env[key];
76
+ }
77
+ if (value2) {
78
+ if (seen.has(value2)) {
79
+ result = result.replace(template, defaultValue);
80
+ } else {
81
+ result = result.replace(template, value2);
82
+ }
83
+ } else {
84
+ result = result.replace(template, defaultValue);
85
+ }
86
+ if (result === runningParsed[key]) {
87
+ break;
88
+ }
89
+ regex.lastIndex = 0;
90
+ }
91
+ return result;
92
+ }
93
+ __name(expandValue, "expandValue");
94
+ function expand2(options) {
95
+ const runningParsed = {};
96
+ let processEnv = process.env;
97
+ if (options && options.processEnv != null) {
98
+ processEnv = options.processEnv;
99
+ }
100
+ for (const key in options.parsed) {
101
+ let value = options.parsed[key];
102
+ if (processEnv[key] && processEnv[key] !== value) {
103
+ value = processEnv[key];
104
+ } else {
105
+ value = expandValue(value, processEnv, runningParsed);
106
+ }
107
+ options.parsed[key] = _resolveEscapeSequences(value);
108
+ runningParsed[key] = _resolveEscapeSequences(value);
109
+ }
110
+ for (const processKey in options.parsed) {
111
+ processEnv[processKey] = options.parsed[processKey];
112
+ }
113
+ return options;
114
+ }
115
+ __name(expand2, "expand");
116
+ module2.exports.expand = expand2;
117
+ }
118
+ });
119
+
120
+ // src/index.ts
121
+ var index_exports = {};
122
+ __export(index_exports, {
123
+ Fs: () => Fs
124
+ });
125
+ module.exports = __toCommonJS(index_exports);
126
+ init_cjs_shims();
127
+
128
+ // src/fs/index.ts
129
+ init_cjs_shims();
130
+ var import_child_process = require("child_process");
131
+ var import_fs = __toESM(require("fs"), 1);
132
+ var import_promises = __toESM(require("fs/promises"), 1);
133
+ var import_path = require("path");
134
+ var dotenv = __toESM(require("dotenv"), 1);
135
+ var import_dotenv_expand = __toESM(require_main(), 1);
136
+ dotenv.config();
137
+ var Fs = class {
138
+ constructor(cwd) {
139
+ this.cwd = cwd;
140
+ }
141
+ static {
142
+ __name(this, "Fs");
143
+ }
144
+ extractTuple(obj, props) {
145
+ return [props, obj[props]];
146
+ }
147
+ sort(obj, order) {
148
+ return Object.fromEntries(
149
+ Object.entries(obj).sort(
150
+ ([a, _aa], [b, _bb]) => order === "DESC" ? b.localeCompare(a) - a.localeCompare(b) : a.localeCompare(b) - b.localeCompare(a)
151
+ )
152
+ );
153
+ }
154
+ excludeTargeted = /* @__PURE__ */ __name((obj, props, sort) => {
155
+ const resolve = Object.fromEntries(
156
+ Object.entries(obj).map(([key, val]) => {
157
+ if (props.includes(key)) {
158
+ return ["omit", "omit"];
159
+ } else return [key, val];
160
+ }).filter(([t, _v]) => /omit/.test(t) === false)
161
+ );
162
+ return typeof sort !== "undefined" ? this.sort(resolve, sort) : resolve;
163
+ }, "excludeTargeted");
164
+ includeTargeted = /* @__PURE__ */ __name((obj, props, sort) => {
165
+ const resolve = Object.fromEntries(
166
+ props.map((val) => this.extractTuple(obj, val))
167
+ );
168
+ return typeof sort !== "undefined" ? this.sort(resolve, sort) : resolve;
169
+ }, "includeTargeted");
170
+ get myEnv() {
171
+ return dotenv.config({ processEnv: {} });
172
+ }
173
+ parseDotEnv() {
174
+ return import_dotenv_expand.default.expand(this.myEnv);
175
+ }
176
+ omitFields(target, keys) {
177
+ let obj = target;
178
+ keys.forEach((t) => {
179
+ if (t in obj) {
180
+ delete obj[t];
181
+ return obj;
182
+ } else {
183
+ return obj;
184
+ }
185
+ });
186
+ return obj;
187
+ }
188
+ omitTargetedFields(targ, keys) {
189
+ return { ...this.omitFields(targ, keys) };
190
+ }
191
+ exists(target) {
192
+ return import_fs.default.existsSync((0, import_path.relative)(this.cwd ?? process.cwd(), target));
193
+ }
194
+ arrToArrOfArrs = /* @__PURE__ */ __name(({
195
+ arrToFragment = Array.of(),
196
+ arrOfArrsAggregator = Array.of(),
197
+ interval
198
+ }) => new Promise(
199
+ (resolve, _reject) => resolve(
200
+ ((interval2) => {
201
+ for (let i = 0; i <= arrToFragment.length; i++) {
202
+ if ((i % interval2 === 0 || i === 0) && i <= arrToFragment.length) {
203
+ let segment = arrToFragment.slice(i, i + interval2);
204
+ arrOfArrsAggregator.push(segment);
205
+ }
206
+ }
207
+ })(interval)
208
+ )
209
+ ).then((_) => arrOfArrsAggregator), "arrToArrOfArrs");
210
+ wait(ms) {
211
+ return new Promise((resolve) => setTimeout(resolve, ms));
212
+ }
213
+ countsSorter = /* @__PURE__ */ __name(({
214
+ counter,
215
+ keySort,
216
+ valSort
217
+ }) => Object.fromEntries(
218
+ Object.entries(counter).sort(
219
+ ([aStr, _aNum], [bStr, _bNum]) => keySort === "DESC" ? bStr.localeCompare(aStr) - aStr.localeCompare(bStr) : aStr.localeCompare(bStr) - bStr.localeCompare(aStr)
220
+ ).sort(
221
+ ([_aStr, aNum], [_bStr, bNum]) => valSort === "ASC" ? aNum - bNum : bNum - aNum
222
+ )
223
+ ), "countsSorter");
224
+ handleBuffStrArrUnion(arr) {
225
+ return arr.map(
226
+ (v) => Buffer.isBuffer(v) ? Buffer.from(v).toString("utf-8") : v
227
+ );
228
+ }
229
+ readDir(path, options) {
230
+ return this.handleBuffStrArrUnion(
231
+ import_fs.default.readdirSync(
232
+ (0, import_path.relative)(this.cwd ??= process.cwd(), path),
233
+ options
234
+ )
235
+ );
236
+ }
237
+ executeCommand = /* @__PURE__ */ __name(({
238
+ command,
239
+ ...options
240
+ }) => Buffer.from(
241
+ Buffer.from((0, import_child_process.execSync)(command, { ...options }).toJSON().data)
242
+ ).toString("utf-8"), "executeCommand");
243
+ fileGenTimestamp(d) {
244
+ const date = d.toISOString();
245
+ return `/* file-autogenerated by @d0paminedriven/fs on ${date.split(/([T])/gm)?.[0]} at ${date.split(/([T])/gm)[2]?.split(/([Z])/gm)?.[0]} UTC */`;
246
+ }
247
+ configFileGenTimestamp(d) {
248
+ return this.fileGenTimestamp(d).replace("/*", "#").replace("*/", "");
249
+ }
250
+ mdFileGenTimestamp(d) {
251
+ return this.fileGenTimestamp(d).replace("/*", "<!--").replace("*/", "-->");
252
+ }
253
+ existsSync(path) {
254
+ return import_fs.default.existsSync((0, import_path.relative)(this.cwd ?? process.cwd(), path));
255
+ }
256
+ pathHandler(path) {
257
+ return /\//g.test(path) === true ? path.split(/([/])/gim).reverse().slice(2).reverse().join("") : path;
258
+ }
259
+ mkdirSync(path, options) {
260
+ return import_fs.default.mkdirSync((0, import_path.relative)(this.cwd ?? process.cwd(), path), options);
261
+ }
262
+ fileSizeMb(path) {
263
+ return import_fs.default.statSync((0, import_path.relative)(this.cwd ?? process.cwd(), path)).size / (1024 * 1024);
264
+ }
265
+ generateDirIfDNE(path, options) {
266
+ const doesExist = this.existsSync(path);
267
+ if (doesExist === true) return;
268
+ else {
269
+ return this.mkdirSync(path, options);
270
+ }
271
+ }
272
+ withWs(path, data, options) {
273
+ try {
274
+ if (/\//g.test(path) === true) {
275
+ return this.generateDirIfDNE(this.pathHandler(path), {
276
+ recursive: true
277
+ });
278
+ } else return path;
279
+ } catch (error) {
280
+ console.error(
281
+ `[withWs error]: `.concat(
282
+ typeof error === "string" ? error : JSON.stringify(error, null, 2)
283
+ )
284
+ );
285
+ } finally {
286
+ return import_fs.default.createWriteStream(
287
+ (0, import_path.relative)(this.cwd ?? process.cwd(), path),
288
+ typeof options !== "undefined" ? typeof options === "object" ? options : options : { autoClose: true }
289
+ ).write(Buffer.from(Buffer.from(data).toJSON().data));
290
+ }
291
+ }
292
+ writeFileAsync = /* @__PURE__ */ __name(async (path, data, options) => {
293
+ try {
294
+ if (/\//g.test(path) === true)
295
+ return this.generateDirIfDNE(this.pathHandler(path), {
296
+ recursive: true
297
+ });
298
+ else return path;
299
+ } catch (error) {
300
+ console.error(
301
+ `[writeFileAsync error]: `.concat(
302
+ error instanceof Error ? error.message : typeof error === "string" ? error : JSON.stringify(error, null, 2)
303
+ )
304
+ );
305
+ } finally {
306
+ return await import_promises.default.writeFile(
307
+ (0, import_path.relative)(this.cwd ?? process.cwd(), path),
308
+ Buffer.from(
309
+ Buffer.from(data).toJSON().data
310
+ ),
311
+ options
312
+ );
313
+ }
314
+ }, "writeFileAsync");
315
+ fileToBuffer = /* @__PURE__ */ __name((path) => Buffer.from(
316
+ Buffer.from(
317
+ import_fs.default.readFileSync((0, import_path.relative)(this.cwd ?? process.cwd(), path)).toJSON().data
318
+ )
319
+ ), "fileToBuffer");
320
+ dirContainsDir(readDir, targetDir, options) {
321
+ return this.readDir(readDir, options).filter((t) => t.split(".").length === 1).includes(targetDir);
322
+ }
323
+ parseJsonBuffer(p) {
324
+ return JSON.parse(
325
+ Buffer.from(Buffer.from(p).toJSON().data).toString("utf-8")
326
+ );
327
+ }
328
+ /* begin url */
329
+ isServerSide() {
330
+ return typeof window === "undefined";
331
+ }
332
+ isBase64(str) {
333
+ if (!str) {
334
+ return false;
335
+ }
336
+ return /^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?\n?$/.test(
337
+ str.replace(/\n/g, "")
338
+ );
339
+ }
340
+ previewRegex = /\/preview(\/\w|\?)/;
341
+ isPreviewPath(uri) {
342
+ if (typeof uri === "string") {
343
+ return this.previewRegex.test(uri);
344
+ }
345
+ return false;
346
+ }
347
+ // eslint-disable-next-line @typescript-eslint/class-literal-property-style
348
+ get URL_REGEX() {
349
+ return /^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
350
+ }
351
+ parseUrl(url) {
352
+ const parsed = this.URL_REGEX.exec(url);
353
+ return {
354
+ href: parsed[0],
355
+ protocol: parsed[1] ?? "",
356
+ baseUrl: `${parsed[1]}${parsed[3]}`,
357
+ host: parsed[4] ?? "",
358
+ pathname: parsed[5] ?? "",
359
+ search: parsed[6] ?? "",
360
+ hash: parsed[8] ?? ""
361
+ };
362
+ }
363
+ /* end url */
364
+ get gzVal() {
365
+ return ["application/x-gzip", "application/gzip"].reduce(
366
+ (vals) => vals
367
+ );
368
+ }
369
+ get zipVal() {
370
+ return ["application/zip", "application/x-zip-compressed"].reduce((vals) => vals);
371
+ }
372
+ get mimeTypeObj() {
373
+ return {
374
+ aac: "audio/aac",
375
+ abw: "application/x-abiword",
376
+ apng: "image/apng",
377
+ arc: "application/x-freearc",
378
+ avif: "image/avif",
379
+ avi: "video/x-msvideo",
380
+ azw: "application/vnd.amazon.ebook",
381
+ bin: "application/octet-stream",
382
+ bmp: "image/bmp",
383
+ bz: "application/x-bzip",
384
+ bz2: "application/x-bzip2",
385
+ cda: "application/x-cdf",
386
+ cjs: "application/javascript",
387
+ csh: "application/x-csh",
388
+ css: "text/css",
389
+ csv: "text/csv",
390
+ doc: "application/msword",
391
+ docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
392
+ eot: "application/vnd.ms-fontobject",
393
+ epub: "application/epub+zip",
394
+ gif: "image/gif",
395
+ gz: this.gzVal,
396
+ htm: "text/html",
397
+ html: "text/html",
398
+ ico: "image/vnd.microsoft.icon",
399
+ ics: "text/calendar",
400
+ jar: "application/java-archive",
401
+ jpeg: "image/jpeg",
402
+ jpg: "image/jpeg",
403
+ js: "text/javascript",
404
+ json: "application/json",
405
+ jsonld: "application/ld+json",
406
+ m3u8: "application/vnd.apple.mpegurl",
407
+ md: "text/markdown",
408
+ mdx: "application/x-mdx",
409
+ mid: "audio/midi",
410
+ midi: "audio/x-midi",
411
+ mjs: "text/javascript",
412
+ mp3: "audio/mpeg",
413
+ mp4: "video/mp4",
414
+ mpeg: "video/mpeg",
415
+ mpkg: "application/vnd.apple.installer+xml",
416
+ ndjson: "application/x-ndjson",
417
+ odp: "application/vnd.oasis.opendocument.presentation",
418
+ ods: "application/vnd.oasis.opendocument.spreadsheet",
419
+ odt: "application/vnd.oasis.opendocument.text",
420
+ oga: "audio/ogg",
421
+ ogv: "video/ogg",
422
+ ogx: "application/ogg",
423
+ opus: "audio/ogg",
424
+ otf: "font/otf",
425
+ png: "image/png",
426
+ pdf: "application/pdf",
427
+ php: "application/x-httpd-php",
428
+ pkpass: "application/vnd.apple.pkpass",
429
+ ppt: "application/vnd.ms-powerpoint",
430
+ pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
431
+ rar: "application/vnd.rar",
432
+ rtf: "application/rtf",
433
+ sh: "application/x-sh",
434
+ svg: "image/svg+xml",
435
+ tar: "application/x-tar",
436
+ tif: "image/tiff",
437
+ tiff: "image/tiff",
438
+ ts: "video/mp2t",
439
+ ttf: "font/ttf",
440
+ txt: "text/plain",
441
+ vsd: "application/vnd.visio",
442
+ wav: "audio/wav",
443
+ weba: "video/webm",
444
+ webp: "image/webp",
445
+ woff: "font/woff",
446
+ woff2: "font/woff2",
447
+ xhtml: "application/xhtml+xml",
448
+ xls: "application/vnd.ms-excel",
449
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
450
+ xml: "application/xml",
451
+ xul: "application/vnd.mozilla.xul+xml",
452
+ zip: this.zipVal,
453
+ "3gp": "video/3gpp",
454
+ "3g2": "video/3gpp2",
455
+ "7z": "application/x-7z-compressed"
456
+ };
457
+ }
458
+ assetType(url) {
459
+ return this.parseUrl(url).pathname?.split(/([.])/gim)?.reverse()?.[0];
460
+ }
461
+ getMime(input) {
462
+ return this.mimeTypeObj[input];
463
+ }
464
+ async assetToBuffer(path) {
465
+ const [fetcher] = await Promise.all([
466
+ fetch(path).then((t) => t.arrayBuffer())
467
+ ]);
468
+ const b64encodedData = `data:${this.getMime(this.assetType(path))};base64, ${Buffer.from(
469
+ Buffer.from(fetcher).toJSON().data
470
+ ).toString("base64")}`;
471
+ const extension = this.assetType(path);
472
+ return {
473
+ b64encodedData,
474
+ extension
475
+ };
476
+ }
477
+ async assetToBufferView(path) {
478
+ const [fetcher] = await Promise.all([
479
+ fetch(path).then((t) => t.arrayBuffer())
480
+ ]);
481
+ const reader = new ReadableStream({
482
+ type: "bytes",
483
+ async pull(controller) {
484
+ const byobRequest = controller.byobRequest;
485
+ byobRequest?.respond(byobRequest?.view?.byteLength ?? 0);
486
+ }
487
+ });
488
+ const readerByob = new ReadableStreamBYOBReader(reader);
489
+ const readableByteStream = fetcher;
490
+ const data = await readerByob.read(Buffer.from(readableByteStream));
491
+ const b64encodedData = `data:${this.getMime(this.assetType(path))};base64, ${Buffer.from(
492
+ Buffer.from(data.value ?? Buffer.alloc(0)).toJSON().data
493
+ ).toString("base64")}`;
494
+ const extension = this.assetType(path);
495
+ return {
496
+ b64encodedData,
497
+ extension
498
+ };
499
+ }
500
+ formatHelper(f) {
501
+ if (/([A-Za-z]+-[A-Za-z]+)/g.test(f) === true) {
502
+ const formatting = f.split(/-/g).map((v) => v.substring(0, 1).toUpperCase().concat(v.substring(1))).join(" ");
503
+ return formatting;
504
+ } else return f.substring(0, 1).toUpperCase().concat(f.substring(1));
505
+ }
506
+ range(from, to) {
507
+ const values = [];
508
+ for (let i = from; i < to; i++) {
509
+ values.push(i);
510
+ }
511
+ return values;
512
+ }
513
+ isPrimeNumber = /* @__PURE__ */ __name((n) => {
514
+ for (let i = 2; n > i; i++) {
515
+ if (n % i === 0) {
516
+ return false;
517
+ }
518
+ }
519
+ return n > 1;
520
+ }, "isPrimeNumber");
521
+ acceptor = /* @__PURE__ */ __name((num) => [...Array(num !== 0 ? num : this.range(num = -101, num = 101)).keys()].reverse().filter(this.isPrimeNumber), "acceptor");
522
+ chunkArray(arr, maxChunkLength) {
523
+ const chunks = Array.of();
524
+ let currentChunkLength = 0;
525
+ let currentChunk = Array.of();
526
+ for (const [index, val] of arr.entries()) {
527
+ if (val.length + currentChunkLength >= maxChunkLength) {
528
+ if (currentChunk.length) {
529
+ chunks.push(currentChunk);
530
+ }
531
+ currentChunkLength = val.length;
532
+ currentChunk = [val];
533
+ } else {
534
+ currentChunk.push(val);
535
+ currentChunkLength += val.length + 1;
536
+ }
537
+ if (arr.length === index + 1) {
538
+ chunks.push(currentChunk);
539
+ }
540
+ }
541
+ return chunks.length ? chunks : [arr];
542
+ }
543
+ b64ToBlob(b64Data) {
544
+ {
545
+ const sliceSize = 512;
546
+ const typeMatch = b64Data.match(
547
+ /^data:(image|application|video|text|font)\/[A-Za-z0-9+-.]+;base64,/
548
+ );
549
+ const type = typeMatch?.[1];
550
+ console.log(type ?? "");
551
+ if (!typeMatch) {
552
+ throw new Error(`${b64Data} is not a valid data Url`);
553
+ }
554
+ const byteCharacters = Buffer.from(b64Data, "base64").toString("utf-8");
555
+ const byteArrays = Array.of();
556
+ for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {
557
+ const slice = byteCharacters.slice(offset, offset + sliceSize);
558
+ const byteNumbers = Array.of();
559
+ byteNumbers.push(slice.length);
560
+ for (let i = 0; i < slice.length; i++) {
561
+ byteNumbers[i] = slice.charCodeAt(i);
562
+ }
563
+ const byteArray = new Uint8Array(byteNumbers);
564
+ byteArrays.push(byteArray);
565
+ }
566
+ const blob = new Blob(byteArrays, { type });
567
+ return blob;
568
+ }
569
+ }
570
+ };
571
+ // Annotate the CommonJS export names for ESM import in node:
572
+ 0 && (module.exports = {
573
+ Fs
574
+ });
575
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,4 @@
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';
3
+ import 'dotenv-expand';
4
+ import 'stream';
@@ -0,0 +1,4 @@
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';
3
+ import 'dotenv-expand';
4
+ import 'stream';
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import {
2
+ Fs
3
+ } from "./chunk-K45COKAJ.js";
4
+ import {
5
+ init_esm_shims
6
+ } from "./chunk-I6PDZOED.js";
7
+
8
+ // src/index.ts
9
+ init_esm_shims();
10
+ export {
11
+ Fs
12
+ };
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/types/index.ts
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
19
+ //# sourceMappingURL=index.cjs.map