@synopackageland/sdk 0.50.3 → 0.50.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 CHANGED
@@ -27,10 +27,15 @@ into every generated native window, including Go-only Apps.
27
27
 
28
28
  An old page can retain a rejected token after another tab signs in again.
29
29
  `refresh(rejectedToken)` forces same-origin recovery while sharing concurrent
30
- requests. `createClient({sessionRetry: {session, operations}})` opts in to one
30
+ requests. Failed refresh or a same-token reply retains the existing carrier
31
+ for later calls; `refresh()` still returns `undefined` and prevents a replay.
32
+ `createClient({sessionRetry: {session, operations}})` opts in to one
31
33
  retry for trusted `effect: read`, `kind: rpc` operations only. Writes, AI,
32
34
  streams and batches never replay; the default remains off because the client
33
- cannot infer operation effects. Existing `ctx.call` is not automatically wrapped.
35
+ cannot infer operation effects. Pass the CLI-generated
36
+ `sessionRetryOperations` from `generated/session-retry.ts` as `operations`;
37
+ unclassified routes have `kind: unknown` and never retry. Existing `ctx.call`
38
+ is not automatically wrapped.
34
39
  See [HTTPS and session recovery](../docs/https-and-session-recovery.md) for the
35
40
  API, cancellation/deadline behavior and the CLI skill link.
36
41
 
@@ -41,6 +46,10 @@ returns `https_required`; render `identityCopy(locale).httpsTitle` and
41
46
  `readDsmHttpsURL(ctx, location.href)` discovers `dms_https` through
42
47
  `readDsmPorts` only for an administrator. Ordinary/unknown users get no
43
48
  PortInfo request and should see instructions only. No port is guessed.
49
+ To preserve the current URL's `launchApp` and `launchParam`, use
50
+ `readDsmHttpsURL(ctx, location.href, {keepLaunchApp: true, signal})`.
51
+ Other query parameters and fragments are dropped; the default still opens DSM
52
+ without launch routing. A third-argument `AbortSignal` remains supported.
44
53
 
45
54
  ## DSM WebAPI
46
55
 
package/dist/index.js CHANGED
@@ -79,7 +79,7 @@ function Me(e) {
79
79
  }
80
80
  function l(d) {
81
81
  var u = s();
82
- return u && u !== d ? Promise.resolve(u) : a || (n = i(e.read()), t = void 0, c(d));
82
+ return u && u !== d ? Promise.resolve(u) : a || c(d);
83
83
  }
