@synopackageland/cli 0.53.1 → 0.53.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.
- package/CHANGELOG.md +5 -0
- package/dist/standalone/daemon-ingress.d.ts +1 -11
- package/dist/standalone/daemon-ingress.js +2 -15
- package/dist/standalone/inspect-spk.js +7 -2
- package/dist/standalone/resource.js +8 -2
- package/docs/daemon.md +3 -2
- package/docs/path-ingress.md +22 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.53.2 (2026-11-10)
|
|
4
|
+
|
|
5
|
+
- Enable identity gateway path ingress on the Application Portal default web server (80/443) when the App declares `portal`, including custom paths, OIDC, header login, entry gates and upstream API/share routes. All path ingress resources share the same Portal registration rule and nginx files; Apps without a portal or path ingress and dedicated-port listeners retain their behavior.
|
|
6
|
+
- Let `inspect` recognize the fixed ingress ownership check before Portal lifecycle hooks, while retaining exact resource and conflict-check validation.
|
|
7
|
+
|
|
3
8
|
## 0.53.1 (2026-11-10)
|
|
4
9
|
|
|
5
10
|
- Fix daemon RPCs returning 404 when an App with `daemon.ingress` opens through its Application Portal alias on DSM's default web server (80/443). The build now also enables `daemon/ingress-nginx.conf` as `nginx-static-config` `type: www` for Apps that declare `portal`; the location, socket, headers and limits are the same file as on the DSM ports. Apps without `portal`, and Apps without `daemon.ingress`, keep an unchanged `conf/resource`.
|
|
@@ -14,17 +14,7 @@ export declare function daemonIngressMinDsmProblem(osMinVer: string | undefined)
|
|
|
14
14
|
export declare const daemonIngressSocket: (pkg: string) => string;
|
|
15
15
|
/** What the daemon learns: where to listen and which path prefix it serves. */
|
|
16
16
|
export declare function ingressEnv(pkg: string, ingress: DaemonIngress): Record<string, string>;
|
|
17
|
-
|
|
18
|
-
* DSM's web-config worker includes a `type: dsm` file only in the DSM server
|
|
19
|
-
* blocks (ports 5000/5001 and the DSM custom domain). An Application Portal
|
|
20
|
-
* alias such as `https://<nas>/<alias>/` lives in the default server (80/443),
|
|
21
|
-
* which includes only `type: www` files, so the App loaded there would get 404
|
|
22
|
-
* from its own daemon. With a portal the same location is also enabled for the
|
|
23
|
-
* default server; the path and proxy rules stay identical. The portal mustache
|
|
24
|
-
* cannot carry it: DSM renders that inside the alias location, where nginx
|
|
25
|
-
* refuses a location outside `/<alias>/`.
|
|
26
|
-
*/
|
|
27
|
-
export declare function daemonIngressResource(portal?: boolean): Record<string, unknown>;
|
|
17
|
+
export declare function daemonIngressResource(): Record<string, unknown>;
|
|
28
18
|
/**
|
|
29
19
|
* Included in DSM's own server blocks, and with a portal in the default
|
|
30
20
|
* server too. Streaming responses (SSE) pass
|
|
@@ -38,21 +38,8 @@ function checkedIngressPath(pkg, ingress) {
|
|
|
38
38
|
export function ingressEnv(pkg, ingress) {
|
|
39
39
|
return { SYNOPKGLAND_INGRESS_PATH: checkedIngressPath(pkg, ingress), SYNOPKGLAND_INGRESS_SOCKET: daemonIngressSocket(pkg) };
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
* blocks (ports 5000/5001 and the DSM custom domain). An Application Portal
|
|
44
|
-
* alias such as `https://<nas>/<alias>/` lives in the default server (80/443),
|
|
45
|
-
* which includes only `type: www` files, so the App loaded there would get 404
|
|
46
|
-
* from its own daemon. With a portal the same location is also enabled for the
|
|
47
|
-
* default server; the path and proxy rules stay identical. The portal mustache
|
|
48
|
-
* cannot carry it: DSM renders that inside the alias location, where nginx
|
|
49
|
-
* refuses a location outside `/<alias>/`.
|
|
50
|
-
*/
|
|
51
|
-
export function daemonIngressResource(portal = false) {
|
|
52
|
-
return { "nginx-static-config": { enable: [
|
|
53
|
-
{ type: "dsm", relpath: DAEMON_INGRESS_CONFIG },
|
|
54
|
-
...(portal ? [{ type: "www", relpath: DAEMON_INGRESS_CONFIG }] : []),
|
|
55
|
-
] } };
|
|
41
|
+
export function daemonIngressResource() {
|
|
42
|
+
return { "nginx-static-config": { enable: [{ type: "dsm", relpath: DAEMON_INGRESS_CONFIG }] } };
|
|
56
43
|
}
|
|
57
44
|
/**
|
|
58
45
|
* Included in DSM's own server blocks, and with a portal in the default
|
|
@@ -1734,10 +1734,15 @@ async function recoverPortal(dir, info, appId, paths, payload, findings, nativeG
|
|
|
1734
1734
|
os_min_ver: info.os_min_ver,
|
|
1735
1735
|
identityGateway: nativeGateway,
|
|
1736
1736
|
}, hook);
|
|
1737
|
+
const ingressCheck = renderGatewayIngressCheck({
|
|
1738
|
+
package: info.package,
|
|
1739
|
+
os_min_ver: info.os_min_ver,
|
|
1740
|
+
identityGateway: nativeGateway,
|
|
1741
|
+
}, hook);
|
|
1737
1742
|
const script = readOptional(join(dir, "scripts", hook));
|
|
1738
|
-
// The fixed
|
|
1743
|
+
// The fixed ingress ownership check and diagnostics precede preparation;
|
|
1739
1744
|
// released scripts can still start directly with preparation.
|
|
1740
|
-
if (![diagnostic, ""].some(prefix => script?.startsWith(`#!/bin/sh\n${prefix}${prepare}${renderPortalLifecycle(hook, portal)}`)))
|
|
1745
|
+
if (![diagnostic, ""].some(prefix => script?.startsWith(`#!/bin/sh\n${ingressCheck}${prefix}${prepare}${renderPortalLifecycle(hook, portal)}`)))
|
|
1741
1746
|
throw new Error(hook);
|
|
1742
1747
|
}
|
|
1743
1748
|
return portal;
|
|
@@ -10,8 +10,14 @@ import { daemonIngressResource } from "./daemon-ingress.js";
|
|
|
10
10
|
*/
|
|
11
11
|
export function renderStandaloneResource(m, portal) {
|
|
12
12
|
const dataShare = m.sharedFolder && sharedFolderResource(m.package, m.sharedFolder);
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
// DSM includes `dsm` locations on 5000/5001 and `www` locations on 80/443,
|
|
14
|
+
// where Application Portal aliases live. Enable the same file on both for
|
|
15
|
+
// every path ingress of a portal App; dedicated-port `server` entries stay
|
|
16
|
+
// independent. The portal mustache is nested inside the alias location and
|
|
17
|
+
// cannot carry these sibling locations.
|
|
18
|
+
const nginx = [nativeGatewayResource(m), m.daemon?.ingress && daemonIngressResource()]
|
|
19
|
+
.flatMap((r) => r?.["nginx-static-config"]?.enable ?? [])
|
|
20
|
+
.flatMap((entry) => portal && entry.type === "dsm" ? [entry, { ...entry, type: "www" }] : [entry]);
|
|
15
21
|
const webConfig = { ...(portal ? portalResource()['web-config'] : {}),
|
|
16
22
|
...(nginx.length ? { 'nginx-static-config': { enable: nginx } } : {}) };
|
|
17
23
|
const resource = {
|
package/docs/daemon.md
CHANGED
|
@@ -203,7 +203,8 @@ The build adds DSM's `web-config` resource:
|
|
|
203
203
|
```
|
|
204
204
|
|
|
205
205
|
With `portal`, the same file is also enabled as `type: www`, next to the
|
|
206
|
-
`app-portal` entry
|
|
206
|
+
`app-portal` entry. This rule applies to every generated path ingress,
|
|
207
|
+
including [identity gateway and custom paths](path-ingress.md#application-portal):
|
|
207
208
|
|
|
208
209
|
```json
|
|
209
210
|
{"web-config":{"app-portal":{"json-relpath":"etc/portal.json","mustache-relpath":"etc/portal.mustache"},"nginx-static-config":{"enable":[{"type":"dsm","relpath":"daemon/ingress-nginx.conf"},{"type":"www","relpath":"daemon/ingress-nginx.conf"}]}}}
|
|
@@ -218,7 +219,7 @@ portal mustache stays DSM's CGI partial: DSM renders it inside the alias
|
|
|
218
219
|
location, where nginx refuses a location outside `/<alias>/`. Apps without a
|
|
219
220
|
portal keep the `dsm` entry alone, so their daemon is not reachable on 80/443.
|
|
220
221
|
A portal alias that an administrator moves to its own port or domain is a
|
|
221
|
-
separate server block;
|
|
222
|
+
separate server block; the CLI does not add the ingress there.
|
|
222
223
|
|
|
223
224
|
`daemon.ingress.path` must be exactly `/synopkgland/<package>/`, where
|
|
224
225
|
`<package>` is the manifest's case-sensitive package ID. For `package: MyApp`,
|
package/docs/path-ingress.md
CHANGED
|
@@ -114,6 +114,28 @@ package and check both the active nginx location and an authenticated browser
|
|
|
114
114
|
navigation. Include anonymous denial, the original entry policy and upstream
|
|
115
115
|
assets/API calls; a successful install response alone is insufficient.
|
|
116
116
|
|
|
117
|
+
## Application Portal
|
|
118
|
+
|
|
119
|
+
With `portal`, every generated path ingress is also registered as `type: www`
|
|
120
|
+
using the same nginx configuration file. This covers identity gateway routes
|
|
121
|
+
(OIDC, header login, the entry gate and upstream API/share paths), explicit
|
|
122
|
+
custom paths and daemon RPC ingress. The DSM server (5000/5001 and its custom
|
|
123
|
+
domain) and the default web server (80/443) therefore use identical locations,
|
|
124
|
+
socket authentication, headers and limits. An App opened through an alias such
|
|
125
|
+
as `https://<host>/<alias>/` can reach its declared ingress on the same origin.
|
|
126
|
+
|
|
127
|
+
Without `portal`, path ingress remains DSM-only. A portal without path ingress
|
|
128
|
+
adds no nginx location. Dedicated App ports remain independent `type: server`
|
|
129
|
+
resources. Portal aliases on their own administrator-selected port or domain
|
|
130
|
+
use a separate server block; the CLI does not add path ingress to that block.
|
|
131
|
+
|
|
132
|
+
The portal mustache stays DSM's CGI partial. Authentication and entry policies
|
|
133
|
+
apply on both servers: anonymous requests still receive the gateway's sign-in
|
|
134
|
+
gate or the daemon's `session_required` response. Only the declared path is
|
|
135
|
+
registered; the bare `/synopkgland/` prefix and other packages' namespaces are
|
|
136
|
+
not exposed by this App. Custom paths retain the same installation ownership
|
|
137
|
+
and conflict checks.
|
|
138
|
+
|
|
117
139
|
## Apps requiring HTTPS
|
|
118
140
|
|
|
119
141
|
With the latest CLI and SDK, declare `identity_gateway.secure_context: required`
|