@geekmidas/cli 10.0.0-alpha.67 → 10.0.0-alpha.68
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/{bundler-Bq3HaLOZ.mjs → bundler-C-w7aGoZ.mjs} +5 -5
- package/dist/{bundler-Bq3HaLOZ.mjs.map → bundler-C-w7aGoZ.mjs.map} +1 -1
- package/dist/{bundler-pyLj-gS0.cjs → bundler-C1pnNrR0.cjs} +5 -5
- package/dist/{bundler-pyLj-gS0.cjs.map → bundler-C1pnNrR0.cjs.map} +1 -1
- package/dist/{cli-DR7B2_fX.cjs → cli-BLyD4c0O.cjs} +12 -3
- package/dist/cli-BLyD4c0O.cjs.map +1 -0
- package/dist/{cli-C2Tjbn27.mjs → cli-Ce4pLL5O.mjs} +12 -3
- package/dist/cli-Ce4pLL5O.mjs.map +1 -0
- package/dist/{compose-BjToENzG.mjs → compose-DFxuYhn6.mjs} +165 -51
- package/dist/compose-DFxuYhn6.mjs.map +1 -0
- package/dist/{compose-5oNHAKNT.cjs → compose-DvsgumY2.cjs} +165 -51
- package/dist/compose-DvsgumY2.cjs.map +1 -0
- package/dist/{config-4XFxX1al.d.cts → config-BnA0kPTY.d.cts} +3 -3
- package/dist/{config-4XFxX1al.d.cts.map → config-BnA0kPTY.d.cts.map} +1 -1
- package/dist/{config-UtKzhpFb.d.mts → config-CxEp_g7j.d.mts} +3 -3
- package/dist/{config-UtKzhpFb.d.mts.map → config-CxEp_g7j.d.mts.map} +1 -1
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/deploy/public.cjs +9 -5
- package/dist/deploy/public.d.cts +15 -4
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +15 -4
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +6 -6
- package/dist/{deploy-BucRfbvX.cjs → deploy-C08GONYW.cjs} +8 -4
- package/dist/deploy-C08GONYW.cjs.map +1 -0
- package/dist/{deploy-DRAwTG72.mjs → deploy-D-EVOWvu.mjs} +8 -4
- package/dist/deploy-D-EVOWvu.mjs.map +1 -0
- package/dist/{dokploy-m345Zx02.cjs → dokploy-CZ6nfSV9.cjs} +2 -2
- package/dist/{dokploy-m345Zx02.cjs.map → dokploy-CZ6nfSV9.cjs.map} +1 -1
- package/dist/{dokploy-DIt1IZl1.mjs → dokploy-DU-XJsoT.mjs} +2 -2
- package/dist/{dokploy-DIt1IZl1.mjs.map → dokploy-DU-XJsoT.mjs.map} +1 -1
- package/dist/{encryption-rZ3BghXy.cjs → encryption-CCcBSLZs.cjs} +2 -2
- package/dist/{encryption-rZ3BghXy.cjs.map → encryption-CCcBSLZs.cjs.map} +1 -1
- package/dist/{encryption-Ccbahik7.mjs → encryption-DSiLau1-.mjs} +2 -2
- package/dist/{encryption-Ccbahik7.mjs.map → encryption-DSiLau1-.mjs.map} +1 -1
- package/dist/{engine-Cx_dvx9q.cjs → engine-BM9Dy_DT.cjs} +134 -24
- package/dist/engine-BM9Dy_DT.cjs.map +1 -0
- package/dist/{engine-Gs0abjuj.mjs → engine-llWnMZH5.mjs} +134 -24
- package/dist/engine-llWnMZH5.mjs.map +1 -0
- package/dist/{github-CrcGFkfD.cjs → github-ZoMam0OH.cjs} +2 -2
- package/dist/{github-CrcGFkfD.cjs.map → github-ZoMam0OH.cjs.map} +1 -1
- package/dist/{github-CJANTYqi.mjs → github-yy6WpHIl.mjs} +2 -2
- package/dist/{github-CJANTYqi.mjs.map → github-yy6WpHIl.mjs.map} +1 -1
- package/dist/{index-CyApaHVe.d.cts → index-CkX89m6S.d.mts} +2 -2
- package/dist/{index-CyApaHVe.d.cts.map → index-CkX89m6S.d.mts.map} +1 -1
- package/dist/{index-DD1FfUHh.d.mts → index-EvZBkycu.d.cts} +2 -2
- package/dist/{index-DD1FfUHh.d.mts.map → index-EvZBkycu.d.cts.map} +1 -1
- package/dist/index.cjs +46 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +46 -43
- package/dist/index.mjs.map +1 -1
- package/dist/{migrate-DCVo5gLS.mjs → migrate-BWPuwiXk.mjs} +2 -2
- package/dist/{migrate-DCVo5gLS.mjs.map → migrate-BWPuwiXk.mjs.map} +1 -1
- package/dist/{migrate-CQdSpttI.cjs → migrate-tOwxQBTI.cjs} +2 -2
- package/dist/{migrate-CQdSpttI.cjs.map → migrate-tOwxQBTI.cjs.map} +1 -1
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/reconcile/public.d.cts +1 -1
- package/dist/reconcile/public.d.mts +1 -1
- package/dist/{resolve-BexmDcsN.cjs → resolve-BymzGtuT.cjs} +3 -3
- package/dist/{resolve-BexmDcsN.cjs.map → resolve-BymzGtuT.cjs.map} +1 -1
- package/dist/{resolve-DhZgtvZe.mjs → resolve-pIvXlZ1h.mjs} +3 -3
- package/dist/{resolve-DhZgtvZe.mjs.map → resolve-pIvXlZ1h.mjs.map} +1 -1
- package/dist/{rollback-m4Yeym5x.mjs → rollback-ZlsbQOvj.mjs} +3 -3
- package/dist/{rollback-m4Yeym5x.mjs.map → rollback-ZlsbQOvj.mjs.map} +1 -1
- package/dist/{rollback-BnY7KuG_.cjs → rollback-zdfi6Reg.cjs} +3 -3
- package/dist/{rollback-BnY7KuG_.cjs.map → rollback-zdfi6Reg.cjs.map} +1 -1
- package/dist/{runtime-BRqFOvPM.d.cts → runtime-B3jNgeP-.d.mts} +2 -2
- package/dist/{runtime-BRqFOvPM.d.cts.map → runtime-B3jNgeP-.d.mts.map} +1 -1
- package/dist/{runtime-CEk5n4VH.d.mts → runtime-DWThEP-r.d.cts} +2 -2
- package/dist/{runtime-CEk5n4VH.d.mts.map → runtime-DWThEP-r.d.cts.map} +1 -1
- package/dist/sniffer-BdFeLSmA.mjs.map +1 -1
- package/dist/sniffer-D66HIvi9.cjs.map +1 -1
- package/dist/{state-DkUStoqJ.mjs → state-Bn5JDMFT.mjs} +247 -7
- package/dist/state-Bn5JDMFT.mjs.map +1 -0
- package/dist/{state-DgmM4EKq.cjs → state-CHZqCDRC.cjs} +342 -6
- package/dist/state-CHZqCDRC.cjs.map +1 -0
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.d.cts +2 -2
- package/dist/target/public.d.mts +2 -2
- package/dist/target/public.mjs +1 -1
- package/dist/{types-CSw2w69a.d.mts → types-CZdCxUCK.d.cts} +64 -2
- package/dist/types-CZdCxUCK.d.cts.map +1 -0
- package/dist/{types-D5WIxRDP.d.cts → types-Da0E3Qv7.d.mts} +63 -3
- package/dist/types-Da0E3Qv7.d.mts.map +1 -0
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/package.json +13 -13
- package/dist/cli-C2Tjbn27.mjs.map +0 -1
- package/dist/cli-DR7B2_fX.cjs.map +0 -1
- package/dist/compose-5oNHAKNT.cjs.map +0 -1
- package/dist/compose-BjToENzG.mjs.map +0 -1
- package/dist/deploy-BucRfbvX.cjs.map +0 -1
- package/dist/deploy-DRAwTG72.mjs.map +0 -1
- package/dist/engine-Cx_dvx9q.cjs.map +0 -1
- package/dist/engine-Gs0abjuj.mjs.map +0 -1
- package/dist/state-DgmM4EKq.cjs.map +0 -1
- package/dist/state-DkUStoqJ.mjs.map +0 -1
- package/dist/types-CSw2w69a.d.mts.map +0 -1
- package/dist/types-D5WIxRDP.d.cts.map +0 -1
|
@@ -4,7 +4,7 @@ const require_discover = require("./discover-OEfZ9OkA.cjs");
|
|
|
4
4
|
const require_derive = require("./derive-DAbo49sm.cjs");
|
|
5
5
|
const require_workspace = require("./workspace-ON-bqiJz.cjs");
|
|
6
6
|
const require_config = require("./config.cjs");
|
|
7
|
-
const require_resolve = require("./resolve-
|
|
7
|
+
const require_resolve = require("./resolve-BymzGtuT.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");
|
|
@@ -3109,15 +3109,18 @@ function pgClient(port, password = LOCAL_USER$1) {
|
|
|
3109
3109
|
}
|
|
3110
3110
|
} };
|
|
3111
3111
|
}
|
|
3112
|
-
/** A bucket client pointed at
|
|
3113
|
-
function bucketClient(port
|
|
3112
|
+
/** A bucket client pointed at a MinIO on this machine. */
|
|
3113
|
+
function bucketClient(port, credentials = {
|
|
3114
|
+
user: LOCAL_USER$1,
|
|
3115
|
+
password: LOCAL_USER$1
|
|
3116
|
+
}) {
|
|
3114
3117
|
const s3 = new _aws_sdk_client_s3.S3Client({
|
|
3115
3118
|
region: "us-east-1",
|
|
3116
3119
|
endpoint: `http://localhost:${port}`,
|
|
3117
3120
|
forcePathStyle: true,
|
|
3118
3121
|
credentials: {
|
|
3119
|
-
accessKeyId:
|
|
3120
|
-
secretAccessKey:
|
|
3122
|
+
accessKeyId: credentials.user,
|
|
3123
|
+
secretAccessKey: credentials.password
|
|
3121
3124
|
}
|
|
3122
3125
|
});
|
|
3123
3126
|
return {
|
|
@@ -4578,6 +4581,243 @@ function keyFingerprint(masterKey) {
|
|
|
4578
4581
|
return (0, node_crypto.createHash)("sha256").update(masterKey).digest("hex").slice(0, 8);
|
|
4579
4582
|
}
|
|
4580
4583
|
//#endregion
|
|
4584
|
+
//#region src/deploy/devServices.ts
|
|
4585
|
+
/**
|
|
4586
|
+
* Mail and object storage on a deployed stage: real ones, or — only when
|
|
4587
|
+
* someone asked — the dev services the local stage runs.
|
|
4588
|
+
*
|
|
4589
|
+
* Locally a declared `Email` is Mailpit and a declared bucket is MinIO, and
|
|
4590
|
+
* nobody has to configure either. Deployed, the same two containers would be
|
|
4591
|
+
* a stage that silently delivers no mail and keeps its files on one
|
|
4592
|
+
* container's disk. So a deployed stage on a server target takes both from
|
|
4593
|
+
* its secrets — the mail server's URL and sending address, and each bucket's
|
|
4594
|
+
* URL — and a stage missing any of them fails before anything is built,
|
|
4595
|
+
* provisioned or written, naming every key at once.
|
|
4596
|
+
*
|
|
4597
|
+
* A bucket's credentials are not checked: they are optional, and come from
|
|
4598
|
+
* either of two places. The bucket's URL may carry a key of its own
|
|
4599
|
+
* (`s3://KEY:SECRET@uploads`), which wins; otherwise the S3 client's default
|
|
4600
|
+
* chain applies — the stage's shared `AWS_ACCESS_KEY_ID`/
|
|
4601
|
+
* `AWS_SECRET_ACCESS_KEY` when it set them, or a role.
|
|
4602
|
+
*
|
|
4603
|
+
* `--allow-dev-services minio,mailpit` is the way out for a stage that is
|
|
4604
|
+
* not production — a preview, a demo: the target runs the dev service and
|
|
4605
|
+
* derives the keys from it. Keys the stage did set still win. Every run that
|
|
4606
|
+
* uses one says so, loudly.
|
|
4607
|
+
*
|
|
4608
|
+
* Pure: what each target runs is decided here from declarations and the
|
|
4609
|
+
* stage's values, and the targets do the running.
|
|
4610
|
+
*/
|
|
4611
|
+
/** The dev services a deployed stage may be allowed to run. */
|
|
4612
|
+
const DEV_SERVICES = ["minio", "mailpit"];
|
|
4613
|
+
/**
|
|
4614
|
+
* The S3 client's shared key pair. Optional: a bucket whose URL carries its own
|
|
4615
|
+
* key (`s3://KEY:SECRET@bucket`) signs with that, and one without signs with
|
|
4616
|
+
* this pair when the stage set it, or with whatever else the SDK's default
|
|
4617
|
+
* chain finds — a role.
|
|
4618
|
+
*/
|
|
4619
|
+
const STORAGE_KEY_PAIR = ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"];
|
|
4620
|
+
/** A `--allow-dev-services` value that is not a dev service. */
|
|
4621
|
+
var UnknownDevService = class extends Error {
|
|
4622
|
+
value;
|
|
4623
|
+
constructor(value) {
|
|
4624
|
+
super(`'${value}' is not a dev service. --allow-dev-services takes a comma-separated list of ${DEV_SERVICES.join(", ")}: --allow-dev-services ${DEV_SERVICES.join(",")}`);
|
|
4625
|
+
this.value = value;
|
|
4626
|
+
this.name = "UnknownDevService";
|
|
4627
|
+
}
|
|
4628
|
+
};
|
|
4629
|
+
/** Dev services asked of a target that runs no containers. */
|
|
4630
|
+
var DevServicesNeedServerTarget = class extends Error {
|
|
4631
|
+
target;
|
|
4632
|
+
services;
|
|
4633
|
+
constructor(target, services) {
|
|
4634
|
+
super(`--allow-dev-services applies to server targets only, and '${target}' deploys to AWS, where a bucket is S3 and mail is the stage's own. Drop --allow-dev-services ${services.join(",")}.`);
|
|
4635
|
+
this.target = target;
|
|
4636
|
+
this.services = services;
|
|
4637
|
+
this.name = "DevServicesNeedServerTarget";
|
|
4638
|
+
}
|
|
4639
|
+
};
|
|
4640
|
+
/**
|
|
4641
|
+
* A deployed stage with mail or object storage that its secrets do not
|
|
4642
|
+
* configure — every missing key, across every app, at once.
|
|
4643
|
+
*/
|
|
4644
|
+
var ExternalServicesNotConfigured = class extends Error {
|
|
4645
|
+
stage;
|
|
4646
|
+
missing;
|
|
4647
|
+
constructor(stage, missing) {
|
|
4648
|
+
const services = [...new Set(missing.map((m) => m.service))].sort();
|
|
4649
|
+
const lines = missing.map((m) => {
|
|
4650
|
+
const by = m.apps?.length ? `, read by ${m.apps.join(", ")}` : "";
|
|
4651
|
+
return ` gkm secrets:set ${m.key} '${m.example}' --stage ${stage}\n ${m.what}${by}` + (m.note ? `\n ${m.note}` : "");
|
|
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.`);
|
|
4654
|
+
this.stage = stage;
|
|
4655
|
+
this.missing = missing;
|
|
4656
|
+
this.name = "ExternalServicesNotConfigured";
|
|
4657
|
+
}
|
|
4658
|
+
};
|
|
4659
|
+
/**
|
|
4660
|
+
* The dev services a value names: `'minio,mailpit'`, or a list of them.
|
|
4661
|
+
*
|
|
4662
|
+
* @throws {UnknownDevService} for anything that is not one
|
|
4663
|
+
*/
|
|
4664
|
+
function parseDevServices(value) {
|
|
4665
|
+
if (value === void 0) return [];
|
|
4666
|
+
const items = (typeof value === "string" ? [value] : value).flatMap((item) => item.split(",")).map((item) => item.trim()).filter(Boolean);
|
|
4667
|
+
const services = /* @__PURE__ */ new Set();
|
|
4668
|
+
for (const item of items) {
|
|
4669
|
+
if (!DEV_SERVICES.includes(item)) throw new UnknownDevService(item);
|
|
4670
|
+
services.add(item);
|
|
4671
|
+
}
|
|
4672
|
+
return [...services].sort();
|
|
4673
|
+
}
|
|
4674
|
+
/**
|
|
4675
|
+
* Every mail and storage construct a manifest declares, with the apps that
|
|
4676
|
+
* depend on each — what a target that provisions the whole manifest checks.
|
|
4677
|
+
*/
|
|
4678
|
+
function manifestServiceDeclarations(manifest) {
|
|
4679
|
+
return Object.entries(manifest).flatMap(([id, declaration]) => {
|
|
4680
|
+
const { kind } = declaration;
|
|
4681
|
+
if (kind !== "email" && kind !== "objects" && kind !== "file-server") return [];
|
|
4682
|
+
const apps = (0, _geekmidas_manifest.dependentsOf)(manifest, id).filter((caller) => {
|
|
4683
|
+
const callerKind = manifest[caller]?.kind;
|
|
4684
|
+
return callerKind === "rest-api" || callerKind === "site";
|
|
4685
|
+
}).map(require_derive.appKey);
|
|
4686
|
+
return [{
|
|
4687
|
+
id,
|
|
4688
|
+
kind,
|
|
4689
|
+
...declaration.kind === "file-server" ? { of: declaration.of } : {},
|
|
4690
|
+
...apps.length ? { apps } : {}
|
|
4691
|
+
}];
|
|
4692
|
+
});
|
|
4693
|
+
}
|
|
4694
|
+
/**
|
|
4695
|
+
* Where a deployed stage's mail and storage come from, and what it lacks.
|
|
4696
|
+
*
|
|
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.
|
|
4705
|
+
*/
|
|
4706
|
+
function externalServices(input) {
|
|
4707
|
+
const { supplied, allow } = input;
|
|
4708
|
+
const has = (key) => supplied[key] !== void 0;
|
|
4709
|
+
const domain = input.domain ?? "example.com";
|
|
4710
|
+
const missing = [];
|
|
4711
|
+
const minio = [];
|
|
4712
|
+
const mailpit = [];
|
|
4713
|
+
const add = (entry) => {
|
|
4714
|
+
if (!missing.some((m) => m.key === entry.key)) missing.push(entry);
|
|
4715
|
+
};
|
|
4716
|
+
const declarations = [...input.declarations].sort((a, b) => a.id.localeCompare(b.id));
|
|
4717
|
+
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;
|
|
4748
|
+
}
|
|
4749
|
+
add({
|
|
4750
|
+
key: url,
|
|
4751
|
+
id: d.id,
|
|
4752
|
+
what: `the bucket '${d.id}' — S3, R2, or any S3-compatible store (add &endpoint=… for one that is not S3)`,
|
|
4753
|
+
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
|
+
example: `s3://${require_derive.appKey(d.id)}?region=eu-west-1`,
|
|
4755
|
+
service: "minio",
|
|
4756
|
+
...apps(d)
|
|
4757
|
+
});
|
|
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,
|
|
4765
|
+
id: d.id,
|
|
4766
|
+
what: `the public address '${d.id}' serves its bucket on — a CDN or the bucket's own domain`,
|
|
4767
|
+
example: `https://${require_derive.appKey(d.id)}.${domain}`,
|
|
4768
|
+
service: "minio",
|
|
4769
|
+
...apps(d)
|
|
4770
|
+
});
|
|
4771
|
+
}
|
|
4772
|
+
return {
|
|
4773
|
+
missing,
|
|
4774
|
+
minio,
|
|
4775
|
+
mailpit
|
|
4776
|
+
};
|
|
4777
|
+
}
|
|
4778
|
+
/**
|
|
4779
|
+
* `externalServices`, refusing a stage that lacks anything.
|
|
4780
|
+
*
|
|
4781
|
+
* @throws {ExternalServicesNotConfigured} naming every missing key
|
|
4782
|
+
*/
|
|
4783
|
+
function assertExternalServices(input) {
|
|
4784
|
+
const services = externalServices(input);
|
|
4785
|
+
if (services.missing.length > 0) throw new ExternalServicesNotConfigured(input.stage, services.missing);
|
|
4786
|
+
return services;
|
|
4787
|
+
}
|
|
4788
|
+
/** The dev services a run uses, one entry per service it runs. */
|
|
4789
|
+
function devServicesUsed(services) {
|
|
4790
|
+
const used = [];
|
|
4791
|
+
if (services.mailpit.length > 0) used.push({
|
|
4792
|
+
service: "mailpit",
|
|
4793
|
+
ids: services.mailpit
|
|
4794
|
+
});
|
|
4795
|
+
if (services.minio.length > 0) used.push({
|
|
4796
|
+
service: "minio",
|
|
4797
|
+
ids: services.minio
|
|
4798
|
+
});
|
|
4799
|
+
return used;
|
|
4800
|
+
}
|
|
4801
|
+
/** The line a run prints for each dev service a deployed stage uses. */
|
|
4802
|
+
function devServiceWarning(stage, use) {
|
|
4803
|
+
return `⚠️ DEV SERVICE ON A DEPLOYED STAGE (${stage}): ${use.service === "mailpit" ? `Mailpit is catching mail for ${use.ids.join(", ")}. It delivers NO mail: nobody receives a sign-in link, a receipt or a reset` : `MinIO is storing ${use.ids.join(", ")}. Every object is on one container's disk, with no replication and no backup`}. It is not production-grade — set the stage's own keys in its secrets for that.`;
|
|
4804
|
+
}
|
|
4805
|
+
/**
|
|
4806
|
+
* Report each dev service a run uses: a loud line, and a `dev-service.used`
|
|
4807
|
+
* event a host can act on.
|
|
4808
|
+
*/
|
|
4809
|
+
function reportDevServices(ctx, uses) {
|
|
4810
|
+
for (const use of uses) {
|
|
4811
|
+
ctx.logger.warn(`\n${devServiceWarning(ctx.stage, use)}`);
|
|
4812
|
+
ctx.emit({
|
|
4813
|
+
type: "dev-service.used",
|
|
4814
|
+
service: use.service,
|
|
4815
|
+
stage: ctx.stage,
|
|
4816
|
+
constructs: use.ids
|
|
4817
|
+
});
|
|
4818
|
+
}
|
|
4819
|
+
}
|
|
4820
|
+
//#endregion
|
|
4581
4821
|
//#region src/target/dokploy/domain.ts
|
|
4582
4822
|
/** A stage was deployed that `deploy.domains` gives no domain. */
|
|
4583
4823
|
var NoDomainForStage = class extends Error {
|
|
@@ -5402,12 +5642,30 @@ Object.defineProperty(exports, "DEFAULT_IMAGES", {
|
|
|
5402
5642
|
return DEFAULT_IMAGES;
|
|
5403
5643
|
}
|
|
5404
5644
|
});
|
|
5645
|
+
Object.defineProperty(exports, "DEV_SERVICES", {
|
|
5646
|
+
enumerable: true,
|
|
5647
|
+
get: function() {
|
|
5648
|
+
return DEV_SERVICES;
|
|
5649
|
+
}
|
|
5650
|
+
});
|
|
5405
5651
|
Object.defineProperty(exports, "DeployJournal", {
|
|
5406
5652
|
enumerable: true,
|
|
5407
5653
|
get: function() {
|
|
5408
5654
|
return DeployJournal;
|
|
5409
5655
|
}
|
|
5410
5656
|
});
|
|
5657
|
+
Object.defineProperty(exports, "DevServicesNeedServerTarget", {
|
|
5658
|
+
enumerable: true,
|
|
5659
|
+
get: function() {
|
|
5660
|
+
return DevServicesNeedServerTarget;
|
|
5661
|
+
}
|
|
5662
|
+
});
|
|
5663
|
+
Object.defineProperty(exports, "ExternalServicesNotConfigured", {
|
|
5664
|
+
enumerable: true,
|
|
5665
|
+
get: function() {
|
|
5666
|
+
return ExternalServicesNotConfigured;
|
|
5667
|
+
}
|
|
5668
|
+
});
|
|
5411
5669
|
Object.defineProperty(exports, "FAKE_ENV", {
|
|
5412
5670
|
enumerable: true,
|
|
5413
5671
|
get: function() {
|
|
@@ -5426,12 +5684,30 @@ Object.defineProperty(exports, "LOCAL_CA_PATH", {
|
|
|
5426
5684
|
return LOCAL_CA_PATH;
|
|
5427
5685
|
}
|
|
5428
5686
|
});
|
|
5687
|
+
Object.defineProperty(exports, "NoDomainForStage", {
|
|
5688
|
+
enumerable: true,
|
|
5689
|
+
get: function() {
|
|
5690
|
+
return NoDomainForStage;
|
|
5691
|
+
}
|
|
5692
|
+
});
|
|
5693
|
+
Object.defineProperty(exports, "STORAGE_KEY_PAIR", {
|
|
5694
|
+
enumerable: true,
|
|
5695
|
+
get: function() {
|
|
5696
|
+
return STORAGE_KEY_PAIR;
|
|
5697
|
+
}
|
|
5698
|
+
});
|
|
5429
5699
|
Object.defineProperty(exports, "TURBO_VERSION", {
|
|
5430
5700
|
enumerable: true,
|
|
5431
5701
|
get: function() {
|
|
5432
5702
|
return TURBO_VERSION;
|
|
5433
5703
|
}
|
|
5434
5704
|
});
|
|
5705
|
+
Object.defineProperty(exports, "UnknownDevService", {
|
|
5706
|
+
enumerable: true,
|
|
5707
|
+
get: function() {
|
|
5708
|
+
return UnknownDevService;
|
|
5709
|
+
}
|
|
5710
|
+
});
|
|
5435
5711
|
Object.defineProperty(exports, "appDockerfile", {
|
|
5436
5712
|
enumerable: true,
|
|
5437
5713
|
get: function() {
|
|
@@ -5450,18 +5726,48 @@ Object.defineProperty(exports, "applicationName", {
|
|
|
5450
5726
|
return applicationName;
|
|
5451
5727
|
}
|
|
5452
5728
|
});
|
|
5729
|
+
Object.defineProperty(exports, "applyBuckets", {
|
|
5730
|
+
enumerable: true,
|
|
5731
|
+
get: function() {
|
|
5732
|
+
return applyBuckets;
|
|
5733
|
+
}
|
|
5734
|
+
});
|
|
5735
|
+
Object.defineProperty(exports, "applyPolicies", {
|
|
5736
|
+
enumerable: true,
|
|
5737
|
+
get: function() {
|
|
5738
|
+
return applyPolicies;
|
|
5739
|
+
}
|
|
5740
|
+
});
|
|
5453
5741
|
Object.defineProperty(exports, "applyPostgres", {
|
|
5454
5742
|
enumerable: true,
|
|
5455
5743
|
get: function() {
|
|
5456
5744
|
return applyPostgres;
|
|
5457
5745
|
}
|
|
5458
5746
|
});
|
|
5747
|
+
Object.defineProperty(exports, "assertExternalServices", {
|
|
5748
|
+
enumerable: true,
|
|
5749
|
+
get: function() {
|
|
5750
|
+
return assertExternalServices;
|
|
5751
|
+
}
|
|
5752
|
+
});
|
|
5459
5753
|
Object.defineProperty(exports, "backendsOf", {
|
|
5460
5754
|
enumerable: true,
|
|
5461
5755
|
get: function() {
|
|
5462
5756
|
return backendsOf;
|
|
5463
5757
|
}
|
|
5464
5758
|
});
|
|
5759
|
+
Object.defineProperty(exports, "bucketClient", {
|
|
5760
|
+
enumerable: true,
|
|
5761
|
+
get: function() {
|
|
5762
|
+
return bucketClient;
|
|
5763
|
+
}
|
|
5764
|
+
});
|
|
5765
|
+
Object.defineProperty(exports, "bucketPolicies", {
|
|
5766
|
+
enumerable: true,
|
|
5767
|
+
get: function() {
|
|
5768
|
+
return bucketPolicies;
|
|
5769
|
+
}
|
|
5770
|
+
});
|
|
5465
5771
|
Object.defineProperty(exports, "cacheBackendFor", {
|
|
5466
5772
|
enumerable: true,
|
|
5467
5773
|
get: function() {
|
|
@@ -5546,6 +5852,12 @@ Object.defineProperty(exports, "detectPackageManager", {
|
|
|
5546
5852
|
return detectPackageManager;
|
|
5547
5853
|
}
|
|
5548
5854
|
});
|
|
5855
|
+
Object.defineProperty(exports, "devServicesUsed", {
|
|
5856
|
+
enumerable: true,
|
|
5857
|
+
get: function() {
|
|
5858
|
+
return devServicesUsed;
|
|
5859
|
+
}
|
|
5860
|
+
});
|
|
5549
5861
|
Object.defineProperty(exports, "dockerCommand", {
|
|
5550
5862
|
enumerable: true,
|
|
5551
5863
|
get: function() {
|
|
@@ -5582,6 +5894,12 @@ Object.defineProperty(exports, "eventsBackendFor", {
|
|
|
5582
5894
|
return eventsBackendFor;
|
|
5583
5895
|
}
|
|
5584
5896
|
});
|
|
5897
|
+
Object.defineProperty(exports, "externalServices", {
|
|
5898
|
+
enumerable: true,
|
|
5899
|
+
get: function() {
|
|
5900
|
+
return externalServices;
|
|
5901
|
+
}
|
|
5902
|
+
});
|
|
5585
5903
|
Object.defineProperty(exports, "fakeKey", {
|
|
5586
5904
|
enumerable: true,
|
|
5587
5905
|
get: function() {
|
|
@@ -5714,6 +6032,12 @@ Object.defineProperty(exports, "localRolePassword", {
|
|
|
5714
6032
|
return localRolePassword;
|
|
5715
6033
|
}
|
|
5716
6034
|
});
|
|
6035
|
+
Object.defineProperty(exports, "manifestServiceDeclarations", {
|
|
6036
|
+
enumerable: true,
|
|
6037
|
+
get: function() {
|
|
6038
|
+
return manifestServiceDeclarations;
|
|
6039
|
+
}
|
|
6040
|
+
});
|
|
5717
6041
|
Object.defineProperty(exports, "markerOf", {
|
|
5718
6042
|
enumerable: true,
|
|
5719
6043
|
get: function() {
|
|
@@ -5738,6 +6062,12 @@ Object.defineProperty(exports, "ownershipMarker", {
|
|
|
5738
6062
|
return ownershipMarker;
|
|
5739
6063
|
}
|
|
5740
6064
|
});
|
|
6065
|
+
Object.defineProperty(exports, "parseDevServices", {
|
|
6066
|
+
enumerable: true,
|
|
6067
|
+
get: function() {
|
|
6068
|
+
return parseDevServices;
|
|
6069
|
+
}
|
|
6070
|
+
});
|
|
5741
6071
|
Object.defineProperty(exports, "pgClient", {
|
|
5742
6072
|
enumerable: true,
|
|
5743
6073
|
get: function() {
|
|
@@ -5828,6 +6158,12 @@ Object.defineProperty(exports, "recordRollback", {
|
|
|
5828
6158
|
return recordRollback;
|
|
5829
6159
|
}
|
|
5830
6160
|
});
|
|
6161
|
+
Object.defineProperty(exports, "reportDevServices", {
|
|
6162
|
+
enumerable: true,
|
|
6163
|
+
get: function() {
|
|
6164
|
+
return reportDevServices;
|
|
6165
|
+
}
|
|
6166
|
+
});
|
|
5831
6167
|
Object.defineProperty(exports, "resolveHost", {
|
|
5832
6168
|
enumerable: true,
|
|
5833
6169
|
get: function() {
|
|
@@ -5931,4 +6267,4 @@ Object.defineProperty(exports, "workspace_exports", {
|
|
|
5931
6267
|
}
|
|
5932
6268
|
});
|
|
5933
6269
|
|
|
5934
|
-
//# sourceMappingURL=state-
|
|
6270
|
+
//# sourceMappingURL=state-CHZqCDRC.cjs.map
|