@sparkelf/dsh-plugin-backup 0.1.0-rc.10 → 0.1.0-rc.9

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.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/plus/backup/README.md
5
- README.md: 627c96595000ade5cb802da1de23cd5f6b95bcae
6
- README.zh.md: ac763584453417834a2bc920755651a5e25aeb0e
5
+ README.md: c4406cb9fcdc6c17fda28c087f287416c52adaa9
6
+ README.zh.md: e7c3d7f6ed809f530772b6eeca23d8f363706c65
package/README.md CHANGED
@@ -27,7 +27,7 @@ Mount the Host entry after `connection`, `webServer`, `settings`, and `workspace
27
27
 
28
28
  The authenticated routes are POST `/api/backup.export.prepare`, GET/HEAD `/api/backup.export`, POST `/api/backup.upload`, and POST `/api/backup.import`. Every route applies Connection Host, Origin, and browser-authentication policy before request data. Tokens expire after ten minutes and are single-use, except HEAD metadata inspection.
29
29
 
30
- Once restore writes begin, closing the page does not interrupt replacement. Workspace storage closes around file replacement and reopens before completion; the Client releases the completed progress stream reader before the UI offers one explicit reload. Client failures remain visible in the Backup section without browser console errors.
30
+ Once restore writes begin, closing the page does not interrupt replacement. Workspace storage closes around file replacement and reopens before completion; the UI then offers one explicit reload. Client failures remain visible in the Backup section without browser console errors.
31
31
 
32
32
  -----
33
33
 
package/README.zh.md CHANGED
@@ -27,7 +27,7 @@ Host entry需mount在`connection`、`webServer`、`settings`及`workspaceRegistr
27
27
 
28
28
  authenticated routes为POST `/api/backup.export.prepare`、GET/HEAD `/api/backup.export`、POST `/api/backup.upload`及POST `/api/backup.import`。每条route会在读取request data前应用Connection Host、Origin及browser-authentication policy。Token在十分钟后过期并且single-use,HEAD metadata inspection除外。
29
29
 
30
- 一旦restore开始写入,关闭page不会中断replacement。Workspace storage会在file replacement期间关闭并在completion前重新打开;Client会先释放completed progress stream reader,再由UI提供一次explicit reload。Client failure保留在Backup section可见状态,不产生browser console error。
30
+ 一旦restore开始写入,关闭page不会中断replacement。Workspace storage会在file replacement期间关闭并在completion前重新打开;UI随后提供一次explicit reload。Client failure保留在Backup section可见状态,不产生browser console error。
31
31
 
32
32
  -----
33
33
 
