@stll/oxlint-config 1.5.0 → 1.5.2

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.
@@ -1170,6 +1170,60 @@ runtime_ready() {
1170
1170
  node_ready || fail 'Pinned Node, npm or npx is unavailable; run install'
1171
1171
  [[ -x "$BUN_DIR/bun" && "$($BUN_DIR/bun --version)" == "$BUN_VERSION" ]] || fail 'Pinned Bun is unavailable; run install'
1172
1172
  }
1173
+ bun_route() {
1174
+ local label="$1" resolved version
1175
+ shift
1176
+ resolved="$("$@" -c 'command -v bun')" || fail "Bun is unavailable through $label"
1177
+ version="$("$@" -c 'bun --version')" || fail "Bun at $resolved failed through $label"
1178
+ [[ "$version" == "$BUN_VERSION" ]] || fail "Bun at $resolved resolves version $version through $label; expected $BUN_VERSION"
1179
+ }
1180
+ verify_bun_routes() {
1181
+ local configured_mise login_shell minimal_path mise_root root_mise shims
1182
+ # Test-only overrides keep route executables and image locations inside fixtures.
1183
+ login_shell="$(printenv STLL_CLOUD_TEST_LOGIN_SHELL || true)"
1184
+ [[ -n "$login_shell" ]] || login_shell=bash
1185
+ minimal_path="$(printenv STLL_CLOUD_TEST_MINIMAL_PATH || true)"
1186
+ [[ -n "$minimal_path" ]] || minimal_path=/usr/local/bin:/usr/bin:/bin
1187
+ root_mise="$(printenv STLL_CLOUD_TEST_ROOT_MISE || true)"
1188
+ [[ -n "$root_mise" ]] || root_mise=/root/.local/share/mise
1189
+ bun_route 'the setup PATH' env PATH="$PATH" sh
1190
+ bun_route 'sh -c' sh
1191
+ bun_route 'bash -lc' "$login_shell" -l
1192
+ bun_route 'the minimal system PATH' env -i PATH="$minimal_path" sh
1193
+ configured_mise="$(printenv MISE_DATA_DIR || true)"
1194
+ for mise_root in "$configured_mise" "$OUTPUT_HOME/.local/share/mise" "$root_mise"; do
1195
+ [[ -n "$mise_root" ]] || continue
1196
+ shims="$mise_root/shims"
1197
+ [[ -d "$shims" ]] || continue
1198
+ bun_route "mise shims PATH $shims" env PATH="$shims:$PATH" sh
1199
+ done
1200
+ }
1201
+ replace_image_buns() {
1202
+ local candidate configured_mise directory mise_root root_mise
1203
+ configured_mise="$(printenv MISE_DATA_DIR || true)"
1204
+ root_mise="$(printenv STLL_CLOUD_TEST_ROOT_MISE || true)"
1205
+ [[ -n "$root_mise" ]] || root_mise=/root/.local/share/mise
1206
+ for mise_root in "$configured_mise" "$OUTPUT_HOME/.local/share/mise" "$root_mise"; do
1207
+ [[ -n "$mise_root" ]] || continue
1208
+ if [[ -d "$mise_root/installs/bun" ]]; then
1209
+ while IFS= read -r -d '' candidate; do
1210
+ [[ -d "$candidate" ]] || ln -sfnT -- "$BUN_DIR/bun" "$candidate"
1211
+ done < <(find "$mise_root/installs/bun" \( -type f -o -type l \) \( -name bun -o -name bunx \) -print0)
1212
+ fi
1213
+ for candidate in "$mise_root/shims/bun" "$mise_root/shims/bunx"; do
1214
+ [[ -e "$candidate" || -L "$candidate" ]] || continue
1215
+ [[ -d "$candidate" ]] || ln -sfnT -- "$BUN_DIR/bun" "$candidate"
1216
+ done
1217
+ done
1218
+ while IFS= read -r directory; do
1219
+ [[ -n "$directory" ]] || directory=.
1220
+ for candidate in "$directory/bun" "$directory/bunx"; do
1221
+ [[ -e "$candidate" || -L "$candidate" ]] || continue
1222
+ [[ -d "$candidate" ]] && continue
1223
+ [[ "$(readlink -f -- "$candidate")" == "$(readlink -f -- "$BUN_DIR/bun")" ]] || ln -sfnT -- "$BUN_DIR/bun" "$candidate"
1224
+ done
1225
+ done < <(printf '%s' "$PATH" | tr : '\n')
1226
+ }
1173
1227
  install_runtimes() (
1174
1228
  if [[ ! -s /etc/ssl/certs/ca-certificates.crt ]]; then
1175
1229
  command -v update-ca-certificates >/dev/null || fail 'System CA certificate bundle is missing; restore ca-certificates in the base image offline before install'
@@ -1207,6 +1261,8 @@ install_runtimes() (
1207
1261
  ln -sfnT -- "$NODE_DIR/bin/npm" /usr/local/bin/npm
1208
1262
  ln -sfnT -- "$NODE_DIR/bin/npx" /usr/local/bin/npx
1209
1263
  ln -sfnT -- "$BUN_DIR/bun" /usr/local/bin/bun
1264
+ replace_image_buns
1265
+ verify_bun_routes
1210
1266
  )
1211
1267
 
1212
1268
  dependency_install() {