@outfitter/file-ops 0.2.1 → 0.2.3
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/index.d.ts +18 -18
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -31,20 +31,20 @@ interface GlobOptions {
|
|
|
31
31
|
*/
|
|
32
32
|
cwd?: string;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
34
|
+
* Include files and directories starting with a dot in results.
|
|
35
|
+
* @defaultValue false
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
dot?: boolean;
|
|
38
38
|
/**
|
|
39
39
|
* Follow symbolic links when scanning directories.
|
|
40
40
|
* @defaultValue false
|
|
41
41
|
*/
|
|
42
42
|
followSymlinks?: boolean;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
44
|
+
* Patterns to exclude from results.
|
|
45
|
+
* Supports negation with "!" prefix to re-include previously excluded files.
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
ignore?: string[];
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
50
|
* Options for atomic write operations.
|
|
@@ -59,16 +59,16 @@ interface AtomicWriteOptions {
|
|
|
59
59
|
*/
|
|
60
60
|
createParentDirs?: boolean;
|
|
61
61
|
/**
|
|
62
|
+
* Unix file mode for newly created files.
|
|
63
|
+
* @defaultValue 0o644
|
|
64
|
+
*/
|
|
65
|
+
mode?: number;
|
|
66
|
+
/**
|
|
62
67
|
* Preserve file permissions from existing file.
|
|
63
68
|
* If the target file does not exist, falls back to the mode option.
|
|
64
69
|
* @defaultValue false
|
|
65
70
|
*/
|
|
66
71
|
preservePermissions?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Unix file mode for newly created files.
|
|
69
|
-
* @defaultValue 0o644
|
|
70
|
-
*/
|
|
71
|
-
mode?: number;
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* Represents an acquired file lock.
|
|
@@ -77,10 +77,10 @@ interface AtomicWriteOptions {
|
|
|
77
77
|
* acquisition timestamp. Used with acquireLock and releaseLock functions.
|
|
78
78
|
*/
|
|
79
79
|
interface FileLock {
|
|
80
|
-
/** Absolute path to the locked file */
|
|
81
|
-
path: string;
|
|
82
80
|
/** Path to the .lock file that indicates the lock */
|
|
83
81
|
lockPath: string;
|
|
82
|
+
/** Absolute path to the locked file */
|
|
83
|
+
path: string;
|
|
84
84
|
/** Process ID of the lock holder */
|
|
85
85
|
pid: number;
|
|
86
86
|
/** Unix timestamp (milliseconds) when the lock was acquired */
|
|
@@ -102,16 +102,16 @@ interface SharedFileLock extends FileLock {
|
|
|
102
102
|
* Options for lock acquisition.
|
|
103
103
|
*/
|
|
104
104
|
interface LockOptions {
|
|
105
|
-
/**
|
|
106
|
-
* Maximum time in milliseconds to wait for lock acquisition.
|
|
107
|
-
* If not specified, fails immediately if lock cannot be acquired.
|
|
108
|
-
*/
|
|
109
|
-
timeout?: number;
|
|
110
105
|
/**
|
|
111
106
|
* Interval in milliseconds between retry attempts when waiting.
|
|
112
107
|
* @defaultValue 50
|
|
113
108
|
*/
|
|
114
109
|
retryInterval?: number;
|
|
110
|
+
/**
|
|
111
|
+
* Maximum time in milliseconds to wait for lock acquisition.
|
|
112
|
+
* If not specified, fails immediately if lock cannot be acquired.
|
|
113
|
+
*/
|
|
114
|
+
timeout?: number;
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
117
|
* Finds the workspace root by searching upward for marker files/directories.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outfitter/file-ops",
|
|
3
3
|
"description": "Workspace detection, secure path handling, and file locking for Outfitter",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -24,11 +24,12 @@
|
|
|
24
24
|
"lint:fix": "biome lint --write ./src",
|
|
25
25
|
"test": "bun test",
|
|
26
26
|
"typecheck": "tsc --noEmit",
|
|
27
|
-
"clean": "rm -rf dist"
|
|
27
|
+
"clean": "rm -rf dist",
|
|
28
|
+
"prepublishOnly": "bun ../../scripts/check-publish-manifest.ts"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
|
-
"@outfitter/contracts": "0.
|
|
31
|
-
"@outfitter/types": "0.2.
|
|
31
|
+
"@outfitter/contracts": "0.4.1",
|
|
32
|
+
"@outfitter/types": "0.2.3"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@types/bun": "latest",
|