@modular-circuit/perc 0.2.5 → 0.2.6
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 +1 -23
- package/dist/index.mjs +1 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1182,28 +1182,6 @@ var ParameterPropagationTester = class {
|
|
|
1182
1182
|
this.has_passive_port = false;
|
|
1183
1183
|
}
|
|
1184
1184
|
run_test(CtorClass, ports) {
|
|
1185
|
-
const valid_ports = [];
|
|
1186
|
-
for (const p of ports) {
|
|
1187
|
-
const id = this.port_id.get(p);
|
|
1188
|
-
try {
|
|
1189
|
-
const zod_schema = (0, import_electronics_model4.get_port_schema)(p);
|
|
1190
|
-
if (!zod_schema) {
|
|
1191
|
-
this.ctx.report.erc_errors.push(INVALID_INPUT(id ? [id] : [], `Unknown port type in ${JSON.stringify(p)}`));
|
|
1192
|
-
continue;
|
|
1193
|
-
}
|
|
1194
|
-
valid_ports.push(zod_schema.parse(p));
|
|
1195
|
-
} catch (err) {
|
|
1196
|
-
if (err instanceof z.ZodError) {
|
|
1197
|
-
this.ctx.report.erc_errors.push(
|
|
1198
|
-
INVALID_INPUT(id ? [id] : [], {
|
|
1199
|
-
input: p,
|
|
1200
|
-
issues: err.issues
|
|
1201
|
-
})
|
|
1202
|
-
);
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
if (!valid_ports.length) return;
|
|
1207
1185
|
return new CtorClass(
|
|
1208
1186
|
{
|
|
1209
1187
|
report: this.ctx.report,
|
|
@@ -1230,7 +1208,7 @@ var ParameterPropagationTester = class {
|
|
|
1230
1208
|
);
|
|
1231
1209
|
return;
|
|
1232
1210
|
}
|
|
1233
|
-
p.param = zod_schema.parse(p);
|
|
1211
|
+
p.param = zod_schema.parse(p.param);
|
|
1234
1212
|
ports.push(p);
|
|
1235
1213
|
} catch (err) {
|
|
1236
1214
|
if (err instanceof z.ZodError) {
|
package/dist/index.mjs
CHANGED
|
@@ -1122,28 +1122,6 @@ var ParameterPropagationTester = class {
|
|
|
1122
1122
|
this.has_passive_port = false;
|
|
1123
1123
|
}
|
|
1124
1124
|
run_test(CtorClass, ports) {
|
|
1125
|
-
const valid_ports = [];
|
|
1126
|
-
for (const p of ports) {
|
|
1127
|
-
const id = this.port_id.get(p);
|
|
1128
|
-
try {
|
|
1129
|
-
const zod_schema = get_port_schema(p);
|
|
1130
|
-
if (!zod_schema) {
|
|
1131
|
-
this.ctx.report.erc_errors.push(INVALID_INPUT(id ? [id] : [], `Unknown port type in ${JSON.stringify(p)}`));
|
|
1132
|
-
continue;
|
|
1133
|
-
}
|
|
1134
|
-
valid_ports.push(zod_schema.parse(p));
|
|
1135
|
-
} catch (err) {
|
|
1136
|
-
if (err instanceof z.ZodError) {
|
|
1137
|
-
this.ctx.report.erc_errors.push(
|
|
1138
|
-
INVALID_INPUT(id ? [id] : [], {
|
|
1139
|
-
input: p,
|
|
1140
|
-
issues: err.issues
|
|
1141
|
-
})
|
|
1142
|
-
);
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
if (!valid_ports.length) return;
|
|
1147
1125
|
return new CtorClass(
|
|
1148
1126
|
{
|
|
1149
1127
|
report: this.ctx.report,
|
|
@@ -1170,7 +1148,7 @@ var ParameterPropagationTester = class {
|
|
|
1170
1148
|
);
|
|
1171
1149
|
return;
|
|
1172
1150
|
}
|
|
1173
|
-
p.param = zod_schema.parse(p);
|
|
1151
|
+
p.param = zod_schema.parse(p.param);
|
|
1174
1152
|
ports.push(p);
|
|
1175
1153
|
} catch (err) {
|
|
1176
1154
|
if (err instanceof z.ZodError) {
|