Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/sanity/phases/verify-install-extended.sh
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ if ! command -v node >/dev/null 2>&1; then
skip_test "NAPI module exports" "node not available"
else
NAPI_ROOT=$(npm root -g 2>/dev/null || echo "")
NAPI_CHECK=$(NODE_PATH="$NAPI_ROOT:$HOME/.npm-global/lib/node_modules" node -e "
NAPI_AC_NM="$NAPI_ROOT/altimate-code/node_modules"
NAPI_CHECK=$(NODE_PATH="$NAPI_ROOT:$NAPI_AC_NM" node -e "
try {
const m = require('@altimateai/altimate-core');
// Verify it exports something (not just an empty module)
Expand Down
8 changes: 6 additions & 2 deletions test/sanity/phases/verify-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ assert_file_exists "$HOME/.altimate/builtin/dbt-analyze/SKILL.md" "dbt-analyze s
# After npm install -g, dependencies live under the global prefix's node_modules.
# Node's require() doesn't search there by default — set NODE_PATH so the
# NAPI module (and its platform-specific optional dep) can be found.
# npm may hoist altimate-core to the global root OR nest it under
# altimate-code/node_modules/ — include both paths.
GLOBAL_NM=$(npm root -g 2>/dev/null || echo "")
assert_exit_0 "altimate-core napi binding" env NODE_PATH="$GLOBAL_NM" node -e "require('@altimateai/altimate-core')"
AC_NM="$GLOBAL_NM/altimate-code/node_modules"
assert_exit_0 "altimate-core napi binding" env NODE_PATH="$GLOBAL_NM:$AC_NM" node -e "require('@altimateai/altimate-core')"

# 8. dbt CLI available
if command -v dbt >/dev/null 2>&1; then
Expand Down Expand Up @@ -105,10 +108,11 @@ DRIVERS=(
DRIVER_PASS=0
DRIVER_FAIL=0
DRIVER_NODE_PATH=$(npm root -g 2>/dev/null || echo "")
DRIVER_AC_NM="$DRIVER_NODE_PATH/altimate-code/node_modules"
for entry in "${DRIVERS[@]}"; do
pkg="${entry%%:*}"
label="${entry##*:}"
if NODE_PATH="$DRIVER_NODE_PATH" node -e "require.resolve('$pkg')" 2>/dev/null; then
if NODE_PATH="$DRIVER_NODE_PATH:$DRIVER_AC_NM" node -e "require.resolve('$pkg')" 2>/dev/null; then
echo " PASS: $label driver resolvable ($pkg)"
DRIVER_PASS=$((DRIVER_PASS + 1))
else
Expand Down
Loading