prompt-skill-armory 0.5.0 → 0.5.2
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/cli.cjs +30 -16
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -69,22 +69,32 @@ function findProfiles() {
|
|
|
69
69
|
return out
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
/** Create
|
|
72
|
+
/** Create standard web + desktop profiles so the installer works on a fresh
|
|
73
|
+
* machine. The desktop client uses the "desktop" profile by default
|
|
74
|
+
* (DEFAULT_PROFILE_NAME), so both must exist for both modes to show the panel. */
|
|
73
75
|
function ensureProfile() {
|
|
74
76
|
if (!existsSync(profilesDir)) mkdirSync(profilesDir, { recursive: true })
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
77
|
+
const specs = [
|
|
78
|
+
{ name: 'web', bundles: ['@deepseek-ai/dsh-base', '@deepseek-ai/dsh-web-app'] },
|
|
79
|
+
{ name: 'desktop', bundles: ['@deepseek-ai/dsh-base', '@deepseek-ai/dsh-web-app', 'dshmarket'] },
|
|
80
|
+
]
|
|
81
|
+
const created = []
|
|
82
|
+
for (const spec of specs) {
|
|
83
|
+
const dir = join(profilesDir, spec.name)
|
|
84
|
+
mkdirSync(join(dir, 'node_modules'), { recursive: true })
|
|
85
|
+
const manifestPath = join(dir, 'package.json')
|
|
86
|
+
if (!existsSync(manifestPath)) {
|
|
87
|
+
writeFileSync(manifestPath, JSON.stringify({
|
|
88
|
+
name: `dsh-profile-${spec.name}`,
|
|
89
|
+
private: true,
|
|
90
|
+
dependencies: {},
|
|
91
|
+
dsh: { profile: { bundles: spec.bundles } },
|
|
92
|
+
}, null, 2))
|
|
93
|
+
console.log(` ✓ created profile ${dir}`)
|
|
94
|
+
}
|
|
95
|
+
created.push(dir)
|
|
86
96
|
}
|
|
87
|
-
return
|
|
97
|
+
return created
|
|
88
98
|
}
|
|
89
99
|
|
|
90
100
|
/** Copy one bundled package into a profile's @deepseek-ai scope. */
|
|
@@ -149,10 +159,14 @@ function main() {
|
|
|
149
159
|
}
|
|
150
160
|
|
|
151
161
|
let profiles = findProfiles()
|
|
162
|
+
const ensured = ensureProfile() // always ensure web + desktop exist
|
|
163
|
+
// merge: prefer existing, add any newly ensured
|
|
164
|
+
for (const dir of ensured) {
|
|
165
|
+
if (!profiles.includes(dir)) profiles.push(dir)
|
|
166
|
+
}
|
|
152
167
|
if (profiles.length === 0) {
|
|
153
|
-
console.
|
|
154
|
-
|
|
155
|
-
profiles = [created]
|
|
168
|
+
console.error(' ✖ no profiles available')
|
|
169
|
+
process.exit(1)
|
|
156
170
|
}
|
|
157
171
|
|
|
158
172
|
for (const profileDir of profiles) {
|