@dexto/tools-filesystem 1.7.1 → 1.8.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 (66) hide show
  1. package/dist/directory-approval.cjs +5 -4
  2. package/dist/directory-approval.d.ts +2 -1
  3. package/dist/directory-approval.d.ts.map +1 -1
  4. package/dist/directory-approval.integration.test.cjs +73 -33
  5. package/dist/directory-approval.integration.test.js +73 -33
  6. package/dist/directory-approval.js +2 -1
  7. package/dist/edit-file-tool.cjs +52 -37
  8. package/dist/edit-file-tool.d.ts +1 -1
  9. package/dist/edit-file-tool.d.ts.map +1 -1
  10. package/dist/edit-file-tool.js +43 -29
  11. package/dist/edit-file-tool.test.cjs +159 -2
  12. package/dist/edit-file-tool.test.js +159 -2
  13. package/dist/errors.cjs +53 -53
  14. package/dist/errors.d.ts +1 -1
  15. package/dist/errors.d.ts.map +1 -1
  16. package/dist/errors.js +1 -1
  17. package/dist/file-tool-types.d.ts +1 -1
  18. package/dist/file-tool-types.d.ts.map +1 -1
  19. package/dist/filesystem-service.cjs +60 -60
  20. package/dist/filesystem-service.d.ts +1 -1
  21. package/dist/filesystem-service.d.ts.map +1 -1
  22. package/dist/filesystem-service.js +5 -5
  23. package/dist/filesystem-service.test.cjs +1 -3
  24. package/dist/filesystem-service.test.js +1 -3
  25. package/dist/glob-files-tool.cjs +27 -24
  26. package/dist/glob-files-tool.d.ts +1 -1
  27. package/dist/glob-files-tool.d.ts.map +1 -1
  28. package/dist/glob-files-tool.js +24 -21
  29. package/dist/glob-files-tool.test.cjs +100 -88
  30. package/dist/glob-files-tool.test.js +101 -67
  31. package/dist/grep-content-tool.cjs +129 -44
  32. package/dist/grep-content-tool.d.ts +1 -1
  33. package/dist/grep-content-tool.d.ts.map +1 -1
  34. package/dist/grep-content-tool.js +120 -41
  35. package/dist/grep-content-tool.test.cjs +122 -87
  36. package/dist/grep-content-tool.test.js +123 -66
  37. package/dist/index.d.cts +3 -4
  38. package/dist/path-validator.d.ts +1 -1
  39. package/dist/path-validator.d.ts.map +1 -1
  40. package/dist/read-file-tool.cjs +43 -14
  41. package/dist/read-file-tool.d.ts +1 -1
  42. package/dist/read-file-tool.d.ts.map +1 -1
  43. package/dist/read-file-tool.js +40 -11
  44. package/dist/read-file-tool.test.cjs +119 -0
  45. package/dist/read-file-tool.test.d.ts +2 -0
  46. package/dist/read-file-tool.test.d.ts.map +1 -0
  47. package/dist/read-file-tool.test.js +96 -0
  48. package/dist/read-media-file-tool.cjs +4 -4
  49. package/dist/read-media-file-tool.d.ts +1 -1
  50. package/dist/read-media-file-tool.d.ts.map +1 -1
  51. package/dist/read-media-file-tool.js +1 -1
  52. package/dist/tool-factory.cjs +2 -2
  53. package/dist/tool-factory.js +1 -1
  54. package/dist/types.d.ts +0 -2
  55. package/dist/types.d.ts.map +1 -1
  56. package/dist/workspace-paths.cjs +87 -0
  57. package/dist/workspace-paths.d.ts +4 -0
  58. package/dist/workspace-paths.d.ts.map +1 -0
  59. package/dist/workspace-paths.js +51 -0
  60. package/dist/write-file-tool.cjs +74 -34
  61. package/dist/write-file-tool.d.ts +1 -2
  62. package/dist/write-file-tool.d.ts.map +1 -1
  63. package/dist/write-file-tool.js +68 -29
  64. package/dist/write-file-tool.test.cjs +262 -11
  65. package/dist/write-file-tool.test.js +262 -11
  66. package/package.json +3 -3
