@tscircuit/cli 0.1.1131 → 0.1.1133
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 +18 -4
- package/dist/cli/snapshot/snapshot.worker.js +10 -3
- package/dist/lib/index.js +1 -1
- package/package.json +1 -1
package/dist/cli/main.js
CHANGED
|
@@ -97682,7 +97682,7 @@ var import_perfect_cli = __toESM2(require_dist2(), 1);
|
|
|
97682
97682
|
// lib/getVersion.ts
|
|
97683
97683
|
import { createRequire as createRequire2 } from "node:module";
|
|
97684
97684
|
// package.json
|
|
97685
|
-
var version = "0.1.
|
|
97685
|
+
var version = "0.1.1132";
|
|
97686
97686
|
var package_default = {
|
|
97687
97687
|
name: "@tscircuit/cli",
|
|
97688
97688
|
version,
|
|
@@ -116293,9 +116293,16 @@ var exportSnippet = async ({
|
|
|
116293
116293
|
schConverter.runUntilFinished();
|
|
116294
116294
|
const pcbConverter = new CircuitJsonToKicadPcbConverter(circuitJson);
|
|
116295
116295
|
pcbConverter.runUntilFinished();
|
|
116296
|
+
const proConverter = new CircuitJsonToKicadProConverter(circuitJson, {
|
|
116297
|
+
projectName: outputBaseName,
|
|
116298
|
+
schematicFilename: `${outputBaseName}.kicad_sch`,
|
|
116299
|
+
pcbFilename: `${outputBaseName}.kicad_pcb`
|
|
116300
|
+
});
|
|
116301
|
+
proConverter.runUntilFinished();
|
|
116296
116302
|
const zip = new import_jszip4.default;
|
|
116297
116303
|
zip.file(`${outputBaseName}.kicad_sch`, schConverter.getOutputString());
|
|
116298
116304
|
zip.file(`${outputBaseName}.kicad_pcb`, pcbConverter.getOutputString());
|
|
116305
|
+
zip.file(`${outputBaseName}.kicad_pro`, proConverter.getOutputString());
|
|
116299
116306
|
outputContent = await zip.generateAsync({ type: "nodebuffer" });
|
|
116300
116307
|
break;
|
|
116301
116308
|
}
|
|
@@ -222570,8 +222577,15 @@ var processSnapshotFile = async ({
|
|
|
222570
222577
|
continue;
|
|
222571
222578
|
}
|
|
222572
222579
|
const oldContentBuffer = fs64.readFileSync(snapPath);
|
|
222573
|
-
|
|
222574
|
-
|
|
222580
|
+
let equal2;
|
|
222581
|
+
let diffPath;
|
|
222582
|
+
if (createDiff) {
|
|
222583
|
+
diffPath = snapPath.replace(is3d ? ".snap.png" : ".snap.svg", is3d ? ".diff.png" : ".diff.svg");
|
|
222584
|
+
const comparison = await compareAndCreateDiff(oldContentBuffer, newContentBuffer, diffPath, true);
|
|
222585
|
+
equal2 = comparison.equal;
|
|
222586
|
+
} else {
|
|
222587
|
+
equal2 = oldContentBuffer.equals(newContentBuffer);
|
|
222588
|
+
}
|
|
222575
222589
|
if (update) {
|
|
222576
222590
|
if (!forceUpdate && equal2) {
|
|
222577
222591
|
successPaths.push(path66.relative(projectDir, snapPath));
|
|
@@ -222581,7 +222595,7 @@ var processSnapshotFile = async ({
|
|
|
222581
222595
|
didUpdate = true;
|
|
222582
222596
|
}
|
|
222583
222597
|
} else if (!equal2) {
|
|
222584
|
-
mismatches.push(
|
|
222598
|
+
mismatches.push(diffPath ? `${snapPath} (diff: ${diffPath})` : snapPath);
|
|
222585
222599
|
} else {
|
|
222586
222600
|
successPaths.push(path66.relative(projectDir, snapPath));
|
|
222587
222601
|
}
|
|
@@ -13446,8 +13446,15 @@ var processSnapshotFile = async ({
|
|
|
13446
13446
|
continue;
|
|
13447
13447
|
}
|
|
13448
13448
|
const oldContentBuffer = fs9.readFileSync(snapPath);
|
|
13449
|
-
|
|
13450
|
-
|
|
13449
|
+
let equal;
|
|
13450
|
+
let diffPath;
|
|
13451
|
+
if (createDiff) {
|
|
13452
|
+
diffPath = snapPath.replace(is3d ? ".snap.png" : ".snap.svg", is3d ? ".diff.png" : ".diff.svg");
|
|
13453
|
+
const comparison = await compareAndCreateDiff(oldContentBuffer, newContentBuffer, diffPath, true);
|
|
13454
|
+
equal = comparison.equal;
|
|
13455
|
+
} else {
|
|
13456
|
+
equal = oldContentBuffer.equals(newContentBuffer);
|
|
13457
|
+
}
|
|
13451
13458
|
if (update) {
|
|
13452
13459
|
if (!forceUpdate && equal) {
|
|
13453
13460
|
successPaths.push(path10.relative(projectDir, snapPath));
|
|
@@ -13457,7 +13464,7 @@ var processSnapshotFile = async ({
|
|
|
13457
13464
|
didUpdate = true;
|
|
13458
13465
|
}
|
|
13459
13466
|
} else if (!equal) {
|
|
13460
|
-
mismatches.push(
|
|
13467
|
+
mismatches.push(diffPath ? `${snapPath} (diff: ${diffPath})` : snapPath);
|
|
13461
13468
|
} else {
|
|
13462
13469
|
successPaths.push(path10.relative(projectDir, snapPath));
|
|
13463
13470
|
}
|
package/dist/lib/index.js
CHANGED
|
@@ -60445,7 +60445,7 @@ var getNodeHandler = (winterSpec, { port, middleware = [] }) => {
|
|
|
60445
60445
|
}));
|
|
60446
60446
|
};
|
|
60447
60447
|
// package.json
|
|
60448
|
-
var version = "0.1.
|
|
60448
|
+
var version = "0.1.1132";
|
|
60449
60449
|
var package_default = {
|
|
60450
60450
|
name: "@tscircuit/cli",
|
|
60451
60451
|
version,
|