@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.
- package/dist/{LegacyStateStore-C39UKwmf.mjs → LegacyStateStore-BE1Et8RS.mjs} +2 -2
- package/dist/{LegacyStateStore-C39UKwmf.mjs.map → LegacyStateStore-BE1Et8RS.mjs.map} +1 -1
- package/dist/{LegacyStateStore-BZiO9-Lw.cjs → LegacyStateStore-LS_uTO8D.cjs} +2 -2
- package/dist/{LegacyStateStore-BZiO9-Lw.cjs.map → LegacyStateStore-LS_uTO8D.cjs.map} +1 -1
- package/dist/{LocalStateStore-DHVsZLyF.cjs → LocalStateStore-CV6phNMZ.cjs} +2 -2
- package/dist/{LocalStateStore-DHVsZLyF.cjs.map → LocalStateStore-CV6phNMZ.cjs.map} +1 -1
- package/dist/{LocalStateStore-Dk3Wbvzk.mjs → LocalStateStore-DAnFc708.mjs} +2 -2
- package/dist/{LocalStateStore-Dk3Wbvzk.mjs.map → LocalStateStore-DAnFc708.mjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-BmUAcR7d.mjs → OpenApiTsGenerator-CSaXs-dB.mjs} +2 -2
- package/dist/{OpenApiTsGenerator-BmUAcR7d.mjs.map → OpenApiTsGenerator-CSaXs-dB.mjs.map} +1 -1
- package/dist/{OpenApiTsGenerator-B2zrdyP4.cjs → OpenApiTsGenerator-CxB8mqXz.cjs} +2 -2
- package/dist/{OpenApiTsGenerator-B2zrdyP4.cjs.map → OpenApiTsGenerator-CxB8mqXz.cjs.map} +1 -1
- package/dist/{S3StateStore-B_ZF9eHt.mjs → S3StateStore-8kJEGnTh.mjs} +2 -2
- package/dist/{S3StateStore-B_ZF9eHt.mjs.map → S3StateStore-8kJEGnTh.mjs.map} +1 -1
- package/dist/{S3StateStore--4tYVMAL.cjs → S3StateStore-dA34LAYm.cjs} +2 -2
- package/dist/{S3StateStore--4tYVMAL.cjs.map → S3StateStore-dA34LAYm.cjs.map} +1 -1
- package/dist/{SSMStateStore-ACZ8hRvZ.cjs → SSMStateStore-DBzlfc-S.cjs} +2 -2
- package/dist/{SSMStateStore-ACZ8hRvZ.cjs.map → SSMStateStore-DBzlfc-S.cjs.map} +1 -1
- package/dist/{SSMStateStore-DjPuKqrm.mjs → SSMStateStore-Dkdw-fPL.mjs} +2 -2
- package/dist/{SSMStateStore-DjPuKqrm.mjs.map → SSMStateStore-Dkdw-fPL.mjs.map} +1 -1
- package/dist/add-CoIr2wgv.cjs +568 -0
- package/dist/add-CoIr2wgv.cjs.map +1 -0
- package/dist/add-Dzk23476.mjs +566 -0
- package/dist/add-Dzk23476.mjs.map +1 -0
- package/dist/{bundler-C1pnNrR0.cjs → bundler-CSR2nM4m.cjs} +5 -5
- package/dist/{bundler-C1pnNrR0.cjs.map → bundler-CSR2nM4m.cjs.map} +1 -1
- package/dist/{bundler-C-w7aGoZ.mjs → bundler-Cn0JF5G0.mjs} +5 -5
- package/dist/{bundler-C-w7aGoZ.mjs.map → bundler-Cn0JF5G0.mjs.map} +1 -1
- package/dist/{cli-BLyD4c0O.cjs → cli-IoM2-x48.cjs} +4 -4
- package/dist/{cli-BLyD4c0O.cjs.map → cli-IoM2-x48.cjs.map} +1 -1
- package/dist/{cli-Ce4pLL5O.mjs → cli-ij8Lwlww.mjs} +4 -4
- package/dist/{cli-Ce4pLL5O.mjs.map → cli-ij8Lwlww.mjs.map} +1 -1
- package/dist/{compose-DFxuYhn6.mjs → compose-CZtinmtw.mjs} +12 -11
- package/dist/compose-CZtinmtw.mjs.map +1 -0
- package/dist/{compose-DvsgumY2.cjs → compose-DfIioFX0.cjs} +12 -11
- package/dist/compose-DfIioFX0.cjs.map +1 -0
- package/dist/config.cjs +3 -3
- package/dist/config.mjs +3 -3
- package/dist/credentialSchemas-BcNL1N5R.cjs +271 -0
- package/dist/credentialSchemas-BcNL1N5R.cjs.map +1 -0
- package/dist/credentialSchemas-BmYxnEz_.mjs +236 -0
- package/dist/credentialSchemas-BmYxnEz_.mjs.map +1 -0
- package/dist/deploy/public.cjs +7 -7
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +7 -7
- package/dist/{deploy-D-EVOWvu.mjs → deploy-BzqbkJ3o.mjs} +6 -6
- package/dist/{deploy-D-EVOWvu.mjs.map → deploy-BzqbkJ3o.mjs.map} +1 -1
- package/dist/{deploy-C08GONYW.cjs → deploy-Dpz9raPM.cjs} +6 -6
- package/dist/{deploy-C08GONYW.cjs.map → deploy-Dpz9raPM.cjs.map} +1 -1
- package/dist/{discover-OEfZ9OkA.cjs → discover-B4VjaFJk.cjs} +2 -2
- package/dist/{discover-OEfZ9OkA.cjs.map → discover-B4VjaFJk.cjs.map} +1 -1
- package/dist/{discover-BFoJWKGD.mjs → discover-Buwf1z4P.mjs} +2 -2
- package/dist/{discover-BFoJWKGD.mjs.map → discover-Buwf1z4P.mjs.map} +1 -1
- package/dist/{dokploy-CZ6nfSV9.cjs → dokploy-B6O-J1fb.cjs} +2 -2
- package/dist/{dokploy-CZ6nfSV9.cjs.map → dokploy-B6O-J1fb.cjs.map} +1 -1
- package/dist/{dokploy-DU-XJsoT.mjs → dokploy-DkwcORbv.mjs} +2 -2
- package/dist/{dokploy-DU-XJsoT.mjs.map → dokploy-DkwcORbv.mjs.map} +1 -1
- package/dist/{encryption-DSiLau1-.mjs → encryption-7m1mKcRy.mjs} +3 -3
- package/dist/{encryption-DSiLau1-.mjs.map → encryption-7m1mKcRy.mjs.map} +1 -1
- package/dist/{encryption-CCcBSLZs.cjs → encryption-C8Ic5t0C.cjs} +3 -3
- package/dist/{encryption-CCcBSLZs.cjs.map → encryption-C8Ic5t0C.cjs.map} +1 -1
- package/dist/{engine-llWnMZH5.mjs → engine-62Kl70Pj.mjs} +14 -6
- package/dist/{engine-llWnMZH5.mjs.map → engine-62Kl70Pj.mjs.map} +1 -1
- package/dist/{engine-BM9Dy_DT.cjs → engine-BR9qlS7A.cjs} +14 -6
- package/dist/engine-BR9qlS7A.cjs.map +1 -0
- package/dist/{github-ZoMam0OH.cjs → github-CmGIZjhu.cjs} +3 -3
- package/dist/{github-ZoMam0OH.cjs.map → github-CmGIZjhu.cjs.map} +1 -1
- package/dist/{github-yy6WpHIl.mjs → github-DtymyOcH.mjs} +3 -3
- package/dist/{github-yy6WpHIl.mjs.map → github-DtymyOcH.mjs.map} +1 -1
- package/dist/index.cjs +86 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +86 -47
- package/dist/index.mjs.map +1 -1
- package/dist/{migrate-BWPuwiXk.mjs → migrate-CEzq6DjL.mjs} +4 -4
- package/dist/{migrate-BWPuwiXk.mjs.map → migrate-CEzq6DjL.mjs.map} +1 -1
- package/dist/{migrate-tOwxQBTI.cjs → migrate-CYC-hBOU.cjs} +4 -4
- package/dist/{migrate-tOwxQBTI.cjs.map → migrate-CYC-hBOU.cjs.map} +1 -1
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.mjs +1 -1
- package/dist/{ready-2s3-CndS.mjs → ready-DeYaSoNN.mjs} +3 -3
- package/dist/{ready-2s3-CndS.mjs.map → ready-DeYaSoNN.mjs.map} +1 -1
- package/dist/{ready-B6uHr4sm.cjs → ready-QGgjmcuN.cjs} +3 -3
- package/dist/{ready-B6uHr4sm.cjs.map → ready-QGgjmcuN.cjs.map} +1 -1
- package/dist/reconcile/public.cjs +1 -1
- package/dist/reconcile/public.mjs +1 -1
- package/dist/{resolve-BymzGtuT.cjs → resolve-BDsMffvz.cjs} +3 -3
- package/dist/{resolve-BymzGtuT.cjs.map → resolve-BDsMffvz.cjs.map} +1 -1
- package/dist/{resolve-pIvXlZ1h.mjs → resolve-Dn5wGf1r.mjs} +3 -3
- package/dist/{resolve-pIvXlZ1h.mjs.map → resolve-Dn5wGf1r.mjs.map} +1 -1
- package/dist/{rollback-zdfi6Reg.cjs → rollback-5XHaBDxW.cjs} +5 -5
- package/dist/{rollback-zdfi6Reg.cjs.map → rollback-5XHaBDxW.cjs.map} +1 -1
- package/dist/{rollback-ZlsbQOvj.mjs → rollback-DDfaqv7P.mjs} +5 -5
- package/dist/{rollback-ZlsbQOvj.mjs.map → rollback-DDfaqv7P.mjs.map} +1 -1
- package/dist/sandbox/credentials-worker.cjs +54 -0
- package/dist/sandbox/credentials-worker.cjs.map +1 -0
- package/dist/sandbox/credentials-worker.d.cts +1 -0
- package/dist/sandbox/credentials-worker.d.mts +1 -0
- package/dist/sandbox/credentials-worker.mjs +55 -0
- package/dist/sandbox/credentials-worker.mjs.map +1 -0
- package/dist/sandbox/discover-worker.cjs +1 -1
- package/dist/sandbox/discover-worker.mjs +1 -1
- package/dist/sandbox/migrate-worker.cjs +1 -1
- package/dist/sandbox/migrate-worker.mjs +1 -1
- package/dist/{schemas-RUlKHu27.cjs → schemas-BObwxB_t.cjs} +164 -3
- package/dist/schemas-BObwxB_t.cjs.map +1 -0
- package/dist/{schemas-Cfhtpdo0.mjs → schemas-D-xeKJDD.mjs} +153 -4
- package/dist/schemas-D-xeKJDD.mjs.map +1 -0
- package/dist/{sniffer-D66HIvi9.cjs → sniffer-Bc0nNBDF.cjs} +7 -7
- package/dist/{sniffer-D66HIvi9.cjs.map → sniffer-Bc0nNBDF.cjs.map} +1 -1
- package/dist/{sniffer-BdFeLSmA.mjs → sniffer-DMqi2b1q.mjs} +7 -7
- package/dist/{sniffer-BdFeLSmA.mjs.map → sniffer-DMqi2b1q.mjs.map} +1 -1
- package/dist/{state-CHZqCDRC.cjs → state-8RgXeX5Y.cjs} +116 -62
- package/dist/{state-CHZqCDRC.cjs.map → state-8RgXeX5Y.cjs.map} +1 -1
- package/dist/{state-Bn5JDMFT.mjs → state-DClnPZt5.mjs} +105 -63
- package/dist/{state-Bn5JDMFT.mjs.map → state-DClnPZt5.mjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-C3cv-OQu.mjs → terminal-C6TBo_SA.mjs} +2 -2
- package/dist/{terminal-C3cv-OQu.mjs.map → terminal-C6TBo_SA.mjs.map} +1 -1
- package/dist/{terminal-DjzgLu6m.cjs → terminal-CFO3xWoF.cjs} +2 -2
- package/dist/{terminal-DjzgLu6m.cjs.map → terminal-CFO3xWoF.cjs.map} +1 -1
- package/dist/vitest.cjs +1 -1
- package/dist/vitest.mjs +1 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-ON-bqiJz.cjs → workspace-8NuAjaXJ.cjs} +2 -2
- package/dist/{workspace-ON-bqiJz.cjs.map → workspace-8NuAjaXJ.cjs.map} +1 -1
- package/dist/{workspace-Be6uBhlF.mjs → workspace-B2UK_rVP.mjs} +2 -2
- package/dist/{workspace-Be6uBhlF.mjs.map → workspace-B2UK_rVP.mjs.map} +1 -1
- package/package.json +16 -13
- package/dist/compose-DFxuYhn6.mjs.map +0 -1
- package/dist/compose-DvsgumY2.cjs.map +0 -1
- package/dist/engine-BM9Dy_DT.cjs.map +0 -1
- package/dist/schemas-Cfhtpdo0.mjs.map +0 -1
- package/dist/schemas-RUlKHu27.cjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BhDjJH2R.mjs";
|
|
2
2
|
import { a as runOutput, i as run$1, s as gkmHome } from "./run-BJLIerMM.mjs";
|
|
3
|
-
import { d as output, r as discover } from "./discover-
|
|
3
|
+
import { d as output, r as discover } from "./discover-Buwf1z4P.mjs";
|
|
4
4
|
import { t as appKey } from "./derive-B4vDpzgP.mjs";
|
|
5
|
-
import { O as TEST_STAGE, h as getPublicEnvPrefix, n as allConstructGlobs } from "./workspace-
|
|
5
|
+
import { O as TEST_STAGE, h as getPublicEnvPrefix, n as allConstructGlobs } from "./workspace-B2UK_rVP.mjs";
|
|
6
6
|
import { ConfigNotFound, NotInAnApp, loadWorkspaceAppInfo, loadWorkspaceConfig } from "./config.mjs";
|
|
7
|
-
import { c as runtimeOf } from "./resolve-
|
|
7
|
+
import { c as runtimeOf } from "./resolve-Dn5wGf1r.mjs";
|
|
8
8
|
import { i as DEFAULT_STORAGE, n as DEFAULT_CACHE, r as DEFAULT_EVENTS$1, t as readFakes } from "./fakes-C9RiT6XG.mjs";
|
|
9
9
|
import { basename, dirname, isAbsolute, join, parse, relative, resolve, sep } from "node:path";
|
|
10
10
|
import { constants, existsSync, readFileSync } from "node:fs";
|
|
@@ -4648,7 +4648,7 @@ var ExternalServicesNotConfigured = class extends Error {
|
|
|
4648
4648
|
const by = m.apps?.length ? `, read by ${m.apps.join(", ")}` : "";
|
|
4649
4649
|
return ` gkm secrets:set ${m.key} '${m.example}' --stage ${stage}\n ${m.what}${by}` + (m.note ? `\n ${m.note}` : "");
|
|
4650
4650
|
});
|
|
4651
|
-
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
|
|
4651
|
+
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}`);
|
|
4652
4652
|
this.stage = stage;
|
|
4653
4653
|
this.missing = missing;
|
|
4654
4654
|
this.name = "ExternalServicesNotConfigured";
|
|
@@ -4690,85 +4690,127 @@ function manifestServiceDeclarations(manifest) {
|
|
|
4690
4690
|
});
|
|
4691
4691
|
}
|
|
4692
4692
|
/**
|
|
4693
|
-
*
|
|
4693
|
+
* Every key a stage must be given rather than derive — the one list both a
|
|
4694
|
+
* deploy's checks and `gkm secrets:add` read, so what a deploy refuses and
|
|
4695
|
+
* what the builder offers cannot drift.
|
|
4694
4696
|
*
|
|
4695
|
-
* -
|
|
4696
|
-
*
|
|
4697
|
-
*
|
|
4698
|
-
*
|
|
4699
|
-
*
|
|
4700
|
-
*
|
|
4701
|
-
* - A file server's URL is derived where its bucket is MinIO, unless set;
|
|
4702
|
-
* over an external bucket the stage must set it.
|
|
4697
|
+
* - Deployed, mail is its URL and its sending address, a bucket its URL, and
|
|
4698
|
+
* a file server its public URL. Locally all of it is Mailpit and MinIO.
|
|
4699
|
+
* - On every stage, a third party's credentials: nobody but the third party
|
|
4700
|
+
* can issue them.
|
|
4701
|
+
*
|
|
4702
|
+
* Never a derived value: a database URL, a generated secret, the seed.
|
|
4703
4703
|
*/
|
|
4704
|
-
function
|
|
4705
|
-
const { supplied, allow } = input;
|
|
4706
|
-
const has = (key) => supplied[key] !== void 0;
|
|
4704
|
+
function requiredStageKeys(input) {
|
|
4707
4705
|
const domain = input.domain ?? "example.com";
|
|
4708
|
-
const
|
|
4709
|
-
const minio = [];
|
|
4710
|
-
const mailpit = [];
|
|
4706
|
+
const keys = [];
|
|
4711
4707
|
const add = (entry) => {
|
|
4712
|
-
if (!
|
|
4708
|
+
if (!keys.some((k) => k.key === entry.key)) keys.push(entry);
|
|
4713
4709
|
};
|
|
4714
|
-
const
|
|
4710
|
+
const byId = (list) => [...list ?? []].sort((a, b) => a.id.localeCompare(b.id));
|
|
4715
4711
|
const apps = (d) => d.apps?.length ? { apps: [...d.apps].sort() } : {};
|
|
4716
|
-
|
|
4717
|
-
const
|
|
4718
|
-
const
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
...apps(d)
|
|
4738
|
-
});
|
|
4739
|
-
}
|
|
4740
|
-
for (const d of declarations.filter((d) => d.kind === "objects")) {
|
|
4741
|
-
const url = provideKey(d.id, "url");
|
|
4742
|
-
if (has(url)) continue;
|
|
4743
|
-
if (allow.includes("minio")) {
|
|
4744
|
-
minio.push(d.id);
|
|
4745
|
-
continue;
|
|
4712
|
+
if (!input.local) {
|
|
4713
|
+
const services = byId(input.services);
|
|
4714
|
+
for (const d of services.filter((d) => d.kind === "email")) {
|
|
4715
|
+
add({
|
|
4716
|
+
key: provideKey(d.id, "url"),
|
|
4717
|
+
id: d.id,
|
|
4718
|
+
kind: "email",
|
|
4719
|
+
what: `where '${d.id}' sends mail — any SMTP server`,
|
|
4720
|
+
example: `smtp://user:password@smtp.${domain}:587`,
|
|
4721
|
+
service: "mailpit",
|
|
4722
|
+
...apps(d)
|
|
4723
|
+
});
|
|
4724
|
+
add({
|
|
4725
|
+
key: provideKey(d.id, "from"),
|
|
4726
|
+
id: d.id,
|
|
4727
|
+
kind: "email",
|
|
4728
|
+
what: `the address '${d.id}' sends from, on a domain the mail server has verified`,
|
|
4729
|
+
example: `noreply@${domain}`,
|
|
4730
|
+
service: "mailpit",
|
|
4731
|
+
...apps(d)
|
|
4732
|
+
});
|
|
4746
4733
|
}
|
|
4747
|
-
add({
|
|
4748
|
-
key: url,
|
|
4734
|
+
for (const d of services.filter((d) => d.kind === "objects")) add({
|
|
4735
|
+
key: provideKey(d.id, "url"),
|
|
4749
4736
|
id: d.id,
|
|
4737
|
+
kind: "bucket",
|
|
4750
4738
|
what: `the bucket '${d.id}' — S3, R2, or any S3-compatible store (add &endpoint=… for one that is not S3)`,
|
|
4751
4739
|
note: `credentials are optional: a key for this bucket alone in the URL (s3://KEY:SECRET@${appKey(d.id)}?…) wins; without one, the shared AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY or a role signs`,
|
|
4752
4740
|
example: `s3://${appKey(d.id)}?region=eu-west-1`,
|
|
4753
4741
|
service: "minio",
|
|
4754
4742
|
...apps(d)
|
|
4755
4743
|
});
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
const url = provideKey(d.id, "url");
|
|
4759
|
-
if (has(url)) continue;
|
|
4760
|
-
if (d.of && minio.includes(d.of)) continue;
|
|
4761
|
-
add({
|
|
4762
|
-
key: url,
|
|
4744
|
+
for (const d of services.filter((d) => d.kind === "file-server")) add({
|
|
4745
|
+
key: provideKey(d.id, "url"),
|
|
4763
4746
|
id: d.id,
|
|
4747
|
+
kind: "file-server",
|
|
4764
4748
|
what: `the public address '${d.id}' serves its bucket on — a CDN or the bucket's own domain`,
|
|
4765
4749
|
example: `https://${appKey(d.id)}.${domain}`,
|
|
4766
4750
|
service: "minio",
|
|
4751
|
+
...d.of ? { of: d.of } : {},
|
|
4767
4752
|
...apps(d)
|
|
4768
4753
|
});
|
|
4769
4754
|
}
|
|
4755
|
+
for (const d of byId(input.credentials)) add({
|
|
4756
|
+
key: provideKey(d.id, "credentials"),
|
|
4757
|
+
id: d.id,
|
|
4758
|
+
kind: d.kind,
|
|
4759
|
+
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`,
|
|
4760
|
+
example: "{\"apiKey\":\"…\"}",
|
|
4761
|
+
...apps(d)
|
|
4762
|
+
});
|
|
4763
|
+
return keys;
|
|
4764
|
+
}
|
|
4765
|
+
/**
|
|
4766
|
+
* Whether only the stage's secrets can supply `key` to a construct of `kind`
|
|
4767
|
+
* — what nothing on the stage derives.
|
|
4768
|
+
*
|
|
4769
|
+
* A third party's credentials, always. Deployed, also each generated secret
|
|
4770
|
+
* and keyring: the stage generated each one once, and every run reads the
|
|
4771
|
+
* same value back.
|
|
4772
|
+
*/
|
|
4773
|
+
function suppliedOnly(kind, id, key, local) {
|
|
4774
|
+
if (kind === "credential") return true;
|
|
4775
|
+
if (kind === "external-api") return key === provideKey(id, "credentials");
|
|
4776
|
+
if (local) return false;
|
|
4777
|
+
return kind === "secret" || kind === "encryption";
|
|
4778
|
+
}
|
|
4779
|
+
/**
|
|
4780
|
+
* Where a deployed stage's mail and storage come from, and what it lacks.
|
|
4781
|
+
*
|
|
4782
|
+
* - Mail is external once its URL is set, and then needs its sending
|
|
4783
|
+
* address too. Unset, it is Mailpit where allowed — the address derived
|
|
4784
|
+
* unless set — and missing otherwise.
|
|
4785
|
+
* - A bucket is external once its URL is set; its credentials, in the URL or
|
|
4786
|
+
* the shared pair, are optional. Unset, it is MinIO where allowed, and
|
|
4787
|
+
* missing otherwise.
|
|
4788
|
+
* - A file server's URL is derived where its bucket is MinIO, unless set;
|
|
4789
|
+
* over an external bucket the stage must set it.
|
|
4790
|
+
*
|
|
4791
|
+
* The keys themselves are {@link requiredStageKeys}'s.
|
|
4792
|
+
*/
|
|
4793
|
+
function externalServices(input) {
|
|
4794
|
+
const { supplied, allow } = input;
|
|
4795
|
+
const has = (key) => supplied[key] !== void 0;
|
|
4796
|
+
const required = requiredStageKeys({
|
|
4797
|
+
local: false,
|
|
4798
|
+
services: input.declarations,
|
|
4799
|
+
...input.domain ? { domain: input.domain } : {}
|
|
4800
|
+
});
|
|
4801
|
+
const mailpit = required.filter((k) => k.kind === "email" && k.key === provideKey(k.id, "url")).filter((k) => !has(k.key) && allow.includes("mailpit")).map((k) => k.id);
|
|
4802
|
+
const minio = required.filter((k) => k.kind === "bucket").filter((k) => !has(k.key) && allow.includes("minio")).map((k) => k.id);
|
|
4803
|
+
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);
|
|
4770
4804
|
return {
|
|
4771
|
-
missing,
|
|
4805
|
+
missing: required.filter((k) => !has(k.key) && !covered(k)).map(({ key, id, what, note, example, service, apps }) => ({
|
|
4806
|
+
key,
|
|
4807
|
+
id,
|
|
4808
|
+
what,
|
|
4809
|
+
...note ? { note } : {},
|
|
4810
|
+
example,
|
|
4811
|
+
service,
|
|
4812
|
+
...apps ? { apps } : {}
|
|
4813
|
+
})),
|
|
4772
4814
|
minio,
|
|
4773
4815
|
mailpit
|
|
4774
4816
|
};
|
|
@@ -5628,6 +5670,6 @@ function setPostgresBackupId(state, backupId) {
|
|
|
5628
5670
|
if (state.backups) state.backups.postgresBackupId = backupId;
|
|
5629
5671
|
}
|
|
5630
5672
|
//#endregion
|
|
5631
|
-
export {
|
|
5673
|
+
export { postgresDatabaseNames as $, withCustomSecret as $t, assertExternalServices as A, loadEnvFiles as At, keyFingerprint as B, readKey as Bt, isMainFrontendApp as C, fakeKey as Ct, ExternalServicesNotConfigured as D, createEntryWrapper as Dt, DevServicesNeedServerTarget as E, createCredentialsPreload as Et, reportDevServices as F, store_exports as Ft, reconcileWorkspace as G, isOwnedBy as Gt, backendsOf as H, deployIdentity as Ht, requiredStageKeys as I, FileSecretsStore as It, forgetState as J, projectName as Jt, workspace_exports as K, markerOf as Kt, suppliedOnly as L, getKeyPath as Lt, externalServices as M, prepareEntryCredentials as Mt, manifestServiceDeclarations as N, isRemoteStore as Nt, STORAGE_KEY_PAIR as O, findAvailablePort as Ot, parseDevServices as P, secretsStoreFor as Pt, bucketPolicies as Q, toEmbeddableSecrets as Qt, encryptSecrets as R, keystoreProject as Rt, NoDomainForStage as S, describeServices as St, DEV_SERVICES as T, primaryPortKey as Tt, constructGlobs as U, imageName as Ut, FAKE_ENV as V, applicationName as Vt, derivedContainers as W, imageRef as Wt, applyPolicies as X, maskPassword as Xt, applyBuckets as Y, initStageSecrets as Yt, applyPostgres as Z, storage_exports as Zt, deployDocker as _, cacheBackendFor as _t, recordRelease as a, appEnvKeys as at, ensureDockerignore as b, storageBackendFor as bt, setBackupState as c, localRolePassword as ct, setGeneratedSecret as d, hostFor as dt, postgresStatements as et, setPostgresBackupId as f, composeBuildPaths as ft, credentialsFileContent as g, findBuildRoot as gt, credentialsBuildArg as h, detectPackageManager as ht, isDnsVerified as i, pgClient as it, devServicesUsed as j, loadSecretsForApp as jt, UnknownDevService as k, isPortAvailable as kt, setDnsRecord as l, planFor as lt, withGeneratedSecrets as m, TURBO_VERSION as mt, getBackupState as n, composeFor as nt, recordRollback as o, networkEnv as ot, DeployJournal as p, imageLayout as pt, LOCAL_CA_PATH as q, ownershipMarker as qt, getGeneratedSecret as r, bucketClient as rt, setApplicationId as s, envFor as st, createEmptyState as t, quoteIdentifier as tt, setDnsVerification as u, resourceName as ut, appDockerfile as v, eventsBackendFor as vt, resolveHost as w, portKeys as wt, validateImageRef as x, DEFAULT_IMAGES as xt, dockerCommand as y, providerOf as yt, encryption_exports as z, projectKey as zt };
|
|
5632
5674
|
|
|
5633
|
-
//# sourceMappingURL=state-
|
|
5675
|
+
//# sourceMappingURL=state-DClnPZt5.mjs.map
|