@synopackageland/sdk 0.12.0 → 0.12.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 +34 -0
- package/dist/i18n/delegate/de.json +2 -1
- package/dist/i18n/delegate/en.json +2 -1
- package/dist/i18n/delegate/es.json +2 -1
- package/dist/i18n/delegate/fr.json +2 -1
- package/dist/i18n/delegate/it.json +2 -1
- package/dist/i18n/delegate/ja.json +2 -1
- package/dist/i18n/delegate/ko.json +2 -1
- package/dist/i18n/delegate/zh-CN.json +2 -1
- package/dist/i18n/delegate/zh-TW.json +2 -1
- package/dist/index.js +2520 -2487
- package/dist/src/context.d.ts +3 -0
- package/dist/src/delegate/copy.d.ts +2 -0
- package/dist/src/delegate/executor-setup.d.ts +1 -0
- package/dist/src/delegate/use-scope-approval.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/launch.d.ts +23 -0
- package/dist/src/protocol/v1.d.ts +2 -1
- package/dist/style.css +1 -1
- package/dist/vue.js +752 -744
- package/package.json +2 -2
- package/spec/protocol/v1/README.md +13 -0
- package/spec/protocol/v1/schema/webapi.call.json +6 -1
- package/spec/protocol/v1/vectors/webapi.jsonl +1 -0
package/README.md
CHANGED
|
@@ -83,6 +83,40 @@ so the DSM window's ctx works as it is.
|
|
|
83
83
|
<AppShell v-model="page" :ctx="ctx" :locale="ctx.locale" :pages="pages" sidebar-storage-key="HelloGo" />
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
## Launch links
|
|
87
|
+
|
|
88
|
+
A DSM desktop link opens the App's window on one of its pages:
|
|
89
|
+
`https://<nas>:5001/?launchApp=SYNO.SDS.<package>.Instance&launchParam=<params>`,
|
|
90
|
+
or `SYNO.SDS.AppLaunch('SYNO.SDS.<package>.Instance', {route: '/a/notes/42'})`
|
|
91
|
+
from DSM's own JavaScript. The DSM window passes the
|
|
92
|
+
App's string values from the launch that opened it as `ctx.launchParams`, and
|
|
93
|
+
those of each later launch of the open window to `ctx.onLaunch(fn)`. The
|
|
94
|
+
values are untrusted text.
|
|
95
|
+
|
|
96
|
+
`route` is the convention the helpers read: the App route a portal link puts
|
|
97
|
+
after its `#`. `launchRoute(params)` returns it when it is a path from the App
|
|
98
|
+
root (one leading `/`, no backslash or control character, at most 2048
|
|
99
|
+
characters), else `undefined`. `followLaunchRoute(ctx, navigate)` navigates to
|
|
100
|
+
the opening launch's route at once and to each later one's, and returns a
|
|
101
|
+
function that stops; outside DSM it follows nothing. Map both sources onto the
|
|
102
|
+
same router: a portal or full-page launch reads its own `#` as before.
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
// Vue Router with createWebHashHistory: #/a/notes/42 in a portal link, route=/a/notes/42 from DSM.
|
|
106
|
+
const stop = followLaunchRoute(ctx, route => { void router.replace(route) })
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`dsmLaunchURL(origin, packageId, params)` builds the desktop link, encoding each
|
|
110
|
+
key and value the way DSM decodes them:
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
dsmLaunchURL('https://nas.example:5001', 'HelloGo', {route: '/a/notes/42'})
|
|
114
|
+
// https://nas.example:5001/?launchApp=SYNO.SDS.HelloGo.Instance&launchParam=route%3D%252Fa%252Fnotes%252F42
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
DSM replays the opening launch's values when it restores the desktop's windows
|
|
118
|
+
at sign-in, so a restored window opens on the same page.
|
|
119
|
+
|
|
86
120
|
## Outside DSM
|
|
87
121
|
|
|
88
122
|
A development page, a preview or a test owns the browser page and has no DSM
|
|
@@ -74,5 +74,6 @@
|
|
|
74
74
|
"statusConfirming": "Wird bestätigt",
|
|
75
75
|
"statusUnreachable": "Die App hat keine Antwort von ihrem Systemdienst erhalten. Mögliche Ursachen: Die App wurde über einen Alias des Anwendungsportals geöffnet und mit einer älteren synopkgland-CLI erstellt; die DSM-Anmeldung ist abgelaufen; oder der Dienst ist noch nicht gestartet oder wurde beendet. Öffnen Sie die App über den DSM-Desktop oder laden Sie die Seite neu; bleibt der Fehler bestehen, genehmigen Sie erneut oder wenden Sie sich an den Entwickler der App.",
|
|
76
76
|
"statusStarting": "Der Hintergrunddienst der App führt nach einer Installation oder einem Upgrade noch seinen Startschritt aus. Aktualisieren Sie gleich; wenn dies anhält, genehmigen Sie erneut oder wenden Sie sich an den Entwickler der App.",
|
|
77
|
-
"retry": "Neuer Versuch"
|
|
77
|
+
"retry": "Neuer Versuch",
|
|
78
|
+
"rawLimit": "Limit für rohe Antworten (Bytes)"
|
|
78
79
|
}
|
|
@@ -74,5 +74,6 @@
|
|
|
74
74
|
"statusConfirming": "Confirming",
|
|
75
75
|
"statusUnreachable": "The app could not get an answer from its system service. Possible causes: the app was opened through an Application Portal alias and was built with an older synopkgland CLI; the DSM sign-in has expired; or the service has not started yet or has stopped. Open the app from the DSM desktop or refresh the page; if this continues, approve again or contact the app's developer.",
|
|
76
76
|
"statusStarting": "The app's background service is still running its start step after an install or upgrade. Refresh in a moment; if this continues, approve again or contact the app's developer.",
|
|
77
|
-
"retry": "Retry"
|
|
77
|
+
"retry": "Retry",
|
|
78
|
+
"rawLimit": "Raw response limit (bytes)"
|
|
78
79
|
}
|
|
@@ -74,5 +74,6 @@
|
|
|
74
74
|
"statusConfirming": "Confirmando",
|
|
75
75
|
"statusUnreachable": "La aplicación no obtuvo respuesta de su servicio del sistema. Posibles causas: la aplicación se abrió mediante un alias del Portal de aplicaciones y se compiló con una CLI de synopkgland antigua; la sesión de DSM ha caducado; o el servicio aún no se ha iniciado o se ha detenido. Abra la aplicación desde el escritorio de DSM o actualice la página; si continúa, apruebe de nuevo o contacte con el desarrollador de la aplicación.",
|
|
76
76
|
"statusStarting": "El servicio en segundo plano de la aplicación aún está ejecutando su paso de inicio tras una instalación o actualización. Actualice en un momento; si continúa, apruebe de nuevo o póngase en contacto con el desarrollador de la aplicación.",
|
|
77
|
-
"retry": "Volver a intentar"
|
|
77
|
+
"retry": "Volver a intentar",
|
|
78
|
+
"rawLimit": "Límite de respuesta sin procesar (bytes)"
|
|
78
79
|
}
|
|
@@ -74,5 +74,6 @@
|
|
|
74
74
|
"statusConfirming": "Confirmation",
|
|
75
75
|
"statusUnreachable": "L'application n'a pas obtenu de réponse de son service système. Causes possibles : l'application a été ouverte par un alias du Portail d'application et compilée avec une ancienne CLI synopkgland ; la connexion à DSM a expiré ; ou le service n'a pas encore démarré ou s'est arrêté. Ouvrez l'application depuis le bureau DSM ou actualisez la page ; si le problème persiste, approuvez de nouveau ou contactez le développeur de l'application.",
|
|
76
76
|
"statusStarting": "Le service en arrière-plan de l'application exécute encore son étape de démarrage après une installation ou une mise à niveau. Actualisez dans un instant ; si cela persiste, approuvez de nouveau ou contactez le développeur de l'application.",
|
|
77
|
-
"retry": "Réessayer"
|
|
77
|
+
"retry": "Réessayer",
|
|
78
|
+
"rawLimit": "Limite de réponse brute (octets)"
|
|
78
79
|
}
|
|
@@ -74,5 +74,6 @@
|
|
|
74
74
|
"statusConfirming": "Conferma in corso",
|
|
75
75
|
"statusUnreachable": "L'app non ha ricevuto risposta dal suo servizio di sistema. Possibili cause: l'app è stata aperta tramite un alias del Portale applicazioni ed è stata compilata con una CLI synopkgland precedente; l'accesso a DSM è scaduto; oppure il servizio non è ancora avviato o si è arrestato. Aprire l'app dal desktop DSM o aggiornare la pagina; se il problema persiste, approvare di nuovo o contattare lo sviluppatore dell'app.",
|
|
76
76
|
"statusStarting": "Il servizio in background dell'app sta ancora eseguendo il passaggio di avvio dopo un'installazione o un aggiornamento. Aggiornare tra poco; se continua, approvare di nuovo o contattare lo sviluppatore dell'app.",
|
|
77
|
-
"retry": "Riprova"
|
|
77
|
+
"retry": "Riprova",
|
|
78
|
+
"rawLimit": "Limite risposta non elaborata (byte)"
|
|
78
79
|
}
|
|
@@ -74,5 +74,6 @@
|
|
|
74
74
|
"statusConfirming": "確認中",
|
|
75
75
|
"statusUnreachable": "アプリがシステムサービスから応答を得られませんでした。考えられる原因:アプリケーションポータルのエイリアス URL から開いたが、アプリが古い synopkgland CLI でビルドされている、DSM のサインインの有効期限が切れている、またはサービスがまだ起動していないか停止している。DSM デスクトップからアプリを開くか、ページを再読み込みしてください。解決しない場合は、もう一度承認するか、アプリの開発者に連絡してください。",
|
|
76
76
|
"statusStarting": "アプリのバックグラウンドサービスは、インストールまたはアップグレード後の開始ステップをまだ実行中です。しばらくしてから更新してください。続く場合は、もう一度承認するか、アプリの開発者に問い合わせてください。",
|
|
77
|
-
"retry": "再試行"
|
|
77
|
+
"retry": "再試行",
|
|
78
|
+
"rawLimit": "未加工レスポンスの上限(バイト)"
|
|
78
79
|
}
|
|
@@ -74,5 +74,6 @@
|
|
|
74
74
|
"statusConfirming": "확인 중",
|
|
75
75
|
"statusUnreachable": "앱이 시스템 서비스로부터 응답을 받지 못했습니다. 가능한 원인: 응용 프로그램 포털 별칭 URL로 열었지만 앱이 이전 synopkgland CLI로 빌드됨, DSM 로그인이 만료됨, 또는 서비스가 아직 시작되지 않았거나 중지됨. DSM 데스크톱에서 앱을 열거나 페이지를 새로 고치십시오. 계속 실패하면 다시 승인하거나 앱 개발자에게 문의하십시오.",
|
|
76
76
|
"statusStarting": "앱의 백그라운드 서비스가 설치 또는 업그레이드 후 시작 단계를 아직 실행 중입니다. 잠시 후 새로 고치십시오. 계속되면 다시 승인하거나 앱 개발자에게 문의하십시오.",
|
|
77
|
-
"retry": "재시도"
|
|
77
|
+
"retry": "재시도",
|
|
78
|
+
"rawLimit": "원시 응답 한도(바이트)"
|
|
78
79
|
}
|
|
@@ -74,5 +74,6 @@
|
|
|
74
74
|
"statusConfirming": "确认中",
|
|
75
75
|
"statusUnreachable": "应用无法获得系统服务的响应。可能原因:通过应用程序门户的别名网址打开,而应用是用旧版 synopkgland CLI 构建的;DSM 登录已超时;或系统服务尚未启动或已停止。请改从 DSM 桌面打开应用或刷新页面;若仍失败,请重新批准或联系应用开发者。",
|
|
76
76
|
"statusStarting": "应用的后台服务在安装或升级后仍在运行启动步骤。请稍后刷新;若仍持续,请重新批准或联系应用开发者。",
|
|
77
|
-
"retry": "重试"
|
|
77
|
+
"retry": "重试",
|
|
78
|
+
"rawLimit": "原始响应上限(字节)"
|
|
78
79
|
}
|
|
@@ -74,5 +74,6 @@
|
|
|
74
74
|
"statusConfirming": "確認中",
|
|
75
75
|
"statusUnreachable": "App 無法取得系統服務的回應。可能原因:從應用程式入口的別名網址開啟,而 App 是以舊版 synopkgland CLI 建置;DSM 登入已逾時;或系統服務尚未啟動或已停止。請改從 DSM 桌面開啟 App 或重新整理頁面;若仍失敗,請重新核准或聯絡 App 開發者。",
|
|
76
76
|
"statusStarting": "App 的背景服務在安裝或升級後仍在執行啟動步驟。請稍後重新整理;若仍持續,請重新核准或聯絡 App 開發者。",
|
|
77
|
-
"retry": "重試"
|
|
77
|
+
"retry": "重試",
|
|
78
|
+
"rawLimit": "原始回應上限(位元組)"
|
|
78
79
|
}
|