@geekmidas/manifest 10.0.0-alpha.177 → 10.0.0-alpha.179

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/index.cjs CHANGED
@@ -1134,6 +1134,24 @@ function imageOrigins(sources, resolve) {
1134
1134
  }
1135
1135
  return origins.size > 0 ? [...origins].sort().join(",") : void 0;
1136
1136
  }
1137
+ /**
1138
+ * Where a frontend lists the origins its pages load files from: the
1139
+ * {@link IMAGE_ORIGINS_KEY} under its public prefix
1140
+ * (`NEXT_PUBLIC_GKM_IMAGE_ORIGINS`), and the keys whose origins make it up
1141
+ * ({@link imageOriginSources}). `undefined` for one that shows no files —
1142
+ * then it is handed no such key at all.
1143
+ *
1144
+ * The one place the key is named for a declaration: the dev env, a process's
1145
+ * keys and an image build's arguments all read it from here.
1146
+ */
1147
+ function imageOriginsFor(declaration, manifest) {
1148
+ const sources = imageOriginSources(declaration, manifest);
1149
+ if (sources.length === 0) return void 0;
1150
+ return {
1151
+ key: `${PUBLIC_PREFIX[declaration.variant]}${IMAGE_ORIGINS_KEY}`,
1152
+ sources
1153
+ };
1154
+ }
1137
1155
  //#endregion
1138
1156
  //#region src/derived.ts
1139
1157
  /** Where a processor keeps what it made, in the bucket it reads. */
@@ -1698,6 +1716,7 @@ exports.fileServerSurfaceId = fileServerSurfaceId;
1698
1716
  exports.hostLabels = hostLabels;
1699
1717
  exports.imageOriginSources = imageOriginSources;
1700
1718
  exports.imageOrigins = imageOrigins;
1719
+ exports.imageOriginsFor = imageOriginsFor;
1701
1720
  exports.inboxRecipient = inboxRecipient;
1702
1721
  exports.isDerived = isDerived;
1703
1722
  exports.isHostedDeclaration = isHostedDeclaration;