@forgeax/engine-pack 0.1.23 → 0.1.24
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 +12 -6
- package/dist/__tests__/material-cook-receipt-layer-plan.unit.test.d.ts +2 -0
- package/dist/__tests__/material-cook-receipt-layer-plan.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pack-authoring-gateway.unit.test.d.ts +2 -0
- package/dist/__tests__/pack-authoring-gateway.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pack-authoring.unit.test.d.ts +2 -0
- package/dist/__tests__/pack-authoring.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pack-scanner.unit.test.d.ts +2 -0
- package/dist/__tests__/pack-scanner.unit.test.d.ts.map +1 -0
- package/dist/build.d.ts +3 -3
- package/dist/build.d.ts.map +1 -1
- package/dist/build.mjs +331 -290
- package/dist/build.mjs.map +1 -1
- package/dist/cli-asset.mjs +33 -35
- package/dist/cli-asset.mjs.map +1 -1
- package/dist/evidence/material-cook.d.ts +11 -0
- package/dist/evidence/material-cook.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +69 -26
- package/dist/index.mjs.map +1 -1
- package/dist/material-cook.d.ts +1 -1
- package/dist/material-cook.d.ts.map +1 -1
- package/dist/material-cook.mjs +50 -3
- package/dist/material-cook.mjs.map +1 -1
- package/dist/{parameterized-pack-node.d.ts → pack-authoring-node.d.ts} +7 -7
- package/dist/pack-authoring-node.d.ts.map +1 -0
- package/dist/{parameterized-pack-node.mjs → pack-authoring-node.mjs} +59 -63
- package/dist/pack-authoring-node.mjs.map +1 -0
- package/dist/{parameterized-pack.d.ts → pack-authoring.d.ts} +28 -31
- package/dist/pack-authoring.d.ts.map +1 -0
- package/dist/pack-authoring.mjs +1137 -0
- package/dist/pack-authoring.mjs.map +1 -0
- package/dist/runtime.mjs +1 -1
- package/dist/runtime.mjs.map +1 -1
- package/dist/scanner.d.ts +8 -8
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.mjs +29 -31
- package/dist/scanner.mjs.map +1 -1
- package/dist/schema.mjs +1 -1
- package/dist/schema.mjs.map +1 -1
- package/dist/scriptable-pack-node.d.ts +4 -4
- package/dist/scriptable-pack-node.d.ts.map +1 -1
- package/dist/scriptable-pack-node.mjs +18 -20
- package/dist/scriptable-pack-node.mjs.map +1 -1
- package/dist/scriptable-pack.d.ts +3 -2
- package/dist/scriptable-pack.d.ts.map +1 -1
- package/dist/scriptable-pack.mjs +19 -23
- package/dist/scriptable-pack.mjs.map +1 -1
- package/package.json +2 -7
- package/schema/pack.schema.json +1 -1
- package/src/__tests__/material-cook-receipt-layer-plan.unit.test.ts +16 -0
- package/src/__tests__/material-cook-schema.unit.test.ts +62 -0
- package/src/__tests__/{parameterized-pack-authoring-gateway.unit.test.ts → pack-authoring-gateway.unit.test.ts} +9 -9
- package/src/__tests__/{parameterized-pack.unit.test.ts → pack-authoring.unit.test.ts} +10 -10
- package/src/__tests__/{parameterized-pack-scanner.unit.test.ts → pack-scanner.unit.test.ts} +6 -6
- package/src/__tests__/scanner-inventory.contract.test.ts +2 -4
- package/src/__tests__/scanner-inventory.test.ts +7 -6
- package/src/__tests__/scriptable-pack-cli.integration.test.ts +1 -1
- package/src/build.ts +8 -8
- package/src/catalog-builder.ts +3 -3
- package/src/cli-asset.ts +5 -5
- package/src/evidence/material-cook.ts +79 -3
- package/src/evidence/source-inventory.ts +3 -3
- package/src/index.ts +4 -1
- package/src/material-cook.ts +1 -0
- package/src/{parameterized-pack-node.ts → pack-authoring-node.ts} +71 -73
- package/src/{parameterized-pack.ts → pack-authoring.ts} +59 -74
- package/src/scanner.ts +26 -28
- package/src/schema/material-cook.schema.json +4 -1
- package/src/scriptable-pack-node.ts +25 -25
- package/src/scriptable-pack.ts +3 -2
- package/dist/__tests__/parameterized-pack-authoring-gateway.unit.test.d.ts +0 -2
- package/dist/__tests__/parameterized-pack-authoring-gateway.unit.test.d.ts.map +0 -1
- package/dist/__tests__/parameterized-pack-scanner.unit.test.d.ts +0 -2
- package/dist/__tests__/parameterized-pack-scanner.unit.test.d.ts.map +0 -1
- package/dist/__tests__/parameterized-pack.unit.test.d.ts +0 -2
- package/dist/__tests__/parameterized-pack.unit.test.d.ts.map +0 -1
- package/dist/parameterized-pack-node.d.ts.map +0 -1
- package/dist/parameterized-pack-node.mjs.map +0 -1
- package/dist/parameterized-pack.d.ts.map +0 -1
|
@@ -41,6 +41,8 @@ export interface MaterialCookReceipt {
|
|
|
41
41
|
readonly identity: MaterialCookIdentity;
|
|
42
42
|
readonly derivedInterface: {
|
|
43
43
|
readonly layoutIdentity: string;
|
|
44
|
+
/** Build-time Standard physical lowering identity, when the root is Standard. */
|
|
45
|
+
readonly layerPlanIdentity?: string;
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
48
|
export interface MaterialParameterContract {
|
|
@@ -81,6 +83,15 @@ export interface MaterialCookIdentityExpectation {
|
|
|
81
83
|
readonly artifactDigest?: string;
|
|
82
84
|
readonly inputDigest?: string;
|
|
83
85
|
}
|
|
86
|
+
/** Shared ownership predicate for the built-in Standard material root. */
|
|
87
|
+
export declare function isStandardRootModule(module: string): boolean;
|
|
88
|
+
export declare function isStandardMaterialRecord(record: Pick<CookedMaterialRecord, 'resolved'>): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Recompute the Standard layer identity from the admitted resolved root.
|
|
91
|
+
* Material admission and runtime loading share this owner so a stale receipt
|
|
92
|
+
* cannot select a different physical layer plan after cooking.
|
|
93
|
+
*/
|
|
94
|
+
export declare function materialLayerPlanIdentity(record: Pick<CookedMaterialRecord, 'resolved'>): string | undefined;
|
|
84
95
|
export declare function collectMaterialCookRefs(material: Partial<MaterialAsset>): MaterialCookRefs;
|
|
85
96
|
export declare function createMaterialArtifactDigest(bytes: Uint8Array): string;
|
|
86
97
|
export declare function createMaterialCookIdentity(input: MaterialCookIdentityInput): MaterialCookIdentity;
|
|
@@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AAE,OAAO,EACd,QAAQ,GAAE,+BAAoC,GAC7C,MAAM,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,CAkEtD;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,GACb,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,CAmGvD;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,oBAAoB,GAC3B,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,UAAU,CAAC,CAQjD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { type CookedMaterialRecord, collectMaterialCookRefs, createMaterialArtifactDigest, createMaterialCookIdentity, type MaterialCookArtifact, type MaterialCookIdentity, type MaterialCookIdentityExpectation, type MaterialCookIdentityInput, type MaterialCookReceipt, type MaterialCookRecordError, type MaterialCookRefs, type MaterialCookWasmProvenance, projectCookedMaterialRecord, serializeCookedMaterialRecord, serializeMaterialCookReceipt, validateCookedMaterialRecord, validateMaterialCookReceipt, } from './evidence/material-cook.js';
|
|
1
|
+
export { type CookedMaterialRecord, collectMaterialCookRefs, createMaterialArtifactDigest, createMaterialCookIdentity, isStandardMaterialRecord, isStandardRootModule, type MaterialCookArtifact, type MaterialCookIdentity, type MaterialCookIdentityExpectation, type MaterialCookIdentityInput, type MaterialCookReceipt, type MaterialCookRecordError, type MaterialCookRefs, type MaterialCookWasmProvenance, materialLayerPlanIdentity, projectCookedMaterialRecord, serializeCookedMaterialRecord, serializeMaterialCookReceipt, validateCookedMaterialRecord, validateMaterialCookReceipt, } from './evidence/material-cook.js';
|
|
2
2
|
export { buildOfflineAssetEvidence, packageVerification } from './evidence/offline-evidence.js';
|
|
3
3
|
export { AssetGuid, isValidAssetGuidString, isValidPackSourceKey, PACK_SOURCE_KEY_RE, PackageId, } from './guid.js';
|
|
4
4
|
export { decodeMeshBinHeader, MESH_BIN_DIGEST_BYTES, MESH_BIN_HEADER_V4_BYTES, MESH_BIN_PROJECTION_VERSION, MESH_BIN_VERSION, type MeshBinContractError, type MeshBinHeaderResult, type MeshBinHeaderV4, writeMeshBinHeader, } from './mesh-bin-contract.js';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './pack-authoring.js';
|
|
6
6
|
export { validateProducerContract, validateProducerOutputs } from './producer-contract.js';
|
|
7
7
|
export { type AssetReader, isScriptablePackAssetKind, projectScriptablePackSceneComponents, SCRIPTABLE_PACK_ASSET_KINDS, type ScriptablePackAssetKind, type ScriptablePackReadError, type ScriptablePackSceneComponent, type ScriptablePackSceneComponentInput, type ScriptablePackSourceClosureEntry, } from './scriptable-pack.js';
|
|
8
8
|
export { calculateTopologyDiff, diffTopology } from './topology.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,EAC/B,2BAA2B,EAC3B,6BAA6B,EAC7B,4BAA4B,EAC5B,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,EACL,SAAS,EACT,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,GACV,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,2BAA2B,EAC3B,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,kBAAkB,GACnB,M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AAK,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE5F,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAI1D,YAAY,EACV,aAAa,EACb,cAAc,EACd,KAAK,EACL,cAAc,EACd,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,EACT,MAAM,EACN,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,aAAa,EACb,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,UAAU,GACX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,GAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAElF,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAWvE"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MATERIAL_TEXTURE_SLOTS, ok, projectCookProductEvidence, projectAssetEvidence, err, validateSourceOverrideMap } from '@forgeax/engine-types';
|
|
1
|
+
import { deriveStandardLayerPlan, MATERIAL_TEXTURE_SLOTS, ok, projectCookProductEvidence, projectAssetEvidence, err, validateSourceOverrideMap } from '@forgeax/engine-types';
|
|
2
2
|
import { sha256 } from '@noble/hashes/sha2.js';
|
|
3
3
|
import { bytesToHex } from '@noble/hashes/utils.js';
|
|
4
4
|
import { sha1 } from '@noble/hashes/legacy.js';
|
|
@@ -6815,6 +6815,24 @@ var require_dist = __commonJS({
|
|
|
6815
6815
|
exports.default = formatsPlugin;
|
|
6816
6816
|
}
|
|
6817
6817
|
});
|
|
6818
|
+
var STANDARD_ROOT_MODULES = /* @__PURE__ */ new Set([
|
|
6819
|
+
"forgeax::default-standard-pbr",
|
|
6820
|
+
"forgeax::pbr-skin",
|
|
6821
|
+
"forgeax_material::standard",
|
|
6822
|
+
"forgeax_material::pbr-skin"
|
|
6823
|
+
]);
|
|
6824
|
+
function isStandardRootModule(module) {
|
|
6825
|
+
return STANDARD_ROOT_MODULES.has(module);
|
|
6826
|
+
}
|
|
6827
|
+
function isStandardMaterialRecord(record) {
|
|
6828
|
+
return record.resolved.passes.some((pass) => isStandardRootModule(pass.program.module));
|
|
6829
|
+
}
|
|
6830
|
+
function materialLayerPlanIdentity(record) {
|
|
6831
|
+
if (!isStandardMaterialRecord(record)) {
|
|
6832
|
+
return void 0;
|
|
6833
|
+
}
|
|
6834
|
+
return deriveStandardLayerPlan(record.resolved.parameters, record.resolved.passes).identity;
|
|
6835
|
+
}
|
|
6818
6836
|
function unique(values) {
|
|
6819
6837
|
return [...new Set(values)].sort();
|
|
6820
6838
|
}
|
|
@@ -6965,6 +6983,12 @@ function validateMaterialCookReceipt(value, expected = {}) {
|
|
|
6965
6983
|
if (derivedInterface.layoutIdentity !== identity.layoutIdentity) {
|
|
6966
6984
|
return invalid("receipt.derivedInterface.layoutIdentity", derivedInterface.layoutIdentity);
|
|
6967
6985
|
}
|
|
6986
|
+
if (derivedInterface.layerPlanIdentity !== void 0 && (typeof derivedInterface.layerPlanIdentity !== "string" || derivedInterface.layerPlanIdentity.length === 0)) {
|
|
6987
|
+
return invalid(
|
|
6988
|
+
"receipt.derivedInterface.layerPlanIdentity",
|
|
6989
|
+
derivedInterface.layerPlanIdentity
|
|
6990
|
+
);
|
|
6991
|
+
}
|
|
6968
6992
|
for (const field of ["sourceClosure", "profile", "compilerVersion"]) {
|
|
6969
6993
|
const fieldValue = candidate[field];
|
|
6970
6994
|
if (field === "sourceClosure" && !Array.isArray(fieldValue) || field !== "sourceClosure" && typeof fieldValue !== "string") {
|
|
@@ -6990,7 +7014,10 @@ function validateMaterialCookReceipt(value, expected = {}) {
|
|
|
6990
7014
|
profile: candidate.profile,
|
|
6991
7015
|
compilerVersion: candidate.compilerVersion,
|
|
6992
7016
|
identity,
|
|
6993
|
-
derivedInterface: {
|
|
7017
|
+
derivedInterface: {
|
|
7018
|
+
layoutIdentity: derivedInterface.layoutIdentity,
|
|
7019
|
+
...derivedInterface.layerPlanIdentity === void 0 ? {} : { layerPlanIdentity: derivedInterface.layerPlanIdentity }
|
|
7020
|
+
}
|
|
6994
7021
|
});
|
|
6995
7022
|
}
|
|
6996
7023
|
function validateCookedMaterialRecord(value) {
|
|
@@ -7033,6 +7060,26 @@ function validateCookedMaterialRecord(value) {
|
|
|
7033
7060
|
artifactDigest: artifact.digest
|
|
7034
7061
|
});
|
|
7035
7062
|
if (!receiptResult.ok) return receiptResult;
|
|
7063
|
+
const resolved = candidate.resolved;
|
|
7064
|
+
if (!Array.isArray(resolved.passes)) return invalid("resolved.passes", resolved.passes);
|
|
7065
|
+
if (!Array.isArray(resolved.parameters))
|
|
7066
|
+
return invalid("resolved.parameters", resolved.parameters);
|
|
7067
|
+
if (resolved.values === null || typeof resolved.values !== "object" || Array.isArray(resolved.values))
|
|
7068
|
+
return invalid("resolved.values", resolved.values);
|
|
7069
|
+
let expectedLayerPlanIdentity;
|
|
7070
|
+
try {
|
|
7071
|
+
expectedLayerPlanIdentity = materialLayerPlanIdentity({
|
|
7072
|
+
resolved
|
|
7073
|
+
});
|
|
7074
|
+
} catch (error) {
|
|
7075
|
+
return invalid("resolved.layerPlanIdentity", error instanceof Error ? error.message : error);
|
|
7076
|
+
}
|
|
7077
|
+
if (expectedLayerPlanIdentity !== void 0 && receiptResult.value.derivedInterface.layerPlanIdentity !== expectedLayerPlanIdentity) {
|
|
7078
|
+
return invalid(
|
|
7079
|
+
"receipt.derivedInterface.layerPlanIdentity",
|
|
7080
|
+
receiptResult.value.derivedInterface.layerPlanIdentity
|
|
7081
|
+
);
|
|
7082
|
+
}
|
|
7036
7083
|
if (candidate.artifactDigest !== void 0 && candidate.artifactDigest !== artifact.digest)
|
|
7037
7084
|
return invalid("artifactDigest", candidate.artifactDigest);
|
|
7038
7085
|
if (candidate.publicationGeneration !== void 0 && receiptResult.value.identity.cookGeneration !== candidate.publicationGeneration)
|
|
@@ -7780,10 +7827,10 @@ function definePack(definition) {
|
|
|
7780
7827
|
validated.value
|
|
7781
7828
|
);
|
|
7782
7829
|
}
|
|
7783
|
-
function
|
|
7830
|
+
function projectScriptablePackMeta(definition, sourcePath) {
|
|
7784
7831
|
return {
|
|
7785
7832
|
schemaVersion: "2.0.0",
|
|
7786
|
-
kind: "
|
|
7833
|
+
kind: "scriptable-pack-source",
|
|
7787
7834
|
packageId: PackageId.format(definition.packageId),
|
|
7788
7835
|
source: sourcePath,
|
|
7789
7836
|
..."parameters" in definition ? {
|
|
@@ -7880,7 +7927,7 @@ function validatePackDefinition(value, sourcePath) {
|
|
|
7880
7927
|
})
|
|
7881
7928
|
);
|
|
7882
7929
|
}
|
|
7883
|
-
function
|
|
7930
|
+
function hasPackParameters(value) {
|
|
7884
7931
|
return isRecord(value) && Array.isArray(value.parameters) && value.parameters.length > 0;
|
|
7885
7932
|
}
|
|
7886
7933
|
function resolvePackParameterValues(definition, overrides = {}, inheritedValues) {
|
|
@@ -8023,7 +8070,7 @@ function parsePackJsonAsset(value, sourceKey2) {
|
|
|
8023
8070
|
};
|
|
8024
8071
|
return ok(withArtifacts);
|
|
8025
8072
|
}
|
|
8026
|
-
function
|
|
8073
|
+
function parsePackSourceJson(value) {
|
|
8027
8074
|
if (!isRecord(value))
|
|
8028
8075
|
return jsonError("$", "a v3 pack.json object", value, "document is not an object");
|
|
8029
8076
|
if (value.schemaVersion !== "3.0.0")
|
|
@@ -8102,10 +8149,8 @@ function parseParameterizedPackJson(value) {
|
|
|
8102
8149
|
values: Object.freeze({ ...value.values })
|
|
8103
8150
|
});
|
|
8104
8151
|
}
|
|
8105
|
-
var parsePackJson = parseParameterizedPackJson;
|
|
8106
|
-
var parsePackAuthoringJson = parseParameterizedPackJson;
|
|
8107
8152
|
function projectDirectPackJson(value) {
|
|
8108
|
-
const parsed = "format" in value ? ok(value) :
|
|
8153
|
+
const parsed = "format" in value ? ok(value) : parsePackSourceJson(value);
|
|
8109
8154
|
if (!parsed.ok) return parsed;
|
|
8110
8155
|
if (parsed.value.format !== "direct") {
|
|
8111
8156
|
return failure2(
|
|
@@ -8151,9 +8196,9 @@ async function resolvePackParameterInheritance(subject, readParent) {
|
|
|
8151
8196
|
if (current.format === "direct") {
|
|
8152
8197
|
return failure2(
|
|
8153
8198
|
authoringError(
|
|
8154
|
-
"pack-parent-
|
|
8155
|
-
"a
|
|
8156
|
-
"direct packs cannot be instance parents; point the instance at a
|
|
8199
|
+
"pack-parent-has-no-parameters",
|
|
8200
|
+
"a ScriptablePack source with parameters as the parent",
|
|
8201
|
+
"direct packs cannot be instance parents; point the instance at a ScriptablePack source with parameters",
|
|
8157
8202
|
{ packageId: currentId }
|
|
8158
8203
|
)
|
|
8159
8204
|
);
|
|
@@ -8164,7 +8209,7 @@ async function resolvePackParameterInheritance(subject, readParent) {
|
|
|
8164
8209
|
if (descriptors2.value.length === 0) {
|
|
8165
8210
|
return failure2(
|
|
8166
8211
|
authoringError(
|
|
8167
|
-
"pack-parent-
|
|
8212
|
+
"pack-parent-has-no-parameters",
|
|
8168
8213
|
"the parent source to declare a non-empty parameter list",
|
|
8169
8214
|
"use clone for an independent zero-parameter Pack instead of creating an empty instance",
|
|
8170
8215
|
{ packageId: currentId }
|
|
@@ -8190,7 +8235,7 @@ async function resolvePackParameterInheritance(subject, readParent) {
|
|
|
8190
8235
|
authoringError(
|
|
8191
8236
|
"pack-parent-not-found",
|
|
8192
8237
|
"the parent packageId to resolve in the source index",
|
|
8193
|
-
"inspect the parent locator or recreate the instance from a live
|
|
8238
|
+
"inspect the parent locator or recreate the instance from a live ScriptablePack with parameters",
|
|
8194
8239
|
{ packageId: currentId, parent: PackageId.format(current.parent) }
|
|
8195
8240
|
)
|
|
8196
8241
|
);
|
|
@@ -8232,7 +8277,7 @@ async function resolvePackParameterInheritance(subject, readParent) {
|
|
|
8232
8277
|
return visit(subject, []);
|
|
8233
8278
|
}
|
|
8234
8279
|
var resolvePackInheritance = resolvePackParameterInheritance;
|
|
8235
|
-
var
|
|
8280
|
+
var PACK_AUTHORING_OPERATION_IDS = [
|
|
8236
8281
|
"asset.list",
|
|
8237
8282
|
"asset.inspect",
|
|
8238
8283
|
"asset.resolve",
|
|
@@ -8244,7 +8289,7 @@ var PARAMETERIZED_PACK_OPERATION_IDS = [
|
|
|
8244
8289
|
"asset-source.rebuild",
|
|
8245
8290
|
"asset-source.cold-cook"
|
|
8246
8291
|
];
|
|
8247
|
-
function
|
|
8292
|
+
function createPackAuthoringGateway(port) {
|
|
8248
8293
|
const requests = /* @__PURE__ */ new Map();
|
|
8249
8294
|
return {
|
|
8250
8295
|
execute(operation) {
|
|
@@ -8310,14 +8355,12 @@ function createParameterizedPackAuthoringGateway(port) {
|
|
|
8310
8355
|
}
|
|
8311
8356
|
};
|
|
8312
8357
|
}
|
|
8313
|
-
var
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
})
|
|
8320
|
-
);
|
|
8358
|
+
var PACK_AUTHORING_OPERATION_DESCRIPTORS = PACK_AUTHORING_OPERATION_IDS.map((id) => ({
|
|
8359
|
+
id,
|
|
8360
|
+
domain: id.startsWith("asset-source.") ? "session" : "asset",
|
|
8361
|
+
readOnly: id.startsWith("asset."),
|
|
8362
|
+
requiresRevision: !id.startsWith("asset.") && id !== "asset-source.create"
|
|
8363
|
+
}));
|
|
8321
8364
|
function isRecord2(value) {
|
|
8322
8365
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8323
8366
|
}
|
|
@@ -8954,7 +8997,7 @@ var pack_schema_default = {
|
|
|
8954
8997
|
},
|
|
8955
8998
|
parent: {
|
|
8956
8999
|
$ref: "#/$defs/guid36",
|
|
8957
|
-
description: "Parent
|
|
9000
|
+
description: "Parent ScriptablePack packageId for one v3 instance; the source may declare Pack parameters."
|
|
8958
9001
|
},
|
|
8959
9002
|
values: {
|
|
8960
9003
|
type: "object",
|
|
@@ -9301,6 +9344,6 @@ function parsePackV2(value) {
|
|
|
9301
9344
|
return ok(value);
|
|
9302
9345
|
}
|
|
9303
9346
|
|
|
9304
|
-
export { AssetGuid, MESH_BIN_DIGEST_BYTES, MESH_BIN_HEADER_V4_BYTES, MESH_BIN_PROJECTION_VERSION, MESH_BIN_VERSION,
|
|
9347
|
+
export { AssetGuid, MESH_BIN_DIGEST_BYTES, MESH_BIN_HEADER_V4_BYTES, MESH_BIN_PROJECTION_VERSION, MESH_BIN_VERSION, PACK_AUTHORING_OPERATION_DESCRIPTORS, PACK_AUTHORING_OPERATION_IDS, PACK_PARAMETER_TYPES, PACK_SOURCE_KEY_RE, PackageId, SCRIPTABLE_PACK_ASSET_KINDS, buildOfflineAssetEvidence, calculateTopologyDiff, collectMaterialCookRefs, createMaterialArtifactDigest, createMaterialCookIdentity, createPackAuthoringGateway, decodeMeshBinHeader, definePack, definePackageId, diffTopology, hasPackParameters, isScriptablePackAssetKind, isStandardMaterialRecord, isStandardRootModule, isValidAssetGuidString, isValidPackSourceKey, materialLayerPlanIdentity, packageVerification, parsePackSourceJson, parsePackV2, projectCookedMaterialRecord, projectDirectPackJson, projectRuntimePack, projectScriptablePackMeta, projectScriptablePackSceneComponents, resolvePackInheritance, resolvePackParameterInheritance, resolvePackParameterValues, serializeCookedMaterialRecord, serializeMaterialCookReceipt, validateArtifactPath, validateCookedMaterialRecord, validateMaterialCookReceipt, validateMeta, validatePack, validatePackDefinition, validatePackV2, validateProducerContract, validateProducerOutputs, writeMaterialArtifact, writeMeshBinHeader };
|
|
9305
9348
|
//# sourceMappingURL=index.mjs.map
|
|
9306
9349
|
//# sourceMappingURL=index.mjs.map
|