@tscircuit/cli 0.1.43-dev.3 → 0.1.43

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/bun.lock CHANGED
@@ -2,18 +2,10 @@
2
2
  "lockfileVersion": 1,
3
3
  "workspaces": {
4
4
  "": {
5
- "devDependencies": {
6
- "@babel/standalone": "^7.26.9",
7
- "@biomejs/biome": "^1.9.4",
8
- "@tscircuit/core": "^0.0.249",
5
+ "dependencies": {
9
6
  "@tscircuit/eval": "^0.0.96",
10
- "@tscircuit/fake-snippets": "^0.0.6",
11
7
  "@tscircuit/file-server": "^0.0.13",
12
8
  "@tscircuit/runframe": "^0.0.167",
13
- "@types/bun": "^1.1.15",
14
- "@types/configstore": "^6.0.2",
15
- "@types/react": "^19.0.8",
16
- "@types/semver": "^7.5.8",
17
9
  "bun-match-svg": "^0.0.9",
18
10
  "chokidar": "4.0.1",
19
11
  "circuit-json-to-readable-netlist": "^0.0.8",
@@ -23,13 +15,22 @@
23
15
  "cosmiconfig": "^9.0.0",
24
16
  "delay": "^6.0.0",
25
17
  "dsn-converter": "^0.0.63",
26
- "get-port": "^7.1.0",
27
18
  "jwt-decode": "^4.0.0",
28
19
  "ky": "^1.7.4",
29
20
  "make-vfs": "^1.0.15",
30
21
  "perfect-cli": "^1.0.20",
31
22
  "redaxios": "^0.5.1",
32
23
  "semver": "^7.6.3",
24
+ },
25
+ "devDependencies": {
26
+ "@biomejs/biome": "^1.9.4",
27
+ "@tscircuit/core": "^0.0.249",
28
+ "@tscircuit/fake-snippets": "^0.0.6",
29
+ "@types/bun": "^1.1.15",
30
+ "@types/configstore": "^6.0.2",
31
+ "@types/react": "^19.0.8",
32
+ "@types/semver": "^7.5.8",
33
+ "get-port": "^7.1.0",
33
34
  "tempy": "^3.1.0",
34
35
  "tsup": "^8.3.5",
35
36
  "typed-ky": "^0.0.4",
@@ -104,8 +105,6 @@
104
105
 
105
106
  "@babel/runtime": ["@babel/runtime@7.26.9", "", { "dependencies": { "regenerator-runtime": "^0.14.0" } }, "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg=="],
106
107
 
107
- "@babel/standalone": ["@babel/standalone@7.26.9", "", {}, "sha512-UTeQKy0kzJwWRe55kT1uK4G9H6D0lS6G4207hCU/bDaOhA5t2aC0qHN6GmID0Axv3OFLNXm27NdqcWp+BXcGtA=="],
108
-
109
108
  "@babel/template": ["@babel/template@7.26.9", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "@babel/parser": "^7.26.9", "@babel/types": "^7.26.9" } }, "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA=="],
110
109
 
111
110
  "@babel/traverse": ["@babel/traverse@7.26.9", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "@babel/generator": "^7.26.9", "@babel/parser": "^7.26.9", "@babel/template": "^7.26.9", "@babel/types": "^7.26.9", "debug": "^4.3.1", "globals": "^11.1.0" } }, "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg=="],
@@ -1,5 +1,6 @@
1
1
  import type { Command } from "commander"
2
- import { CircuitRunner } from "@tscircuit/eval/eval"
2
+ import { createCircuitWebWorker } from "@tscircuit/eval"
3
+ import webWorkerBundleUrl from "@tscircuit/eval/blob-url"
3
4
  import { getVirtualFileSystemFromDirPath } from "make-vfs"
4
5
  import path from "node:path"
5
6
  import fs from "node:fs"
@@ -54,13 +55,15 @@ export const registerExport = (program: Command) => {
54
55
  output = path.basename(file).replace(/\.[^.]+$/, "")
55
56
  }
56
57
 
57
- const runner = new CircuitRunner()
58
+ const worker = await createCircuitWebWorker({
59
+ webWorkerUrl: webWorkerBundleUrl,
60
+ })
58
61
 
59
62
  const projectDir = path.dirname(file)
60
63
 
61
64
  const relativeComponentPath = path.relative(projectDir, file)
62
65
 
63
- await runner.executeWithFsMap({
66
+ await worker.executeWithFsMap({
64
67
  entrypoint: "entrypoint.tsx",
65
68
  fsMap: {
66
69
  ...((await getVirtualFileSystemFromDirPath({
@@ -75,9 +78,9 @@ circuit.add(<MyCircuit />)
75
78
  },
76
79
  })
77
80
 
78
- await runner.renderUntilSettled()
81
+ await worker.renderUntilSettled()
79
82
 
80
- const circuitJson = await runner.getCircuitJson()
83
+ const circuitJson = await worker.getCircuitJson()
81
84
  const outputPath = path.join(
82
85
  projectDir,
83
86
  `${output}${OUTPUT_EXTENSIONS[format as Format]}`,