start-vibing 2.0.4 → 2.0.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "start-vibing",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "Setup Claude Code agents, skills, and hooks in your project. Smart copy that preserves your custom domains and configurations.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,14 +1,13 @@
1
- #!/usr/bin/env bun
1
+ #!/usr/bin/env node
2
2
  /**
3
3
  * Universal Hook Runner
4
4
  *
5
5
  * Runs hooks with multiple runtime fallbacks:
6
6
  * 1. python3 (primary - user's preferred)
7
7
  * 2. python (fallback)
8
- * 3. Bun TypeScript (fallback if Python not available)
9
- * 4. npx tsx (final fallback)
8
+ * 3. npx tsx (TypeScript execution)
10
9
  *
11
- * Usage: bun run-hook.ts <hook-name>
10
+ * Usage: npx tsx run-hook.ts <hook-name>
12
11
  * The hook-name should be without extension (e.g., "stop-validator")
13
12
  */
14
13
 
@@ -120,15 +119,30 @@ async function runHook(hookName: string, stdinData: string): Promise<void> {
120
119
 
121
120
  async function readStdinWithTimeout(timeoutMs: number): Promise<string> {
122
121
  return new Promise((resolve) => {
123
- const timeout = setTimeout(() => resolve('{}'), timeoutMs);
122
+ const timeout = setTimeout(() => {
123
+ process.stdin.destroy();
124
+ resolve('{}');
125
+ }, timeoutMs);
124
126
 
125
- Bun.stdin.text().then((text) => {
127
+ let data = '';
128
+ process.stdin.setEncoding('utf8');
129
+ process.stdin.on('data', (chunk: string) => {
130
+ data += chunk;
131
+ });
132
+ process.stdin.on('end', () => {
126
133
  clearTimeout(timeout);
127
- resolve(text || '{}');
128
- }).catch(() => {
134
+ resolve(data || '{}');
135
+ });
136
+ process.stdin.on('error', () => {
129
137
  clearTimeout(timeout);
130
138
  resolve('{}');
131
139
  });
140
+
141
+ // Handle case where stdin is empty/closed immediately
142
+ if (process.stdin.readableEnded) {
143
+ clearTimeout(timeout);
144
+ resolve('{}');
145
+ }
132
146
  });
133
147
  }
134
148
 
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env bun
1
+ #!/usr/bin/env node
2
2
  /**
3
3
  * Stop Validator Hook - TypeScript version (fallback when Python not available)
4
4
  *
@@ -178,15 +178,29 @@ interface HookResult {
178
178
 
179
179
  async function readStdinWithTimeout(timeoutMs: number): Promise<string> {
180
180
  return new Promise((resolve) => {
181
- const timeout = setTimeout(() => resolve('{}'), timeoutMs);
181
+ const timeout = setTimeout(() => {
182
+ process.stdin.destroy();
183
+ resolve('{}');
184
+ }, timeoutMs);
182
185
 
183
- Bun.stdin.text().then((text) => {
186
+ let data = '';
187
+ process.stdin.setEncoding('utf8');
188
+ process.stdin.on('data', (chunk: string) => {
189
+ data += chunk;
190
+ });
191
+ process.stdin.on('end', () => {
184
192
  clearTimeout(timeout);
185
- resolve(text || '{}');
186
- }).catch(() => {
193
+ resolve(data || '{}');
194
+ });
195
+ process.stdin.on('error', () => {
187
196
  clearTimeout(timeout);
188
197
  resolve('{}');
189
198
  });
199
+
200
+ if (process.stdin.readableEnded) {
201
+ clearTimeout(timeout);
202
+ resolve('{}');
203
+ }
190
204
  });
191
205
  }
192
206