lemmascript 0.5.9 → 0.5.10

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/package.json +2 -1
  2. package/tools/dist/lsc.js +17 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lemmascript",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "A verification toolchain for TypeScript — generates Lean 4 or Dafny from annotated TS",
5
5
  "type": "module",
6
6
  "engines": {
@@ -19,6 +19,7 @@
19
19
  "typecheck:examples": "tsc -p examples/tsconfig.json"
20
20
  },
21
21
  "dependencies": {
22
+ "lemmascript-claimcheck": "^0.2.0",
22
23
  "ts-morph": "^25.0.0"
23
24
  },
24
25
  "devDependencies": {
package/tools/dist/lsc.js CHANGED
@@ -20,6 +20,22 @@ import { leanGen, leanCheck } from "./lean-commands.js";
20
20
  import { runInfo } from "./info-command.js";
21
21
  function main() {
22
22
  const args = process.argv.slice(2);
23
+ // `lsc claimcheck …` forwards verbatim to the lemmascript-claimcheck CLI
24
+ // (a dependency; its cli reads the rewritten process.argv).
25
+ if (args[0] === "claimcheck") {
26
+ process.argv = [process.argv[0], "lemmascript-claimcheck", ...args.slice(1)];
27
+ import("lemmascript-claimcheck/cli").catch((err) => {
28
+ const code = err?.code;
29
+ if (code === "ERR_MODULE_NOT_FOUND" || code === "ERR_PACKAGE_PATH_NOT_EXPORTED") {
30
+ console.error("`lsc claimcheck` needs lemmascript-claimcheck >= 0.2.0; reinstall with: npm i -g lemmascript");
31
+ }
32
+ else {
33
+ console.error(err instanceof Error ? err.message : String(err));
34
+ }
35
+ process.exit(1);
36
+ });
37
+ return;
38
+ }
23
39
  const backendIdx = args.findIndex(a => a.startsWith("--backend="));
24
40
  let backend = "dafny";
25
41
  if (backendIdx >= 0) {
@@ -46,6 +62,7 @@ function main() {
46
62
  const [cmd, filePath] = args;
47
63
  if (!cmd || !filePath) {
48
64
  console.error("Usage: lsc <gen|check|regen|extract|info> [--backend=lean|dafny] <file.ts>");
65
+ console.error(" lsc claimcheck <file.ts> [flags…] (forwards to lemmascript-claimcheck)");
49
66
  process.exit(1);
50
67
  }
51
68
  const absPath = path.resolve(filePath);