File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
33import * as esbuild from "esbuild" ;
4- import { readFileSync , writeFileSync } from "fs" ;
4+ import { readFileSync , writeFileSync , chmodSync } from "fs" ;
55import { resolve , dirname } from "path" ;
66import { fileURLToPath } from "url" ;
77
@@ -86,6 +86,9 @@ const require = createRequire(import.meta.url);`,
8686
8787 // Create wrapper script with shebang
8888 writeFileSync ( "dist/cn.js" , "#!/usr/bin/env node\nimport('./index.js');" ) ;
89+
90+ // Make the wrapper script executable
91+ chmodSync ( "dist/cn.js" , 0o755 ) ;
8992
9093 // Calculate bundle size
9194 const bundleSize = result . metafile . outputs [ "dist/index.js" ] . bytes ;
Original file line number Diff line number Diff line change @@ -118,9 +118,14 @@ runTest("Local packages are bundled", () => {
118118 }
119119
120120 // Check for code from @continuedev /openai-adapters
121+ // Since the bundle is minified, check for strings that would be present
122+ // even after minification (e.g., error messages, property names)
121123 if (
122- ! bundleContent . includes ( "BaseLlmApi" ) &&
123- ! bundleContent . includes ( "constructLlmApi" )
124+ ! bundleContent . includes ( "anthropic" ) &&
125+ ! bundleContent . includes ( "gemini" ) &&
126+ ! bundleContent . includes ( "openai" ) &&
127+ ! bundleContent . includes ( "azure" ) &&
128+ ! bundleContent . includes ( "bedrock" )
124129 ) {
125130 throw new Error ( "@continuedev/openai-adapters not properly bundled" ) ;
126131 }
You can’t perform that action at this time.
0 commit comments