@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.
Files changed (81) hide show
  1. package/README.md +12 -6
  2. package/dist/__tests__/material-cook-receipt-layer-plan.unit.test.d.ts +2 -0
  3. package/dist/__tests__/material-cook-receipt-layer-plan.unit.test.d.ts.map +1 -0
  4. package/dist/__tests__/pack-authoring-gateway.unit.test.d.ts +2 -0
  5. package/dist/__tests__/pack-authoring-gateway.unit.test.d.ts.map +1 -0
  6. package/dist/__tests__/pack-authoring.unit.test.d.ts +2 -0
  7. package/dist/__tests__/pack-authoring.unit.test.d.ts.map +1 -0
  8. package/dist/__tests__/pack-scanner.unit.test.d.ts +2 -0
  9. package/dist/__tests__/pack-scanner.unit.test.d.ts.map +1 -0
  10. package/dist/build.d.ts +3 -3
  11. package/dist/build.d.ts.map +1 -1
  12. package/dist/build.mjs +331 -290
  13. package/dist/build.mjs.map +1 -1
  14. package/dist/cli-asset.mjs +33 -35
  15. package/dist/cli-asset.mjs.map +1 -1
  16. package/dist/evidence/material-cook.d.ts +11 -0
  17. package/dist/evidence/material-cook.d.ts.map +1 -1
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.mjs +69 -26
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/material-cook.d.ts +1 -1
  23. package/dist/material-cook.d.ts.map +1 -1
  24. package/dist/material-cook.mjs +50 -3
  25. package/dist/material-cook.mjs.map +1 -1
  26. package/dist/{parameterized-pack-node.d.ts → pack-authoring-node.d.ts} +7 -7
  27. package/dist/pack-authoring-node.d.ts.map +1 -0
  28. package/dist/{parameterized-pack-node.mjs → pack-authoring-node.mjs} +59 -63
  29. package/dist/pack-authoring-node.mjs.map +1 -0
  30. package/dist/{parameterized-pack.d.ts → pack-authoring.d.ts} +28 -31
  31. package/dist/pack-authoring.d.ts.map +1 -0
  32. package/dist/pack-authoring.mjs +1137 -0
  33. package/dist/pack-authoring.mjs.map +1 -0
  34. package/dist/runtime.mjs +1 -1
  35. package/dist/runtime.mjs.map +1 -1
  36. package/dist/scanner.d.ts +8 -8
  37. package/dist/scanner.d.ts.map +1 -1
  38. package/dist/scanner.mjs +29 -31
  39. package/dist/scanner.mjs.map +1 -1
  40. package/dist/schema.mjs +1 -1
  41. package/dist/schema.mjs.map +1 -1
  42. package/dist/scriptable-pack-node.d.ts +4 -4
  43. package/dist/scriptable-pack-node.d.ts.map +1 -1
  44. package/dist/scriptable-pack-node.mjs +18 -20
  45. package/dist/scriptable-pack-node.mjs.map +1 -1
  46. package/dist/scriptable-pack.d.ts +3 -2
  47. package/dist/scriptable-pack.d.ts.map +1 -1
  48. package/dist/scriptable-pack.mjs +19 -23
  49. package/dist/scriptable-pack.mjs.map +1 -1
  50. package/package.json +2 -7
  51. package/schema/pack.schema.json +1 -1
  52. package/src/__tests__/material-cook-receipt-layer-plan.unit.test.ts +16 -0
  53. package/src/__tests__/material-cook-schema.unit.test.ts +62 -0
  54. package/src/__tests__/{parameterized-pack-authoring-gateway.unit.test.ts → pack-authoring-gateway.unit.test.ts} +9 -9
  55. package/src/__tests__/{parameterized-pack.unit.test.ts → pack-authoring.unit.test.ts} +10 -10
  56. package/src/__tests__/{parameterized-pack-scanner.unit.test.ts → pack-scanner.unit.test.ts} +6 -6
  57. package/src/__tests__/scanner-inventory.contract.test.ts +2 -4
  58. package/src/__tests__/scanner-inventory.test.ts +7 -6
  59. package/src/__tests__/scriptable-pack-cli.integration.test.ts +1 -1
  60. package/src/build.ts +8 -8
  61. package/src/catalog-builder.ts +3 -3
  62. package/src/cli-asset.ts +5 -5
  63. package/src/evidence/material-cook.ts +79 -3
  64. package/src/evidence/source-inventory.ts +3 -3
  65. package/src/index.ts +4 -1
  66. package/src/material-cook.ts +1 -0
  67. package/src/{parameterized-pack-node.ts → pack-authoring-node.ts} +71 -73
  68. package/src/{parameterized-pack.ts → pack-authoring.ts} +59 -74
  69. package/src/scanner.ts +26 -28
  70. package/src/schema/material-cook.schema.json +4 -1
  71. package/src/scriptable-pack-node.ts +25 -25
  72. package/src/scriptable-pack.ts +3 -2
  73. package/dist/__tests__/parameterized-pack-authoring-gateway.unit.test.d.ts +0 -2
  74. package/dist/__tests__/parameterized-pack-authoring-gateway.unit.test.d.ts.map +0 -1
  75. package/dist/__tests__/parameterized-pack-scanner.unit.test.d.ts +0 -2
  76. package/dist/__tests__/parameterized-pack-scanner.unit.test.d.ts.map +0 -1
  77. package/dist/__tests__/parameterized-pack.unit.test.d.ts +0 -2
  78. package/dist/__tests__/parameterized-pack.unit.test.d.ts.map +0 -1
  79. package/dist/parameterized-pack-node.d.ts.map +0 -1
  80. package/dist/parameterized-pack-node.mjs.map +0 -1
  81. package/dist/parameterized-pack.d.ts.map +0 -1
