@synopackageland/cli 0.53.14 → 0.53.15
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,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.53.15 (2026-11-12)
|
|
4
|
+
|
|
5
|
+
- A Portal App below DSM 7.2-64570, whose executor registers the Application Portal entry, no longer writes `instuninst_restart_services="nginx.service"` into INFO. DSM reloaded nginx about a second after install, while Package Center was refreshing `SYNO.API.Info`. The reload closes the browser's keep-alive connections; Safari does not resend the POST, the refresh fails, and that DSM tab loses every API path. Install then ended with "The operation failed. Please sign in to DSM again and retry. undefined is not an object (evaluating 't.indexOf')", and the App window never opened until the page was reloaded. The executor reloads nginx itself when it removes the entry, so the INFO reload did nothing for these Apps. `inspect` no longer requires the declaration for them and still accepts SPKs that carry it. DSM 7.2+ web-config Portals, native gateways and `daemon.ingress` keep it.
|
|
6
|
+
|
|
3
7
|
## 0.53.14 (2026-11-12)
|
|
4
8
|
|
|
5
9
|
- `check`, `build` and `inspect` (also `check <spk>`) project the size of the installed `/var/packages/<package>/INFO`. At install DSM adds `package_icon="<base64>"` and `package_icon_256="<base64>"` lines with PACKAGE_ICON.PNG and PACKAGE_ICON_256.PNG, and the SDK executor reads at most 65536 bytes of that file. A larger INFO makes the executor log "cannot read package INFO" and DSM approval wait at APP_STARTING, although the SPK's own INFO is small. The projection is the SPK INFO plus both base64 lines, byte for byte; 65536 bytes pass and 65537 fail.
|
|
@@ -299,8 +299,6 @@ export async function inspectSpk(spkPath, expectedKind, options = {}) {
|
|
|
299
299
|
executor = inspected.executor;
|
|
300
300
|
if (executor)
|
|
301
301
|
findings.push(...inspectExecutorAnchor(readFileSync(join(dir, "INFO"), "utf8"), executor.executorDigest));
|
|
302
|
-
if (executor?.policy.portal && !portal)
|
|
303
|
-
findings.push(...inspectPortalInfo(info, true));
|
|
304
302
|
if (executor?.policy.portal &&
|
|
305
303
|
info.os_min_ver &&
|
|
306
304
|
OS_MIN_VER.test(info.os_min_ver) &&
|
package/dist/standalone/spk.js
CHANGED
|
@@ -496,7 +496,11 @@ export function renderInfo(manifest, arch, checksum, executorDigest) {
|
|
|
496
496
|
const nginx = nativeGatewaySupported(manifest) || Boolean(manifest.daemon?.ingress);
|
|
497
497
|
if (nginx)
|
|
498
498
|
fields.push(['startstop_restart_services', 'nginx.service']);
|
|
499
|
-
|
|
499
|
+
// An executor-registered portal entry needs no DSM reload: the executor
|
|
500
|
+
// reloads nginx when it removes the entry, and an install-time reload only
|
|
501
|
+
// races DSM's own post-install refresh in the browser.
|
|
502
|
+
const portalReload = Boolean(manifest.portal) && !portalByExecutor(manifest.os_min_ver);
|
|
503
|
+
return portalInfoFields(fields, portalReload || nginx).map(([key, value]) => `${key}=${quote(value)}\n`).join("");
|
|
500
504
|
}
|
|
501
505
|
function copyUiTree(source, target, root) {
|
|
502
506
|
for (const entry of [existsSync(join(source, MODULE_UI_ENTRY)) ? MODULE_UI_ENTRY : "app.js", "app.css"]) {
|
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@ Activate: DSM owns the saved setting. Administrators use the app's portal panel
|
|
|
26
26
|
|
|
27
27
|
Read: ordinary users call the Go backend's `portal.status` (`authenticated`), which reads `/var/packages/<package>/etc/AppPortal.json` read-only, bounded (64 KiB, no symlinks, one JSON object, matching app id). Anything else is `unavailable` and the UI shows "ask an administrator". A binary CGI must implement the same `{state, alias}` answer itself or ordinary users never see the link.
|
|
28
28
|
|
|
29
|
-
Executor mode (7.1-42661 ≤ os_min_ver < 7.2-64570): no web-config resource, no `etc/portal.*`, no alias wizard step or alias lifecycle. The executor policy carries `portal: {application: <displayname>, alias}` and the operations `portal.register` and `portal.unregister`; the executor writes `/usr/syno/etc/www/app.d/<package>.{json,mustache}`. The package name must match `^[A-Za-z0-9]+(?:[._-][A-Za-z0-9]+)*$` (≤ 64) and displayname be 1–64 characters without control characters, or build fails with `STANDALONE_PORTAL_ENTRY_INVALID`. The native Go CGI is built with `-X main.portal=executor`; the Python/Node/Rust bridge CGI uses `-X main.portalMode=executor`: `portal.status` adds `entry` (`registered`, `unregistered`, `cleanup-required`; an unreadable executor is `unavailable`), and `portal.register` / `portal.unregister` take the administrator's DSM session and return the fresh status. `ctx.portal.register()` / `unregister()` call them; the plain panel shows text and "Enable entry" while unregistered, the alias form and "Remove entry" once registered, text and "Remove entry" when cleanup is required, and no entry buttons for non-administrators. Executor refusals keep their code (`PORTAL_FAILED`). The released templates and SDK provide the executor portal routes and `portal` entry API.
|
|
29
|
+
Executor mode (7.1-42661 ≤ os_min_ver < 7.2-64570): no web-config resource, no `etc/portal.*`, no alias wizard step or alias lifecycle, and no `instuninst_restart_services` in INFO. The executor reloads nginx itself when it removes the entry; a DSM reload right after install closes the browser's keep-alive connections while Package Center refreshes `SYNO.API.Info`, and a failed refresh leaves that DSM tab without API paths (install shows "The operation failed" and the App window never opens until the page is reloaded). The executor policy carries `portal: {application: <displayname>, alias}` and the operations `portal.register` and `portal.unregister`; the executor writes `/usr/syno/etc/www/app.d/<package>.{json,mustache}`. The package name must match `^[A-Za-z0-9]+(?:[._-][A-Za-z0-9]+)*$` (≤ 64) and displayname be 1–64 characters without control characters, or build fails with `STANDALONE_PORTAL_ENTRY_INVALID`. The native Go CGI is built with `-X main.portal=executor`; the Python/Node/Rust bridge CGI uses `-X main.portalMode=executor`: `portal.status` adds `entry` (`registered`, `unregistered`, `cleanup-required`; an unreadable executor is `unavailable`), and `portal.register` / `portal.unregister` take the administrator's DSM session and return the fresh status. `ctx.portal.register()` / `unregister()` call them; the plain panel shows text and "Enable entry" while unregistered, the alias form and "Remove entry" once registered, text and "Remove entry" when cleanup is required, and no entry buttons for non-administrators. Executor refusals keep their code (`PORTAL_FAILED`). The released templates and SDK provide the executor portal routes and `portal` entry API.
|
|
30
30
|
|
|
31
31
|
DSM floor: os_min_ver must be 7.1-42661 or later; below 7.2-64570 the executor registers the entry (above). DSM 7.1 marks the web-config worker Synology-only, so it refuses an unsigned SPK whose conf/resource carries web-config (Package Center error 320, "non-synology-signed package should not use internal worker"; seen on 7.1.1-42962). synopkg from DSM 7.2 on drops that mark, the only change to its worker table; the 7.2 floor comes from that source and is not yet verified on a 7.2 NAS. 7.3.2-86009 and 7.4 install it. Below 7.1 validate/build fail with `STANDALONE_PORTAL_MIN_DSM`, `--min-dsm` cannot go below 7.1, with an executor, `add portal` raises a lower os_min_ver to 7.1-42661; a no-executor target below 7.2-64570 is refused, and inspect flags an INFO os_min_ver below the floor of the SPK's mode. Fix: raise os_min_ver or remove the portal.
|
|
32
32
|
|