@forgeax/engine-pack 0.1.23 → 0.1.25
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/build.d.ts +4 -4
- package/dist/build.d.ts.map +1 -1
- package/dist/build.mjs +390 -294
- 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 +26 -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 +121 -27
- 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 +102 -4
- 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 +11 -9
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.mjs +36 -34
- 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__/material-declaration-boundary.unit.test.ts +35 -0
- package/src/__tests__/material-surface-consumer-census.test.ts +24 -0
- package/src/__tests__/material-surface-publication.unit.test.ts +159 -0
- package/src/__tests__/material-surface-wire.unit.test.ts +30 -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 +10 -8
- package/src/catalog-builder.ts +3 -3
- package/src/cli-asset.ts +5 -5
- package/src/evidence/material-cook.ts +170 -7
- package/src/evidence/source-inventory.ts +3 -3
- package/src/index.ts +6 -1
- package/src/material-cook.ts +3 -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 +33 -31
- package/src/schema/material-cook.schema.json +47 -1
- package/src/scriptable-pack-node.ts +25 -25
- package/src/scriptable-pack.ts +3 -2
- package/dist/__tests__/ai-recovery.unit.test.d.ts +0 -2
- package/dist/__tests__/ai-recovery.unit.test.d.ts.map +0 -1
- package/dist/__tests__/artifact-path.test.d.ts +0 -2
- package/dist/__tests__/artifact-path.test.d.ts.map +0 -1
- package/dist/__tests__/asset-evidence-error-hints.test.d.ts +0 -2
- package/dist/__tests__/asset-evidence-error-hints.test.d.ts.map +0 -1
- package/dist/__tests__/asset-evidence-lifecycle.test.d.ts +0 -2
- package/dist/__tests__/asset-evidence-lifecycle.test.d.ts.map +0 -1
- package/dist/__tests__/asset-evidence-schema.test.d.ts +0 -2
- package/dist/__tests__/asset-evidence-schema.test.d.ts.map +0 -1
- package/dist/__tests__/atlas-cli-region-mismatch.test.d.ts +0 -2
- package/dist/__tests__/atlas-cli-region-mismatch.test.d.ts.map +0 -1
- package/dist/__tests__/atlas-error-code-owner.test-d.d.ts +0 -2
- package/dist/__tests__/atlas-error-code-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/cli-asset-evidence.integration.test.d.ts +0 -2
- package/dist/__tests__/cli-asset-evidence.integration.test.d.ts.map +0 -1
- package/dist/__tests__/cli.unit.test.d.ts +0 -2
- package/dist/__tests__/cli.unit.test.d.ts.map +0 -1
- package/dist/__tests__/evidence-source-inventory.unit.test.d.ts +0 -2
- package/dist/__tests__/evidence-source-inventory.unit.test.d.ts.map +0 -1
- package/dist/__tests__/guid-collision.unit.test.d.ts +0 -2
- package/dist/__tests__/guid-collision.unit.test.d.ts.map +0 -1
- package/dist/__tests__/guid-validator-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/guid-validator-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/inventory-schema.test.d.ts +0 -2
- package/dist/__tests__/inventory-schema.test.d.ts.map +0 -1
- package/dist/__tests__/material-cook-dependencies.unit.test.d.ts +0 -2
- package/dist/__tests__/material-cook-dependencies.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-cook-receipt.unit.test.d.ts +0 -2
- package/dist/__tests__/material-cook-receipt.unit.test.d.ts.map +0 -1
- package/dist/__tests__/material-cook-schema.unit.test.d.ts +0 -2
- package/dist/__tests__/material-cook-schema.unit.test.d.ts.map +0 -1
- package/dist/__tests__/mesh-bin-consumer-surface.unit.test.d.ts +0 -2
- package/dist/__tests__/mesh-bin-consumer-surface.unit.test.d.ts.map +0 -1
- package/dist/__tests__/mesh-bin-contract.unit.test.d.ts +0 -2
- package/dist/__tests__/mesh-bin-contract.unit.test.d.ts.map +0 -1
- package/dist/__tests__/meta-schema-optional.test.d.ts +0 -2
- package/dist/__tests__/meta-schema-optional.test.d.ts.map +0 -1
- package/dist/__tests__/meta-source-overrides.unit.test.d.ts +0 -2
- package/dist/__tests__/meta-source-overrides.unit.test.d.ts.map +0 -1
- package/dist/__tests__/native-cooker-registry.test.d.ts +0 -2
- package/dist/__tests__/native-cooker-registry.test.d.ts.map +0 -1
- package/dist/__tests__/offline-evidence-artifact-verification-owner.test-d.d.ts +0 -2
- package/dist/__tests__/offline-evidence-artifact-verification-owner.test-d.d.ts.map +0 -1
- package/dist/__tests__/offline-evidence.integration.test.d.ts +0 -2
- package/dist/__tests__/offline-evidence.integration.test.d.ts.map +0 -1
- package/dist/__tests__/owner-chain.integration.test.d.ts +0 -2
- package/dist/__tests__/owner-chain.integration.test.d.ts.map +0 -1
- package/dist/__tests__/pack-v2-fixture-migration.test.d.ts +0 -2
- package/dist/__tests__/pack-v2-fixture-migration.test.d.ts.map +0 -1
- package/dist/__tests__/pack-v2-schema.test.d.ts +0 -2
- package/dist/__tests__/pack-v2-schema.test.d.ts.map +0 -1
- package/dist/__tests__/pack.unit.test.d.ts +0 -2
- package/dist/__tests__/pack.unit.test.d.ts.map +0 -1
- package/dist/__tests__/package-finalizer.contract.test.d.ts +0 -2
- package/dist/__tests__/package-finalizer.contract.test.d.ts.map +0 -1
- 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/__tests__/producer-contract-schema.unit.test.d.ts +0 -2
- package/dist/__tests__/producer-contract-schema.unit.test.d.ts.map +0 -1
- package/dist/__tests__/resolve-asset-source.test.d.ts +0 -2
- package/dist/__tests__/resolve-asset-source.test.d.ts.map +0 -1
- package/dist/__tests__/runtime-projection.unit.test.d.ts +0 -2
- package/dist/__tests__/runtime-projection.unit.test.d.ts.map +0 -1
- package/dist/__tests__/runtime.browser.test.d.ts +0 -2
- package/dist/__tests__/runtime.browser.test.d.ts.map +0 -1
- package/dist/__tests__/scanner-blacklist.test.d.ts +0 -2
- package/dist/__tests__/scanner-blacklist.test.d.ts.map +0 -1
- package/dist/__tests__/scanner-inventory.contract.test.d.ts +0 -2
- package/dist/__tests__/scanner-inventory.contract.test.d.ts.map +0 -1
- package/dist/__tests__/scanner-inventory.test.d.ts +0 -2
- package/dist/__tests__/scanner-inventory.test.d.ts.map +0 -1
- package/dist/__tests__/scanner-mount-cycle.test.d.ts +0 -2
- package/dist/__tests__/scanner-mount-cycle.test.d.ts.map +0 -1
- package/dist/__tests__/scriptable-pack-cli.integration.test.d.ts +0 -2
- package/dist/__tests__/scriptable-pack-cli.integration.test.d.ts.map +0 -1
- package/dist/__tests__/scriptable-pack-ddc-key.unit.test.d.ts +0 -2
- package/dist/__tests__/scriptable-pack-ddc-key.unit.test.d.ts.map +0 -1
- package/dist/__tests__/topology-actions.unit.test.d.ts +0 -2
- package/dist/__tests__/topology-actions.unit.test.d.ts.map +0 -1
- package/dist/__tests__/topology.unit.test.d.ts +0 -2
- package/dist/__tests__/topology.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
package/dist/cli-asset.mjs
CHANGED
|
@@ -7316,7 +7316,7 @@ var AssetGuid = {
|
|
|
7316
7316
|
}
|
|
7317
7317
|
};
|
|
7318
7318
|
|
|
7319
|
-
// src/
|
|
7319
|
+
// src/pack-authoring.ts
|
|
7320
7320
|
var PACK_PARAMETER_TYPES = [
|
|
7321
7321
|
"bool",
|
|
7322
7322
|
"u32",
|
|
@@ -7728,10 +7728,10 @@ function validateParameterDefinitions(parameters, propertyPath = "$.parameters")
|
|
|
7728
7728
|
}
|
|
7729
7729
|
return ok(Object.freeze(normalized));
|
|
7730
7730
|
}
|
|
7731
|
-
function
|
|
7731
|
+
function projectScriptablePackMeta(definition, sourcePath) {
|
|
7732
7732
|
return {
|
|
7733
7733
|
schemaVersion: "2.0.0",
|
|
7734
|
-
kind: "
|
|
7734
|
+
kind: "scriptable-pack-source",
|
|
7735
7735
|
packageId: PackageId.format(definition.packageId),
|
|
7736
7736
|
source: sourcePath,
|
|
7737
7737
|
..."parameters" in definition ? {
|
|
@@ -7933,7 +7933,7 @@ function parsePackJsonAsset(value, sourceKey) {
|
|
|
7933
7933
|
};
|
|
7934
7934
|
return ok(withArtifacts);
|
|
7935
7935
|
}
|
|
7936
|
-
function
|
|
7936
|
+
function parsePackSourceJson(value) {
|
|
7937
7937
|
if (!isRecord(value))
|
|
7938
7938
|
return jsonError("$", "a v3 pack.json object", value, "document is not an object");
|
|
7939
7939
|
if (value.schemaVersion !== "3.0.0")
|
|
@@ -8013,7 +8013,7 @@ function parseParameterizedPackJson(value) {
|
|
|
8013
8013
|
});
|
|
8014
8014
|
}
|
|
8015
8015
|
function projectDirectPackJson(value) {
|
|
8016
|
-
const parsed = "format" in value ? ok(value) :
|
|
8016
|
+
const parsed = "format" in value ? ok(value) : parsePackSourceJson(value);
|
|
8017
8017
|
if (!parsed.ok) return parsed;
|
|
8018
8018
|
if (parsed.value.format !== "direct") {
|
|
8019
8019
|
return failure(
|
|
@@ -8037,7 +8037,7 @@ function projectDirectPackJson(value) {
|
|
|
8037
8037
|
}
|
|
8038
8038
|
return ok({ packageId: PackageId.format(parsed.value.packageId), assets: Object.freeze(assets) });
|
|
8039
8039
|
}
|
|
8040
|
-
var
|
|
8040
|
+
var PACK_AUTHORING_OPERATION_IDS = [
|
|
8041
8041
|
"asset.list",
|
|
8042
8042
|
"asset.inspect",
|
|
8043
8043
|
"asset.resolve",
|
|
@@ -8049,14 +8049,12 @@ var PARAMETERIZED_PACK_OPERATION_IDS = [
|
|
|
8049
8049
|
"asset-source.rebuild",
|
|
8050
8050
|
"asset-source.cold-cook"
|
|
8051
8051
|
];
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
})
|
|
8059
|
-
);
|
|
8052
|
+
PACK_AUTHORING_OPERATION_IDS.map((id) => ({
|
|
8053
|
+
id,
|
|
8054
|
+
domain: id.startsWith("asset-source.") ? "session" : "asset",
|
|
8055
|
+
readOnly: id.startsWith("asset."),
|
|
8056
|
+
requiresRevision: !id.startsWith("asset.") && id !== "asset-source.create"
|
|
8057
|
+
}));
|
|
8060
8058
|
function isRecord2(value) {
|
|
8061
8059
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8062
8060
|
}
|
|
@@ -8517,7 +8515,7 @@ var pack_schema_default = {
|
|
|
8517
8515
|
},
|
|
8518
8516
|
parent: {
|
|
8519
8517
|
$ref: "#/$defs/guid36",
|
|
8520
|
-
description: "Parent
|
|
8518
|
+
description: "Parent ScriptablePack packageId for one v3 instance; the source may declare Pack parameters."
|
|
8521
8519
|
},
|
|
8522
8520
|
values: {
|
|
8523
8521
|
type: "object",
|
|
@@ -8884,7 +8882,7 @@ function hydrateFailure(value) {
|
|
|
8884
8882
|
return value;
|
|
8885
8883
|
}
|
|
8886
8884
|
var WorkerScriptablePackExecutor = class {
|
|
8887
|
-
|
|
8885
|
+
supportsPackParameters = true;
|
|
8888
8886
|
worker;
|
|
8889
8887
|
compileRoot;
|
|
8890
8888
|
nextBuildId = 0;
|
|
@@ -8985,7 +8983,7 @@ function scriptablePackWorkerUrl() {
|
|
|
8985
8983
|
const bundledWorker = new URL("./scriptable-pack-worker.mjs", import.meta.url);
|
|
8986
8984
|
return existsSync(fileURLToPath(bundledWorker)) ? bundledWorker : new URL("../dist/scriptable-pack-worker.mjs", import.meta.url);
|
|
8987
8985
|
}
|
|
8988
|
-
function
|
|
8986
|
+
function scriptablePackLoadFailure(sourcePath, reason, phase, diagnostic, timeoutMs) {
|
|
8989
8987
|
return {
|
|
8990
8988
|
code: "pack-parameter-invalid",
|
|
8991
8989
|
expected: "a trusted Pack v2 authoring module with a valid default export",
|
|
@@ -8999,14 +8997,14 @@ function parameterizedLoadFailure(sourcePath, reason, phase, diagnostic, timeout
|
|
|
8999
8997
|
}
|
|
9000
8998
|
};
|
|
9001
8999
|
}
|
|
9002
|
-
async function
|
|
9000
|
+
async function loadScriptablePack(sourcePath, options = {}) {
|
|
9003
9001
|
const timeoutMs = options.timeoutMs ?? 15e3;
|
|
9004
9002
|
const buildTimeoutMs = options.buildTimeoutMs ?? 5e3;
|
|
9005
9003
|
const executor = options.executor ?? new WorkerScriptablePackExecutor();
|
|
9006
9004
|
let disposeReason;
|
|
9007
9005
|
let timeout;
|
|
9008
9006
|
try {
|
|
9009
|
-
const timeoutSignal = /* @__PURE__ */ Symbol("
|
|
9007
|
+
const timeoutSignal = /* @__PURE__ */ Symbol("scriptable-pack-module-timeout");
|
|
9010
9008
|
const loaded = await Promise.race([
|
|
9011
9009
|
executor.load(sourcePath),
|
|
9012
9010
|
new Promise((resolve6) => {
|
|
@@ -9016,7 +9014,7 @@ async function loadParameterizedScriptablePack(sourcePath, options = {}) {
|
|
|
9016
9014
|
if (loaded === timeoutSignal) {
|
|
9017
9015
|
disposeReason = "timeout";
|
|
9018
9016
|
return err(
|
|
9019
|
-
|
|
9017
|
+
scriptablePackLoadFailure(
|
|
9020
9018
|
sourcePath,
|
|
9021
9019
|
"timeout",
|
|
9022
9020
|
"module-load",
|
|
@@ -9043,7 +9041,7 @@ async function loadParameterizedScriptablePack(sourcePath, options = {}) {
|
|
|
9043
9041
|
let buildTimedOut = false;
|
|
9044
9042
|
let buildTimeout;
|
|
9045
9043
|
const timeoutResult = err(
|
|
9046
|
-
|
|
9044
|
+
scriptablePackLoadFailure(
|
|
9047
9045
|
sourcePath,
|
|
9048
9046
|
"timeout",
|
|
9049
9047
|
"build",
|
|
@@ -9052,7 +9050,7 @@ async function loadParameterizedScriptablePack(sourcePath, options = {}) {
|
|
|
9052
9050
|
)
|
|
9053
9051
|
);
|
|
9054
9052
|
try {
|
|
9055
|
-
const invocation = "
|
|
9053
|
+
const invocation = "supportsPackParameters" in executor && executor.supportsPackParameters === true ? build(context.readByGuid, {
|
|
9056
9054
|
packageId: [...context.packageId],
|
|
9057
9055
|
..."values" in context && context.values !== void 0 ? { values: context.values } : {}
|
|
9058
9056
|
}) : definition.build(context);
|
|
@@ -9082,7 +9080,7 @@ async function loadParameterizedScriptablePack(sourcePath, options = {}) {
|
|
|
9082
9080
|
} catch (error) {
|
|
9083
9081
|
disposeReason = "failure";
|
|
9084
9082
|
return err(
|
|
9085
|
-
|
|
9083
|
+
scriptablePackLoadFailure(
|
|
9086
9084
|
sourcePath,
|
|
9087
9085
|
"module-load",
|
|
9088
9086
|
"module-load",
|
|
@@ -9233,7 +9231,7 @@ async function scanValidated(roots, opts = {}, capture) {
|
|
|
9233
9231
|
if (!loaded.ok) return loaded;
|
|
9234
9232
|
const { raw, parsed } = loaded.value;
|
|
9235
9233
|
if (record(parsed) && parsed.schemaVersion === "3.0.0") {
|
|
9236
|
-
const authoring =
|
|
9234
|
+
const authoring = parsePackSourceJson(parsed);
|
|
9237
9235
|
if (!authoring.ok) {
|
|
9238
9236
|
return packErr(
|
|
9239
9237
|
makePackError("pack-malformed-pack", {
|
|
@@ -9477,7 +9475,7 @@ async function scanValidated(roots, opts = {}, capture) {
|
|
|
9477
9475
|
...opts.scriptablePack ?? {},
|
|
9478
9476
|
...capture === void 0 ? { metadataOnly: true } : {}
|
|
9479
9477
|
};
|
|
9480
|
-
const loaded = await
|
|
9478
|
+
const loaded = await loadScriptablePack(sourcePath, loaderOptions);
|
|
9481
9479
|
if (!loaded.ok) {
|
|
9482
9480
|
const diagnostic = loaded.error.detail.diagnostic;
|
|
9483
9481
|
return packErr(
|
|
@@ -9506,12 +9504,12 @@ async function scanValidated(roots, opts = {}, capture) {
|
|
|
9506
9504
|
const packageCollision = registerPackage(
|
|
9507
9505
|
PackageId.format(loaded.value.packageId),
|
|
9508
9506
|
sourcePath,
|
|
9509
|
-
"
|
|
9507
|
+
"scriptable"
|
|
9510
9508
|
);
|
|
9511
9509
|
if (packageCollision !== void 0) return packErr(packageCollision);
|
|
9512
|
-
const meta =
|
|
9510
|
+
const meta = projectScriptablePackMeta(loaded.value, sourcePath);
|
|
9513
9511
|
capture?.declarations.set(sourcePath, {
|
|
9514
|
-
format: "pack.ts
|
|
9512
|
+
format: "pack.ts",
|
|
9515
9513
|
sourcePath,
|
|
9516
9514
|
sourceRevision: `sha256:${createHash("sha256").update(source).digest("hex")}`,
|
|
9517
9515
|
value: meta,
|
|
@@ -9540,15 +9538,15 @@ async function scanValidated(roots, opts = {}, capture) {
|
|
|
9540
9538
|
);
|
|
9541
9539
|
}
|
|
9542
9540
|
const kind = packageKind.get(parentId);
|
|
9543
|
-
if (kind !== "
|
|
9541
|
+
if (kind !== "scriptable" && kind !== "instance") {
|
|
9544
9542
|
return packErr(
|
|
9545
9543
|
makePackError("pack-malformed-pack", {
|
|
9546
9544
|
path: instance.path,
|
|
9547
|
-
reason: "pack-parent-
|
|
9545
|
+
reason: "pack-parent-has-no-parameters",
|
|
9548
9546
|
ajvErrors: [
|
|
9549
9547
|
{
|
|
9550
9548
|
instancePath: "/parent",
|
|
9551
|
-
message: `parent ${instance.parent} is not a
|
|
9549
|
+
message: `parent ${instance.parent} is not a ScriptablePack source with parameters`
|
|
9552
9550
|
}
|
|
9553
9551
|
]
|
|
9554
9552
|
})
|
|
@@ -9621,7 +9619,7 @@ async function scanInventory(roots, opts = {}) {
|
|
|
9621
9619
|
const declaration = declarations.get(sourcePath);
|
|
9622
9620
|
if (declaration?.format !== "pack.json") continue;
|
|
9623
9621
|
if (declaration.value.schemaVersion === "3.0.0") {
|
|
9624
|
-
const parsed =
|
|
9622
|
+
const parsed = parsePackSourceJson(declaration.value);
|
|
9625
9623
|
if (!parsed.ok) {
|
|
9626
9624
|
return packErr(
|
|
9627
9625
|
makePackError("pack-malformed-pack", {
|
|
@@ -9721,7 +9719,7 @@ async function readSourceInventory(request) {
|
|
|
9721
9719
|
}
|
|
9722
9720
|
if (path.endsWith(".pack.json")) {
|
|
9723
9721
|
if (parsed.schemaVersion === "3.0.0") {
|
|
9724
|
-
const direct =
|
|
9722
|
+
const direct = parsePackSourceJson(parsed);
|
|
9725
9723
|
if (direct.ok && direct.value.format === "direct") {
|
|
9726
9724
|
const projected = projectDirectPackJson(direct.value);
|
|
9727
9725
|
if (projected.ok && projected.value.assets.some((asset) => asset.guid.toLowerCase() === guid)) {
|
|
@@ -9916,11 +9914,11 @@ async function runMeta(rest, ctx) {
|
|
|
9916
9914
|
});
|
|
9917
9915
|
}
|
|
9918
9916
|
const cwd = ctx.cwd ?? process.cwd();
|
|
9919
|
-
const loaded = await
|
|
9917
|
+
const loaded = await loadScriptablePack(absolutePath(source, cwd), {
|
|
9920
9918
|
metadataOnly: true
|
|
9921
9919
|
});
|
|
9922
9920
|
if (!loaded.ok) return emitError2(ctx, loaded.error);
|
|
9923
|
-
ctx.stdoutWrite(JSON.stringify(
|
|
9921
|
+
ctx.stdoutWrite(JSON.stringify(projectScriptablePackMeta(loaded.value, source)));
|
|
9924
9922
|
return 0;
|
|
9925
9923
|
}
|
|
9926
9924
|
async function runRecoveryCommand(operation, rest, ctx) {
|