prompt-skill-armory 0.4.7 → 0.4.8
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 +22 -4
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -69,6 +69,24 @@ function findProfiles() {
|
|
|
69
69
|
return out
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
/** Create a standard web profile so the installer works on a fresh machine. */
|
|
73
|
+
function ensureProfile() {
|
|
74
|
+
if (!existsSync(profilesDir)) mkdirSync(profilesDir, { recursive: true })
|
|
75
|
+
const web = join(profilesDir, 'web')
|
|
76
|
+
mkdirSync(join(web, 'node_modules'), { recursive: true })
|
|
77
|
+
const manifestPath = join(web, 'package.json')
|
|
78
|
+
if (!existsSync(manifestPath)) {
|
|
79
|
+
writeFileSync(manifestPath, JSON.stringify({
|
|
80
|
+
name: 'dsh-profile-web',
|
|
81
|
+
private: true,
|
|
82
|
+
dependencies: {},
|
|
83
|
+
dsh: { profile: { bundles: ['@deepseek-ai/dsh-base', '@deepseek-ai/dsh-web-app'] } },
|
|
84
|
+
}, null, 2))
|
|
85
|
+
console.log(` ✓ created profile ${web}`)
|
|
86
|
+
}
|
|
87
|
+
return web
|
|
88
|
+
}
|
|
89
|
+
|
|
72
90
|
/** Copy one bundled package into a profile's @deepseek-ai scope. */
|
|
73
91
|
function installPackage(pkg, profileDir) {
|
|
74
92
|
const scopedDir = join(profileDir, 'node_modules', '@deepseek-ai')
|
|
@@ -126,11 +144,11 @@ function main() {
|
|
|
126
144
|
process.exit(1)
|
|
127
145
|
}
|
|
128
146
|
|
|
129
|
-
|
|
147
|
+
let profiles = findProfiles()
|
|
130
148
|
if (profiles.length === 0) {
|
|
131
|
-
console.
|
|
132
|
-
|
|
133
|
-
|
|
149
|
+
console.log(' no existing profiles — creating a web profile…')
|
|
150
|
+
const created = ensureProfile()
|
|
151
|
+
profiles = [created]
|
|
134
152
|
}
|
|
135
153
|
|
|
136
154
|
for (const profileDir of profiles) {
|