Add local approval rules workspace and offline linting
This commit is contained in:
1 parent
39bbf4d7c0
commit
13ed555bbb
5 files changed
+561
-4
No files matched your search
@@ -3,6 +3,7 @@
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { createSealClient } from "../core/http/factory.js";
|
||||
import type { CorpConfig } from "../core/config/types.js";
|
||||
import { VERSION } from "../version.js";
|
||||
import { handleApprovalRunsCommand } from "./commands/approval-runs.js";
|
||||
import { handleAuthCommand } from "./commands/auth.js";
|
||||
@@ -248,6 +249,21 @@ async function dispatch(argv: string[], runtime: CliRuntime) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (area === "rules" && action === "lint" && ("file" in args.options || "f" in args.options)) {
|
||||
let corp: CorpConfig;
|
||||
try {
|
||||
corp = selectCorp(stringOption(args.options.corp));
|
||||
} catch {
|
||||
corp = {
|
||||
id: "local",
|
||||
name: "Local Workspace",
|
||||
source: { type: "native" }
|
||||
} as any;
|
||||
}
|
||||
await handleRulesCommand(action, maybeName, null as any, corp, args);
|
||||
return;
|
||||
}
|
||||
|
||||
const corp = selectCorp(stringOption(args.options.corp));
|
||||
|
||||
if (area === "source") {
|
||||
|
||||
Reference in new issue
Block a user