@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
package/README.md
CHANGED
|
@@ -148,7 +148,7 @@ lives in [`pack.schema.json`](schema/pack.schema.json) and
|
|
|
148
148
|
[`meta.schema.json`](schema/meta.schema.json); this section is guidance, not a
|
|
149
149
|
second manifest.
|
|
150
150
|
|
|
151
|
-
The machine contract is [`asset-authority.schema.json`](../../asset-authority.schema.json). The audit gate is [`check-asset-authority-audit.mjs`](../../scripts/forgeax/check-asset-authority-audit.mjs); it reports subject, execution, author authority, runtime source, lifecycle, owner, producer, and sourceKey evidence for every named category.
|
|
151
|
+
The machine contract is [`schemas/asset-authority.schema.json`](../../schemas/asset-authority.schema.json). The audit gate is [`check-asset-authority-audit.mjs`](../../scripts/forgeax/check-asset-authority-audit.mjs); it reports subject, execution, author authority, runtime source, lifecycle, owner, producer, and sourceKey evidence for every named category.
|
|
152
152
|
|
|
153
153
|
The staged route is explicit: `author-validation` -> `external-declaration` ->
|
|
154
154
|
`import` -> `native-cook` -> `ddc-validation` -> `runtime-parse` ->
|
package/dist/build.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ok, err, catalogOperationsFor, authoringCapabilityForAssetKind, MATERIAL_TEXTURE_SLOTS, isMaterialProgramAbi, projectCookProductEvidence, projectAssetEvidence, validateSourceOverrideMap, PACK_ERROR_HINTS, catalogEntryDigest, deriveStandardLayerPlan, AssetError, ImportError } from '@forgeax/engine-types';
|
|
1
|
+
import { ok, err, catalogOperationsFor, authoringCapabilityForAssetKind, MATERIAL_TEXTURE_SLOTS, isMaterialSurfaceDeclaration, isMaterialProgramAbi, projectCookProductEvidence, projectAssetEvidence, validateSourceOverrideMap, PACK_ERROR_HINTS, catalogEntryDigest, deriveStandardLayerPlan, AssetError, ImportError } from '@forgeax/engine-types';
|
|
2
2
|
import { dirname, resolve, isAbsolute, relative, join, basename, sep, extname } from 'path';
|
|
3
3
|
import { sha1 } from '@noble/hashes/legacy.js';
|
|
4
4
|
import { uuidv7obj } from 'uuidv7';
|
|
@@ -7129,8 +7129,8 @@ function vectorLength(type) {
|
|
|
7129
7129
|
}
|
|
7130
7130
|
function parameterValueError(parameter, value, propertyPath) {
|
|
7131
7131
|
const { type } = parameter;
|
|
7132
|
-
if (type === "bool"
|
|
7133
|
-
return parameterFailure(propertyPath, "a boolean", value, "bool value has the wrong type");
|
|
7132
|
+
if (type === "bool") {
|
|
7133
|
+
return typeof value === "boolean" ? void 0 : parameterFailure(propertyPath, "a boolean", value, "bool value has the wrong type");
|
|
7134
7134
|
}
|
|
7135
7135
|
if (numericType(type)) {
|
|
7136
7136
|
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
@@ -7191,8 +7191,8 @@ function parameterValueError(parameter, value, propertyPath) {
|
|
|
7191
7191
|
}
|
|
7192
7192
|
return void 0;
|
|
7193
7193
|
}
|
|
7194
|
-
if (type === "string"
|
|
7195
|
-
return parameterFailure(propertyPath, "a string", value, "string parameter has the wrong type");
|
|
7194
|
+
if (type === "string") {
|
|
7195
|
+
return typeof value === "string" ? void 0 : parameterFailure(propertyPath, "a string", value, "string parameter has the wrong type");
|
|
7196
7196
|
}
|
|
7197
7197
|
if (type === "enum") {
|
|
7198
7198
|
if (typeof value !== "string") {
|
|
@@ -10362,7 +10362,10 @@ function collectMaterialCookRefs(material) {
|
|
|
10362
10362
|
return guid === void 0 ? [] : [guid];
|
|
10363
10363
|
})
|
|
10364
10364
|
),
|
|
10365
|
-
modules: unique(
|
|
10365
|
+
modules: unique([
|
|
10366
|
+
...(material.passes ?? []).map((pass) => pass.program.module),
|
|
10367
|
+
...material.surface === void 0 ? [] : [material.surface.module]
|
|
10368
|
+
])
|
|
10366
10369
|
};
|
|
10367
10370
|
}
|
|
10368
10371
|
function createMaterialArtifactDigest(bytes) {
|
|
@@ -10535,6 +10538,8 @@ function validateCookedMaterialRecord(value) {
|
|
|
10535
10538
|
return invalid("resolved.parameters", resolved.parameters);
|
|
10536
10539
|
if (resolved.values === null || typeof resolved.values !== "object" || Array.isArray(resolved.values))
|
|
10537
10540
|
return invalid("resolved.values", resolved.values);
|
|
10541
|
+
if (resolved.surface !== void 0 && !isMaterialSurfaceDeclaration(resolved.surface))
|
|
10542
|
+
return invalid("resolved.surface", resolved.surface);
|
|
10538
10543
|
const passes = resolved.passes;
|
|
10539
10544
|
const passNames = /* @__PURE__ */ new Set();
|
|
10540
10545
|
for (const [index, pass] of passes.entries()) {
|