@geekmidas/cli 10.0.0-alpha.68 → 10.0.0-alpha.69

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 (136) hide show
  1. package/dist/{LegacyStateStore-C39UKwmf.mjs → LegacyStateStore-BE1Et8RS.mjs} +2 -2
  2. package/dist/{LegacyStateStore-C39UKwmf.mjs.map → LegacyStateStore-BE1Et8RS.mjs.map} +1 -1
  3. package/dist/{LegacyStateStore-BZiO9-Lw.cjs → LegacyStateStore-LS_uTO8D.cjs} +2 -2
  4. package/dist/{LegacyStateStore-BZiO9-Lw.cjs.map → LegacyStateStore-LS_uTO8D.cjs.map} +1 -1
  5. package/dist/{LocalStateStore-DHVsZLyF.cjs → LocalStateStore-CV6phNMZ.cjs} +2 -2
  6. package/dist/{LocalStateStore-DHVsZLyF.cjs.map → LocalStateStore-CV6phNMZ.cjs.map} +1 -1
  7. package/dist/{LocalStateStore-Dk3Wbvzk.mjs → LocalStateStore-DAnFc708.mjs} +2 -2
  8. package/dist/{LocalStateStore-Dk3Wbvzk.mjs.map → LocalStateStore-DAnFc708.mjs.map} +1 -1
  9. package/dist/{OpenApiTsGenerator-BmUAcR7d.mjs → OpenApiTsGenerator-CSaXs-dB.mjs} +2 -2
  10. package/dist/{OpenApiTsGenerator-BmUAcR7d.mjs.map → OpenApiTsGenerator-CSaXs-dB.mjs.map} +1 -1
  11. package/dist/{OpenApiTsGenerator-B2zrdyP4.cjs → OpenApiTsGenerator-CxB8mqXz.cjs} +2 -2
  12. package/dist/{OpenApiTsGenerator-B2zrdyP4.cjs.map → OpenApiTsGenerator-CxB8mqXz.cjs.map} +1 -1
  13. package/dist/{S3StateStore-B_ZF9eHt.mjs → S3StateStore-8kJEGnTh.mjs} +2 -2
  14. package/dist/{S3StateStore-B_ZF9eHt.mjs.map → S3StateStore-8kJEGnTh.mjs.map} +1 -1
  15. package/dist/{S3StateStore--4tYVMAL.cjs → S3StateStore-dA34LAYm.cjs} +2 -2
  16. package/dist/{S3StateStore--4tYVMAL.cjs.map → S3StateStore-dA34LAYm.cjs.map} +1 -1
  17. package/dist/{SSMStateStore-ACZ8hRvZ.cjs → SSMStateStore-DBzlfc-S.cjs} +2 -2
  18. package/dist/{SSMStateStore-ACZ8hRvZ.cjs.map → SSMStateStore-DBzlfc-S.cjs.map} +1 -1
  19. package/dist/{SSMStateStore-DjPuKqrm.mjs → SSMStateStore-Dkdw-fPL.mjs} +2 -2
  20. package/dist/{SSMStateStore-DjPuKqrm.mjs.map → SSMStateStore-Dkdw-fPL.mjs.map} +1 -1
  21. package/dist/add-CoIr2wgv.cjs +568 -0
  22. package/dist/add-CoIr2wgv.cjs.map +1 -0
  23. package/dist/add-Dzk23476.mjs +566 -0
  24. package/dist/add-Dzk23476.mjs.map +1 -0
  25. package/dist/{bundler-C1pnNrR0.cjs → bundler-CSR2nM4m.cjs} +5 -5
  26. package/dist/{bundler-C1pnNrR0.cjs.map → bundler-CSR2nM4m.cjs.map} +1 -1
  27. package/dist/{bundler-C-w7aGoZ.mjs → bundler-Cn0JF5G0.mjs} +5 -5
  28. package/dist/{bundler-C-w7aGoZ.mjs.map → bundler-Cn0JF5G0.mjs.map} +1 -1
  29. package/dist/{cli-BLyD4c0O.cjs → cli-IoM2-x48.cjs} +4 -4
  30. package/dist/{cli-BLyD4c0O.cjs.map → cli-IoM2-x48.cjs.map} +1 -1
  31. package/dist/{cli-Ce4pLL5O.mjs → cli-ij8Lwlww.mjs} +4 -4
  32. package/dist/{cli-Ce4pLL5O.mjs.map → cli-ij8Lwlww.mjs.map} +1 -1
  33. package/dist/{compose-DFxuYhn6.mjs → compose-CZtinmtw.mjs} +12 -11
  34. package/dist/compose-CZtinmtw.mjs.map +1 -0
  35. package/dist/{compose-DvsgumY2.cjs → compose-DfIioFX0.cjs} +12 -11
  36. package/dist/compose-DfIioFX0.cjs.map +1 -0
  37. package/dist/config.cjs +3 -3
  38. package/dist/config.mjs +3 -3
  39. package/dist/credentialSchemas-BcNL1N5R.cjs +271 -0
  40. package/dist/credentialSchemas-BcNL1N5R.cjs.map +1 -0
  41. package/dist/credentialSchemas-BmYxnEz_.mjs +236 -0
  42. package/dist/credentialSchemas-BmYxnEz_.mjs.map +1 -0
  43. package/dist/deploy/public.cjs +7 -7
  44. package/dist/deploy/public.d.cts.map +1 -1
  45. package/dist/deploy/public.d.mts.map +1 -1
  46. package/dist/deploy/public.mjs +7 -7
  47. package/dist/{deploy-D-EVOWvu.mjs → deploy-BzqbkJ3o.mjs} +6 -6
  48. package/dist/{deploy-D-EVOWvu.mjs.map → deploy-BzqbkJ3o.mjs.map} +1 -1
  49. package/dist/{deploy-C08GONYW.cjs → deploy-Dpz9raPM.cjs} +6 -6
  50. package/dist/{deploy-C08GONYW.cjs.map → deploy-Dpz9raPM.cjs.map} +1 -1
  51. package/dist/{discover-OEfZ9OkA.cjs → discover-B4VjaFJk.cjs} +2 -2
  52. package/dist/{discover-OEfZ9OkA.cjs.map → discover-B4VjaFJk.cjs.map} +1 -1
  53. package/dist/{discover-BFoJWKGD.mjs → discover-Buwf1z4P.mjs} +2 -2
  54. package/dist/{discover-BFoJWKGD.mjs.map → discover-Buwf1z4P.mjs.map} +1 -1
  55. package/dist/{dokploy-CZ6nfSV9.cjs → dokploy-B6O-J1fb.cjs} +2 -2
  56. package/dist/{dokploy-CZ6nfSV9.cjs.map → dokploy-B6O-J1fb.cjs.map} +1 -1
  57. package/dist/{dokploy-DU-XJsoT.mjs → dokploy-DkwcORbv.mjs} +2 -2
  58. package/dist/{dokploy-DU-XJsoT.mjs.map → dokploy-DkwcORbv.mjs.map} +1 -1
  59. package/dist/{encryption-DSiLau1-.mjs → encryption-7m1mKcRy.mjs} +3 -3
  60. package/dist/{encryption-DSiLau1-.mjs.map → encryption-7m1mKcRy.mjs.map} +1 -1
  61. package/dist/{encryption-CCcBSLZs.cjs → encryption-C8Ic5t0C.cjs} +3 -3
  62. package/dist/{encryption-CCcBSLZs.cjs.map → encryption-C8Ic5t0C.cjs.map} +1 -1
  63. package/dist/{engine-llWnMZH5.mjs → engine-62Kl70Pj.mjs} +14 -6
  64. package/dist/{engine-llWnMZH5.mjs.map → engine-62Kl70Pj.mjs.map} +1 -1
  65. package/dist/{engine-BM9Dy_DT.cjs → engine-BR9qlS7A.cjs} +14 -6
  66. package/dist/engine-BR9qlS7A.cjs.map +1 -0
  67. package/dist/{github-ZoMam0OH.cjs → github-CmGIZjhu.cjs} +3 -3
  68. package/dist/{github-ZoMam0OH.cjs.map → github-CmGIZjhu.cjs.map} +1 -1
  69. package/dist/{github-yy6WpHIl.mjs → github-DtymyOcH.mjs} +3 -3
  70. package/dist/{github-yy6WpHIl.mjs.map → github-DtymyOcH.mjs.map} +1 -1
  71. package/dist/index.cjs +86 -47
  72. package/dist/index.cjs.map +1 -1
  73. package/dist/index.mjs +86 -47
  74. package/dist/index.mjs.map +1 -1
  75. package/dist/{migrate-BWPuwiXk.mjs → migrate-CEzq6DjL.mjs} +4 -4
  76. package/dist/{migrate-BWPuwiXk.mjs.map → migrate-CEzq6DjL.mjs.map} +1 -1
  77. package/dist/{migrate-tOwxQBTI.cjs → migrate-CYC-hBOU.cjs} +4 -4
  78. package/dist/{migrate-tOwxQBTI.cjs.map → migrate-CYC-hBOU.cjs.map} +1 -1
  79. package/dist/openapi.cjs +1 -1
  80. package/dist/openapi.mjs +1 -1
  81. package/dist/{ready-2s3-CndS.mjs → ready-DeYaSoNN.mjs} +3 -3
  82. package/dist/{ready-2s3-CndS.mjs.map → ready-DeYaSoNN.mjs.map} +1 -1
  83. package/dist/{ready-B6uHr4sm.cjs → ready-QGgjmcuN.cjs} +3 -3
  84. package/dist/{ready-B6uHr4sm.cjs.map → ready-QGgjmcuN.cjs.map} +1 -1
  85. package/dist/reconcile/public.cjs +1 -1
  86. package/dist/reconcile/public.mjs +1 -1
  87. package/dist/{resolve-BymzGtuT.cjs → resolve-BDsMffvz.cjs} +3 -3
  88. package/dist/{resolve-BymzGtuT.cjs.map → resolve-BDsMffvz.cjs.map} +1 -1
  89. package/dist/{resolve-pIvXlZ1h.mjs → resolve-Dn5wGf1r.mjs} +3 -3
  90. package/dist/{resolve-pIvXlZ1h.mjs.map → resolve-Dn5wGf1r.mjs.map} +1 -1
  91. package/dist/{rollback-zdfi6Reg.cjs → rollback-5XHaBDxW.cjs} +5 -5
  92. package/dist/{rollback-zdfi6Reg.cjs.map → rollback-5XHaBDxW.cjs.map} +1 -1
  93. package/dist/{rollback-ZlsbQOvj.mjs → rollback-DDfaqv7P.mjs} +5 -5
  94. package/dist/{rollback-ZlsbQOvj.mjs.map → rollback-DDfaqv7P.mjs.map} +1 -1
  95. package/dist/sandbox/credentials-worker.cjs +54 -0
  96. package/dist/sandbox/credentials-worker.cjs.map +1 -0
  97. package/dist/sandbox/credentials-worker.d.cts +1 -0
  98. package/dist/sandbox/credentials-worker.d.mts +1 -0
  99. package/dist/sandbox/credentials-worker.mjs +55 -0
  100. package/dist/sandbox/credentials-worker.mjs.map +1 -0
  101. package/dist/sandbox/discover-worker.cjs +1 -1
  102. package/dist/sandbox/discover-worker.mjs +1 -1
  103. package/dist/sandbox/migrate-worker.cjs +1 -1
  104. package/dist/sandbox/migrate-worker.mjs +1 -1
  105. package/dist/{schemas-RUlKHu27.cjs → schemas-BObwxB_t.cjs} +164 -3
  106. package/dist/schemas-BObwxB_t.cjs.map +1 -0
  107. package/dist/{schemas-Cfhtpdo0.mjs → schemas-D-xeKJDD.mjs} +153 -4
  108. package/dist/schemas-D-xeKJDD.mjs.map +1 -0
  109. package/dist/{sniffer-D66HIvi9.cjs → sniffer-Bc0nNBDF.cjs} +7 -7
  110. package/dist/{sniffer-D66HIvi9.cjs.map → sniffer-Bc0nNBDF.cjs.map} +1 -1
  111. package/dist/{sniffer-BdFeLSmA.mjs → sniffer-DMqi2b1q.mjs} +7 -7
  112. package/dist/{sniffer-BdFeLSmA.mjs.map → sniffer-DMqi2b1q.mjs.map} +1 -1
  113. package/dist/{state-CHZqCDRC.cjs → state-8RgXeX5Y.cjs} +116 -62
  114. package/dist/{state-CHZqCDRC.cjs.map → state-8RgXeX5Y.cjs.map} +1 -1
  115. package/dist/{state-Bn5JDMFT.mjs → state-DClnPZt5.mjs} +105 -63
  116. package/dist/{state-Bn5JDMFT.mjs.map → state-DClnPZt5.mjs.map} +1 -1
  117. package/dist/target/public.cjs +1 -1
  118. package/dist/target/public.mjs +1 -1
  119. package/dist/{terminal-C3cv-OQu.mjs → terminal-C6TBo_SA.mjs} +2 -2
  120. package/dist/{terminal-C3cv-OQu.mjs.map → terminal-C6TBo_SA.mjs.map} +1 -1
  121. package/dist/{terminal-DjzgLu6m.cjs → terminal-CFO3xWoF.cjs} +2 -2
  122. package/dist/{terminal-DjzgLu6m.cjs.map → terminal-CFO3xWoF.cjs.map} +1 -1
  123. package/dist/vitest.cjs +1 -1
  124. package/dist/vitest.mjs +1 -1
  125. package/dist/workspace/index.cjs +1 -1
  126. package/dist/workspace/index.mjs +1 -1
  127. package/dist/{workspace-ON-bqiJz.cjs → workspace-8NuAjaXJ.cjs} +2 -2
  128. package/dist/{workspace-ON-bqiJz.cjs.map → workspace-8NuAjaXJ.cjs.map} +1 -1
  129. package/dist/{workspace-Be6uBhlF.mjs → workspace-B2UK_rVP.mjs} +2 -2
  130. package/dist/{workspace-Be6uBhlF.mjs.map → workspace-B2UK_rVP.mjs.map} +1 -1
  131. package/package.json +16 -13
  132. package/dist/compose-DFxuYhn6.mjs.map +0 -1
  133. package/dist/compose-DvsgumY2.cjs.map +0 -1
  134. package/dist/engine-BM9Dy_DT.cjs.map +0 -1
  135. package/dist/schemas-Cfhtpdo0.mjs.map +0 -1
  136. package/dist/schemas-RUlKHu27.cjs.map +0 -1
