@d0paminedriven/fs 6.5.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +126 -12
- package/dist/{chunk-O4BKLMFV.js → chunk-CN45SMBB.js} +16 -1
- package/dist/{chunk-Y3TLKN7F.js → chunk-CTA73JRX.js} +321 -48
- package/dist/{chunk-MXEE2WS7.js → chunk-G27YIWW7.js} +1 -1
- package/dist/fs/index.cjs +333 -45
- package/dist/fs/index.d.cts +62 -10
- package/dist/fs/index.d.ts +62 -10
- package/dist/fs/index.js +3 -3
- package/dist/index.cjs +333 -45
- package/dist/index.js +3 -3
- package/dist/mime/index.cjs +15 -0
- package/dist/mime/index.d.cts +4 -3
- package/dist/mime/index.d.ts +4 -3
- package/dist/mime/index.js +1 -1
- package/dist/types/index.d.cts +9 -1
- package/dist/types/index.d.ts +9 -1
- package/dist/types/index.js +1 -1
- package/package.json +12 -3
package/dist/mime/index.cjs
CHANGED
|
@@ -443,6 +443,21 @@ var MimeService = class extends UrlService {
|
|
|
443
443
|
);
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
+
mimeToExt(mime) {
|
|
447
|
+
const extensions = this.toExtObj[mime];
|
|
448
|
+
if (extensions.length === 1) return extensions[0];
|
|
449
|
+
if (extensions.length === 2) {
|
|
450
|
+
return extensions[0];
|
|
451
|
+
}
|
|
452
|
+
if (extensions.length === 3) {
|
|
453
|
+
if (mime === "audio/ogg") return "ogg";
|
|
454
|
+
return extensions[0];
|
|
455
|
+
}
|
|
456
|
+
if (extensions.length === 5) {
|
|
457
|
+
return "sse";
|
|
458
|
+
}
|
|
459
|
+
return extensions[0];
|
|
460
|
+
}
|
|
446
461
|
assetType(url) {
|
|
447
462
|
const parsed = this.parseUrl(url);
|
|
448
463
|
if (!parsed) return void 0;
|
package/dist/mime/index.d.cts
CHANGED
|
@@ -457,15 +457,16 @@ declare class MimeService extends UrlService {
|
|
|
457
457
|
compareMimeToExt(p?: "mime" | "ext"): {
|
|
458
458
|
[k: string]: number;
|
|
459
459
|
};
|
|
460
|
-
|
|
460
|
+
mimeToExt(mime: keyof typeof this.toExtObj): "png" | "gif" | "bmp" | "webp" | "avif" | "epub" | "ttf" | "gz" | "jar" | "json" | "jsonld" | "doc" | "node" | "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" | "midi" | "otf" | "woff" | "woff2" | "hjif" | "hmpg" | "ivs" | "aces" | "apng" | "avci" | "dpx" | "emf" | "jpg" | "ktx" | "ktx2" | "svg" | "tiff" | "ico" | "glb" | "gltf" | "usdz" | "ics" | "css" | "csv" | "sse" | "ts" | "rs" | "py" | "txt" | "html" | "cjs" | "md" | "vtt" | "3gp" | "3g2" | "mp4" | "mpeg" | "ogv" | "weba" | "avi";
|
|
461
|
+
assetType<const T extends string>(url: T): "png" | "jpeg" | "gif" | "bmp" | "webp" | "avif" | "epub" | "ttf" | "gz" | "jar" | "json" | "jsonld" | "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" | "yaml" | "aac" | "mid" | "m4a" | "mp3" | "opus" | "ogg" | "oga" | "wav" | "midi" | "otf" | "woff" | "woff2" | "hjif" | "hmpg" | "ivs" | "ivt" | "aces" | "apng" | "avci" | "dpx" | "emf" | "jpg" | "ktx" | "ktx2" | "svg" | "tiff" | "tif" | "ico" | "glb" | "gltf" | "usdz" | "ics" | "css" | "csv" | "sse" | "ts" | "rs" | "py" | "txt" | "html" | "htm" | "cjs" | "mjs" | "md" | "vtt" | "3gp" | "3g2" | "mp4" | "m4v" | "mpeg" | "ogv" | "weba" | "avi" | undefined;
|
|
461
462
|
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 ["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"] | 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 ["video/mpeg"] | readonly ["application/vnd.apple.installer+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 ["video/webm"] | 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"] | 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"];
|
|
462
463
|
getMimeFor<const E extends FileExtension>(ext: E, opts?: {
|
|
463
464
|
type?: MimeTopLevelType;
|
|
464
465
|
}): FileExtensionToMimeType<E>;
|
|
465
|
-
isMimeFor<const E extends FileExtension>(ext: E, mime: FileExtensionToMimeType<E>): "
|
|
466
|
+
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" | "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" | "video/mpeg" | "application/vnd.apple.installer+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" | "video/webm" | "image/webp" | "font/woff" | "font/woff2" | "application/xhtml+xml" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/xml" | "application/vnd.mozilla.xul+xml" | "application/yaml" | "application/zip" | "application/x-zip-compressed" | "video/3gpp" | "video/3gpp2" | "application/x-7z-compressed" | undefined;
|
|
466
467
|
getMimeTypeForPath<T extends string>(path: T, opts?: {
|
|
467
468
|
type?: MimeTopLevelType;
|
|
468
|
-
}): "
|
|
469
|
+
}): "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" | "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" | "video/mpeg" | "application/vnd.apple.installer+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" | "video/webm" | "image/webp" | "font/woff" | "font/woff2" | "application/xhtml+xml" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/xml" | "application/vnd.mozilla.xul+xml" | "application/yaml" | "application/zip" | "application/x-zip-compressed" | "video/3gpp" | "video/3gpp2" | "application/x-7z-compressed";
|
|
469
470
|
}
|
|
470
471
|
|
|
471
472
|
export { type AllMimeTypes, type FileExtension, type FileExtensionToMimeType, type InferTopLevelPresent, MimeService, type MimeTopLevelType, type MimeType, type MimeTypeToFileExtension, type PresentMimeTopLevelTypes, extMimeMap, mimeToExt };
|
package/dist/mime/index.d.ts
CHANGED
|
@@ -457,15 +457,16 @@ declare class MimeService extends UrlService {
|
|
|
457
457
|
compareMimeToExt(p?: "mime" | "ext"): {
|
|
458
458
|
[k: string]: number;
|
|
459
459
|
};
|
|
460
|
-
|
|
460
|
+
mimeToExt(mime: keyof typeof this.toExtObj): "png" | "gif" | "bmp" | "webp" | "avif" | "epub" | "ttf" | "gz" | "jar" | "json" | "jsonld" | "doc" | "node" | "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" | "midi" | "otf" | "woff" | "woff2" | "hjif" | "hmpg" | "ivs" | "aces" | "apng" | "avci" | "dpx" | "emf" | "jpg" | "ktx" | "ktx2" | "svg" | "tiff" | "ico" | "glb" | "gltf" | "usdz" | "ics" | "css" | "csv" | "sse" | "ts" | "rs" | "py" | "txt" | "html" | "cjs" | "md" | "vtt" | "3gp" | "3g2" | "mp4" | "mpeg" | "ogv" | "weba" | "avi";
|
|
461
|
+
assetType<const T extends string>(url: T): "png" | "jpeg" | "gif" | "bmp" | "webp" | "avif" | "epub" | "ttf" | "gz" | "jar" | "json" | "jsonld" | "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" | "yaml" | "aac" | "mid" | "m4a" | "mp3" | "opus" | "ogg" | "oga" | "wav" | "midi" | "otf" | "woff" | "woff2" | "hjif" | "hmpg" | "ivs" | "ivt" | "aces" | "apng" | "avci" | "dpx" | "emf" | "jpg" | "ktx" | "ktx2" | "svg" | "tiff" | "tif" | "ico" | "glb" | "gltf" | "usdz" | "ics" | "css" | "csv" | "sse" | "ts" | "rs" | "py" | "txt" | "html" | "htm" | "cjs" | "mjs" | "md" | "vtt" | "3gp" | "3g2" | "mp4" | "m4v" | "mpeg" | "ogv" | "weba" | "avi" | undefined;
|
|
461
462
|
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 ["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"] | 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 ["video/mpeg"] | readonly ["application/vnd.apple.installer+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 ["video/webm"] | 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"] | 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"];
|
|
462
463
|
getMimeFor<const E extends FileExtension>(ext: E, opts?: {
|
|
463
464
|
type?: MimeTopLevelType;
|
|
464
465
|
}): FileExtensionToMimeType<E>;
|
|
465
|
-
isMimeFor<const E extends FileExtension>(ext: E, mime: FileExtensionToMimeType<E>): "
|
|
466
|
+
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" | "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" | "video/mpeg" | "application/vnd.apple.installer+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" | "video/webm" | "image/webp" | "font/woff" | "font/woff2" | "application/xhtml+xml" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/xml" | "application/vnd.mozilla.xul+xml" | "application/yaml" | "application/zip" | "application/x-zip-compressed" | "video/3gpp" | "video/3gpp2" | "application/x-7z-compressed" | undefined;
|
|
466
467
|
getMimeTypeForPath<T extends string>(path: T, opts?: {
|
|
467
468
|
type?: MimeTopLevelType;
|
|
468
|
-
}): "
|
|
469
|
+
}): "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" | "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" | "video/mpeg" | "application/vnd.apple.installer+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" | "video/webm" | "image/webp" | "font/woff" | "font/woff2" | "application/xhtml+xml" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/xml" | "application/vnd.mozilla.xul+xml" | "application/yaml" | "application/zip" | "application/x-zip-compressed" | "video/3gpp" | "video/3gpp2" | "application/x-7z-compressed";
|
|
469
470
|
}
|
|
470
471
|
|
|
471
472
|
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
package/dist/types/index.d.cts
CHANGED
|
@@ -315,7 +315,15 @@ type SizeOpts = {
|
|
|
315
315
|
interface ImageSize {
|
|
316
316
|
width: number;
|
|
317
317
|
height: number;
|
|
318
|
-
|
|
318
|
+
format: 'png' | 'jpeg' | 'gif' | 'bmp' | 'webp' | 'avif' | 'unknown';
|
|
319
|
+
frames: number;
|
|
320
|
+
animated: boolean;
|
|
321
|
+
hasAlpha: boolean | null;
|
|
322
|
+
orientation: number | null;
|
|
323
|
+
aspectRatio: number;
|
|
324
|
+
colorSpace: 'rgb' | 'rgba' | 'grayscale' | 'grayscale-alpha' | 'indexed' | 'cmyk' | 'ycbcr' | 'ycck' | 'unknown';
|
|
325
|
+
iccProfile: string | null;
|
|
326
|
+
exifDateTimeOriginal: string | null;
|
|
319
327
|
}
|
|
320
328
|
interface BoxInfo {
|
|
321
329
|
pos: number;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -315,7 +315,15 @@ type SizeOpts = {
|
|
|
315
315
|
interface ImageSize {
|
|
316
316
|
width: number;
|
|
317
317
|
height: number;
|
|
318
|
-
|
|
318
|
+
format: 'png' | 'jpeg' | 'gif' | 'bmp' | 'webp' | 'avif' | 'unknown';
|
|
319
|
+
frames: number;
|
|
320
|
+
animated: boolean;
|
|
321
|
+
hasAlpha: boolean | null;
|
|
322
|
+
orientation: number | null;
|
|
323
|
+
aspectRatio: number;
|
|
324
|
+
colorSpace: 'rgb' | 'rgba' | 'grayscale' | 'grayscale-alpha' | 'indexed' | 'cmyk' | 'ycbcr' | 'ycck' | 'unknown';
|
|
325
|
+
iccProfile: string | null;
|
|
326
|
+
exifDateTimeOriginal: string | null;
|
|
319
327
|
}
|
|
320
328
|
interface BoxInfo {
|
|
321
329
|
pos: number;
|
package/dist/types/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d0paminedriven/fs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
|
+
"homepage": "https://github.com/DopamineDriven/d0paminedriven/blob/master/packages/fs/README.md",
|
|
5
|
+
"author": {
|
|
6
|
+
"email": "andrew@windycitydevs.io",
|
|
7
|
+
"name": "Andrew Ross"
|
|
8
|
+
},
|
|
4
9
|
"description": "convenient fs helpers",
|
|
10
|
+
"repository": {
|
|
11
|
+
"url": "https://github.com/DopamineDriven/d0paminedriven/tree/master",
|
|
12
|
+
"directory": "./packages/fs"
|
|
13
|
+
},
|
|
5
14
|
"publishConfig": {
|
|
6
15
|
"access": "public"
|
|
7
16
|
},
|
|
@@ -64,9 +73,9 @@
|
|
|
64
73
|
"tsx": "^4.20.4",
|
|
65
74
|
"typescript": "^5.9.2",
|
|
66
75
|
"typescript-eslint": "^8.40.0",
|
|
67
|
-
"@d0paminedriven/
|
|
76
|
+
"@d0paminedriven/eslint-config": "0.1.0",
|
|
68
77
|
"@d0paminedriven/tsconfig": "0.1.0",
|
|
69
|
-
"@d0paminedriven/
|
|
78
|
+
"@d0paminedriven/prettier-config": "0.1.0"
|
|
70
79
|
},
|
|
71
80
|
"prettier": "@d0paminedriven/prettier-config",
|
|
72
81
|
"scripts": {
|