package/dist/errors.cjs CHANGED
@@ -21,7 +21,7 @@ __export(errors_exports, {
21
21
  FileSystemError: () => FileSystemError
22
22
  });
23
23
  module.exports = __toCommonJS(errors_exports);
24
- var import_core = require("@dexto/core");
24
+ var import_errors = require("@dexto/core/errors");
25
25
  var import_error_codes = require("./error-codes.js");
26
26
  const FILESYSTEM_SCOPE = "filesystem";
27
27
  class FileSystemError {
@@ -31,10 +31,10 @@ class FileSystemError {
31
31
  * File not found error
32
32
  */
33
33
  static fileNotFound(path) {
34
- return new import_core.DextoRuntimeError(
34
+ return new import_errors.DextoRuntimeError(
35
35
  import_error_codes.FileSystemErrorCode.FILE_NOT_FOUND,
36
36
  FILESYSTEM_SCOPE,
37
- import_core.ErrorType.NOT_FOUND,
37
+ import_errors.ErrorType.NOT_FOUND,
38
38
  `File not found: ${path}`,
39
39
  { path }
40
40
  );
@@ -43,10 +43,10 @@ class FileSystemError {
43
43
  * Directory not found error
44
44
  */
45
45
  static directoryNotFound(path) {
46
- return new import_core.DextoRuntimeError(
46
+ return new import_errors.DextoRuntimeError(
47
47
  import_error_codes.FileSystemErrorCode.DIRECTORY_NOT_FOUND,
48
48
  FILESYSTEM_SCOPE,
49
- import_core.ErrorType.NOT_FOUND,
49
+ import_errors.ErrorType.NOT_FOUND,
50
50
  `Directory not found: ${path}`,
51
51
  { path }
52
52
  );
@@ -55,10 +55,10 @@ class FileSystemError {
55
55
  * Permission denied error
56
56
  */
57
57
  static permissionDenied(path, operation) {
58
- return new import_core.DextoRuntimeError(
58
+ return new import_errors.DextoRuntimeError(
59
59
  import_error_codes.FileSystemErrorCode.PERMISSION_DENIED,
60
60
  FILESYSTEM_SCOPE,
61
- import_core.ErrorType.FORBIDDEN,
61
+ import_errors.ErrorType.FORBIDDEN,
62
62
  `Permission denied: cannot ${operation} ${path}`,
63
63
  { path, operation }
64
64
  );
@@ -67,10 +67,10 @@ class FileSystemError {
67
67
  * Path not allowed error
68
68
  */
69
69
  static pathNotAllowed(path, allowedPaths) {
70
- return new import_core.DextoRuntimeError(
70
+ return new import_errors.DextoRuntimeError(
71
71
  import_error_codes.FileSystemErrorCode.PATH_NOT_ALLOWED,
72
72
  FILESYSTEM_SCOPE,
73
- import_core.ErrorType.USER,
73
+ import_errors.ErrorType.USER,
74
74
  `Path not allowed: ${path}. Must be within allowed paths: ${allowedPaths.join(", ")}`,
75
75
  { path, allowedPaths },
76
76
  "Ensure the path is within the configured allowed paths"
@@ -80,10 +80,10 @@ class FileSystemError {
80
80
  * Path blocked error
81
81
  */
82
82
  static pathBlocked(path, reason) {
83
- return new import_core.DextoRuntimeError(
83
+ return new import_errors.DextoRuntimeError(
84
84
  import_error_codes.FileSystemErrorCode.PATH_BLOCKED,
85
85
  FILESYSTEM_SCOPE,
86
- import_core.ErrorType.FORBIDDEN,
86
+ import_errors.ErrorType.FORBIDDEN,
87
87
  `Path is blocked: ${path}. Reason: ${reason}`,
88
88
  { path, reason }
89
89
  );
@@ -92,10 +92,10 @@ class FileSystemError {
92
92
  * Invalid path error
93
93
  */
94
94
  static invalidPath(path, reason) {
95
- return new import_core.DextoRuntimeError(
95
+ return new import_errors.DextoRuntimeError(
96
96
  import_error_codes.FileSystemErrorCode.INVALID_PATH,
97
97
  FILESYSTEM_SCOPE,
98
- import_core.ErrorType.USER,
98
+ import_errors.ErrorType.USER,
99
99
  `Invalid path: ${path}. ${reason}`,
100
100
  { path, reason }
101
101
  );
@@ -104,10 +104,10 @@ class FileSystemError {
104
104
  * Path traversal detected
105
105
  */
106
106
  static pathTraversal(path) {
107
- return new import_core.DextoRuntimeError(
107
+ return new import_errors.DextoRuntimeError(
108
108
  import_error_codes.FileSystemErrorCode.PATH_TRAVERSAL_DETECTED,
109
109
  FILESYSTEM_SCOPE,
110
- import_core.ErrorType.FORBIDDEN,
110
+ import_errors.ErrorType.FORBIDDEN,
111
111
  `Path traversal detected in: ${path}`,
112
112
  { path }
113
113
  );
@@ -116,10 +116,10 @@ class FileSystemError {
116
116
  * Invalid file extension error
117
117
  */
118
118
  static invalidExtension(path, blockedExtensions) {
119
- return new import_core.DextoRuntimeError(
119
+ return new import_errors.DextoRuntimeError(
120
120
  import_error_codes.FileSystemErrorCode.INVALID_FILE_EXTENSION,
121
121
  FILESYSTEM_SCOPE,
122
- import_core.ErrorType.USER,
122
+ import_errors.ErrorType.USER,
123
123
  `Invalid file extension: ${path}. Blocked extensions: ${blockedExtensions.join(", ")}`,
124
124
  { path, blockedExtensions }
125
125
  );
@@ -128,10 +128,10 @@ class FileSystemError {
128
128
  * File too large error
129
129
  */
130
130
  static fileTooLarge(path, size, maxSize) {
131
- return new import_core.DextoRuntimeError(
131
+ return new import_errors.DextoRuntimeError(
132
132
  import_error_codes.FileSystemErrorCode.FILE_TOO_LARGE,
133
133
  FILESYSTEM_SCOPE,
134
- import_core.ErrorType.USER,
134
+ import_errors.ErrorType.USER,
135
135
  `File too large: ${path} (${size} bytes). Maximum allowed: ${maxSize} bytes`,
136
136
  { path, size, maxSize }
137
137
  );
@@ -140,10 +140,10 @@ class FileSystemError {
140
140
  * Too many results error
141
141
  */
142
142
  static tooManyResults(operation, count, maxResults) {
143
- return new import_core.DextoRuntimeError(
143
+ return new import_errors.DextoRuntimeError(
144
144
  import_error_codes.FileSystemErrorCode.TOO_MANY_RESULTS,
145
145
  FILESYSTEM_SCOPE,
146
- import_core.ErrorType.USER,
146
+ import_errors.ErrorType.USER,
147
147
  `Too many results from ${operation}: ${count}. Maximum allowed: ${maxResults}`,
148
148
  { operation, count, maxResults },
149
149
  "Narrow your search pattern or increase maxResults limit"
@@ -153,10 +153,10 @@ class FileSystemError {
153
153
  * Read operation failed
154
154
  */
155
155
  static readFailed(path, cause) {
156
- return new import_core.DextoRuntimeError(
156
+ return new import_errors.DextoRuntimeError(
157
157
  import_error_codes.FileSystemErrorCode.READ_FAILED,
158
158
  FILESYSTEM_SCOPE,
159
- import_core.ErrorType.SYSTEM,
159
+ import_errors.ErrorType.SYSTEM,
160
160
  `Failed to read file: ${path}. ${cause}`,
161
161
  { path, cause }
162
162
  );
@@ -165,10 +165,10 @@ class FileSystemError {
165
165
  * List directory operation failed
166
166
  */
167
167
  static listFailed(path, cause) {
168
- return new import_core.DextoRuntimeError(
168
+ return new import_errors.DextoRuntimeError(
169
169
  import_error_codes.FileSystemErrorCode.LIST_FAILED,
170
170
  FILESYSTEM_SCOPE,
171
- import_core.ErrorType.SYSTEM,
171
+ import_errors.ErrorType.SYSTEM,
172
172
  `Failed to list directory: ${path}. ${cause}`,
173
173
  { path, cause }
174
174
  );
@@ -177,10 +177,10 @@ class FileSystemError {
177
177
  * Create directory operation failed
178
178
  */
179
179
  static createDirFailed(path, cause) {
180
- return new import_core.DextoRuntimeError(
180
+ return new import_errors.DextoRuntimeError(
181
181
  import_error_codes.FileSystemErrorCode.CREATE_DIR_FAILED,
182
182
  FILESYSTEM_SCOPE,
183
- import_core.ErrorType.SYSTEM,
183
+ import_errors.ErrorType.SYSTEM,
184
184
  `Failed to create directory: ${path}. ${cause}`,
185
185
  { path, cause }
186
186
  );
@@ -189,10 +189,10 @@ class FileSystemError {
189
189
  * Delete operation failed
190
190
  */
191
191
  static deleteFailed(path, cause) {
192
- return new import_core.DextoRuntimeError(
192
+ return new import_errors.DextoRuntimeError(
193
193
  import_error_codes.FileSystemErrorCode.DELETE_FAILED,
194
194
  FILESYSTEM_SCOPE,
195
- import_core.ErrorType.SYSTEM,
195
+ import_errors.ErrorType.SYSTEM,
196
196
  `Failed to delete path: ${path}. ${cause}`,
197
197
  { path, cause }
198
198
  );
@@ -201,10 +201,10 @@ class FileSystemError {
201
201
  * Rename operation failed
202
202
  */
203
203
  static renameFailed(path, cause) {
204
- return new import_core.DextoRuntimeError(
204
+ return new import_errors.DextoRuntimeError(
205
205
  import_error_codes.FileSystemErrorCode.RENAME_FAILED,
206
206
  FILESYSTEM_SCOPE,
207
- import_core.ErrorType.SYSTEM,
207
+ import_errors.ErrorType.SYSTEM,
208
208
  `Failed to rename path: ${path}. ${cause}`,
209
209
  { path, cause }
210
210
  );
@@ -213,10 +213,10 @@ class FileSystemError {
213
213
  * Write operation failed
214
214
  */
215
215
  static writeFailed(path, cause) {
216
- return new import_core.DextoRuntimeError(
216
+ return new import_errors.DextoRuntimeError(
217
217
  import_error_codes.FileSystemErrorCode.WRITE_FAILED,
218
218
  FILESYSTEM_SCOPE,
219
- import_core.ErrorType.SYSTEM,
219
+ import_errors.ErrorType.SYSTEM,
220
220
  `Failed to write file: ${path}. ${cause}`,
221
221
  { path, cause }
222
222
  );
@@ -225,10 +225,10 @@ class FileSystemError {
225
225
  * Backup creation failed
226
226
  */
227
227
  static backupFailed(path, cause) {
228
- return new import_core.DextoRuntimeError(
228
+ return new import_errors.DextoRuntimeError(
229
229
  import_error_codes.FileSystemErrorCode.BACKUP_FAILED,
230
230
  FILESYSTEM_SCOPE,
231
- import_core.ErrorType.SYSTEM,
231
+ import_errors.ErrorType.SYSTEM,
232
232
  `Failed to create backup for: ${path}. ${cause}`,
233
233
  { path, cause }
234
234
  );
@@ -237,10 +237,10 @@ class FileSystemError {
237
237
  * Edit operation failed
238
238
  */
239
239
  static editFailed(path, cause) {
240
- return new import_core.DextoRuntimeError(
240
+ return new import_errors.DextoRuntimeError(
241
241
  import_error_codes.FileSystemErrorCode.EDIT_FAILED,
242
242
  FILESYSTEM_SCOPE,
243
- import_core.ErrorType.SYSTEM,
243
+ import_errors.ErrorType.SYSTEM,
244
244
  `Failed to edit file: ${path}. ${cause}`,
245
245
  { path, cause }
246
246
  );
@@ -249,10 +249,10 @@ class FileSystemError {
249
249
  * String not unique error
250
250
  */
251
251
  static stringNotUnique(path, searchString, occurrences) {
252
- return new import_core.DextoRuntimeError(
252
+ return new import_errors.DextoRuntimeError(
253
253
  import_error_codes.FileSystemErrorCode.STRING_NOT_UNIQUE,
254
254
  FILESYSTEM_SCOPE,
255
- import_core.ErrorType.USER,
255
+ import_errors.ErrorType.USER,
256
256
  `String is not unique in ${path}: "${searchString}" found ${occurrences} times. Use replaceAll=true or provide a more specific string.`,
257
257
  { path, searchString, occurrences },
258
258
  "Use replaceAll option or provide more context in the search string"
@@ -262,10 +262,10 @@ class FileSystemError {
262
262
  * String not found error
263
263
  */
264
264
  static stringNotFound(path, searchString) {
265
- return new import_core.DextoRuntimeError(
265
+ return new import_errors.DextoRuntimeError(
266
266
  import_error_codes.FileSystemErrorCode.STRING_NOT_FOUND,
267
267
  FILESYSTEM_SCOPE,
268
- import_core.ErrorType.USER,
268
+ import_errors.ErrorType.USER,
269
269
  `String not found in ${path}: "${searchString}"`,
270
270
  { path, searchString }
271
271
  );
@@ -274,10 +274,10 @@ class FileSystemError {
274
274
  * Glob operation failed
275
275
  */
276
276
  static globFailed(pattern, cause) {
277
- return new import_core.DextoRuntimeError(
277
+ return new import_errors.DextoRuntimeError(
278
278
  import_error_codes.FileSystemErrorCode.GLOB_FAILED,
279
279
  FILESYSTEM_SCOPE,
280
- import_core.ErrorType.SYSTEM,
280
+ import_errors.ErrorType.SYSTEM,
281
281
  `Glob operation failed for pattern: ${pattern}. ${cause}`,
282
282
  { pattern, cause }
283
283
  );
@@ -286,10 +286,10 @@ class FileSystemError {
286
286
  * Search operation failed
287
287
  */
288
288
  static searchFailed(pattern, cause) {
289
- return new import_core.DextoRuntimeError(
289
+ return new import_errors.DextoRuntimeError(
290
290
  import_error_codes.FileSystemErrorCode.SEARCH_FAILED,
291
291
  FILESYSTEM_SCOPE,
292
- import_core.ErrorType.SYSTEM,
292
+ import_errors.ErrorType.SYSTEM,
293
293
  `Search operation failed for pattern: ${pattern}. ${cause}`,
294
294
  { pattern, cause }
295
295
  );
@@ -298,10 +298,10 @@ class FileSystemError {
298
298
  * Invalid pattern error
299
299
  */
300
300
  static invalidPattern(pattern, cause) {
301
- return new import_core.DextoRuntimeError(
301
+ return new import_errors.DextoRuntimeError(
302
302
  import_error_codes.FileSystemErrorCode.INVALID_PATTERN,
303
303
  FILESYSTEM_SCOPE,
304
- import_core.ErrorType.USER,
304
+ import_errors.ErrorType.USER,
305
305
  `Invalid pattern: ${pattern}. ${cause}`,
306
306
  { pattern, cause }
307
307
  );
@@ -310,10 +310,10 @@ class FileSystemError {
310
310
  * Regex timeout error
311
311
  */
312
312
  static regexTimeout(pattern) {
313
- return new import_core.DextoRuntimeError(
313
+ return new import_errors.DextoRuntimeError(
314
314
  import_error_codes.FileSystemErrorCode.REGEX_TIMEOUT,
315
315
  FILESYSTEM_SCOPE,
316
- import_core.ErrorType.TIMEOUT,
316
+ import_errors.ErrorType.TIMEOUT,
317
317
  `Regex operation timed out for pattern: ${pattern}`,
318
318
  { pattern },
319
319
  "Simplify your regex pattern or increase timeout"
@@ -323,10 +323,10 @@ class FileSystemError {
323
323
  * Invalid configuration error
324
324
  */
325
325
  static invalidConfig(reason) {
326
- return new import_core.DextoRuntimeError(
326
+ return new import_errors.DextoRuntimeError(
327
327
  import_error_codes.FileSystemErrorCode.INVALID_CONFIG,
328
328
  FILESYSTEM_SCOPE,
329
- import_core.ErrorType.USER,
329
+ import_errors.ErrorType.USER,
330
330
  `Invalid FileSystem configuration: ${reason}`,
331
331
  { reason }
332
332
  );
@@ -335,10 +335,10 @@ class FileSystemError {
335
335
  * Service not initialized error
336
336
  */
337
337
  static notInitialized() {
338
- return new import_core.DextoRuntimeError(
338
+ return new import_errors.DextoRuntimeError(
339
339
  import_error_codes.FileSystemErrorCode.SERVICE_NOT_INITIALIZED,
340
340
  FILESYSTEM_SCOPE,
341
- import_core.ErrorType.SYSTEM,
341
+ import_errors.ErrorType.SYSTEM,
342
342
  "FileSystemService has not been initialized",
343
343
  {},
344
344
  "Initialize the FileSystemService before using it"
package/dist/errors.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Error classes for file system operations
5
5
  */
6
- import { DextoRuntimeError } from '@dexto/core';
6
+ import { DextoRuntimeError } from '@dexto/core/errors';
7
7
  export interface FileSystemErrorContext {
8
8
  path?: string;
9
9
  pattern?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAa,MAAM,aAAa,CAAC;AAM3D,MAAM,WAAW,sBAAsB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,eAAe;IACxB,OAAO;IAIP;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M,EAAE,YAAY,EAAE,MAAM,GAAG,iBAAiB;IAU5E;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB;IAUpE;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB;IAUtE;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB;IAUxE;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB;IAWvD;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB;IAUvD;;OAEG;IACH,MAAM,CAAC,cAAc,IAAI,iBAAiB;CAU7C"}
package/dist/errors.js CHANGED
@@ -1,4 +1,4 @@
1
- import { DextoRuntimeError, ErrorType } from "@dexto/core";
1
+ import { DextoRuntimeError, ErrorType } from "@dexto/core/errors";
2
2
  const FILESYSTEM_SCOPE = "filesystem";
3
3
  import { FileSystemErrorCode } from "./error-codes.js";
4
4
  class FileSystemError {
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Types shared between file tools and factories.
5
5
  */
6
- import type { ToolExecutionContext } from '@dexto/core';
6
+ import type { ToolExecutionContext } from '@dexto/core/tools';
7
7
  import type { FileSystemService } from './filesystem-service.js';
8
8
  /**
9
9
  * Getter for a lazily-initialized {@link FileSystemService}.
@@ -1 +1 @@
1
- {"version":3,"file":"file-tool-types.d.ts","sourceRoot":"","sources":["../src/file-tool-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"file-tool-types.d.ts","sourceRoot":"","sources":["../src/file-tool-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC"}