@tscircuit/cli 0.1.2165 → 0.1.2166

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
@@ -154298,7 +154298,7 @@ var import_perfect_cli = __toESM3(require_dist3(), 1);
154298
154298
  // lib/getVersion.ts
154299
154299
  import { createRequire as createRequire2 } from "node:module";
154300
154300
  // package.json
154301
- var version = "0.1.2164";
154301
+ var version = "0.1.2165";
154302
154302
  var package_default = {
154303
154303
  name: "@tscircuit/cli",
154304
154304
  version,
@@ -154345,13 +154345,13 @@ var package_default = {
154345
154345
  "circuit-json": "^0.0.489",
154346
154346
  "circuit-json-to-3d-png": "^0.0.6",
154347
154347
  "circuit-json-to-altium": "github:tscircuit/circuit-json-to-altium#1a50d0dd2c0737cf940d92c0315852dc0111dd87",
154348
- "circuit-json-to-bom-csv": "^0.0.17",
154348
+ "circuit-json-to-bom-csv": "^0.0.19",
154349
154349
  "circuit-json-to-connectivity-map": "^0.0.25",
154350
154350
  "circuit-json-to-fdm-component-box": "^0.0.2",
154351
154351
  "circuit-json-to-footprinter": "^0.0.54",
154352
154352
  "circuit-json-to-gerber": "^0.0.105",
154353
154353
  "circuit-json-to-kicad": "0.0.212",
154354
- "circuit-json-to-pnp-csv": "^0.0.13",
154354
+ "circuit-json-to-pnp-csv": "^0.0.18",
154355
154355
  "circuit-json-to-readable-netlist": "^0.0.15",
154356
154356
  "circuit-json-to-spice": "^0.0.45",
154357
154357
  "circuit-json-to-step": "^0.0.38",
@@ -347669,6 +347669,18 @@ import { promisify as promisify4 } from "node:util";
347669
347669
  // node_modules/circuit-json-to-bom-csv/dist/index.js
347670
347670
  var import_format_si_prefix = __toESM3(require_dist11(), 1);
347671
347671
  var import_papaparse = __toESM3(require_papaparse(), 1);
347672
+ var isBareMountingHole = (circuitJson, source, pcb) => {
347673
+ if (source.ftype !== "simple_chip")
347674
+ return false;
347675
+ if (source.manufacturer_part_number?.trim())
347676
+ return false;
347677
+ if (Object.values(source.supplier_part_numbers ?? {}).some((numbers) => numbers?.some((number) => number.trim())))
347678
+ return false;
347679
+ if (circuitJson.some((element) => element.type === "cad_component" && element.pcb_component_id === pcb.pcb_component_id && (element.model_obj_url || element.model_stl_url || element.model_3mf_url || element.model_gltf_url || element.model_glb_url || element.model_step_url || element.model_wrl_url || element.model_jscad)))
347680
+ return false;
347681
+ const geometry = circuitJson.filter((element) => (element.type === "pcb_plated_hole" || element.type === "pcb_hole" || element.type === "pcb_smtpad") && element.pcb_component_id === pcb.pcb_component_id);
347682
+ return geometry.length === 1 && (geometry[0].type === "pcb_plated_hole" || geometry[0].type === "pcb_hole");
347683
+ };
347672
347684
  var csvAsciiReplacements = {
347673
347685
  µ: "u",
347674
347686
  μ: "u",
@@ -347714,6 +347726,9 @@ var convertCircuitJsonToBomRows = async ({
347714
347726
  if (isTestPoint(source_component))
347715
347727
  continue;
347716
347728
  const part_info = await resolvePart?.({ pcb_component: elm, source_component }) ?? {};
347729
+ const hasResolvedPart = Boolean(trimText(part_info.part_number) || trimText(part_info.comment) || trimText(part_info.footprint) || Object.values(part_info.supplier_part_number_columns ?? {}).some((number) => trimText(number)) || part_info.manufacturer_mpn_pairs?.some(({ mpn }) => trimText(mpn)));
347730
+ if (!hasResolvedPart && isBareMountingHole(circuitJson, source_component, elm))
347731
+ continue;
347717
347732
  let value = "";
347718
347733
  if (source_component.ftype === "simple_resistor")
347719
347734
  value = si3(source_component.resistance);
package/dist/lib/index.js CHANGED
@@ -69109,7 +69109,7 @@ var getNodeHandler = (winterSpec, { port, middleware = [] }) => {
69109
69109
  }));
69110
69110
  };
69111
69111
  // package.json
69112
- var version = "0.1.2164";
69112
+ var version = "0.1.2165";
69113
69113
  var package_default = {
69114
69114
  name: "@tscircuit/cli",
69115
69115
  version,
@@ -69156,13 +69156,13 @@ var package_default = {
69156
69156
  "circuit-json": "^0.0.489",
69157
69157
  "circuit-json-to-3d-png": "^0.0.6",
69158
69158
  "circuit-json-to-altium": "github:tscircuit/circuit-json-to-altium#1a50d0dd2c0737cf940d92c0315852dc0111dd87",
69159
- "circuit-json-to-bom-csv": "^0.0.17",
69159
+ "circuit-json-to-bom-csv": "^0.0.19",
69160
69160
  "circuit-json-to-connectivity-map": "^0.0.25",
69161
69161
  "circuit-json-to-fdm-component-box": "^0.0.2",
69162
69162
  "circuit-json-to-footprinter": "^0.0.54",
69163
69163
  "circuit-json-to-gerber": "^0.0.105",
69164
69164
  "circuit-json-to-kicad": "0.0.212",
69165
- "circuit-json-to-pnp-csv": "^0.0.13",
69165
+ "circuit-json-to-pnp-csv": "^0.0.18",
69166
69166
  "circuit-json-to-readable-netlist": "^0.0.15",
69167
69167
  "circuit-json-to-spice": "^0.0.45",
69168
69168
  "circuit-json-to-step": "^0.0.38",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.2165",
3
+ "version": "0.1.2166",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/tscircuit/cli"
@@ -44,13 +44,13 @@
44
44
  "circuit-json": "^0.0.489",
45
45
  "circuit-json-to-3d-png": "^0.0.6",
46
46
  "circuit-json-to-altium": "github:tscircuit/circuit-json-to-altium#1a50d0dd2c0737cf940d92c0315852dc0111dd87",
47
- "circuit-json-to-bom-csv": "^0.0.17",
47
+ "circuit-json-to-bom-csv": "^0.0.19",
48
48
  "circuit-json-to-connectivity-map": "^0.0.25",
49
49
  "circuit-json-to-fdm-component-box": "^0.0.2",
50
50
  "circuit-json-to-footprinter": "^0.0.54",
51
51
  "circuit-json-to-gerber": "^0.0.105",
52
52
  "circuit-json-to-kicad": "0.0.212",
53
- "circuit-json-to-pnp-csv": "^0.0.13",
53
+ "circuit-json-to-pnp-csv": "^0.0.18",
54
54
  "circuit-json-to-readable-netlist": "^0.0.15",
55
55
  "circuit-json-to-spice": "^0.0.45",
56
56
  "circuit-json-to-step": "^0.0.38",