@gnar-engine/cli 1.0.1 → 1.0.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/install.sh +32 -0
- package/package.json +1 -1
- package/src/control/commands.js +1 -1
package/install.sh
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
PACKAGE_NAME="@gnar-engine/cli"
|
|
5
|
+
TARGET_DIR="$HOME/.gnarengine"
|
|
6
|
+
|
|
7
|
+
echo "Installing $PACKAGE_NAME locally for user $USER..."
|
|
8
|
+
|
|
9
|
+
# Create the global config directory
|
|
10
|
+
mkdir -p "$TARGET_DIR"
|
|
11
|
+
cd "$TARGET_DIR"
|
|
12
|
+
|
|
13
|
+
# Install the package
|
|
14
|
+
npm install "$PACKAGE_NAME" --no-audit --no-fund
|
|
15
|
+
|
|
16
|
+
# Get the local bin path
|
|
17
|
+
BIN_PATH="$TARGET_DIR/node_modules/.bin"
|
|
18
|
+
|
|
19
|
+
# Add to shell PATH if not already present
|
|
20
|
+
if ! grep -q "$BIN_PATH" "$HOME/.bashrc" 2>/dev/null; then
|
|
21
|
+
echo "export PATH=\"$BIN_PATH:\$PATH\"" >> "$HOME/.bashrc"
|
|
22
|
+
echo "Added $BIN_PATH to PATH in ~/.bashrc"
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
# For zsh users (macOS default)
|
|
26
|
+
if [ -f "$HOME/.zshrc" ] && ! grep -q "$BIN_PATH" "$HOME/.zshrc"; then
|
|
27
|
+
echo "export PATH=\"$BIN_PATH:\$PATH\"" >> "$HOME/.zshrc"
|
|
28
|
+
echo "Added $BIN_PATH to PATH in ~/.zshrc"
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
echo "G n a r E n g i n e - Installation complete! Please restart your terminal and run 'gnar --help' to verify."
|
|
32
|
+
|
package/package.json
CHANGED
package/src/control/commands.js
CHANGED
|
@@ -126,7 +126,7 @@ export function registerControlCommands(program) {
|
|
|
126
126
|
controlCmd
|
|
127
127
|
.command('delete-task')
|
|
128
128
|
.description('🛠️ Delete task')
|
|
129
|
-
.requiredOption('
|
|
129
|
+
.requiredOption('--id <id>', 'Task ID')
|
|
130
130
|
.action(async (options) => {
|
|
131
131
|
console.log('🛠️ Deleting task with id: ' + options.id);
|
|
132
132
|
const response = await control.deleteTask(options.id);
|