@forgeax/engine-pack 0.1.33 → 0.1.34
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/README.md +1 -1
- package/dist/build.mjs +11 -6
- package/dist/build.mjs.map +1 -1
- package/dist/cli-asset.mjs +4 -4
- package/dist/cli-asset.mjs.map +1 -1
- package/dist/evidence/material-cook.d.ts +2 -1
- package/dist/evidence/material-cook.d.ts.map +1 -1
- package/dist/index.mjs +11 -6
- package/dist/index.mjs.map +1 -1
- package/dist/material-cook.mjs +7 -2
- package/dist/material-cook.mjs.map +1 -1
- package/dist/pack-authoring-node.mjs +4 -4
- package/dist/pack-authoring-node.mjs.map +1 -1
- package/dist/pack-authoring.d.ts.map +1 -1
- package/dist/pack-authoring.mjs +4 -4
- package/dist/pack-authoring.mjs.map +1 -1
- package/dist/scanner.mjs +4 -4
- package/dist/scanner.mjs.map +1 -1
- package/dist/scriptable-pack-node.mjs +4 -4
- package/dist/scriptable-pack-node.mjs.map +1 -1
- package/dist/scriptable-pack.mjs +4 -4
- package/dist/scriptable-pack.mjs.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/ai-recovery.unit.test.ts +4 -1
- package/src/__tests__/material-cook-schema.unit.test.ts +26 -0
- package/src/__tests__/pack-authoring.unit.test.ts +26 -0
- package/src/evidence/material-cook.ts +9 -1
- package/src/pack-authoring.ts +8 -4
- package/src/schema/material-cook.schema.json +74 -1
|
@@ -249,8 +249,8 @@ function vectorLength(type) {
|
|
|
249
249
|
}
|
|
250
250
|
function parameterValueError(parameter, value, propertyPath) {
|
|
251
251
|
const { type } = parameter;
|
|
252
|
-
if (type === "bool"
|
|
253
|
-
return parameterFailure(propertyPath, "a boolean", value, "bool value has the wrong type");
|
|
252
|
+
if (type === "bool") {
|
|
253
|
+
return typeof value === "boolean" ? void 0 : parameterFailure(propertyPath, "a boolean", value, "bool value has the wrong type");
|
|
254
254
|
}
|
|
255
255
|
if (numericType(type)) {
|
|
256
256
|
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
@@ -311,8 +311,8 @@ function parameterValueError(parameter, value, propertyPath) {
|
|
|
311
311
|
}
|
|
312
312
|
return void 0;
|
|
313
313
|
}
|
|
314
|
-
if (type === "string"
|
|
315
|
-
return parameterFailure(propertyPath, "a string", value, "string parameter has the wrong type");
|
|
314
|
+
if (type === "string") {
|
|
315
|
+
return typeof value === "string" ? void 0 : parameterFailure(propertyPath, "a string", value, "string parameter has the wrong type");
|
|
316
316
|
}
|
|
317
317
|
if (type === "enum") {
|
|
318
318
|
if (typeof value !== "string") {
|