javi-forge 1.38.0 → 1.38.2
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.
|
@@ -114,10 +114,12 @@ export async function runTransaction(input) {
|
|
|
114
114
|
// only segments loosen. No `process.platform` here — role is expressed by which
|
|
115
115
|
// dirs get proveManagedContainer'd (the managedContainers set).
|
|
116
116
|
async function gate(dirPath, handle) {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
// Transfer ownership before refusal-capable proofs so `finally` closes a
|
|
118
|
+
// successfully opened handle even when either proof fails.
|
|
119
119
|
heldByPath.set(dirPath, handle);
|
|
120
120
|
heldOrder.push(handle);
|
|
121
|
+
must(`ownership ${dirPath}`, await secureFs.proveOwnershipAndMode(dirPath));
|
|
122
|
+
must(`acl ${dirPath}`, await secureFs.proveNoEndangeringAcl(dirPath));
|
|
121
123
|
}
|
|
122
124
|
/**
|
|
123
125
|
* Ensure a MANAGED CONTAINER (`.claude`/`.claude/hooks`): an existing one is
|
|
@@ -152,9 +154,11 @@ export async function runTransaction(input) {
|
|
|
152
154
|
return null;
|
|
153
155
|
// (2) absent + a child IS written into it this run → create + prove.
|
|
154
156
|
const created = must(`create ${fullPath}`, await secureFs.createDirExclusive(parent, path.basename(fullPath), 0o700));
|
|
157
|
+
// Own the created segment before post-create validation so any refusal rolls
|
|
158
|
+
// it back and closes its handle.
|
|
159
|
+
createdDirs.push(created);
|
|
155
160
|
// Post-create identity revalidation + full gate on the new segment.
|
|
156
161
|
must(`revalidate-created ${fullPath}`, await secureFs.revalidateIdentity(fullPath, created.identity));
|
|
157
|
-
createdDirs.push(created);
|
|
158
162
|
await gate(fullPath, created);
|
|
159
163
|
must(`container ${fullPath}`, await secureFs.proveManagedContainer(fullPath));
|
|
160
164
|
return created;
|
|
@@ -282,7 +286,7 @@ export async function runTransaction(input) {
|
|
|
282
286
|
};
|
|
283
287
|
}
|
|
284
288
|
finally {
|
|
285
|
-
for (const handle of [...createdDirs, ...heldOrder]) {
|
|
289
|
+
for (const handle of new Set([...createdDirs, ...heldOrder])) {
|
|
286
290
|
await handle.close().catch(() => { });
|
|
287
291
|
}
|
|
288
292
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "javi-forge",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.2",
|
|
4
4
|
"description": "Project scaffolding and AI-ready CI bootstrap",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -91,12 +91,13 @@
|
|
|
91
91
|
"handlebars": "^4.7.9",
|
|
92
92
|
"picomatch": "^4.0.4",
|
|
93
93
|
"brace-expansion": "^5.0.9",
|
|
94
|
+
"browserslist": "^4.28.7",
|
|
94
95
|
"lodash": "^4.18.0",
|
|
95
96
|
"lodash-es": "^4.18.0",
|
|
96
|
-
"fast-uri": "^3.1.
|
|
97
|
+
"fast-uri": "^3.1.6",
|
|
97
98
|
"postcss": "^8.5.18",
|
|
98
99
|
"vite": "^8.0.16",
|
|
99
|
-
"js-yaml": "^4.3.
|
|
100
|
+
"js-yaml": "^4.3.2",
|
|
100
101
|
"nanoid": "^3.3.17",
|
|
101
102
|
"undici": "^7.29.0",
|
|
102
103
|
"ws": "^8.21.0"
|