@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 +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/client.js +13 -17
- package/package.json +49 -49
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:
|
|
6
|
-
README.zh.md:
|
|
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
|
|
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前重新打开;
|
|
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
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
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
|
-
|
|
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
|
-
"
|
|
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
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
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
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
"
|
|
36
|
-
"
|
|
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
|
-
"
|
|
44
|
-
"
|
|
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
|
-
"
|
|
56
|
-
|
|
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
|
-
"
|
|
69
|
-
"
|
|
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
|
-
"
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
81
|
-
"types": "lib/types/index.d.ts",
|
|
82
|
-
"version": "0.1.0-rc.10"
|
|
83
|
-
}
|
|
82
|
+
}
|
|
83
|
+
}
|