@synopackageland/cli 0.10.8 → 0.10.9

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 CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.9 (2026-10-15)
4
+
5
+ Builds with SDK 0.10.9 and templates 0.10.10: `init` writes SDK v0.10.9,
6
+ `@synopackageland/sdk` 0.10.9 and `@synopackageland/ui` 0.9.8, and the root-ops
7
+ template's `ExecutorGate.vue` passes `preload`. The executor digest table adds
8
+ SDK 0.10.8 and 0.10.9 (equal to each other; the executor changed in 0.10.8).
9
+ **An App moved from SDK 0.10.7 or earlier and rebuilt is approved once more
10
+ by an administrator after the upgrade**, since its executor digest changes.
11
+ The CLI still needs SDK 0.10.5 or later: an executor without `tasks` (before
12
+ 0.10.8) is read back by the window as before. Use SDK 0.10.9, not 0.10.8:
13
+ 0.10.8's `ExecutorApproval` kept its loading text beside the pages without an
14
+ executor setup.
15
+
16
+ To upgrade an App: devDependency `@synopackageland/cli` 0.10.9 (exact) with
17
+ its lockfile; an App that depends on the SDK directly moves to 0.10.9 (Go
18
+ `require github.com/synopackageland/syno-pkg-land-sdk v0.10.9` with go.sum,
19
+ `@synopackageland/sdk` and `@synopackageland/app` 0.10.9, Cargo tag
20
+ `v0.10.9`, `backend.sdk: 0.10.9`); then rebuild, upgrade, and approve once.
21
+
22
+ 繁中摘要:搭配 SDK 0.10.9、templates 0.10.10(UI 0.9.8)。digest 表新增 SDK 0.10.8/0.10.9
23
+ (兩者相同,executor 在 0.10.8 改變)。自 SDK 0.10.7 以前升級並重建的 App,升級後要由管理員
24
+ 重新核准一次。SDK 下限維持 0.10.5(沒有 `tasks` 的舊 executor 照舊完整核對)。請用 SDK 0.10.9,
25
+ 不要用 0.10.8。App 要改:`@synopackageland/cli` 0.10.9+lock;直接依賴 SDK 的 App 升到 0.10.9。
26
+
27
+ - The DSM window shows an administrator the App without reading Task
28
+ Scheduler and EventScheduler when the pinned, running executor's status
29
+ says its own readback of the approval tasks is `ready` (`tasks`, SDK
30
+ 0.10.8 or later). That readback runs at the executor's start and
31
+ every 10 minutes; a task another administrator changes after it is seen at
32
+ the next one, up to 15 minutes later, instead of when the window opens.
33
+ Approval, the control task's start, stop and purge, and a scope selection
34
+ still read both tasks back first. An executor without `tasks`, or with a
35
+ readback that is not `ready`, is read back by the window as before, and
36
+ the first status request now also serves its health check.
37
+ 繁中:管理員開啟視窗時,若 executor 回報自己的排程核對為 ready,就不再呼叫兩個
38
+ 排程 API;核准、start/stop/purge 與範圍選擇仍先完整核對。舊 executor 照舊核對。
39
+
3
40
  ## 0.10.8 (2026-10-15)
4
41
 
5
42
  Builds with SDK 0.10.7 and templates 0.10.8, as 0.10.7 did: `init` still
@@ -86,5 +86,27 @@
86
86
  "armv7": "cafc97c89f5645c14a8cf31d6d9f258394ed6f2d086478a7aebd04d57c274b4e"
87
87
  },
88
88
  "goToolchain": "go1.26.9"
89
+ },
90
+ "0.10.8": {
91
+ "x86_64": "ba38f5764d5f0510706afe39979eef18bf2b8a72421a3a495810c628db0c962d",
92
+ "aarch64": "b5129b26714c25c0eda83931f3a66961fa9ecd059074c534159db6a68aefd8f7",
93
+ "armv7": "359005fbab7714c29d0d0598f09f3b011aa643be26d0368726a023edbef53b8e",
94
+ "lifecycle": {
95
+ "x86_64": "d65500c4f04713a32b45d360059281391acfa5e00ee24895fdd2de7b82735372",
96
+ "aarch64": "94f6cd119186ff482b8aea56541dd1f9d53c147566bc1efdca6f5a1c86198331",
97
+ "armv7": "cafc97c89f5645c14a8cf31d6d9f258394ed6f2d086478a7aebd04d57c274b4e"
98
+ },
99
+ "goToolchain": "go1.26.9"
100
+ },
101
+ "0.10.9": {
102
+ "x86_64": "ba38f5764d5f0510706afe39979eef18bf2b8a72421a3a495810c628db0c962d",
103
+ "aarch64": "b5129b26714c25c0eda83931f3a66961fa9ecd059074c534159db6a68aefd8f7",
104
+ "armv7": "359005fbab7714c29d0d0598f09f3b011aa643be26d0368726a023edbef53b8e",
105
+ "lifecycle": {
106
+ "x86_64": "d65500c4f04713a32b45d360059281391acfa5e00ee24895fdd2de7b82735372",
107
+ "aarch64": "94f6cd119186ff482b8aea56541dd1f9d53c147566bc1efdca6f5a1c86198331",
108
+ "armv7": "cafc97c89f5645c14a8cf31d6d9f258394ed6f2d086478a7aebd04d57c274b4e"
109
+ },
110
+ "goToolchain": "go1.26.9"
89
111
  }
