@simplysm/core-node 13.0.75 → 13.0.77

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.
@@ -5,34 +5,34 @@ import "@simplysm/core-common";
5
5
  * Checks if a file or directory exists (synchronous).
6
6
  * @param targetPath - Path to check
7
7
  */
8
- export declare function fsExistsSync(targetPath: string): boolean;
8
+ export declare function existsSync(targetPath: string): boolean;
9
9
  /**
10
10
  * Checks if a file or directory exists (asynchronous).
11
11
  * @param targetPath - Path to check
12
12
  */
13
- export declare function fsExists(targetPath: string): Promise<boolean>;
13
+ export declare function exists(targetPath: string): Promise<boolean>;
14
14
  /**
15
15
  * Creates a directory (recursive).
16
16
  * @param targetPath - Directory path to create
17
17
  */
18
- export declare function fsMkdirSync(targetPath: string): void;
18
+ export declare function mkdirSync(targetPath: string): void;
19
19
  /**
20
20
  * Creates a directory (recursive, asynchronous).
21
21
  * @param targetPath - Directory path to create
22
22
  */
23
- export declare function fsMkdir(targetPath: string): Promise<void>;
23
+ export declare function mkdir(targetPath: string): Promise<void>;
24
24
  /**
25
25
  * Deletes a file or directory.
26
26
  * @param targetPath - Path to delete
27
- * @remarks The synchronous version fails immediately without retries. Use fsRm for cases with potential transient errors like file locks.
27
+ * @remarks The synchronous version fails immediately without retries. Use rm for cases with potential transient errors like file locks.
28
28
  */
29
- export declare function fsRmSync(targetPath: string): void;
29
+ export declare function rmSync(targetPath: string): void;
30
30
  /**
31
31
  * Deletes a file or directory (asynchronous).
32
32
  * @param targetPath - Path to delete
33
33
  * @remarks The asynchronous version retries up to 6 times (500ms interval) for transient errors like file locks.
34
34
  */
35
- export declare function fsRm(targetPath: string): Promise<void>;
35
+ export declare function rm(targetPath: string): Promise<void>;
36
36
  /**
37
37
  * Copies a file or directory.
38
38
  *
@@ -47,7 +47,7 @@ export declare function fsRm(targetPath: string): Promise<void>;
47
47
  * the filter function is applied recursively to all children (direct and indirect).
48
48
  * Returning false for a directory skips that directory and all its contents.
49
49
  */
50
- export declare function fsCopySync(sourcePath: string, targetPath: string, filter?: (absolutePath: string) => boolean): void;
50
+ export declare function copySync(sourcePath: string, targetPath: string, filter?: (absolutePath: string) => boolean): void;
51
51
  /**
52
52
  * Copies a file or directory (asynchronous).
53
53
  *
@@ -62,56 +62,56 @@ export declare function fsCopySync(sourcePath: string, targetPath: string, filte
62
62
  * the filter function is applied recursively to all children (direct and indirect).
63
63
  * Returning false for a directory skips that directory and all its contents.
64
64
  */
65
- export declare function fsCopy(sourcePath: string, targetPath: string, filter?: (absolutePath: string) => boolean): Promise<void>;
65
+ export declare function copy(sourcePath: string, targetPath: string, filter?: (absolutePath: string) => boolean): Promise<void>;
66
66
  /**
67
67
  * Reads a file as a UTF-8 string.
68
68
  * @param targetPath - Path of the file to read
69
69
  */
70
- export declare function fsReadSync(targetPath: string): string;
70
+ export declare function readSync(targetPath: string): string;
71
71
  /**
72
72
  * Reads a file as a UTF-8 string (asynchronous).
73
73
  * @param targetPath - Path of the file to read
74
74
  */
75
- export declare function fsRead(targetPath: string): Promise<string>;
75
+ export declare function read(targetPath: string): Promise<string>;
76
76
  /**
77
77
  * Reads a file as a Buffer.
78
78
  * @param targetPath - Path of the file to read
79
79
  */
80
- export declare function fsReadBufferSync(targetPath: string): Buffer;
80
+ export declare function readBufferSync(targetPath: string): Buffer;
81
81
  /**
82
82
  * Reads a file as a Buffer (asynchronous).
83
83
  * @param targetPath - Path of the file to read
84
84
  */
