@tscircuit/cli 0.0.179 → 0.0.181
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/.github/workflows/test.yml +2 -1
- package/bun.lockb +0 -0
- package/cli/lib/cmd-fns/dev/soupify-and-upload-example-file.ts +1 -1
- package/cli/lib/cmd-fns/soupify.ts +2 -2
- package/cli/lib/get-program.ts +2 -2
- package/cli/tests/soupify-builder.test.ts +3 -3
- package/cli/tests/soupify-core.test.ts +1 -1
- package/dist/cli.js +12 -11
- package/example-project/examples/basic-chip.tsx +2 -1
- package/example-project/src/MyCircuit.tsx +2 -2
- package/example-project/src/manual-edits.ts +4 -4
- package/package.json +4 -3
|
@@ -11,6 +11,7 @@ on:
|
|
|
11
11
|
jobs:
|
|
12
12
|
tests:
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
|
+
timeout-minutes: 5
|
|
14
15
|
|
|
15
16
|
steps:
|
|
16
17
|
- name: Checkout code
|
|
@@ -24,7 +25,7 @@ jobs:
|
|
|
24
25
|
- name: Install dependencies
|
|
25
26
|
run: bun install
|
|
26
27
|
|
|
27
|
-
- name:
|
|
28
|
+
- name: Build
|
|
28
29
|
run: bun run build
|
|
29
30
|
|
|
30
31
|
- name: Run tests
|
package/bun.lockb
CHANGED
|
Binary file
|
|
@@ -11,7 +11,7 @@ export const soupifyCmd = async (ctx: AppContext, args: any) => {
|
|
|
11
11
|
file: z.string(),
|
|
12
12
|
export: z.string().optional(),
|
|
13
13
|
output: z.string().optional(),
|
|
14
|
-
|
|
14
|
+
noCore: z.boolean().optional(),
|
|
15
15
|
})
|
|
16
16
|
.parse(args)
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ export const soupifyCmd = async (ctx: AppContext, args: any) => {
|
|
|
19
19
|
{
|
|
20
20
|
filePath: params.file,
|
|
21
21
|
exportName: params.export,
|
|
22
|
-
useCore: params.
|
|
22
|
+
useCore: !params.noCore,
|
|
23
23
|
},
|
|
24
24
|
ctx,
|
|
25
25
|
)
|
package/cli/lib/get-program.ts
CHANGED
|
@@ -12,7 +12,7 @@ export const getProgram = (ctx: AppContext) => {
|
|
|
12
12
|
.description("Run development server in current directory")
|
|
13
13
|
.option("--cwd <cwd>", "Current working directory")
|
|
14
14
|
.option("--port <port>", "Port to run dev server on")
|
|
15
|
-
.option("--core", "Use @tscircuit/core beta")
|
|
15
|
+
.option("--no-core", "Use @tscircuit/core beta", false)
|
|
16
16
|
.option("--no-cleanup", "Don't cleanup temporary files (for debugging)")
|
|
17
17
|
.action((args) => CMDFN.dev(ctx, args))
|
|
18
18
|
|
|
@@ -294,7 +294,7 @@ export const getProgram = (ctx: AppContext) => {
|
|
|
294
294
|
.description("Convert an example file to tscircuit soup")
|
|
295
295
|
.requiredOption("--file <file>", "Input example files")
|
|
296
296
|
.option("--output <output.json>", "Output file")
|
|
297
|
-
.option("--core", "Use @tscircuit/core to build (future version)")
|
|
297
|
+
.option("--no-core", "Use @tscircuit/core to build (future version)", false)
|
|
298
298
|
.option(
|
|
299
299
|
"--export <export_name>",
|
|
300
300
|
"Name of export to soupify, if not specified, soupify the default/only export",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { test, expect, describe } from "bun:test"
|
|
2
2
|
import { $ } from "bun"
|
|
3
3
|
|
|
4
|
-
test("soupify (builder)", async () => {
|
|
4
|
+
test.skip("soupify (builder)", async () => {
|
|
5
5
|
const result =
|
|
6
|
-
await $`bun cli/cli.ts soupify -y --file ./example-project/examples/basic-chip.tsx`.text()
|
|
6
|
+
await $`bun cli/cli.ts soupify -y --no-core --file ./example-project/examples/basic-chip.tsx`.text()
|
|
7
7
|
|
|
8
|
-
expect(result).toContain("
|
|
8
|
+
expect(result).toContain("10000")
|
|
9
9
|
})
|
|
@@ -3,7 +3,7 @@ import { $ } from "bun"
|
|
|
3
3
|
|
|
4
4
|
test("soupify (core)", async () => {
|
|
5
5
|
const result =
|
|
6
|
-
await $`bun cli/cli.ts soupify
|
|
6
|
+
await $`bun cli/cli.ts soupify -y --file ./example-project/examples/basic-chip.tsx`.text()
|
|
7
7
|
|
|
8
8
|
expect(result).toContain("10000") // R1 resistor value
|
|
9
9
|
})
|