@d0paminedriven/fs 7.2.0 → 7.3.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.
Files changed (44) hide show
  1. package/README.md +104 -51
  2. package/dist/chunk-2IRCHZCF.js +75 -0
  3. package/dist/{chunk-KUGIFRTF.js → chunk-2XQ44ZWR.js} +339 -3
  4. package/dist/{chunk-O2P3L3CJ.js → chunk-6HHKXBIM.js} +5 -2
  5. package/dist/chunk-HPM4IQQR.js +69 -0
  6. package/dist/{chunk-GH6MFTV5.js → chunk-KNLXF622.js} +2 -2
  7. package/dist/chunk-KOKPGEU4.js +69 -0
  8. package/dist/chunk-LQP2FYMK.js +237 -0
  9. package/dist/chunk-NHYRCNMW.js +107 -0
  10. package/dist/chunk-NOOFSAF4.js +165 -0
  11. package/dist/chunk-PTXZQBLV.js +367 -0
  12. package/dist/{chunk-MRKO3PAA.js → chunk-R63XI7FS.js} +1 -1
  13. package/dist/{chunk-6FJJLFJL.js → chunk-UW52DMHT.js} +2 -2
  14. package/dist/chunk-Z2WZLZC4.js +75 -0
  15. package/dist/fs/index.d.ts +18 -329
  16. package/dist/fs/index.js +13 -6
  17. package/dist/fs-atomic/index.d.ts +38 -0
  18. package/dist/fs-atomic/index.js +14 -0
  19. package/dist/fs-base/index.d.ts +112 -0
  20. package/dist/fs-base/index.js +13 -0
  21. package/dist/fs-core/index.d.ts +24 -0
  22. package/dist/fs-core/index.js +17 -0
  23. package/dist/fs-fetch/index.d.ts +64 -0
  24. package/dist/fs-fetch/index.js +19 -0
  25. package/dist/fs-size/index.d.ts +30 -0
  26. package/dist/fs-size/index.js +16 -0
  27. package/dist/fs-tmp/index.d.ts +194 -0
  28. package/dist/fs-tmp/index.js +18 -0
  29. package/dist/image/index.d.ts +35 -1
  30. package/dist/image/index.js +5 -4
  31. package/dist/index.d.ts +11 -4
  32. package/dist/index.js +36 -8
  33. package/dist/ld/index.d.ts +14 -0
  34. package/dist/ld/index.js +8 -0
  35. package/dist/mime/index.d.ts +5 -4
  36. package/dist/mime/index.js +4 -3
  37. package/dist/types/index.d.ts +13 -13
  38. package/dist/types/index.js +1 -1
  39. package/dist/url/index.d.ts +1 -0
  40. package/dist/url/index.js +3 -2
  41. package/dist/utils/index.d.ts +2 -1
  42. package/dist/utils/index.js +2 -1
  43. package/package.json +31 -3
  44. package/dist/chunk-SYISQ57E.js +0 -895
@@ -2,9 +2,10 @@ import {
2
2
  MimeService,
3
3
  extMimeMap,
4
4
  mimeToExt
5
- } from "../chunk-GH6MFTV5.js";
6
- import "../chunk-6FJJLFJL.js";
7
- import "../chunk-O2P3L3CJ.js";
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,
@@ -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 = ((ObjEncodingOptions & {
111
+ type WriteFileAsyncOptions = (ObjEncodingOptions & {
112
112
  mode?: Mode | undefined;
113
113
  flag?: OpenMode | undefined;
114
- } & Abortable) | BufferEncodingUnion | null);
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 RmDirOptions = {
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 false
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 RmDirProps = {
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 RmDirOptions, type RmDirProps, 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 };
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 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  unitsObj
3
- } from "../chunk-MRKO3PAA.js";
3
+ } from "../chunk-R63XI7FS.js";
4
4
  import "../chunk-7QVYU63E.js";
5
5
  export {
6
6
  unitsObj
@@ -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
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  UrlService
3
- } from "../chunk-6FJJLFJL.js";
4
- import "../chunk-O2P3L3CJ.js";
3
+ } from "../chunk-UW52DMHT.js";
4
+ import "../chunk-6HHKXBIM.js";
5
+ import "../chunk-Z2WZLZC4.js";
5
6
  import "../chunk-7QVYU63E.js";
6
7
  export {
7
8
  UrlService
@@ -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 }: {
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  UtilsService
3
- } from "../chunk-O2P3L3CJ.js";
3
+ } from "../chunk-6HHKXBIM.js";
4
+ import "../chunk-Z2WZLZC4.js";
4
5
  import "../chunk-7QVYU63E.js";
5
6
  export {
6
7
  UtilsService
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d0paminedriven/fs",
3
- "version": "7.2.0",
3
+ "version": "7.3.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
- "fs": [
28
- "dist/fs/index.d.ts"
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",