pi-gsd 1.6.1 → 1.6.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/package.json +1 -1
- package/scripts/postinstall.js +14 -10
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -227,17 +227,21 @@ function main() {
|
|
|
227
227
|
else totalSkipped++;
|
|
228
228
|
});
|
|
229
229
|
|
|
230
|
-
// ── Pi prompt templates
|
|
231
|
-
|
|
230
|
+
// ── Pi prompt templates — cleanup stale local copies ───────────────────────
|
|
231
|
+
// Prompts are served directly from the npm package (user scope).
|
|
232
|
+
// Local copies in .pi/prompts/ cause collision warnings on every pi update.
|
|
233
|
+
// Remove any gsd-*.md files previously installed there.
|
|
232
234
|
const promptsDest = path.join(PROJECT_ROOT, ".pi", "prompts");
|
|
233
|
-
if (fs.existsSync(
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
if (
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
235
|
+
if (fs.existsSync(promptsDest)) {
|
|
236
|
+
const stale = fs
|
|
237
|
+
.readdirSync(promptsDest)
|
|
238
|
+
.filter((f) => f.startsWith("gsd-") && f.endsWith(".md"));
|
|
239
|
+
if (stale.length > 0) {
|
|
240
|
+
for (const f of stale) fs.rmSync(path.join(promptsDest, f));
|
|
241
|
+
log(
|
|
242
|
+
"ok",
|
|
243
|
+
`.pi/prompts (removed ${stale.length} stale local gsd-*.md — served from package instead)`,
|
|
244
|
+
);
|
|
241
245
|
}
|
|
242
246
|
}
|
|
243
247
|
|