tscircuit 0.0.2768-libonly → 0.0.2769

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/cli.mjs ADDED
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env bun
2
+
3
+ import { createRequire } from "node:module";
4
+ import { existsSync } from "node:fs";
5
+ import { dirname, join } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ const require = createRequire(import.meta.url);
9
+
10
+ // Use require to import package.json
11
+ const packageJson = require("./package.json");
12
+ global.TSCIRCUIT_VERSION = packageJson.version;
13
+
14
+ // Expose the runframe + eval bundle shipped by this tscircuit version (the one
15
+ // that provides the `tsci` binary) so `tsci dev` can use it when the project has
16
+ // no local tscircuit installed. The CLI prefers a project-local tscircuit over
17
+ // this, and an explicit RUNFRAME_STANDALONE_FILE_PATH over both.
18
+ if (!process.env.TSCIRCUIT_GLOBAL_STANDALONE_FILE_PATH) {
19
+ const browserBundlePath = join(
20
+ dirname(fileURLToPath(import.meta.url)),
21
+ "dist",
22
+ "browser.min.js",
23
+ );
24
+ if (existsSync(browserBundlePath)) {
25
+ process.env.TSCIRCUIT_GLOBAL_STANDALONE_FILE_PATH = browserBundlePath;
26
+ }
27
+ }
28
+
29
+ async function main() {
30
+ await import("@tscircuit/cli");
31
+ }
32
+
33
+ main();
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/browser.min.js
3
- size: 37001712 bytes
4
- sha256: 2ef6f46bea6bdefd0cedc70c46404c2fcc56917cfbe75e9381ebe86880194361
3
+ size: 36982084 bytes
4
+ sha256: 0ed677b41a83f0b4486f804c157eb6ae2a44c9c5e5c3d8857bbfe7ea96b56845
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "dist/index.js",
4
4
  "types": "dist/index.d.ts",
5
5
  "type": "module",
6
- "version": "0.0.2768-libonly",
6
+ "version": "0.0.2769",
7
7
  "license": "MIT",
8
8
  "repository": {
9
9
  "type": "git",
@@ -11,6 +11,7 @@
11
11
  },
12
12
  "files": [
13
13
  "dist",
14
+ "cli.mjs",
14
15
  "globals.d.ts"
15
16
  ],
16
17
  "scripts": {
@@ -29,6 +30,10 @@
29
30
  },
30
31
  "./browser": "./dist/browser.min.js"
31
32
  },
33
+ "bin": {
34
+ "tsci": "cli.mjs",
35
+ "tscircuit": "cli.mjs"
36
+ },
32
37
  "devDependencies": {
33
38
  "@types/bun": "^1.2.16",
34
39
  "esbuild": "^0.20.2",
@@ -50,6 +55,7 @@
50
55
  "@tscircuit/capacity-autorouter": "^0.0.958",
51
56
  "@tscircuit/checks": "^0.0.242",
52
57
  "@tscircuit/circuit-json-util": "^0.0.119",
58
+ "@tscircuit/cli": "^0.1.2264",
53
59
  "@tscircuit/copper-pour-solver": "^0.0.67",
54
60
  "@tscircuit/core": "^0.0.2110",
55
61
  "@tscircuit/create-fdm-enclosure": "0.0.4",
@@ -67,7 +73,7 @@
67
73
  "@tscircuit/modelprinter": "^0.0.11",
68
74
  "@tscircuit/ngspice-spice-engine": "^0.0.20",
69
75
  "@tscircuit/props": "^0.0.696",
70
- "@tscircuit/runframe": "^0.0.2931",
76
+ "@tscircuit/runframe": "^0.0.2932",
71
77
  "@tscircuit/schematic-match-adapt": "^0.0.18",
72
78
  "@tscircuit/simple-3d-svg": "^0.0.41",
73
79
  "@tscircuit/solver-utils": "^0.0.16",
@@ -114,4 +120,4 @@
114
120
  "tslib": "^2.8.1",
115
121
  "zod": "^3.25.67"
116
122
  }
117
- }
123
+ }