@forgeax/engine-pack 0.1.28 → 0.1.29
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 +17 -5
- package/dist/build.mjs +34 -51
- package/dist/build.mjs.map +1 -1
- package/dist/cli-asset.mjs +21 -12
- package/dist/cli-asset.mjs.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/inventory/declaration.d.ts +1 -1
- package/dist/inventory/declaration.d.ts.map +1 -1
- package/dist/inventory/sync.d.ts.map +1 -1
- package/dist/native-cooker-registry.d.ts +1 -0
- package/dist/native-cooker-registry.d.ts.map +1 -1
- package/dist/native-cooker.mjs.map +1 -1
- package/dist/pack-authoring-node.mjs +21 -12
- package/dist/pack-authoring-node.mjs.map +1 -1
- package/dist/runtime.mjs.map +1 -1
- package/dist/scanner.mjs +21 -12
- package/dist/scanner.mjs.map +1 -1
- package/dist/schema-compiled.d.ts.map +1 -1
- package/dist/schema.mjs +40 -62
- package/dist/schema.mjs.map +1 -1
- package/dist/scriptable-pack-node.d.ts.map +1 -1
- package/dist/scriptable-pack-node.mjs +11 -3
- package/dist/scriptable-pack-node.mjs.map +1 -1
- package/dist/scriptable-pack-worker.mjs +5 -1
- package/dist/scriptable-pack-worker.mjs.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/inventory-schema.test.ts +10 -10
- package/src/__tests__/pack-authoring.unit.test.ts +2 -4
- package/src/__tests__/pack.unit.test.ts +86 -124
- package/src/__tests__/scanner-instance-cycle.test.ts +92 -0
- package/src/__tests__/scanner-inventory.contract.test.ts +2 -2
- package/src/__tests__/scriptable-pack-diagnostic.integration.test.ts +45 -0
- package/src/inventory/binding.ts +3 -3
- package/src/inventory/declaration.ts +10 -48
- package/src/inventory/sync.ts +3 -2
- package/src/native-cooker-registry.ts +1 -0
- package/src/scanner.ts +28 -28
- package/src/schema-compiled.ts +40 -79
- package/src/scriptable-pack-node.ts +11 -3
- package/src/scriptable-pack-worker.ts +8 -1
- package/src/__tests__/scanner-mount-cycle.test.ts +0 -232
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-compiled.d.ts","sourceRoot":"","sources":["../src/schema-compiled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAC;AASjD,eAAO,MAAM,YAAY;;EAA8B,CAAC;AACxD,eAAO,MAAM,YAAY;;EAA8B,CAAC;AAExD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAS9D;AAwCD,wBAAgB,wBAAwB,CACtC,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACjD,gBAAgB,
|
|
1
|
+
{"version":3,"file":"schema-compiled.d.ts","sourceRoot":"","sources":["../src/schema-compiled.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAC;AASjD,eAAO,MAAM,YAAY;;EAA8B,CAAC;AACxD,eAAO,MAAM,YAAY;;EAA8B,CAAC;AAExD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAS9D;AAwCD,wBAAgB,wBAAwB,CACtC,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACjD,gBAAgB,CAiFlB;AAsBD,wBAAgB,2BAA2B,CACzC,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,GACtC,gBAAgB,CA+BlB"}
|
package/dist/schema.mjs
CHANGED
|
@@ -7317,91 +7317,69 @@ function buildSceneAssetValidator(componentSchemas) {
|
|
|
7317
7317
|
for (const [name, sub] of Object.entries(componentSchemas)) {
|
|
7318
7318
|
componentsProperties[name] = sub;
|
|
7319
7319
|
}
|
|
7320
|
-
const
|
|
7320
|
+
const componentsSchema = {
|
|
7321
7321
|
type: "object",
|
|
7322
7322
|
additionalProperties: false,
|
|
7323
|
-
|
|
7324
|
-
properties: {
|
|
7325
|
-
localId: { type: "integer", minimum: 0 },
|
|
7326
|
-
comp: { type: "string", minLength: 1 },
|
|
7327
|
-
field: { type: "string", minLength: 1 },
|
|
7328
|
-
value: {}
|
|
7329
|
-
}
|
|
7323
|
+
properties: componentsProperties
|
|
7330
7324
|
};
|
|
7331
|
-
const
|
|
7325
|
+
const instanceSchema = {
|
|
7332
7326
|
type: "object",
|
|
7333
7327
|
additionalProperties: false,
|
|
7334
|
-
required: ["
|
|
7328
|
+
required: ["source"],
|
|
7335
7329
|
properties: {
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
additionalProperties: false,
|
|
7344
|
-
properties: componentsProperties
|
|
7330
|
+
// Authored scenes use a GUID string. Pack output may carry a refs[]
|
|
7331
|
+
// index, which is resolved by the Scene decoder before instantiation.
|
|
7332
|
+
source: {
|
|
7333
|
+
oneOf: [
|
|
7334
|
+
{ type: "string", minLength: 1 },
|
|
7335
|
+
{ type: "integer", minimum: 0 }
|
|
7336
|
+
]
|
|
7345
7337
|
},
|
|
7346
7338
|
overrides: {
|
|
7347
7339
|
type: "array",
|
|
7348
|
-
items:
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
"sourceRevision",
|
|
7357
|
-
"publicationGeneration",
|
|
7358
|
-
"outputDigest",
|
|
7359
|
-
"outputSetDigest",
|
|
7360
|
-
"receiptIdentity"
|
|
7361
|
-
],
|
|
7362
|
-
properties: {
|
|
7363
|
-
schemaVersion: { type: "string", const: "scene-publication-fence/1" },
|
|
7364
|
-
sourcePath: { type: "string", minLength: 1 },
|
|
7365
|
-
sourceRevision: { type: "string", minLength: 1 },
|
|
7366
|
-
publicationGeneration: { type: "integer", minimum: 1 },
|
|
7367
|
-
outputDigest: { type: "string", minLength: 1 },
|
|
7368
|
-
outputSetDigest: { type: "string", minLength: 1 },
|
|
7369
|
-
receiptIdentity: { type: "string", minLength: 1 }
|
|
7340
|
+
items: {
|
|
7341
|
+
type: "object",
|
|
7342
|
+
additionalProperties: false,
|
|
7343
|
+
required: ["target", "components"],
|
|
7344
|
+
properties: {
|
|
7345
|
+
target: { type: "array", minItems: 1, items: { type: "string", minLength: 1 } },
|
|
7346
|
+
components: componentsSchema
|
|
7347
|
+
}
|
|
7370
7348
|
}
|
|
7371
7349
|
}
|
|
7372
7350
|
}
|
|
7373
7351
|
};
|
|
7352
|
+
const entitySchema = {
|
|
7353
|
+
type: "object",
|
|
7354
|
+
additionalProperties: false,
|
|
7355
|
+
required: ["components"],
|
|
7356
|
+
properties: {
|
|
7357
|
+
components: componentsSchema,
|
|
7358
|
+
instance: instanceSchema
|
|
7359
|
+
}
|
|
7360
|
+
};
|
|
7374
7361
|
const sceneSchema = {
|
|
7375
7362
|
type: "object",
|
|
7376
7363
|
additionalProperties: false,
|
|
7377
7364
|
required: ["kind", "entities"],
|
|
7378
7365
|
properties: {
|
|
7379
7366
|
kind: { type: "string", const: "scene" },
|
|
7380
|
-
|
|
7381
|
-
|
|
7367
|
+
// Skin assets are explicit scene dependencies so async catalog loading
|
|
7368
|
+
// can finish the joint-wiring path before the Scene is instantiated.
|
|
7369
|
+
// Authored producers use GUID strings; Pack output may use refs[] indices.
|
|
7370
|
+
skinGuids: {
|
|
7382
7371
|
type: "array",
|
|
7383
7372
|
items: {
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
localId: { type: "integer", minimum: 0 },
|
|
7389
|
-
bindingKey: { type: "string", minLength: 1 },
|
|
7390
|
-
components: {
|
|
7391
|
-
type: "object",
|
|
7392
|
-
additionalProperties: false,
|
|
7393
|
-
properties: componentsProperties
|
|
7394
|
-
}
|
|
7395
|
-
}
|
|
7373
|
+
oneOf: [
|
|
7374
|
+
{ type: "string", minLength: 1 },
|
|
7375
|
+
{ type: "integer", minimum: 0 }
|
|
7376
|
+
]
|
|
7396
7377
|
}
|
|
7397
7378
|
},
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
mounts: {
|
|
7403
|
-
type: "array",
|
|
7404
|
-
items: mountSchema
|
|
7379
|
+
entities: {
|
|
7380
|
+
type: "object",
|
|
7381
|
+
propertyNames: { type: "string", minLength: 1 },
|
|
7382
|
+
additionalProperties: entitySchema
|
|
7405
7383
|
}
|
|
7406
7384
|
}
|
|
7407
7385
|
};
|