@tscircuit/eval 0.0.301 → 0.0.302
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/dist/blob-url.js +1 -1
- package/dist/eval/index.js +2 -3
- package/dist/lib/index.js +2 -3
- package/dist/webworker/entrypoint.js +352 -352
- package/package.json +6 -6
- package/tests/features/enable-debug.test.ts +11 -18
- package/webworker/execution-context.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/eval",
|
|
3
3
|
"main": "dist/lib/index.js",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.302",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "bun run build:lib && bun run build:webworker && bun run build:blob-url && bun run build:runner && bun run build:worker-wrapper",
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
"@babel/standalone": "^7.28.0",
|
|
54
54
|
"@biomejs/biome": "^1.8.3",
|
|
55
55
|
"@playwright/test": "^1.50.1",
|
|
56
|
-
"@tscircuit/capacity-autorouter": "^0.0.
|
|
56
|
+
"@tscircuit/capacity-autorouter": "^0.0.107",
|
|
57
57
|
"@tscircuit/checks": "^0.0.71",
|
|
58
58
|
"@tscircuit/circuit-json-flex": "^0.0.3",
|
|
59
59
|
"@tscircuit/circuit-json-util": "^0.0.67",
|
|
60
|
-
"@tscircuit/core": "^0.0.
|
|
61
|
-
"@tscircuit/footprinter": "^0.0.
|
|
60
|
+
"@tscircuit/core": "^0.0.704",
|
|
61
|
+
"@tscircuit/footprinter": "^0.0.236",
|
|
62
62
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
63
63
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
64
64
|
"@tscircuit/layout": "^0.0.28",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@tscircuit/props": "0.0.298",
|
|
71
71
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
72
72
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
73
|
-
"@tscircuit/schematic-trace-solver": "^0.0.
|
|
73
|
+
"@tscircuit/schematic-trace-solver": "^0.0.35",
|
|
74
74
|
"@tscircuit/simple-3d-svg": "^0.0.38",
|
|
75
75
|
"@types/babel__standalone": "^7.1.9",
|
|
76
76
|
"@types/bun": "^1.2.16",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@types/react-reconciler": "^0.28.9",
|
|
81
81
|
"bpc-graph": "^0.0.57",
|
|
82
82
|
"bun-match-svg": "0.0.12",
|
|
83
|
-
"calculate-elbow": "^0.0.
|
|
83
|
+
"calculate-elbow": "^0.0.12",
|
|
84
84
|
"chokidar-cli": "^3.0.0",
|
|
85
85
|
"circuit-json": "^0.0.245",
|
|
86
86
|
"circuit-json-to-bpc": "^0.0.13",
|
|
@@ -3,20 +3,6 @@ import { CircuitRunner } from "lib/runner/CircuitRunner"
|
|
|
3
3
|
import { createCircuitWebWorker } from "lib"
|
|
4
4
|
import { repoFileUrl } from "tests/fixtures/resourcePaths"
|
|
5
5
|
|
|
6
|
-
// enableDebug should cause the circuit to emit debug:logOutput events
|
|
7
|
-
|
|
8
|
-
test("CircuitRunner emits debug log", async () => {
|
|
9
|
-
const runner = new CircuitRunner()
|
|
10
|
-
const logs: any[] = []
|
|
11
|
-
runner.on("debug:logOutput", (output) => {
|
|
12
|
-
logs.push(output)
|
|
13
|
-
})
|
|
14
|
-
await runner.enableDebug("Group_doInitialPcbTraceRender")
|
|
15
|
-
await runner.execute("circuit.emit('debug:logOutput', 'hi')")
|
|
16
|
-
expect(logs).toContain("hi")
|
|
17
|
-
await runner.kill()
|
|
18
|
-
})
|
|
19
|
-
|
|
20
6
|
test("CircuitWebWorker emits debug log", async () => {
|
|
21
7
|
const worker = await createCircuitWebWorker({
|
|
22
8
|
webWorkerUrl: repoFileUrl("dist/webworker/entrypoint.js").href,
|
|
@@ -25,9 +11,16 @@ test("CircuitWebWorker emits debug log", async () => {
|
|
|
25
11
|
worker.on("debug:logOutput", (output) => {
|
|
26
12
|
logs.push(output)
|
|
27
13
|
})
|
|
28
|
-
await worker.enableDebug("
|
|
29
|
-
await worker.execute(
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
await worker.enableDebug("Group_doInitialSchematicTraceRender")
|
|
15
|
+
await worker.execute(`
|
|
16
|
+
circuit.add(<board>
|
|
17
|
+
<resistor name="R1" resistance="1k" footprint="0402" schX={-2} />
|
|
18
|
+
<resistor name="R2" resistance="1k" footprint="0402" connections={{ pin1: "R1.pin1" }} schX={2} />
|
|
19
|
+
</board>)
|
|
20
|
+
`)
|
|
21
|
+
|
|
22
|
+
await worker.renderUntilSettled()
|
|
23
|
+
|
|
24
|
+
expect(logs).toHaveLength(1)
|
|
32
25
|
await worker.kill()
|
|
33
26
|
})
|