clew-code 0.2.31 → 0.2.33

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": "clew-code",
3
- "version": "0.2.31",
3
+ "version": "0.2.33",
4
4
  "description": "ClewCode — multi-provider AI coding agent CLI",
5
5
  "main": "./dist/main.js",
6
6
  "type": "module",
@@ -25,10 +25,11 @@
25
25
  },
26
26
  "homepage": "https://github.com/ClewCode/ClewCode#readme",
27
27
  "scripts": {
28
- "dev": "bun --watch run --define.TRANSCRIPT_CLASSIFIER=true --define.CHICAGO_MCP=true --define.VOICE_MODE=true --define.MACRO.VERSION='\"0.2.27\"' --define.MACRO.PACKAGE_URL='\"clew-code\"' --define.MACRO.FEEDBACK_CHANNEL='\"https://github.com/ClewCode/ClewCode/issues\"' --define.MACRO.ISSUES_EXPLAINER='\"visit https://github.com/ClewCode/ClewCode/issues\"' src/main.tsx",
29
- "start": "bun run --define.VOICE_MODE=true --define.MACRO.VERSION='\"0.2.27\"' --define.MACRO.PACKAGE_URL='\"clew-code\"' src/main.tsx",
30
- "dev:channels": "bun run --define.VOICE_MODE=true --define.MACRO.VERSION='\"0.2.27\"' --define.MACRO.PACKAGE_URL='\"clew-code\"' src/main.tsx -- --dangerously-load-development-channels server:clew-orc",
31
- "build": "NODE_ENV=production bun build --production --define.TRANSCRIPT_CLASSIFIER=true --define.CHICAGO_MCP=true --define.VOICE_MODE=true --define.MACRO.VERSION='\"0.2.27\"' --define.MACRO.PACKAGE_URL='\"clew-code\"' --define.MACRO.FEEDBACK_CHANNEL='\"https://github.com/ClewCode/ClewCode/issues\"' --define.MACRO.ISSUES_EXPLAINER='\"visit https://github.com/ClewCode/ClewCode/issues\"' src/main.tsx --outdir ./dist --target bun --external electron --external 'chromium-bidi*' --external '@ant/claude-for-chrome-mcp' --external '@anthropic-ai/bedrock-sdk' --external '@anthropic-ai/foundry-sdk' --external '@anthropic-ai/vertex-sdk' --external '@anthropic-ai/mcpb' --external '@aws-sdk/client-bedrock-runtime' --external 'google-auth-library' --external 'sharp' --external 'asciichart' --external 'audio-capture-napi' --external 'modifiers-napi' --external '@xenova/transformers' --external 'onnxruntime-node' --external playwright --external 'playwright-core' --external 'node-pty'",
28
+ "prebuild-version": "node scripts/prebuild-version.mjs",
29
+ "dev": "bun run prebuild-version && bun --watch run --define.TRANSCRIPT_CLASSIFIER=true --define.CHICAGO_MCP=true --define.VOICE_MODE=true src/main.tsx",
30
+ "start": "bun run prebuild-version && bun run --define.VOICE_MODE=true src/main.tsx",
31
+ "dev:channels": "bun run prebuild-version && bun run --define.VOICE_MODE=true src/main.tsx -- --dangerously-load-development-channels server:clew-orc",
32
+ "build": "bun run prebuild-version && NODE_ENV=production bun build --production --define.TRANSCRIPT_CLASSIFIER=true --define.CHICAGO_MCP=true --define.VOICE_MODE=true src/main.tsx --outdir ./dist --target bun --external electron --external 'chromium-bidi*' --external '@ant/claude-for-chrome-mcp' --external '@anthropic-ai/bedrock-sdk' --external '@anthropic-ai/foundry-sdk' --external '@anthropic-ai/vertex-sdk' --external '@anthropic-ai/mcpb' --external '@aws-sdk/client-bedrock-runtime' --external 'google-auth-library' --external 'sharp' --external 'asciichart' --external 'audio-capture-napi' --external 'modifiers-napi' --external '@xenova/transformers' --external 'onnxruntime-node' --external playwright --external 'playwright-core' --external 'node-pty' && mkdir -p dist/generated && cp src/generated/version.json dist/generated/",
32
33
  "prepublishOnly": "bun run build",
33
34
  "test": "bun test",
34
35
  "lint": "biome lint --write src/",
@@ -0,0 +1,22 @@
1
+ import { readFileSync, writeFileSync, mkdirSync } from 'node:fs';
2
+ import { dirname } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+
5
+ const __dirname = dirname(fileURLToPath(import.meta.url));
6
+ const root = dirname(__dirname);
7
+
8
+ const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
9
+
10
+ const generatedDir = new URL('../src/generated/', import.meta.url);
11
+ mkdirSync(generatedDir, { recursive: true });
12
+
13
+ writeFileSync(
14
+ new URL('./version.json', generatedDir),
15
+ JSON.stringify({
16
+ BUILD_VERSION: pkg.version,
17
+ PACKAGE_URL: pkg.name,
18
+ FEEDBACK_CHANNEL: 'https://github.com/ClewCode/ClewCode/issues',
19
+ ISSUES_EXPLAINER: 'visit https://github.com/ClewCode/ClewCode/issues',
20
+ }),
21
+ 'utf8',
22
+ );