@synopackageland/sdk 0.50.0 → 0.50.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/README.md +27 -12
- package/dist/index.js +3000 -2905
- package/dist/src/client.d.ts +12 -0
- package/dist/src/dsm/https.d.ts +6 -0
- package/dist/src/dsm/session.d.ts +2 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/secret.d.ts +12 -0
- package/dist/vue.js +46 -42
- package/executor-manifest.json +1 -1
- package/package.json +1 -1
- package/spec/protocol/v1/README.md +17 -17
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ App's `backend/go.mod`.
|
|
|
17
17
|
|
|
18
18
|
`createDsmSession({read, write, fetch})` provides DSM session carriers for a
|
|
19
19
|
desktop window or an Application Portal page. `ready()` returns the desktop's
|
|
20
|
-
current token, or makes one shared,
|
|
20
|
+
current token, or makes one shared, bounded, same-origin request to
|
|
21
21
|
`webman/login.cgi?enable_syno_token=yes`. `token()` reads the current carrier.
|
|
22
22
|
The optional `write` updates DSM's in-memory session for its own WebAPI client.
|
|
23
23
|
Nothing is persisted. Recovery failure leaves the backend's existing
|
|
@@ -25,6 +25,23 @@ Nothing is persisted. Recovery failure leaves the backend's existing
|
|
|
25
25
|
both the cookie and token. The CLI embeds this factory from the selected SDK
|
|
26
26
|
into every generated native window, including Go-only Apps.
|
|
27
27
|
|
|
28
|
+
An old page can retain a rejected token after another tab signs in again.
|
|
29
|
+
`refresh(rejectedToken)` forces same-origin recovery while sharing concurrent
|
|
30
|
+
requests. `createClient({sessionRetry: {session, operations}})` opts in to one
|
|
31
|
+
retry for trusted `effect: read`, `kind: rpc` operations only. Writes, AI,
|
|
32
|
+
streams and batches never replay; the default remains off because the client
|
|
33
|
+
cannot infer operation effects. Existing `ctx.call` is not automatically wrapped.
|
|
34
|
+
See [HTTPS and session recovery](../docs/https-and-session-recovery.md) for the
|
|
35
|
+
API, cancellation/deadline behavior and the CLI skill link.
|
|
36
|
+
|
|
37
|
+
Many Apps can use HTTP. Only Apps needing secure context, pairing or a strict
|
|
38
|
+
HTTPS Origin policy should require it. Opt-in Go `api.RequireSecureOrigin`
|
|
39
|
+
returns `https_required`; render `identityCopy(locale).httpsTitle` and
|
|
40
|
+
`errors.https_required` with instructions to reopen through HTTPS.
|
|
41
|
+
`readDsmHttpsURL(ctx, location.href)` discovers `dms_https` through
|
|
42
|
+
`readDsmPorts` only for an administrator. Ordinary/unknown users get no
|
|
43
|
+
PortInfo request and should see instructions only. No port is guessed.
|
|
44
|
+
|
|
28
45
|
## DSM WebAPI
|
|
29
46
|
|
|
30
47
|
Every CLI-generated DSM window provides
|
|
@@ -48,7 +65,8 @@ native download form, which cannot set a header, puts it in its same-origin
|
|
|
48
65
|
query.
|
|
49
66
|
|
|
50
67
|
`readDsmPorts(ctx)` already prefers this channel and returns `[]` on refusal,
|
|
51
|
-
unavailable data or its
|
|
68
|
+
unavailable data or its request deadline. Call it only for an administrator;
|
|
69
|
+
PortInfo can refuse ordinary sessions or close their DSM window. It uses a same-origin token
|
|
52
70
|
request only without a window channel. `createNasProvider(ctx)` and executor
|
|
53
71
|
scope selection also use `ctx.webApi` for File Station JSON calls, retaining
|
|
54
72
|
App admission, validation, cancellation and deadlines. A channel refusal never
|
|
@@ -176,8 +194,7 @@ const ctx = createStandaloneContext({locale: 'zh-TW', call: (method, params) =>
|
|
|
176
194
|
|
|
177
195
|
The default logo and app name return to the first entry in `pages` (including a
|
|
178
196
|
hidden entry) through `v-model`. With no pages, activation changes no selection.
|
|
179
|
-
|
|
180
|
-
UI versions keep their static brand. Pointer, Enter and Space share the same
|
|
197
|
+
Use a matching UI release with brand activation support. Pointer, Enter and Space share the same
|
|
181
198
|
native button action; the phone drawer closes on activation.
|
|
182
199
|
|
|
183
200
|
`@brand` receives the original `MouseEvent`. To replace the default selection,
|
|
@@ -271,9 +288,8 @@ tested on its own provides `PageInfoTarget` as it does `PageActionsTarget`.
|
|
|
271
288
|
horizontal bar in web and DSM window layouts. The `sidebar-footer` slot (or
|
|
272
289
|
the account supplied by `ctx`) follows the navigation; mobile keeps its drawer.
|
|
273
290
|
Omit `navigation` to keep the installed UI's default sidebar, or pass
|
|
274
|
-
`navigation="sidebar"` explicitly.
|
|
275
|
-
|
|
276
|
-
existing layout. Sidebar width and collapse preferences are unused in top mode.
|
|
291
|
+
`navigation="sidebar"` explicitly. Use a matching `@synopackageland/ui` release
|
|
292
|
+
with top navigation support. Sidebar width and collapse preferences are unused in top mode.
|
|
277
293
|
|
|
278
294
|
```vue
|
|
279
295
|
<AppShell v-model="page" :locale="ctx.locale" :ctx="ctx" :pages="pages" navigation="top" />
|
|
@@ -291,9 +307,8 @@ surface at every width (web, DSM window and mobile):
|
|
|
291
307
|
<AppShell v-model="page" :locale="ctx.locale" :ctx="ctx" :pages="pages" page-surface="none" />
|
|
292
308
|
```
|
|
293
309
|
|
|
294
|
-
`none` requires
|
|
295
|
-
|
|
296
|
-
provide the no-surface/no-horizontal-gutter behavior. Other shell spacing,
|
|
310
|
+
`none` requires a matching `@synopackageland/ui` release with no-surface support.
|
|
311
|
+
Other shell spacing,
|
|
297
312
|
including the body bottom padding, stays unchanged.
|
|
298
313
|
|
|
299
314
|
Moving to another page starts it at the top; `keep-scroll` keeps the
|
|
@@ -547,8 +562,8 @@ differ provides its adapter there, and the dialog reads as its settings
|
|
|
547
562
|
page does.
|
|
548
563
|
|
|
549
564
|
A full page, or a window DSM left open, keeps running the UI it loaded across
|
|
550
|
-
a package upgrade until the page reloads
|
|
551
|
-
the upgrade load the new UI themselves
|
|
565
|
+
a package upgrade until the page reloads; windows opened after
|
|
566
|
+
the upgrade load the new UI themselves. The CLI's DSM window gives `ctx.uiUpdate`: its `check()` reads the package's `ui/config`
|
|
552
567
|
without the browser cache and answers whether the installed build replaced
|
|
553
568
|
the window this page loaded. `AppShell` given that `ctx` shows
|
|
554
569
|
`UiUpdateNotice` above every page once it answers yes: one line, Updated.
|