File tree Expand file tree Collapse file tree 8 files changed +25
-14
lines changed
Expand file tree Collapse file tree 8 files changed +25
-14
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { git } from "@/util/git"
66
77export const PrCommand = cmd ( {
88 command : "pr <number>" ,
9- describe : "fetch and checkout a GitHub PR branch, then run opencode " ,
9+ describe : "fetch and checkout a GitHub PR branch, then run altimate-code " ,
1010 builder : ( yargs ) =>
1111 yargs . positional ( "number" , {
1212 type : "number" ,
Original file line number Diff line number Diff line change @@ -64,12 +64,12 @@ async function input(value?: string) {
6464
6565export const TuiThreadCommand = cmd ( {
6666 command : "$0 [project]" ,
67- describe : "start opencode tui" ,
67+ describe : "start altimate-code tui" ,
6868 builder : ( yargs ) =>
6969 withNetworkOptions ( yargs )
7070 . positional ( "project" , {
7171 type : "string" ,
72- describe : "path to start opencode in" ,
72+ describe : "path to start altimate-code in" ,
7373 } )
7474 . option ( "model" , {
7575 type : "string" ,
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ interface RemovalTargets {
2424
2525export const UninstallCommand = {
2626 command : "uninstall" ,
27- describe : "uninstall opencode and remove all related files" ,
27+ describe : "uninstall altimate-code and remove all related files" ,
2828 builder : ( yargs : Argv ) =>
2929 yargs
3030 . option ( "keep-config" , {
Original file line number Diff line number Diff line change @@ -1070,7 +1070,7 @@ export namespace Config {
10701070 . object ( {
10711071 $schema : z . string ( ) . optional ( ) . describe ( "JSON schema reference for configuration validation" ) ,
10721072 logLevel : Log . Level . optional ( ) . describe ( "Log level" ) ,
1073- server : Server . optional ( ) . describe ( "Server configuration for opencode serve and web commands" ) ,
1073+ server : Server . optional ( ) . describe ( "Server configuration for altimate-code serve and web commands" ) ,
10741074 command : z
10751075 . record ( z . string ( ) , Command )
10761076 . optional ( )
Original file line number Diff line number Diff line change @@ -223,9 +223,9 @@ export namespace Server {
223223 openAPIRouteHandler ( app , {
224224 documentation : {
225225 info : {
226- title : "opencode " ,
226+ title : "altimate-code " ,
227227 version : "0.0.3" ,
228- description : "opencode api" ,
228+ description : "altimate-code api" ,
229229 } ,
230230 openapi : "3.1.1" ,
231231 } ,
@@ -583,9 +583,9 @@ export namespace Server {
583583 const result = await generateSpecs ( Default ( ) , {
584584 documentation : {
585585 info : {
586- title : "opencode " ,
586+ title : "altimate-code " ,
587587 version : "1.0.0" ,
588- description : "opencode api" ,
588+ description : "altimate-code api" ,
589589 } ,
590590 openapi : "3.1.1" ,
591591 } ,
Original file line number Diff line number Diff line change 243243
244244# 15. No hardcoded CI paths leaked into installed files
245245echo " [15/20] No hardcoded CI paths..."
246- # Check for common CI runner paths baked into installed JS bundles
246+ # Check for common CI runner paths baked into installed JS/JSON files.
247+ # Exclude compiled binaries (bin/), .node native modules, and .map sourcemaps
248+ # — Bun's single-file compiler embeds build-machine paths in debug info which
249+ # are harmless and unavoidable.
247250INSTALL_DIR=$( npm root -g 2> /dev/null || echo " " )
248251if [ -n " $INSTALL_DIR " ] && [ -d " $INSTALL_DIR /altimate-code" ]; then
249- if grep -rq ' /home/runner/work\|/github/workspace' " $INSTALL_DIR /altimate-code/" 2> /dev/null; then
252+ if grep -rq --include=' *.js' --include=' *.json' --include=' *.mjs' --include=' *.cjs' \
253+ ' /home/runner/work\|/github/workspace' " $INSTALL_DIR /altimate-code/" 2> /dev/null; then
250254 echo " FAIL: hardcoded CI paths found in installed package"
251255 FAIL_COUNT=$(( FAIL_COUNT + 1 ))
252256 else
Original file line number Diff line number Diff line change @@ -29,7 +29,11 @@ assert_file_exists "$HOME/.altimate/builtin/sql-review/SKILL.md" "sql-review ski
2929assert_file_exists " $HOME /.altimate/builtin/dbt-analyze/SKILL.md" " dbt-analyze skill exists"
3030
3131# 7. altimate-core napi binding loads
32- assert_exit_0 " altimate-core napi binding" node -e " require('@altimateai/altimate-core')"
32+ # After npm install -g, dependencies live under the global prefix's node_modules.
33+ # Node's require() doesn't search there by default — set NODE_PATH so the
34+ # NAPI module (and its platform-specific optional dep) can be found.
35+ GLOBAL_NM=$( npm root -g 2> /dev/null || echo " " )
36+ assert_exit_0 " altimate-core napi binding" env NODE_PATH=" $GLOBAL_NM " node -e " require('@altimateai/altimate-core')"
3337
3438# 8. dbt CLI available
3539if command -v dbt > /dev/null 2>&1 ; then
@@ -100,10 +104,11 @@ DRIVERS=(
100104
101105DRIVER_PASS=0
102106DRIVER_FAIL=0
107+ DRIVER_NODE_PATH=$( npm root -g 2> /dev/null || echo " " )
103108for entry in " ${DRIVERS[@]} " ; do
104109 pkg=" ${entry%%:* } "
105110 label=" ${entry##*: } "
106- if node -e " require.resolve('$pkg ')" 2> /dev/null; then
111+ if NODE_PATH= " $DRIVER_NODE_PATH " node -e " require.resolve('$pkg ')" 2> /dev/null; then
107112 echo " PASS: $label driver resolvable ($pkg )"
108113 DRIVER_PASS=$(( DRIVER_PASS + 1 ))
109114 else
Original file line number Diff line number Diff line change @@ -164,7 +164,9 @@ cd /home/testuser
164164mkdir -p /home/testuser/.npm-global
165165npm config set prefix /home/testuser/.npm-global
166166export PATH=" /home/testuser/.npm-global/bin:$PATH "
167- npm install -g " altimate-code@$VERSION " --registry " $REGISTRY_URL " 2>&1
167+ # Install the main package, plus duckdb so at least one peer dependency is
168+ # resolvable during driver-check tests.
169+ npm install -g " altimate-code@$VERSION " duckdb --registry " $REGISTRY_URL " 2>&1
168170echo " "
169171echo " Installed: $( which altimate 2> /dev/null || echo ' NOT FOUND' ) "
170172echo " Version: $( altimate --version 2> /dev/null || echo ' FAILED' ) "
You can’t perform that action at this time.
0 commit comments