90
112
  }
@@ -291,25 +291,29 @@ export const ROOT_RUNTIME = `function createRootAccess(options) {
291
291
  waited = waited || 0;
292
292
  delay = waited < 4000 ? 500 : Math.min(delay * 2, 2000);
293
293
  step = step === undefined ? stepBudget : step;
294
- return options.call("executor.status", {}).then(function (status) {
294
+ return judged(options.call("executor.status", {})).catch(function (e) {
295
+ var steps = e.code === "executor_starting";
296
+ if ((steps ? step : budget) >= delay && options.wait) return options.wait(delay).then(function () { return steps ? alive(budget, delay, step - delay, waited + delay) : alive(budget - delay, delay, step, waited + delay); });
297
+ throw e;
298
+ });
299
+ }
300
+ // The approved executor's reply to one status request, or why it is not.
301
+ function judged(asked) {
302
+ return asked.then(function (status) {
295
303
  if (starting(status)) throw fail("executor_starting", "the executor's start step has not ended.");
296
304
  var why = mismatch(status);
297
305
  if (why) throw fail("executor_status_mismatch", why);
298
306
  return status;
299
307
  }, function (e) {
300
308
  throw fail(e && e.code, "the executor status request failed.");
301
- }).catch(function (e) {
302
- var steps = e.code === "executor_starting";
303
- if ((steps ? step : budget) >= delay && options.wait) return options.wait(delay).then(function () { return steps ? alive(budget, delay, step - delay, waited + delay) : alive(budget - delay, delay, step, waited + delay); });
304
- throw e;
305
309
  });
306
310
  }
307
311
  // step: how long to wait for a start step (ms). A status read waits none:
308
312
  // executor_starting says the package is starting, which the SDK checks
309
- // again on its own.
310
- function health(verified, step) {
313
+ // again on its own. asked: a status request already made, judged as is.
314
+ function health(verified, step, asked) {
311
315
  if (verified.state !== "ready") return Promise.resolve(verified);
312
- return settle(verified, alive(0, undefined, step)).then(function (result) {
316
+ return settle(verified, asked ? judged(asked) : alive(0, undefined, step)).then(function (result) {
313
317
  if (result.code === "executor_starting") delete result.retry;
314
318
  return result;
315
319
  });
@@ -347,8 +351,23 @@ export const ROOT_RUNTIME = `function createRootAccess(options) {
347
351
  return e && lifecycleCodes.indexOf(e.code) >= 0 ? block({tasks: {}}, fail(e.code, "the executor status request failed.")) : needed;
348
352
  });
349
353
  }
354
+ // An administrator asks the executor first. The pinned, running executor
355
+ // reads both tasks back itself under the same rules (spec/scheduler/v1),
356
+ // at start and every 10 minutes, and its status says whether they were
357
+ // ready; the scheduler takes seconds per read. Anything else (an executor
358
+ // without tasks, a stale or failed readback, other digests) is read back
359
+ // here, and that first status serves the health check. Approval and
360
+ // control read back on their own.
361
+ function checked(status) { return pinned(status) && !!status.tasks && status.tasks.state === "ready"; }
362
+ function adminStatus() {
363
+ var asked = options.call("executor.status", {});
364
+ function verify() { return read().then(function (verified) { return health(verified, 0, asked); }); }
365
+ return asked.then(function (status) {
366
+ return checked(status) ? {state: "ready", tasks: {boot: {state: "ready"}, control: {state: "ready"}}, executor: status} : verify();
367
+ }, verify);
368
+ }
350
369
  return {
351
- status: function () { return (isAdmin() ? read().then(function (verified) { return health(verified, 0); }) : userStatus()).then(publish); },
370
+ status: function () { return (isAdmin() ? adminStatus() : userStatus()).then(publish); },
352
371
  authorize: function (password, selectedScope) {
353
372
  if (!busy) busy = Promise.resolve().then(function () { return approve(password, selectedScope); }).catch(function (e) { var r = block({tasks: {}}, e); r.retry = !!(e && e.passwordConfirm); return r; }).then(function (r) { busy = null; return publish(r); });
354
373
  return busy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/cli",
3
- "version": "0.10.8",
3
+ "version": "0.10.9",
4
4
  "description": "Syno Package Land Developer Kit CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -25,7 +25,7 @@
25
25
  "prepublishOnly": "npm run build"
26
26
  },
27
27
  "dependencies": {
28
- "@synopackageland/templates": "0.10.8",
28
+ "@synopackageland/templates": "0.10.10",
29
29
  "ajv": "^8.17.1",
30
30
  "commander": "^13.1.0",
31
31
  "tar": "^7.4.3",