@synopackageland/cli 0.53.11 → 0.53.12
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/CHANGELOG.md +4 -0
- package/dist/standalone/root-window.js +15 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.53.12 (2026-11-11)
|
|
4
|
+
|
|
5
|
+
- Root and executor approval reads back a scheduler write that DSM refused before failing. A browser resends a POST whose connection closed before the reply, and DSM runs both copies: the second delete finds no task (`dsm_4802`) and the approval failed although the change had landed. A refused delete whose task is gone counts as deleted, and a refused create that reads back exactly as the requested task counts as created; anything else still fails and rolls back as before.
|
|
6
|
+
|
|
3
7
|
## 0.53.11 (2026-11-11)
|
|
4
8
|
|
|
5
9
|
- `check`, `build` and `inspect` accept `--catalog <catalog.yaml>` (or `SYNOPKGLAND_CATALOG`, also from `.env`): a schema 4 catalog entry, selected by its `pins` package name and the exact SPK version, supplies the store text. Before packaging, the build projects it in memory: INFO `description` and the eight `description_<language>` from the long description (paragraph breaks as spaces, not shortened), INFO `changelog` from that version's English notes joined with ` · `, and nine-language `description`, `long_description` and that version's notes in `spk_land_metadata`. The DSM main menu tooltip keeps the short description. `build` writes `release-notes.md` next to the SPKs and reports the catalog SHA-256 as `catalogText`.
|
|
@@ -70,9 +70,20 @@ export const ROOT_RUNTIME = `function createRootAccess(options) {
|
|
|
70
70
|
params.SynoConfirmPWToken = confirmation.token;
|
|
71
71
|
return send(boot ? eventAPI + ".Root" : taskAPI + ".Root", "create", boot ? 1 : 4, params);
|
|
72
72
|
}
|
|
73
|
+
// A browser sends a POST again when its connection closes before the reply,
|
|
74
|
+
// and DSM runs both: the second delete finds no task (4802) and a second
|
|
75
|
+
// Root create is a Noise replay. A refused write is read back: a task that
|
|
76
|
+
// is gone was deleted, and one that reads as exactly the task was created.
|
|
73
77
|
function remove(task, ref) {
|
|
74
78
|
var boot = task.kind === "boot";
|
|
75
|
-
return send(boot ? eventAPI : taskAPI, "delete", boot ? 1 : 2, boot ? ref : {tasks: [ref]})
|
|
79
|
+
return send(boot ? eventAPI : taskAPI, "delete", boot ? 1 : 2, boot ? ref : {tasks: [ref]}).catch(function (e) {
|
|
80
|
+
return find(task).then(function (current) { if (current.code !== "task_missing") throw e; });
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function place(task, confirmation) {
|
|
84
|
+
return create(task.kind === "boot", definition(task), confirmation).catch(function (e) {
|
|
85
|
+
return find(task).then(function (current) { if (current.state !== "ready") throw e; });
|
|
86
|
+
});
|
|
76
87
|
}
|
|
77
88
|
function isAdmin() { return !!options.user() && options.user().admin === true; }
|
|
78
89
|
function admin() { if (!isAdmin()) throw fail("admin_required"); }
|
|
@@ -160,7 +171,7 @@ export const ROOT_RUNTIME = `function createRootAccess(options) {
|
|
|
160
171
|
if (current.state === "blocked") throw refused(current);
|
|
161
172
|
if (current.state === "ready") return;
|
|
162
173
|
if (current.ref) throw refused(current);
|
|
163
|
-
return
|
|
174
|
+
return place(earlier, confirmation).then(function () { return find(earlier); }).then(function (restored) {
|
|
164
175
|
if (restored.state !== "ready") throw refused(restored);
|
|
165
176
|
});
|
|
166
177
|
}).catch(function (e) { failed = reason(e); });
|
|
@@ -199,7 +210,7 @@ export const ROOT_RUNTIME = `function createRootAccess(options) {
|
|
|
199
210
|
if (current.state === "ready") return;
|
|
200
211
|
if (current.state === "blocked") throw refused(current);
|
|
201
212
|
var deleted = current.ref ? remove(task, current.ref).then(function () { removed.push({kind: task.kind, name: task.name, header: task.header, script: current.script}); }) : Promise.resolve();
|
|
202
|
-
return deleted.then(function () { return
|
|
213
|
+
return deleted.then(function () { return place(task, confirmation); }).then(function () { created.push(task); });
|
|
203
214
|
}).catch(function (e) { errors[task.kind] = e; });
|
|
204
215
|
});
|
|
205
216
|
});
|
|
@@ -281,7 +292,7 @@ export const ROOT_RUNTIME = `function createRootAccess(options) {
|
|
|
281
292
|
return find(task).then(function (current) {
|
|
282
293
|
if (current.state === "blocked" || current.state === "unsupported") throw fail("executor_selection_conflict");
|
|
283
294
|
var removed = current.ref ? remove(task, current.ref) : Promise.resolve();
|
|
284
|
-
return removed.then(function () { return
|
|
295
|
+
return removed.then(function () { return place(task, confirmation); });
|
|
285
296
|
}).then(function () { return find(task); }).then(function (current) {
|
|
286
297
|
if (current.state !== "ready") throw fail("executor_selection_readback_mismatch");
|
|
287
298
|
return runAndRead(current.ref, 2);
|