opencode-plugin-boops 2.1.1 → 2.1.3
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/main +7 -5
- package/cli/uninstall +8 -9
- package/package.json +1 -1
package/cli/main
CHANGED
|
@@ -10,7 +10,7 @@ import { dirname, join } from "path";
|
|
|
10
10
|
const __filename = fileURLToPath(import.meta.url);
|
|
11
11
|
const __dirname = dirname(__filename);
|
|
12
12
|
|
|
13
|
-
const command = process.argv[2]
|
|
13
|
+
const command = process.argv[2];
|
|
14
14
|
const args = process.argv.slice(3);
|
|
15
15
|
|
|
16
16
|
const commands = {
|
|
@@ -19,14 +19,16 @@ const commands = {
|
|
|
19
19
|
browse: join(__dirname, "browse"),
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
if
|
|
22
|
+
// Show help if no command or invalid command
|
|
23
|
+
if (!command || !commands[command]) {
|
|
23
24
|
console.log("OpenCode Boops Plugin\n");
|
|
24
25
|
console.log("Usage:");
|
|
25
26
|
console.log(" npx opencode-plugin-boops install - Add plugin to OpenCode config");
|
|
26
27
|
console.log(" npx opencode-plugin-boops uninstall - Remove plugin from config");
|
|
27
|
-
console.log(" npx opencode-plugin-boops browse - Browse and test sounds
|
|
28
|
-
console.log("
|
|
29
|
-
|
|
28
|
+
console.log(" npx opencode-plugin-boops browse - Browse and test sounds");
|
|
29
|
+
console.log("");
|
|
30
|
+
console.log("448 sounds with semantic tags (human, speech, ding, alarm, etc.)");
|
|
31
|
+
process.exit(command ? 1 : 0);
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
const child = spawn(commands[command], args, {
|
package/cli/uninstall
CHANGED
|
@@ -57,16 +57,19 @@ if (existsSync(CONFIG_PATH)) {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
// Ask about cleaning up data
|
|
60
|
+
const shouldCleanup = process.argv.includes("--full") || process.argv.includes("-f");
|
|
61
|
+
|
|
62
|
+
if (shouldCleanup) {
|
|
63
|
+
cleanup();
|
|
64
|
+
process.exit(0);
|
|
65
|
+
}
|
|
66
|
+
|
|
60
67
|
const rl = createInterface({
|
|
61
68
|
input: process.stdin,
|
|
62
69
|
output: process.stdout,
|
|
63
70
|
});
|
|
64
71
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (shouldCleanup) {
|
|
68
|
-
cleanup();
|
|
69
|
-
} else {
|
|
72
|
+
{
|
|
70
73
|
console.log("\n📦 Plugin data locations:");
|
|
71
74
|
if (existsSync(PLUGIN_DIR)) {
|
|
72
75
|
console.log(" • Config & data:", PLUGIN_DIR);
|
|
@@ -111,8 +114,4 @@ function cleanup() {
|
|
|
111
114
|
|
|
112
115
|
console.log("\n✨ Uninstall complete!");
|
|
113
116
|
console.log("\n💡 Restart OpenCode to complete the removal");
|
|
114
|
-
|
|
115
|
-
if (!shouldCleanup) {
|
|
116
|
-
rl.close();
|
|
117
|
-
}
|
|
118
117
|
}
|