@codacy/verity-cli 0.34.0-experimental.dc0010f → 0.34.0-experimental.eb6e5c5

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.
Files changed (2) hide show
  1. package/bin/verity.js +13 -42
  2. package/package.json +1 -1
package/bin/verity.js CHANGED
@@ -17250,10 +17250,10 @@ function readProjectConfigRaw() {
17250
17250
  function readProjectConfig() {
17251
17251
  const cfg = readProjectConfigRaw();
17252
17252
  if (cfg.formal !== "push" || !cfg.path) return cfg;
17253
- const refused2 = formalRefusal(cfg.path);
17254
- if (!refused2) return cfg;
17253
+ const refused = formalRefusal(cfg.path);
17254
+ if (!refused) return cfg;
17255
17255
  const { formal: _dropped, ...rest } = cfg;
17256
- return { ...rest, formal_refused: refused2 };
17256
+ return { ...rest, formal_refused: refused };
17257
17257
  }
17258
17258
  function formalRefusalMessage(reason) {
17259
17259
  switch (reason) {
@@ -24161,9 +24161,9 @@ function registerConfigCommands(program2) {
24161
24161
  process.exit(1);
24162
24162
  }
24163
24163
  writeProjectConfig({ formal: state === "push" ? "push" : void 0 });
24164
- const refused2 = state === "push" ? readProjectConfig().formal_refused : void 0;
24165
- if (refused2) {
24166
- printWarn(`Formal verification at push: still off \u2014 ${formalRefusalMessage(refused2)}`);
24164
+ const refused = state === "push" ? readProjectConfig().formal_refused : void 0;
24165
+ if (refused) {
24166
+ printWarn(`Formal verification at push: still off \u2014 ${formalRefusalMessage(refused)}`);
24167
24167
  return;
24168
24168
  }
24169
24169
  printInfo(state === "push" ? "Formal verification at push: on for this checkout (Lean must be installed \u2014 verity lean status)" : "Formal verification at push: off");
@@ -27073,7 +27073,7 @@ function channelSilence(input) {
27073
27073
  // src/lib/cli-version.ts
27074
27074
  function cliVersion() {
27075
27075
  try {
27076
- return true ? "0.34.0-experimental.dc0010f" : "dev";
27076
+ return true ? "0.34.0-experimental.eb6e5c5" : "dev";
27077
27077
  } catch {
27078
27078
  return "dev";
27079
27079
  }
@@ -35989,35 +35989,10 @@ function runAsync(tc, cwd, args2, timeoutMs) {
35989
35989
  }
35990
35990
  var DEFAULT_BUILD_TIMEOUT_MS = 10 * 6e4;
35991
35991
  var DEFAULT_CHECK_TIMEOUT_MS = 12e4;
35992
- function proofsWorkspaceProblem(root) {
35993
- for (const rel of [".verity", PROOFS_DIR, `${PROOFS_DIR}/.lake`]) {
35994
- let st;
35995
- try {
35996
- st = (0, import_node_fs58.lstatSync)((0, import_node_path43.join)(root, rel));
35997
- } catch {
35998
- break;
35999
- }
36000
- if (st.isSymbolicLink()) return `${rel} is a symlink; Lean is not run through it`;
36001
- }
36002
- const r = runGitSync(root, ["ls-files", "-z", "--", PROOFS_DIR], { timeoutMs: 5e3 });
36003
- if (!r.ok) return `could not confirm with git that ${PROOFS_DIR} holds no committed files; Lean is not run`;
36004
- const tracked = r.stdout.split("\0").filter(Boolean);
36005
- if (tracked.length > 0) {
36006
- return `${tracked.length} file(s) under ${PROOFS_DIR} are tracked in git (e.g. ${tracked[0]}); Lean is not run on a workspace the repository supplies \u2014 untrack them with: git rm -r --cached ${PROOFS_DIR}`;
36007
- }
36008
- return null;
36009
- }
36010
- function refused(problem) {
36011
- return { ok: false, stdout: "", stderr: problem, durationMs: 0, timedOut: false };
36012
- }
36013
35992
  function buildLibrary(tc, root, timeoutMs = DEFAULT_BUILD_TIMEOUT_MS) {
36014
- const problem = proofsWorkspaceProblem(root);
36015
- if (problem) return refused(problem);
36016
35993
  return run2(tc, (0, import_node_path43.join)(root, PROOFS_DIR), ["build"], timeoutMs);
36017
35994
  }
36018
- async function buildLibraryAsync(tc, root, timeoutMs = DEFAULT_BUILD_TIMEOUT_MS) {
36019
- const problem = proofsWorkspaceProblem(root);
36020
- if (problem) return refused(problem);
35995
+ function buildLibraryAsync(tc, root, timeoutMs = DEFAULT_BUILD_TIMEOUT_MS) {
36021
35996
  return runAsync(tc, (0, import_node_path43.join)(root, PROOFS_DIR), ["build"], timeoutMs);
36022
35997
  }
36023
35998
  function isModelInRoot(modelsAbs, rel) {
@@ -36044,15 +36019,13 @@ function trimDiagnostics(text) {
36044
36019
  function checkModel(tc, root, modelFile, opts = {}) {
36045
36020
  const proofsAbs = (0, import_node_path43.join)(root, PROOFS_DIR);
36046
36021
  const rel = (0, import_node_path43.relative)(proofsAbs, modelFile);
36047
- const problem = proofsWorkspaceProblem(root);
36048
- const res = problem ? refused(problem) : run2(tc, proofsAbs, ["env", "lean", rel], opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS);
36022
+ const res = run2(tc, proofsAbs, ["env", "lean", rel], opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS);
36049
36023
  return toReport(res, root, modelFile, opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS);
36050
36024
  }
36051
36025
  async function checkModelAsync(tc, root, modelFile, opts = {}) {
36052
36026
  const proofsAbs = (0, import_node_path43.join)(root, PROOFS_DIR);
36053
36027
  const rel = (0, import_node_path43.relative)(proofsAbs, modelFile);
36054
- const problem = proofsWorkspaceProblem(root);
36055
- const res = problem ? refused(problem) : await runAsync(tc, proofsAbs, ["env", "lean", rel], opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS);
36028
+ const res = await runAsync(tc, proofsAbs, ["env", "lean", rel], opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS);
36056
36029
  return toReport(res, root, modelFile, opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS);
36057
36030
  }
36058
36031
  function toReport(res, root, modelFile, timeoutMs) {
@@ -36872,8 +36845,6 @@ async function prepareFormalPhase(root, env = process.env, auth2, readSource, co
36872
36845
  const apiKey = direct ? env.OPENAI_API_KEY : void 0;
36873
36846
  const toolchain = findToolchain(env);
36874
36847
  if (!toolchain) return { ok: false, skip: "no-toolchain" };
36875
- const untrusted = proofsWorkspaceProblem(root);
36876
- if (untrusted) return { ok: false, skip: "workspace-untrusted", detail: untrusted.slice(0, 200) };
36877
36848
  try {
36878
36849
  scaffoldProofs(root);
36879
36850
  } catch (err2) {
@@ -39901,7 +39872,7 @@ function registerInitCommand(program2) {
39901
39872
  ...telemetryChoice ? { telemetry: telemetryChoice } : {},
39902
39873
  init: {
39903
39874
  completed_at: (/* @__PURE__ */ new Date()).toISOString(),
39904
- cli_version: true ? "0.34.0-experimental.dc0010f" : "dev"
39875
+ cli_version: true ? "0.34.0-experimental.eb6e5c5" : "dev"
39905
39876
  }
39906
39877
  });
39907
39878
  } catch (err2) {
@@ -41374,8 +41345,8 @@ function registerLeanCommand(program2) {
41374
41345
  }
41375
41346
 
41376
41347
  // src/cli.ts
41377
- program.name("verity").description("CLI for Verity quality gate service").version("0.34.0-experimental.dc0010f").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr").hook("preAction", async (_thisCommand, actionCommand) => {
41378
- installStderrLog(actionCommand.name(), process.argv.slice(2), "0.34.0-experimental.dc0010f");
41348
+ program.name("verity").description("CLI for Verity quality gate service").version("0.34.0-experimental.eb6e5c5").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr").hook("preAction", async (_thisCommand, actionCommand) => {
41349
+ installStderrLog(actionCommand.name(), process.argv.slice(2), "0.34.0-experimental.eb6e5c5");
41379
41350
  setUserNamedServiceUrl(program.opts().serviceUrl);
41380
41351
  try {
41381
41352
  await foldLegacyLocalCredential();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/verity-cli",
3
- "version": "0.34.0-experimental.dc0010f",
3
+ "version": "0.34.0-experimental.eb6e5c5",
4
4
  "description": "CLI for Verity quality gate service",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://verity.md",