spock-cli 0.6.0 → 0.10.0

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # spock-cli
2
2
 
3
- Prebuilt native binaries for [`spock`](https://github.com/leostera/spock), a statically typed TLA+ model checker in Rust.
3
+ Prebuilt native binaries for [`spock`](https://github.com/leostera/spock) — a modern, statically typed, natively compiled model checking and proof language.
4
4
 
5
5
  ## Install
6
6
 
@@ -10,7 +10,7 @@ bun add -D spock-cli
10
10
  npm install -D spock-cli
11
11
  ```
12
12
 
13
- No `postinstall` scripts, no `trustedDependencies`, and no Rust toolchain required — platform binaries ship via `optionalDependencies`.
13
+ No `postinstall` scripts, no `trustedDependencies`, no platform subpackages, and no Rust toolchain required — all platform binaries are bundled directly in `spock-cli`.
14
14
 
15
15
  ## Usage
16
16
 
@@ -43,8 +43,8 @@ bun run spock skill # print coding-agent SKILL.md
43
43
 
44
44
  ## Platforms
45
45
 
46
- - macOS arm64 (`@leostera/spock-darwin-arm64`)
47
- - macOS x64 (`@leostera/spock-darwin-x64`)
48
- - Linux x64 (`@leostera/spock-linux-x64`)
49
- - Linux arm64 (`@leostera/spock-linux-arm64`)
50
- - Windows x64 (`@leostera/spock-win32-x64`)
46
+ - macOS arm64 (`darwin-arm64`)
47
+ - macOS x64 (`darwin-x64`)
48
+ - Linux x64 (`linux-x64`, static musl)
49
+ - Linux arm64 (`linux-arm64`, static musl)
50
+ - Windows x64 (`win32-x64`)
package/bin/spock CHANGED
@@ -2,13 +2,15 @@
2
2
  "use strict";
3
3
 
4
4
  const { spawnSync } = require("node:child_process");
5
+ const { existsSync } = require("node:fs");
6
+ const { join } = require("node:path");
5
7
 
6
8
  const PLATFORMS = {
7
- "darwin:arm64": "@leostera/spock-darwin-arm64/bin/spock",
8
- "darwin:x64": "@leostera/spock-darwin-x64/bin/spock",
9
- "linux:x64": "@leostera/spock-linux-x64/bin/spock",
10
- "linux:arm64": "@leostera/spock-linux-arm64/bin/spock",
11
- "win32:x64": "@leostera/spock-win32-x64/bin/spock.exe",
9
+ "darwin:arm64": "darwin-arm64/spock",
10
+ "darwin:x64": "darwin-x64/spock",
11
+ "linux:x64": "linux-x64/spock",
12
+ "linux:arm64": "linux-arm64/spock",
13
+ "win32:x64": "win32-x64/spock.exe",
12
14
  };
13
15
 
14
16
  function resolveBinary() {
@@ -17,8 +19,8 @@ function resolveBinary() {
17
19
  }
18
20
 
19
21
  const key = `${process.platform}:${process.arch}`;
20
- const target = PLATFORMS[key];
21
- if (!target) {
22
+ const rel = PLATFORMS[key];
23
+ if (!rel) {
22
24
  console.error(
23
25
  `spock-cli: no prebuilt binary for ${process.platform}/${process.arch}.\n` +
24
26
  "Install from source with: cargo install spock-cli"
@@ -26,17 +28,15 @@ function resolveBinary() {
26
28
  process.exit(1);
27
29
  }
28
30
 
29
- try {
30
- return require.resolve(target);
31
- } catch {
32
- const pkg = target.slice(0, target.indexOf("/bin/"));
31
+ const bin = join(__dirname, "..", "vendor", rel);
32
+ if (!existsSync(bin)) {
33
33
  console.error(
34
- `spock-cli: platform package ${pkg} is not installed.\n` +
35
- "Make sure optionalDependencies are enabled (do not pass --no-optional),\n" +
36
- "or install directly with: cargo install spock-cli"
34
+ `spock-cli: bundled binary missing at ${bin}.\n` +
35
+ "Reinstall spock-cli or install from source with: cargo install spock-cli"
37
36
  );
38
37
  process.exit(1);
39
38
  }
39
+ return bin;
40
40
  }
41
41
 
42
42
  const bin = resolveBinary();
package/package.json CHANGED
@@ -1,43 +1,37 @@
1
1
  {
2
2
  "name": "spock-cli",
3
- "version": "0.6.0",
4
- "description": "Statically typed TLA+ model checker — discover and check all .spock specs with one command",
3
+ "version": "0.10.0",
4
+ "description": "A modern, statically typed, natively compiled model checking and proof language",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/leostera/spock.git"
8
+ "url": "git+https://github.com/leostera/spock.git",
9
+ "directory": "npm/spock-cli"
9
10
  },
10
- "homepage": "https://github.com/leostera/spock",
11
+ "homepage": "https://github.com/leostera/spock#readme",
11
12
  "bugs": {
12
13
  "url": "https://github.com/leostera/spock/issues"
13
14
  },
14
15
  "keywords": [
15
16
  "spock",
16
- "tla",
17
- "tlaplus",
18
17
  "model-checker",
19
18
  "formal-methods",
20
- "verification"
19
+ "proof",
20
+ "smt",
21
+ "verification",
22
+ "tla",
23
+ "tlaplus"
21
24
  ],
22
25
  "bin": {
23
26
  "spock": "bin/spock"
24
27
  },
25
28
  "files": [
26
29
  "bin",
30
+ "vendor",
27
31
  "README.md",
28
32
  "LICENSE"
29
33
  ],
30
- "optionalDependencies": {
31
- "@leostera/spock-darwin-arm64": "0.6.0",
32
- "@leostera/spock-darwin-x64": "0.6.0",
33
- "@leostera/spock-linux-x64": "0.6.0",
34
- "@leostera/spock-linux-arm64": "0.6.0",
35
- "@leostera/spock-win32-x64": "0.6.0"
36
- },
37
34
  "engines": {
38
35
  "node": ">=18"
39
- },
40
- "publishConfig": {
41
- "access": "public"
42
36
  }
43
37
  }
Binary file
Binary file
Binary file
Binary file
Binary file