@supatest/cli 0.0.9 → 0.0.11

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/dist/index.js CHANGED
@@ -445,14 +445,13 @@ var init_prompts = __esm({
445
445
  // src/config.ts
446
446
  import { resolve } from "path";
447
447
  import dotenv from "dotenv";
448
- var isCompiledBinary, isProduction, getEnvVar, config;
448
+ var isDevelopment, getEnvVar, config;
449
449
  var init_config = __esm({
450
450
  "src/config.ts"() {
451
451
  "use strict";
452
452
  init_prompts();
453
- isCompiledBinary = process.execPath && !process.execPath.includes("node");
454
- isProduction = process.env.NODE_ENV === "production" || isCompiledBinary;
455
- if (!isProduction) {
453
+ isDevelopment = process.env.NODE_ENV === "development";
454
+ if (isDevelopment) {
456
455
  const envFile = process.env.ENV_NAME ? `.env.${process.env.ENV_NAME}` : ".env";
457
456
  dotenv.config({ path: resolve(process.cwd(), envFile) });
458
457
  }
@@ -468,7 +467,7 @@ var init_config = __esm({
468
467
  config = {
469
468
  supatestApiKey: getEnvVar("SUPATEST_API_KEY"),
470
469
  supatestApiUrl: getEnvVar("SUPATEST_API_URL", "https://code-api.supatest.ai"),
471
- claudeCodeExecutablePath: getEnvVar("CLAUDE_CODE_EXECUTABLE_PATH"),
470
+ claudeCodeExecutablePath: getEnvVar("SUPATEST_CLAUDE_CODE_PATH"),
472
471
  anthropicModelName: getEnvVar("ANTHROPIC_MODEL_NAME", "claude-sonnet-4-20250514"),
473
472
  headlessSystemPrompt: fixerPrompt,
474
473
  interactiveSystemPrompt: builderPrompt,
@@ -912,31 +911,31 @@ ${projectInstructions}`
912
911
  return result;
913
912
  }
914
913
  async resolveClaudeCodePath() {
915
- if (config.claudeCodeExecutablePath) {
916
- this.presenter.onLog(
917
- `Using CLAUDE_CODE_EXECUTABLE_PATH: ${config.claudeCodeExecutablePath}`
918
- );
919
- return config.claudeCodeExecutablePath;
920
- }
921
- const isCompiledBinary2 = process.execPath && !process.execPath.includes("node");
914
+ const fs4 = await import("fs/promises");
922
915
  let claudeCodePath;
923
- if (isCompiledBinary2) {
924
- claudeCodePath = join2(dirname(process.execPath), "claude-code-cli.js");
925
- this.presenter.onLog(`Production mode: ${claudeCodePath}`);
926
- } else {
916
+ const bundledPath = join2(dirname(import.meta.url.replace("file://", "")), "claude-code-cli.js");
917
+ try {
918
+ await fs4.access(bundledPath);
919
+ claudeCodePath = bundledPath;
920
+ this.presenter.onLog(`Bundled mode: ${claudeCodePath}`);
921
+ } catch {
927
922
  const require2 = createRequire(import.meta.url);
928
923
  const sdkPath = require2.resolve("@anthropic-ai/claude-agent-sdk/sdk.mjs");
929
924
  claudeCodePath = join2(dirname(sdkPath), "cli.js");
930
925
  this.presenter.onLog(`Development mode: ${claudeCodePath}`);
931
926
  }
932
- const fs4 = await import("fs/promises");
927
+ if (config.claudeCodeExecutablePath) {
928
+ claudeCodePath = config.claudeCodeExecutablePath;
929
+ this.presenter.onLog(
930
+ `Using SUPATEST_CLAUDE_CODE_PATH override: ${claudeCodePath}`
931
+ );
932
+ }
933
933
  try {
934
934
  await fs4.access(claudeCodePath);
935
935
  this.presenter.onLog(`\u2713 Claude Code CLI found: ${claudeCodePath}`);
936
936
  } catch {
937
937
  const error = `Claude Code executable not found at: ${claudeCodePath}
938
- For compiled binaries, ensure claude-code-cli.js is in the same directory as the binary.
939
- Set CLAUDE_CODE_EXECUTABLE_PATH environment variable to override.`;
938
+ Set SUPATEST_CLAUDE_CODE_PATH environment variable to override.`;
940
939
  await this.presenter.onError(error);
941
940
  throw new Error(error);
942
941
  }
@@ -4517,7 +4516,7 @@ var CLI_VERSION;
4517
4516
  var init_version = __esm({
4518
4517
  "src/version.ts"() {
4519
4518
  "use strict";
4520
- CLI_VERSION = "0.0.9";
4519
+ CLI_VERSION = "0.0.11";
4521
4520
  }
4522
4521
  });
4523
4522
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supatest/cli",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Supatest CLI - AI-powered task automation for CI/CD",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,6 +8,7 @@
8
8
  },
9
9
  "files": [
10
10
  "dist",
11
+ "dist/claude-code-cli.js",
11
12
  "README.md",
12
13
  "LICENSE"
13
14
  ],
@@ -80,10 +81,7 @@
80
81
  "scripts": {
81
82
  "dev": "NODE_ENV=development tsx src/index.ts",
82
83
  "dev:watch": "nodemon",
83
- "dev:bun": "bun run src/index.ts",
84
- "build": "tsup",
85
- "build:tsc": "tsc && node scripts/make-executable.js",
86
- "build:bun": "bun build src/index.ts --compile --external=@anthropic-ai/claude-agent-sdk --outfile dist/supatest && node scripts/copy-claude-cli.js",
84
+ "build": "tsup && node scripts/copy-claude-cli.js",
87
85
  "type-check": "tsc --noEmit",
88
86
  "clean:bundle": "rimraf dist",
89
87
  "clean:node_modules": "rimraf node_modules"