mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 13:51:33 +00:00
* chore(scripts): end failing oxlint runs with a stable status line A crashed run-oxlint wrapper printed only a stack trace, and a lint invocation whose output was truncated (cmd | tail -N) read as success — which recently let a wrapper crash (stale node_modules after a dep-adding merge) masquerade as a clean lint. Route the CLI entry through a small wrapper that converts crashes into exit 1 and ends every failing run with '[oxlint] FAILED (exit N)' as the final line. * chore(scripts): declare runOxlintCliEntry in the script declaration contract check-guards verifies .d.mts contracts against .mjs exports and check-test-types consumes them; the new entry export needed both the declaration and explicit log-parameter annotations in the test.
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
/**
|
|
* Returns whether oxlint args need package-boundary declaration artifacts first.
|
|
*/
|
|
export function shouldPrepareExtensionPackageBoundaryArtifacts(args: unknown): boolean;
|
|
/**
|
|
* Drops tracked-but-missing sparse-checkout targets so narrow sparse checks can pass.
|
|
*/
|
|
export function filterSparseMissingOxlintTargets(
|
|
args: string[],
|
|
{
|
|
cwd,
|
|
fileExists,
|
|
isSparseCheckoutEnabled,
|
|
isTrackedPath,
|
|
}?: {
|
|
cwd?: string | undefined;
|
|
fileExists?: ((target: string) => boolean) | undefined;
|
|
isSparseCheckoutEnabled?: ((params: { cwd: string }) => boolean) | undefined;
|
|
isTrackedPath?: ((params: { cwd: string; target: string }) => boolean) | undefined;
|
|
},
|
|
): {
|
|
args: string[];
|
|
hadExplicitTargets: boolean;
|
|
remainingExplicitTargets: number;
|
|
skippedTargets: string[];
|
|
skippedConfigs: string[];
|
|
};
|
|
/**
|
|
* Applies wrapper policy and runs oxlint with the final argument list.
|
|
*/
|
|
export function main(argv?: string[], runtimeEnv?: NodeJS.ProcessEnv): Promise<void>;
|
|
/**
|
|
* CLI entry: converts wrapper crashes into exit 1 and ends every failing run
|
|
* with a stable `[oxlint] FAILED (exit N)` final line.
|
|
*/
|
|
export function runOxlintCliEntry(
|
|
run?: () => Promise<void>,
|
|
log?: (message: unknown) => void,
|
|
): Promise<void>;
|