@tenux/cli 0.0.6 → 0.0.8
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.
|
@@ -184,6 +184,7 @@ var Relay = class {
|
|
|
184
184
|
// src/handlers/claude.ts
|
|
185
185
|
import { spawn } from "child_process";
|
|
186
186
|
import { resolve } from "path";
|
|
187
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync2 } from "fs";
|
|
187
188
|
async function handleClaudeQuery(command, supabase) {
|
|
188
189
|
const {
|
|
189
190
|
prompt,
|
|
@@ -200,6 +201,9 @@ async function handleClaudeQuery(command, supabase) {
|
|
|
200
201
|
cwd = resolved;
|
|
201
202
|
}
|
|
202
203
|
}
|
|
204
|
+
if (!existsSync2(cwd)) {
|
|
205
|
+
mkdirSync2(cwd, { recursive: true });
|
|
206
|
+
}
|
|
203
207
|
const args = [
|
|
204
208
|
"--print",
|
|
205
209
|
// non-interactive
|
|
@@ -215,9 +219,9 @@ async function handleClaudeQuery(command, supabase) {
|
|
|
215
219
|
const proc = spawn(claudeBin, args, {
|
|
216
220
|
cwd,
|
|
217
221
|
shell: isWindows,
|
|
218
|
-
env: { ...process.env },
|
|
219
|
-
// inherits Claude auth from ~/.claude
|
|
220
222
|
stdio: ["pipe", "pipe", "pipe"]
|
|
223
|
+
// env is omitted — Node inherits parent process.env automatically.
|
|
224
|
+
// Spreading env on Windows can lose system variables and cause ENOENT.
|
|
221
225
|
});
|
|
222
226
|
let seq = 0;
|
|
223
227
|
let capturedSessionId = null;
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED