@modular-circuit/perc 0.2.13 → 0.2.14

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
@@ -1180,6 +1180,7 @@ var Dvp8LinkTester = class extends CompositePortLinkTesterBase {
1180
1180
  };
1181
1181
 
1182
1182
  // src/erc/parameter_propagation/tester.ts
1183
+ var ALLOWED_OPTIONALS = /* @__PURE__ */ new Set(["label_associated", "name"]);
1183
1184
  var ParameterPropagationTester = class {
1184
1185
  constructor(ctx) {
1185
1186
  this.ctx = ctx;
@@ -1218,12 +1219,16 @@ var ParameterPropagationTester = class {
1218
1219
  ports.push(p);
1219
1220
  } catch (err) {
1220
1221
  if (err instanceof z.ZodError) {
1221
- this.ctx.report.erc_errors.push(
1222
- INVALID_INPUT([p.uuid], {
1223
- message: err.issues,
1224
- port
1225
- })
1226
- );
1222
+ if (err.issues.every((e) => e.code === "invalid_type" && typeof e.path[e.path.length - 1] === "string" && ALLOWED_OPTIONALS.has(e.path[e.path.length - 1]))) {
1223
+ ports.push(p);
1224
+ } else {
1225
+ this.ctx.report.erc_errors.push(
1226
+ INVALID_INPUT([p.uuid], {
1227
+ message: err.issues,
1228
+ port
1229
+ })
1230
+ );
1231
+ }
1227
1232
  }
1228
1233
  }
1229
1234
  };
package/dist/index.mjs CHANGED
@@ -1120,6 +1120,7 @@ var Dvp8LinkTester = class extends CompositePortLinkTesterBase {
1120
1120
  };
1121
1121
 
1122
1122
  // src/erc/parameter_propagation/tester.ts
1123
+ var ALLOWED_OPTIONALS = /* @__PURE__ */ new Set(["label_associated", "name"]);
1123
1124
  var ParameterPropagationTester = class {
1124
1125
  constructor(ctx) {
1125
1126
  this.ctx = ctx;
@@ -1158,12 +1159,16 @@ var ParameterPropagationTester = class {
1158
1159
  ports.push(p);
1159
1160
  } catch (err) {
1160
1161
  if (err instanceof z.ZodError) {
1161
- this.ctx.report.erc_errors.push(
1162
- INVALID_INPUT([p.uuid], {
1163
- message: err.issues,
1164
- port
1165
- })
1166
- );
1162
+ if (err.issues.every((e) => e.code === "invalid_type" && typeof e.path[e.path.length - 1] === "string" && ALLOWED_OPTIONALS.has(e.path[e.path.length - 1]))) {
1163
+ ports.push(p);
1164
+ } else {
1165
+ this.ctx.report.erc_errors.push(
1166
+ INVALID_INPUT([p.uuid], {
1167
+ message: err.issues,
1168
+ port
1169
+ })
1170
+ );
1171
+ }
1167
1172
  }
1168
1173
  }
1169
1174
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modular-circuit/perc",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "Programmable Electronic Circuit Check",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -28,8 +28,8 @@
28
28
  "dependencies": {
29
29
  "zod": "^4.3.6",
30
30
  "@modular-circuit/electronics-model": "0.2.9",
31
- "@modular-circuit/ir": "0.2.7",
32
- "@modular-circuit/utils": "0.2.7"
31
+ "@modular-circuit/utils": "0.2.7",
32
+ "@modular-circuit/ir": "0.2.7"
33
33
  },
34
34
  "scripts": {
35
35
  "clean": "rimraf dist",