@modular-circuit/perc 0.2.12 → 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
@@ -896,7 +896,11 @@ var SpiLinkTester = class extends CompositePortLinkTesterBase {
896
896
  const sck_tester = new DigitalLinkTester(this.ctx, [controller.sck, ...peripherals.map((device) => device.sck)]);
897
897
  const miso_tester = new DigitalLinkTester(this.ctx, [controller.miso, ...peripherals.map((device) => device.miso)]);
898
898
  const mosi_tester = new DigitalLinkTester(this.ctx, [controller.mosi, ...peripherals.map((device) => device.mosi)]);
899
- for (const tst of [sck_tester, miso_tester, mosi_tester]) tst.test();
899
+ const CS_OR_SS_tester = new DigitalLinkTester(this.ctx, [
900
+ controller.CS_OR_SS,
901
+ ...peripherals.map((device) => device.CS_OR_SS)
902
+ ]);
903
+ for (const tst of [sck_tester, miso_tester, mosi_tester, CS_OR_SS_tester]) tst.test();
900
904
  }
901
905
  init_link() {
902
906
  const controllers = [];
@@ -1176,6 +1180,7 @@ var Dvp8LinkTester = class extends CompositePortLinkTesterBase {
1176
1180
  };
1177
1181
 
1178
1182
  // src/erc/parameter_propagation/tester.ts
1183
+ var ALLOWED_OPTIONALS = /* @__PURE__ */ new Set(["label_associated", "name"]);
1179
1184
  var ParameterPropagationTester = class {
1180
1185
  constructor(ctx) {
1181
1186
  this.ctx = ctx;
@@ -1214,12 +1219,16 @@ var ParameterPropagationTester = class {
1214
1219
  ports.push(p);
1215
1220
  } catch (err) {
1216
1221
  if (err instanceof z.ZodError) {
1217
- this.ctx.report.erc_errors.push(
1218
- INVALID_INPUT([p.uuid], {
1219
- message: err.issues,
1220
- port
1221
- })
1222
- );
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
+ }
1223
1232
  }
1224
1233
  }
1225
1234
  };
package/dist/index.mjs CHANGED
@@ -836,7 +836,11 @@ var SpiLinkTester = class extends CompositePortLinkTesterBase {
836
836
  const sck_tester = new DigitalLinkTester(this.ctx, [controller.sck, ...peripherals.map((device) => device.sck)]);
837
837
  const miso_tester = new DigitalLinkTester(this.ctx, [controller.miso, ...peripherals.map((device) => device.miso)]);
838
838
  const mosi_tester = new DigitalLinkTester(this.ctx, [controller.mosi, ...peripherals.map((device) => device.mosi)]);
839
- for (const tst of [sck_tester, miso_tester, mosi_tester]) tst.test();
839
+ const CS_OR_SS_tester = new DigitalLinkTester(this.ctx, [
840
+ controller.CS_OR_SS,
841
+ ...peripherals.map((device) => device.CS_OR_SS)
842
+ ]);
843
+ for (const tst of [sck_tester, miso_tester, mosi_tester, CS_OR_SS_tester]) tst.test();
840
844
  }
841
845
  init_link() {
842
846
  const controllers = [];
@@ -1116,6 +1120,7 @@ var Dvp8LinkTester = class extends CompositePortLinkTesterBase {
1116
1120
  };
1117
1121
 
1118
1122
  // src/erc/parameter_propagation/tester.ts
1123
+ var ALLOWED_OPTIONALS = /* @__PURE__ */ new Set(["label_associated", "name"]);
1119
1124
  var ParameterPropagationTester = class {
1120
1125
  constructor(ctx) {
1121
1126
  this.ctx = ctx;
@@ -1154,12 +1159,16 @@ var ParameterPropagationTester = class {
1154
1159
  ports.push(p);
1155
1160
  } catch (err) {
1156
1161
  if (err instanceof z.ZodError) {
1157
- this.ctx.report.erc_errors.push(
1158
- INVALID_INPUT([p.uuid], {
1159
- message: err.issues,
1160
- port
1161
- })
1162
- );
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
+ }
1163
1172
  }
1164
1173
  }
1165
1174
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modular-circuit/perc",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
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.8",
31
- "@modular-circuit/utils": "0.2.6",
32
- "@modular-circuit/ir": "0.2.6"
30
+ "@modular-circuit/electronics-model": "0.2.9",
31
+ "@modular-circuit/utils": "0.2.7",
32
+ "@modular-circuit/ir": "0.2.7"
33
33
  },
34
34
  "scripts": {
35
35
  "clean": "rimraf dist",