@@ -1,10 +1,10 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
2
  const require_run = require("./run-fVZ-rLnc.cjs");
3
- const require_discover = require("./discover-OEfZ9OkA.cjs");
3
+ const require_discover = require("./discover-B4VjaFJk.cjs");
4
4
  const require_derive = require("./derive-DAbo49sm.cjs");
5
- const require_workspace = require("./workspace-ON-bqiJz.cjs");
5
+ const require_workspace = require("./workspace-8NuAjaXJ.cjs");
6
6
  const require_config = require("./config.cjs");
7
- const require_resolve = require("./resolve-BymzGtuT.cjs");
7
+ const require_resolve = require("./resolve-BDsMffvz.cjs");
8
8
  const require_fakes = require("./fakes-zW-jNAbQ.cjs");
9
9
  let node_path = require("node:path");
10
10
  let node_fs = require("node:fs");
@@ -4650,7 +4650,7 @@ var ExternalServicesNotConfigured = class extends Error {
4650
4650
  const by = m.apps?.length ? `, read by ${m.apps.join(", ")}` : "";
4651
4651
  return ` gkm secrets:set ${m.key} '${m.example}' --stage ${stage}\n ${m.what}${by}` + (m.note ? `\n ${m.note}` : "");
4652
4652
  });
4653
- super(`The stage '${stage}' is deployed, and a deployed stage's mail and object storage are real services: gkm runs no Mailpit or MinIO for it. Set ${missing.length === 1 ? "this key" : `these ${missing.length} keys`} in the stage's secrets:\n\n${lines.join("\n")}\n\nFor a stage that is not production — a preview, a demo — the dev services can run instead, with --allow-dev-services ${services.join(",")}. Mailpit delivers no mail, and MinIO keeps every object on one container's disk.`);
4653
+ super(`The stage '${stage}' is deployed, and a deployed stage's mail and object storage are real services: gkm runs no Mailpit or MinIO for it. Set ${missing.length === 1 ? "this key" : `these ${missing.length} keys`} in the stage's secrets:\n\n${lines.join("\n")}\n\nFor a stage that is not production — a preview, a demo — the dev services can run instead, with --allow-dev-services ${services.join(",")}. Mailpit delivers no mail, and MinIO keeps every object on one container's disk.\n\nOr run: gkm secrets:add --stage ${stage}`);
4654
4654
  this.stage = stage;
