@d0paminedriven/fs 12.5.0 → 12.7.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/docs/index.d.ts +1 -2
- package/dist/docs/index.js +0 -2
- package/dist/extract/client.d.ts +1 -2
- package/dist/extract/client.js +0 -2
- package/dist/extract/index.d.ts +1 -2
- package/dist/extract/index.js +0 -2
- package/dist/fs/index.d.ts +1 -2
- package/dist/fs/index.js +0 -2
- package/dist/fs-atomic/index.d.ts +2 -3
- package/dist/fs-atomic/index.js +0 -2
- package/dist/fs-base/index.d.ts +2 -3
- package/dist/fs-base/index.js +1 -3
- package/dist/fs-core/index.d.ts +3 -13
- package/dist/fs-core/index.js +0 -2
- package/dist/fs-fetch/index.d.ts +1 -2
- package/dist/fs-fetch/index.js +0 -2
- package/dist/fs-size/index.d.ts +1 -2
- package/dist/fs-size/index.js +0 -2
- package/dist/fs-tmp/index.d.ts +1 -2
- package/dist/fs-tmp/index.js +0 -2
- package/dist/images/index.d.ts +1 -2
- package/dist/images/index.js +0 -2
- package/dist/images/workup.d.ts +1 -2
- package/dist/images/workup.js +0 -2
- package/dist/index.d.ts +1 -2
- package/dist/ld/index.d.ts +1 -2
- package/dist/ld/index.js +0 -2
- package/dist/mime/index.d.ts +1 -2
- package/dist/mime/index.js +0 -2
- package/dist/mixins/index.d.ts +1 -2
- package/dist/mixins/index.js +0 -2
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.js +0 -2
- package/dist/types/stream.d.ts +1 -3
- package/dist/url/index.d.ts +1 -2
- package/dist/url/index.js +0 -2
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.js +0 -2
- package/package.json +3 -3
package/dist/docs/index.d.ts
CHANGED
|
@@ -147,5 +147,4 @@ export declare class DocMetadataExtractor {
|
|
|
147
147
|
extractDocViaPath(filePath: string, mime: string): Promise<DocSpecs<unknown>>;
|
|
148
148
|
getDocumentSpecsWorkup(buffer: Buffer<ArrayBufferLike>, mime: "application/pdf", fileName?: string): DocSpecs<PdfImageAnalysisMetadata>;
|
|
149
149
|
getDocumentSpecsWorkup(buffer: Buffer<ArrayBufferLike>, mime: string, fileName?: string): DocSpecs<unknown>;
|
|
150
|
-
}
|
|
151
|
-
//# sourceMappingURL=index.d.ts.map
|
|
150
|
+
}
|
package/dist/docs/index.js
CHANGED
package/dist/extract/client.d.ts
CHANGED
package/dist/extract/client.js
CHANGED
package/dist/extract/index.d.ts
CHANGED
package/dist/extract/index.js
CHANGED
package/dist/fs/index.d.ts
CHANGED
|
@@ -15,5 +15,4 @@ export default class Fs extends FsFetch {
|
|
|
15
15
|
getSpecsStream(filePath: string, size?: number): Promise<ExpandedDocSpecs<unknown> | ExpandedImgSpecs>;
|
|
16
16
|
getSpecsStreamTmp(filename: string): Promise<ExpandedDocSpecs<unknown> | ExpandedImgSpecs>;
|
|
17
17
|
protected readBytes(stream: Readable, size?: number): Promise<Buffer>;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
|
18
|
+
}
|
package/dist/fs/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export declare class FsAtomic extends FsBase {
|
|
|
5
5
|
constructor(cwd: string);
|
|
6
6
|
executeCommand: <const T extends string>({ command, ...options }: ExecuteCommandProps<T>) => Buffer<ArrayBuffer>;
|
|
7
7
|
mkdirSync<const T extends string>(path: T, options?: MkDirSyncOptions): string | undefined;
|
|
8
|
-
mkdirSyncAbs<const T extends string>(path: T, options?: MkDirSyncOptions): string | undefined;
|
|
8
|
+
mkdirSyncAbs<const T extends readonly string[] = readonly string[]>(path: T, options?: MkDirSyncOptions): string | undefined;
|
|
9
9
|
generateDirIfDNE<const T extends string>(path: T, options?: MkDirSyncOptions): string | undefined;
|
|
10
10
|
fileToBuffer: <const T extends string>(path: T) => Buffer<ArrayBuffer>;
|
|
11
11
|
fileToBufferAsync: <const T extends string>(path: T) => Promise<NonSharedBuffer>;
|
|
@@ -22,5 +22,4 @@ export declare class FsAtomic extends FsBase {
|
|
|
22
22
|
mkdirTmp(path: string, options?: MkDirSyncOptions): string | undefined;
|
|
23
23
|
generateDirIfDNETmp<const T extends string>(path: T, options?: MkDirSyncOptions): string | undefined;
|
|
24
24
|
rmTmpFile<const V extends string>(filename: V): void;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=index.d.ts.map
|
|
25
|
+
}
|
package/dist/fs-atomic/index.js
CHANGED
package/dist/fs-base/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare class FsBase extends MimeService {
|
|
|
16
16
|
get eol(): string;
|
|
17
17
|
private get env();
|
|
18
18
|
relPath<const T extends string>(path: T): string;
|
|
19
|
-
absPath<const T extends string>(path: T): string;
|
|
19
|
+
absPath<const T extends readonly string[] = readonly string[]>(path: T): string;
|
|
20
20
|
parseDotEnv(): expand.DotenvParseOutput | undefined;
|
|
21
21
|
isHomeTargeted(path: string): boolean;
|
|
22
22
|
isRootPathTargeted<const T extends string>(path: T): boolean;
|
|
@@ -102,5 +102,4 @@ export declare class FsBase extends MimeService {
|
|
|
102
102
|
* @returns an array of strings representing the contents of the directory
|
|
103
103
|
*/
|
|
104
104
|
readDir<const T extends string>(path: T, options?: ReadDirOptions): string[];
|
|
105
|
-
}
|
|
106
|
-
//# sourceMappingURL=index.d.ts.map
|
|
105
|
+
}
|
package/dist/fs-base/index.js
CHANGED
|
@@ -46,7 +46,7 @@ var FsBase = class extends MimeService {
|
|
|
46
46
|
return relative(this.cwd, path);
|
|
47
47
|
}
|
|
48
48
|
absPath(path) {
|
|
49
|
-
return resolve(
|
|
49
|
+
return resolve(...path);
|
|
50
50
|
}
|
|
51
51
|
parseDotEnv() {
|
|
52
52
|
const env = expand.expand(this.env);
|
|
@@ -195,5 +195,3 @@ var FsBase = class extends MimeService {
|
|
|
195
195
|
}
|
|
196
196
|
};
|
|
197
197
|
export { FsBase };
|
|
198
|
-
|
|
199
|
-
//# sourceMappingURL=index.js.map
|
package/dist/fs-core/index.d.ts
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WriteFileAsyncOptions, WriteStreamOptions, WriteableDataType } from "../types/index.js";
|
|
2
2
|
import { FsSize } from "../fs-size/index.js";
|
|
3
|
-
import { WriteFileAsyncDataType, WriteFileAsyncOptions, WriteStreamOptions, WriteableDataType } from "../types/index.js";
|
|
4
|
-
export interface CreateReadStreamOptions extends Abortable {
|
|
5
|
-
encoding?: BufferEncoding | null | undefined;
|
|
6
|
-
autoClose?: boolean | undefined;
|
|
7
|
-
emitClose?: boolean | undefined;
|
|
8
|
-
start?: number | undefined;
|
|
9
|
-
end?: number | undefined;
|
|
10
|
-
highWaterMark?: number | undefined;
|
|
11
|
-
}
|
|
12
3
|
export declare class FsCore extends FsSize {
|
|
13
4
|
cwd: string;
|
|
14
5
|
constructor(cwd: string);
|
|
15
6
|
withWs<const T extends string>(path: T, data: WriteableDataType, options?: WriteStreamOptions): string | boolean | undefined;
|
|
16
7
|
withWsAsync<const T extends string>(path: T, data: WriteableDataType, options?: WriteStreamOptions): Promise<string | boolean | undefined>;
|
|
17
|
-
writeFileAsync: <const T extends string>(path: T, data:
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
|
8
|
+
writeFileAsync: <const T extends string>(path: T, data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView>, options?: WriteFileAsyncOptions) => Promise<string | void>;
|
|
9
|
+
}
|
package/dist/fs-core/index.js
CHANGED
package/dist/fs-fetch/index.d.ts
CHANGED
|
@@ -45,5 +45,4 @@ export declare class FsFetch extends FsTmp {
|
|
|
45
45
|
* It streams the data directly to disk for files of all sizes instead of loading it all into memory
|
|
46
46
|
*/
|
|
47
47
|
fetchRemoteWriteLocalLargeFiles<const I extends string, const O extends string>(inputUrl: I, outputPathI: O, useDetectedExtension?: boolean, verbose?: boolean): Promise<void>;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=index.d.ts.map
|
|
48
|
+
}
|
package/dist/fs-fetch/index.js
CHANGED
package/dist/fs-size/index.d.ts
CHANGED
|
@@ -12,5 +12,4 @@ export declare class FsSize extends FsAtomic {
|
|
|
12
12
|
getSize<const S extends Unit | Lowercase<Unit> | "auto">(size: number | bigint, target: S, opts?: SizeOpts): string | number;
|
|
13
13
|
fileSizeMb<const T extends string>(path: T): number;
|
|
14
14
|
fileSize<const T extends string, const S extends Unit | Lowercase<Unit> | "auto">(path: T, target: S, opts?: SizeOpts): string | number;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
|
15
|
+
}
|
package/dist/fs-size/index.js
CHANGED
package/dist/fs-tmp/index.d.ts
CHANGED
package/dist/fs-tmp/index.js
CHANGED
package/dist/images/index.d.ts
CHANGED
package/dist/images/index.js
CHANGED
package/dist/images/workup.d.ts
CHANGED
|
@@ -22,5 +22,4 @@ export declare class ImgMetadataExtractorWorkup {
|
|
|
22
22
|
xmpToColorSpaceWorkup<const T extends ImageSpecs["colorSpace"] | "prophoto rgb" | "display p3" | "adobe rgb (1998)" | "rgb" | "grayscale", const V extends "iccprofile" | "colormode">(space: T, target: V): `<photoshop:${V}>${T}</photoshop:${V}>`;
|
|
23
23
|
mapXmpToColorSpace(xmpText: string, fallback: ImageSpecs["colorSpace"]): "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
|
|
24
24
|
mapProfileToColorSpace(profileName: string | null, fallback: ImageSpecs["colorSpace"]): "unknown" | "cmyk" | "lab" | "srgb" | "display_p3" | "adobe_rgb" | "prophoto_rgb" | "rec2020" | "rec709" | "xyz" | "gray";
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=workup.d.ts.map
|
|
25
|
+
}
|
package/dist/images/workup.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -44,5 +44,4 @@ declare global {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
export { type Abortable, type AllMimeTypes, type ArrFieldReplacer, type ArrayBufferView, type ArrayOrReadOnlyArray, type AsyncIter, type BashEnv, type Bin, type BoxInfo, type BufferEncodingUnion, type CTR, type CommonExecOptions, type CommonOptions, type ConditionalPromise, type ConditionalToRequired, type Constructor, type DX, type DeepPartial, type DeepPartialFields, type DeepReplace, type Depth, type Dict, DocMetadataExtractor, DocMixin, type DocSpecs, type Equal, type ExcludeFieldEnumerable, type ExecSyncOptions, type ExecSyncOptionsWithBufferEncoding, type ExecSyncOptionsWithStringEncoding, type ExecuteCommandProps, type ExpandedDocSpecs, type ExpandedImgSpecs, type Expect, type Extends, Extract, ExtractClient, type ExtractorHardenedOptions, type ExtractorOptions, type FieldToConditionallyNever, type FileExtension, type FileExtensionToMimeType, Fs, FsAtomic, FsBase, FsCore, FsFetch, FsSize, FsTmp, type HandleQueryParamsOrHash, type IOType, type ImageSpecs, ImgMetadataExtractor, ImgMetadataExtractorWorkup, ImgMixin, type InferDepth, type InferExtensionIfPresent, type InferTopLevelPresent, type InjectScriptsProps, type IsExact, type IsOptional, type LastSegment, LevenshteinDistance, MimeService, type MimeTopLevelType, type MimeType, type MimeTypeToFileExtension, type MkDirOptions, type MkDirSyncOptions, type MkDirSyncProps, type Mode, type NoParamCallback, type ObjEncodingOptions, type OmitSrc, type OnlyOptional, type OnlyRequired, type OpenMode, type ParsedUrlInfo, type PdfDocSpecs, type PresentMimeTopLevelTypes, type PresentationDocSpecs, 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 SplitForwardSlash, type SpreadSheetDocSpecs, type StdioOptions, type Streamable, type TCN, type TypedArray, type Unenumerate, type Unit, type UnwrapPromise, type UrlFileExt, UrlService, UtilsService, type WebRS, type Without, type WriteFileAsyncDataType, type WriteFileAsyncOptions, type WriteFileAsyncProps, type WriteStreamOptions, type WriteStreamProps, type WriteableDataType, type XOR, type ZipEntry, create, createInstance, extMimeMap, mimeToExt, unitsObj };
|
|
48
|
-
//# sourceMappingURL=index.d.ts.map
|
|
47
|
+
export { type Abortable, type AllMimeTypes, type ArrFieldReplacer, type ArrayBufferView, type ArrayOrReadOnlyArray, type AsyncIter, type BashEnv, type Bin, type BoxInfo, type BufferEncodingUnion, type CTR, type CommonExecOptions, type CommonOptions, type ConditionalPromise, type ConditionalToRequired, type Constructor, type DX, type DeepPartial, type DeepPartialFields, type DeepReplace, type Depth, type Dict, DocMetadataExtractor, DocMixin, type DocSpecs, type Equal, type ExcludeFieldEnumerable, type ExecSyncOptions, type ExecSyncOptionsWithBufferEncoding, type ExecSyncOptionsWithStringEncoding, type ExecuteCommandProps, type ExpandedDocSpecs, type ExpandedImgSpecs, type Expect, type Extends, Extract, ExtractClient, type ExtractorHardenedOptions, type ExtractorOptions, type FieldToConditionallyNever, type FileExtension, type FileExtensionToMimeType, Fs, FsAtomic, FsBase, FsCore, FsFetch, FsSize, FsTmp, type HandleQueryParamsOrHash, type IOType, type ImageSpecs, ImgMetadataExtractor, ImgMetadataExtractorWorkup, ImgMixin, type InferDepth, type InferExtensionIfPresent, type InferTopLevelPresent, type InjectScriptsProps, type IsExact, type IsOptional, type LastSegment, LevenshteinDistance, MimeService, type MimeTopLevelType, type MimeType, type MimeTypeToFileExtension, type MkDirOptions, type MkDirSyncOptions, type MkDirSyncProps, type Mode, type NoParamCallback, type ObjEncodingOptions, type OmitSrc, type OnlyOptional, type OnlyRequired, type OpenMode, type ParsedUrlInfo, type PdfDocSpecs, type PresentMimeTopLevelTypes, type PresentationDocSpecs, 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 SplitForwardSlash, type SpreadSheetDocSpecs, type StdioOptions, type Streamable, type TCN, type TypedArray, type Unenumerate, type Unit, type UnwrapPromise, type UrlFileExt, UrlService, UtilsService, type WebRS, type Without, type WriteFileAsyncDataType, type WriteFileAsyncOptions, type WriteFileAsyncProps, type WriteStreamOptions, type WriteStreamProps, type WriteableDataType, type XOR, type ZipEntry, create, createInstance, extMimeMap, mimeToExt, unitsObj };
|
package/dist/ld/index.d.ts
CHANGED
package/dist/ld/index.js
CHANGED
package/dist/mime/index.d.ts
CHANGED
|
@@ -553,5 +553,4 @@ export declare class MimeService extends UrlService {
|
|
|
553
553
|
getMimeTypeForPath<T extends string>(path: T, opts?: {
|
|
554
554
|
type?: MimeTopLevelType;
|
|
555
555
|
}): "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" | "text/x-c" | "application/x-cdf" | "text/javascript" | "application/node" | "text/x-c++" | "text/x-csharp" | "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" | "text/x-go" | "application/gzip" | "application/x-gzip" | "image/heic" | "haptics/hjif" | "haptics/hmpg" | "text/html" | "image/vnd.microsoft.icon" | "text/calendar" | "haptics/ivs" | "application/java-archive" | "text/x-java" | "image/jpeg" | "application/json" | "application/jsonl" | "text/x-jsonl" | "application/ld+json" | "application/jsonc" | "application/json5" | "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" | "text/x-php" | "application/x-httpd-php" | "application/vnd.apple.pkpass" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "text/x-python" | "text/x-script.python" | "application/x-python-code" | "application/vnd.rar" | "text/x-ruby" | "text/rust" | "application/rtf" | "application/x-sh" | "application/sql" | "text/event-stream" | "image/svg+xml" | "application/x-tar" | "text/x-tex" | "image/tiff" | "application/toml" | "text/typescript" | "application/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";
|
|
556
|
-
}
|
|
557
|
-
//# sourceMappingURL=index.d.ts.map
|
|
556
|
+
}
|
package/dist/mime/index.js
CHANGED
package/dist/mixins/index.d.ts
CHANGED
package/dist/mixins/index.js
CHANGED
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
package/dist/types/stream.d.ts
CHANGED
|
@@ -3,6 +3,4 @@ import { Readable } from "node:stream";
|
|
|
3
3
|
export type Bin = Buffer | Uint8Array;
|
|
4
4
|
export type WebRS = ReadableStream<Uint8Array>;
|
|
5
5
|
export type AsyncIter = AsyncIterable<Uint8Array>;
|
|
6
|
-
|
|
7
|
-
export type Streamable = string | Bin | WebRS | AsyncIter | Readable;
|
|
8
|
-
//# sourceMappingURL=stream.d.ts.map
|
|
6
|
+
export type Streamable = string | Bin | WebRS | AsyncIter | Readable;
|
package/dist/url/index.d.ts
CHANGED
package/dist/url/index.js
CHANGED
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d0paminedriven/fs",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.7.0",
|
|
4
4
|
"homepage": "https://github.com/DopamineDriven/d0paminedriven/blob/master/packages/fs/README.md",
|
|
5
5
|
"author": "Andrew Ross",
|
|
6
6
|
"description": "convenient fs helpers",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"./utils": "./dist/utils/index.js"
|
|
115
115
|
},
|
|
116
116
|
"dependencies": {
|
|
117
|
-
"@d0paminedriven/mimedown": "^0.
|
|
117
|
+
"@d0paminedriven/mimedown": "^0.8.0",
|
|
118
118
|
"@d0paminedriven/pdfdown": "^0.20.0",
|
|
119
119
|
"dotenv": "^18.0.10",
|
|
120
120
|
"dotenv-expand": "^1000.0.0",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"@d0paminedriven/eslint-config": "0.1.0",
|
|
125
125
|
"@d0paminedriven/prettier-config": "0.1.0",
|
|
126
126
|
"@d0paminedriven/tsconfig": "0.1.0",
|
|
127
|
-
"@types/node": "^26.6.
|
|
127
|
+
"@types/node": "^26.6.10",
|
|
128
128
|
"@typescript/native-preview": "^7.0.0-dev.20260707.2",
|
|
129
129
|
"dotenv-cli": "^11.1.0",
|
|
130
130
|
"eslint": "^10.15.0",
|