@synopackageland/sdk 0.49.2 → 0.49.4
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 +8 -0
- package/dist/index.js +507 -506
- package/dist/src/shell/AppShell.vue.d.ts +0 -1
- package/dist/src/shell/app-pages.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/vue.js +2 -3
- package/executor-manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,14 @@ if (!ctx.webApi) throw new Error('DSM window required')
|
|
|
39
39
|
const data = await ctx.webApi('SYNO.Core.Service.PortInfo', 'load', 1, {})
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
Pass WebAPI values, not JSON text: DSM's window channel JSON-encodes every
|
|
43
|
+
value itself, so `{path: ['/home/a']}` is right and
|
|
44
|
+
`{path: JSON.stringify(['/home/a'])}` reaches DSM as a string (DSM 7.4 answers
|
|
45
|
+
401). Where the SDK calls WebAPI itself it sends the session token in the
|
|
46
|
+
`X-SYNO-TOKEN` header, never in a POST body, which DSM refuses (119, on 7.1.1 as on 7.4.1); a
|
|
47
|
+
native download form, which cannot set a header, puts it in its same-origin
|
|
48
|
+
query.
|
|
49
|
+
|
|
42
50
|
`readDsmPorts(ctx)` already prefers this channel and returns `[]` on refusal,
|
|
43
51
|
unavailable data or its five-second deadline. It uses a same-origin token
|
|
44
52
|
request only without a window channel. `createNasProvider(ctx)` and executor
|