4655
4655
  this.missing = missing;
4656
4656
  this.name = "ExternalServicesNotConfigured";
@@ -4692,85 +4692,127 @@ function manifestServiceDeclarations(manifest) {
4692
4692
  });
4693
4693
  }
4694
4694
  /**
4695
- * Where a deployed stage's mail and storage come from, and what it lacks.
4695
+ * Every key a stage must be given rather than derive — the one list both a
4696
+ * deploy's checks and `gkm secrets:add` read, so what a deploy refuses and
4697
+ * what the builder offers cannot drift.
4696
4698
  *
4697
- * - Mail is external once its URL is set, and then needs its sending
4698
- * address too. Unset, it is Mailpit where allowed — the address derived
4699
- * unless set — and missing otherwise.
4700
- * - A bucket is external once its URL is set; its credentials, in the URL or
4701
- * the shared pair, are optional. Unset, it is MinIO where allowed, and
4702
- * missing otherwise.
4703
- * - A file server's URL is derived where its bucket is MinIO, unless set;
4704
- * over an external bucket the stage must set it.
4699
+ * - Deployed, mail is its URL and its sending address, a bucket its URL, and
4700
+ * a file server its public URL. Locally all of it is Mailpit and MinIO.
4701
+ * - On every stage, a third party's credentials: nobody but the third party
4702
+ * can issue them.
4703
+ *
4704
+ * Never a derived value: a database URL, a generated secret, the seed.
4705
4705
  */
