dsh-version-manager 0.1.2 → 0.1.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 +37 -310
- package/README.zh-CN.md +64 -0
- package/assets/LICENSE-WHALE-ARTWORK +439 -0
- package/assets/NOTICE.md +9 -0
- package/assets/logo.webp +0 -0
- package/docs/assets/banner-en.svg +8 -0
- package/docs/assets/banner-zh-CN.svg +8 -0
- package/docs/assets/feature-1-en-dark.svg +1 -0
- package/docs/assets/feature-1-en-light.svg +1 -0
- package/docs/assets/feature-1-zh-CN-dark.svg +1 -0
- package/docs/assets/feature-1-zh-CN-light.svg +1 -0
- package/docs/assets/feature-2-en-dark.svg +1 -0
- package/docs/assets/feature-2-en-light.svg +1 -0
- package/docs/assets/feature-2-zh-CN-dark.svg +1 -0
- package/docs/assets/feature-2-zh-CN-light.svg +1 -0
- package/docs/assets/feature-3-en-dark.svg +1 -0
- package/docs/assets/feature-3-en-light.svg +1 -0
- package/docs/assets/feature-3-zh-CN-dark.svg +1 -0
- package/docs/assets/feature-3-zh-CN-light.svg +1 -0
- package/docs/git-write-safety.md +22 -0
- package/docs/guide.en.md +362 -0
- package/docs/release-notes-0.1.4.md +13 -0
- package/lib/client.js +117 -35
- package/lib/host/git-routes.js +11 -1
- package/lib/host/git-skill.js +66 -7
- package/lib/host/mutation-lock.js +26 -0
- package/lib/host/operations.js +2 -8
- package/lib/host/segment.js +53 -0
- package/lib/host/skill-restore.js +17 -1
- package/lib/host/skills.js +7 -2
- package/lib/host/snapshot-store.js +6 -1
- package/package.json +14 -4
|
@@ -24,6 +24,8 @@ import { createHash, randomUUID } from 'node:crypto'
|
|
|
24
24
|
import { mkdir, readdir, readFile, rename, rm, writeFile } from 'node:fs/promises'
|
|
25
25
|
import { join } from 'node:path'
|
|
26
26
|
|
|
27
|
+
import { encodeSegment } from './segment.js'
|
|
28
|
+
|
|
27
29
|
/** Bumped whenever the shape below changes in a way old readers cannot read. */
|
|
28
30
|
export const SNAPSHOT_SCHEMA = 1
|
|
29
31
|
|
|
@@ -34,12 +36,15 @@ export const SNAPSHOT_KEEP = 20
|
|
|
34
36
|
* A filename-safe form of a package name.
|
|
35
37
|
*
|
|
36
38
|
* `@scope/name` would otherwise create a directory, and a name is not a path.
|
|
39
|
+
* The encoding itself lives in `segment.js` so that the four places that turn a
|
|
40
|
+
* host-supplied name into a directory cannot drift apart; `.` and `..` are the
|
|
41
|
+
* cases it exists for.
|
|
37
42
|
*
|
|
38
43
|
* @param {string} targetId
|
|
39
44
|
* @returns {string}
|
|
40
45
|
*/
|
|
41
46
|
export function encodeTarget(targetId) {
|
|
42
|
-
return targetId
|
|
47
|
+
return encodeSegment(targetId)
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-version-manager",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Version management for DSH plugins and skills: an honest inventory of what is installed, a preview of what an update would change, a verifiable snapshot taken before the change, and a recovery path that is only offered when it can actually work.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -8,14 +8,23 @@
|
|
|
8
8
|
".": "./lib/index.js",
|
|
9
9
|
"./client": "./lib/client.js",
|
|
10
10
|
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
11
|
-
"./package.json": "./package.json"
|
|
11
|
+
"./package.json": "./package.json",
|
|
12
|
+
"./icon": "./assets/logo.webp"
|
|
12
13
|
},
|
|
13
14
|
"files": [
|
|
14
15
|
"lib",
|
|
15
16
|
"cordis.patch.yml",
|
|
16
17
|
"docs/baseline.md",
|
|
17
18
|
"README.md",
|
|
18
|
-
"LICENSE"
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"assets/logo.webp",
|
|
21
|
+
"assets/NOTICE.md",
|
|
22
|
+
"assets/LICENSE-WHALE-ARTWORK",
|
|
23
|
+
"README.zh-CN.md",
|
|
24
|
+
"docs/assets",
|
|
25
|
+
"docs/git-write-safety.md",
|
|
26
|
+
"docs/guide.en.md",
|
|
27
|
+
"docs/release-notes-0.1.4.md"
|
|
19
28
|
],
|
|
20
29
|
"keywords": [
|
|
21
30
|
"deepseek",
|
|
@@ -58,5 +67,6 @@
|
|
|
58
67
|
"platform": "web",
|
|
59
68
|
"immediately": true
|
|
60
69
|
}
|
|
61
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"icon": "./assets/logo.webp"
|
|
62
72
|
}
|