@tscircuit/cli 0.1.1186 → 0.1.1188
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/build/build.worker.js +5 -4
- package/dist/cli/main.js +4412 -601
- package/dist/lib/index.js +4 -1
- package/package.json +4 -1
|
@@ -13515,14 +13515,14 @@ var writeGlbFromCircuitJson = async (circuitJson, glbOutputPath) => {
|
|
|
13515
13515
|
fs9.writeFileSync(glbOutputPath, Buffer.from(glbData));
|
|
13516
13516
|
};
|
|
13517
13517
|
var writeImageAssetsFromCircuitJson = async (circuitJson, options) => {
|
|
13518
|
-
const { outputDir, imageFormats } = options;
|
|
13518
|
+
const { outputDir, imageFormats, pcbSnapshotSettings } = options;
|
|
13519
13519
|
fs9.mkdirSync(outputDir, { recursive: true });
|
|
13520
13520
|
if (imageFormats.pcbSvgs) {
|
|
13521
|
-
const pcbSvg = convertCircuitJsonToPcbSvg(circuitJson);
|
|
13521
|
+
const pcbSvg = convertCircuitJsonToPcbSvg(circuitJson, pcbSnapshotSettings);
|
|
13522
13522
|
fs9.writeFileSync(path12.join(outputDir, "pcb.svg"), pcbSvg, "utf-8");
|
|
13523
13523
|
}
|
|
13524
13524
|
if (imageFormats.pcbPngs) {
|
|
13525
|
-
const pcbSvg = convertCircuitJsonToPcbSvg(circuitJson);
|
|
13525
|
+
const pcbSvg = convertCircuitJsonToPcbSvg(circuitJson, pcbSnapshotSettings);
|
|
13526
13526
|
fs9.writeFileSync(path12.join(outputDir, "pcb.png"), await convertSvgToPngBuffer(pcbSvg));
|
|
13527
13527
|
}
|
|
13528
13528
|
if (imageFormats.schematicSvgs) {
|
|
@@ -13604,7 +13604,8 @@ var handleBuildFile = async (filePath, outputPath, glbOutputPath, previewOutputD
|
|
|
13604
13604
|
workerLog(`Generating preview assets for ${path13.relative(projectDir, resolvedPreviewOutputDir)} in same worker...`);
|
|
13605
13605
|
await writeImageAssetsFromCircuitJson(circuitJson, {
|
|
13606
13606
|
outputDir: resolvedPreviewOutputDir,
|
|
13607
|
-
imageFormats: options?.imageFormats ?? DEFAULT_IMAGE_FORMAT_SELECTION
|
|
13607
|
+
imageFormats: options?.imageFormats ?? DEFAULT_IMAGE_FORMAT_SELECTION,
|
|
13608
|
+
pcbSnapshotSettings: options?.pcbSnapshotSettings
|
|
13608
13609
|
});
|
|
13609
13610
|
previewOk = true;
|
|
13610
13611
|
} catch (err) {
|