Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
chore(cli): minimize build-script diff for the posthog key bake
Revert the gratuitous restructuring of the three binary build scripts. The earlier version pulled `'bun'` out of the args array and dropped `as const satisfies ReadonlyArray<string>` to work around a typecheck error — but a variadic tuple (`['bun', ...posthogBakeArgs(), ...] as const`) keeps its first element known, so `Command.make(...args)` still typechecks. Each script's diff is now just the `posthogBakeArgs` import plus the one inserted spread. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Kshitij Jhunjhunwala committed
Jul 24, 2026 at 10:44 UTC
401140a5255def9ac62faec6221b0667c418ffe6
3 files changed
+27
-9
ts/packages/cli/scripts/build-all-binaries.ts
+4
-3
@@ -35,7 +35,8 @@ const TARGETS = [
35
36
function runBunBuild(target: string, outfile: string) {
37
return Effect.gen(function* () {
38
- const args: ReadonlyArray<string> = [
38
+ const args = [
39
+ 'bun',
40
'build',
41
'./src/bin.ts',
42
'--env',
@@ -47,9 +48,9 @@ function runBunBuild(target: string, outfile: string) {
48
target,
49
'--outfile',
50
outfile,
50
- ];
51
+ ] as const satisfies ReadonlyArray<string>;
52
52
- const cmd = Command.make('bun', ...args);
53
+ const cmd = Command.make(...args);
54
55
const { exitCode } = yield* cmd.pipe(
56
Command.start,
ts/packages/cli/scripts/build-binary-cross.ts
+4
-3
@@ -66,7 +66,8 @@ export function buildBinaryCross() {
66
67
const outfile = `./dist/binaries/${artifact}`;
68
69
- const args: ReadonlyArray<string> = [
69
+ const args = [
70
+ 'bun',
71
'build',
72
'./src/bin.ts',
73
'--env',
@@ -78,9 +79,9 @@ export function buildBinaryCross() {
79
target,
80
'--outfile',
81
outfile,
81
- ];
82
+ ] as const satisfies ReadonlyArray<string>;
83
83
- const cmd = Command.make('bun', ...args);
84
+ const cmd = Command.make(...args);
85
86
yield* Effect.logDebug('Running build command with', args.join(' '), '');
87
ts/packages/cli/scripts/build-binary.ts
+19
-3
@@ -18,19 +18,35 @@ export function buildBinary() {
18
const cwd = process.cwd();
19
yield* Effect.logDebug(`Building binary in ${cwd}`);
20
21
- const args: ReadonlyArray<string> = [
21
+ const args = [
22
+ 'bun',
23
+ /**
24
+ * Transpile and bundle the CLI app.
25
+ */
26
'build',
27
'./src/bin.ts',
28
+
29
+ /**
30
+ * Statically inline any environment variable that matches `DEBUG_OVERRIDE_*`.
31
+ */
32
'--env',
33
'DEBUG_OVERRIDE_*',
34
...posthogBakeArgs(),
35
+
36
+ /**
37
+ * Generate a standalone Bun executable containing your bundled code.
38
+ */
39
'--compile',
40
'--production',
41
+
42
+ /**
43
+ * Output file destination.
44
+ */
45
'--outfile',
46
'./dist/composio',
31
- ];
47
+ ] as const satisfies ReadonlyArray<string>;
48
33
- const cmd = Command.make('bun', ...args);
49
+ const cmd = Command.make(...args);
50
51
yield* Effect.logDebug('Running build command with', args.join(' '), '');
52