@tscircuit/cli 0.1.194 → 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.
- package/dist/main.js +13 -4
- package/package.json +1 -1
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.
|
|
68084
|
+
var version = "0.1.194";
|
|
68085
68085
|
var package_default = {
|
|
68086
68086
|
name: "@tscircuit/cli",
|
|
68087
68087
|
version,
|
|
@@ -77995,7 +77995,16 @@ var snapshotProject = async ({
|
|
|
77995
77995
|
...DEFAULT_IGNORED_PATTERNS,
|
|
77996
77996
|
...ignored.map(normalizeIgnorePattern)
|
|
77997
77997
|
];
|
|
77998
|
-
const
|
|
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"], {
|
|
77999
78008
|
cwd: projectDir,
|
|
78000
78009
|
ignore
|
|
78001
78010
|
}).map((f) => path27.join(projectDir, f));
|
|
@@ -78072,14 +78081,14 @@ Run with --update to fix.`);
|
|
|
78072
78081
|
|
|
78073
78082
|
// cli/snapshot/register.ts
|
|
78074
78083
|
var registerSnapshot = (program3) => {
|
|
78075
|
-
program3.command("snapshot").argument("[
|
|
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) => {
|
|
78076
78085
|
await snapshotProject({
|
|
78077
78086
|
update: options.update ?? false,
|
|
78078
78087
|
threeD: options["3d"] ?? false,
|
|
78079
78088
|
pcbOnly: options.pcbOnly ?? false,
|
|
78080
78089
|
schematicOnly: options.schematicOnly ?? false,
|
|
78081
78090
|
forceUpdate: options.forceUpdate ?? false,
|
|
78082
|
-
filePaths:
|
|
78091
|
+
filePaths: target ? [target] : [],
|
|
78083
78092
|
onExit: (code) => process.exit(code),
|
|
78084
78093
|
onError: (msg) => console.error(msg),
|
|
78085
78094
|
onSuccess: (msg) => console.log(msg)
|