@forgeax/engine-import 0.1.3 → 0.1.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/README.md +6 -5
- package/dist/.tsbuildinfo +1 -1
- package/dist/__tests__/owner-chain.integration.test.d.ts +2 -0
- package/dist/__tests__/owner-chain.integration.test.d.ts.map +1 -0
- package/dist/__tests__/scriptable-pack-host.unit.test.d.ts +2 -0
- package/dist/__tests__/scriptable-pack-host.unit.test.d.ts.map +1 -0
- package/dist/__tests__/scriptable-pack-product.contract.test.d.ts +2 -0
- package/dist/__tests__/scriptable-pack-product.contract.test.d.ts.map +1 -0
- package/dist/browser.d.ts +5 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.mjs +782 -0
- package/dist/browser.mjs.map +1 -0
- package/dist/build-production.d.ts +48 -0
- package/dist/build-production.d.ts.map +1 -0
- package/dist/catalog-importer-policy.d.ts +13 -0
- package/dist/catalog-importer-policy.d.ts.map +1 -0
- package/dist/catalog-inventory.d.ts +4 -0
- package/dist/catalog-inventory.d.ts.map +1 -0
- package/dist/import-product.d.ts +16 -25
- package/dist/import-product.d.ts.map +1 -1
- package/dist/import-runner.d.ts +6 -3
- package/dist/import-runner.d.ts.map +1 -1
- package/dist/importer-registry.d.ts +9 -1
- package/dist/importer-registry.d.ts.map +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1380 -155
- package/dist/index.mjs.map +1 -1
- package/dist/mesh-bin.d.ts +1 -1
- package/dist/mesh-bin.d.ts.map +1 -1
- package/dist/mesh-bin.mjs +182 -0
- package/dist/mesh-bin.mjs.map +1 -0
- package/dist/pack-projection.d.ts +5 -0
- package/dist/pack-projection.d.ts.map +1 -0
- package/dist/scriptable-pack-host.d.ts +72 -0
- package/dist/scriptable-pack-host.d.ts.map +1 -0
- package/dist/scriptable-pack-output-producers.d.ts +3 -2
- package/dist/scriptable-pack-output-producers.d.ts.map +1 -1
- package/dist/scriptable-pack-staged-snapshot.d.ts +1 -2
- package/dist/scriptable-pack-staged-snapshot.d.ts.map +1 -1
- package/dist/scriptable-pack.d.ts +6 -18
- package/dist/scriptable-pack.d.ts.map +1 -1
- package/dist/scriptable-source-package.d.ts +14 -0
- package/dist/scriptable-source-package.d.ts.map +1 -0
- package/dist/source-package-errors.d.ts +52 -0
- package/dist/source-package-errors.d.ts.map +1 -0
- package/dist/source-package-publication.d.ts +63 -0
- package/dist/source-package-publication.d.ts.map +1 -0
- package/dist/source-package.d.ts +60 -0
- package/dist/source-package.d.ts.map +1 -0
- package/package.json +13 -7
- package/src/__tests__/import-contract-migration.test.ts +33 -0
- package/src/__tests__/import-local-artifacts.test.ts +3 -1
- package/src/__tests__/owner-chain.integration.test.ts +37 -0
- package/src/__tests__/scriptable-pack-host.unit.test.ts +86 -0
- package/src/__tests__/scriptable-pack-product.contract.test.ts +47 -0
- package/src/__tests__/scriptable-pack-production-producers.unit.test.ts +78 -19
- package/src/__tests__/scriptable-pack-staged-snapshot.unit.test.ts +52 -20
- package/src/browser.ts +14 -0
- package/src/build-production.ts +493 -0
- package/src/catalog-importer-policy.ts +58 -0
- package/src/catalog-inventory.ts +24 -0
- package/src/import-product.ts +37 -69
- package/src/import-runner.ts +36 -7
- package/src/importer-registry.ts +24 -1
- package/src/index.ts +80 -8
- package/src/mesh-bin.ts +2 -2
- package/src/pack-projection.ts +21 -0
- package/src/scriptable-pack-host.ts +544 -0
- package/src/scriptable-pack-output-producers.ts +48 -58
- package/src/scriptable-pack-staged-snapshot.ts +17 -6
- package/src/scriptable-pack.ts +37 -26
- package/src/scriptable-source-package.ts +88 -0
- package/src/source-package-errors.ts +201 -0
- package/src/source-package-publication.ts +295 -0
- package/src/source-package.ts +187 -0
- package/dist/__tests__/material-import-product.unit.test.d.ts +0 -2
- package/dist/__tests__/material-import-product.unit.test.d.ts.map +0 -1
- package/src/__tests__/material-import-product.unit.test.ts +0 -56
package/dist/mesh-bin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type MeshBinContractError } from '@forgeax/engine-pack';
|
|
1
|
+
import { type MeshBinContractError } from '@forgeax/engine-pack/mesh-bin-contract';
|
|
2
2
|
import { type MeshAsset, type Result } from '@forgeax/engine-types';
|
|
3
3
|
type MeshPayloadIn = {
|
|
4
4
|
readonly [Key in keyof MeshAsset]?: MeshAsset[Key] | undefined;
|
package/dist/mesh-bin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-bin.d.ts","sourceRoot":"","sources":["../src/mesh-bin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mesh-bin.d.ts","sourceRoot":"","sources":["../src/mesh-bin.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,oBAAoB,EAG1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,KAAK,SAAS,EAEd,KAAK,MAAM,EAEZ,MAAM,uBAAuB,CAAC;AAE/B,KAAK,aAAa,GAAG;IAAE,QAAQ,EAAE,GAAG,IAAI,MAAM,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,GAAG,SAAS;CAAE,GAAG;IACxF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC1B,oBAAoB,GACpB;IACE,QAAQ,CAAC,IAAI,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAiEN,qFAAqF;AACrF,wBAAgB,aAAa,CAC3B,OAAO,EAAE,aAAa,EACtB,SAAS,EAAE,MAAM,EACjB,IAAI,GAAE,SAAS,MAAM,EAAO,GAC3B,MAAM,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAiIxC"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { deriveVertexLayoutProjection } from '@forgeax/engine-geometry';
|
|
2
|
+
import { AssetGuid } from '@forgeax/engine-pack/guid';
|
|
3
|
+
import { MESH_BIN_HEADER_V4_BYTES, writeMeshBinHeader } from '@forgeax/engine-pack/mesh-bin-contract';
|
|
4
|
+
import { err, ok } from '@forgeax/engine-types';
|
|
5
|
+
|
|
6
|
+
// src/mesh-bin.ts
|
|
7
|
+
function failure(sourceKey, expected, actual) {
|
|
8
|
+
return {
|
|
9
|
+
code: "mesh-bin-payload-invalid",
|
|
10
|
+
subject: "mesh-bin",
|
|
11
|
+
sourceKey,
|
|
12
|
+
expected,
|
|
13
|
+
actual,
|
|
14
|
+
recovery: "re-cook the source with its Meta sidecar through the build-time importer"
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function asAttributeMap(value) {
|
|
18
|
+
return value ?? {};
|
|
19
|
+
}
|
|
20
|
+
function jsonValue(value) {
|
|
21
|
+
if (value instanceof Float32Array || value instanceof Uint16Array) return Array.from(value);
|
|
22
|
+
if (Array.isArray(value)) return value.map(jsonValue);
|
|
23
|
+
if (value !== null && typeof value === "object") {
|
|
24
|
+
return Object.fromEntries(
|
|
25
|
+
Object.entries(value).map(([key, nested]) => [key, jsonValue(nested)])
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
return value;
|
|
29
|
+
}
|
|
30
|
+
function refsMeta(payload, refs) {
|
|
31
|
+
const materialSlots = (payload.materialSlots ?? [{ slotName: "Default" }]).map(
|
|
32
|
+
(slot, slotIndex) => {
|
|
33
|
+
const defaultMaterial = slot.defaultMaterial;
|
|
34
|
+
let defaultMaterialRef;
|
|
35
|
+
if (defaultMaterial !== void 0) {
|
|
36
|
+
const guid = AssetGuid.format(defaultMaterial);
|
|
37
|
+
defaultMaterialRef = refs.findIndex((candidate) => candidate.toLowerCase() === guid);
|
|
38
|
+
if (defaultMaterialRef < 0) {
|
|
39
|
+
throw new Error(
|
|
40
|
+
`material slot ${slotIndex} default material ${guid} is absent from refs`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
slotName: slot.slotName,
|
|
46
|
+
...slot.sourceKey === void 0 ? {} : { sourceKey: slot.sourceKey },
|
|
47
|
+
...defaultMaterialRef === void 0 ? {} : { defaultMaterialRef }
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
return {
|
|
52
|
+
submeshes: payload.submeshes === void 0 || payload.submeshes.length === 0 ? [{ indexOffset: 0, indexCount: payload.indices?.length ?? 0, materialSlot: 0 }] : payload.submeshes,
|
|
53
|
+
materialSlots,
|
|
54
|
+
...payload.aabb === void 0 ? {} : { aabb: jsonValue(payload.aabb) },
|
|
55
|
+
...payload.morphTargets === void 0 ? {} : { morphTargets: jsonValue(payload.morphTargets) },
|
|
56
|
+
...payload.morphWeights === void 0 ? {} : { morphWeights: jsonValue(payload.morphWeights) }
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function packMeshBinV4(payload, sourceKey, refs = []) {
|
|
60
|
+
try {
|
|
61
|
+
const vertices = payload.vertices;
|
|
62
|
+
const indices = payload.indices;
|
|
63
|
+
if (!(vertices instanceof Float32Array)) {
|
|
64
|
+
return err(
|
|
65
|
+
failure(sourceKey, "Float32Array interleaved vertices", "vertices is not Float32Array")
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
if (indices !== void 0 && !(indices instanceof Uint16Array || indices instanceof Uint32Array)) {
|
|
69
|
+
return err(
|
|
70
|
+
failure(sourceKey, "Uint16Array or Uint32Array indices", "indices has an unsupported type")
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
const attributes = asAttributeMap(payload.attributes);
|
|
74
|
+
const projection = deriveVertexLayoutProjection(attributes);
|
|
75
|
+
if (projection.attributes.length === 0 || projection.arrayStride === 0) {
|
|
76
|
+
return err(
|
|
77
|
+
failure(
|
|
78
|
+
sourceKey,
|
|
79
|
+
"a non-empty canonical geometry projection",
|
|
80
|
+
"projection has no attributes"
|
|
81
|
+
)
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
const vertexCount = payload.vertexCount ?? vertices.byteLength / projection.arrayStride;
|
|
85
|
+
if (!Number.isSafeInteger(vertexCount) || vertexCount < 0) {
|
|
86
|
+
return err(
|
|
87
|
+
failure(sourceKey, "a non-negative safe vertex cardinality", `vertexCount=${vertexCount}`)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
if (vertices.byteLength !== vertexCount * projection.arrayStride) {
|
|
91
|
+
return err(
|
|
92
|
+
failure(
|
|
93
|
+
sourceKey,
|
|
94
|
+
`vertices.byteLength=${vertexCount * projection.arrayStride}`,
|
|
95
|
+
`vertices.byteLength=${vertices.byteLength}; stride=${projection.arrayStride}`
|
|
96
|
+
)
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
for (const attribute of projection.attributes) {
|
|
100
|
+
const value = attributes[attribute.key];
|
|
101
|
+
const components = attribute.byteLength / (attribute.format === "uint16x4" ? 2 : 4);
|
|
102
|
+
if (value === void 0 || !(value instanceof Float32Array) && !(value instanceof Uint16Array) || value.length !== vertexCount * components) {
|
|
103
|
+
return err(
|
|
104
|
+
failure(
|
|
105
|
+
sourceKey,
|
|
106
|
+
`${attribute.key} cardinality=${vertexCount * components}`,
|
|
107
|
+
`${attribute.key} cardinality=${value?.byteLength ?? "missing"}`
|
|
108
|
+
)
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const interleaved = new Uint8Array(vertexCount * projection.arrayStride);
|
|
113
|
+
const interleavedView = new DataView(interleaved.buffer);
|
|
114
|
+
for (const attribute of projection.attributes) {
|
|
115
|
+
const value = attributes[attribute.key];
|
|
116
|
+
if (value === void 0) continue;
|
|
117
|
+
const components = attribute.byteLength / (attribute.format === "uint16x4" ? 2 : 4);
|
|
118
|
+
for (let vertex = 0; vertex < vertexCount; vertex++) {
|
|
119
|
+
for (let component = 0; component < components; component++) {
|
|
120
|
+
const sourceIndex = vertex * components + component;
|
|
121
|
+
const targetOffset = vertex * projection.arrayStride + attribute.offset + component * (attribute.format === "uint16x4" ? 2 : 4);
|
|
122
|
+
if (attribute.format === "uint16x4") {
|
|
123
|
+
interleavedView.setUint16(targetOffset, value[sourceIndex] ?? 0, true);
|
|
124
|
+
} else {
|
|
125
|
+
interleavedView.setFloat32(
|
|
126
|
+
targetOffset,
|
|
127
|
+
value[sourceIndex] ?? 0,
|
|
128
|
+
true
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const indexCount = indices?.length ?? 0;
|
|
135
|
+
const indexWidth = indices === void 0 || indexCount === 0 ? 0 : indices.BYTES_PER_ELEMENT;
|
|
136
|
+
const indexBytes = indexCount * indexWidth;
|
|
137
|
+
if (!Number.isSafeInteger(indexBytes) || indexBytes > 4294967295) {
|
|
138
|
+
return err(failure(sourceKey, "safe index payload byte length", `indexBytes=${indexBytes}`));
|
|
139
|
+
}
|
|
140
|
+
const meta = new TextEncoder().encode(JSON.stringify(refsMeta(payload, refs)));
|
|
141
|
+
const header = {
|
|
142
|
+
version: 4,
|
|
143
|
+
projectionVersion: projection.schemaVersion,
|
|
144
|
+
mask: projection.mask,
|
|
145
|
+
digest: projection.digest,
|
|
146
|
+
stride: projection.arrayStride,
|
|
147
|
+
vertexCount,
|
|
148
|
+
vertexBytes: interleaved.byteLength,
|
|
149
|
+
indexCount,
|
|
150
|
+
indexWidth,
|
|
151
|
+
indexBytes,
|
|
152
|
+
jsonBytes: meta.byteLength
|
|
153
|
+
};
|
|
154
|
+
const total = MESH_BIN_HEADER_V4_BYTES + interleaved.byteLength + indexBytes + meta.byteLength;
|
|
155
|
+
if (!Number.isSafeInteger(total) || total > 4294967295) {
|
|
156
|
+
return err(failure(sourceKey, "safe mesh binary byte length", `total=${total}`));
|
|
157
|
+
}
|
|
158
|
+
const out = new Uint8Array(total);
|
|
159
|
+
writeMeshBinHeader(header, out);
|
|
160
|
+
let offset = MESH_BIN_HEADER_V4_BYTES;
|
|
161
|
+
out.set(interleaved, offset);
|
|
162
|
+
offset += interleaved.byteLength;
|
|
163
|
+
if (indices !== void 0 && indexBytes > 0) {
|
|
164
|
+
out.set(new Uint8Array(indices.buffer, indices.byteOffset, indices.byteLength), offset);
|
|
165
|
+
offset += indexBytes;
|
|
166
|
+
}
|
|
167
|
+
out.set(meta, offset);
|
|
168
|
+
return ok(out);
|
|
169
|
+
} catch (error) {
|
|
170
|
+
return err(
|
|
171
|
+
failure(
|
|
172
|
+
sourceKey,
|
|
173
|
+
"valid canonical mesh payload",
|
|
174
|
+
error instanceof Error ? error.message : String(error)
|
|
175
|
+
)
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export { packMeshBinV4 };
|
|
181
|
+
//# sourceMappingURL=mesh-bin.mjs.map
|
|
182
|
+
//# sourceMappingURL=mesh-bin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/mesh-bin.ts"],"names":[],"mappings":";;;;;;AA+BA,SAAS,OAAA,CAAQ,SAAA,EAAmB,QAAA,EAAkB,MAAA,EAAoC;AACxF,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,0BAAA;AAAA,IACN,OAAA,EAAS,UAAA;AAAA,IACT,SAAA;AAAA,IACA,QAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA,EAAU;AAAA,GACZ;AACF;AAEA,SAAS,eAAe,KAAA,EAAoC;AAC1D,EAAA,OAAQ,SAAS,EAAC;AACpB;AAEA,SAAS,UAAU,KAAA,EAAyB;AAC1C,EAAA,IAAI,iBAAiB,YAAA,IAAgB,KAAA,YAAiB,aAAa,OAAO,KAAA,CAAM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,MAAM,KAAA,GAAQ,wBAAA,GAA2B,WAAA,CAAY,UAAA,GAAa,aAAa,IAAA,CAAK,UAAA;AACpF,IAAA,IAAI,CAAC,MAAA,CAAO,aAAA,CAAc,KAAK,CAAA,IAAK,QAAQ,UAAA,EAAY;AACtD,MAAA,OAAO,IAAI,OAAA,CAAQ,SAAA,EAAW,gCAAgC,CAAA,MAAA,EAAS,KAAK,EAAE,CAAC,CAAA;AAAA,IACjF;AACA,IAAA,MAAM,GAAA,GAAM,IAAI,UAAA,CAAW,KAAK,CAAA;AAChC,IAAA,kBAAA,CAAmB,QAAQ,GAAG,CAAA;AAC9B,IAAA,IAAI,MAAA,GAAS,wBAAA;AACb,IAAA,GAAA,CAAI,GAAA,CAAI,aAAa,MAAM,CAAA;AAC3B,IAAA,MAAA,IAAU,WAAA,CAAY,UAAA;AACtB,IAAA,IAAI,OAAA,KAAY,KAAA,CAAA,IAAa,UAAA,GAAa,CAAA,EAAG;AAC3C,MAAA,GAAA,CAAI,GAAA,CAAI,IAAI,UAAA,CAAW,OAAA,CAAQ,MAAA,EAAQ,QAAQ,UAAA,EAAY,OAAA,CAAQ,UAAU,CAAA,EAAG,MAAM,CAAA;AACtF,MAAA,MAAA,IAAU,UAAA;AAAA,IACZ;AACA,IAAA,GAAA,CAAI,GAAA,CAAI,MAAM,MAAM,CAAA;AACpB,IAAA,OAAO,GAAG,GAAG,CAAA;AAAA,EACf,SAAS,KAAA,EAAO;AACd,IAAA,OAAO,GAAA;AAAA,MACL,OAAA;AAAA,QACE,SAAA;AAAA,QACA,8BAAA;AAAA,QACA,KAAA,YAAiB,KAAA,GAAQ,KAAA,CAAM,OAAA,GAAU,OAAO,KAAK;AAAA;AACvD,KACF;AAAA,EACF;AACF","file":"mesh-bin.mjs","sourcesContent":["import { deriveVertexLayoutProjection } from '@forgeax/engine-geometry';\nimport { AssetGuid } from '@forgeax/engine-pack/guid';\nimport {\n MESH_BIN_HEADER_V4_BYTES,\n type MeshBinContractError,\n type MeshBinHeaderV4,\n writeMeshBinHeader,\n} from '@forgeax/engine-pack/mesh-bin-contract';\nimport {\n err,\n type MeshAsset,\n ok,\n type Result,\n type VertexAttributeMap,\n} from '@forgeax/engine-types';\n\ntype MeshPayloadIn = { readonly [Key in keyof MeshAsset]?: MeshAsset[Key] | undefined } & {\n readonly vertexCount?: number;\n};\n\nexport type MeshBinEncodeError =\n | MeshBinContractError\n | {\n readonly code: 'mesh-bin-payload-invalid';\n readonly subject: 'mesh-bin';\n readonly sourceKey: string;\n readonly expected: string;\n readonly actual: string;\n readonly recovery: string;\n };\n\nfunction failure(sourceKey: string, expected: string, actual: string): MeshBinEncodeError {\n return {\n code: 'mesh-bin-payload-invalid',\n subject: 'mesh-bin',\n sourceKey,\n expected,\n actual,\n recovery: 're-cook the source with its Meta sidecar through the build-time importer',\n };\n}\n\nfunction asAttributeMap(value: unknown): VertexAttributeMap {\n return (value ?? {}) as VertexAttributeMap;\n}\n\nfunction jsonValue(value: unknown): unknown {\n if (value instanceof Float32Array || value instanceof Uint16Array) return Array.from(value);\n if (Array.isArray(value)) return value.map(jsonValue);\n if (value !== null && typeof value === 'object') {\n return Object.fromEntries(\n Object.entries(value).map(([key, nested]) => [key, jsonValue(nested)]),\n );\n }\n return value;\n}\n\nfunction refsMeta(payload: MeshPayloadIn, refs: readonly string[]): Record<string, unknown> {\n const materialSlots = (payload.materialSlots ?? [{ slotName: 'Default' }]).map(\n (slot, slotIndex) => {\n const defaultMaterial = slot.defaultMaterial;\n let defaultMaterialRef: number | undefined;\n if (defaultMaterial !== undefined) {\n const guid = AssetGuid.format(defaultMaterial);\n defaultMaterialRef = refs.findIndex((candidate) => candidate.toLowerCase() === guid);\n if (defaultMaterialRef < 0) {\n throw new Error(\n `material slot ${slotIndex} default material ${guid} is absent from refs`,\n );\n }\n }\n return {\n slotName: slot.slotName,\n ...(slot.sourceKey === undefined ? {} : { sourceKey: slot.sourceKey }),\n ...(defaultMaterialRef === undefined ? {} : { defaultMaterialRef }),\n };\n },\n );\n return {\n submeshes:\n payload.submeshes === undefined || payload.submeshes.length === 0\n ? [{ indexOffset: 0, indexCount: payload.indices?.length ?? 0, materialSlot: 0 }]\n : payload.submeshes,\n materialSlots,\n ...(payload.aabb === undefined ? {} : { aabb: jsonValue(payload.aabb) }),\n ...(payload.morphTargets === undefined\n ? {}\n : { morphTargets: jsonValue(payload.morphTargets) }),\n ...(payload.morphWeights === undefined\n ? {}\n : { morphWeights: jsonValue(payload.morphWeights) }),\n };\n}\n\n/** Encode one canonical v4 mesh binary. No legacy version is accepted or emitted. */\nexport function packMeshBinV4(\n payload: MeshPayloadIn,\n sourceKey: string,\n refs: readonly string[] = [],\n): Result<Uint8Array, MeshBinEncodeError> {\n try {\n const vertices = payload.vertices;\n const indices = payload.indices;\n if (!(vertices instanceof Float32Array)) {\n return err(\n failure(sourceKey, 'Float32Array interleaved vertices', 'vertices is not Float32Array'),\n );\n }\n if (\n indices !== undefined &&\n !(indices instanceof Uint16Array || indices instanceof Uint32Array)\n ) {\n return err(\n failure(sourceKey, 'Uint16Array or Uint32Array indices', 'indices has an unsupported type'),\n );\n }\n const attributes = asAttributeMap(payload.attributes);\n const projection = deriveVertexLayoutProjection(attributes);\n if (projection.attributes.length === 0 || projection.arrayStride === 0) {\n return err(\n failure(\n sourceKey,\n 'a non-empty canonical geometry projection',\n 'projection has no attributes',\n ),\n );\n }\n const vertexCount = payload.vertexCount ?? vertices.byteLength / projection.arrayStride;\n if (!Number.isSafeInteger(vertexCount) || vertexCount < 0) {\n return err(\n failure(sourceKey, 'a non-negative safe vertex cardinality', `vertexCount=${vertexCount}`),\n );\n }\n if (vertices.byteLength !== vertexCount * projection.arrayStride) {\n return err(\n failure(\n sourceKey,\n `vertices.byteLength=${vertexCount * projection.arrayStride}`,\n `vertices.byteLength=${vertices.byteLength}; stride=${projection.arrayStride}`,\n ),\n );\n }\n for (const attribute of projection.attributes) {\n const value = attributes[attribute.key];\n const components = attribute.byteLength / (attribute.format === 'uint16x4' ? 2 : 4);\n if (\n value === undefined ||\n (!(value instanceof Float32Array) && !(value instanceof Uint16Array)) ||\n value.length !== vertexCount * components\n ) {\n return err(\n failure(\n sourceKey,\n `${attribute.key} cardinality=${vertexCount * components}`,\n `${attribute.key} cardinality=${value?.byteLength ?? 'missing'}`,\n ),\n );\n }\n }\n const interleaved = new Uint8Array(vertexCount * projection.arrayStride);\n const interleavedView = new DataView(interleaved.buffer);\n for (const attribute of projection.attributes) {\n const value = attributes[attribute.key];\n if (value === undefined) continue;\n const components = attribute.byteLength / (attribute.format === 'uint16x4' ? 2 : 4);\n for (let vertex = 0; vertex < vertexCount; vertex++) {\n for (let component = 0; component < components; component++) {\n const sourceIndex = vertex * components + component;\n const targetOffset =\n vertex * projection.arrayStride +\n attribute.offset +\n component * (attribute.format === 'uint16x4' ? 2 : 4);\n if (attribute.format === 'uint16x4') {\n interleavedView.setUint16(targetOffset, (value as Uint16Array)[sourceIndex] ?? 0, true);\n } else {\n interleavedView.setFloat32(\n targetOffset,\n (value as Float32Array)[sourceIndex] ?? 0,\n true,\n );\n }\n }\n }\n }\n const indexCount = indices?.length ?? 0;\n const indexWidth = indices === undefined || indexCount === 0 ? 0 : indices.BYTES_PER_ELEMENT;\n const indexBytes = indexCount * indexWidth;\n if (!Number.isSafeInteger(indexBytes) || indexBytes > 0xffffffff) {\n return err(failure(sourceKey, 'safe index payload byte length', `indexBytes=${indexBytes}`));\n }\n const meta = new TextEncoder().encode(JSON.stringify(refsMeta(payload, refs)));\n const header: MeshBinHeaderV4 = {\n version: 4,\n projectionVersion: projection.schemaVersion,\n mask: projection.mask,\n digest: projection.digest,\n stride: projection.arrayStride,\n vertexCount,\n vertexBytes: interleaved.byteLength,\n indexCount,\n indexWidth: indexWidth as 0 | 2 | 4,\n indexBytes,\n jsonBytes: meta.byteLength,\n };\n const total = MESH_BIN_HEADER_V4_BYTES + interleaved.byteLength + indexBytes + meta.byteLength;\n if (!Number.isSafeInteger(total) || total > 0xffffffff) {\n return err(failure(sourceKey, 'safe mesh binary byte length', `total=${total}`));\n }\n const out = new Uint8Array(total);\n writeMeshBinHeader(header, out);\n let offset = MESH_BIN_HEADER_V4_BYTES;\n out.set(interleaved, offset);\n offset += interleaved.byteLength;\n if (indices !== undefined && indexBytes > 0) {\n out.set(new Uint8Array(indices.buffer, indices.byteOffset, indices.byteLength), offset);\n offset += indexBytes;\n }\n out.set(meta, offset);\n return ok(out);\n } catch (error) {\n return err(\n failure(\n sourceKey,\n 'valid canonical mesh payload',\n error instanceof Error ? error.message : String(error),\n ),\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ImportProduct } from '@forgeax/engine-types';
|
|
2
|
+
import { type DdcPack } from './import-runner.js';
|
|
3
|
+
/** Project one validated import product into the canonical Pack v2 payload. */
|
|
4
|
+
export declare function projectImportProductForBuild(product: Pick<ImportProduct<unknown>, 'assets'>): DdcPack;
|
|
5
|
+
//# sourceMappingURL=pack-projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack-projection.d.ts","sourceRoot":"","sources":["../src/pack-projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,KAAK,OAAO,EAAoB,MAAM,oBAAoB,CAAC;AAEpE,+EAA+E;AAC/E,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,GAC9C,OAAO,CAaT"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type AuthoredPackInput, finalizePackageTransportSource, type PackageFinalizePolicy } from '@forgeax/engine-pack/build';
|
|
2
|
+
import { type NativeCooker } from '@forgeax/engine-pack/native-cooker';
|
|
3
|
+
import type { ScanSourceDeclaration } from '@forgeax/engine-pack/scanner';
|
|
4
|
+
import { type ScriptablePackDefinition, type ScriptablePackSourceClosureEntry } from '@forgeax/engine-pack/source';
|
|
5
|
+
import type { AssetGuid as AssetGuidType, AssetPublicationEnvelope, AssetPublicationOutput, ResourceRevision, Result } from '@forgeax/engine-types';
|
|
6
|
+
import type { DdcPack, ImportRunnerFs } from './import-runner.js';
|
|
7
|
+
import type { ImporterRegistry } from './importer-registry.js';
|
|
8
|
+
import type { ScriptablePackDomainError, ScriptablePackStagedOutput } from './scriptable-pack.js';
|
|
9
|
+
import { type ScriptableSourcePackageProduct, type ScriptableSourcePackageResult } from './scriptable-source-package.js';
|
|
10
|
+
type FinalizedPackageTransport = Awaited<ReturnType<typeof finalizePackageTransportSource>>;
|
|
11
|
+
export interface ScriptablePackInput {
|
|
12
|
+
readonly sourcePath: string;
|
|
13
|
+
readonly displaySourcePath: string;
|
|
14
|
+
readonly definition: Readonly<ScriptablePackDefinition>;
|
|
15
|
+
readonly sourceClosure: readonly ScriptablePackSourceClosureEntry[];
|
|
16
|
+
readonly publicationGeneration: number;
|
|
17
|
+
readonly policy: ScriptablePackTransportPolicy;
|
|
18
|
+
}
|
|
19
|
+
export interface ScriptablePackPublicationFacts {
|
|
20
|
+
readonly outputs: readonly AssetPublicationOutput[];
|
|
21
|
+
readonly refs: ReadonlyMap<string, readonly string[]>;
|
|
22
|
+
}
|
|
23
|
+
export interface PreparedScriptablePack {
|
|
24
|
+
readonly product: ScriptableSourcePackageProduct;
|
|
25
|
+
readonly finalized: FinalizedPackageTransport;
|
|
26
|
+
readonly facts: ScriptablePackPublicationFacts;
|
|
27
|
+
readonly revision: ResourceRevision;
|
|
28
|
+
readonly publication: AssetPublicationEnvelope;
|
|
29
|
+
}
|
|
30
|
+
export interface ScriptablePackTransportPaths {
|
|
31
|
+
readonly packagePath: string;
|
|
32
|
+
readonly artifactPath: (path: string) => string;
|
|
33
|
+
readonly receiptPath: (guid: string) => string;
|
|
34
|
+
}
|
|
35
|
+
export interface ScriptablePackTransportSink {
|
|
36
|
+
writePackage(path: string, body: string): void | Promise<void>;
|
|
37
|
+
writeArtifact(path: string, bytes: Uint8Array, mimeType: string): void | Promise<void>;
|
|
38
|
+
writeReceipt(path: string, body: string): void | Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
export type ScriptablePackTransportPolicy = PackageFinalizePolicy | ((product: ScriptableSourcePackageProduct) => PackageFinalizePolicy);
|
|
41
|
+
type ScriptablePackHostError = ScriptableSourcePackageResult extends Result<unknown, infer E> ? E : never;
|
|
42
|
+
export interface CookedAuthoredPack {
|
|
43
|
+
readonly logicalPackage: DdcPack;
|
|
44
|
+
readonly refsByGuid: ReadonlyMap<string, readonly string[]>;
|
|
45
|
+
}
|
|
46
|
+
export interface AuthoredPackTransport {
|
|
47
|
+
readonly pack: AuthoredPackInput;
|
|
48
|
+
readonly firstGuid?: string;
|
|
49
|
+
readonly cooked?: CookedAuthoredPack;
|
|
50
|
+
readonly finalized?: FinalizedPackageTransport;
|
|
51
|
+
}
|
|
52
|
+
/** Build-time capabilities required to expose ordinary Meta products to a ScriptablePack. */
|
|
53
|
+
export interface ScriptablePackExternalImportOptions {
|
|
54
|
+
readonly importerRegistry: ImporterRegistry;
|
|
55
|
+
readonly fsForImport: ImportRunnerFs;
|
|
56
|
+
/** Package path aliases from forgeax.assets.paths; defaults to the current project config. */
|
|
57
|
+
readonly assetPaths?: Readonly<Record<string, string>>;
|
|
58
|
+
}
|
|
59
|
+
export declare function canonicalScriptableSourcePath(sourcePath: string): string;
|
|
60
|
+
export declare function scriptablePackInputs(sourcePaths: readonly string[], declarations: ReadonlyMap<string, ScanSourceDeclaration>, cwd: string, generationFor: (displaySourcePath: string) => number, policyFor: (displaySourcePath: string) => ScriptablePackTransportPolicy): ScriptablePackInput[];
|
|
61
|
+
/** Materialize one accepted ScriptablePack without duplicating dev/build loops. */
|
|
62
|
+
export declare function materializePreparedScriptablePack(prepared: PreparedScriptablePack, paths: ScriptablePackTransportPaths, sink: ScriptablePackTransportSink): Promise<ReadonlyMap<string, string>>;
|
|
63
|
+
export declare function readCookedAuthoredPack(authoredPack: AuthoredPackInput, cookers?: readonly NativeCooker[], sourcePath?: string): Promise<CookedAuthoredPack | undefined>;
|
|
64
|
+
export declare function declaredPackExternalOutputs(declarations: ReadonlyMap<string, ScanSourceDeclaration>, cookers?: readonly NativeCooker[], requiredGuids?: readonly AssetGuidType[], externalImport?: ScriptablePackExternalImportOptions): Promise<readonly ScriptablePackStagedOutput[]>;
|
|
65
|
+
/** Normalize one authored Pack and, when needed, run its registered cooker once. */
|
|
66
|
+
export declare function prepareAuthoredPackTransport(authoredPack: AuthoredPackInput, cookers: readonly NativeCooker[] | undefined, policyFor: (guid: string) => PackageFinalizePolicy, sourcePath?: string): Promise<AuthoredPackTransport>;
|
|
67
|
+
/** Project one produced ScriptablePack into the publication tuple shared by dev and build. */
|
|
68
|
+
export declare function projectScriptablePackPublication(product: ScriptableSourcePackageProduct): Result<ScriptablePackPublicationFacts, ScriptablePackDomainError>;
|
|
69
|
+
/** Produce selected ScriptablePacks through one inventory and one staged owner boundary. */
|
|
70
|
+
export declare function produceScriptablePackProducts(sources: readonly ScriptablePackInput[], declaredExternalOutputs?: readonly ScriptablePackStagedOutput[]): Promise<Result<ReadonlyMap<string, PreparedScriptablePack>, ScriptablePackHostError>>;
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=scriptable-pack-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scriptable-pack-host.d.ts","sourceRoot":"","sources":["../src/scriptable-pack-host.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,iBAAiB,EACtB,8BAA8B,EAE9B,KAAK,qBAAqB,EAG3B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,KAAK,YAAY,EAAwB,MAAM,oCAAoC,CAAC;AAC7F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,EACtC,MAAM,6BAA6B,CAAC;AAErC,OAAO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wBAAsB,4BAA4B,CAChD,YAAY,EAAE,iBAAiB,EAC/B,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,EAC5C,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,qBAAqB,EAClD,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,qBAAqB,CAAC,CAchC;AAED,8FAA8F;AAC9F,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,8BAA8B,GACtC,MAAM,CAAC,8BAA8B,EAAE,yBAAyB,CAAC,CA+BnE;AAgBD,4FAA4F;AAC5F,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,SAAS,mBAAmB,EAAE,EACvC,uBAAuB,GAAE,SAAS,0BAA0B,EAAO,GAClE,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,sBAAsB,CAAC,EAAE,uBAAuB,CAAC,CAAC,CAyIvF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { ScriptablePackSceneComponent } from '@forgeax/engine-pack/source';
|
|
1
2
|
import { type AssetOutputProducer, AssetOutputProducerRegistry } from './scriptable-pack.js';
|
|
2
3
|
export declare const materialAssetOutputProducer: AssetOutputProducer;
|
|
3
4
|
export declare const meshAssetOutputProducer: AssetOutputProducer;
|
|
4
|
-
export declare
|
|
5
|
-
export declare function createStandardAssetOutputProducerRegistry(): AssetOutputProducerRegistry;
|
|
5
|
+
export declare function createSceneAssetOutputProducer(sceneComponents?: readonly ScriptablePackSceneComponent[]): AssetOutputProducer;
|
|
6
|
+
export declare function createStandardAssetOutputProducerRegistry(sceneComponents?: readonly ScriptablePackSceneComponent[]): AssetOutputProducerRegistry;
|
|
6
7
|
//# sourceMappingURL=scriptable-pack-output-producers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scriptable-pack-output-producers.d.ts","sourceRoot":"","sources":["../src/scriptable-pack-output-producers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scriptable-pack-output-producers.d.ts","sourceRoot":"","sources":["../src/scriptable-pack-output-producers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AA4BhF,OAAO,EAEL,KAAK,mBAAmB,EACxB,2BAA2B,EAE5B,MAAM,sBAAsB,CAAC;AA4X9B,eAAO,MAAM,2BAA2B,qBAIvC,CAAC;AACF,eAAO,MAAM,uBAAuB,qBAA2D,CAAC;AAEhG,wBAAgB,8BAA8B,CAC5C,eAAe,GAAE,SAAS,4BAA4B,EAAO,GAC5D,mBAAmB,CAKrB;AAED,wBAAgB,yCAAyC,CACvD,eAAe,GAAE,SAAS,4BAA4B,EAAO,GAC5D,2BAA2B,CAuB7B"}
|
|
@@ -11,8 +11,7 @@ export interface ScriptablePackStagedOwner {
|
|
|
11
11
|
export interface ScriptablePackStagedSnapshotOptions {
|
|
12
12
|
readonly generation: number;
|
|
13
13
|
readonly owners: readonly ScriptablePackStagedOwner[];
|
|
14
|
-
|
|
15
|
-
readonly fallback?: ScriptablePackAssetSnapshotSource;
|
|
14
|
+
readonly declaredExternalOutputs?: readonly ScriptablePackStagedOutput[];
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
18
17
|
* One-build authority for current-generation ScriptablePack content reads.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scriptable-pack-staged-snapshot.d.ts","sourceRoot":"","sources":["../src/scriptable-pack-staged-snapshot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAS,SAAS,IAAI,aAAa,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpG,OAAO,EAAE,UAAU,EAAW,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAEV,iCAAiC,EACjC,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAA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,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,SAAS,yBAAyB,EAAE,CAAC;IACtD,QAAQ,CAAC,uBAAuB,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;CAC1E;AA8CD;;;GAGG;AACH,wBAAgB,6CAA6C,CAC3D,OAAO,EAAE,mCAAmC,GAC3C,iCAAiC,CA0FnC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { Component } from '@forgeax/engine-ecs';
|
|
2
1
|
import { type ScriptablePackAssetKind } from '@forgeax/engine-pack';
|
|
3
|
-
import { type ScriptablePackDefinition, type ScriptablePackError, type ScriptablePackReadError } from '@forgeax/engine-pack/source';
|
|
4
|
-
import type { AnimationGraph, Asset, AssetGuid as AssetGuidType, AssetPublicationEnvelope,
|
|
2
|
+
import { type ScriptablePackDefinition, type ScriptablePackError, type ScriptablePackReadError, type ScriptablePackSourceClosureEntry } from '@forgeax/engine-pack/source';
|
|
3
|
+
import type { AnimationGraph, Asset, AssetGuid as AssetGuidType, AssetPublicationEnvelope, FontAsset, MaterialAsset, MeshAsset, Result, TilesetAsset } from '@forgeax/engine-types';
|
|
4
|
+
export type { ScriptablePackSourceClosureEntry } from '@forgeax/engine-pack/source';
|
|
5
5
|
import { AssetError, ImportError } from '@forgeax/engine-types';
|
|
6
|
+
import { type ImportAssetProduct, type TerminalImportProduct } from './import-product.js';
|
|
6
7
|
export interface ScriptablePackAssetSnapshot {
|
|
7
8
|
readonly asset: Asset;
|
|
8
9
|
readonly generation: number;
|
|
@@ -22,8 +23,6 @@ export interface AssetOutputInput {
|
|
|
22
23
|
readonly guid: string;
|
|
23
24
|
readonly sourceKey: string;
|
|
24
25
|
readonly asset: Asset;
|
|
25
|
-
/** World-local schema projection for scene ref externalization. */
|
|
26
|
-
readonly components?: ReadonlyMap<string, Component>;
|
|
27
26
|
}
|
|
28
27
|
type MaterialPackPayload = Omit<MaterialAsset, 'parent' | 'values'> & {
|
|
29
28
|
readonly parent?: number;
|
|
@@ -89,11 +88,7 @@ export type AssetOutputPayloadByKind = {
|
|
|
89
88
|
}>;
|
|
90
89
|
};
|
|
91
90
|
export type AssetOutputPayload = AssetOutputPayloadByKind[ScriptablePackAssetKind];
|
|
92
|
-
export
|
|
93
|
-
readonly payload: AssetOutputPayload;
|
|
94
|
-
readonly refs: readonly AssetRef[];
|
|
95
|
-
readonly artifacts: Readonly<Record<string, ImportedArtifactBody>>;
|
|
96
|
-
}
|
|
91
|
+
export type AssetOutputProduct = ImportAssetProduct<AssetOutputPayload>;
|
|
97
92
|
export interface AssetOutputProducer {
|
|
98
93
|
readonly kind: string;
|
|
99
94
|
readonly version: string;
|
|
@@ -112,12 +107,8 @@ export interface ScriptablePackExternalEvidence {
|
|
|
112
107
|
readonly generation?: number;
|
|
113
108
|
readonly digest?: string;
|
|
114
109
|
}
|
|
115
|
-
export interface ScriptablePackSourceClosureEntry {
|
|
116
|
-
readonly path: string;
|
|
117
|
-
readonly digest: string;
|
|
118
|
-
}
|
|
119
110
|
export interface ScriptablePackBuildProduct {
|
|
120
|
-
readonly product:
|
|
111
|
+
readonly product: TerminalImportProduct<unknown>;
|
|
121
112
|
/** Raw private outputs for the current staged build generation, never a runtime publication path. */
|
|
122
113
|
readonly stagedOutputs: readonly ScriptablePackStagedOutput[];
|
|
123
114
|
readonly externalEvidence: readonly ScriptablePackExternalEvidence[];
|
|
@@ -140,8 +131,6 @@ export interface BuildScriptablePackOptions {
|
|
|
140
131
|
readonly outputs: AssetOutputProducerRegistry;
|
|
141
132
|
readonly sourceClosure: readonly ScriptablePackSourceClosureEntry[];
|
|
142
133
|
readonly authoringContractVersion: string;
|
|
143
|
-
/** Optional owner-provided component schema projection for scene output. */
|
|
144
|
-
readonly components?: ReadonlyMap<string, Component>;
|
|
145
134
|
}
|
|
146
135
|
/**
|
|
147
136
|
* Build one external ScriptablePack through the producer-owned Pack bridge.
|
|
@@ -149,5 +138,4 @@ export interface BuildScriptablePackOptions {
|
|
|
149
138
|
* `code`, `expected`, `hint`, and `detail` for recovery by the caller.
|
|
150
139
|
*/
|
|
151
140
|
export declare function buildScriptablePack(options: BuildScriptablePackOptions): Promise<ScriptablePackBuildBridgeResult>;
|
|
152
|
-
export {};
|
|
153
141
|
//# sourceMappingURL=scriptable-pack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scriptable-pack.d.ts","sourceRoot":"","sources":["../src/scriptable-pack.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"scriptable-pack.d.ts","sourceRoot":"","sources":["../src/scriptable-pack.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/F,OAAO,EAIL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACtC,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,cAAc,EACd,KAAK,EACL,SAAS,IAAI,aAAa,EAC1B,wBAAwB,EACxB,SAAS,EAET,aAAa,EACb,SAAS,EACT,MAAM,EACN,YAAY,EACb,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAEpF,OAAO,EAAE,UAAU,EAAO,WAAW,EAAM,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AAoC7B,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,gFAAgF;IAChF,QAAQ,CAAC,SAAS,CAAC,EAAE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iC,CAAC;IACzD,QAAQ,CAAC,OAAO,EAAE,2BAA2B,CAAC;IAC9C,QAAQ,CAAC,aAAa,EAAE,SAAS,gCAAgC,EAAE,CAAC;IACpE,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;CAC3C;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,+BAA+B,CAAC,CAwL1C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ScriptablePackError } from '@forgeax/engine-pack/source';
|
|
2
|
+
import type { AssetError, ImportError, ImportProduct, Result } from '@forgeax/engine-types';
|
|
3
|
+
import { type BuildScriptablePackOptions, type ScriptablePackDomainError, type ScriptablePackExternalEvidence, type ScriptablePackStagedOutput } from './scriptable-pack.js';
|
|
4
|
+
export interface ScriptableSourcePackageProduct {
|
|
5
|
+
readonly anchorGuid: string;
|
|
6
|
+
readonly declaredGuids: readonly string[];
|
|
7
|
+
readonly product: ImportProduct<unknown>;
|
|
8
|
+
readonly inputFingerprint: string;
|
|
9
|
+
readonly externalEvidence: readonly ScriptablePackExternalEvidence[];
|
|
10
|
+
readonly stagedOutputs: readonly ScriptablePackStagedOutput[];
|
|
11
|
+
}
|
|
12
|
+
export type ScriptableSourcePackageResult = Result<ScriptableSourcePackageProduct, ScriptablePackError | AssetError | ImportError | ScriptablePackDomainError>;
|
|
13
|
+
export declare function produceScriptableSourcePackage(options: BuildScriptablePackOptions): Promise<ScriptableSourcePackageResult>;
|
|
14
|
+
//# sourceMappingURL=scriptable-source-package.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scriptable-source-package.d.ts","sourceRoot":"","sources":["../src/scriptable-source-package.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClG,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EAEX,aAAa,EACb,MAAM,EACP,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,KAAK,0BAA0B,EAE/B,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAChC,MAAM,sBAAsB,CAAC;AAI9B,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACzC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,8BAA8B,EAAE,CAAC;IACrE,QAAQ,CAAC,aAAa,EAAE,SAAS,0BAA0B,EAAE,CAAC;CAC/D;AAED,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAChD,8BAA8B,EAC9B,mBAAmB,GAAG,UAAU,GAAG,WAAW,GAAG,yBAAyB,CAC3E,CAAC;AAyBF,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,6BAA6B,CAAC,CA4BxC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
declare const SOURCE_PACKAGE_ERROR_POLICY: {
|
|
2
|
+
readonly 'source-package-meta-invalid': {
|
|
3
|
+
readonly expected: "a valid source Meta declaration with complete GUID topology";
|
|
4
|
+
readonly hint: "repair the Meta declaration, then rebuild or cold-cook the source package";
|
|
5
|
+
};
|
|
6
|
+
readonly 'source-package-importer-missing': {
|
|
7
|
+
readonly expected: "a registered importer for the source Meta importer key";
|
|
8
|
+
readonly hint: "register the named importer, then rebuild or cold-cook the source package";
|
|
9
|
+
};
|
|
10
|
+
readonly 'source-package-conversion-failed': {
|
|
11
|
+
readonly expected: "the configured importer to convert the source successfully";
|
|
12
|
+
readonly hint: "repair the source or importer, then rebuild or cold-cook the source package";
|
|
13
|
+
};
|
|
14
|
+
readonly 'source-package-ddc-failed': {
|
|
15
|
+
readonly expected: "a readable persistent DDC entry with matching integrity evidence";
|
|
16
|
+
readonly hint: "discard the invalid derived entry, then rebuild or cold-cook the source package";
|
|
17
|
+
};
|
|
18
|
+
readonly 'source-package-publication-invalid': {
|
|
19
|
+
readonly expected: "a complete Pack body, refs, artifacts, and route integrity";
|
|
20
|
+
readonly hint: "repair the missing product bytes, then rebuild or cold-cook the source package";
|
|
21
|
+
};
|
|
22
|
+
readonly 'source-package-guid-closure-mismatch': {
|
|
23
|
+
readonly expected: "exactly one produced asset for every declared GUID";
|
|
24
|
+
readonly hint: "repair the Meta topology or importer output, then rebuild the whole source package";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type SourcePackageErrorCode = keyof typeof SOURCE_PACKAGE_ERROR_POLICY;
|
|
28
|
+
export type SourcePackageErrorStage = 'meta' | 'importer' | 'conversion' | 'closure' | 'ddc' | 'route-integrity';
|
|
29
|
+
export interface SourcePackageErrorContext {
|
|
30
|
+
readonly sourceMeta: string;
|
|
31
|
+
readonly anchorGuid: string;
|
|
32
|
+
readonly affectedGuids: readonly string[];
|
|
33
|
+
readonly producer: string;
|
|
34
|
+
readonly importer: string;
|
|
35
|
+
}
|
|
36
|
+
export interface SourcePackageErrorDetail extends SourcePackageErrorContext {
|
|
37
|
+
readonly stage: SourcePackageErrorStage;
|
|
38
|
+
readonly reason?: string;
|
|
39
|
+
readonly missing?: readonly string[];
|
|
40
|
+
readonly unexpected?: readonly string[];
|
|
41
|
+
readonly registeredImporters?: readonly string[];
|
|
42
|
+
}
|
|
43
|
+
export interface SourcePackageError {
|
|
44
|
+
readonly code: SourcePackageErrorCode;
|
|
45
|
+
readonly expected: string;
|
|
46
|
+
readonly hint: string;
|
|
47
|
+
readonly detail: SourcePackageErrorDetail;
|
|
48
|
+
}
|
|
49
|
+
export declare function sourcePackageError(code: SourcePackageErrorCode, context: SourcePackageErrorContext, detail: Omit<SourcePackageErrorDetail, keyof SourcePackageErrorContext>): SourcePackageError;
|
|
50
|
+
export declare function normalizeSourcePackageError(error: unknown, context: SourcePackageErrorContext): SourcePackageError;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=source-package-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-package-errors.d.ts","sourceRoot":"","sources":["../src/source-package-errors.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;CAyBvB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,MAAM,OAAO,2BAA2B,CAAC;AAE9E,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,UAAU,GACV,YAAY,GACZ,SAAS,GACT,KAAK,GACL,iBAAiB,CAAC;AAEtB,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,QAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC;IACxC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;CAC3C;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,sBAAsB,EAC5B,OAAO,EAAE,yBAAyB,EAClC,MAAM,EAAE,IAAI,CAAC,wBAAwB,EAAE,MAAM,yBAAyB,CAAC,GACtE,kBAAkB,CAQpB;AA8CD,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,yBAAyB,GACjC,kBAAkB,CAuBpB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type DdcGenerationEntryCandidate, DdcGenerationSession, type DdcHead } from '@forgeax/engine-ddc';
|
|
2
|
+
import { type CatalogEntry, type ResourceRevision } from '@forgeax/engine-types';
|
|
3
|
+
import { type SourcePackageError, type SourcePackageErrorContext } from './source-package-errors.js';
|
|
4
|
+
interface StagedSourcePackageDdc extends DdcGenerationEntryCandidate {
|
|
5
|
+
readonly root: string;
|
|
6
|
+
readonly session: DdcGenerationSession;
|
|
7
|
+
readonly context: SourcePackageErrorContext;
|
|
8
|
+
}
|
|
9
|
+
export interface ImportPublicationInput {
|
|
10
|
+
readonly root: string;
|
|
11
|
+
readonly guid: string;
|
|
12
|
+
readonly desiredKey: string;
|
|
13
|
+
readonly pack: unknown;
|
|
14
|
+
readonly previousCatalog: readonly CatalogEntry[];
|
|
15
|
+
readonly nextCatalog: readonly CatalogEntry[];
|
|
16
|
+
readonly publishedGuids: readonly string[];
|
|
17
|
+
readonly transport?: {
|
|
18
|
+
readonly path: string;
|
|
19
|
+
readonly body: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface ImportPublicationError {
|
|
23
|
+
readonly code: SourcePackageError['code'];
|
|
24
|
+
readonly expected: string;
|
|
25
|
+
readonly hint: string;
|
|
26
|
+
readonly detail: string;
|
|
27
|
+
readonly diagnostic: SourcePackageError;
|
|
28
|
+
}
|
|
29
|
+
export type ImportPublicationResult = {
|
|
30
|
+
readonly ok: true;
|
|
31
|
+
readonly key: string;
|
|
32
|
+
readonly head: DdcHead;
|
|
33
|
+
readonly catalog: readonly CatalogEntry[];
|
|
34
|
+
readonly revision: ResourceRevision;
|
|
35
|
+
readonly transportPersisted: boolean;
|
|
36
|
+
} | {
|
|
37
|
+
readonly ok: false;
|
|
38
|
+
readonly error: ImportPublicationError;
|
|
39
|
+
readonly head: DdcHead;
|
|
40
|
+
};
|
|
41
|
+
export interface StagedImportPublication {
|
|
42
|
+
readonly input: ImportPublicationInput;
|
|
43
|
+
readonly ddc: StagedSourcePackageDdc;
|
|
44
|
+
readonly key: string;
|
|
45
|
+
readonly head: DdcHead;
|
|
46
|
+
readonly catalog: readonly CatalogEntry[];
|
|
47
|
+
readonly revision: ResourceRevision;
|
|
48
|
+
}
|
|
49
|
+
export type StagedImportPublicationResult = {
|
|
50
|
+
readonly ok: true;
|
|
51
|
+
readonly candidate: StagedImportPublication;
|
|
52
|
+
} | {
|
|
53
|
+
readonly ok: false;
|
|
54
|
+
readonly error: ImportPublicationError;
|
|
55
|
+
readonly head: DdcHead;
|
|
56
|
+
};
|
|
57
|
+
export declare function publishImportPublication(input: ImportPublicationInput): Promise<ImportPublicationResult>;
|
|
58
|
+
export declare function stageImportPublication(input: ImportPublicationInput): Promise<StagedImportPublicationResult>;
|
|
59
|
+
export declare function commitImportPublication(candidate: StagedImportPublication): Promise<ImportPublicationResult>;
|
|
60
|
+
export declare function discardImportPublication(candidate: StagedImportPublication): Promise<void>;
|
|
61
|
+
export declare function restoreImportPublication(candidate: StagedImportPublication): Promise<void>;
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=source-package-publication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-package-publication.d.ts","sourceRoot":"","sources":["../src/source-package-publication.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,2BAA2B,EAChC,oBAAoB,EACpB,KAAK,OAAO,EAGb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL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