package/lib/client.js CHANGED
@@ -441,24 +441,20 @@ window.__ModuleLoader__.load({
441
441
  let pending = "";
442
442
  let terminal;
443
443
  let terminalError;
444
- try {
445
- while (true) {
446
- const { done, value } = await reader.read();
447
- pending += decoder.decode(value, { stream: !done });
448
- const lines = pending.split(String.fromCharCode(10));
449
- if (done) pending = "";
450
- else pending = lines.pop();
451
- for (const line of lines) {
452
- if (line === "") continue;
453
- const message = parseProgressLine(line);
454
- if (message.type === "progress") report(message.progress);
455
- else if (message.type === "error") terminalError = message.message;
456
- else terminal = message;
457
- }
458
- if (done) break;
444
+ while (true) {
445
+ const { done, value } = await reader.read();
446
+ pending += decoder.decode(value, { stream: !done });
447
+ const lines = pending.split(String.fromCharCode(10));
448
+ if (done) pending = "";
449
+ else pending = lines.pop();
450
+ for (const line of lines) {
451
+ if (line === "") continue;
452
+ const message = parseProgressLine(line);
453
+ if (message.type === "progress") report(message.progress);
454
+ else if (message.type === "error") terminalError = message.message;
455
+ else terminal = message;
459
456
  }
460
- } finally {
461
- reader.releaseLock();
457
+ if (done) break;
462
458
  }
463
459
  if (terminalError !== void 0) throw new Error(terminalError);
464
460
  if (terminal === void 0) throw new Error("backup progress response ended without a result");
package/package.json CHANGED
@@ -1,47 +1,30 @@
1
1
  {
2
- "dependencies": {
3
- "@deepseek-ai/schemastery": ">=3.18.1",
4
- "fflate": "^0.8.2",
5
- "yauzl": "^3.2.0"
6
- },
2
+ "name": "@sparkelf/dsh-plugin-backup",
7
3
  "description": "Full-stack Plus user-data Backup plugin with streamed Host archive routes and Settings UI",
8
- "devDependencies": {
9
- "@deepseek-ai/cordis": "^4.0.1",
10
- "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.1",
11
- "@deepseek-ai/dsh-client-store": "^0.1.2-alpha.1",
12
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.1",
13
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.1",
14
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.1",
15
- "@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.1",
16
- "@deepseek-ai/dsh-invariants": "^0.1.2-alpha.1",
17
- "@deepseek-ai/dsh-settings": "^0.1.2-alpha.1",
18
- "@deepseek-ai/dsh-workspace": "^0.1.2-alpha.1",
19
- "@types/react": "~18.3.1",
20
- "@types/yauzl": "^2.10.3",
21
- "react": "^18.2.0"
4
+ "version": "0.1.0-rc.9",
5
+ "publishConfig": {
6
+ "access": "public"
22
7
  },
23
- "dsh": {
24
- "client": {
25
- "inject": [
26
- "@deepseek-ai/dsh-client-locale",
27
- "@deepseek-ai/dsh-client-ui-settings",
28
- "@deepseek-ai/dsh-client-ui-renderer"
29
- ],
30
- "platform": "web"
31
- }
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/SparkElf/deepseek-harness-plus.git",
11
+ "directory": "packages/plus/backup"
32
12
  },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
33
16
  "exports": {
34
17
  ".": {
35
- "default": "./lib/index.js",
36
- "types": "./lib/types/index.d.ts"
37
- },
38
- "./client": {
39
- "default": "./lib/client.js",
40
- "types": "./lib/types/client/index.d.ts"
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
41
20
  },
42
21
  "./invariant": {
43
- "default": "./lib/invariant.js",
44
- "types": "./lib/types/invariant.d.ts"
22
+ "types": "./lib/types/invariant.d.ts",
23
+ "default": "./lib/invariant.js"
24
+ },
25
+ "./client": {
26
+ "types": "./lib/types/client/index.d.ts",
27
+ "default": "./lib/client.js"
45
28
  },
46
29
  "./package.json": "./package.json"
47
30
  },
@@ -52,8 +35,11 @@
52
35
  "lib/types/**/*.d.ts"
53
36
  ],
54
37
  "license": "MIT",
55
- "main": "lib/index.js",
56
- "name": "@sparkelf/dsh-plugin-backup",
38
+ "dependencies": {
39
+ "@deepseek-ai/schemastery": ">=3.18.1",
40
+ "fflate": "^0.8.2",
41
+ "yauzl": "^3.2.0"
42
+ },
57
43
  "peerDependencies": {
58
44
  "@deepseek-ai/cordis": ">=4.0.1",
59
45
  "@deepseek-ai/dsh-client-locale": ">=0.1.2-alpha.1",
@@ -65,19 +51,33 @@
65
51
  "@deepseek-ai/dsh-settings": ">=0.1.2-alpha.1",
66
52
  "@deepseek-ai/dsh-workspace": ">=0.1.2-alpha.1"
67
53
  },
68
- "publishConfig": {
69
- "access": "public"
54
+ "devDependencies": {
55
+ "@types/react": "~18.3.1",
56
+ "@types/yauzl": "^2.10.3",
57
+ "react": "^18.2.0",
58
+ "@deepseek-ai/cordis": "^4.0.1",
59
+ "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.1",
60
+ "@deepseek-ai/dsh-client-store": "^0.1.2-alpha.1",
61
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.1",
62
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.1",
63
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.1",
64
+ "@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.1",
65
+ "@deepseek-ai/dsh-invariants": "^0.1.2-alpha.1",
66
+ "@deepseek-ai/dsh-settings": "^0.1.2-alpha.1",
67
+ "@deepseek-ai/dsh-workspace": "^0.1.2-alpha.1"
70
68
  },
71
- "repository": {
72
- "directory": "packages/plus/backup",
73
- "type": "git",
74
- "url": "git+https://github.com/SparkElf/deepseek-harness-plus.git"
69
+ "dsh": {
70
+ "client": {
71
+ "inject": [
72
+ "@deepseek-ai/dsh-client-locale",
73
+ "@deepseek-ai/dsh-client-ui-settings",
74
+ "@deepseek-ai/dsh-client-ui-renderer"
75
+ ],
76
+ "platform": "web"
77
+ }
75
78
  },
76
79
  "scripts": {
77
80
  "bundle": "tsdown",
78
81
  "watch": "tsdown --watch"
79
- },
80
- "type": "module",
81
- "types": "lib/types/index.d.ts",
82
- "version": "0.1.0-rc.10"
83
- }
82
+ }
83
+ }