85
- export declare function fsReadBuffer(targetPath: string): Promise<Buffer>;
85
+ export declare function readBuffer(targetPath: string): Promise<Buffer>;
86
86
  /**
87
87
  * Reads a JSON file (using JsonConvert).
88
88
  * @param targetPath - Path of the JSON file to read
89
89
  */
90
- export declare function fsReadJsonSync<TData = unknown>(targetPath: string): TData;
90
+ export declare function readJsonSync<TData = unknown>(targetPath: string): TData;
91
91
  /**
92
92
  * Reads a JSON file (using JsonConvert, asynchronous).
93
93
  * @param targetPath - Path of the JSON file to read
94
94
  */
95
- export declare function fsReadJson<TData = unknown>(targetPath: string): Promise<TData>;
95
+ export declare function readJson<TData = unknown>(targetPath: string): Promise<TData>;
96
96
  /**
97
97
  * Writes data to a file (auto-creates parent directories).
98
98
  * @param targetPath - Path of the file to write
99
99
  * @param data - Data to write (string or binary)
100
100
  */
101
- export declare function fsWriteSync(targetPath: string, data: string | Uint8Array): void;
101
+ export declare function writeSync(targetPath: string, data: string | Uint8Array): void;
102
102
  /**
103
103
  * Writes data to a file (auto-creates parent directories, asynchronous).
104
104
  * @param targetPath - Path of the file to write
105
105
  * @param data - Data to write (string or binary)
106
106
  */
107
- export declare function fsWrite(targetPath: string, data: string | Uint8Array): Promise<void>;
107
+ export declare function write(targetPath: string, data: string | Uint8Array): Promise<void>;
108
108
  /**
109
109
  * Writes data to a JSON file (using JsonConvert).
110
110
  * @param targetPath - Path of the JSON file to write
111
111
  * @param data - Data to write
112
112
  * @param options - JSON serialization options
113
113
  */
