@sparkelf/dsh-plugin-backup 0.2.1-alpha.2 → 0.2.1-alpha.21
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/index.js +10 -2
- package/lib/types/index.d.ts +8 -1
- package/package.json +10 -8
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: 543f8bc850fc01e68d03735450a99372e7c68455
|
|
6
|
+
README.zh.md: 090bd8e8cfec3776cdda407446a8baf35a05f39e
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ This complete Host and Client plugin exports and restores three explicit user-da
|
|
|
23
23
|
<a id="use-this-package"></a>
|
|
24
24
|
## Use this package
|
|
25
25
|
|
|
26
|
-
Mount the Host entry after `connection`, `webServer`, `settings`, and `workspaceRegistry`, and mount the Client entry after locale and Settings. The file-backed Settings provider supplies `settings.documentPath`; `maxUploadBytes` defaults to 2147483648 bytes.
|
|
26
|
+
Mount the Host entry after `connection`, `webServer`, `settings`, and `workspaceRegistry`, and mount the Client entry after locale and Settings. The file-backed Settings provider supplies `settings.documentPath`; the archive covers the Harness home, and `maxUploadBytes` defaults to 2147483648 bytes.
|
|
27
27
|
|
|
28
28
|
The Settings section uses a three-way segmented control. **Everything** is the union of configuration and sessions; it does not archive generated profiles, releases, logs, Supervisor files, cached packages, or other runtime output. **Configuration** restores only configuration files and leaves Session/Workspace storage open. **Sessions** restores `sessions`, `attachments`, and `storages` together inside the Workspace storage-restore transaction. The archive manifest records the scope and active Settings filename; configuration-bearing archives require the same Settings filename at import.
|
|
29
29
|
|
package/README.zh.md
CHANGED
|
@@ -23,7 +23,7 @@ kind: "package-reference"
|
|
|
23
23
|
<a id="use-this-package"></a>
|
|
24
24
|
## 使用此软件包
|
|
25
25
|
|
|
26
|
-
Host entry需mount在`connection`、`webServer`、`settings`及`workspaceRegistry`之后,Client entry需mount在locale及Settings之后。file-backed Settings provider提供`settings.documentPath
|
|
26
|
+
Host entry需mount在`connection`、`webServer`、`settings`及`workspaceRegistry`之后,Client entry需mount在locale及Settings之后。file-backed Settings provider提供`settings.documentPath`;归档覆盖Harness home,`maxUploadBytes`默认为2147483648 bytes。
|
|
27
27
|
|
|
28
28
|
Settings section使用三段segmented control。**全部**是配置与会话的并集;它不归档generated profiles、releases、logs、Supervisor files、cached packages或其他runtime output。**配置**只恢复配置文件,不关闭Session/Workspace storage。**会话**把`sessions`、`attachments`及`storages`一起放进Workspace storage-restore transaction恢复。Archive manifest记录scope与active Settings filename;含配置的archive在import时要求相同Settings filename。
|
|
29
29
|
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { basename, dirname, join } from "node:path";
|
|
2
2
|
import Schema from "@deepseek-ai/schemastery";
|
|
3
|
+
import { resolveDshHome } from "@deepseek-ai/dsh-home-paths";
|
|
3
4
|
import { randomUUID } from "node:crypto";
|
|
4
5
|
import { once } from "node:events";
|
|
5
6
|
import { createReadStream, createWriteStream } from "node:fs";
|
|
@@ -783,7 +784,14 @@ const DEFAULT_MAX_UPLOAD_BYTES = 2 * 1024 * 1024 * 1024;
|
|
|
783
784
|
/** Validate Backup Host resource policy. */
|
|
784
785
|
const Config = Schema.object({ maxUploadBytes: Schema.number().step(1).min(1).default(DEFAULT_MAX_UPLOAD_BYTES) });
|
|
785
786
|
/**
|
|
786
|
-
* Register authenticated archive routes against
|
|
787
|
+
* Register authenticated archive routes against the Harness home.
|
|
788
|
+
*
|
|
789
|
+
* The archived user data lives under the Harness home, not beside the settings document: Session
|
|
790
|
+
* logs, attachments, Workspace storage, credentials, and identity are all written there. Only the
|
|
791
|
+
* profile's patch file sits beside the document, so deriving the root from the document archived
|
|
792
|
+
* that one file and silently dropped every other planned entry — a Sessions export produced an
|
|
793
|
+
* archive holding nothing but its manifest.
|
|
794
|
+
*
|
|
787
795
|
* @param ctx - Host services plus the temporary patched Workspace restore operation.
|
|
788
796
|
* @param config - Upload resource policy resolved by Cordis.
|
|
789
797
|
*/
|
|
@@ -793,7 +801,7 @@ function apply(ctx, config = {}) {
|
|
|
793
801
|
registerBackupRoutes(ctx, {
|
|
794
802
|
maxUploadBytes: config.maxUploadBytes ?? DEFAULT_MAX_UPLOAD_BYTES,
|
|
795
803
|
settingsFile: basename(documentPath)
|
|
796
|
-
},
|
|
804
|
+
}, resolveDshHome());
|
|
797
805
|
}
|
|
798
806
|
//#endregion
|
|
799
807
|
export { Config, apply, inject, name };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -11,7 +11,14 @@ export interface Config {
|
|
|
11
11
|
/** Validate Backup Host resource policy. */
|
|
12
12
|
export declare const Config: Schema<Config>;
|
|
13
13
|
/**
|
|
14
|
-
* Register authenticated archive routes against
|
|
14
|
+
* Register authenticated archive routes against the Harness home.
|
|
15
|
+
*
|
|
16
|
+
* The archived user data lives under the Harness home, not beside the settings document: Session
|
|
17
|
+
* logs, attachments, Workspace storage, credentials, and identity are all written there. Only the
|
|
18
|
+
* profile's patch file sits beside the document, so deriving the root from the document archived
|
|
19
|
+
* that one file and silently dropped every other planned entry — a Sessions export produced an
|
|
20
|
+
* archive holding nothing but its manifest.
|
|
21
|
+
*
|
|
15
22
|
* @param ctx - Host services plus the temporary patched Workspace restore operation.
|
|
16
23
|
* @param config - Upload resource policy resolved by Cordis.
|
|
17
24
|
*/
|
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.6-alpha.1",
|
|
14
14
|
"@deepseek-ai/dsh-client-ui-settings": "^0.1.6-alpha.1",
|
|
15
15
|
"@deepseek-ai/dsh-client-ui-slots": "^0.1.6-alpha.1",
|
|
16
|
+
"@deepseek-ai/dsh-home-paths": "^0.1.6-alpha.1",
|
|
16
17
|
"@deepseek-ai/dsh-host-webserver": "^0.1.6-alpha.1",
|
|
17
18
|
"@deepseek-ai/dsh-settings": "^0.1.6-alpha.1",
|
|
18
19
|
"@deepseek-ai/dsh-workspace": "^0.1.6-alpha.1",
|
|
@@ -51,13 +52,14 @@
|
|
|
51
52
|
"name": "@sparkelf/dsh-plugin-backup",
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"@deepseek-ai/cordis": ">=4.0.1",
|
|
54
|
-
"@deepseek-ai/dsh-client-locale": "
|
|
55
|
-
"@deepseek-ai/dsh-client-ui-renderer": "
|
|
56
|
-
"@deepseek-ai/dsh-client-ui-settings": "
|
|
57
|
-
"@deepseek-ai/dsh-client-ui-slots": "
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
59
|
-
"@deepseek-ai/dsh-
|
|
60
|
-
"@deepseek-ai/dsh-
|
|
55
|
+
"@deepseek-ai/dsh-client-locale": ">=0.1.6-alpha.1",
|
|
56
|
+
"@deepseek-ai/dsh-client-ui-renderer": ">=0.1.6-alpha.1",
|
|
57
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.6-alpha.1",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.6-alpha.1",
|
|
59
|
+
"@deepseek-ai/dsh-home-paths": ">=0.1.6-alpha.1",
|
|
60
|
+
"@deepseek-ai/dsh-host-webserver": ">=0.1.6-alpha.1",
|
|
61
|
+
"@deepseek-ai/dsh-settings": ">=0.1.6-alpha.1",
|
|
62
|
+
"@deepseek-ai/dsh-workspace": ">=0.1.6-alpha.1"
|
|
61
63
|
},
|
|
62
64
|
"publishConfig": {
|
|
63
65
|
"access": "public"
|
|
@@ -73,5 +75,5 @@
|
|
|
73
75
|
},
|
|
74
76
|
"type": "module",
|
|
75
77
|
"types": "lib/types/index.d.ts",
|
|
76
|
-
"version": "0.2.1-alpha.
|
|
78
|
+
"version": "0.2.1-alpha.21"
|
|
77
79
|
}
|