@modular-circuit/perc 0.2.2 → 0.2.4

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/index.d.mts CHANGED
@@ -164,9 +164,9 @@ declare const CONNECTIONS_COUNT_EXCEEDS_BUNDLE_LIMIT: (bundle_id: string) => {
164
164
  error_message: string;
165
165
  eda_item_ids: string[];
166
166
  };
167
- declare const INVALID_INPUT: (eda_item_ids: string[], details: string) => {
167
+ declare const INVALID_INPUT: (eda_item_ids: string[], error_message: unknown) => {
168
168
  error_code: PP_ERROR;
169
- error_message: string;
169
+ error_message: unknown;
170
170
  eda_item_ids: string[];
171
171
  };
172
172
 
@@ -178,7 +178,7 @@ interface REPORT_ITEM {
178
178
  /**
179
179
  * A message describing the details of this specific error
180
180
  */
181
- error_message: string;
181
+ error_message: unknown;
182
182
  }
183
183
 
184
184
  /**Token from KiCAD
package/dist/index.d.ts CHANGED
@@ -164,9 +164,9 @@ declare const CONNECTIONS_COUNT_EXCEEDS_BUNDLE_LIMIT: (bundle_id: string) => {
164
164
  error_message: string;
165
165
  eda_item_ids: string[];
166
166
  };
167
- declare const INVALID_INPUT: (eda_item_ids: string[], details: string) => {
167
+ declare const INVALID_INPUT: (eda_item_ids: string[], error_message: unknown) => {
168
168
  error_code: PP_ERROR;
169
- error_message: string;
169
+ error_message: unknown;
170
170
  eda_item_ids: string[];
171
171
  };
172
172
 
@@ -178,7 +178,7 @@ interface REPORT_ITEM {
178
178
  /**
179
179
  * A message describing the details of this specific error
180
180
  */
181
- error_message: string;
181
+ error_message: unknown;
182
182
  }
183
183
 
184
184
  /**Token from KiCAD
package/dist/index.js CHANGED
@@ -282,10 +282,10 @@ var CONNECTIONS_COUNT_EXCEEDS_BUNDLE_LIMIT = (bundle_id) => ({
282
282
  error_message: "Connections count exceeds bundle limit.",
283
283
  eda_item_ids: [bundle_id]
284
284
  });
285
- var INVALID_INPUT = (eda_item_ids, details) => {
285
+ var INVALID_INPUT = (eda_item_ids, error_message) => {
286
286
  return {
287
287
  error_code: " INVALID_INPUT" /* INVALID_INPUT */,
288
- error_message: `Invalid input: ${details}`,
288
+ error_message,
289
289
  eda_item_ids
290
290
  };
291
291
  };
@@ -1187,10 +1187,10 @@ var ParameterPropagationTester = class {
1187
1187
  } catch (err) {
1188
1188
  if (err instanceof z.ZodError) {
1189
1189
  this.ctx.report.erc_errors.push(
1190
- INVALID_INPUT(
1191
- id ? [id] : [],
1192
- `Invalid input: ${JSON.stringify(p)}. Issues: ${JSON.stringify(err.issues)}`
1193
- )
1190
+ INVALID_INPUT(id ? [id] : [], {
1191
+ input: p,
1192
+ issues: err.issues
1193
+ })
1194
1194
  );
1195
1195
  }
1196
1196
  }
package/dist/index.mjs CHANGED
@@ -212,10 +212,10 @@ var CONNECTIONS_COUNT_EXCEEDS_BUNDLE_LIMIT = (bundle_id) => ({
212
212
  error_message: "Connections count exceeds bundle limit.",
213
213
  eda_item_ids: [bundle_id]
214
214
  });
215
- var INVALID_INPUT = (eda_item_ids, details) => {
215
+ var INVALID_INPUT = (eda_item_ids, error_message) => {
216
216
  return {
217
217
  error_code: " INVALID_INPUT" /* INVALID_INPUT */,
218
- error_message: `Invalid input: ${details}`,
218
+ error_message,
219
219
  eda_item_ids
220
220
  };
221
221
  };
@@ -1128,10 +1128,10 @@ var ParameterPropagationTester = class {
1128
1128
  } catch (err) {
1129
1129
  if (err instanceof z.ZodError) {
1130
1130
  this.ctx.report.erc_errors.push(
1131
- INVALID_INPUT(
1132
- id ? [id] : [],
1133
- `Invalid input: ${JSON.stringify(p)}. Issues: ${JSON.stringify(err.issues)}`
1134
- )
1131
+ INVALID_INPUT(id ? [id] : [], {
1132
+ input: p,
1133
+ issues: err.issues
1134
+ })
1135
1135
  );
1136
1136
  }
1137
1137
  }
@@ -1579,12 +1579,12 @@ import {
1579
1579
  block_is_associated_with_concrete_module
1580
1580
  } from "@modular-circuit/ir";
1581
1581
  import {
1582
+ KiCadSchematicFileExtension,
1582
1583
  deep_copy,
1583
1584
  fmt_module_name,
1584
1585
  gen_uuid,
1585
1586
  get_circuit_ports,
1586
- get_port_labels,
1587
- KiCadSchematicFileExtension
1587
+ get_port_labels
1588
1588
  } from "@modular-circuit/utils";
1589
1589
  var IR_GRAPH_CONVERTER = class {
1590
1590
  constructor(circuits) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modular-circuit/perc",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Programmable Electronic Circuit Check",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -27,8 +27,8 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "zod": "^4.3.6",
30
+ "@modular-circuit/electronics-model": "0.2.3",
30
31
  "@modular-circuit/ir": "0.2.1",
31
- "@modular-circuit/electronics-model": "0.2.1",
32
32
  "@modular-circuit/utils": "0.2.1"
33
33
  },
34
34
  "scripts": {