@linxin666/dsh-remote-web-ui 0.1.16 → 0.1.18

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.
Files changed (48) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +5 -2
  3. package/README.zh.md +2 -2
  4. package/assets/apple-touch-icon.png +0 -0
  5. package/lib/client.js +48 -58
  6. package/lib/client.js.map +1 -1
  7. package/lib/index.js +76 -14
  8. package/lib/mobile.js +649 -45
  9. package/lib/mobile.js.map +1 -1
  10. package/lib/types/client/PluginSettingsCard.d.ts +11 -0
  11. package/lib/types/client/PluginSettingsCard.d.ts.map +1 -1
  12. package/lib/types/client/PluginSettingsCard.js +11 -5
  13. package/lib/types/mobile/markdown.d.ts +26 -0
  14. package/lib/types/mobile/markdown.d.ts.map +1 -0
  15. package/lib/types/mobile/markdown.js +272 -0
  16. package/lib/types/mobile/markdown.test.d.ts +2 -0
  17. package/lib/types/mobile/markdown.test.d.ts.map +1 -0
  18. package/lib/types/mobile/markdown.test.js +67 -0
  19. package/lib/types/mobile/messages.d.ts +14 -0
  20. package/lib/types/mobile/messages.d.ts.map +1 -1
  21. package/lib/types/mobile/messages.js +54 -2
  22. package/lib/types/mobile/messages.test.js +99 -0
  23. package/lib/types/mobile/mobile-styles.d.ts +1 -1
  24. package/lib/types/mobile/mobile-styles.d.ts.map +1 -1
  25. package/lib/types/mobile/mobile-styles.js +167 -0
  26. package/lib/types/mobile/views/ChatView.d.ts.map +1 -1
  27. package/lib/types/mobile/views/ChatView.js +81 -5
  28. package/lib/types/mobile/views/ChatView.test.js +105 -0
  29. package/lib/types/mobile-api.d.ts.map +1 -1
  30. package/lib/types/mobile-api.js +19 -2
  31. package/lib/types/mobile-routes.d.ts.map +1 -1
  32. package/lib/types/mobile-routes.js +32 -0
  33. package/lib/types/update.d.ts +5 -3
  34. package/lib/types/update.d.ts.map +1 -1
  35. package/lib/types/update.js +22 -6
  36. package/package.json +2 -1
  37. package/src/client/PluginSettingsCard.tsx +50 -47
  38. package/src/client/settings-card.module.css +9 -0
  39. package/src/mobile/markdown.test.ts +77 -0
  40. package/src/mobile/markdown.ts +278 -0
  41. package/src/mobile/messages.test.ts +106 -0
  42. package/src/mobile/messages.ts +66 -2
  43. package/src/mobile/mobile-styles.ts +167 -0
  44. package/src/mobile/views/ChatView.test.tsx +121 -0
  45. package/src/mobile/views/ChatView.tsx +164 -6
  46. package/src/mobile-api.ts +19 -2
  47. package/src/mobile-routes.ts +33 -0
  48. package/src/update.ts +23 -6
package/src/update.ts CHANGED
@@ -412,6 +412,17 @@ const OUTPUT_CAP = 16 * 1024
412
412
  */
413
413
  const WIN_CMD_MISSING_RE = /not recognized as an internal or external command/i
414
414
 
415
+ /**
416
+ * Bypass for pnpm 11's supply-chain gate: `minimumReleaseAge` (default 24 h)
417
+ * silently skips same-day releases — `pnpm update --latest` then exits 0
418
+ * without moving anything and the post-run verification would misreport a
419
+ * stale no-op. The update here is explicitly user-initiated and the panel
420
+ * shows exactly which versions are being installed, so the gate only adds a
421
+ * confusing silent no-op; override it per-invocation instead of asking every
422
+ * user to edit the profile's pnpm-workspace.yaml.
423
+ */
424
+ const MIN_RELEASE_AGE_OVERRIDE = '--config.minimumReleaseAge=0'
425
+
415
426
  /**
416
427
  * Run the update inside the profile directory. Tries pnpm first, falls back
417
428
  * to corepack and then npx when the previous command is missing (ENOENT);
@@ -438,10 +449,14 @@ export function runUpdate(deps: UpdateRunDeps): Promise<UpdateRunResult> {
438
449
  // "0.1.12" without a range), and plain `pnpm update` treats an exact spec
439
450
  // as pinned — it prints "Already up to date" and exits 0 without moving
440
451
  // the installed version, so the panel would report a false success.
452
+ // `MIN_RELEASE_AGE_OVERRIDE` rides along every candidate: without it the
453
+ // pnpm 11 minimumReleaseAge gate (default 24 h) silently keeps same-day
454
+ // releases in place, which the post-run verification would then have to
455
+ // surface as `stale` even though the update is legitimate.
441
456
  const candidates: ReadonlyArray<{ command: string; args: string[] }> = [
442
- { command: 'pnpm', args: ['update', '--latest', ...packages] },
443
- { command: 'corepack', args: ['pnpm', 'update', '--latest', ...packages] },
444
- { command: 'npx', args: ['--yes', 'pnpm', 'update', '--latest', ...packages] },
457
+ { command: 'pnpm', args: ['update', '--latest', MIN_RELEASE_AGE_OVERRIDE, ...packages] },
458
+ { command: 'corepack', args: ['pnpm', 'update', '--latest', MIN_RELEASE_AGE_OVERRIDE, ...packages] },
459
+ { command: 'npx', args: ['--yes', 'pnpm', 'update', '--latest', MIN_RELEASE_AGE_OVERRIDE, ...packages] },
445
460
  ]
446
461
  // `output` accumulates across candidates for UI display; `currentOutput`
447
462
  // is reset per candidate and carries only that candidate's own diagnostics
@@ -553,9 +568,11 @@ export interface UpdateRunVerifiedDeps {
553
568
 
554
569
  /**
555
570
  * Run the update, then verify the installed versions actually moved. pnpm
556
- * exits 0 even when it silently kept the installed versions — the pnpm 11
557
- * `minimumReleaseAge` gate refuses same-day releases by default — so a green
558
- * exit alone would report a misleading "update complete". Re-read the
571
+ * exits 0 even when it silently kept the installed versions — runUpdate
572
+ * overrides pnpm 11's `minimumReleaseAge` gate (default 24 h) with
573
+ * `--config.minimumReleaseAge=0`, but an older pnpm without the override or
574
+ * another silent no-op can still keep versions in place — so a green exit
575
+ * alone must not report a misleading "update complete". Re-read the
559
576
  * installed versions afterwards and surface a `stale` failure (with the
560
577
  * captured pnpm output) when nothing moved, so the panel can tell the user
561
578
  * how to unblock the gate instead of claiming success.