@modular-circuit/perc 0.2.7 → 0.2.8

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.js CHANGED
@@ -1208,7 +1208,15 @@ var ParameterPropagationTester = class {
1208
1208
  );
1209
1209
  return;
1210
1210
  }
1211
+ const port_old = { ...p.param };
1211
1212
  p.param = zod_schema.parse(p.param);
1213
+ this.ctx.report.erc_errors.push(
1214
+ INVALID_INPUT([p.uuid], {
1215
+ input: p,
1216
+ old_port: port_old,
1217
+ new_port: p.param
1218
+ })
1219
+ );
1212
1220
  ports.push(p);
1213
1221
  } catch (err) {
1214
1222
  if (err instanceof z.ZodError) {
@@ -1245,14 +1253,14 @@ var ParameterPropagationTester = class {
1245
1253
  }
1246
1254
  }
1247
1255
  this.port_id = /* @__PURE__ */ new Map();
1248
- for (const p of ports) this.port_id.set(p.param, p.uuid);
1249
1256
  for (const v of ports) {
1257
+ this.port_id.set(v.param, v.uuid);
1250
1258
  const port = v.param;
1251
1259
  if (port.type === import_electronics_model4.PortType.Passive) this.has_passive_port = true;
1252
- const link_type = (0, import_electronics_model4.get_port_link_type)(port);
1260
+ let link_type = (0, import_electronics_model4.get_port_link_type)(port);
1253
1261
  if (link_type instanceof Error) {
1254
1262
  this.ctx.report.erc_errors.push(INVALID_INPUT([v.uuid], { error: link_type.message }));
1255
- continue;
1263
+ link_type = import_electronics_model4.LinkType.PassiveLink;
1256
1264
  }
1257
1265
  const arr = this.link_map[link_type];
1258
1266
  arr.push(port);
package/dist/index.mjs CHANGED
@@ -1148,7 +1148,15 @@ var ParameterPropagationTester = class {
1148
1148
  );
1149
1149
  return;
1150
1150
  }
1151
+ const port_old = { ...p.param };
1151
1152
  p.param = zod_schema.parse(p.param);
1153
+ this.ctx.report.erc_errors.push(
1154
+ INVALID_INPUT([p.uuid], {
1155
+ input: p,
1156
+ old_port: port_old,
1157
+ new_port: p.param
1158
+ })
1159
+ );
1152
1160
  ports.push(p);
1153
1161
  } catch (err) {
1154
1162
  if (err instanceof z.ZodError) {
@@ -1185,14 +1193,14 @@ var ParameterPropagationTester = class {
1185
1193
  }
1186
1194
  }
1187
1195
  this.port_id = /* @__PURE__ */ new Map();
1188
- for (const p of ports) this.port_id.set(p.param, p.uuid);
1189
1196
  for (const v of ports) {
1197
+ this.port_id.set(v.param, v.uuid);
1190
1198
  const port = v.param;
1191
1199
  if (port.type === PortType2.Passive) this.has_passive_port = true;
1192
- const link_type = get_port_link_type(port);
1200
+ let link_type = get_port_link_type(port);
1193
1201
  if (link_type instanceof Error) {
1194
1202
  this.ctx.report.erc_errors.push(INVALID_INPUT([v.uuid], { error: link_type.message }));
1195
- continue;
1203
+ link_type = LinkType.PassiveLink;
1196
1204
  }
1197
1205
  const arr = this.link_map[link_type];
1198
1206
  arr.push(port);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modular-circuit/perc",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Programmable Electronic Circuit Check",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -27,9 +27,9 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "zod": "^4.3.6",
30
- "@modular-circuit/electronics-model": "0.2.4",
31
- "@modular-circuit/ir": "0.2.2",
32
- "@modular-circuit/utils": "0.2.2"
30
+ "@modular-circuit/electronics-model": "0.2.5",
31
+ "@modular-circuit/ir": "0.2.3",
32
+ "@modular-circuit/utils": "0.2.3"
33
33
  },
34
34
  "scripts": {
35
35
  "clean": "rimraf dist",