@stll/oxlint-config 1.6.2 → 1.8.0
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.
- package/README.md +4 -4
- package/dist/cloud-setup-cli.mjs +1 -1
- package/dist/consumer-compat-cli.cjs.map +1 -1
- package/dist/consumer-compat-cli.mjs.map +1 -1
- package/dist/consumer-node-support.mjs +1 -1
- package/dist/dependabot.d.cts +23 -7
- package/dist/dependabot.d.mts +23 -7
- package/dist/engine-support-cli.cjs.map +1 -1
- package/dist/engine-support-cli.mjs.map +1 -1
- package/dist/engine-support.d.cts +4 -5
- package/dist/engine-support.d.mts +4 -5
- package/dist/git-tracked-output.cjs.map +1 -1
- package/dist/git-tracked-output.mjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.mts +11 -11
- package/dist/publish-artifact-syntax.cjs.map +1 -1
- package/dist/publish-artifact-syntax.mjs.map +1 -1
- package/dist/publish-build-target-nuxt-helper.d.cts +3 -4
- package/dist/publish-build-target-nuxt-helper.d.mts +3 -4
- package/dist/publish-build-target-vite-dts-helper.d.cts +2 -2
- package/dist/publish-build-target-vite-dts-helper.d.mts +2 -2
- package/dist/publish-build-target-vite-dts-helper2.cjs +47 -4
- package/dist/publish-build-target-vite-dts-helper2.cjs.map +1 -1
- package/dist/publish-build-target-vite-dts-helper2.mjs +47 -4
- package/dist/publish-build-target-vite-dts-helper2.mjs.map +1 -1
- package/dist/publish-contract-cli.cjs +2 -2
- package/dist/publish-contract-cli.cjs.map +1 -1
- package/dist/publish-contract-cli.mjs +2 -2
- package/dist/publish-contract-cli.mjs.map +1 -1
- package/dist/quarantine-policy.d.cts +9 -9
- package/dist/quarantine-policy.d.mts +9 -9
- package/dist/quarantine-policy2.cjs.map +1 -1
- package/dist/quarantine-policy2.mjs.map +1 -1
- package/dist/toolchain-changed.cjs +1 -3
- package/dist/toolchain-changed.cjs.map +1 -1
- package/dist/toolchain-changed.mjs +2 -4
- package/dist/toolchain-changed.mjs.map +1 -1
- package/dist/toolchain-dependabot.cjs +6 -3
- package/dist/toolchain-dependabot.cjs.map +1 -1
- package/dist/toolchain-dependabot.mjs +7 -4
- package/dist/toolchain-dependabot.mjs.map +1 -1
- package/dist/toolchain-guard.cjs +11 -4
- package/dist/toolchain-guard.cjs.map +1 -1
- package/dist/toolchain-guard.mjs +12 -5
- package/dist/toolchain-guard.mjs.map +1 -1
- package/dist/toolchain-inputs.cjs +159 -17
- package/dist/toolchain-inputs.cjs.map +1 -1
- package/dist/toolchain-inputs.mjs +148 -18
- package/dist/toolchain-inputs.mjs.map +1 -1
- package/dist/toolchain-schema.cjs +189 -1
- package/dist/toolchain-schema.cjs.map +1 -1
- package/dist/toolchain-schema.mjs +177 -3
- package/dist/toolchain-schema.mjs.map +1 -1
- package/dist/typecheck-parity.cjs.map +1 -1
- package/dist/typecheck-parity.mjs.map +1 -1
- package/dist/wasi-loader-normalizer-cli.cjs.map +1 -1
- package/dist/wasi-loader-normalizer-cli.mjs.map +1 -1
- package/package.json +6 -8
- package/toolchain.json +66 -19
|
@@ -1147,6 +1147,8 @@ NODE_DIR="/opt/stll-cloud/node/$NODE_VERSION"
|
|
|
1147
1147
|
BUN_DIR="/opt/stll-cloud/bun/$BUN_VERSION"
|
|
1148
1148
|
export PATH="$NODE_DIR/bin:$BUN_DIR:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
|
1149
1149
|
BUN_CACHE="/var/cache/stll-cloud/bun/$OUTPUT_UID"
|
|
1150
|
+
DEPENDENCY_STATE_ROOT=/var/lib/stll-cloud
|
|
1151
|
+
DEPENDENCY_STAMP="$DEPENDENCY_STATE_ROOT/dependencies-$(printf '%s' "$REPO_ROOT" | sha256sum | cut -d' ' -f1).sha256"
|
|
1150
1152
|
@ENV_ASSIGNMENTS@
|
|
1151
1153
|
[[ -f "$REPO_ROOT/.node-version" && ! -L "$REPO_ROOT/.node-version" ]] || fail 'A regular root .node-version is required'
|
|
1152
1154
|
[[ "$(awk 'NF { if (++count > 1 || NF != 1) exit 1; value=$1 } END { if (count != 1) exit 1; print value }' "$REPO_ROOT/.node-version")" == "$NODE_VERSION" ]] || fail 'Node selector changed; regenerate cloud-setup.sh'
|
|
@@ -1189,16 +1191,18 @@ verify_bun_routes() {
|
|
|
1189
1191
|
[[ -n "$minimal_path" ]] || minimal_path=/usr/local/bin:/usr/bin:/bin
|
|
1190
1192
|
root_mise="$(printenv STLL_CLOUD_TEST_ROOT_MISE || true)"
|
|
1191
1193
|
[[ -n "$root_mise" ]] || root_mise=/root/.local/share/mise
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
+
# An absolute shell: a PATH entry such as a user-writable mise shims
|
|
1195
|
+
# directory must never supply the program that root runs.
|
|
1196
|
+
bun_route 'the setup PATH' env PATH="$PATH" /bin/sh
|
|
1197
|
+
bun_route 'sh -c' /bin/sh
|
|
1194
1198
|
bun_route 'bash -lc' "$login_shell" -l
|
|
1195
|
-
bun_route 'the minimal system PATH' env -i PATH="$minimal_path" sh
|
|
1199
|
+
bun_route 'the minimal system PATH' env -i PATH="$minimal_path" /bin/sh
|
|
1196
1200
|
configured_mise="$(printenv MISE_DATA_DIR || true)"
|
|
1197
1201
|
for mise_root in "$configured_mise" "$OUTPUT_HOME/.local/share/mise" "$root_mise"; do
|
|
1198
1202
|
[[ -n "$mise_root" ]] || continue
|
|
1199
1203
|
shims="$mise_root/shims"
|
|
1200
1204
|
[[ -d "$shims" ]] || continue
|
|
1201
|
-
bun_route "mise shims PATH $shims" env PATH="$shims:$PATH" sh
|
|
1205
|
+
bun_route "mise shims PATH $shims" env PATH="$shims:$PATH" /bin/sh
|
|
1202
1206
|
done
|
|
1203
1207
|
}
|
|
1204
1208
|
replace_image_buns() {
|
|
@@ -1225,7 +1229,8 @@ replace_image_buns() {
|
|
|
1225
1229
|
[[ -d "$candidate" ]] && continue
|
|
1226
1230
|
[[ "$(readlink -f -- "$candidate")" == "$(readlink -f -- "$BUN_DIR/bun")" ]] || ln -sfnT -- "$BUN_DIR/bun" "$candidate"
|
|
1227
1231
|
done
|
|
1228
|
-
|
|
1232
|
+
# The trailing newline lets read return the last PATH entry too.
|
|
1233
|
+
done < <(printf '%s\n' "$PATH" | tr : '\n')
|
|
1229
1234
|
}
|
|
1230
1235
|
install_runtimes() (
|
|
1231
1236
|
if [[ ! -s /etc/ssl/certs/ca-certificates.crt ]]; then
|
|
@@ -1265,7 +1270,6 @@ install_runtimes() (
|
|
|
1265
1270
|
ln -sfnT -- "$NODE_DIR/bin/npx" /usr/local/bin/npx
|
|
1266
1271
|
ln -sfnT -- "$BUN_DIR/bun" /usr/local/bin/bun
|
|
1267
1272
|
replace_image_buns
|
|
1268
|
-
verify_bun_routes
|
|
1269
1273
|
)
|
|
1270
1274
|
|
|
1271
1275
|
dependency_install() {
|
|
@@ -1304,6 +1308,48 @@ process.stdout.write([...hosts].sort().join(","));
|
|
|
1304
1308
|
network_run "$download_hosts" 240 runuser -u "$OUTPUT_USER" -- env HOME="$OUTPUT_HOME" BUN_INSTALL_CACHE_DIR="$BUN_CACHE" PATH="$PATH" BUN_CONFIG_HTTP_IDLE_TIMEOUT=20 "$BUN_DIR/bun" @INSTALL_ARGS@
|
|
1305
1309
|
}
|
|
1306
1310
|
|
|
1311
|
+
dependency_hash() {
|
|
1312
|
+
[[ -f bun.lock && ! -L bun.lock ]] || fail 'A regular root bun.lock is required'
|
|
1313
|
+
sha256sum -- bun.lock | cut -d ' ' -f1
|
|
1314
|
+
}
|
|
1315
|
+
prepare_dependency_state() {
|
|
1316
|
+
[[ ! -L "$DEPENDENCY_STATE_ROOT" ]] || fail 'Dependency state root must not be a symlink'
|
|
1317
|
+
if [[ -e "$DEPENDENCY_STATE_ROOT" ]]; then
|
|
1318
|
+
[[ -d "$DEPENDENCY_STATE_ROOT" && "$(stat -c '%u:%a' "$DEPENDENCY_STATE_ROOT")" == 0:755 ]] || fail 'Invalid dependency state root'
|
|
1319
|
+
else
|
|
1320
|
+
install -d -m 755 -o root -g root "$DEPENDENCY_STATE_ROOT"
|
|
1321
|
+
fi
|
|
1322
|
+
[[ ! -L "$DEPENDENCY_STAMP" ]] || fail 'Dependency stamp must not be a symlink'
|
|
1323
|
+
if [[ -e "$DEPENDENCY_STAMP" ]]; then
|
|
1324
|
+
[[ -f "$DEPENDENCY_STAMP" && "$(stat -c '%u:%a' "$DEPENDENCY_STAMP")" == 0:644 ]] || fail 'Invalid dependency stamp'
|
|
1325
|
+
fi
|
|
1326
|
+
}
|
|
1327
|
+
write_dependency_stamp() {
|
|
1328
|
+
local temporary
|
|
1329
|
+
prepare_dependency_state
|
|
1330
|
+
temporary="$(mktemp "$DEPENDENCY_STATE_ROOT/.dependencies.XXXXXX")"
|
|
1331
|
+
chmod 644 "$temporary"
|
|
1332
|
+
dependency_hash > "$temporary"
|
|
1333
|
+
mv -f -- "$temporary" "$DEPENDENCY_STAMP"
|
|
1334
|
+
}
|
|
1335
|
+
install_dependencies() {
|
|
1336
|
+
prepare_dependency_state
|
|
1337
|
+
rm -f -- "$DEPENDENCY_STAMP"
|
|
1338
|
+
dependency_install
|
|
1339
|
+
write_dependency_stamp
|
|
1340
|
+
}
|
|
1341
|
+
sync_dependencies() {
|
|
1342
|
+
local expected installed=''
|
|
1343
|
+
prepare_dependency_state
|
|
1344
|
+
expected="$(dependency_hash)"
|
|
1345
|
+
if [[ -f "$DEPENDENCY_STAMP" ]]; then IFS= read -r installed < "$DEPENDENCY_STAMP" || true; fi
|
|
1346
|
+
# The stamp describes an installation; without node_modules there is none.
|
|
1347
|
+
[[ "$installed" == "$expected" && -d "$REPO_ROOT/node_modules" ]] && return
|
|
1348
|
+
rm -f -- "$DEPENDENCY_STAMP"
|
|
1349
|
+
dependency_install || fail 'bun.lock mismatch; dependency installation failed'
|
|
1350
|
+
write_dependency_stamp
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1307
1353
|
@SERVICE_INSTALL@
|
|
1308
1354
|
@SERVICE_START@
|
|
1309
1355
|
|
|
@@ -1322,13 +1368,16 @@ if [[ "$MODE" == install ]]; then
|
|
|
1322
1368
|
step services install_services
|
|
1323
1369
|
step tools install_tools
|
|
1324
1370
|
step shell install_shell_environment
|
|
1325
|
-
|
|
1371
|
+
# Login routes read the installed profile, so they are checked after it.
|
|
1372
|
+
step routes verify_bun_routes
|
|
1373
|
+
step dependencies install_dependencies
|
|
1326
1374
|
@PREPARE_STEP@
|
|
1327
1375
|
exit 0
|
|
1328
1376
|
fi
|
|
1329
1377
|
@ENV_INITIALIZE@
|
|
1330
1378
|
start_environment() {
|
|
1331
1379
|
step runtime-check runtime_ready
|
|
1380
|
+
step dependencies sync_dependencies
|
|
1332
1381
|
step tool-check verify_tools
|
|
1333
1382
|
step shell install_shell_environment
|
|
1334
1383
|
step shell-check verify_shell_environment
|
|
@@ -1394,6 +1443,39 @@ emit_session_environment() {
|
|
|
1394
1443
|
}
|
|
1395
1444
|
`;
|
|
1396
1445
|
const shellQuote = (value) => `'${value.replaceAll("'", "'\\''")}'`;
|
|
1446
|
+
const renderWasmBindgenLockValidation = (version) => `[[ -f 'Cargo.lock' && ! -L 'Cargo.lock' ]] && awk -v expected=${shellQuote(version)} '${String.raw`
|
|
1447
|
+
function validate_package() {
|
|
1448
|
+
if (in_package && name == "wasm-bindgen") {
|
|
1449
|
+
count++
|
|
1450
|
+
if (version != expected) mismatch = 1
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
/^\[\[package\]\][[:space:]]*$/ {
|
|
1454
|
+
validate_package()
|
|
1455
|
+
in_package = 1
|
|
1456
|
+
name = ""
|
|
1457
|
+
version = ""
|
|
1458
|
+
next
|
|
1459
|
+
}
|
|
1460
|
+
/^\[/ {
|
|
1461
|
+
validate_package()
|
|
1462
|
+
in_package = 0
|
|
1463
|
+
next
|
|
1464
|
+
}
|
|
1465
|
+
in_package && /^[[:space:]]*name[[:space:]]*=/ {
|
|
1466
|
+
name = $0
|
|
1467
|
+
sub(/^[^=]*=[[:space:]]*"/, "", name)
|
|
1468
|
+
sub(/"[[:space:]]*$/, "", name)
|
|
1469
|
+
}
|
|
1470
|
+
in_package && /^[[:space:]]*version[[:space:]]*=/ {
|
|
1471
|
+
version = $0
|
|
1472
|
+
sub(/^[^=]*=[[:space:]]*"/, "", version)
|
|
1473
|
+
sub(/"[[:space:]]*$/, "", version)
|
|
1474
|
+
}
|
|
1475
|
+
END {
|
|
1476
|
+
validate_package()
|
|
1477
|
+
exit !(count >= 1 && !mismatch)
|
|
1478
|
+
}`}' 'Cargo.lock' || fail 'Cargo.lock wasm-bindgen version changed; regenerate cloud-setup.sh'`;
|
|
1397
1479
|
const renderPrepare = (prepare, files) => {
|
|
1398
1480
|
if (prepare === void 0) return "";
|
|
1399
1481
|
const manifest = files["package.json"];
|
|
@@ -1432,16 +1514,12 @@ const generateCloudSetup = ({ policy, cloud, nodeVersion, files = {}, rustExcept
|
|
|
1432
1514
|
bunVersion: policy.bun,
|
|
1433
1515
|
rust: toolchains.rust
|
|
1434
1516
|
})],
|
|
1435
|
-
["@INPUT_VALIDATION@", [
|
|
1436
|
-
"rust-toolchain.toml",
|
|
1437
|
-
"rust-toolchain",
|
|
1438
|
-
...selected.tools?.["wasm-bindgen-cli"] === void 0 ? [] : ["Cargo.lock"]
|
|
1439
|
-
].flatMap((file) => {
|
|
1517
|
+
["@INPUT_VALIDATION@", ["rust-toolchain.toml", "rust-toolchain"].flatMap((file) => {
|
|
1440
1518
|
const content = files[file];
|
|
1441
1519
|
if (content === void 0) return [`[[ ! -e ${shellQuote(file)} && ! -L ${shellQuote(file)} ]] || fail ${shellQuote(`${file} appeared; regenerate cloud-setup.sh`)}`];
|
|
1442
1520
|
const hash = (0, node_crypto.createHash)("sha256").update(content).digest("hex");
|
|
1443
1521
|
return [`[[ -f ${shellQuote(file)} && ! -L ${shellQuote(file)} ]] && [[ "$(sha256sum -- ${shellQuote(file)} | cut -d ' ' -f1)" == ${shellQuote(hash)} ]] || fail ${shellQuote(`${file} changed; regenerate cloud-setup.sh`)}`];
|
|
1444
|
-
}).join("\n")],
|
|
1522
|
+
}).concat(selected.tools?.["wasm-bindgen-cli"] === void 0 ? [] : [renderWasmBindgenLockValidation(selected.tools["wasm-bindgen-cli"])]).join("\n")],
|
|
1445
1523
|
["@BUN@", policy.bun],
|
|
1446
1524
|
["@NODE@", exactNode],
|
|
1447
1525
|
["@ENV_ASSIGNMENTS@", selected.envFile === void 0 ? "" : `ENV_FILE=${shellQuote(selected.envFile)}\nENV_MARKER=${shellQuote(cloudEnvironmentMarker)}`],
|
|
@@ -1492,7 +1570,7 @@ const releasedSessionStartHook = (script) => ({
|
|
|
1492
1570
|
fi`
|
|
1493
1571
|
}]
|
|
1494
1572
|
});
|
|
1495
|
-
const
|
|
1573
|
+
const releasedTemporaryFileHook = (script) => ({
|
|
1496
1574
|
matcher: "",
|
|
1497
1575
|
hooks: [{
|
|
1498
1576
|
type: "command",
|
|
@@ -1533,6 +1611,52 @@ $cloud_shell_exports"
|
|
|
1533
1611
|
fi`
|
|
1534
1612
|
}]
|
|
1535
1613
|
});
|
|
1614
|
+
const sessionStartHook = (script) => ({
|
|
1615
|
+
matcher: "",
|
|
1616
|
+
hooks: [{
|
|
1617
|
+
type: "command",
|
|
1618
|
+
command: `if [ "\${CLAUDE_CODE_REMOTE:-}" = "true" ]; then
|
|
1619
|
+
cloud_setup_incomplete() {
|
|
1620
|
+
printf '%s\\n' 'Cloud setup could not establish a verified session environment. From the repository root, run bash .agents/cloud-setup.sh install and then bash .agents/cloud-setup.sh start. Do not assume pinned tools or services are ready until start succeeds.'
|
|
1621
|
+
printf '%s\\n' "cloud-setup: $1" >&2
|
|
1622
|
+
exit 0
|
|
1623
|
+
}
|
|
1624
|
+
if [ -n "\${CLAUDE_ENV_FILE:-}" ]; then
|
|
1625
|
+
cloud_session_exports="$(${script} session)" || cloud_setup_incomplete 'startup failed; run install'
|
|
1626
|
+
else
|
|
1627
|
+
${script} start >&2 || cloud_setup_incomplete 'startup failed; run install'
|
|
1628
|
+
exit 0
|
|
1629
|
+
fi
|
|
1630
|
+
if [ -n "\${CLAUDE_ENV_FILE:-}" ]; then
|
|
1631
|
+
if [ ! -s ${cloudShellProfilePath} ]; then
|
|
1632
|
+
cloud_setup_incomplete 'cloud shell profile is unavailable; run install'
|
|
1633
|
+
fi
|
|
1634
|
+
cloud_shell_exports="$(cat ${cloudShellProfilePath})" || cloud_setup_incomplete 'cloud shell profile could not be read; run install'
|
|
1635
|
+
[ -n "$cloud_shell_exports" ] || cloud_setup_incomplete 'cloud shell profile is unavailable; run install'
|
|
1636
|
+
if [ -e "$CLAUDE_ENV_FILE" ] || [ -L "$CLAUDE_ENV_FILE" ]; then
|
|
1637
|
+
[ -f "$CLAUDE_ENV_FILE" ] && [ ! -L "$CLAUDE_ENV_FILE" ] || cloud_setup_incomplete 'session environment must be a regular file; check its path and rerun start'
|
|
1638
|
+
fi
|
|
1639
|
+
cloud_env_snapshot="\${CLAUDE_ENV_FILE}.stll-cloud"
|
|
1640
|
+
case "$cloud_env_snapshot" in
|
|
1641
|
+
*"'"*) cloud_setup_incomplete 'session environment path must not contain a single quote; check its path and rerun start' ;;
|
|
1642
|
+
esac
|
|
1643
|
+
if [ -n "$cloud_session_exports" ]; then
|
|
1644
|
+
cloud_session_exports="$cloud_session_exports
|
|
1645
|
+
$cloud_shell_exports"
|
|
1646
|
+
else
|
|
1647
|
+
cloud_session_exports="$cloud_shell_exports"
|
|
1648
|
+
fi
|
|
1649
|
+
cloud_env_temporary="$(umask 077; mktemp "\${cloud_env_snapshot}.XXXXXX")" || cloud_setup_incomplete 'session environment could not be prepared; check its write access and rerun start'
|
|
1650
|
+
printf '%s\\n' "$cloud_session_exports" > "$cloud_env_temporary" || { rm -f -- "$cloud_env_temporary"; cloud_setup_incomplete 'session environment could not be prepared; check its write access and rerun start'; }
|
|
1651
|
+
mv -f -- "$cloud_env_temporary" "$cloud_env_snapshot" || { rm -f -- "$cloud_env_temporary"; cloud_setup_incomplete 'session environment could not be persisted; check its write access and rerun start'; }
|
|
1652
|
+
cloud_env_source=". '$cloud_env_snapshot'"
|
|
1653
|
+
if [ ! -f "$CLAUDE_ENV_FILE" ] || ! grep -Fqx -- "$cloud_env_source" "$CLAUDE_ENV_FILE"; then
|
|
1654
|
+
printf '\\n%s\\n' "$cloud_env_source" >> "$CLAUDE_ENV_FILE" || cloud_setup_incomplete 'session environment could not be persisted; check its write access and rerun start'
|
|
1655
|
+
fi
|
|
1656
|
+
fi
|
|
1657
|
+
fi`
|
|
1658
|
+
}]
|
|
1659
|
+
});
|
|
1536
1660
|
const currentMainSessionStartHook = (script) => ({
|
|
1537
1661
|
matcher: "",
|
|
1538
1662
|
hooks: [{
|
|
@@ -1559,7 +1683,8 @@ const cloudSessionStartHook = sessionStartHook(`bash "$CLAUDE_PROJECT_DIR/${clou
|
|
|
1559
1683
|
const previousCloudSessionStartHooks = [
|
|
1560
1684
|
releasedSessionStartHook(`bash ${cloudSetupPath}`),
|
|
1561
1685
|
releasedSessionStartHook(`bash "$CLAUDE_PROJECT_DIR/${cloudSetupPath}"`),
|
|
1562
|
-
currentMainSessionStartHook(`bash "$CLAUDE_PROJECT_DIR/${cloudSetupPath}"`)
|
|
1686
|
+
currentMainSessionStartHook(`bash "$CLAUDE_PROJECT_DIR/${cloudSetupPath}"`),
|
|
1687
|
+
releasedTemporaryFileHook(`bash "$CLAUDE_PROJECT_DIR/${cloudSetupPath}"`)
|
|
1563
1688
|
];
|
|
1564
1689
|
const cloudAttribution = {
|
|
1565
1690
|
commit: "",
|
|
@@ -1837,14 +1962,19 @@ const isDockerDefinitionPath = (file) => {
|
|
|
1837
1962
|
if (/\.(?:[cm]?[jt]sx?|mdx?|rst|txt|html?|py|rs|go|java|sh|c|cc|cpp|cxx|h|hpp|cs|rb|php|swift|kt|css|scss)$/i.test(name)) return false;
|
|
1838
1963
|
return /^(?:[^./]+\.)*(?:dockerfile|containerfile)(?:\.[^./]+)*$/i.test(name);
|
|
1839
1964
|
};
|
|
1965
|
+
const isFormatterConfigPath = (file) => {
|
|
1966
|
+
const name = file.split("/").at(-1) ?? "";
|
|
1967
|
+
return /^\.oxfmtrc(?:\.jsonc?)?$/.test(name) || /^oxfmt\.config\.[cm]?[jt]s$/.test(name) || /^\.prettierrc(?:\.[^/]+)?$/.test(name) || /^prettier\.config\.[cm]?[jt]s$/.test(name) || name === ".prettierignore" || /^biome\.jsonc?$/.test(name) || /^\.?dprint\.jsonc?$/.test(name);
|
|
1968
|
+
};
|
|
1969
|
+
const isLefthookConfigPath = (file) => /^\.?lefthook(?:-local)?\.ya?ml$/.test(file);
|
|
1840
1970
|
/** Executable shell files may have no suffix; the interpreter is then their discriminator. */
|
|
1841
1971
|
const isShellScript = (file, text = "") => !excludedInputPath(file) && (/\.(?:sh|bash|zsh)$/.test(file) || /^#![ \t]*(?:\/(?:[^ \t\r\n]+\/)*(?:bash|dash|ksh|zsh|sh)|\/usr\/bin\/env[ \t]+(?:-S[ \t]+)?(?:bash|dash|ksh|zsh|sh))(?=[ \t\r\n]|$)/.test(text));
|
|
1842
1972
|
/** Lockfiles establish ecosystem presence without reading their dependency graphs. */
|
|
1843
1973
|
const toolchainInputKind = (file, text = "") => {
|
|
1844
|
-
if (file === "bunfig.toml" || file === ".agents/cloud-setup.sh" || file === ".claude/settings.json" || file === "Cargo.lock") return "config";
|
|
1974
|
+
if (file === "bunfig.toml" || file === ".agents/cloud-setup.sh" || file === ".claude/settings.json" || file === "Cargo.lock" || file === ".changeset/config.json" || isLefthookConfigPath(file)) return "config";
|
|
1845
1975
|
if (githubAutomationFileKind(file) !== void 0) return "config";
|
|
1846
1976
|
if (excludedInputPath(file)) return void 0;
|
|
1847
|
-
if (dependabotManifestEcosystem(file) !== void 0 || pythonDependencyManifestKind(file) === "pipfile-lock" || javascriptDependencyLockfiles.some((name) => file.split("/").at(-1) === name) || /(?:^|\/)uv\.lock$/.test(file)) return "presence";
|
|
1977
|
+
if (dependabotManifestEcosystem(file) !== void 0 || pythonDependencyManifestKind(file) === "pipfile-lock" || javascriptDependencyLockfiles.some((name) => file.split("/").at(-1) === name) || /(?:^|\/)uv\.lock$/.test(file) || isFormatterConfigPath(file)) return "presence";
|
|
1848
1978
|
if (githubAutomationFileKind(file) !== void 0 || isShellScript(file, text) || /(?:^|\/)ci-service-images\.json$/.test(file) || isMiseConfigPath(file) || isPythonDependencyManifest(file) || isDockerDefinitionPath(file) || isComposeDefinitionPath(file) || isKubernetesDefinitionPath(file) || /(?:^|\/)(?:package\.json|consumer-compat\.json|pnpm-workspace\.yaml|stll-toolchain\.json|\.bun-version|\.node-version|\.nvmrc|\.python-version|rust-toolchain(?:\.toml)?|\.tool-versions|\.?mise\.toml|uv\.toml|\.uv\.toml|\.github\/dependabot\.ya?ml|Cargo\.toml)$/.test(file)) return "config";
|
|
1849
1979
|
};
|
|
1850
1980
|
//#endregion
|
|
@@ -1926,12 +2056,24 @@ Object.defineProperty(exports, "isDockerDefinitionPath", {
|
|
|
1926
2056
|
return isDockerDefinitionPath;
|
|
1927
2057
|
}
|
|
1928
2058
|
});
|
|
2059
|
+
Object.defineProperty(exports, "isFormatterConfigPath", {
|
|
2060
|
+
enumerable: true,
|
|
2061
|
+
get: function() {
|
|
2062
|
+
return isFormatterConfigPath;
|
|
2063
|
+
}
|
|
2064
|
+
});
|
|
1929
2065
|
Object.defineProperty(exports, "isKubernetesDefinitionPath", {
|
|
1930
2066
|
enumerable: true,
|
|
1931
2067
|
get: function() {
|
|
1932
2068
|
return isKubernetesDefinitionPath;
|
|
1933
2069
|
}
|
|
1934
2070
|
});
|
|
2071
|
+
Object.defineProperty(exports, "isLefthookConfigPath", {
|
|
2072
|
+
enumerable: true,
|
|
2073
|
+
get: function() {
|
|
2074
|
+
return isLefthookConfigPath;
|
|
2075
|
+
}
|
|
2076
|
+
});
|
|
1935
2077
|
Object.defineProperty(exports, "isMiseConfigPath", {
|
|
1936
2078
|
enumerable: true,
|
|
1937
2079
|
get: function() {
|