114
- export declare function fsWriteJsonSync(targetPath: string, data: unknown, options?: {
114
+ export declare function writeJsonSync(targetPath: string, data: unknown, options?: {
115
115
  replacer?: (this: unknown, key: string | undefined, value: unknown) => unknown;
116
116
  space?: string | number;
117
117
  }): void;
@@ -121,7 +121,7 @@ export declare function fsWriteJsonSync(targetPath: string, data: unknown, optio
121
121
  * @param data - Data to write
122
122
  * @param options - JSON serialization options
123
123
  */
124
- export declare function fsWriteJson(targetPath: string, data: unknown, options?: {
124
+ export declare function writeJson(targetPath: string, data: unknown, options?: {
125
125
  replacer?: (this: unknown, key: string | undefined, value: unknown) => unknown;
126
126
  space?: string | number;
127
127
  }): Promise<void>;
@@ -129,51 +129,51 @@ export declare function fsWriteJson(targetPath: string, data: unknown, options?:
129
129
  * Reads the contents of a directory.
130
130
  * @param targetPath - Path of the directory to read
131
131
  */
132
- export declare function fsReaddirSync(targetPath: string): string[];
132
+ export declare function readdirSync(targetPath: string): string[];
133
133
  /**
134
134
  * Reads the contents of a directory (asynchronous).
135
135
  * @param targetPath - Path of the directory to read
136
136
  */
137
- export declare function fsReaddir(targetPath: string): Promise<string[]>;
137
+ export declare function readdir(targetPath: string): Promise<string[]>;
138
138
  /**
139
139
  * Gets file/directory information (follows symbolic links).
140
140
  * @param targetPath - Path to query information for
141
141
  */
142
- export declare function fsStatSync(targetPath: string): fs.Stats;
142
+ export declare function statSync(targetPath: string): fs.Stats;
143
143
  /**
144
144
  * Gets file/directory information (follows symbolic links, asynchronous).
145
145
  * @param targetPath - Path to query information for
146
146
  */
147
- export declare function fsStat(targetPath: string): Promise<fs.Stats>;
147
+ export declare function stat(targetPath: string): Promise<fs.Stats>;
148
148
  /**
149
149
  * Gets file/directory information (does not follow symbolic links).
150
150
  * @param targetPath - Path to query information for
151
151
  */
152
- export declare function fsLstatSync(targetPath: string): fs.Stats;
152
+ export declare function lstatSync(targetPath: string): fs.Stats;
153
153
  /**
154
154
  * Gets file/directory information (does not follow symbolic links, asynchronous).
155
155
  * @param targetPath - Path to query information for
156
156
  */
157
- export declare function fsLstat(targetPath: string): Promise<fs.Stats>;
157
+ export declare function lstat(targetPath: string): Promise<fs.Stats>;
158
158
  /**
159
159
  * Searches for files using a glob pattern.
160
160
  * @param pattern - Glob pattern (e.g., "**\/*.ts")
161
161
  * @param options - glob options
162
162
  * @returns Array of absolute paths for matched files
163
163
  */
164
- export declare function fsGlobSync(pattern: string, options?: GlobOptions): string[];
164
+ export declare function globSync(pattern: string, options?: GlobOptions): string[];
165
165
  /**
166
166
  * Searches for files using a glob pattern (asynchronous).
167
167
  * @param pattern - Glob pattern (e.g., "**\/*.ts")
168
168
  * @param options - glob options
169
169
  * @returns Array of absolute paths for matched files
170
170
  */
171
- export declare function fsGlob(pattern: string, options?: GlobOptions): Promise<string[]>;
171
+ export declare function glob(pattern: string, options?: GlobOptions): Promise<string[]>;
172
172
  /**
173
173
  * Recursively searches and deletes empty directories under a specified directory.
174
174
  * If all child directories are deleted and a parent becomes empty, it will also be deleted.
175
175
  */
176
- export declare function fsClearEmptyDirectory(dirPath: string): Promise<void>;
176
+ export declare function clearEmptyDirectory(dirPath: string): Promise<void>;
177
177
  /**
178
178
  * Searches for files matching a glob pattern by traversing parent directories from a start path towards the root.
179
179
  * Collects all file paths matching the childGlob pattern in each directory.
@@ -183,7 +183,7 @@ export declare function fsClearEmptyDirectory(dirPath: string): Promise<void>;
183
183
  * **Note**: fromPath must be a child path of rootPath.
184
184
  * Otherwise, searches to the filesystem root.
185
185
  */
186
- export declare function fsFindAllParentChildPathsSync(childGlob: string, fromPath: string, rootPath?: string): string[];
186
+ export declare function findAllParentChildPathsSync(childGlob: string, fromPath: string, rootPath?: string): string[];
187
187
  /**
188
188
  * Searches for files matching a glob pattern by traversing parent directories from a start path towards the root (asynchronous).
189
189
  * Collects all file paths matching the childGlob pattern in each directory.
@@ -193,5 +193,5 @@ export declare function fsFindAllParentChildPathsSync(childGlob: string, fromPat
193
193
  * **Note**: fromPath must be a child path of rootPath.
194
194
  * Otherwise, searches to the filesystem root.
195
195
  */
196
- export declare function fsFindAllParentChildPaths(childGlob: string, fromPath: string, rootPath?: string): Promise<string[]>;
196
+ export declare function findAllParentChildPaths(childGlob: string, fromPath: string, rootPath?: string): Promise<string[]>;
197
197
  //# sourceMappingURL=fs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["..\\..\\src\\utils\\fs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAmB,KAAK,WAAW,EAA2B,MAAM,MAAM,CAAC;AAElF,OAAO,uBAAuB,CAAC;AAI/B;;;GAGG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOnE;AAMD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAMpD;AAED;;;GAGG;A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E,CAAC,KAAK,CAAC,CAMhE;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,EAAE,CAAC,KAAK,CAMtD;AAED;;;GAGG;AACH,wBAAsB,KAAK,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,CAMjE;AAMD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,CAIzE;AAED;;;;;GAKG;AACH,wBAAsB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAIpF;AAMD;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,EAAE,CAiBV;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,EAAE,CAAC,CAiBnB"}
package/dist/utils/fs.js CHANGED
@@ -2,12 +2,12 @@ import path from "path";
2
2
  import fs from "fs";
3
3
  import os from "os";
4
4
  import { glob as globRaw, globSync as globRawSync } from "glob";
5
- import { jsonParse, jsonStringify, SdError } from "@simplysm/core-common";
5
+ import { json, SdError } from "@simplysm/core-common";
6
6
  import "@simplysm/core-common";
7
- function fsExistsSync(targetPath) {
7
+ function existsSync(targetPath) {
8
8
  return fs.existsSync(targetPath);
9
9
  }
10
- async function fsExists(targetPath) {
10
+ async function exists(targetPath) {
11
11
  try {
12
12
  await fs.promises.access(targetPath);
13
13
  return true;
@@ -15,28 +15,28 @@ async function fsExists(targetPath) {
15
15
  return false;
16
16
  }
17
17
  }
18
- function fsMkdirSync(targetPath) {
18
+ function mkdirSync(targetPath) {
19
19
  try {
20
20
  fs.mkdirSync(targetPath, { recursive: true });
21
21
  } catch (err) {
22
22
  throw new SdError(err, targetPath);
23
23
  }
24
24
  }
25
- async function fsMkdir(targetPath) {
25
+ async function mkdir(targetPath) {
26
26
  try {
27
27
  await fs.promises.mkdir(targetPath, { recursive: true });
28
28
  } catch (err) {
29
29
  throw new SdError(err, targetPath);
30
30
  }
31
31
  }
32
- function fsRmSync(targetPath) {
32
+ function rmSync(targetPath) {
33
33
  try {
34
34
  fs.rmSync(targetPath, { recursive: true, force: true });
35
35
  } catch (err) {
36
36
  throw new SdError(err, targetPath);
37
37
  }
38
38
  }
39
- async function fsRm(targetPath) {
39
+ async function rm(targetPath) {
40
40
  try {
41
41
  await fs.promises.rm(targetPath, {
42
42
  recursive: true,
@@ -48,8 +48,20 @@ async function fsRm(targetPath) {
48
48
  throw new SdError(err, targetPath);
49
49
  }
50
50
  }
51
- function fsCopySync(sourcePath, targetPath, filter) {
52
- if (!fsExistsSync(sourcePath)) {
51
+ function collectCopyEntries(sourcePath, targetPath, children, filter) {
52
+ const entries = [];
53
+ for (const childPath of children) {
54
+ if (filter !== void 0 && !filter(childPath)) {
55
+ continue;
56
+ }
57
+ const relativeChildPath = path.relative(sourcePath, childPath);
58
+ const childTargetPath = path.resolve(targetPath, relativeChildPath);
59
+ entries.push({ sourcePath: childPath, targetPath: childTargetPath });
60
+ }
61
+ return entries;
62
+ }
63
+ function copySync(sourcePath, targetPath, filter) {
64
+ if (!existsSync(sourcePath)) {
53
65
  return;
54
66
  }
55
67
  let stats;
@@ -59,18 +71,13 @@ function fsCopySync(sourcePath, targetPath, filter) {
59
71
  throw new SdError(err, sourcePath);
60
72
  }
61
73
  if (stats.isDirectory()) {
62
- fsMkdirSync(targetPath);
63
- const children = fsGlobSync(path.resolve(sourcePath, "*"), { dot: true });
64
- for (const childPath of children) {
65
- if (filter !== void 0 && !filter(childPath)) {
66
- continue;
67
- }
68
- const relativeChildPath = path.relative(sourcePath, childPath);
69
- const childTargetPath = path.resolve(targetPath, relativeChildPath);
70
- fsCopySync(childPath, childTargetPath, filter);
74
+ mkdirSync(targetPath);
75
+ const children = globSync(path.resolve(sourcePath, "*"), { dot: true });
76
+ for (const entry of collectCopyEntries(sourcePath, targetPath, children, filter)) {
77
+ copySync(entry.sourcePath, entry.targetPath, filter);
71
78
  }
72
79
  } else {
73
- fsMkdirSync(path.dirname(targetPath));
80
+ mkdirSync(path.dirname(targetPath));
74
81
  try {
75
82
  fs.copyFileSync(sourcePath, targetPath);
76
83
  } catch (err) {
@@ -78,8 +85,8 @@ function fsCopySync(sourcePath, targetPath, filter) {
78
85
  }
79
86
  }
80
87
  }
81
- async function fsCopy(sourcePath, targetPath, filter) {
82
- if (!await fsExists(sourcePath)) {
88
+ async function copy(sourcePath, targetPath, filter) {
89
+ if (!await exists(sourcePath)) {
83
90
  return;
84
91
  }
85
92
  let stats;
@@ -89,18 +96,13 @@ async function fsCopy(sourcePath, targetPath, filter) {
89
96
  throw new SdError(err, sourcePath);
90
97
  }
91
98
  if (stats.isDirectory()) {
92
- await fsMkdir(targetPath);
93
- const children = await fsGlob(path.resolve(sourcePath, "*"), { dot: true });
94
- await children.parallelAsync(async (childPath) => {
95
- if (filter !== void 0 && !filter(childPath)) {
96
- return;
97
- }
98
- const relativeChildPath = path.relative(sourcePath, childPath);
99
- const childTargetPath = path.resolve(targetPath, relativeChildPath);
100
- await fsCopy(childPath, childTargetPath, filter);
99
+ await mkdir(targetPath);
100
+ const children = await glob(path.resolve(sourcePath, "*"), { dot: true });
101
+ await collectCopyEntries(sourcePath, targetPath, children, filter).parallelAsync(async (entry) => {
102
+ await copy(entry.sourcePath, entry.targetPath, filter);
101
103
  });
102
104
  } else {
103
- await fsMkdir(path.dirname(targetPath));
105
+ await mkdir(path.dirname(targetPath));
104
106
  try {
105
107
  await fs.promises.copyFile(sourcePath, targetPath);
106
108
  } catch (err) {
@@ -108,151 +110,151 @@ async function fsCopy(sourcePath, targetPath, filter) {
108
110
  }
109
111
  }
110
112
  }
111
- function fsReadSync(targetPath) {
113
+ function readSync(targetPath) {
112
114
  try {
113
115
  return fs.readFileSync(targetPath, "utf-8");
114
116
  } catch (err) {
115
117
  throw new SdError(err, targetPath);
116
118
  }
117
119
  }
118
- async function fsRead(targetPath) {
120
+ async function read(targetPath) {
119
121
  try {
120
122
  return await fs.promises.readFile(targetPath, "utf-8");
121
123
  } catch (err) {
122
124
  throw new SdError(err, targetPath);
123
125
  }
124
126
  }
125
- function fsReadBufferSync(targetPath) {
127
+ function readBufferSync(targetPath) {
126
128
  try {
127
129
  return fs.readFileSync(targetPath);
128
130
  } catch (err) {
129
131
  throw new SdError(err, targetPath);
130
132
  }
131
133
  }
132
- async function fsReadBuffer(targetPath) {
134
+ async function readBuffer(targetPath) {
133
135
  try {
134
136
  return await fs.promises.readFile(targetPath);
135
137
  } catch (err) {
136
138
  throw new SdError(err, targetPath);
137
139
  }
138
140
  }
139
- function fsReadJsonSync(targetPath) {
140
- const contents = fsReadSync(targetPath);
141
+ function readJsonSync(targetPath) {
142
+ const contents = readSync(targetPath);
141
143
  try {
142
- return jsonParse(contents);
144
+ return json.parse(contents);
143
145
  } catch (err) {
144
146
  const preview = contents.length > 500 ? contents.slice(0, 500) + "...(truncated)" : contents;
145
147
  throw new SdError(err, targetPath + os.EOL + preview);
146
148
  }
147
149
  }
148
- async function fsReadJson(targetPath) {
149
- const contents = await fsRead(targetPath);
150
+ async function readJson(targetPath) {
151
+ const contents = await read(targetPath);
150
152
  try {
151
- return jsonParse(contents);
153
+ return json.parse(contents);
152
154
  } catch (err) {
153
155
  const preview = contents.length > 500 ? contents.slice(0, 500) + "...(truncated)" : contents;
154
156
  throw new SdError(err, targetPath + os.EOL + preview);
155
157
  }
156
158
  }
157
- function fsWriteSync(targetPath, data) {
158
- fsMkdirSync(path.dirname(targetPath));
159
+ function writeSync(targetPath, data) {
160
+ mkdirSync(path.dirname(targetPath));
159
161
  try {
160
162
  fs.writeFileSync(targetPath, data, { flush: true });
161
163
  } catch (err) {
162
164
  throw new SdError(err, targetPath);
163
165
  }
164
166
  }
165
- async function fsWrite(targetPath, data) {
166
- await fsMkdir(path.dirname(targetPath));
167
+ async function write(targetPath, data) {
168
+ await mkdir(path.dirname(targetPath));
167
169
  try {
168
170
  await fs.promises.writeFile(targetPath, data, { flush: true });
169
171
  } catch (err) {
170
172
  throw new SdError(err, targetPath);
171
173
  }
172
174
  }
173
- function fsWriteJsonSync(targetPath, data, options) {
174
- const json = jsonStringify(data, options);
175
- fsWriteSync(targetPath, json);
175
+ function writeJsonSync(targetPath, data, options) {
176
+ const jsonStr = json.stringify(data, options);
177
+ writeSync(targetPath, jsonStr);
176
178
  }
177
- async function fsWriteJson(targetPath, data, options) {
178
- const json = jsonStringify(data, options);
179
- await fsWrite(targetPath, json);
179
+ async function writeJson(targetPath, data, options) {
180
+ const jsonStr = json.stringify(data, options);
181
+ await write(targetPath, jsonStr);
180
182
  }
181
- function fsReaddirSync(targetPath) {
183
+ function readdirSync(targetPath) {
182
184
  try {
183
185
  return fs.readdirSync(targetPath);
184
186
  } catch (err) {
185
187
  throw new SdError(err, targetPath);
186
188
  }
187
189
  }
188
- async function fsReaddir(targetPath) {
190
+ async function readdir(targetPath) {
189
191
  try {
190
192
  return await fs.promises.readdir(targetPath);
191
193
  } catch (err) {
192
194
  throw new SdError(err, targetPath);
193
195
  }
194
196
  }
195
- function fsStatSync(targetPath) {
197
+ function statSync(targetPath) {
196
198
  try {
197
199
  return fs.statSync(targetPath);
198
200
  } catch (err) {
199
201
  throw new SdError(err, targetPath);
200
202
  }
201
203
  }
202
- async function fsStat(targetPath) {
204
+ async function stat(targetPath) {
203
205
  try {
204
206
  return await fs.promises.stat(targetPath);
205
207
  } catch (err) {
206
208
  throw new SdError(err, targetPath);
207
209
  }
208
210
  }
209
- function fsLstatSync(targetPath) {
211
+ function lstatSync(targetPath) {
210
212
  try {
211
213
  return fs.lstatSync(targetPath);
212
214
  } catch (err) {
213
215
  throw new SdError(err, targetPath);
214
216
  }
215
217
  }
216
- async function fsLstat(targetPath) {
218
+ async function lstat(targetPath) {
217
219
  try {
218
220
  return await fs.promises.lstat(targetPath);
219
221
  } catch (err) {
220
222
  throw new SdError(err, targetPath);
221
223
  }
222
224
  }
223
- function fsGlobSync(pattern, options) {
225
+ function globSync(pattern, options) {
224
226
  return globRawSync(pattern.replace(/\\/g, "/"), options ?? {}).map(
225
227
  (item) => path.resolve(item.toString())
226
228
  );
227
229
  }
228
- async function fsGlob(pattern, options) {
230
+ async function glob(pattern, options) {
229
231
  return (await globRaw(pattern.replace(/\\/g, "/"), options ?? {})).map(
230
232
  (item) => path.resolve(item.toString())
231
233
  );
232
234
  }
233
- async function fsClearEmptyDirectory(dirPath) {
234
- if (!await fsExists(dirPath)) return;
235
- const childNames = await fsReaddir(dirPath);
235
+ async function clearEmptyDirectory(dirPath) {
236
+ if (!await exists(dirPath)) return;
237
+ const childNames = await readdir(dirPath);
236
238
  let hasFiles = false;
237
239
  for (const childName of childNames) {
238
240
  const childPath = path.resolve(dirPath, childName);
239
- if ((await fsLstat(childPath)).isDirectory()) {
240
- await fsClearEmptyDirectory(childPath);
241
+ if ((await lstat(childPath)).isDirectory()) {
242
+ await clearEmptyDirectory(childPath);
241
243
  } else {
242
244
  hasFiles = true;
243
245
  }
244
246
  }
245
247
  if (hasFiles) return;
246
- if ((await fsReaddir(dirPath)).length === 0) {
247
- await fsRm(dirPath);
248
+ if ((await readdir(dirPath)).length === 0) {
249
+ await rm(dirPath);
248
250
  }
249
251
  }
250
- function fsFindAllParentChildPathsSync(childGlob, fromPath, rootPath) {
252
+ function findAllParentChildPathsSync(childGlob, fromPath, rootPath) {
251
253
  const resultPaths = [];
252
254
  let current = fromPath;
253
255
  while (current) {
254
256
  const potential = path.resolve(current, childGlob);
255
- const globResults = fsGlobSync(potential);
257
+ const globResults = globSync(potential);
256
258
  resultPaths.push(...globResults);
257
259
  if (current === rootPath) break;
258
260
  const next = path.dirname(current);
@@ -261,12 +263,12 @@ function fsFindAllParentChildPathsSync(childGlob, fromPath, rootPath) {
261
263
  }
262
264
  return resultPaths;
263
265
  }
264
- async function fsFindAllParentChildPaths(childGlob, fromPath, rootPath) {
266
+ async function findAllParentChildPaths(childGlob, fromPath, rootPath) {
265
267
  const resultPaths = [];
266
268
  let current = fromPath;
267
269
  while (current) {
268
270
  const potential = path.resolve(current, childGlob);
269
- const globResults = await fsGlob(potential);
271
+ const globResults = await glob(potential);
270
272
  resultPaths.push(...globResults);
271
273
  if (current === rootPath) break;
272
274
  const next = path.dirname(current);
@@ -276,34 +278,34 @@ async function fsFindAllParentChildPaths(childGlob, fromPath, rootPath) {
276
278
  return resultPaths;
277
279
  }
278
280
  export {
279
- fsClearEmptyDirectory,
280
- fsCopy,
281
- fsCopySync,
282
- fsExists,
283
- fsExistsSync,
284
- fsFindAllParentChildPaths,
285
- fsFindAllParentChildPathsSync,
286
- fsGlob,
287
- fsGlobSync,
288
- fsLstat,
289
- fsLstatSync,
290
- fsMkdir,
291
- fsMkdirSync,
292
- fsRead,
293
- fsReadBuffer,
294
- fsReadBufferSync,
295
- fsReadJson,
296
- fsReadJsonSync,
297
- fsReadSync,
298
- fsReaddir,
299
- fsReaddirSync,
300
- fsRm,
301
- fsRmSync,
302
- fsStat,
303
- fsStatSync,
304
- fsWrite,
305
- fsWriteJson,
306
- fsWriteJsonSync,
307
- fsWriteSync
281
+ clearEmptyDirectory,
282
+ copy,
283
+ copySync,
284
+ exists,
285
+ existsSync,
286
+ findAllParentChildPaths,
287
+ findAllParentChildPathsSync,
288
+ glob,
289
+ globSync,
290
+ lstat,
291
+ lstatSync,
292
+ mkdir,
293
+ mkdirSync,
294
+ read,
295
+ readBuffer,
296
+ readBufferSync,
297
+ readJson,
298
+ readJsonSync,
299
+ readSync,
300
+ readdir,
301
+ readdirSync,
302
+ rm,
303
+ rmSync,
304
+ stat,
305
+ statSync,
306
+ write,
307
+ writeJson,
308
+ writeJsonSync,
309
+ writeSync
308
310
  };
309
311
  //# sourceMappingURL=fs.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/fs.ts"],
4
- "mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,QAAQ;AACf,OAAO,QAAQ;AACf,SAAS,QAAQ,SAA2B,YAAY,mBAAmB;AAC3E,SAAS,WAAW,eAAe,eAAe;AAClD,OAAO;AAQA,SAAS,aAAa,YAA6B;AACxD,SAAO,GAAG,WAAW,UAAU;AACjC;AAMA,eAAsB,SAAS,YAAsC;AACnE,MAAI;AACF,UAAM,GAAG,SAAS,OAAO,UAAU;AACnC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAUO,SAAS,YAAY,YAA0B;AACpD,MAAI;AACF,OAAG,UAAU,YAAY,EAAE,WAAW,KAAK,CAAC;AAAA,EAC9C,SAAS,KAAK;AACZ,UAAM,IAAI,QAAQ,KAAK,UAAU;AAAA,EACnC;AACF;AAMA,eAAsB,QAAQ,YAAmC;AAC/D,MAAI;AACF,UAAM,GAAG,SAAS,MAAM,YAAY,EAAE,WAAW,KAAK,CAAC;AAAA,EACzD,SAAS,KAAK;AACZ,UAAM,IAAI,QAAQ,KAAK,UAAU;AAAA,EACnC;AACF;AAWO,SAAS,SAAS,YAA0B;AACjD,MAAI;AACF,OAAG,OAAO,YAAY,EAAE,WAAW,MAAM,OAAO,KAAK,CAAC;AAAA,EACxD,SAAS,KAAK;AACZ,UAAM,IAAI,QAAQ,KAAK,UAAU;AAAA,EACnC;AACF;AAOA,eAAsB,KAAK,YAAmC;AAC5D,MAAI;AACF,UAAM,GAAG,SAAS,GAAG,YAAY;AAAA,MAC/B,WAAW;AAAA,MACX,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,YAAY;A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