4706
- function externalServices(input) {
4707
- const { supplied, allow } = input;
4708
- const has = (key) => supplied[key] !== void 0;
4706
+ function requiredStageKeys(input) {
4709
4707
  const domain = input.domain ?? "example.com";
4710
- const missing = [];
4711
- const minio = [];
4712
- const mailpit = [];
4708
+ const keys = [];
4713
4709
  const add = (entry) => {
4714
- if (!missing.some((m) => m.key === entry.key)) missing.push(entry);
4710
+ if (!keys.some((k) => k.key === entry.key)) keys.push(entry);
4715
4711
  };
4716
- const declarations = [...input.declarations].sort((a, b) => a.id.localeCompare(b.id));
4712
+ const byId = (list) => [...list ?? []].sort((a, b) => a.id.localeCompare(b.id));
4717
4713
  const apps = (d) => d.apps?.length ? { apps: [...d.apps].sort() } : {};
4718
- for (const d of declarations.filter((d) => d.kind === "email")) {
4719
- const url = (0, _geekmidas_manifest.provideKey)(d.id, "url");
4720
- const from = (0, _geekmidas_manifest.provideKey)(d.id, "from");
4721
- if (!has(url) && allow.includes("mailpit")) {
4722
- mailpit.push(d.id);
4723
- continue;
4724
- }
4725
- if (!has(url)) add({
4726
- key: url,
4727
- id: d.id,
4728
- what: `where '${d.id}' sends mail — any SMTP server`,
4729
- example: `smtp://user:password@smtp.${domain}:587`,
4730
- service: "mailpit",
4731
- ...apps(d)
4732
- });
4733
- if (!has(from)) add({
4734
- key: from,
4735
- id: d.id,
4736
- what: `the address '${d.id}' sends from, on a domain the mail server has verified`,
4737
- example: `noreply@${domain}`,
4738
- service: "mailpit",
4739
- ...apps(d)
4740
- });
4741
- }
4742
- for (const d of declarations.filter((d) => d.kind === "objects")) {
4743
- const url = (0, _geekmidas_manifest.provideKey)(d.id, "url");
4744
- if (has(url)) continue;
4745
- if (allow.includes("minio")) {
4746
- minio.push(d.id);
4747
- continue;
4714
+ if (!input.local) {
4715
+ const services = byId(input.services);
4716
+ for (const d of services.filter((d) => d.kind === "email")) {
4717
+ add({
4718
+ key: (0, _geekmidas_manifest.provideKey)(d.id, "url"),
4719
+ id: d.id,
4720
+ kind: "email",
4721
+ what: `where '${d.id}' sends mail — any SMTP server`,
4722
+ example: `smtp://user:password@smtp.${domain}:587`,
4723
+ service: "mailpit",
4724
+ ...apps(d)
4725
+ });
4726
+ add({
4727
+ key: (0, _geekmidas_manifest.provideKey)(d.id, "from"),
4728
+ id: d.id,
4729
+ kind: "email",
4730
+ what: `the address '${d.id}' sends from, on a domain the mail server has verified`,
4731
+ example: `noreply@${domain}`,
4732
+ service: "mailpit",
4733
+ ...apps(d)
4734
+ });
4748
4735
  }
4749
- add({
4750
- key: url,
4736
+ for (const d of services.filter((d) => d.kind === "objects")) add({
4737
+ key: (0, _geekmidas_manifest.provideKey)(d.id, "url"),
4751
4738
  id: d.id,
4739
+ kind: "bucket",
4752
4740
  what: `the bucket '${d.id}' — S3, R2, or any S3-compatible store (add &endpoint=… for one that is not S3)`,
4753
4741
  note: `credentials are optional: a key for this bucket alone in the URL (s3://KEY:SECRET@${require_derive.appKey(d.id)}?…) wins; without one, the shared AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY or a role signs`,
4754
4742
  example: `s3://${require_derive.appKey(d.id)}?region=eu-west-1`,
4755
4743
  service: "minio",
4756
4744
  ...apps(d)
4757
4745
  });
4758
- }
4759
- for (const d of declarations.filter((d) => d.kind === "file-server")) {
4760
- const url = (0, _geekmidas_manifest.provideKey)(d.id, "url");
4761
- if (has(url)) continue;
4762
- if (d.of && minio.includes(d.of)) continue;
4763
- add({
4764
- key: url,
4746
+ for (const d of services.filter((d) => d.kind === "file-server")) add({
4747
+ key: (0, _geekmidas_manifest.provideKey)(d.id, "url"),
4765
4748
  id: d.id,
4749
+ kind: "file-server",
4766
4750
  what: `the public address '${d.id}' serves its bucket on — a CDN or the bucket's own domain`,
4767
4751
  example: `https://${require_derive.appKey(d.id)}.${domain}`,
4768
4752
  service: "minio",
4753
+ ...d.of ? { of: d.of } : {},
4769
4754
  ...apps(d)
4770
4755
  });
4771
4756
  }
4757
+ for (const d of byId(input.credentials)) add({
4758
+ key: (0, _geekmidas_manifest.provideKey)(d.id, "credentials"),
4759
+ id: d.id,
4760
+ kind: d.kind,
4761
+ what: d.kind === "external-api" ? `the credentials '${d.id}' was issued for this stage, as its schema describes them` : `the credential '${d.id}', as its schema describes it`,
4762
+ example: "{\"apiKey\":\"…\"}",
4763
+ ...apps(d)
4764
+ });
4765
+ return keys;
4766
+ }
4767
+ /**
4768
+ * Whether only the stage's secrets can supply `key` to a construct of `kind`
4769
+ * — what nothing on the stage derives.
4770
+ *
4771
+ * A third party's credentials, always. Deployed, also each generated secret
4772
+ * and keyring: the stage generated each one once, and every run reads the
4773
+ * same value back.
4774
+ */
4775
+ function suppliedOnly(kind, id, key, local) {
4776
+ if (kind === "credential") return true;
4777
+ if (kind === "external-api") return key === (0, _geekmidas_manifest.provideKey)(id, "credentials");
4778
+ if (local) return false;
4779
+ return kind === "secret" || kind === "encryption";
4780
+ }
4781
+ /**
4782
+ * Where a deployed stage's mail and storage come from, and what it lacks.
4783
+ *
4784
+ * - Mail is external once its URL is set, and then needs its sending
4785
+ * address too. Unset, it is Mailpit where allowed — the address derived
4786
+ * unless set — and missing otherwise.
4787
+ * - A bucket is external once its URL is set; its credentials, in the URL or
4788
+ * the shared pair, are optional. Unset, it is MinIO where allowed, and
4789
+ * missing otherwise.
4790
+ * - A file server's URL is derived where its bucket is MinIO, unless set;
4791
+ * over an external bucket the stage must set it.
4792
+ *
4793
+ * The keys themselves are {@link requiredStageKeys}'s.
4794
+ */
4795
+ function externalServices(input) {
4796
+ const { supplied, allow } = input;
4797
+ const has = (key) => supplied[key] !== void 0;
4798
+ const required = requiredStageKeys({
4799
+ local: false,
4800
+ services: input.declarations,
4801
+ ...input.domain ? { domain: input.domain } : {}
4802
+ });
4803
+ const mailpit = required.filter((k) => k.kind === "email" && k.key === (0, _geekmidas_manifest.provideKey)(k.id, "url")).filter((k) => !has(k.key) && allow.includes("mailpit")).map((k) => k.id);
4804
+ const minio = required.filter((k) => k.kind === "bucket").filter((k) => !has(k.key) && allow.includes("minio")).map((k) => k.id);
4805
+ const covered = (k) => k.kind === "email" && mailpit.includes(k.id) || k.kind === "bucket" && minio.includes(k.id) || k.kind === "file-server" && k.of !== void 0 && minio.includes(k.of);
4772
4806
  return {
4773
- missing,
4807
+ missing: required.filter((k) => !has(k.key) && !covered(k)).map(({ key, id, what, note, example, service, apps }) => ({
4808
+ key,
4809
+ id,
4810
+ what,
4811
+ ...note ? { note } : {},
4812
+ example,
4813
+ service,
4814
+ ...apps ? { apps } : {}
4815
+ })),
4774
4816
  minio,
4775
4817
  mailpit
4776
4818
  };
@@ -6164,6 +6206,12 @@ Object.defineProperty(exports, "reportDevServices", {
6164
6206
  return reportDevServices;
6165
6207
  }
6166
6208
  });
6209
+ Object.defineProperty(exports, "requiredStageKeys", {
6210
+ enumerable: true,
6211
+ get: function() {
6212
+ return requiredStageKeys;
6213
+ }
6214
+ });
6167
6215
  Object.defineProperty(exports, "resolveHost", {
6168
6216
  enumerable: true,
6169
6217
  get: function() {
@@ -6236,6 +6284,12 @@ Object.defineProperty(exports, "store_exports", {
6236
6284
  return store_exports;
6237
6285
  }
6238
6286
  });
6287
+ Object.defineProperty(exports, "suppliedOnly", {
6288
+ enumerable: true,
6289
+ get: function() {
6290
+ return suppliedOnly;
6291
+ }
6292
+ });
6239
6293
  Object.defineProperty(exports, "toEmbeddableSecrets", {
6240
6294
  enumerable: true,
6241
6295
  get: function() {
@@ -6267,4 +6321,4 @@ Object.defineProperty(exports, "workspace_exports", {
6267
6321
  }
6268
6322
  });
6269
6323
 
6270
- //# sourceMappingURL=state-CHZqCDRC.cjs.map
6324
+ //# sourceMappingURL=state-8RgXeX5Y.cjs.map