84
84
  function c(d) {
85
85
  return o = !0, a = new Promise(function(u) {
@@ -108,7 +108,11 @@ function Me(e) {
108
108
  return;
109
109
  }
110
110
  var $ = m && m.success === !0 ? i(m.SynoToken) : void 0;
111
- $ === d && ($ = void 0), $ && (e.write && e.write($), t = $), f($);
111
+ if ($ === d && ($ = void 0), $) {
112
+ var b = i(e.read());
113
+ e.write && e.write($), n = b, t = $;
114
+ }
115
+ f($);
112
116
  }
113
117
  }).catch(function() {
114
118
  f(void 0);
@@ -3405,7 +3409,7 @@ const J8 = "Speichern im Hintergrund", K8 = "Nach Ihrer Abmeldung speichert dies
3405
3409
  approve: PU,
3406
3410
  confirmChange: MU,
3407
3411
  password: qU
3408
- }, EU = "背景存檔", RU = "登出後,App 仍會把完整檔案存進你選的資料夾;既有檔案不會被取代", LU = "允許此 App 在你登出後繼續儲存到這裡,直到你撤銷授權", IU = "撤銷授權", jU = "選擇資料夾", xU = "管理員核准背景存檔後,你才能選擇存放資料夾", NU = "啟用背景存檔", UU = "背景存檔已停用。管理員可重新啟用,之後你須重新選取目的地", OU = "結果不明。請先檢查原工作與目的地,再決定後續操作。App 不會自動重新儲存", FU = "存取遭拒。請檢查資料夾權限,再重新選取目的地", HU = "你沒有寫入此資料夾的權限。權限恢復後再儲存一次即可,不需要重新選擇資料夾", BU = "你沒有寫入此資料夾的權限,因此這個資料夾沒有完成授權。請選擇其他資料夾,或在權限恢復後重新選擇這個資料夾", VU = "目的地資料夾已不存在。將它移回原處即可再次儲存,或選擇其他目的地", WU = "DSM 的應用程式權限規則不允許你從這個位址使用此應用程式。請管理員調整規則,或從允許的位址再儲存一次", JU = "DSM 的應用程式權限規則不允許你從這個位址使用此應用程式。請管理員調整規則,或從允許的位址重新選擇資料夾", KU = "請重新登入 DSM,再重新整理", GU = "已存在同名檔案。請檢查目的地,並為新工作選擇另一個名稱", ZU = "空間不足。請檢查目的地,再開始新工作", YU = "無法確認操作結果。請重新整理查詢目前結果,再決定後續操作", QU = "允許的範圍已變更,請重新選擇存放資料夾。已存的檔案會保留", XU = "儲存範例檔案", eO = "以自己的權限將小型範例檔案存到目前的目的地", tO = "重試", nO = "存放資料夾", oO = "尚未選擇", aO = "取消", iO = "變更存放資料夾需輸入使用者密碼,並會清除所有使用者的目的地授權。已存檔的檔案會保留", sO = "使用者只能在這個資料夾內選擇存放位置", rO = "核准", cO = "確認變更", lO = "使用者密碼", dO = {
3412
+ }, EU = "背景存檔", RU = "登出後,App 仍會把完整檔案存進你選的資料夾;既有檔案不會被取代", LU = "允許此 App 在你登出後繼續儲存到這裡,直到你撤銷授權", IU = "撤銷授權", jU = "選擇資料夾", xU = "管理員核准背景存檔後,你才能選擇存放資料夾", NU = "啟用背景存檔", UU = "背景存檔已停用。管理員可重新啟用,之後你須重新選取目的地", OU = "結果不明。請先檢查原工作與目的地,再決定後續操作。App 不會自動重新儲存", FU = "存取遭拒。請檢查資料夾權限,再重新選取目的地", HU = "你沒有寫入此資料夾的權限。權限恢復後再儲存一次即可,不需要重新選擇資料夾", BU = "你沒有寫入此資料夾的權限,因此這個資料夾沒有完成授權。請選擇其他資料夾,或在權限恢復後重新選擇這個資料夾", VU = "目的地資料夾已不存在。將它移回原處即可再次儲存,或選擇其他目的地", WU = "DSM 的應用程式權限規則不允許你從這個位址使用此應用程式。請管理員調整規則,或從允許的位址再儲存一次", JU = "DSM 的應用程式權限規則不允許你從這個位址使用此應用程式。請管理員調整規則,或從允許的位址重新選擇資料夾", KU = "請重新登入 DSM,再重新整理", GU = "已存在同名檔案。請檢查目的地,並為新工作選擇另一個名稱", ZU = "空間不足。請檢查目的地,再開始新工作", YU = "無法確認操作結果。請重新整理查詢目前結果,再決定後續操作", QU = "允許的範圍已變更,請重新選擇存放資料夾。已存的檔案會保留", XU = "儲存範例檔案", e4 = "以自己的權限將小型範例檔案存到目前的目的地", t4 = "重試", n4 = "存放資料夾", o4 = "尚未選擇", a4 = "取消", i4 = "變更存放資料夾需輸入使用者密碼,並會清除所有使用者的目的地授權。已存檔的檔案會保留", s4 = "使用者只能在這個資料夾內選擇存放位置", r4 = "核准", c4 = "確認變更", l4 = "使用者密碼", d4 = {
3409
3413
  title: EU,
3410
3414
  help: RU,
3411
3415
  selection: LU,
@@ -3427,27 +3431,27 @@ const J8 = "Speichern im Hintergrund", K8 = "Nach Ihrer Abmeldung speichert dies
3427
3431
  error: YU,
3428
3432
  reselect: QU,
3429
3433
  example: XU,
3430
- exampleHelp: eO,
3431
- retry: tO,
3432
- folder: nO,
3433
- folderNone: oO,
3434
- cancelChange: aO,
3435
- changeHelp: iO,
3436
- approveHelp: sO,
3437
- approve: rO,
3438
- confirmChange: cO,
3439
- password: lO
3440
- }, Ae = /* @__PURE__ */ w(/* @__PURE__ */ Object.assign({ "../../i18n/save/de.json": Aj, "../../i18n/save/en.json": nx, "../../i18n/save/es.json": Rx, "../../i18n/save/fr.json": p0, "../../i18n/save/it.json": B0, "../../i18n/save/ja.json": zN, "../../i18n/save/ko.json": eU, "../../i18n/save/zh-CN.json": TU, "../../i18n/save/zh-TW.json": dO }));
3441
- function uO(e = "en") {
3434
+ exampleHelp: e4,
3435
+ retry: t4,
3436
+ folder: n4,
3437
+ folderNone: o4,
3438
+ cancelChange: a4,
3439
+ changeHelp: i4,
3440
+ approveHelp: s4,
3441
+ approve: r4,
3442
+ confirmChange: c4,
3443
+ password: l4
3444
+ }, Ae = /* @__PURE__ */ w(/* @__PURE__ */ Object.assign({ "../../i18n/save/de.json": Aj, "../../i18n/save/en.json": nx, "../../i18n/save/es.json": Rx, "../../i18n/save/fr.json": p0, "../../i18n/save/it.json": B0, "../../i18n/save/ja.json": zN, "../../i18n/save/ko.json": eU, "../../i18n/save/zh-CN.json": TU, "../../i18n/save/zh-TW.json": d4 }));
3445
+ function u4(e = "en") {
3442
3446
  return Ae[y(e)];
3443
3447
  }
3444
- function B6(e, t = uO(), a = "save", n, o) {
3448
+ function B6(e, t = u4(), a = "save", n, o) {
3445
3449
  const i = F(e, n ?? Object.entries(Ae).find(([, c]) => c === t)?.[0], o);
3446
3450
  if (i) return i.message;
3447
3451
  const s = a === "select", r = e?.code, l = Z(e, n);
3448
3452
  return l || (r === "disabled" ? t.disabled : ["EXECUTOR_UNAVAILABLE", "needs-admin-approval", "needs-scope-confirmation"].includes(r ?? "") ? t.needs : ["session_required", "dsm_session_required", "AUTH_DENIED"].includes(r ?? "") ? t.session : ["DENIED", "DELEGATION_DENIED", "IDENTITY_CHANGED", "SCOPE_DENIED", "INELIGIBLE", "DESTINATION_CHANGED", "denied", "grant-revoked", "identity-changed", "permission-changed"].includes(r ?? "") ? t.denied : r === "PERMISSION_DENIED" ? s ? t.permissionSelect : t.permission : r === "not-found" ? t.missing : r === "APP_DENIED" ? s ? t.appPrivilegeSelect : t.appPrivilege : ["CONFLICT", "conflict", "file-exists", "destination-exists"].includes(r ?? "") ? t.conflict : ["NO_SPACE", "ENOSPC", "no-space"].includes(r ?? "") ? t.space : ["uncertain", "commit-uncertain"].includes(r ?? "") ? t.uncertainHelp : t.error);
3449
3453
  }
3450
- const pO = {
3454
+ const p4 = {
3451
3455
  "portal.title": "Anwendungsportal",
3452
3456
  "portal.link": "Direkter Link nach der DSM-Anmeldung:",
3453
3457
  "portal.inactive": "Nicht aktiv. Wenden Sie einen Alias an, damit Benutzer diese App nach der DSM-Anmeldung direkt öffnen können",
@@ -3472,7 +3476,7 @@ const pO = {
3472
3476
  "portal.removalUnconfirmed": "Diese Seite funktioniert möglicherweise nicht mehr. Öffnen Sie diese App über den DSM-Desktop und prüfen Sie Einstellungen > Anwendungsportal",
3473
3477
  "portal.openDesktop": "DSM-Desktop öffnen",
3474
3478
  "portal.cancel": "Abbrechen"
3475
- }, hO = {
3479
+ }, h4 = {
3476
3480
  "portal.title": "Application Portal",
3477
3481
  "portal.link": "Direct link after DSM sign-in:",
3478
3482
  "portal.inactive": "Not active. Apply an alias to let users open this app directly after DSM sign-in",
@@ -3497,7 +3501,7 @@ const pO = {
3497
3501
  "portal.removalUnconfirmed": "This page may no longer work. Open this app from the DSM desktop and check Settings > Application Portal",
3498
3502
  "portal.openDesktop": "Open DSM desktop",
3499
3503
  "portal.cancel": "Cancel"
3500
- }, gO = {
3504
+ }, g4 = {
3501
3505
  "portal.title": "Portal de aplicaciones",
3502
3506
  "portal.link": "Enlace directo tras iniciar sesión en DSM:",
3503
3507
  "portal.inactive": "Inactivo. Aplique un alias para abrir esta aplicación directamente tras iniciar sesión en DSM",
@@ -3522,7 +3526,7 @@ const pO = {
3522
3526
  "portal.removalUnconfirmed": "Es posible que esta página ya no funcione. Abra esta aplicación desde el escritorio de DSM y revise Configuración > Portal de aplicaciones",
3523
3527
  "portal.openDesktop": "Abrir escritorio de DSM",
3524
3528
  "portal.cancel": "Cancelar"
3525
- }, mO = {
3529
+ }, m4 = {
3526
3530
  "portal.title": "Portail d'application",
3527
3531
  "portal.link": "Lien direct après connexion à DSM :",
3528
3532
  "portal.inactive": "Inactif. Appliquez un alias pour ouvrir cette application directement après connexion à DSM",
@@ -3547,7 +3551,7 @@ const pO = {
3547
3551
  "portal.removalUnconfirmed": "Cette page peut ne plus fonctionner. Ouvrez cette application depuis le bureau DSM et vérifiez Paramètres > Portail des applications",
3548
3552
  "portal.openDesktop": "Ouvrir le bureau DSM",
3549
3553
  "portal.cancel": "Annuler"
3550
- }, fO = {
3554
+ }, f4 = {
3551
3555
  "portal.title": "Portale applicazioni",
3552
3556
  "portal.link": "Link diretto dopo l'accesso a DSM:",
3553
3557
  "portal.inactive": "Non attivo. Applica un alias per aprire questa app direttamente dopo l'accesso a DSM",
@@ -3572,7 +3576,7 @@ const pO = {
3572
3576
  "portal.removalUnconfirmed": "Questa pagina potrebbe non funzionare più. Aprire questa app dal desktop DSM e controllare Impostazioni > Portale applicazioni",
3573
3577
  "portal.openDesktop": "Apri desktop DSM",
3574
3578
  "portal.cancel": "Annulla"
3575
- }, $O = {
3579
+ }, $4 = {
3576
3580
  "portal.title": "アプリケーションポータル",
3577
3581
  "portal.link": "DSM サインイン後の直接リンク:",
3578
3582
  "portal.inactive": "無効です。エイリアスを適用すると、DSM サインイン後にこのアプリを直接開けます",
@@ -3597,7 +3601,7 @@ const pO = {
3597
3601
  "portal.removalUnconfirmed": "このページは使用できなくなった可能性があります。DSM デスクトップからこのアプリを開き、「設定 > アプリケーション ポータル」を確認してください",
3598
3602
  "portal.openDesktop": "DSM デスクトップを開く",
3599
3603
  "portal.cancel": "キャンセル"
3600
- }, vO = {
3604
+ }, v4 = {
3601
3605
  "portal.title": "응용 프로그램 포털",
3602
3606
  "portal.link": "DSM 로그인 후 바로 가기 링크:",
3603
3607
  "portal.inactive": "비활성 상태입니다. 별칭을 적용하면 DSM 로그인 후 이 앱을 바로 열 수 있습니다",
@@ -3622,7 +3626,7 @@ const pO = {
3622
3626
  "portal.removalUnconfirmed": "이 페이지를 더 이상 사용할 수 없을 수 있습니다. DSM 바탕화면에서 이 앱을 열고 설정 > 응용 프로그램 포털을 확인하십시오",
3623
3627
  "portal.openDesktop": "DSM 바탕화면 열기",
3624
3628
  "portal.cancel": "취소"
3625
- }, bO = {
3629
+ }, b4 = {
3626
3630
  "portal.title": "应用程序门户",
3627
3631
  "portal.link": "DSM 登录后的直接链接:",
3628
3632
  "portal.inactive": "尚未启用。应用别名后,用户可在 DSM 登录后直接打开此应用",
@@ -3647,7 +3651,7 @@ const pO = {
3647
3651
  "portal.removalUnconfirmed": "此页面可能已无法使用。请从 DSM 桌面打开此 App,再查看“设置 > 应用程序入口”",
3648
3652
  "portal.openDesktop": "打开 DSM 桌面",
3649
3653
  "portal.cancel": "取消"
3650
- }, SO = {
3654
+ }, S4 = {
3651
3655
  "portal.title": "應用程式入口",
3652
3656
  "portal.link": "DSM 登入後的直接連結:",
3653
3657
  "portal.inactive": "尚未啟用。套用別名後,使用者可在 DSM 登入後直接開啟這個 App",
@@ -3672,65 +3676,11 @@ const pO = {
3672
3676
  "portal.removalUnconfirmed": "這一頁可能已無法使用。請從 DSM 桌面開啟此 App,再查看「設定 > 應用程式入口」",
3673
3677
  "portal.openDesktop": "開啟 DSM 桌面",
3674
3678
  "portal.cancel": "取消"
3675
- }, _O = /* @__PURE__ */ w(/* @__PURE__ */ Object.assign({ "../../i18n/portal/de.json": pO, "../../i18n/portal/en.json": hO, "../../i18n/portal/es.json": gO, "../../i18n/portal/fr.json": mO, "../../i18n/portal/it.json": fO, "../../i18n/portal/ja.json": $O, "../../i18n/portal/ko.json": vO, "../../i18n/portal/zh-CN.json": bO, "../../i18n/portal/zh-TW.json": SO }));
3676
- function zO(e) {
3677
- return Object.fromEntries(Object.entries(_O[y(e)]).map(([t, a]) => [t.slice(7), a]));
3679
+ }, _4 = /* @__PURE__ */ w(/* @__PURE__ */ Object.assign({ "../../i18n/portal/de.json": p4, "../../i18n/portal/en.json": h4, "../../i18n/portal/es.json": g4, "../../i18n/portal/fr.json": m4, "../../i18n/portal/it.json": f4, "../../i18n/portal/ja.json": $4, "../../i18n/portal/ko.json": v4, "../../i18n/portal/zh-CN.json": b4, "../../i18n/portal/zh-TW.json": S4 }));
3680
+ function z4(e) {
3681
+ return Object.fromEntries(Object.entries(_4[y(e)]).map(([t, a]) => [t.slice(7), a]));
3678
3682
  }
3679
- const yO = "Die App ist derzeit nicht verfügbar. Versuchen Sie es später erneut", AO = "Die Anfrage hat zu lange gedauert und wurde abgebrochen. Versuchen Sie es erneut oder mit einer kleineren Aufgabe", kO = "Die Datei ist größer als zulässig", wO = "Die Datei kann nicht gelesen werden. Bitte versuchen Sie es später erneut", DO = "Dieses Benutzerkonto kann nicht ermittelt werden. Bitte versuchen Sie es später erneut", CO = "Die App ist angehalten. Starten Sie sie im Paket-Zentrum und versuchen Sie es dann erneut", PO = "Die App wird gestartet. Versuchen Sie es gleich erneut", MO = "DSM hat dieser Seite kein Anmeldetoken gegeben. Melden Sie sich mit Ihrem Kennwort erneut bei DSM an und öffnen Sie die App dann über den DSM-Desktop", qO = {
3680
- app_unavailable: yO,
3681
- request_timeout: AO,
3682
- limit_exceeded: kO,
3683
- read_failed: wO,
3684
- identity_unavailable: DO,
3685
- APP_STOPPED: CO,
3686
- APP_STARTING: PO,
3687
- credential_not_ready: MO
3688
- }, TO = "The App is not available right now. Try again later", EO = "The request took too long and was stopped. Try again, or try a smaller task", RO = "The file is larger than allowed", LO = "Unable to read the file. Please try again later", IO = "Unable to identify this user account. Please try again later", jO = "The App is stopped. Start it in Package Center, then try again", xO = "The App is starting. Try again in a moment", NO = "DSM did not give this page its sign-in token. Sign in to DSM again with your password, then open the App from the DSM desktop", UO = {
3689
- app_unavailable: TO,
3690
- request_timeout: EO,
3691
- limit_exceeded: RO,
3692
- read_failed: LO,
3693
- identity_unavailable: IO,
3694
- APP_STOPPED: jO,
3695
- APP_STARTING: xO,
3696
- credential_not_ready: NO
3697
- }, OO = "La App no está disponible en este momento. Vuelva a intentarlo más tarde", FO = "La solicitud tardó demasiado y se detuvo. Vuelva a intentarlo o pruebe con una tarea más pequeña", HO = "El archivo supera el tamaño permitido", BO = "No se puede leer el archivo. Vuelva a intentarlo más tarde", VO = "No se puede identificar esta cuenta de usuario. Vuelva a intentarlo más tarde", WO = "La App está detenida. Iníciela en el Centro de paquetes y vuelva a intentarlo", JO = "La App se está iniciando. Vuelva a intentarlo en un momento", KO = "DSM no proporcionó a esta página su token de inicio de sesión. Inicie sesión de nuevo en DSM con su contraseña y abra la App desde el escritorio de DSM", GO = {
3698
- app_unavailable: OO,
3699
- request_timeout: FO,
3700
- limit_exceeded: HO,
3701
- read_failed: BO,
3702
- identity_unavailable: VO,
3703
- APP_STOPPED: WO,
3704
- APP_STARTING: JO,
3705
- credential_not_ready: KO
3706
- }, ZO = "L’App n’est pas disponible pour le moment. Réessayez plus tard", YO = "La requête a pris trop de temps et a été arrêtée. Réessayez ou essayez une tâche plus petite", QO = "Le fichier dépasse la taille autorisée", XO = "Impossible de lire le fichier. Veuillez réessayer ultérieurement", e4 = "Impossible d'identifier ce compte utilisateur. Veuillez réessayer ultérieurement", t4 = "L’App est arrêtée. Démarrez-la dans le Centre de paquets, puis réessayez", n4 = "L’App démarre. Réessayez dans un instant", o4 = "DSM n’a pas fourni de jeton de connexion à cette page. Reconnectez-vous à DSM avec votre mot de passe, puis ouvrez l’App depuis le bureau DSM", a4 = {
3707
- app_unavailable: ZO,
3708
- request_timeout: YO,
3709
- limit_exceeded: QO,
3710
- read_failed: XO,
3711
- identity_unavailable: e4,
3712
- APP_STOPPED: t4,
3713
- APP_STARTING: n4,
3714
- credential_not_ready: o4
3715
- }, i4 = "L’App non è al momento disponibile. Riprovare più tardi", s4 = "La richiesta ha impiegato troppo tempo ed è stata interrotta. Riprovare o provare con un’attività più piccola", r4 = "Il file supera le dimensioni consentite", c4 = "Impossibile leggere il file. Riprovare più tardi", l4 = "Impossibile identificare questo account utente. Riprovare più tardi", d4 = "L’App è arrestata. Avviarla in Centro pacchetti, quindi riprovare", u4 = "L’App è in fase di avvio. Riprovare tra poco", p4 = "DSM non ha fornito a questa pagina il token di accesso. Accedere di nuovo a DSM con la password, quindi aprire l’App dal desktop di DSM", h4 = {
3716
- app_unavailable: i4,
3717
- request_timeout: s4,
3718
- limit_exceeded: r4,
3719
- read_failed: c4,
3720
- identity_unavailable: l4,
3721
- APP_STOPPED: d4,
3722
- APP_STARTING: u4,
3723
- credential_not_ready: p4
3724
- }, g4 = "App は現在使用できません。しばらくしてから再試行してください", m4 = "リクエストの処理に時間がかかりすぎたため、停止しました。もう一度お試しいただくか、範囲を小さくしてください", f4 = "ファイルが許可されたサイズを超えています", $4 = "ファイルを読み取れません。後でもう一度お試しください", v4 = "このユーザー アカウントを識別できません。後でもう一度お試しください", b4 = "App は停止しています。パッケージ センターで起動してから、もう一度お試しください", S4 = "App を起動しています。しばらくしてから再試行してください", _4 = "DSM がこのページにサインイン トークンを提供していません。パスワードで DSM に再度サインインしてから、DSM デスクトップから App を開いてください", z4 = {
3725
- app_unavailable: g4,
3726
- request_timeout: m4,
3727
- limit_exceeded: f4,
3728
- read_failed: $4,
3729
- identity_unavailable: v4,
3730
- APP_STOPPED: b4,
3731
- APP_STARTING: S4,
3732
- credential_not_ready: _4
3733
- }, y4 = "현재 App을 사용할 수 없습니다. 나중에 다시 시도하십시오", A4 = "요청 처리 시간이 너무 오래 걸려 중지되었습니다. 다시 시도하거나 작업 범위를 줄이십시오", k4 = "파일이 허용된 크기를 초과합니다", w4 = "파일을 읽을 수 없습니다. 나중에 다시 시도하십시오", D4 = "이 사용자 계정을 확인할 수 없습니다. 나중에 다시 시도하십시오", C4 = "App이 중지되었습니다. 패키지 센터에서 시작한 후 다시 시도하십시오", P4 = "App을 시작하는 중입니다. 잠시 후 다시 시도하십시오", M4 = "DSM이 이 페이지에 로그인 토큰을 제공하지 않았습니다. 암호로 DSM에 다시 로그인한 후 DSM 데스크톱에서 App을 여십시오", q4 = {
3683
+ const y4 = "Die App ist derzeit nicht verfügbar. Versuchen Sie es später erneut", A4 = "Die Anfrage hat zu lange gedauert und wurde abgebrochen. Versuchen Sie es erneut oder mit einer kleineren Aufgabe", k4 = "Die Datei ist größer als zulässig", w4 = "Die Datei kann nicht gelesen werden. Bitte versuchen Sie es später erneut", D4 = "Dieses Benutzerkonto kann nicht ermittelt werden. Bitte versuchen Sie es später erneut", C4 = "Die App ist angehalten. Starten Sie sie im Paket-Zentrum und versuchen Sie es dann erneut", P4 = "Die App wird gestartet. Versuchen Sie es gleich erneut", M4 = "DSM hat dieser Seite kein Anmeldetoken gegeben. Melden Sie sich mit Ihrem Kennwort erneut bei DSM an und öffnen Sie die App dann über den DSM-Desktop", q4 = {
3734
3684
  app_unavailable: y4,
3735
3685
  request_timeout: A4,
3736
3686
  limit_exceeded: k4,
@@ -3739,7 +3689,7 @@ const yO = "Die App ist derzeit nicht verfügbar. Versuchen Sie es später erneu
3739
3689
  APP_STOPPED: C4,
3740
3690
  APP_STARTING: P4,
3741
3691
  credential_not_ready: M4
3742
- }, T4 = "App 当前不可用,请稍后重试", E4 = "请求处理时间过长,已停止。请重试,或缩小范围后再试", R4 = "文件超过允许的大小", L4 = "无法读取文件。请稍后再试", I4 = "无法识别此用户账号。请稍后再试", j4 = "App 已停止。请在套件中心启动后重试", x4 = "App 正在启动,请稍后重试", N4 = "DSM 没有为此页面提供登录令牌。请使用密码重新登录 DSM,然后从 DSM 桌面打开 App", U4 = {
3692
+ }, T4 = "The App is not available right now. Try again later", E4 = "The request took too long and was stopped. Try again, or try a smaller task", R4 = "The file is larger than allowed", L4 = "Unable to read the file. Please try again later", I4 = "Unable to identify this user account. Please try again later", j4 = "The App is stopped. Start it in Package Center, then try again", x4 = "The App is starting. Try again in a moment", N4 = "DSM did not give this page its sign-in token. Sign in to DSM again with your password, then open the App from the DSM desktop", U4 = {
3743
3693
  app_unavailable: T4,
3744
3694
  request_timeout: E4,
3745
3695
  limit_exceeded: R4,
@@ -3748,7 +3698,7 @@ const yO = "Die App ist derzeit nicht verfügbar. Versuchen Sie es später erneu
3748
3698
  APP_STOPPED: j4,
3749
3699
  APP_STARTING: x4,
3750
3700
  credential_not_ready: N4
3751
- }, O4 = "App 目前無法使用,請稍後再試", F4 = "請求處理太久已停止,請再試一次或縮小範圍", H4 = "檔案超過允許的大小", B4 = "無法讀取檔案。請稍後再試", V4 = "無法識別此使用者帳號。請稍後再試", W4 = "App 已停止。請在套件中心啟動後再試一次", J4 = "App 正在啟動,請稍後再試", K4 = "DSM 沒有提供此頁面的登入權杖。請以密碼重新登入 DSM,再從 DSM 桌面開啟 App", G4 = {
3701
+ }, O4 = "La App no está disponible en este momento. Vuelva a intentarlo más tarde", F4 = "La solicitud tardó demasiado y se detuvo. Vuelva a intentarlo o pruebe con una tarea más pequeña", H4 = "El archivo supera el tamaño permitido", B4 = "No se puede leer el archivo. Vuelva a intentarlo más tarde", V4 = "No se puede identificar esta cuenta de usuario. Vuelva a intentarlo más tarde", W4 = "La App está detenida. Iníciela en el Centro de paquetes y vuelva a intentarlo", J4 = "La App se está iniciando. Vuelva a intentarlo en un momento", K4 = "DSM no proporcionó a esta página su token de inicio de sesión. Inicie sesión de nuevo en DSM con su contraseña y abra la App desde el escritorio de DSM", G4 = {
3752
3702
  app_unavailable: O4,
3753
3703
  request_timeout: F4,
3754
3704
  limit_exceeded: H4,
@@ -3757,12 +3707,66 @@ const yO = "Die App ist derzeit nicht verfügbar. Versuchen Sie es später erneu
3757
3707
  APP_STOPPED: W4,
3758
3708
  APP_STARTING: J4,
3759
3709
  credential_not_ready: K4
3760
- }, Z4 = /* @__PURE__ */ w(/* @__PURE__ */ Object.assign({ "../../i18n/bridge/de.json": qO, "../../i18n/bridge/en.json": UO, "../../i18n/bridge/es.json": GO, "../../i18n/bridge/fr.json": a4, "../../i18n/bridge/it.json": h4, "../../i18n/bridge/ja.json": z4, "../../i18n/bridge/ko.json": q4, "../../i18n/bridge/zh-CN.json": U4, "../../i18n/bridge/zh-TW.json": G4 }));
3710
+ }, Z4 = "L’App n’est pas disponible pour le moment. Réessayez plus tard", Y4 = "La requête a pris trop de temps et a été arrêtée. Réessayez ou essayez une tâche plus petite", Q4 = "Le fichier dépasse la taille autorisée", X4 = "Impossible de lire le fichier. Veuillez réessayer ultérieurement", eO = "Impossible d'identifier ce compte utilisateur. Veuillez réessayer ultérieurement", tO = "L’App est arrêtée. Démarrez-la dans le Centre de paquets, puis réessayez", nO = "L’App démarre. Réessayez dans un instant", oO = "DSM n’a pas fourni de jeton de connexion à cette page. Reconnectez-vous à DSM avec votre mot de passe, puis ouvrez l’App depuis le bureau DSM", aO = {
3711
+ app_unavailable: Z4,
3712
+ request_timeout: Y4,
3713
+ limit_exceeded: Q4,
3714
+ read_failed: X4,
3715
+ identity_unavailable: eO,
3716
+ APP_STOPPED: tO,
3717
+ APP_STARTING: nO,
3718
+ credential_not_ready: oO
3719
+ }, iO = "L’App non è al momento disponibile. Riprovare più tardi", sO = "La richiesta ha impiegato troppo tempo ed è stata interrotta. Riprovare o provare con un’attività più piccola", rO = "Il file supera le dimensioni consentite", cO = "Impossibile leggere il file. Riprovare più tardi", lO = "Impossibile identificare questo account utente. Riprovare più tardi", dO = "L’App è arrestata. Avviarla in Centro pacchetti, quindi riprovare", uO = "L’App è in fase di avvio. Riprovare tra poco", pO = "DSM non ha fornito a questa pagina il token di accesso. Accedere di nuovo a DSM con la password, quindi aprire l’App dal desktop di DSM", hO = {
3720
+ app_unavailable: iO,
3721
+ request_timeout: sO,
3722
+ limit_exceeded: rO,
3723
+ read_failed: cO,
3724
+ identity_unavailable: lO,
3725
+ APP_STOPPED: dO,
3726
+ APP_STARTING: uO,
3727
+ credential_not_ready: pO
3728
+ }, gO = "App は現在使用できません。しばらくしてから再試行してください", mO = "リクエストの処理に時間がかかりすぎたため、停止しました。もう一度お試しいただくか、範囲を小さくしてください", fO = "ファイルが許可されたサイズを超えています", $O = "ファイルを読み取れません。後でもう一度お試しください", vO = "このユーザー アカウントを識別できません。後でもう一度お試しください", bO = "App は停止しています。パッケージ センターで起動してから、もう一度お試しください", SO = "App を起動しています。しばらくしてから再試行してください", _O = "DSM がこのページにサインイン トークンを提供していません。パスワードで DSM に再度サインインしてから、DSM デスクトップから App を開いてください", zO = {
3729
+ app_unavailable: gO,
3730
+ request_timeout: mO,
3731
+ limit_exceeded: fO,
3732
+ read_failed: $O,
3733
+ identity_unavailable: vO,
3734
+ APP_STOPPED: bO,
3735
+ APP_STARTING: SO,
3736
+ credential_not_ready: _O
3737
+ }, yO = "현재 App을 사용할 수 없습니다. 나중에 다시 시도하십시오", AO = "요청 처리 시간이 너무 오래 걸려 중지되었습니다. 다시 시도하거나 작업 범위를 줄이십시오", kO = "파일이 허용된 크기를 초과합니다", wO = "파일을 읽을 수 없습니다. 나중에 다시 시도하십시오", DO = "이 사용자 계정을 확인할 수 없습니다. 나중에 다시 시도하십시오", CO = "App이 중지되었습니다. 패키지 센터에서 시작한 후 다시 시도하십시오", PO = "App을 시작하는 중입니다. 잠시 후 다시 시도하십시오", MO = "DSM이 이 페이지에 로그인 토큰을 제공하지 않았습니다. 암호로 DSM에 다시 로그인한 후 DSM 데스크톱에서 App을 여십시오", qO = {
3738
+ app_unavailable: yO,
3739
+ request_timeout: AO,
3740
+ limit_exceeded: kO,
3741
+ read_failed: wO,
3742
+ identity_unavailable: DO,
3743
+ APP_STOPPED: CO,
3744
+ APP_STARTING: PO,
3745
+ credential_not_ready: MO
3746
+ }, TO = "App 当前不可用,请稍后重试", EO = "请求处理时间过长,已停止。请重试,或缩小范围后再试", RO = "文件超过允许的大小", LO = "无法读取文件。请稍后再试", IO = "无法识别此用户账号。请稍后再试", jO = "App 已停止。请在套件中心启动后重试", xO = "App 正在启动,请稍后重试", NO = "DSM 没有为此页面提供登录令牌。请使用密码重新登录 DSM,然后从 DSM 桌面打开 App", UO = {
3747
+ app_unavailable: TO,
3748
+ request_timeout: EO,
3749
+ limit_exceeded: RO,
3750
+ read_failed: LO,
3751
+ identity_unavailable: IO,
3752
+ APP_STOPPED: jO,
3753
+ APP_STARTING: xO,
3754
+ credential_not_ready: NO
3755
+ }, OO = "App 目前無法使用,請稍後再試", FO = "請求處理太久已停止,請再試一次或縮小範圍", HO = "檔案超過允許的大小", BO = "無法讀取檔案。請稍後再試", VO = "無法識別此使用者帳號。請稍後再試", WO = "App 已停止。請在套件中心啟動後再試一次", JO = "App 正在啟動,請稍後再試", KO = "DSM 沒有提供此頁面的登入權杖。請以密碼重新登入 DSM,再從 DSM 桌面開啟 App", GO = {
3756
+ app_unavailable: OO,
3757
+ request_timeout: FO,
3758
+ limit_exceeded: HO,
3759
+ read_failed: BO,
3760
+ identity_unavailable: VO,
3761
+ APP_STOPPED: WO,
3762
+ APP_STARTING: JO,
3763
+ credential_not_ready: KO
3764
+ }, ZO = /* @__PURE__ */ w(/* @__PURE__ */ Object.assign({ "../../i18n/bridge/de.json": q4, "../../i18n/bridge/en.json": U4, "../../i18n/bridge/es.json": G4, "../../i18n/bridge/fr.json": aO, "../../i18n/bridge/it.json": hO, "../../i18n/bridge/ja.json": zO, "../../i18n/bridge/ko.json": qO, "../../i18n/bridge/zh-CN.json": UO, "../../i18n/bridge/zh-TW.json": GO }));
3761
3765
  function V6(e, t) {
3762
- const a = e?.code, n = Z4[y(t)];
3766
+ const a = e?.code, n = ZO[y(t)];
3763
3767
  return typeof a == "string" && Object.hasOwn(n, a) ? n[a] : void 0;
3764
3768
  }
3765
- const se = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/, Y4 = [
3769
+ const se = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/, YO = [
3766
3770
  "dsfile",
3767
3771
  "indexdb",
3768
3772
  "mobile",
@@ -3782,7 +3786,7 @@ const se = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/, Y4 = [
3782
3786
  "photo",
3783
3787
  "sso",
3784
3788
  "synologymeet"
3785
- ], re = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/, Q4 = ["registered", "unregistered", "cleanup-required"], X4 = { dsm_4100: "portal_alias_invalid", dsm_4102: "portal_alias_reserved", dsm_4103: "portal_alias_in_use", dsm_105: "admin_required" }, ce = (e) => e?.code;
3789
+ ], re = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/, QO = ["registered", "unregistered", "cleanup-required"], XO = { dsm_4100: "portal_alias_invalid", dsm_4102: "portal_alias_reserved", dsm_4103: "portal_alias_in_use", dsm_105: "admin_required" }, ce = (e) => e?.code;
3786
3790
  function W6(e) {
3787
3791
  function t(h, m, v) {
3788
3792
  const $ = { state: h, canManage: v === !0, controlPanel: v !== void 0, defaultAlias: e.defaultAlias };
@@ -3817,7 +3821,7 @@ function W6(e) {
3817
3821
  return e.isAdmin() ? t("unavailable", void 0, !1) : t("unavailable");
3818
3822
  }
3819
3823
  if (!e.isAdmin()) return a(h);
3820
- const m = Q4.find(($) => $ === h?.entry);
3824
+ const m = QO.find(($) => $ === h?.entry);
3821
3825
  if (!m) return t("unavailable", void 0, !1);
3822
3826
  if (m === "registered") return { ...await o(), entry: m };
3823
3827
  const v = a(h);
@@ -3852,17 +3856,17 @@ function W6(e) {
3852
3856
  try {
3853
3857
  await e.send("SYNO.Core.AppPortal", "set", 2, { id: e.appId, alias: h });
3854
3858
  } catch (m) {
3855
- throw { code: X4[ce(m) ?? ""] ?? "portal_unavailable" };
3859
+ throw { code: XO[ce(m) ?? ""] ?? "portal_unavailable" };
3856
3860
  }
3857
3861
  return d();
3858
3862
  }
3859
3863
  const f = {
3860
- messages: zO(e.locale),
3864
+ messages: z4(e.locale),
3861
3865
  status: u,
3862
3866
  lastStatus: () => r,
3863
3867
  async apply(h) {
3864
3868
  if (typeof h != "string" || !se.test(h)) throw { code: "portal_alias_invalid" };
3865
- if (Y4.includes(h)) throw { code: "portal_alias_reserved" };
3869
+ if (YO.includes(h)) throw { code: "portal_alias_reserved" };
3866
3870
  return g(h);
3867
3871
  },
3868
3872
  disable: () => g(null),
@@ -4633,16 +4637,18 @@ async function S6(e, t) {
4633
4637
  }
4634
4638
  async function n5(e, t, a) {
4635
4639
  if (e.user?.isAdmin !== !0) return;
4636
- let n;
4640
+ const n = a && "aborted" in a ? { signal: a } : a, o = n?.signal;
4641
+ let i;
4637
4642
  try {
4638
- n = new URL(t);
4643
+ i = new URL(t);
4639
4644
  } catch {
4640
4645
  return;
4641
4646
  }
4642
- if (!["http:", "https:"].includes(n.protocol) || n.username || n.password) return;
4643
- const o = (await S6(e, a)).filter((s) => s.id === "dms_https" && /(^|[,\s])tcp($|[,\s])|^all$/.test(s.protocol)), i = [...new Set(o.flatMap((s) => s.ports))];
4644
- if (!(a?.aborted || i.length !== 1 || o.some((s) => s.ranges.some((r) => r.first !== r.last))))
4645
- return n.protocol = "https:", n.port = String(i[0]), n.pathname = "/webman/", n.search = "", n.hash = "", n.href;
4647
+ if (!["http:", "https:"].includes(i.protocol) || i.username || i.password) return;
4648
+ const s = (await S6(e, o)).filter((d) => d.id === "dms_https" && /(^|[,\s])tcp($|[,\s])|^all$/.test(d.protocol)), r = [...new Set(s.flatMap((d) => d.ports))];
4649
+ if (o?.aborted || r.length !== 1 || s.some((d) => d.ranges.some((u) => u.first !== u.last))) return;
4650
+ const l = n?.keepLaunchApp ? i.searchParams.get("launchApp") : null, c = l ? i.searchParams.get("launchParam") : null;
4651
+ return i.protocol = "https:", i.port = String(r[0]), i.pathname = "/webman/", i.search = "", i.hash = "", l && (i.searchParams.set("launchApp", l), c !== null && i.searchParams.set("launchParam", c)), i.href;
4646
4652
  }
4647
4653
  export {
4648
4654
  i5 as DEFAULT_REQUEST_TIMEOUT,
@@ -4660,7 +4666,7 @@ export {
4660
4666
  ye as backgroundCatalogs,
4661
4667
  F6 as backgroundCopy,
4662
4668
  H6 as backgroundErrorCopy,
4663
- Z4 as bridgeCatalogs,
4669
+ ZO as bridgeCatalogs,
4664
4670
  V6 as bridgeErrorCopy,
4665
4671
  w as catalogs,
4666
4672
  I as clientTimeout,
@@ -4701,8 +4707,8 @@ export {
4701
4707
  N6 as nasErrorCopy,
4702
4708
  M6 as openFileInFileStation,
4703
4709
  P6 as openFolderInFileStation,
4704
- _O as portalCatalogs,
4705
- zO as portalMessages,
4710
+ _4 as portalCatalogs,
4711
+ z4 as portalMessages,
4706
4712
  m6 as protocolCodes,
4707
4713
  G6 as protocolOps,
4708
4714
  f6 as protocolSchemas,
@@ -4712,7 +4718,7 @@ export {
4712
4718
  E6 as requestKey,
4713
4719
  X6 as requestSecret,
4714
4720
  Ae as saveCatalogs,
4715
- uO as saveCopy,
4721
+ u4 as saveCopy,
4716
4722
  B6 as saveError,
4717
4723
  T6 as scopedPicker,
4718
4724
  J6 as sharedFolderAccessFor,
@@ -16,10 +16,10 @@ export type BatchResult<T = unknown> = {
16
16
  };
17
17
  export type Batch = <T = unknown>(calls: readonly BatchCall[], options?: CallOptions) => Promise<BatchResult<T>[]>;
18
18
  /** Trusted App metadata, never inferred from method names or request params.
19
- * Copy effect from the operation registry; classify AI and streaming explicitly. */
19
+ * Use the CLI-generated sessionRetryOperations; unknown kinds never retry. */
20
20
  export interface SessionRetryOperation {
21
21
  effect: 'read' | 'write' | 'destructive';
22
- kind: 'rpc' | 'ai' | 'stream';
22
+ kind: 'rpc' | 'ai' | 'stream' | 'unknown';
23
23
  }
24
24
  export interface SessionRetryOptions {
25
25
  session: ReturnType<typeof createDsmSession>;
@@ -1,6 +1,11 @@
1
1
  import type { Context } from '../context';
2
+ export interface DsmHttpsURLOptions {
3
+ signal?: AbortSignal;
4
+ /** Carry launchApp and its launchParam to the HTTPS DSM desktop. */
5
+ keepLaunchApp?: boolean;
6
+ }
2
7
  /** Optional link for an App's https_required page. PortInfo is administrator
3
- * only: unknown and ordinary subjects never start discovery. The result opens
4
- * DSM, not an App route; no query, fragment or credentials are carried across.
8
+ * only: unknown and ordinary subjects never start discovery. By default the
9
+ * result opens DSM without a route; launch parameters can be kept explicitly.
5
10
  * No result means show instructions, never guess a configured port. */
6
- export declare function readDsmHttpsURL(ctx: Pick<Context, 'user' | 'files' | 'webApi' | 'requestTimeout'>, pageURL: string, signal?: AbortSignal): Promise<string | undefined>;
11
+ export declare function readDsmHttpsURL(ctx: Pick<Context, 'user' | 'files' | 'webApi' | 'requestTimeout'>, pageURL: string, signalOrOptions?: AbortSignal | DsmHttpsURLOptions): Promise<string | undefined>;
@@ -40,5 +40,5 @@ export { appDenial, appRefusal, type AppDenial } from './authorization/refusal';
40
40
  export { createEntryCheck, type EntryCheck, type EntryFailure, type EntryMode } from './entry/check';
41
41
  export { createClient, type Batch, type BatchCall, type BatchResult, type ClientOptions, type SessionRetryOptions, type SessionRetryOperation } from './client';
42
42
  export { readDsmPorts, type DsmPort, type DsmPortRange } from './dsm/service-ports';
43
- export { readDsmHttpsURL } from './dsm/https';
43
+ export { readDsmHttpsURL, type DsmHttpsURLOptions } from './dsm/https';
44
44
  export { requestSecret, RequestSecret, redactSecrets } from './secret';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "formatVersion": 1,
3
- "sdkVersion": "0.50.3",
3
+ "sdkVersion": "0.50.4",
4
4
  "executorVersion": "0.49.5",
5
5
  "executorDigests": {
6
6
  "x86_64": "1a2dbb1c93a5d7cf5c4d5cafd2526c152e1cc21611649875db8e1c23837c2874",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/sdk",
3
- "version": "0.50.3",
3
+ "version": "0.50.4",
4
4
  "description": "Frontend SDK for DSM packages built with synopkgland: headless client and Vue components",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/synopackageland/syno-pkg-land-sdk/tree/main/ts#readme",