mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-25 23:47:20 +00:00
ci: prepare extension lint artifacts
This commit is contained in:
@@ -20,6 +20,8 @@ export function runExtensionOxlint(params) {
|
||||
const tempConfigPath = path.join(tempDir, "oxlint.json");
|
||||
|
||||
try {
|
||||
prepareExtensionPackageBoundaryArtifacts(repoRoot);
|
||||
|
||||
const extensionFiles = params.roots.flatMap((root) =>
|
||||
collectTypeScriptFiles(path.resolve(repoRoot, root)),
|
||||
);
|
||||
@@ -50,6 +52,37 @@ export function runExtensionOxlint(params) {
|
||||
}
|
||||
}
|
||||
|
||||
function prepareExtensionPackageBoundaryArtifacts(repoRoot) {
|
||||
const releaseLock = acquireLocalHeavyCheckLockSync({
|
||||
cwd: repoRoot,
|
||||
env: process.env,
|
||||
toolName: "extension-package-boundary-artifacts",
|
||||
lockName: "extension-package-boundary-artifacts",
|
||||
});
|
||||
|
||||
try {
|
||||
const result = spawnSync(
|
||||
process.execPath,
|
||||
[path.resolve(repoRoot, "scripts", "prepare-extension-package-boundary-artifacts.mjs")],
|
||||
{
|
||||
cwd: repoRoot,
|
||||
stdio: "inherit",
|
||||
env: process.env,
|
||||
},
|
||||
);
|
||||
|
||||
if (result.error) {
|
||||
throw result.error;
|
||||
}
|
||||
|
||||
if ((result.status ?? 1) !== 0) {
|
||||
process.exit(result.status ?? 1);
|
||||
}
|
||||
} finally {
|
||||
releaseLock();
|
||||
}
|
||||
}
|
||||
|
||||
function writeTempOxlintConfig(repoRoot, configPath) {
|
||||
const config = JSON.parse(fs.readFileSync(path.resolve(repoRoot, ".oxlintrc.json"), "utf8"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user