@tscircuit/cli 0.1.193 → 0.1.195

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.
Files changed (2) hide show
  1. package/dist/main.js +14 -6
  2. package/package.json +2 -3
package/dist/main.js CHANGED
@@ -68081,7 +68081,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
68081
68081
  import { execSync as execSync2 } from "node:child_process";
68082
68082
  var import_semver2 = __toESM2(require_semver2(), 1);
68083
68083
  // package.json
68084
- var version = "0.1.192";
68084
+ var version = "0.1.194";
68085
68085
  var package_default = {
68086
68086
  name: "@tscircuit/cli",
68087
68087
  version,
@@ -68107,7 +68107,6 @@ var package_default = {
68107
68107
  "bun-match-svg": "^0.0.12",
68108
68108
  chokidar: "4.0.1",
68109
68109
  "circuit-json-to-readable-netlist": "^0.0.13",
68110
- "circuit-json-to-simple-3d": "^0.0.5",
68111
68110
  commander: "^14.0.0",
68112
68111
  conf: "^13.1.0",
68113
68112
  configstore: "^7.0.0",
@@ -68128,7 +68127,7 @@ var package_default = {
68128
68127
  redaxios: "^0.5.1",
68129
68128
  semver: "^7.6.3",
68130
68129
  tempy: "^3.1.0",
68131
- tscircuit: "^0.0.559-libonly",
68130
+ tscircuit: "^0.0.574-libonly",
68132
68131
  tsx: "^4.7.1",
68133
68132
  "typed-ky": "^0.0.4",
68134
68133
  zod: "3"
@@ -77996,7 +77995,16 @@ var snapshotProject = async ({
77996
77995
  ...DEFAULT_IGNORED_PATTERNS,
77997
77996
  ...ignored.map(normalizeIgnorePattern)
77998
77997
  ];
77999
- const boardFiles = filePaths.length > 0 ? filePaths.map((f) => path27.resolve(projectDir, f)) : globbySync(["**/*.board.tsx", "**/*.circuit.tsx"], {
77998
+ const resolvedPaths = filePaths.map((f) => path27.resolve(projectDir, f));
77999
+ const boardFiles = resolvedPaths.length > 0 ? resolvedPaths.flatMap((p) => {
78000
+ if (fs28.existsSync(p) && fs28.statSync(p).isDirectory()) {
78001
+ return globbySync(["**/*.board.tsx", "**/*.circuit.tsx"], {
78002
+ cwd: p,
78003
+ ignore
78004
+ }).map((f) => path27.join(p, f));
78005
+ }
78006
+ return [p];
78007
+ }) : globbySync(["**/*.board.tsx", "**/*.circuit.tsx"], {
78000
78008
  cwd: projectDir,
78001
78009
  ignore
78002
78010
  }).map((f) => path27.join(projectDir, f));
@@ -78073,14 +78081,14 @@ Run with --update to fix.`);
78073
78081
 
78074
78082
  // cli/snapshot/register.ts
78075
78083
  var registerSnapshot = (program3) => {
78076
- program3.command("snapshot").argument("[file]", "Path to the board or circuit file").description("Generate schematic and PCB snapshots (add --3d for 3d preview)").option("-u, --update", "Update snapshots on disk").option("--force-update", "Force update snapshots even if they match").option("--3d", "Generate 3d preview snapshots").option("--pcb-only", "Generate only PCB snapshots").option("--schematic-only", "Generate only schematic snapshots").action(async (file, options) => {
78084
+ program3.command("snapshot").argument("[path]", "Path to the board, circuit file, or directory containing them").description("Generate schematic and PCB snapshots (add --3d for 3d preview)").option("-u, --update", "Update snapshots on disk").option("--force-update", "Force update snapshots even if they match").option("--3d", "Generate 3d preview snapshots").option("--pcb-only", "Generate only PCB snapshots").option("--schematic-only", "Generate only schematic snapshots").action(async (target, options) => {
78077
78085
  await snapshotProject({
78078
78086
  update: options.update ?? false,
78079
78087
  threeD: options["3d"] ?? false,
78080
78088
  pcbOnly: options.pcbOnly ?? false,
78081
78089
  schematicOnly: options.schematicOnly ?? false,
78082
78090
  forceUpdate: options.forceUpdate ?? false,
78083
- filePaths: file ? [file] : [],
78091
+ filePaths: target ? [target] : [],
78084
78092
  onExit: (code) => process.exit(code),
78085
78093
  onError: (msg) => console.error(msg),
78086
78094
  onSuccess: (msg) => console.log(msg)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.193",
3
+ "version": "0.1.195",
4
4
  "main": "dist/main.js",
5
5
  "devDependencies": {
6
6
  "@babel/standalone": "^7.26.9",
@@ -23,7 +23,6 @@
23
23
  "bun-match-svg": "^0.0.12",
24
24
  "chokidar": "4.0.1",
25
25
  "circuit-json-to-readable-netlist": "^0.0.13",
26
- "circuit-json-to-simple-3d": "^0.0.5",
27
26
  "commander": "^14.0.0",
28
27
  "conf": "^13.1.0",
29
28
  "configstore": "^7.0.0",
@@ -44,7 +43,7 @@
44
43
  "redaxios": "^0.5.1",
45
44
  "semver": "^7.6.3",
46
45
  "tempy": "^3.1.0",
47
- "tscircuit": "^0.0.559-libonly",
46
+ "tscircuit": "^0.0.574-libonly",
48
47
  "tsx": "^4.7.1",
49
48
  "typed-ky": "^0.0.4",
50
49
  "zod": "3"