@demicodes/host-local 0.17.2 → 0.17.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.mjs +8 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -284,7 +284,14 @@ var LocalHostStore = class {
|
|
|
284
284
|
async writeJson(key, value) {
|
|
285
285
|
const path = this.pathForKey(key);
|
|
286
286
|
await mkdir(dirname(path), { recursive: true });
|
|
287
|
-
|
|
287
|
+
const temp = `${path}.${randomUUID()}.tmp`;
|
|
288
|
+
try {
|
|
289
|
+
await writeFile(temp, stringifyPortableJson(value, 2), "utf8");
|
|
290
|
+
await rename(temp, path);
|
|
291
|
+
} catch (error) {
|
|
292
|
+
await rm(temp, { force: true });
|
|
293
|
+
throw error;
|
|
294
|
+
}
|
|
288
295
|
}
|
|
289
296
|
async delete(key) {
|
|
290
297
|
await rm(this.pathForKey(key), {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@demicodes/host-local",
|
|
3
3
|
"description": "Node LocalHost and open-box local AgentServer assembly (command bridge on by default).",
|
|
4
|
-
"version": "0.17.
|
|
4
|
+
"version": "0.17.3",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@demicodes/agent": "^0.17.
|
|
15
|
-
"@demicodes/provider": "^0.17.
|
|
16
|
-
"@demicodes/shell": "^0.17.
|
|
17
|
-
"@demicodes/utils": "^0.17.
|
|
14
|
+
"@demicodes/agent": "^0.17.3",
|
|
15
|
+
"@demicodes/provider": "^0.17.3",
|
|
16
|
+
"@demicodes/shell": "^0.17.3",
|
|
17
|
+
"@demicodes/utils": "^0.17.3"
|
|
18
18
|
},
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
20
|
"main": "./dist/index.mjs",
|