@tscircuit/cli 0.1.1889 → 0.1.1890
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 +27 -2
- package/dist/lib/index.js +1 -1
- package/package.json +1 -1
package/dist/cli/main.js
CHANGED
|
@@ -135146,7 +135146,7 @@ var import_perfect_cli = __toESM2(require_dist2(), 1);
|
|
|
135146
135146
|
// lib/getVersion.ts
|
|
135147
135147
|
import { createRequire as createRequire2 } from "node:module";
|
|
135148
135148
|
// package.json
|
|
135149
|
-
var version = "0.1.
|
|
135149
|
+
var version = "0.1.1889";
|
|
135150
135150
|
var package_default = {
|
|
135151
135151
|
name: "@tscircuit/cli",
|
|
135152
135152
|
version,
|
|
@@ -301880,6 +301880,31 @@ var registerCheckSchematicPlacement = (program2) => {
|
|
|
301880
301880
|
// cli/check/shorts/register.ts
|
|
301881
301881
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
301882
301882
|
import path49 from "node:path";
|
|
301883
|
+
|
|
301884
|
+
// cli/check/shorts/get-check-short-layers.ts
|
|
301885
|
+
var innerCopperLayers = [
|
|
301886
|
+
"inner1",
|
|
301887
|
+
"inner2",
|
|
301888
|
+
"inner3",
|
|
301889
|
+
"inner4",
|
|
301890
|
+
"inner5",
|
|
301891
|
+
"inner6",
|
|
301892
|
+
"inner7",
|
|
301893
|
+
"inner8"
|
|
301894
|
+
];
|
|
301895
|
+
var getCheckShortLayers = ({
|
|
301896
|
+
circuitJson,
|
|
301897
|
+
layerOption
|
|
301898
|
+
}) => {
|
|
301899
|
+
if (layerOption !== "all")
|
|
301900
|
+
return [layerOption];
|
|
301901
|
+
const pcbBoard = circuitJson.find((element) => element.type === "pcb_board");
|
|
301902
|
+
const boardLayerCount = pcbBoard?.type === "pcb_board" ? pcbBoard.num_layers : 2;
|
|
301903
|
+
const innerLayerCount = Math.max(0, Math.floor(boardLayerCount) - 2);
|
|
301904
|
+
return ["top", ...innerCopperLayers.slice(0, innerLayerCount), "bottom"];
|
|
301905
|
+
};
|
|
301906
|
+
|
|
301907
|
+
// cli/check/shorts/register.ts
|
|
301883
301908
|
var CHECK_SHORTS_CDN_URL = "https://jscdn.tscircuit.com/@tscircuit/check-shorts/latest/+esm";
|
|
301884
301909
|
var importCheckShortsFromCdn = async (url2) => await import(url2);
|
|
301885
301910
|
var importCheckShortsFromPackage = async () => await Promise.resolve().then(() => (init_dist3(), exports_dist2));
|
|
@@ -301937,7 +301962,6 @@ var checkShorts = async (file, options = {}) => {
|
|
|
301937
301962
|
const resolvedInputFilePath = await resolveCheckInputFilePath(file);
|
|
301938
301963
|
const mode = parseMode(options.mode);
|
|
301939
301964
|
const layerOption = parseLayer(options.layer);
|
|
301940
|
-
const layers = layerOption === "all" ? ["top", "bottom"] : [layerOption];
|
|
301941
301965
|
const pixelsPerMm = parsePixelsPerMm(options.pixelsPerMm);
|
|
301942
301966
|
const circuitJson = await getCircuitJsonForCheck({
|
|
301943
301967
|
filePath: resolvedInputFilePath,
|
|
@@ -301947,6 +301971,7 @@ var checkShorts = async (file, options = {}) => {
|
|
|
301947
301971
|
},
|
|
301948
301972
|
allowPrebuiltCircuitJson: true
|
|
301949
301973
|
});
|
|
301974
|
+
const layers = getCheckShortLayers({ circuitJson, layerOption });
|
|
301950
301975
|
const {
|
|
301951
301976
|
appendBitmapLegend: appendBitmapLegend2,
|
|
301952
301977
|
createShortDebugSvg: createShortDebugSvg2,
|
package/dist/lib/index.js
CHANGED
|
@@ -65757,7 +65757,7 @@ var getNodeHandler = (winterSpec, { port, middleware = [] }) => {
|
|
|
65757
65757
|
}));
|
|
65758
65758
|
};
|
|
65759
65759
|
// package.json
|
|
65760
|
-
var version = "0.1.
|
|
65760
|
+
var version = "0.1.1889";
|
|
65761
65761
|
var package_default = {
|
|
65762
65762
|
name: "@tscircuit/cli",
|
|
65763
65763
|
version,
|