@tommy-ca/lazypi 0.6.4 → 0.6.5
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/bin/lazypi.mjs +6 -4
- package/package.json +4 -1
package/bin/lazypi.mjs
CHANGED
|
@@ -95,6 +95,7 @@ function parseArgs(args) {
|
|
|
95
95
|
local: false,
|
|
96
96
|
yes: false,
|
|
97
97
|
help: false,
|
|
98
|
+
badArg: false,
|
|
98
99
|
only: null,
|
|
99
100
|
except: null,
|
|
100
101
|
targets: [],
|
|
@@ -119,6 +120,7 @@ function parseArgs(args) {
|
|
|
119
120
|
else {
|
|
120
121
|
console.error(red(`Unknown argument: ${arg}`));
|
|
121
122
|
flags.help = true;
|
|
123
|
+
flags.badArg = true;
|
|
122
124
|
break;
|
|
123
125
|
}
|
|
124
126
|
}
|
|
@@ -338,7 +340,7 @@ function removeLegacy(pkg, installedPiSources, local, interactive) {
|
|
|
338
340
|
const action = `pi remove ${legacySource}`;
|
|
339
341
|
if (interactive) log.step(action);
|
|
340
342
|
else console.log(`\n→ ${action}`);
|
|
341
|
-
status = spawnCommand("pi", local ? ["remove", "-l", legacySource] : ["remove", legacySource], { stdio: "inherit" }).status ?? 1;
|
|
343
|
+
status = spawnCommand("pi", local ? ["remove", "-l", "--approve", legacySource] : ["remove", legacySource], { stdio: "inherit" }).status ?? 1;
|
|
342
344
|
if (status !== 0) break;
|
|
343
345
|
}
|
|
344
346
|
return status;
|
|
@@ -595,7 +597,7 @@ async function cmdInstall(flags) {
|
|
|
595
597
|
return 0;
|
|
596
598
|
}
|
|
597
599
|
|
|
598
|
-
const piArgs = flags.local ? ["install", "-l"] : ["install"];
|
|
600
|
+
const piArgs = flags.local ? ["install", "-l", "--approve"] : ["install"];
|
|
599
601
|
|
|
600
602
|
for (const pkg of toInstall) {
|
|
601
603
|
const migrationStatus = removeLegacy(pkg, installedSources, flags.local, interactive);
|
|
@@ -853,7 +855,7 @@ async function cmdRemove(flags, targets) {
|
|
|
853
855
|
: [source];
|
|
854
856
|
const uniqueSources = [...new Set(sourcesToRemove.length > 0 ? sourcesToRemove : [source])];
|
|
855
857
|
for (const resolvedSource of uniqueSources) {
|
|
856
|
-
const piArgs = flags.local ? ["remove", "-l", resolvedSource] : ["remove", resolvedSource];
|
|
858
|
+
const piArgs = flags.local ? ["remove", "-l", "--approve", resolvedSource] : ["remove", resolvedSource];
|
|
857
859
|
const result = spawnCommand("pi", piArgs, { stdio: "inherit" });
|
|
858
860
|
if (result.status !== 0) {
|
|
859
861
|
console.error(red(`Failed to remove ${target}`));
|
|
@@ -872,7 +874,7 @@ async function main() {
|
|
|
872
874
|
const flags = parseArgs(argv.slice(2));
|
|
873
875
|
if (flags.help) {
|
|
874
876
|
printHelp();
|
|
875
|
-
return 0;
|
|
877
|
+
return flags.badArg ? 2 : 0;
|
|
876
878
|
}
|
|
877
879
|
switch (flags.command) {
|
|
878
880
|
case "install":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tommy-ca/lazypi",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "Opinionated one-shot installer for a full-featured Pi coding agent setup.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -41,5 +41,8 @@
|
|
|
41
41
|
],
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@fission-ai/openspec": "^1.11.0"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
44
47
|
}
|
|
45
48
|
}
|