@d0paminedriven/fs 7.2.0 → 7.4.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/README.md +127 -51
- package/dist/{chunk-O2P3L3CJ.js → chunk-6HHKXBIM.js} +5 -2
- package/dist/chunk-7FHBNIB7.js +240 -0
- package/dist/{chunk-KUGIFRTF.js → chunk-C2ANVZLG.js} +345 -4
- package/dist/chunk-FPB77OGJ.js +75 -0
- package/dist/chunk-IU4MDHYM.js +75 -0
- package/dist/chunk-KDWGS5GC.js +69 -0
- package/dist/{chunk-GH6MFTV5.js → chunk-KNLXF622.js} +2 -2
- package/dist/chunk-Q2VF3BVH.js +165 -0
- package/dist/{chunk-MRKO3PAA.js → chunk-R63XI7FS.js} +1 -1
- package/dist/chunk-TDMPLELZ.js +367 -0
- package/dist/{chunk-6FJJLFJL.js → chunk-UW52DMHT.js} +2 -2
- package/dist/chunk-XCA34DKZ.js +107 -0
- package/dist/chunk-Z2WZLZC4.js +75 -0
- package/dist/fs/index.d.ts +21 -476
- package/dist/fs/index.js +13 -6
- package/dist/fs-atomic/index.d.ts +38 -0
- package/dist/fs-atomic/index.js +14 -0
- package/dist/fs-base/index.d.ts +112 -0
- package/dist/fs-base/index.js +13 -0
- package/dist/fs-core/index.d.ts +24 -0
- package/dist/fs-core/index.js +17 -0
- package/dist/fs-fetch/index.d.ts +64 -0
- package/dist/fs-fetch/index.js +19 -0
- package/dist/fs-size/index.d.ts +30 -0
- package/dist/fs-size/index.js +16 -0
- package/dist/fs-tmp/index.d.ts +194 -0
- package/dist/fs-tmp/index.js +18 -0
- package/dist/image/index.d.ts +36 -2
- package/dist/image/index.js +5 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +36 -8
- package/dist/ld/index.d.ts +14 -0
- package/dist/ld/index.js +8 -0
- package/dist/mime/index.d.ts +5 -4
- package/dist/mime/index.js +4 -3
- package/dist/types/index.d.ts +13 -13
- package/dist/types/index.js +1 -1
- package/dist/types/stream.d.ts +2 -1
- package/dist/url/index.d.ts +1 -0
- package/dist/url/index.js +3 -2
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +2 -1
- package/package.json +32 -4
- package/dist/chunk-SYISQ57E.js +0 -895
package/dist/index.js
CHANGED
|
@@ -1,27 +1,55 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Fs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IU4MDHYM.js";
|
|
4
|
+
import {
|
|
5
|
+
FsFetch
|
|
6
|
+
} from "./chunk-Q2VF3BVH.js";
|
|
7
|
+
import {
|
|
8
|
+
FsTmp
|
|
9
|
+
} from "./chunk-TDMPLELZ.js";
|
|
10
|
+
import {
|
|
11
|
+
FsCore
|
|
12
|
+
} from "./chunk-KDWGS5GC.js";
|
|
13
|
+
import {
|
|
14
|
+
FsSize
|
|
15
|
+
} from "./chunk-FPB77OGJ.js";
|
|
16
|
+
import {
|
|
17
|
+
unitsObj
|
|
18
|
+
} from "./chunk-R63XI7FS.js";
|
|
19
|
+
import {
|
|
20
|
+
FsAtomic
|
|
21
|
+
} from "./chunk-XCA34DKZ.js";
|
|
22
|
+
import {
|
|
23
|
+
FsBase
|
|
24
|
+
} from "./chunk-7FHBNIB7.js";
|
|
4
25
|
import {
|
|
5
26
|
ImageService
|
|
6
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-C2ANVZLG.js";
|
|
7
28
|
import {
|
|
8
29
|
MimeService,
|
|
9
30
|
extMimeMap,
|
|
10
31
|
mimeToExt
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
unitsObj
|
|
14
|
-
} from "./chunk-MRKO3PAA.js";
|
|
32
|
+
} from "./chunk-KNLXF622.js";
|
|
15
33
|
import {
|
|
16
34
|
UrlService
|
|
17
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-UW52DMHT.js";
|
|
18
36
|
import {
|
|
19
37
|
UtilsService
|
|
20
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-6HHKXBIM.js";
|
|
39
|
+
import {
|
|
40
|
+
LevenshteinDistance
|
|
41
|
+
} from "./chunk-Z2WZLZC4.js";
|
|
21
42
|
import "./chunk-7QVYU63E.js";
|
|
22
43
|
export {
|
|
23
44
|
Fs,
|
|
45
|
+
FsAtomic,
|
|
46
|
+
FsBase,
|
|
47
|
+
FsCore,
|
|
48
|
+
FsFetch,
|
|
49
|
+
FsSize,
|
|
50
|
+
FsTmp,
|
|
24
51
|
ImageService,
|
|
52
|
+
LevenshteinDistance,
|
|
25
53
|
MimeService,
|
|
26
54
|
UrlService,
|
|
27
55
|
UtilsService,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare class LevenshteinDistance {
|
|
2
|
+
private createMatrix;
|
|
3
|
+
private inBounds;
|
|
4
|
+
private getCell;
|
|
5
|
+
private setCell;
|
|
6
|
+
/**
|
|
7
|
+
* Computes the Levenshtein distance between two strings, i.e.,
|
|
8
|
+
* the minimum number of single-character edits (insertions,
|
|
9
|
+
* deletions, or substitutions) needed to transform `a` into `b`.
|
|
10
|
+
*/
|
|
11
|
+
calculate(a?: string | null, b?: string | null): number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { LevenshteinDistance };
|
package/dist/ld/index.js
ADDED
package/dist/mime/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { UrlService } from '../url/index.js';
|
|
|
3
3
|
import 'stream';
|
|
4
4
|
import 'buffer';
|
|
5
5
|
import '../utils/index.js';
|
|
6
|
+
import '../ld/index.js';
|
|
6
7
|
|
|
7
8
|
declare const extMimeMap: {
|
|
8
9
|
readonly aac: readonly ["audio/aac"];
|
|
@@ -487,16 +488,16 @@ declare class MimeService extends UrlService {
|
|
|
487
488
|
compareMimeToExt(p?: "mime" | "ext"): {
|
|
488
489
|
[k: string]: number;
|
|
489
490
|
};
|
|
490
|
-
mimeToExt(mime: keyof typeof this.toExtObj): "png" | "gif" | "bmp" | "webp" | "avif" | "
|
|
491
|
-
assetType<const T extends string>(url: T): "png" | "jpeg" | "gif" | "bmp" | "webp" | "avif" | "
|
|
491
|
+
mimeToExt(mime: keyof typeof this.toExtObj): "png" | "gif" | "bmp" | "webp" | "avif" | "mpd" | "epub" | "ttf" | "gz" | "jar" | "json" | "jsonld" | "webmanifest" | "doc" | "node" | "js" | "bin" | "obj" | "ogx" | "pdf" | "rtf" | "sql" | "toml" | "azw" | "mpkg" | "m3u8" | "pkpass" | "xul" | "xls" | "eot" | "ppt" | "odp" | "ods" | "odt" | "pptx" | "xlsx" | "docx" | "rar" | "vsd" | "wasm" | "7z" | "abw" | "bz" | "bz2" | "cda" | "csh" | "arc" | "php" | "mdx" | "ndjson" | "pyc" | "sh" | "tar" | "zip" | "xhtml" | "xml" | "yml" | "aac" | "mid" | "m4a" | "mp3" | "opus" | "ogg" | "wav" | "weba" | "midi" | "otf" | "woff" | "woff2" | "hjif" | "hmpg" | "ivs" | "aces" | "apng" | "avci" | "dpx" | "emf" | "jpg" | "ktx" | "ktx2" | "svg" | "tiff" | "ico" | "cur" | "glb" | "gltf" | "usdz" | "ics" | "css" | "csv" | "sse" | "html" | "md" | "txt" | "rs" | "ts" | "vtt" | "py" | "3gp" | "3g2" | "mp4" | "mpeg" | "ogv" | "webm" | "avi";
|
|
492
|
+
assetType<const T extends string>(url: T): "png" | "jpeg" | "gif" | "bmp" | "webp" | "avif" | "mpd" | "epub" | "ttf" | "gz" | "jar" | "json" | "jsonld" | "webmanifest" | "doc" | "node" | "js" | "bin" | "obj" | "ogx" | "pdf" | "rtf" | "sql" | "toml" | "azw" | "mpkg" | "m3u8" | "pkpass" | "xul" | "xls" | "eot" | "ppt" | "odp" | "ods" | "odt" | "pptx" | "xlsx" | "docx" | "rar" | "vsd" | "wasm" | "7z" | "abw" | "bz" | "bz2" | "cda" | "csh" | "arc" | "php" | "mdx" | "ndjson" | "pyc" | "sh" | "tar" | "zip" | "xhtml" | "xml" | "mtlx" | "yml" | "yaml" | "aac" | "mid" | "m4a" | "mp3" | "opus" | "ogg" | "oga" | "wav" | "weba" | "midi" | "otf" | "woff" | "woff2" | "hjif" | "hmpg" | "ivs" | "ivt" | "aces" | "apng" | "avci" | "dpx" | "emf" | "jpg" | "jpe" | "jif" | "jfif" | "pjp" | "pjpeg" | "ktx" | "ktx2" | "svg" | "tiff" | "tif" | "ico" | "cur" | "glb" | "gltf" | "usdz" | "ics" | "css" | "csv" | "sse" | "html" | "htm" | "mjs" | "cjs" | "md" | "txt" | "rs" | "ts" | "vtt" | "py" | "3gp" | "3g2" | "mp4" | "m4v" | "mpeg" | "ogv" | "webm" | "avi" | undefined;
|
|
492
493
|
getMimes<const E extends FileExtension>(ext: E): readonly ["audio/aac"] | readonly ["application/x-abiword"] | readonly ["image/aces"] | readonly ["image/apng"] | readonly ["application/x-freearc"] | readonly ["image/avci"] | readonly ["image/avif"] | readonly ["video/x-msvideo"] | readonly ["application/vnd.amazon.ebook"] | readonly ["application/octet-stream", "multipart/voice-message"] | readonly ["image/bmp"] | readonly ["application/x-bzip"] | readonly ["application/x-bzip2"] | readonly ["application/x-cdf"] | readonly ["application/node", "text/javascript"] | readonly ["application/x-csh"] | readonly ["text/css"] | readonly ["text/csv"] | readonly ["image/x-icon"] | readonly ["application/msword"] | readonly ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"] | readonly ["image/dpx"] | readonly ["image/emf"] | readonly ["application/vnd.ms-fontobject"] | readonly ["application/epub+zip"] | readonly ["image/gif"] | readonly ["model/gltf-binary"] | readonly ["model/gltf+json"] | readonly ["application/gzip", "application/x-gzip"] | readonly ["haptics/hjif"] | readonly ["haptics/hmpg"] | readonly ["text/html"] | readonly ["image/vnd.microsoft.icon", "image/x-icon"] | readonly ["text/calendar"] | readonly ["haptics/ivs"] | readonly ["application/java-archive"] | readonly ["image/jpeg"] | readonly ["application/json"] | readonly ["application/ld+json"] | readonly ["image/ktx"] | readonly ["image/ktx2"] | readonly ["application/vnd.apple.mpegurl"] | readonly ["audio/mp4"] | readonly ["video/mp4"] | readonly ["text/markdown"] | readonly ["application/x-mdx"] | readonly ["audio/midi"] | readonly ["audio/x-midi"] | readonly ["text/javascript"] | readonly ["audio/mpeg"] | readonly ["application/dash+xml"] | readonly ["video/mpeg"] | readonly ["application/vnd.apple.installer+xml"] | readonly ["application/xml"] | readonly ["application/x-ndjson"] | readonly ["model/obj", "application/octet-stream", "text/plain"] | readonly ["application/vnd.oasis.opendocument.presentation"] | readonly ["application/vnd.oasis.opendocument.spreadsheet"] | readonly ["application/vnd.oasis.opendocument.text"] | readonly ["audio/ogg"] | readonly ["video/ogg"] | readonly ["application/ogg"] | readonly ["font/otf"] | readonly ["image/png"] | readonly ["application/pdf"] | readonly ["application/x-httpd-php"] | readonly ["application/vnd.apple.pkpass"] | readonly ["application/vnd.ms-powerpoint"] | readonly ["application/vnd.openxmlformats-officedocument.presentationml.presentation"] | readonly ["text/x-python"] | readonly ["application/x-python-code"] | readonly ["application/vnd.rar"] | readonly ["text/rust"] | readonly ["application/rtf"] | readonly ["application/x-sh"] | readonly ["application/sql"] | readonly ["text/event-stream"] | readonly ["image/svg+xml"] | readonly ["application/x-tar"] | readonly ["image/tiff"] | readonly ["application/toml"] | readonly ["text/typescript", "video/mp2t", "video/vnd.dlna.mpeg-tts"] | readonly ["application/font-sfnt", "font/ttf"] | readonly ["text/plain"] | readonly ["model/vnd.usdz+zip"] | readonly ["application/vnd.visio"] | readonly ["text/vtt"] | readonly ["application/wasm"] | readonly ["audio/wav"] | readonly ["audio/webm"] | readonly ["video/webm"] | readonly ["application/manifest+json"] | readonly ["image/webp"] | readonly ["font/woff"] | readonly ["font/woff2"] | readonly ["application/xhtml+xml"] | readonly ["application/vnd.ms-excel"] | readonly ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"] | readonly ["application/xml", "text/xml"] | readonly ["application/vnd.mozilla.xul+xml"] | readonly ["application/yaml"] | readonly ["application/zip", "application/x-zip-compressed"] | readonly ["video/3gpp"] | readonly ["video/3gpp2"] | readonly ["application/x-7z-compressed"];
|
|
493
494
|
getMimeFor<const E extends FileExtension>(ext: E, opts?: {
|
|
494
495
|
type?: MimeTopLevelType;
|
|
495
496
|
}): FileExtensionToMimeType<E>;
|
|
496
|
-
isMimeFor<const E extends FileExtension>(ext: E, mime: FileExtensionToMimeType<E>): "
|
|
497
|
+
isMimeFor<const E extends FileExtension>(ext: E, mime: FileExtensionToMimeType<E>): "audio/aac" | "application/x-abiword" | "image/aces" | "image/apng" | "application/x-freearc" | "image/avci" | "image/avif" | "video/x-msvideo" | "application/vnd.amazon.ebook" | "application/octet-stream" | "multipart/voice-message" | "image/bmp" | "application/x-bzip" | "application/x-bzip2" | "application/x-cdf" | "application/node" | "text/javascript" | "application/x-csh" | "text/css" | "text/csv" | "image/x-icon" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "image/dpx" | "image/emf" | "application/vnd.ms-fontobject" | "application/epub+zip" | "image/gif" | "model/gltf-binary" | "model/gltf+json" | "application/gzip" | "application/x-gzip" | "haptics/hjif" | "haptics/hmpg" | "text/html" | "image/vnd.microsoft.icon" | "text/calendar" | "haptics/ivs" | "application/java-archive" | "image/jpeg" | "application/json" | "application/ld+json" | "image/ktx" | "image/ktx2" | "application/vnd.apple.mpegurl" | "audio/mp4" | "video/mp4" | "text/markdown" | "application/x-mdx" | "audio/midi" | "audio/x-midi" | "audio/mpeg" | "application/dash+xml" | "video/mpeg" | "application/vnd.apple.installer+xml" | "application/xml" | "application/x-ndjson" | "model/obj" | "text/plain" | "application/vnd.oasis.opendocument.presentation" | "application/vnd.oasis.opendocument.spreadsheet" | "application/vnd.oasis.opendocument.text" | "audio/ogg" | "video/ogg" | "application/ogg" | "font/otf" | "image/png" | "application/pdf" | "application/x-httpd-php" | "application/vnd.apple.pkpass" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "text/x-python" | "application/x-python-code" | "application/vnd.rar" | "text/rust" | "application/rtf" | "application/x-sh" | "application/sql" | "text/event-stream" | "image/svg+xml" | "application/x-tar" | "image/tiff" | "application/toml" | "text/typescript" | "video/mp2t" | "video/vnd.dlna.mpeg-tts" | "application/font-sfnt" | "font/ttf" | "model/vnd.usdz+zip" | "application/vnd.visio" | "text/vtt" | "application/wasm" | "audio/wav" | "audio/webm" | "video/webm" | "application/manifest+json" | "image/webp" | "font/woff" | "font/woff2" | "application/xhtml+xml" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "text/xml" | "application/vnd.mozilla.xul+xml" | "application/yaml" | "application/zip" | "application/x-zip-compressed" | "video/3gpp" | "video/3gpp2" | "application/x-7z-compressed" | undefined;
|
|
497
498
|
getMimeTypeForPath<T extends string>(path: T, opts?: {
|
|
498
499
|
type?: MimeTopLevelType;
|
|
499
|
-
}): "
|
|
500
|
+
}): "audio/aac" | "application/x-abiword" | "image/aces" | "image/apng" | "application/x-freearc" | "image/avci" | "image/avif" | "video/x-msvideo" | "application/vnd.amazon.ebook" | "application/octet-stream" | "multipart/voice-message" | "image/bmp" | "application/x-bzip" | "application/x-bzip2" | "application/x-cdf" | "application/node" | "text/javascript" | "application/x-csh" | "text/css" | "text/csv" | "image/x-icon" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "image/dpx" | "image/emf" | "application/vnd.ms-fontobject" | "application/epub+zip" | "image/gif" | "model/gltf-binary" | "model/gltf+json" | "application/gzip" | "application/x-gzip" | "haptics/hjif" | "haptics/hmpg" | "text/html" | "image/vnd.microsoft.icon" | "text/calendar" | "haptics/ivs" | "application/java-archive" | "image/jpeg" | "application/json" | "application/ld+json" | "image/ktx" | "image/ktx2" | "application/vnd.apple.mpegurl" | "audio/mp4" | "video/mp4" | "text/markdown" | "application/x-mdx" | "audio/midi" | "audio/x-midi" | "audio/mpeg" | "application/dash+xml" | "video/mpeg" | "application/vnd.apple.installer+xml" | "application/xml" | "application/x-ndjson" | "model/obj" | "text/plain" | "application/vnd.oasis.opendocument.presentation" | "application/vnd.oasis.opendocument.spreadsheet" | "application/vnd.oasis.opendocument.text" | "audio/ogg" | "video/ogg" | "application/ogg" | "font/otf" | "image/png" | "application/pdf" | "application/x-httpd-php" | "application/vnd.apple.pkpass" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "text/x-python" | "application/x-python-code" | "application/vnd.rar" | "text/rust" | "application/rtf" | "application/x-sh" | "application/sql" | "text/event-stream" | "image/svg+xml" | "application/x-tar" | "image/tiff" | "application/toml" | "text/typescript" | "video/mp2t" | "video/vnd.dlna.mpeg-tts" | "application/font-sfnt" | "font/ttf" | "model/vnd.usdz+zip" | "application/vnd.visio" | "text/vtt" | "application/wasm" | "audio/wav" | "audio/webm" | "video/webm" | "application/manifest+json" | "image/webp" | "font/woff" | "font/woff2" | "application/xhtml+xml" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "text/xml" | "application/vnd.mozilla.xul+xml" | "application/yaml" | "application/zip" | "application/x-zip-compressed" | "video/3gpp" | "video/3gpp2" | "application/x-7z-compressed";
|
|
500
501
|
}
|
|
501
502
|
|
|
502
503
|
export { type AllMimeTypes, type FileExtension, type FileExtensionToMimeType, type InferTopLevelPresent, MimeService, type MimeTopLevelType, type MimeType, type MimeTypeToFileExtension, type PresentMimeTopLevelTypes, extMimeMap, mimeToExt };
|
package/dist/mime/index.js
CHANGED
|
@@ -2,9 +2,10 @@ import {
|
|
|
2
2
|
MimeService,
|
|
3
3
|
extMimeMap,
|
|
4
4
|
mimeToExt
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-KNLXF622.js";
|
|
6
|
+
import "../chunk-UW52DMHT.js";
|
|
7
|
+
import "../chunk-6HHKXBIM.js";
|
|
8
|
+
import "../chunk-Z2WZLZC4.js";
|
|
8
9
|
import "../chunk-7QVYU63E.js";
|
|
9
10
|
export {
|
|
10
11
|
MimeService,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -108,20 +108,26 @@ interface ReadDirOptionsEntity extends ObjEncodingOptions {
|
|
|
108
108
|
type ReadDirOptions = {
|
|
109
109
|
[P in keyof ReadDirOptionsEntity]: ReadDirOptionsEntity[P];
|
|
110
110
|
};
|
|
111
|
-
type WriteFileAsyncOptions = (
|
|
111
|
+
type WriteFileAsyncOptions = (ObjEncodingOptions & {
|
|
112
112
|
mode?: Mode | undefined;
|
|
113
113
|
flag?: OpenMode | undefined;
|
|
114
|
-
|
|
114
|
+
flush?: boolean | undefined;
|
|
115
|
+
} & Abortable) | BufferEncodingUnion | null;
|
|
115
116
|
type WriteFileAsyncProps<T extends string = string> = {
|
|
116
117
|
path: T;
|
|
117
|
-
cwd: string;
|
|
118
118
|
data: WriteFileAsyncDataUnion;
|
|
119
119
|
options?: (ObjEncodingOptions & {
|
|
120
120
|
mode?: Mode | undefined;
|
|
121
121
|
flag?: OpenMode | undefined;
|
|
122
|
+
flush?: boolean | undefined;
|
|
122
123
|
} & Abortable) | BufferEncodingUnion | null;
|
|
123
124
|
};
|
|
124
|
-
type
|
|
125
|
+
type RmOptions = {
|
|
126
|
+
/**
|
|
127
|
+
* When `true`, exceptions will be ignored if `path` does not exist.
|
|
128
|
+
* @default true
|
|
129
|
+
*/
|
|
130
|
+
force?: boolean | undefined;
|
|
125
131
|
/**
|
|
126
132
|
* If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
|
|
127
133
|
* `EPERM` error is encountered, Node.js will retry the operation with a linear
|
|
@@ -132,13 +138,9 @@ type RmDirOptions = {
|
|
|
132
138
|
*/
|
|
133
139
|
maxRetries?: number | undefined;
|
|
134
140
|
/**
|
|
135
|
-
* @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning
|
|
136
|
-
* `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file.
|
|
137
|
-
* Use `fs.rm(path, { recursive: true, force: true })` instead.
|
|
138
|
-
*
|
|
139
141
|
* If `true`, perform a recursive directory removal. In
|
|
140
142
|
* recursive mode, operations are retried on failure.
|
|
141
|
-
* @default
|
|
143
|
+
* @default true
|
|
142
144
|
*/
|
|
143
145
|
recursive?: boolean | undefined;
|
|
144
146
|
/**
|
|
@@ -148,9 +150,7 @@ type RmDirOptions = {
|
|
|
148
150
|
*/
|
|
149
151
|
retryDelay?: number | undefined;
|
|
150
152
|
};
|
|
151
|
-
type
|
|
152
|
-
options?: RmDirOptions;
|
|
153
|
-
}["options"];
|
|
153
|
+
type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
|
|
154
154
|
type ReadDirProps<T extends string> = {
|
|
155
155
|
path: T;
|
|
156
156
|
options?: ReadDirOptions;
|
|
@@ -330,4 +330,4 @@ interface BoxInfo {
|
|
|
330
330
|
size: number;
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
export { type Abortable, type ArrFieldReplacer, type ArrayBufferView, type ArrayOrReadOnlyArray, type BashEnv, type BoxInfo, type BufferEncodingUnion, type CTR, type CoercionUnion, type CommonExecOptions, type CommonOptions, type ConditionalPromise, type ConditionalToRequired, type DX, type DeepPartial, type DeepPartialFields, type DeepReplace, type Depth, type Dict, type Equal, type ExcludeFieldEnumerable, type ExecSyncOptions, type ExecSyncOptionsWithBufferEncoding, type ExecSyncOptionsWithStringEncoding, type ExecuteCommandProps, type Expect, type Extends, type FieldToConditionallyNever, type IOType, type ImageSpecs, type InferDepth, type InjectScriptsProps, type IsExact, type IsOptional, type MkDirOptions, type MkDirSyncOptions, type MkDirSyncProps, type Mode, type ObjEncodingOptions, type OmitSrc, type OnlyOptional, type OnlyRequired, type OpenMode, type ParsedUrlInfo, type ProcessEnv, type ProcessEnvOptions, type RTC, type ReadDirOptions, type ReadDirOptionsEntity, type ReadDirProps, type RemoveFields, type RequireNested, type RequiredToConditional, type Rm, type
|
|
333
|
+
export { type Abortable, type ArrFieldReplacer, type ArrayBufferView, type ArrayOrReadOnlyArray, type BashEnv, type BoxInfo, type BufferEncodingUnion, type CTR, type CoercionUnion, type CommonExecOptions, type CommonOptions, type ConditionalPromise, type ConditionalToRequired, type DX, type DeepPartial, type DeepPartialFields, type DeepReplace, type Depth, type Dict, type Equal, type ExcludeFieldEnumerable, type ExecSyncOptions, type ExecSyncOptionsWithBufferEncoding, type ExecSyncOptionsWithStringEncoding, type ExecuteCommandProps, type Expect, type Extends, type FieldToConditionallyNever, type IOType, type ImageSpecs, type InferDepth, type InjectScriptsProps, type IsExact, type IsOptional, type MkDirOptions, type MkDirSyncOptions, type MkDirSyncProps, type Mode, type NoParamCallback, type ObjEncodingOptions, type OmitSrc, type OnlyOptional, type OnlyRequired, type OpenMode, type ParsedUrlInfo, type ProcessEnv, type ProcessEnvOptions, type RTC, type ReadDirOptions, type ReadDirOptionsEntity, type ReadDirProps, type RemoveFields, type RequireNested, type RequiredToConditional, type Rm, type RmOptions, type Signals, type SizeOpts, type StdioOptions, type TCN, type TypedArray, type Unenumerate, type Unit, type UnwrapPromise, type Without, type WriteFileAsyncDataUnion, type WriteFileAsyncOptions, type WriteFileAsyncProps, type WriteStreamDataShape, type WriteStreamOptions, type WriteStreamProps, type XOR, unitsObj };
|
package/dist/types/index.js
CHANGED
package/dist/types/stream.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ReadableStream } from 'stream/web';
|
|
2
|
+
import { Readable } from 'node:stream';
|
|
2
3
|
|
|
3
4
|
type Bin = Buffer | Uint8Array;
|
|
4
5
|
type WebRS = ReadableStream<Uint8Array>;
|
|
5
6
|
type AsyncIter = AsyncIterable<Uint8Array>;
|
|
6
7
|
/** Inputs you actually accept — no `any`, no lies. */
|
|
7
|
-
type Streamable = string | Bin | WebRS | AsyncIter;
|
|
8
|
+
type Streamable = string | Bin | WebRS | AsyncIter | Readable;
|
|
8
9
|
|
|
9
10
|
export type { AsyncIter, Bin, Streamable, WebRS };
|
package/dist/url/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { UtilsService } from '../utils/index.js';
|
|
|
2
2
|
import '../types/index.js';
|
|
3
3
|
import 'stream';
|
|
4
4
|
import 'buffer';
|
|
5
|
+
import '../ld/index.js';
|
|
5
6
|
|
|
6
7
|
type HandleQueryParamsOrHash<T> = T extends `${infer X}?${string}` ? X : T extends `${infer X}#${string}` ? X : T;
|
|
7
8
|
type SplitForwardSlash<S extends string> = S extends `${infer First}/${infer Rest}` ? [First, ...SplitForwardSlash<Rest>] : S extends "" ? [] : [S];
|
package/dist/url/index.js
CHANGED
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { RemoveFields, Unenumerate } from '../types/index.js';
|
|
2
|
+
import { LevenshteinDistance } from '../ld/index.js';
|
|
2
3
|
import 'stream';
|
|
3
4
|
import 'buffer';
|
|
4
5
|
|
|
5
|
-
declare class UtilsService {
|
|
6
|
+
declare class UtilsService extends LevenshteinDistance {
|
|
6
7
|
chunkArray<T extends number>(arr: string[], maxChunkLength: T): string[][];
|
|
7
8
|
b64ToBlob<const T extends string>(b64Data: T): Blob;
|
|
8
9
|
arrToArrOfArrs: <const T, const N extends number>({ arrToFragment, arrOfArrsAggregator, interval }: {
|
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d0paminedriven/fs",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"homepage": "https://github.com/DopamineDriven/d0paminedriven/blob/master/packages/fs/README.md",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "andrew@windycitydevs.io",
|
|
@@ -21,11 +21,32 @@
|
|
|
21
21
|
"dist/*.d.ts",
|
|
22
22
|
"dist/*/index.d.ts"
|
|
23
23
|
],
|
|
24
|
+
"fs": [
|
|
25
|
+
"dist/fs/index.d.ts"
|
|
26
|
+
],
|
|
27
|
+
"fs-atomic": [
|
|
28
|
+
"dist/fs-atomic/index.d.ts"
|
|
29
|
+
],
|
|
30
|
+
"fs-base": [
|
|
31
|
+
"dist/fs-base/index.d.ts"
|
|
32
|
+
],
|
|
33
|
+
"fs-core": [
|
|
34
|
+
"dist/fs-core/index.d.ts"
|
|
35
|
+
],
|
|
36
|
+
"fs-fetch": [
|
|
37
|
+
"dist/fs-fetch/index.d.ts"
|
|
38
|
+
],
|
|
39
|
+
"fs-size": [
|
|
40
|
+
"dist/fs-size/index.d.ts"
|
|
41
|
+
],
|
|
42
|
+
"fs-tmp": [
|
|
43
|
+
"dist/fs-tmp/index.d.ts"
|
|
44
|
+
],
|
|
24
45
|
"image": [
|
|
25
46
|
"dist/image/index.d.ts"
|
|
26
47
|
],
|
|
27
|
-
"
|
|
28
|
-
"dist/
|
|
48
|
+
"ld": [
|
|
49
|
+
"dist/ld/index.d.ts"
|
|
29
50
|
],
|
|
30
51
|
"mime": [
|
|
31
52
|
"dist/mime/index.d.ts"
|
|
@@ -56,7 +77,14 @@
|
|
|
56
77
|
".": "./dist/index.js",
|
|
57
78
|
"./*": "./dist/*.js",
|
|
58
79
|
"./fs": "./dist/fs/index.js",
|
|
80
|
+
"./fs-atomic": "./dist/fs-atomic/index.js",
|
|
81
|
+
"./fs-base": "./dist/fs-base/index.js",
|
|
82
|
+
"./fs-core": "./dist/fs-core/index.js",
|
|
83
|
+
"./fs-fetch": "./dist/fs-fetch/index.js",
|
|
84
|
+
"./fs-size": "./dist/fs-size/index.js",
|
|
85
|
+
"./fs-tmp": "./dist/fs-tmp/index.js",
|
|
59
86
|
"./image": "./dist/image/index.js",
|
|
87
|
+
"./ld": "./dist/ld/index.js",
|
|
60
88
|
"./mime": "./dist/mime/index.js",
|
|
61
89
|
"./types": "./dist/types/index.js",
|
|
62
90
|
"./types/stream": "./dist/types/stream.js",
|
|
@@ -81,8 +109,8 @@
|
|
|
81
109
|
"tsx": "^4.20.4",
|
|
82
110
|
"typescript": "^5.9.2",
|
|
83
111
|
"typescript-eslint": "^8.40.0",
|
|
84
|
-
"@d0paminedriven/eslint-config": "0.1.0",
|
|
85
112
|
"@d0paminedriven/prettier-config": "0.1.0",
|
|
113
|
+
"@d0paminedriven/eslint-config": "0.1.0",
|
|
86
114
|
"@d0paminedriven/tsconfig": "0.1.0"
|
|
87
115
|
},
|
|
88
116
|
"prettier": "@d0paminedriven/prettier-config",
|