@tscircuit/cli 0.1.1136 → 0.1.1137
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/cli/main.js
CHANGED
|
@@ -101451,6 +101451,11 @@ import * as path15 from "node:path";
|
|
|
101451
101451
|
|
|
101452
101452
|
// lib/project-config/project-config-schema.ts
|
|
101453
101453
|
import { z } from "zod";
|
|
101454
|
+
var pcbSnapshotSettingsSchema = z.object({
|
|
101455
|
+
showCourtyards: z.boolean().optional(),
|
|
101456
|
+
showPcbNotes: z.boolean().optional(),
|
|
101457
|
+
showFabricationNotes: z.boolean().optional()
|
|
101458
|
+
});
|
|
101454
101459
|
var projectConfigSchema = z.object({
|
|
101455
101460
|
mainEntrypoint: z.string().optional(),
|
|
101456
101461
|
libraryEntrypoint: z.string().optional(),
|
|
@@ -101459,6 +101464,7 @@ var projectConfigSchema = z.object({
|
|
|
101459
101464
|
ignoredFiles: z.array(z.string()).optional(),
|
|
101460
101465
|
includeBoardFiles: z.array(z.string()).optional(),
|
|
101461
101466
|
snapshotsDir: z.string().optional(),
|
|
101467
|
+
pcbSnapshotSettings: pcbSnapshotSettingsSchema.optional(),
|
|
101462
101468
|
prebuildCommand: z.string().optional(),
|
|
101463
101469
|
buildCommand: z.string().optional(),
|
|
101464
101470
|
kicadProjectEntrypointPath: z.string().optional(),
|
|
@@ -222399,6 +222405,7 @@ var snapshotFilesWithWorkerPool = async (options) => {
|
|
|
222399
222405
|
schematicOnly: job.options.schematicOnly,
|
|
222400
222406
|
forceUpdate: job.options.forceUpdate,
|
|
222401
222407
|
platformConfig: job.options.platformConfig,
|
|
222408
|
+
pcbSnapshotSettings: job.options.pcbSnapshotSettings,
|
|
222402
222409
|
createDiff: job.options.createDiff,
|
|
222403
222410
|
cameraPreset: job.options.cameraPreset
|
|
222404
222411
|
}
|
|
@@ -222493,6 +222500,7 @@ var processSnapshotFile = async ({
|
|
|
222493
222500
|
schematicOnly,
|
|
222494
222501
|
forceUpdate,
|
|
222495
222502
|
platformConfig: platformConfig2,
|
|
222503
|
+
pcbSnapshotSettings,
|
|
222496
222504
|
createDiff,
|
|
222497
222505
|
cameraPreset
|
|
222498
222506
|
}) => {
|
|
@@ -222531,7 +222539,7 @@ var processSnapshotFile = async ({
|
|
|
222531
222539
|
};
|
|
222532
222540
|
}
|
|
222533
222541
|
try {
|
|
222534
|
-
pcbSvg = convertCircuitJsonToPcbSvg4(circuitJson);
|
|
222542
|
+
pcbSvg = convertCircuitJsonToPcbSvg4(circuitJson, pcbSnapshotSettings);
|
|
222535
222543
|
} catch (error) {
|
|
222536
222544
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
222537
222545
|
return {
|
|
@@ -222699,6 +222707,7 @@ var snapshotProject = async ({
|
|
|
222699
222707
|
threeD = true;
|
|
222700
222708
|
}
|
|
222701
222709
|
const projectDir = process.cwd();
|
|
222710
|
+
const projectConfig2 = loadProjectConfig(projectDir);
|
|
222702
222711
|
const ignore = [
|
|
222703
222712
|
...DEFAULT_IGNORED_PATTERNS,
|
|
222704
222713
|
...ignored.map(normalizeIgnorePattern)
|
|
@@ -222760,6 +222769,7 @@ var snapshotProject = async ({
|
|
|
222760
222769
|
schematicOnly,
|
|
222761
222770
|
forceUpdate,
|
|
222762
222771
|
platformConfig: platformConfig2,
|
|
222772
|
+
pcbSnapshotSettings: projectConfig2?.pcbSnapshotSettings,
|
|
222763
222773
|
createDiff,
|
|
222764
222774
|
cameraPreset
|
|
222765
222775
|
},
|
|
@@ -222798,6 +222808,7 @@ var snapshotProject = async ({
|
|
|
222798
222808
|
schematicOnly,
|
|
222799
222809
|
forceUpdate,
|
|
222800
222810
|
platformConfig: platformConfig2,
|
|
222811
|
+
pcbSnapshotSettings: projectConfig2?.pcbSnapshotSettings,
|
|
222801
222812
|
createDiff,
|
|
222802
222813
|
cameraPreset
|
|
222803
222814
|
});
|
|
@@ -13298,6 +13298,7 @@ var processSnapshotFile = async ({
|
|
|
13298
13298
|
schematicOnly,
|
|
13299
13299
|
forceUpdate,
|
|
13300
13300
|
platformConfig,
|
|
13301
|
+
pcbSnapshotSettings,
|
|
13301
13302
|
createDiff,
|
|
13302
13303
|
cameraPreset
|
|
13303
13304
|
}) => {
|
|
@@ -13336,7 +13337,7 @@ var processSnapshotFile = async ({
|
|
|
13336
13337
|
};
|
|
13337
13338
|
}
|
|
13338
13339
|
try {
|
|
13339
|
-
pcbSvg = convertCircuitJsonToPcbSvg(circuitJson);
|
|
13340
|
+
pcbSvg = convertCircuitJsonToPcbSvg(circuitJson, pcbSnapshotSettings);
|
|
13340
13341
|
} catch (error) {
|
|
13341
13342
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
13342
13343
|
return {
|
|
@@ -13546,6 +13547,7 @@ var handleSnapshotFile = async (filePath, projectDir, snapshotsDirName, options)
|
|
|
13546
13547
|
schematicOnly: options.schematicOnly,
|
|
13547
13548
|
forceUpdate: options.forceUpdate,
|
|
13548
13549
|
platformConfig: options.platformConfig,
|
|
13550
|
+
pcbSnapshotSettings: options.pcbSnapshotSettings,
|
|
13549
13551
|
createDiff: options.createDiff,
|
|
13550
13552
|
cameraPreset: options.cameraPreset
|
|
13551
13553
|
});
|
package/dist/lib/index.js
CHANGED
|
@@ -67770,6 +67770,11 @@ import * as path11 from "node:path";
|
|
|
67770
67770
|
|
|
67771
67771
|
// lib/project-config/project-config-schema.ts
|
|
67772
67772
|
import { z as z21 } from "zod";
|
|
67773
|
+
var pcbSnapshotSettingsSchema = z21.object({
|
|
67774
|
+
showCourtyards: z21.boolean().optional(),
|
|
67775
|
+
showPcbNotes: z21.boolean().optional(),
|
|
67776
|
+
showFabricationNotes: z21.boolean().optional()
|
|
67777
|
+
});
|
|
67773
67778
|
var projectConfigSchema = z21.object({
|
|
67774
67779
|
mainEntrypoint: z21.string().optional(),
|
|
67775
67780
|
libraryEntrypoint: z21.string().optional(),
|
|
@@ -67778,6 +67783,7 @@ var projectConfigSchema = z21.object({
|
|
|
67778
67783
|
ignoredFiles: z21.array(z21.string()).optional(),
|
|
67779
67784
|
includeBoardFiles: z21.array(z21.string()).optional(),
|
|
67780
67785
|
snapshotsDir: z21.string().optional(),
|
|
67786
|
+
pcbSnapshotSettings: pcbSnapshotSettingsSchema.optional(),
|
|
67781
67787
|
prebuildCommand: z21.string().optional(),
|
|
67782
67788
|
buildCommand: z21.string().optional(),
|
|
67783
67789
|
kicadProjectEntrypointPath: z21.string().optional(),
|
package/package.json
CHANGED
|
@@ -44,6 +44,25 @@
|
|
|
44
44
|
"type": "string",
|
|
45
45
|
"description": "Directory path for storing snapshots."
|
|
46
46
|
},
|
|
47
|
+
"pcbSnapshotSettings": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"properties": {
|
|
51
|
+
"showCourtyards": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"description": "Whether to show courtyard outlines in PCB snapshots."
|
|
54
|
+
},
|
|
55
|
+
"showPcbNotes": {
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"description": "Whether to show PCB notes in PCB snapshots."
|
|
58
|
+
},
|
|
59
|
+
"showFabricationNotes": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"description": "Whether to show fabrication notes in PCB snapshots."
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"description": "Settings for PCB snapshot rendering."
|
|
65
|
+
},
|
|
47
66
|
"prebuildCommand": {
|
|
48
67
|
"type": "string",
|
|
49
68
|
"description": "Command to run before builds."
|