@forgeax/engine-pack 0.1.32 → 0.1.33
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/dist/build.mjs +15 -5
- package/dist/build.mjs.map +1 -1
- package/dist/pack-authoring-node.d.ts.map +1 -1
- package/dist/pack-authoring-node.mjs +15 -5
- package/dist/pack-authoring-node.mjs.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/pack-authoring-gateway.unit.test.ts +71 -1
- package/src/pack-authoring-node.ts +20 -4
package/dist/build.mjs
CHANGED
|
@@ -11566,6 +11566,15 @@ async function inspectAsset(gameRoot, snapshot, operation) {
|
|
|
11566
11566
|
const selected = subjectFor(gameRoot, snapshot, operation);
|
|
11567
11567
|
if (!selected.ok) return selected;
|
|
11568
11568
|
const subject = selected.value;
|
|
11569
|
+
const source = await readConfined({ gameRoot }, operation, subject.relativePath);
|
|
11570
|
+
if (!source.ok) return source;
|
|
11571
|
+
const inspectedSource = {
|
|
11572
|
+
...sourceResult(subject, operation),
|
|
11573
|
+
revision: source.value.revision,
|
|
11574
|
+
...subject.format === "source" ? {
|
|
11575
|
+
assets: snapshot.materialized.filter((asset) => asset.packageId === packageKey(subject.packageId)).map((asset) => ({ ...asset }))
|
|
11576
|
+
} : {}
|
|
11577
|
+
};
|
|
11569
11578
|
if (operation.sourceKey !== void 0) {
|
|
11570
11579
|
if (!isValidPackSourceKey(operation.sourceKey)) {
|
|
11571
11580
|
return err(
|
|
@@ -11598,7 +11607,7 @@ async function inspectAsset(gameRoot, snapshot, operation) {
|
|
|
11598
11607
|
(candidate) => candidate.packageId === packageKey(subject.packageId) && candidate.sourceKey === operation.sourceKey
|
|
11599
11608
|
);
|
|
11600
11609
|
return ok({
|
|
11601
|
-
...
|
|
11610
|
+
...inspectedSource,
|
|
11602
11611
|
sourceKey: asset.sourceKey,
|
|
11603
11612
|
guid: asset.guid,
|
|
11604
11613
|
kind: asset.kind,
|
|
@@ -11611,7 +11620,7 @@ async function inspectAsset(gameRoot, snapshot, operation) {
|
|
|
11611
11620
|
(candidate) => candidate.packageId === packageKey(subject.packageId) && candidate.sourceKey === operation.sourceKey
|
|
11612
11621
|
);
|
|
11613
11622
|
return ok({
|
|
11614
|
-
...
|
|
11623
|
+
...inspectedSource,
|
|
11615
11624
|
sourceKey: operation.sourceKey,
|
|
11616
11625
|
guid,
|
|
11617
11626
|
...materialized === void 0 ? { status: "identity" } : {
|
|
@@ -11635,7 +11644,7 @@ async function inspectAsset(gameRoot, snapshot, operation) {
|
|
|
11635
11644
|
const resolved = await resolveInstance(snapshot, subject);
|
|
11636
11645
|
if (!resolved.ok) return resolved;
|
|
11637
11646
|
return ok({
|
|
11638
|
-
...
|
|
11647
|
+
...inspectedSource,
|
|
11639
11648
|
parameters: resolved.value.parameters.map((parameter) => ({
|
|
11640
11649
|
name: parameter.name,
|
|
11641
11650
|
type: parameter.type,
|
|
@@ -11649,7 +11658,7 @@ async function inspectAsset(gameRoot, snapshot, operation) {
|
|
|
11649
11658
|
parentChain: resolved.value.parentChain
|
|
11650
11659
|
});
|
|
11651
11660
|
}
|
|
11652
|
-
return ok(
|
|
11661
|
+
return ok(inspectedSource);
|
|
11653
11662
|
}
|
|
11654
11663
|
function listAssets(snapshot, operation) {
|
|
11655
11664
|
const assets = snapshotAssets(snapshot).map((asset) => ({
|
|
@@ -12749,7 +12758,8 @@ async function executeRaw(options, operation) {
|
|
|
12749
12758
|
refreshed.value.source,
|
|
12750
12759
|
selected.value.packageId,
|
|
12751
12760
|
{
|
|
12752
|
-
format: refreshed.value.relative.endsWith(".pack.json") ? "pack.json" : "pack.ts"
|
|
12761
|
+
format: refreshed.value.relative.endsWith(".pack.json") ? "pack.json" : "pack.ts",
|
|
12762
|
+
assets: refreshedSnapshot.value.materialized.filter((asset) => asset.packageId === packageKey(selected.value.packageId)).map((asset) => ({ ...asset }))
|
|
12753
12763
|
}
|
|
12754
12764
|
);
|
|
12755
12765
|
}
|