@@ -7366,10 +7366,10 @@ function validateParameterDefinitions(parameters, propertyPath = "$.parameters")
7366
7366
  }
7367
7367
  return ok(Object.freeze(normalized));
7368
7368
  }
7369
- function projectParameterizedPackMeta(definition, sourcePath) {
7369
+ function projectScriptablePackMeta(definition, sourcePath) {
7370
7370
  return {
7371
7371
  schemaVersion: "2.0.0",
7372
- kind: "parameterized-pack-source",
7372
+ kind: "scriptable-pack-source",
7373
7373
  packageId: PackageId.format(definition.packageId),
7374
7374
  source: sourcePath,
7375
7375
  ..."parameters" in definition ? {
@@ -7606,7 +7606,7 @@ function parsePackJsonAsset(value, sourceKey) {
7606
7606
  };
7607
7607
  return ok(withArtifacts);
7608
7608
  }
7609
- function parseParameterizedPackJson(value) {
7609
+ function parsePackSourceJson(value) {
7610
7610
  if (!isRecord(value))
7611
7611
  return jsonError("$", "a v3 pack.json object", value, "document is not an object");
7612
7612
  if (value.schemaVersion !== "3.0.0")
@@ -7686,7 +7686,7 @@ function parseParameterizedPackJson(value) {
7686
7686
  });
7687
7687
  }
7688
7688
  function projectDirectPackJson(value) {
7689
- const parsed = "format" in value ? ok(value) : parseParameterizedPackJson(value);
7689
+ const parsed = "format" in value ? ok(value) : parsePackSourceJson(value);
7690
7690
  if (!parsed.ok) return parsed;
7691
7691
  if (parsed.value.format !== "direct") {
7692
7692
  return failure(
@@ -7732,9 +7732,9 @@ async function resolvePackParameterInheritance(subject, readParent) {
7732
7732
  if (current.format === "direct") {
7733
7733
  return failure(
7734
7734
  authoringError(
7735
- "pack-parent-not-parameterized",
7736
- "a parameterized Pack source as the parent",
7737
- "direct packs cannot be instance parents; point the instance at a parameterized source",
7735
+ "pack-parent-has-no-parameters",
7736
+ "a ScriptablePack source with parameters as the parent",
7737
+ "direct packs cannot be instance parents; point the instance at a ScriptablePack source with parameters",
7738
7738
  { packageId: currentId }
7739
7739
  )
7740
7740
  );
@@ -7745,7 +7745,7 @@ async function resolvePackParameterInheritance(subject, readParent) {
7745
7745
  if (descriptors2.value.length === 0) {
7746
7746
  return failure(
7747
7747
  authoringError(
7748
- "pack-parent-not-parameterized",
7748
+ "pack-parent-has-no-parameters",
7749
7749
  "the parent source to declare a non-empty parameter list",
7750
7750
  "use clone for an independent zero-parameter Pack instead of creating an empty instance",
7751
7751
  { packageId: currentId }
@@ -7771,7 +7771,7 @@ async function resolvePackParameterInheritance(subject, readParent) {
7771
7771
  authoringError(
7772
7772
  "pack-parent-not-found",
7773
7773
  "the parent packageId to resolve in the source index",
7774
- "inspect the parent locator or recreate the instance from a live parameterized Pack",
7774
+ "inspect the parent locator or recreate the instance from a live ScriptablePack with parameters",
7775
7775
  { packageId: currentId, parent: PackageId.format(current.parent) }
7776
7776
  )
7777
7777
  );
@@ -7812,7 +7812,7 @@ async function resolvePackParameterInheritance(subject, readParent) {
7812
7812
  }
7813
7813
  return visit(subject, []);
7814
7814
  }
7815
- var PARAMETERIZED_PACK_OPERATION_IDS = [
7815
+ var PACK_AUTHORING_OPERATION_IDS = [
7816
7816
  "asset.list",
7817
7817
  "asset.inspect",
7818
7818
  "asset.resolve",
@@ -7824,7 +7824,7 @@ var PARAMETERIZED_PACK_OPERATION_IDS = [
7824
7824
  "asset-source.rebuild",
7825
7825
  "asset-source.cold-cook"
7826
7826
  ];
7827
- function createParameterizedPackAuthoringGateway(port) {
7827
+ function createPackAuthoringGateway(port) {
7828
7828
  const requests = /* @__PURE__ */ new Map();
7829
7829
  return {
7830
7830
  execute(operation) {
@@ -7890,14 +7890,12 @@ function createParameterizedPackAuthoringGateway(port) {
7890
7890
  }
7891
7891
  };
7892
7892
  }
7893
- PARAMETERIZED_PACK_OPERATION_IDS.map(
7894
- (id) => ({
7895
- id,
7896
- domain: id.startsWith("asset-source.") ? "session" : "asset",
7897
- readOnly: id.startsWith("asset."),
7898
- requiresRevision: !id.startsWith("asset.") && id !== "asset-source.create"
7899
- })
7900
- );
7893
+ PACK_AUTHORING_OPERATION_IDS.map((id) => ({
7894
+ id,
7895
+ domain: id.startsWith("asset-source.") ? "session" : "asset",
7896
+ readOnly: id.startsWith("asset."),
7897
+ requiresRevision: !id.startsWith("asset.") && id !== "asset-source.create"
7898
+ }));
7901
7899
  function isRecord2(value) {
7902
7900
  return typeof value === "object" && value !== null && !Array.isArray(value);
7903
7901
  }
@@ -8358,7 +8356,7 @@ var pack_schema_default = {
8358
8356
  },
8359
8357
  parent: {
8360
8358
  $ref: "#/$defs/guid36",
8361
- description: "Parent parameterized Pack packageId for one v3 instance."
8359
+ description: "Parent ScriptablePack packageId for one v3 instance; the source may declare Pack parameters."
8362
8360
  },
8363
8361
  values: {
8364
8362
  type: "object",
@@ -8713,7 +8711,7 @@ function hydrateFailure(value) {
8713
8711
  return value;
8714
8712
  }
8715
8713
  var WorkerScriptablePackExecutor = class {
8716
- supportsParameterizedContext = true;
8714
+ supportsPackParameters = true;
8717
8715
  worker;
8718
8716
  compileRoot;
8719
8717
  nextBuildId = 0;
@@ -8814,7 +8812,7 @@ function scriptablePackWorkerUrl() {
8814
8812
  const bundledWorker = new URL("./scriptable-pack-worker.mjs", import.meta.url);
8815
8813
  return existsSync(fileURLToPath(bundledWorker)) ? bundledWorker : new URL("../dist/scriptable-pack-worker.mjs", import.meta.url);
8816
8814
  }
8817
- function parameterizedLoadFailure(sourcePath, reason, phase, diagnostic, timeoutMs) {
8815
+ function scriptablePackLoadFailure(sourcePath, reason, phase, diagnostic, timeoutMs) {
8818
8816
  return {
8819
8817
  code: "pack-parameter-invalid",
8820
8818
  expected: "a trusted Pack v2 authoring module with a valid default export",
@@ -8828,14 +8826,14 @@ function parameterizedLoadFailure(sourcePath, reason, phase, diagnostic, timeout
8828
8826
  }
8829
8827
  };
8830
8828
  }
8831
- async function loadParameterizedScriptablePack(sourcePath, options = {}) {
8829
+ async function loadScriptablePack(sourcePath, options = {}) {
8832
8830
  const timeoutMs = options.timeoutMs ?? 15e3;
8833
8831
  const buildTimeoutMs = options.buildTimeoutMs ?? 5e3;
8834
8832
  const executor = options.executor ?? new WorkerScriptablePackExecutor();
8835
8833
  let disposeReason;
8836
8834
  let timeout;
8837
8835
  try {
8838
- const timeoutSignal = /* @__PURE__ */ Symbol("parameterized-pack-module-timeout");
8836
+ const timeoutSignal = /* @__PURE__ */ Symbol("scriptable-pack-module-timeout");
8839
8837
  const loaded = await Promise.race([
8840
8838
  executor.load(sourcePath),
8841
8839
  new Promise((resolve4) => {
@@ -8845,7 +8843,7 @@ async function loadParameterizedScriptablePack(sourcePath, options = {}) {
8845
8843
  if (loaded === timeoutSignal) {
8846
8844
  disposeReason = "timeout";
8847
8845
  return err(
8848
- parameterizedLoadFailure(
8846
+ scriptablePackLoadFailure(
8849
8847
  sourcePath,
8850
8848
  "timeout",
8851
8849
  "module-load",
@@ -8872,7 +8870,7 @@ async function loadParameterizedScriptablePack(sourcePath, options = {}) {
8872
8870
  let buildTimedOut = false;
8873
8871
  let buildTimeout;
8874
8872
  const timeoutResult = err(
8875
- parameterizedLoadFailure(
8873
+ scriptablePackLoadFailure(
8876
8874
  sourcePath,
8877
8875
  "timeout",
8878
8876
  "build",
@@ -8881,7 +8879,7 @@ async function loadParameterizedScriptablePack(sourcePath, options = {}) {
8881
8879
  )
8882
8880
  );
8883
8881
  try {
8884
- const invocation = "supportsParameterizedContext" in executor && executor.supportsParameterizedContext === true ? build(context.readByGuid, {
8882
+ const invocation = "supportsPackParameters" in executor && executor.supportsPackParameters === true ? build(context.readByGuid, {
8885
8883
  packageId: [...context.packageId],
8886
8884
  ..."values" in context && context.values !== void 0 ? { values: context.values } : {}
8887
8885
  }) : definition.build(context);
@@ -8911,7 +8909,7 @@ async function loadParameterizedScriptablePack(sourcePath, options = {}) {
8911
8909
  } catch (error) {
8912
8910
  disposeReason = "failure";
8913
8911
  return err(
8914
- parameterizedLoadFailure(
8912
+ scriptablePackLoadFailure(
8915
8913
  sourcePath,
8916
8914
  "module-load",
8917
8915
  "module-load",
@@ -9061,7 +9059,7 @@ async function scanValidated(roots, opts = {}, capture) {
9061
9059
  if (!loaded.ok) return loaded;
9062
9060
  const { raw, parsed } = loaded.value;
9063
9061
  if (record(parsed) && parsed.schemaVersion === "3.0.0") {
9064
- const authoring = parseParameterizedPackJson(parsed);
9062
+ const authoring = parsePackSourceJson(parsed);
9065
9063
  if (!authoring.ok) {
9066
9064
  return packErr(
9067
9065
  makePackError("pack-malformed-pack", {
@@ -9305,7 +9303,7 @@ async function scanValidated(roots, opts = {}, capture) {
9305
9303
  ...opts.scriptablePack ?? {},
9306
9304
  ...capture === void 0 ? { metadataOnly: true } : {}
9307
9305
  };
9308
- const loaded = await loadParameterizedScriptablePack(sourcePath, loaderOptions);
9306
+ const loaded = await loadScriptablePack(sourcePath, loaderOptions);
9309
9307
  if (!loaded.ok) {
9310
9308
  const diagnostic = loaded.error.detail.diagnostic;
9311
9309
  return packErr(
@@ -9334,12 +9332,12 @@ async function scanValidated(roots, opts = {}, capture) {
9334
9332
  const packageCollision = registerPackage(
9335
9333
  PackageId.format(loaded.value.packageId),
9336
9334
  sourcePath,
9337
- "parameterized"
9335
+ "scriptable"
9338
9336
  );
9339
9337
  if (packageCollision !== void 0) return packErr(packageCollision);
9340
- const meta = projectParameterizedPackMeta(loaded.value, sourcePath);
9338
+ const meta = projectScriptablePackMeta(loaded.value, sourcePath);
9341
9339
  capture?.declarations.set(sourcePath, {
9342
- format: "pack.ts-parameterized",
9340
+ format: "pack.ts",
9343
9341
  sourcePath,
9344
9342
  sourceRevision: `sha256:${createHash("sha256").update(source).digest("hex")}`,
9345
9343
  value: meta,
@@ -9368,15 +9366,15 @@ async function scanValidated(roots, opts = {}, capture) {
9368
9366
  );
9369
9367
  }
9370
9368
  const kind = packageKind.get(parentId);
9371
- if (kind !== "parameterized" && kind !== "instance") {
9369
+ if (kind !== "scriptable" && kind !== "instance") {
9372
9370
  return packErr(
9373
9371
  makePackError("pack-malformed-pack", {
9374
9372
  path: instance.path,
9375
- reason: "pack-parent-not-parameterized",
9373
+ reason: "pack-parent-has-no-parameters",
9376
9374
  ajvErrors: [
9377
9375
  {
9378
9376
  instancePath: "/parent",
9379
- message: `parent ${instance.parent} is not a parameterized Pack`
9377
+ message: `parent ${instance.parent} is not a ScriptablePack source with parameters`
9380
9378
  }
9381
9379
  ]
9382
9380
  })
@@ -9446,7 +9444,7 @@ async function scanInventory(roots, opts = {}) {
9446
9444
  const declaration = declarations.get(sourcePath);
9447
9445
  if (declaration?.format !== "pack.json") continue;
9448
9446
  if (declaration.value.schemaVersion === "3.0.0") {
9449
- const parsed = parseParameterizedPackJson(declaration.value);
9447
+ const parsed = parsePackSourceJson(declaration.value);
9450
9448
  if (!parsed.ok) {
9451
9449
  return packErr(
9452
9450
  makePackError("pack-malformed-pack", {
@@ -9491,7 +9489,7 @@ async function scanInventory(roots, opts = {}) {
9491
9489
  return ok3({ paths: scanned.value, inventory, declarations });
9492
9490
  }
9493
9491
 
9494
- // src/parameterized-pack-node.ts
9492
+ // src/pack-authoring-node.ts
9495
9493
  function isRecord3(value) {
9496
9494
  return value !== null && typeof value === "object" && !Array.isArray(value);
9497
9495
  }
@@ -9623,7 +9621,7 @@ function scanFailure(operation, cause) {
9623
9621
  const value = cause !== null && typeof cause === "object" ? cause : {};
9624
9622
  const detail = value.detail !== null && typeof value.detail === "object" ? value.detail : {};
9625
9623
  const reason = isRecord3(detail) && typeof detail.reason === "string" ? detail.reason : void 0;
9626
- const code = reason === "pack-parent-not-found" || reason === "pack-parent-cycle" || reason === "pack-parent-not-parameterized" ? reason : value.code === "pack-guid-collision" ? "pack-guid-collision" : "pack-parameter-invalid";
9624
+ const code = reason === "pack-parent-not-found" || reason === "pack-parent-cycle" || reason === "pack-parent-has-no-parameters" ? reason : value.code === "pack-guid-collision" ? "pack-guid-collision" : "pack-parameter-invalid";
9627
9625
  return makeError(
9628
9626
  code,
9629
9627
  typeof value.expected === "string" ? value.expected : "a valid Pack Source Index",
@@ -9795,7 +9793,7 @@ async function createSnapshot(options, operation) {
9795
9793
  const directAssets = [];
9796
9794
  for (const [sourcePath, declaration] of scanned.value.declarations) {
9797
9795
  const relativePath = relative(resolve(options.gameRoot), sourcePath).split(sep).join("/");
9798
- if (declaration.format === "pack.ts-parameterized") {
9796
+ if (declaration.format === "pack.ts") {
9799
9797
  subjects.set(packageKey(declaration.definition.packageId), {
9800
9798
  format: "source",
9801
9799
  packageId: declaration.definition.packageId,
@@ -9806,7 +9804,7 @@ async function createSnapshot(options, operation) {
9806
9804
  continue;
9807
9805
  }
9808
9806
  if (declaration.format !== "pack.json" || declaration.value.schemaVersion !== "3.0.0") continue;
9809
- const parsed = parseParameterizedPackJson(declaration.value);
9807
+ const parsed = parsePackSourceJson(declaration.value);
9810
9808
  if (!parsed.ok) return err(parsed.error);
9811
9809
  if (parsed.value.format === "direct") {
9812
9810
  const projected = projectDirectPackJson(parsed.value);
@@ -10519,7 +10517,7 @@ function revisionConflict(operation, path, actual) {
10519
10517
  function directJson(packageId2, assets) {
10520
10518
  return { schemaVersion: "3.0.0", packageId: PackageId.format(packageId2), assets };
10521
10519
  }
10522
- function parameterizedScaffold(packageId2, parameters) {
10520
+ function packSourceScaffold(packageId2, parameters) {
10523
10521
  const parameterSource = parameters === void 0 ? "" : "\n parameters: " + JSON.stringify(
10524
10522
  parameters.map((parameter) => jsonValue(parameter)),
10525
10523
  null,
@@ -10607,13 +10605,13 @@ async function executeRaw(options, operation) {
10607
10605
  makeError(
10608
10606
  "pack-parameter-invalid",
10609
10607
  "direct create to contain assets only",
10610
- "use pack.ts for a parameterized source or create-instance for parent+values",
10608
+ "use pack.ts for a ScriptablePack source or create-instance for parent+values",
10611
10609
  { requestId: operation.requestId }
10612
10610
  )
10613
10611
  );
10614
10612
  }
10615
10613
  const assets = operation.initialAssets ?? {};
10616
- const parsed = parseParameterizedPackJson(directJson(identity.value, assets));
10614
+ const parsed = parsePackSourceJson(directJson(identity.value, assets));
10617
10615
  if (!parsed.ok) return err(parsed.error);
10618
10616
  if (parsed.value.format !== "direct") {
10619
10617
  return err(
@@ -10669,7 +10667,7 @@ async function executeRaw(options, operation) {
10669
10667
  }
10670
10668
  parameters = validated.value.parameters;
10671
10669
  }
10672
- source = parameterizedScaffold(identity.value, parameters);
10670
+ source = packSourceScaffold(identity.value, parameters);
10673
10671
  const serialized = parameters === void 0 ? void 0 : serializedParameters({
10674
10672
  schemaVersion: "2.0.0",
10675
10673
  packageId: identity.value,
@@ -10765,7 +10763,7 @@ async function executeRaw(options, operation) {
10765
10763
  )
10766
10764
  );
10767
10765
  }
10768
- const parsed = parseParameterizedPackJson(parsedValue);
10766
+ const parsed = parsePackSourceJson(parsedValue);
10769
10767
  if (!parsed.ok) return err(parsed.error);
10770
10768
  source = `${JSON.stringify(
10771
10769
  parsed.value.format === "direct" ? directJson(identity.value, parsed.value.assets) : {
@@ -10825,7 +10823,7 @@ async function executeRaw(options, operation) {
10825
10823
  makeError(
10826
10824
  "pack-parent-not-found",
10827
10825
  "a parent packageId for the new instance",
10828
- "pass parentPackageId or parent and point it at a parameterized source",
10826
+ "pass parentPackageId or parent and point it at a ScriptablePack source with parameters",
10829
10827
  { requestId: operation.requestId }
10830
10828
  )
10831
10829
  );
@@ -10848,7 +10846,7 @@ async function executeRaw(options, operation) {
10848
10846
  makeError(
10849
10847
  "pack-parent-not-found",
10850
10848
  "the parent packageId to exist in the current Source Index",
10851
- "inspect the Source Index and choose a parameterized parent",
10849
+ "inspect the Source Index and choose a ScriptablePack parent with parameters",
10852
10850
  { requestId: operation.requestId, parent: parentText }
10853
10851
  )
10854
10852
  );
@@ -10856,8 +10854,8 @@ async function executeRaw(options, operation) {
10856
10854
  if (parent.format === "source" && !("parameters" in parent.definition)) {
10857
10855
  return err(
10858
10856
  makeError(
10859
- "pack-parent-not-parameterized",
10860
- "a non-empty parameterized Pack source as the parent",
10857
+ "pack-parent-has-no-parameters",
10858
+ "a ScriptablePack source with a non-empty parameter list as the parent",
10861
10859
  "use asset-source.clone for a zero-parameter Pack",
10862
10860
  { requestId: operation.requestId, parent: parentText }
10863
10861
  )
@@ -10866,8 +10864,8 @@ async function executeRaw(options, operation) {
10866
10864
  if (parent.format === "direct") {
10867
10865
  return err(
10868
10866
  makeError(
10869
- "pack-parent-not-parameterized",
10870
- "a parameterized Pack source or instance as the parent",
10867
+ "pack-parent-has-no-parameters",
10868
+ "a ScriptablePack source or instance with parameters as the parent",
10871
10869
  "direct Packs cannot be instance parents",
10872
10870
  { requestId: operation.requestId, parent: parentText }
10873
10871
  )
@@ -10970,7 +10968,7 @@ async function executeRaw(options, operation) {
10970
10968
  )
10971
10969
  );
10972
10970
  }
10973
- const parsed = parseParameterizedPackJson(json);
10971
+ const parsed = parsePackSourceJson(json);
10974
10972
  if (!parsed.ok) return err(parsed.error);
10975
10973
  if (parsed.value.format !== "instance") {
10976
10974
  return err(
@@ -11073,21 +11071,19 @@ async function executeRaw(options, operation) {
11073
11071
  return err(
11074
11072
  makeError(
11075
11073
  "pack-parameter-invalid",
11076
- "a supported parameterized Pack operation",
11077
- "use one of PARAMETERIZED_PACK_OPERATION_IDS",
11074
+ "a supported Pack authoring operation",
11075
+ "use one of PACK_AUTHORING_OPERATION_IDS",
11078
11076
  { requestId: operation.requestId, operation: operation.operation }
11079
11077
  )
11080
11078
  );
11081
11079
  }
11082
- function createFileSystemParameterizedPackAuthoringPort(options) {
11080
+ function createFileSystemPackAuthoringPort(options) {
11083
11081
  return { execute: (operation) => executeRaw(options, operation) };
11084
11082
  }
11085
- function createFileSystemParameterizedPackAuthoringGateway(options) {
11086
- return createParameterizedPackAuthoringGateway(
11087
- createFileSystemParameterizedPackAuthoringPort(options)
11088
- );
11083
+ function createFileSystemPackAuthoringGateway(options) {
11084
+ return createPackAuthoringGateway(createFileSystemPackAuthoringPort(options));
11089
11085
  }
11090
11086
 
11091
- export { createFileSystemParameterizedPackAuthoringGateway, createFileSystemParameterizedPackAuthoringPort };
11092
- //# sourceMappingURL=parameterized-pack-node.mjs.map
11093
- //# sourceMappingURL=parameterized-pack-node.mjs.map
11087
+ export { createFileSystemPackAuthoringGateway, createFileSystemPackAuthoringPort };
11088
+ //# sourceMappingURL=pack-authoring-node.mjs.map
11089
+ //# sourceMappingURL=pack-authoring-node.mjs.map