@geekmidas/cli 10.0.0-alpha.12 → 10.0.0-alpha.13
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/{HostingerProvider-BcyFRbqV.mjs → HostingerProvider-BY26bWwB.mjs} +20 -21
- package/dist/HostingerProvider-BY26bWwB.mjs.map +1 -0
- package/dist/{HostingerProvider-BOvsgATO.cjs → HostingerProvider-BZFGYYVA.cjs} +21 -22
- package/dist/HostingerProvider-BZFGYYVA.cjs.map +1 -0
- package/dist/{LocalStateProvider-yjXZXZDM.cjs → LocalStateProvider-7HR6SS2t.cjs} +11 -6
- package/dist/LocalStateProvider-7HR6SS2t.cjs.map +1 -0
- package/dist/{LocalStateProvider-Bq-0C0sg.mjs → LocalStateProvider-D7QyJoLM.mjs} +10 -4
- package/dist/LocalStateProvider-D7QyJoLM.mjs.map +1 -0
- package/dist/{Route53Provider-C0xmer8U.mjs → Route53Provider-Cvj40A8I.mjs} +12 -12
- package/dist/Route53Provider-Cvj40A8I.mjs.map +1 -0
- package/dist/{Route53Provider-CH9XH7bz.cjs → Route53Provider-DVILBsvV.cjs} +20 -21
- package/dist/Route53Provider-DVILBsvV.cjs.map +1 -0
- package/dist/{SSMStateProvider-DOZifZfE.mjs → SSMStateProvider-B0Hu1MKZ.mjs} +13 -4
- package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +1 -0
- package/dist/{SSMStateProvider-CXtNgPfy.cjs → SSMStateProvider-VrQ-yeqd.cjs} +17 -9
- package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +1 -0
- package/dist/{backup-provisioner-cE2PuCTb.cjs → backup-provisioner-BmhIO_Yr.cjs} +21 -19
- package/dist/backup-provisioner-BmhIO_Yr.cjs.map +1 -0
- package/dist/{backup-provisioner-DXXg6FIL.mjs → backup-provisioner-DIVCbfee.mjs} +10 -7
- package/dist/backup-provisioner-DIVCbfee.mjs.map +1 -0
- package/dist/{bundler-BMekgx7a.cjs → bundler-BeNDZdHQ.cjs} +9 -12
- package/dist/bundler-BeNDZdHQ.cjs.map +1 -0
- package/dist/{bundler-Bux2iF-v.mjs → bundler-BodTL4kf.mjs} +8 -10
- package/dist/bundler-BodTL4kf.mjs.map +1 -0
- package/dist/{config-RYR9j6EF.cjs → config-Q1rvKHvw.cjs} +74 -69
- package/dist/config-Q1rvKHvw.cjs.map +1 -0
- package/dist/{config-DTsVjKZD.mjs → config-pqGD3hF9.mjs} +26 -14
- package/dist/config-pqGD3hF9.mjs.map +1 -0
- package/dist/config.cjs +4 -5
- package/dist/config.d.cts +14 -17
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +14 -17
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +3 -5
- package/dist/{credentials-jMJC63qs.mjs → credentials-BekkKtY_.mjs} +234 -79
- package/dist/credentials-BekkKtY_.mjs.map +1 -0
- package/dist/{credentials-DQRvPz2S.cjs → credentials-Q6F0uqJq.cjs} +384 -236
- package/dist/credentials-Q6F0uqJq.cjs.map +1 -0
- package/dist/deploy/sniffer-envkit-patch.cjs +18 -10
- package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.d.cts +0 -2
- package/dist/deploy/sniffer-envkit-patch.d.cts.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.d.mts +0 -2
- package/dist/deploy/sniffer-envkit-patch.d.mts.map +1 -1
- package/dist/deploy/sniffer-envkit-patch.mjs +10 -2
- package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -1
- package/dist/deploy/sniffer-hooks.cjs +13 -7
- package/dist/deploy/sniffer-hooks.cjs.map +1 -1
- package/dist/deploy/sniffer-hooks.d.cts +1 -2
- package/dist/deploy/sniffer-hooks.d.cts.map +1 -1
- package/dist/deploy/sniffer-hooks.d.mts +1 -2
- package/dist/deploy/sniffer-hooks.d.mts.map +1 -1
- package/dist/deploy/sniffer-hooks.mjs +9 -2
- package/dist/deploy/sniffer-hooks.mjs.map +1 -1
- package/dist/deploy/sniffer-loader.cjs +16 -7
- package/dist/deploy/sniffer-loader.cjs.map +1 -1
- package/dist/deploy/sniffer-loader.d.cts +1 -1
- package/dist/deploy/sniffer-loader.d.mts +1 -1
- package/dist/deploy/sniffer-loader.mjs +13 -2
- package/dist/deploy/sniffer-loader.mjs.map +1 -1
- package/dist/deploy/sniffer-routes-worker.cjs +11 -11
- package/dist/deploy/sniffer-routes-worker.cjs.map +1 -1
- package/dist/deploy/sniffer-routes-worker.d.cts +1 -1
- package/dist/deploy/sniffer-routes-worker.d.mts +1 -1
- package/dist/deploy/sniffer-routes-worker.mjs +2 -2
- package/dist/deploy/sniffer-routes-worker.mjs.map +1 -1
- package/dist/deploy/sniffer-worker.cjs +15 -6
- package/dist/deploy/sniffer-worker.cjs.map +1 -1
- package/dist/deploy/sniffer-worker.d.cts +1 -3
- package/dist/deploy/sniffer-worker.d.cts.map +1 -1
- package/dist/deploy/sniffer-worker.d.mts +1 -3
- package/dist/deploy/sniffer-worker.d.mts.map +1 -1
- package/dist/deploy/sniffer-worker.mjs +15 -4
- package/dist/deploy/sniffer-worker.mjs.map +1 -1
- package/dist/{discover-DmW9Bscc.cjs → discover-BERGFg8v.cjs} +68 -70
- package/dist/discover-BERGFg8v.cjs.map +1 -0
- package/dist/{discover-BYHQwQqu.mjs → discover-CK-n3w6b.mjs} +22 -20
- package/dist/discover-CK-n3w6b.mjs.map +1 -0
- package/dist/{emit-CUD1BWls.cjs → emit-BdoPFjZf.cjs} +53 -36
- package/dist/emit-BdoPFjZf.cjs.map +1 -0
- package/dist/{emit-CIlvnDvV.mjs → emit-Bzq7JsMP.mjs} +24 -6
- package/dist/emit-Bzq7JsMP.mjs.map +1 -0
- package/dist/{fullstack-secrets-B6KBHf-g.mjs → fullstack-secrets-BET8gqwK.mjs} +9 -15
- package/dist/fullstack-secrets-BET8gqwK.mjs.map +1 -0
- package/dist/{fullstack-secrets-DL8v0y4D.cjs → fullstack-secrets-DXsWO-5m.cjs} +19 -26
- package/dist/fullstack-secrets-DXsWO-5m.cjs.map +1 -0
- package/dist/{generator-VE2JrFlY.mjs → generator-LfZU7NlU.mjs} +8 -14
- package/dist/generator-LfZU7NlU.mjs.map +1 -0
- package/dist/{generator-CNzBw7g5.cjs → generator-Wdfp0jCS.cjs} +38 -45
- package/dist/generator-Wdfp0jCS.cjs.map +1 -0
- package/dist/{github-BThvbf2W.cjs → github-BfflNPVe.cjs} +36 -30
- package/dist/{github-BThvbf2W.cjs.map → github-BfflNPVe.cjs.map} +1 -1
- package/dist/{github-DpMZurEK.mjs → github-CRwnxKmD.mjs} +27 -20
- package/dist/github-CRwnxKmD.mjs.map +1 -0
- package/dist/{index-BzJ7QJ9c.d.mts → index-Cd-qeOam.d.mts} +3 -8
- package/dist/index-Cd-qeOam.d.mts.map +1 -0
- package/dist/{index-CfMjtdVC.d.cts → index-D-iAVHx-.d.cts} +3 -8
- package/dist/index-D-iAVHx-.d.cts.map +1 -0
- package/dist/index.cjs +2894 -1582
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2765 -1470
- package/dist/index.mjs.map +1 -1
- package/dist/{keystore-TxeYM7an.mjs → keystore-B4PRlbgE.mjs} +5 -7
- package/dist/keystore-B4PRlbgE.mjs.map +1 -0
- package/dist/{keystore-C9rint2E.cjs → keystore-DgGRj2Yy.cjs} +23 -26
- package/dist/keystore-DgGRj2Yy.cjs.map +1 -0
- package/dist/{openapi-DWLTsYLL.cjs → openapi-Dcbme-Us.cjs} +134 -171
- package/dist/openapi-Dcbme-Us.cjs.map +1 -0
- package/dist/openapi-react-query.cjs +156 -2
- package/dist/openapi-react-query.cjs.map +1 -0
- package/dist/openapi-react-query.d.cts +1 -3
- package/dist/openapi-react-query.d.cts.map +1 -1
- package/dist/openapi-react-query.d.mts +1 -3
- package/dist/openapi-react-query.d.mts.map +1 -1
- package/dist/openapi-react-query.mjs +156 -2
- package/dist/openapi-react-query.mjs.map +1 -0
- package/dist/{openapi-Bs3-5q_r.mjs → openapi-vy4JzhUv.mjs} +76 -106
- package/dist/openapi-vy4JzhUv.mjs.map +1 -0
- package/dist/openapi.cjs +3 -6
- package/dist/openapi.d.cts +8 -11
- package/dist/openapi.d.cts.map +1 -1
- package/dist/openapi.d.mts +8 -11
- package/dist/openapi.d.mts.map +1 -1
- package/dist/openapi.mjs +2 -6
- package/dist/reconcile/public.cjs +4 -4
- package/dist/reconcile/public.d.cts +8 -26
- package/dist/reconcile/public.d.cts.map +1 -1
- package/dist/reconcile/public.d.mts +8 -26
- package/dist/reconcile/public.d.mts.map +1 -1
- package/dist/reconcile/public.mjs +3 -4
- package/dist/{reconcile-Bhw5fmKu.cjs → reconcile-Dd2iyILf.cjs} +4 -7
- package/dist/reconcile-Dd2iyILf.cjs.map +1 -0
- package/dist/{reconcile-BI0tWkwz.mjs → reconcile-DhQ00DpU.mjs} +4 -7
- package/dist/reconcile-DhQ00DpU.mjs.map +1 -0
- package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
- package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-C0BPl7ul.cjs} +23 -10
- package/dist/{storage-CSNplaJn.cjs → storage-C-30BD1e.cjs} +59 -69
- package/dist/storage-C-30BD1e.cjs.map +1 -0
- package/dist/{storage-B020InPW.mjs → storage-P_b3w7uj.mjs} +22 -13
- package/dist/storage-P_b3w7uj.mjs.map +1 -0
- package/dist/{sync-CzHXiR9c.mjs → sync-B3xxXtJT.mjs} +18 -6
- package/dist/sync-B3xxXtJT.mjs.map +1 -0
- package/dist/{sync-0ILCb-1S.cjs → sync-D7uTIIEi.cjs} +43 -25
- package/dist/sync-D7uTIIEi.cjs.map +1 -0
- package/dist/types-BGo5TaNE.d.mts +6164 -0
- package/dist/types-BGo5TaNE.d.mts.map +1 -0
- package/dist/types-C5ZNpUad.d.cts +6165 -0
- package/dist/types-C5ZNpUad.d.cts.map +1 -0
- package/dist/workspace/index.cjs +3 -3
- package/dist/workspace/index.d.cts +3 -3
- package/dist/workspace/index.d.mts +3 -3
- package/dist/workspace/index.mjs +2 -3
- package/dist/{workspace-CtnZnWsa.mjs → workspace-CgwmXEtc.mjs} +712 -806
- package/dist/workspace-CgwmXEtc.mjs.map +1 -0
- package/dist/{workspace-DPV7FtAv.cjs → workspace-mFpI_ky_.cjs} +881 -976
- package/dist/workspace-mFpI_ky_.cjs.map +1 -0
- package/package.json +14 -14
- package/dist/CachedStateProvider-BEBl2wQT.cjs +0 -60
- package/dist/CachedStateProvider-BEBl2wQT.cjs.map +0 -1
- package/dist/CachedStateProvider-C-8wtlto.mjs +0 -3
- package/dist/CachedStateProvider-Co4n5Wvs.mjs +0 -54
- package/dist/CachedStateProvider-Co4n5Wvs.mjs.map +0 -1
- package/dist/CachedStateProvider-DqhGpzsm.cjs +0 -3
- package/dist/HostingerProvider-BOvsgATO.cjs.map +0 -1
- package/dist/HostingerProvider-BcyFRbqV.mjs.map +0 -1
- package/dist/LocalStateProvider-Bq-0C0sg.mjs.map +0 -1
- package/dist/LocalStateProvider-yjXZXZDM.cjs.map +0 -1
- package/dist/Route53Provider-C0xmer8U.mjs.map +0 -1
- package/dist/Route53Provider-CH9XH7bz.cjs.map +0 -1
- package/dist/SSMStateProvider-CXtNgPfy.cjs.map +0 -1
- package/dist/SSMStateProvider-DOZifZfE.mjs.map +0 -1
- package/dist/backup-provisioner-DXXg6FIL.mjs.map +0 -1
- package/dist/backup-provisioner-cE2PuCTb.cjs.map +0 -1
- package/dist/bundler-BMekgx7a.cjs.map +0 -1
- package/dist/bundler-Bux2iF-v.mjs.map +0 -1
- package/dist/chunk-Duj1WY3L.mjs +0 -7
- package/dist/config-DTsVjKZD.mjs.map +0 -1
- package/dist/config-RYR9j6EF.cjs.map +0 -1
- package/dist/credentials-B5zRHdAl.mjs +0 -141
- package/dist/credentials-B5zRHdAl.mjs.map +0 -1
- package/dist/credentials-BapzjyV5.cjs +0 -195
- package/dist/credentials-BapzjyV5.cjs.map +0 -1
- package/dist/credentials-DQRvPz2S.cjs.map +0 -1
- package/dist/credentials-jMJC63qs.mjs.map +0 -1
- package/dist/discover-BYHQwQqu.mjs.map +0 -1
- package/dist/discover-DmW9Bscc.cjs.map +0 -1
- package/dist/dokploy-api-5cK2InBm.cjs +0 -3
- package/dist/dokploy-api-D2Ny4Jrc.mjs +0 -3
- package/dist/dokploy-api-pdaBryoY.mjs +0 -706
- package/dist/dokploy-api-pdaBryoY.mjs.map +0 -1
- package/dist/dokploy-api-zqKe9lHH.cjs +0 -718
- package/dist/dokploy-api-zqKe9lHH.cjs.map +0 -1
- package/dist/emit-CIlvnDvV.mjs.map +0 -1
- package/dist/emit-CUD1BWls.cjs.map +0 -1
- package/dist/encryption-D2pL3tHH.cjs +0 -54
- package/dist/encryption-D2pL3tHH.cjs.map +0 -1
- package/dist/encryption-YDsXXi6w.mjs +0 -3
- package/dist/encryption-_4zwjOAR.mjs +0 -42
- package/dist/encryption-_4zwjOAR.mjs.map +0 -1
- package/dist/encryption-sQ2Oxx0d.cjs +0 -4
- package/dist/fullstack-secrets-B6KBHf-g.mjs.map +0 -1
- package/dist/fullstack-secrets-DL8v0y4D.cjs.map +0 -1
- package/dist/generator-CNzBw7g5.cjs.map +0 -1
- package/dist/generator-VE2JrFlY.mjs.map +0 -1
- package/dist/github-DpMZurEK.mjs.map +0 -1
- package/dist/index-BzJ7QJ9c.d.mts.map +0 -1
- package/dist/index-CfMjtdVC.d.cts.map +0 -1
- package/dist/keystore-C9rint2E.cjs.map +0 -1
- package/dist/keystore-TxeYM7an.mjs.map +0 -1
- package/dist/openapi-Bs3-5q_r.mjs.map +0 -1
- package/dist/openapi-DWLTsYLL.cjs.map +0 -1
- package/dist/openapi-react-query-Byltvm_7.mjs +0 -167
- package/dist/openapi-react-query-Byltvm_7.mjs.map +0 -1
- package/dist/openapi-react-query-CmJ1xDbn.cjs +0 -173
- package/dist/openapi-react-query-CmJ1xDbn.cjs.map +0 -1
- package/dist/reconcile-BI0tWkwz.mjs.map +0 -1
- package/dist/reconcile-Bhw5fmKu.cjs.map +0 -1
- package/dist/setup-BmLoNrDX.mjs +0 -12
- package/dist/setup-BrR1_xGy.cjs +0 -12
- package/dist/setup-BsNR2LBG.cjs +0 -467
- package/dist/setup-BsNR2LBG.cjs.map +0 -1
- package/dist/setup-D5-JMknk.mjs +0 -437
- package/dist/setup-D5-JMknk.mjs.map +0 -1
- package/dist/storage-B020InPW.mjs.map +0 -1
- package/dist/storage-CSNplaJn.cjs.map +0 -1
- package/dist/storage-DGBzMLZa.mjs +0 -4
- package/dist/storage-DlVol_oj.cjs +0 -8
- package/dist/sync-0ILCb-1S.cjs.map +0 -1
- package/dist/sync-CzHXiR9c.mjs.map +0 -1
- package/dist/sync-DYENfOt4.cjs +0 -4
- package/dist/sync-HAau6h_R.mjs +0 -3
- package/dist/types-DVIx8I1N.d.mts +0 -1950
- package/dist/types-DVIx8I1N.d.mts.map +0 -1
- package/dist/types-PMP_qXRY.d.cts +0 -1950
- package/dist/types-PMP_qXRY.d.cts.map +0 -1
- package/dist/workspace-Cji6lE8E.cjs +0 -10
- package/dist/workspace-CkJAtRIX.mjs +0 -9
- package/dist/workspace-CtnZnWsa.mjs.map +0 -1
- package/dist/workspace-DPV7FtAv.cjs.map +0 -1
|
@@ -1,26 +1,39 @@
|
|
|
1
|
-
const
|
|
2
|
-
const require_discover = require(
|
|
3
|
-
const require_config = require(
|
|
4
|
-
const require_workspace = require(
|
|
5
|
-
const require_generator = require(
|
|
6
|
-
const require_storage = require(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
|
|
2
|
+
const require_discover = require("./discover-BERGFg8v.cjs");
|
|
3
|
+
const require_config = require("./config-Q1rvKHvw.cjs");
|
|
4
|
+
const require_workspace = require("./workspace-mFpI_ky_.cjs");
|
|
5
|
+
const require_generator = require("./generator-Wdfp0jCS.cjs");
|
|
6
|
+
const require_storage = require("./storage-C-30BD1e.cjs");
|
|
7
|
+
let node_fs = require("node:fs");
|
|
8
|
+
let node_fs_promises = require("node:fs/promises");
|
|
9
|
+
let node_path = require("node:path");
|
|
10
|
+
let node_child_process = require("node:child_process");
|
|
11
|
+
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
12
|
+
let node_net = require("node:net");
|
|
13
|
+
let dotenv = require("dotenv");
|
|
14
|
+
let yaml = require("yaml");
|
|
15
|
+
let node_crypto = require("node:crypto");
|
|
16
|
+
let _geekmidas_db_pg_roles = require("@geekmidas/db/pg/roles");
|
|
17
|
+
let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
|
|
18
|
+
let pg = require("pg");
|
|
19
|
+
let node_util = require("node:util");
|
|
20
|
+
let _geekmidas_cache_postgres = require("@geekmidas/cache/postgres");
|
|
22
21
|
//#region src/workspace/backends.ts
|
|
23
22
|
/**
|
|
23
|
+
* Which backend each declared kind resolves to — decided by where the project
|
|
24
|
+
* deploys, and by nothing else.
|
|
25
|
+
*
|
|
26
|
+
* These used to be read out of a `services:` block, where one key answered two
|
|
27
|
+
* questions: *does this exist* and *what backs it*. The first is the manifest's
|
|
28
|
+
* — a declared `Cache` is why there is a cache — and the second is the deploy
|
|
29
|
+
* target's, because the right cache for a Lambda is not the right cache for a
|
|
30
|
+
* box already running Postgres. With both answered elsewhere there was nothing
|
|
31
|
+
* left for the block to say, so it is gone and these read the target.
|
|
32
|
+
*
|
|
33
|
+
* Mail has no answer here at all: every provider speaks SMTP, so the provider
|
|
34
|
+
* is whichever one the stage's mail URL points at.
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
24
37
|
* Which family of defaults a workspace's deploy target belongs to.
|
|
25
38
|
*
|
|
26
39
|
* One question, asked once: **does this target run containers the project
|
|
@@ -60,7 +73,6 @@ function storageBackendFor(on) {
|
|
|
60
73
|
function eventsBackendFor(on) {
|
|
61
74
|
return require_discover.DEFAULT_EVENTS[on];
|
|
62
75
|
}
|
|
63
|
-
|
|
64
76
|
//#endregion
|
|
65
77
|
//#region src/reconcile/containers.ts
|
|
66
78
|
/**
|
|
@@ -92,7 +104,7 @@ function postgresImage(version) {
|
|
|
92
104
|
* per project: a project needing `postgis/postgis` says so in config.
|
|
93
105
|
*/
|
|
94
106
|
const DEFAULT_IMAGES = {
|
|
95
|
-
postgres: postgresImage(
|
|
107
|
+
postgres: postgresImage(_geekmidas_manifest.DEFAULT_POSTGRES_VERSION),
|
|
96
108
|
minio: "pgsty/minio:RELEASE.2026-08-04T00-00-00Z",
|
|
97
109
|
mailpit: "axllent/mailpit:latest",
|
|
98
110
|
redis: "redis:8-alpine",
|
|
@@ -186,17 +198,15 @@ function portKeys(containers) {
|
|
|
186
198
|
* survives days of dev is noise rather than state.
|
|
187
199
|
*/
|
|
188
200
|
function volumeOf(container) {
|
|
189
|
-
|
|
201
|
+
return {
|
|
190
202
|
postgres: "postgres-data",
|
|
191
203
|
minio: "minio-data",
|
|
192
204
|
redis: "redis-data",
|
|
193
205
|
rabbitmq: "rabbitmq-data",
|
|
194
206
|
localstack: "localstack-data",
|
|
195
207
|
caddy: "caddy-data"
|
|
196
|
-
};
|
|
197
|
-
return volumes[container];
|
|
208
|
+
}[container];
|
|
198
209
|
}
|
|
199
|
-
|
|
200
210
|
//#endregion
|
|
201
211
|
//#region src/reconcile/caddyfile.ts
|
|
202
212
|
/**
|
|
@@ -273,7 +283,7 @@ function portOf(address) {
|
|
|
273
283
|
const { port, protocol } = new URL(address);
|
|
274
284
|
return port || (protocol === "https:" ? "443" : "80");
|
|
275
285
|
} catch {
|
|
276
|
-
return
|
|
286
|
+
return;
|
|
277
287
|
}
|
|
278
288
|
}
|
|
279
289
|
/**
|
|
@@ -356,10 +366,21 @@ const GENERATED = `# Generated by gkm from the construct manifest — do not edi
|
|
|
356
366
|
# root and point Node at it, so nothing has to be installed to use these URLs
|
|
357
367
|
# from code; a browser needs the root trusted once.
|
|
358
368
|
`;
|
|
359
|
-
|
|
360
369
|
//#endregion
|
|
361
370
|
//#region src/reconcile/plan.ts
|
|
362
371
|
/**
|
|
372
|
+
* The reconcile plan — what a manifest wants to exist, for one stage.
|
|
373
|
+
*
|
|
374
|
+
* Pure. Turning the plan into running containers and provisioned resources is
|
|
375
|
+
* the applier's job; deciding *what* should exist is this, so the decisions can
|
|
376
|
+
* be asserted as data rather than by starting Docker.
|
|
377
|
+
*
|
|
378
|
+
* One plan serves every stage. `gkm dev` reconciles `development` and `gkm test`
|
|
379
|
+
* reconciles `test`; they differ only in what the resources are called, never in
|
|
380
|
+
* what infrastructure exists. Roles are cluster-scoped in Postgres while grants
|
|
381
|
+
* are per-object, so one container and one role pair serve both.
|
|
382
|
+
*/
|
|
383
|
+
/**
|
|
363
384
|
* Which container serves a kind.
|
|
364
385
|
*
|
|
365
386
|
* Derived kinds map to the same container as their parent — a schema tenant
|
|
@@ -460,7 +481,7 @@ const EVENT_CONTAINERS = {
|
|
|
460
481
|
rabbitmq: "rabbitmq"
|
|
461
482
|
};
|
|
462
483
|
/** The backend a project gets when it declares queues or topics and says nothing. */
|
|
463
|
-
const DEFAULT_EVENTS
|
|
484
|
+
const DEFAULT_EVENTS = "pgboss";
|
|
464
485
|
/**
|
|
465
486
|
* How a resource of each kind separates its stage suffix.
|
|
466
487
|
*
|
|
@@ -493,7 +514,7 @@ function resourceName(id, kind, stage, localStage) {
|
|
|
493
514
|
* broker the project selected, which is why the backend is an argument here
|
|
494
515
|
* rather than a second pass that adds containers after the fact.
|
|
495
516
|
*/
|
|
496
|
-
function containerFor(kind, events = DEFAULT_EVENTS
|
|
517
|
+
function containerFor(kind, events = DEFAULT_EVENTS, cache = require_discover.DEFAULT_CACHE.aws, derived = false, edge = true) {
|
|
497
518
|
if (EVENT_KINDS[kind]) return EVENT_CONTAINERS[events] ?? CONTAINERS.database;
|
|
498
519
|
if (kind === "file-server") return edge ? "caddy" : CONTAINERS.objects;
|
|
499
520
|
if (kind === "cache") {
|
|
@@ -512,7 +533,7 @@ function containerFor(kind, events = DEFAULT_EVENTS$1, cache = require_discover.
|
|
|
512
533
|
function planFor(manifest, stage, order, options = {}) {
|
|
513
534
|
const containers = /* @__PURE__ */ new Set();
|
|
514
535
|
const resources = [];
|
|
515
|
-
const events = options.events ??
|
|
536
|
+
const events = options.events ?? "pgboss";
|
|
516
537
|
const cache = options.cache ?? require_discover.DEFAULT_CACHE.aws;
|
|
517
538
|
for (const id of order) {
|
|
518
539
|
const declaration = manifest[id];
|
|
@@ -528,10 +549,10 @@ function planFor(manifest, stage, order, options = {}) {
|
|
|
528
549
|
kind: declaration.kind,
|
|
529
550
|
...container ? { container } : {},
|
|
530
551
|
name: resourceName(id, declaration.kind, stage, options.localStage),
|
|
531
|
-
envKey: (0,
|
|
552
|
+
envKey: (0, _geekmidas_manifest.providedKeyFor)(id, declaration.kind, ROLES[declaration.kind] ?? "url"),
|
|
532
553
|
provisions: PROVISIONS[declaration.kind] === true,
|
|
533
|
-
...declaration.kind === "rest-api" ? { callers: (0,
|
|
534
|
-
...declaration.kind === "site" ? { publicEnv: (0,
|
|
554
|
+
...declaration.kind === "rest-api" ? { callers: (0, _geekmidas_manifest.dependentsOf)(manifest, id) } : {},
|
|
555
|
+
...declaration.kind === "site" ? { publicEnv: (0, _geekmidas_manifest.publicEnvFor)(declaration, manifest) } : {},
|
|
535
556
|
...declaration.kind === "file-server" && declaration.open?.length ? { open: declaration.open } : {},
|
|
536
557
|
..."of" in declaration ? { of: declaration.of } : {},
|
|
537
558
|
..."schema" in declaration && declaration.schema ? { schema: declaration.schema } : {},
|
|
@@ -569,6 +590,7 @@ function planFor(manifest, stage, order, options = {}) {
|
|
|
569
590
|
* broker.
|
|
570
591
|
*/
|
|
571
592
|
var CacheNeedsDatabase = class extends Error {
|
|
593
|
+
ids;
|
|
572
594
|
constructor(ids) {
|
|
573
595
|
super(`A cache backed by the database needs a declared database, and none was declared, and on this deploy target that is where a cache lives. Declare one. Caches affected: ${ids.join(", ")}.`);
|
|
574
596
|
this.ids = ids;
|
|
@@ -587,6 +609,8 @@ var CacheNeedsDatabase = class extends Error {
|
|
|
587
609
|
* application rather than a deployment choice.
|
|
588
610
|
*/
|
|
589
611
|
var CacheIsAmbiguous = class extends Error {
|
|
612
|
+
ids;
|
|
613
|
+
databases;
|
|
590
614
|
constructor(ids, databases) {
|
|
591
615
|
super(`A cache backed by the database needs to know which one, and this app declares ${databases.length}: ${databases.join(", ")}. Declare the cache from its database — e.g. ${databases[0]}.cache('Sessions') — rather than as a bare new Cache(). Caches affected: ${ids.join(", ")}.`);
|
|
592
616
|
this.ids = ids;
|
|
@@ -595,16 +619,29 @@ var CacheIsAmbiguous = class extends Error {
|
|
|
595
619
|
}
|
|
596
620
|
};
|
|
597
621
|
var PgBossNeedsDatabase = class extends Error {
|
|
622
|
+
ids;
|
|
598
623
|
constructor(ids) {
|
|
599
624
|
super(`pg-boss keeps its queues in a declared database, and none was declared. Declare one: on this deploy target, events are carried by pg-boss. Queues and topics affected: ${ids.join(", ")}.`);
|
|
600
625
|
this.ids = ids;
|
|
601
626
|
this.name = "PgBossNeedsDatabase";
|
|
602
627
|
}
|
|
603
628
|
};
|
|
604
|
-
|
|
605
629
|
//#endregion
|
|
606
630
|
//#region src/reconcile/env.ts
|
|
607
631
|
/**
|
|
632
|
+
* The URLs a reconciled stage injects.
|
|
633
|
+
*
|
|
634
|
+
* One `<NAME>_URL` per construct, and the protocol picks the driver. This is the
|
|
635
|
+
* seam between the target that writes a URL and the client that parses it, so
|
|
636
|
+
* every component of it is read off the resource — never inherited from ambient
|
|
637
|
+
* environment. A bucket can live in a different region than the function reading
|
|
638
|
+
* it, and `AWS_REGION` in a Lambda is the *function's* region, so a URL that
|
|
639
|
+
* omits `?region=` breaks cross-region silently at runtime.
|
|
640
|
+
*
|
|
641
|
+
* Locally that self-containment is what lets the port be whatever was free: the
|
|
642
|
+
* app reads `ORDERS_URL` and never sees a host or a port.
|
|
643
|
+
*/
|
|
644
|
+
/**
|
|
608
645
|
* The credential local containers are brought up with.
|
|
609
646
|
*
|
|
610
647
|
* The design's `roles: false` case — both URLs fall back to the cluster's master
|
|
@@ -656,9 +693,9 @@ function envFor(plan, options) {
|
|
|
656
693
|
if (url) env[resource.envKey] = url;
|
|
657
694
|
if (isDatabase(resource.kind) && resource.roles !== false) {
|
|
658
695
|
const owner = ownerUrl(resource, plan, options.ports, options.project ?? "");
|
|
659
|
-
if (owner) env[(0,
|
|
696
|
+
if (owner) env[(0, _geekmidas_manifest.provideKey)(resource.id, "ownerUrl")] = owner;
|
|
660
697
|
}
|
|
661
|
-
if (resource.kind === "email" && url) env[(0,
|
|
698
|
+
if (resource.kind === "email" && url) env[(0, _geekmidas_manifest.provideKey)(resource.id, "from")] = options.mailFrom ?? `noreply@${LOCAL_HOST}`;
|
|
662
699
|
}
|
|
663
700
|
Object.assign(env, publicEnv(plan, env));
|
|
664
701
|
Object.assign(env, brokerEnv(plan, options.ports));
|
|
@@ -704,10 +741,10 @@ function publicEnv(plan, resolved) {
|
|
|
704
741
|
function surfaceEnv(resource, url, resolved = {}) {
|
|
705
742
|
if (!url) return {};
|
|
706
743
|
const origins = [...new Set((resource.callers ?? []).map((caller) => resolved[caller]).filter((address) => Boolean(address)).map(originOf).filter((origin) => Boolean(origin)))].sort();
|
|
707
|
-
const domain = (0,
|
|
744
|
+
const domain = (0, _geekmidas_manifest.cookieDomain)([url, ...origins]);
|
|
708
745
|
return {
|
|
709
|
-
[(0,
|
|
710
|
-
...domain ? { [(0,
|
|
746
|
+
[(0, _geekmidas_manifest.provideKey)(resource.id, "trustedOrigins")]: origins.join(","),
|
|
747
|
+
...domain ? { [(0, _geekmidas_manifest.provideKey)(resource.id, "cookieDomain")]: domain } : {}
|
|
711
748
|
};
|
|
712
749
|
}
|
|
713
750
|
/** An address reduced to the origin a browser compares against. */
|
|
@@ -715,7 +752,7 @@ function originOf(address) {
|
|
|
715
752
|
try {
|
|
716
753
|
return new URL(address).origin;
|
|
717
754
|
} catch {
|
|
718
|
-
return
|
|
755
|
+
return;
|
|
719
756
|
}
|
|
720
757
|
}
|
|
721
758
|
/**
|
|
@@ -746,7 +783,7 @@ function ownerUrl(resource, plan, ports, project) {
|
|
|
746
783
|
if (!resource.container) return void 0;
|
|
747
784
|
const port = ports[primaryPortKey(resource.container)];
|
|
748
785
|
if (port === void 0) return void 0;
|
|
749
|
-
const owner = (0,
|
|
786
|
+
const owner = (0, _geekmidas_db_pg_roles.ownerRole)(localRole(resource));
|
|
750
787
|
return postgres(port, rootDatabase(resource, plan), {
|
|
751
788
|
user: owner,
|
|
752
789
|
password: localRolePassword(project, plan, owner)
|
|
@@ -796,7 +833,7 @@ function urlFor(resource, plan, ports, project, addresses = {}) {
|
|
|
796
833
|
const schema = schemaOf(resource, plan);
|
|
797
834
|
return schema ? `${postgres(port, database)}?search_path=${schema}` : postgres(port, database);
|
|
798
835
|
}
|
|
799
|
-
const role = resource.kind === "database-reader" ? (0,
|
|
836
|
+
const role = resource.kind === "database-reader" ? (0, _geekmidas_db_pg_roles.readerRole)(parentRole(resource, plan)) : localRole(resource);
|
|
800
837
|
return postgres(port, database, {
|
|
801
838
|
user: role,
|
|
802
839
|
password: localRolePassword(project, plan, role)
|
|
@@ -813,7 +850,7 @@ function urlFor(resource, plan, ports, project, addresses = {}) {
|
|
|
813
850
|
if (resource.of) {
|
|
814
851
|
const parent = plan.resources.find((r) => r.id === resource.of);
|
|
815
852
|
const url = parent ? urlFor(parent, plan, ports, project, addresses) : void 0;
|
|
816
|
-
return url ? withTable(url, resource.table ?? (0,
|
|
853
|
+
return url ? withTable(url, resource.table ?? (0, _geekmidas_manifest.cacheTable)(resource.id)) : void 0;
|
|
817
854
|
}
|
|
818
855
|
switch (plan.cache) {
|
|
819
856
|
case "elasticache": return `redis://${LOCAL_HOST}:${port}`;
|
|
@@ -821,7 +858,7 @@ function urlFor(resource, plan, ports, project, addresses = {}) {
|
|
|
821
858
|
}
|
|
822
859
|
case "queue":
|
|
823
860
|
case "topic": return broker(plan, port);
|
|
824
|
-
default: return
|
|
861
|
+
default: return;
|
|
825
862
|
}
|
|
826
863
|
}
|
|
827
864
|
/**
|
|
@@ -912,7 +949,6 @@ function schemaOf(resource, plan) {
|
|
|
912
949
|
if (current.kind === "database-schema") return current.schema;
|
|
913
950
|
current = current.of ? byId.get(current.of) : void 0;
|
|
914
951
|
}
|
|
915
|
-
return void 0;
|
|
916
952
|
}
|
|
917
953
|
/**
|
|
918
954
|
* A backend whose local addresses cannot be derived yet.
|
|
@@ -922,6 +958,7 @@ function schemaOf(resource, plan) {
|
|
|
922
958
|
* lands, saying so is better than handing out a string that fails on first use.
|
|
923
959
|
*/
|
|
924
960
|
var UnprovisionedEventsBackend = class extends Error {
|
|
961
|
+
backend;
|
|
925
962
|
constructor(backend) {
|
|
926
963
|
super(`The local target cannot derive addresses for '${backend}' yet — its topics and queues are named by ARN, which nothing creates locally. Use 'pgboss' (the default) or 'rabbitmq' for local development.`);
|
|
927
964
|
this.backend = backend;
|
|
@@ -939,9 +976,27 @@ var UnprovisionedEventsBackend = class extends Error {
|
|
|
939
976
|
function localSecret(project, plan, resource) {
|
|
940
977
|
return (0, node_crypto.createHash)("sha256").update(`${project}:${plan.stage}:${resource.id}`).digest("base64url").slice(0, 43);
|
|
941
978
|
}
|
|
942
|
-
|
|
943
979
|
//#endregion
|
|
944
980
|
//#region src/reconcile/apps.ts
|
|
981
|
+
/**
|
|
982
|
+
* The apps, as services beside the containers their constructs derive.
|
|
983
|
+
*
|
|
984
|
+
* `gkm docker` used to write these by hand: every backend got
|
|
985
|
+
* `DATABASE_URL=postgresql://…@postgres:5432/app` and `REDIS_URL=redis://redis`,
|
|
986
|
+
* which was right only for a project whose single database happened to be
|
|
987
|
+
* called `Database` — an `Orders` database publishes `ORDERS_URL`, a schema
|
|
988
|
+
* tenant has a URL of its own, and buckets and mail were not wired at all.
|
|
989
|
+
*
|
|
990
|
+
* Now an app's environment is exactly what reconcile hands `gkm dev`: every key
|
|
991
|
+
* the declared constructs provide, from the same derivation. The only
|
|
992
|
+
* difference is where the addresses point — at the containers by service name
|
|
993
|
+
* on the compose network, rather than at `localhost` on the ports published for
|
|
994
|
+
* the host.
|
|
995
|
+
*
|
|
996
|
+
* Always from the *local* stage's plan, whichever stage is being reconciled:
|
|
997
|
+
* `gkm test` rewrites the same file, and running the tests must not quietly
|
|
998
|
+
* point these apps at the test databases.
|
|
999
|
+
*/
|
|
945
1000
|
/** The profile app services carry, so `gkm dev` starts only the containers. */
|
|
946
1001
|
const APPS_PROFILE = "apps";
|
|
947
1002
|
/**
|
|
@@ -962,7 +1017,7 @@ function dockerfileOf(appName, path) {
|
|
|
962
1017
|
* rewritten to `<container>:<inside>`.
|
|
963
1018
|
*/
|
|
964
1019
|
function inNetworkEnv(workspace, manifest) {
|
|
965
|
-
const plan = planFor(manifest, workspace.stages.local, (0,
|
|
1020
|
+
const plan = planFor(manifest, workspace.stages.local, (0, _geekmidas_manifest.provisionOrder)(manifest), {
|
|
966
1021
|
localStage: workspace.stages.local,
|
|
967
1022
|
...backendsOf(workspace)
|
|
968
1023
|
});
|
|
@@ -1023,9 +1078,18 @@ function appServices(workspace, manifest, containers) {
|
|
|
1023
1078
|
}
|
|
1024
1079
|
return services;
|
|
1025
1080
|
}
|
|
1026
|
-
|
|
1027
1081
|
//#endregion
|
|
1028
1082
|
//#region src/reconcile/clients.ts
|
|
1083
|
+
/**
|
|
1084
|
+
* The real Postgres and MinIO clients the applier runs against.
|
|
1085
|
+
*
|
|
1086
|
+
* Kept apart from `provision.ts` so the rules there — what gets created, in what
|
|
1087
|
+
* order, and never dropping anything — are asserted against fakes, while the
|
|
1088
|
+
* drivers live here where there is nothing to assert but wiring.
|
|
1089
|
+
*
|
|
1090
|
+
* Both are constructed from the same local addresses the env writer composes,
|
|
1091
|
+
* so the applier cannot end up talking to a different container than the app.
|
|
1092
|
+
*/
|
|
1029
1093
|
/** The credential local containers are brought up with. */
|
|
1030
1094
|
const LOCAL_USER$1 = "geekmidas";
|
|
1031
1095
|
/**
|
|
@@ -1046,8 +1110,7 @@ function pgClient(port) {
|
|
|
1046
1110
|
});
|
|
1047
1111
|
await client.connect();
|
|
1048
1112
|
try {
|
|
1049
|
-
|
|
1050
|
-
return result.rows;
|
|
1113
|
+
return (await client.query(sql, values)).rows;
|
|
1051
1114
|
} finally {
|
|
1052
1115
|
await client.end();
|
|
1053
1116
|
}
|
|
@@ -1055,7 +1118,7 @@ function pgClient(port) {
|
|
|
1055
1118
|
}
|
|
1056
1119
|
/** A bucket client pointed at the local MinIO. */
|
|
1057
1120
|
function bucketClient(port) {
|
|
1058
|
-
const s3 = new
|
|
1121
|
+
const s3 = new _aws_sdk_client_s3.S3Client({
|
|
1059
1122
|
region: "us-east-1",
|
|
1060
1123
|
endpoint: `http://localhost:${port}`,
|
|
1061
1124
|
forcePathStyle: true,
|
|
@@ -1067,34 +1130,48 @@ function bucketClient(port) {
|
|
|
1067
1130
|
return {
|
|
1068
1131
|
async exists(bucket) {
|
|
1069
1132
|
try {
|
|
1070
|
-
await s3.send(new
|
|
1133
|
+
await s3.send(new _aws_sdk_client_s3.HeadBucketCommand({ Bucket: bucket }));
|
|
1071
1134
|
return true;
|
|
1072
1135
|
} catch {
|
|
1073
1136
|
return false;
|
|
1074
1137
|
}
|
|
1075
1138
|
},
|
|
1076
1139
|
async create(bucket) {
|
|
1077
|
-
await s3.send(new
|
|
1140
|
+
await s3.send(new _aws_sdk_client_s3.CreateBucketCommand({ Bucket: bucket }));
|
|
1078
1141
|
},
|
|
1079
1142
|
async policy(bucket) {
|
|
1080
1143
|
try {
|
|
1081
|
-
|
|
1082
|
-
return result.Policy;
|
|
1144
|
+
return (await s3.send(new _aws_sdk_client_s3.GetBucketPolicyCommand({ Bucket: bucket }))).Policy;
|
|
1083
1145
|
} catch {
|
|
1084
|
-
return
|
|
1146
|
+
return;
|
|
1085
1147
|
}
|
|
1086
1148
|
},
|
|
1087
1149
|
async setPolicy(bucket, policy) {
|
|
1088
|
-
await s3.send(new
|
|
1150
|
+
await s3.send(new _aws_sdk_client_s3.PutBucketPolicyCommand({
|
|
1089
1151
|
Bucket: bucket,
|
|
1090
1152
|
Policy: policy
|
|
1091
1153
|
}));
|
|
1092
1154
|
}
|
|
1093
1155
|
};
|
|
1094
1156
|
}
|
|
1095
|
-
|
|
1096
1157
|
//#endregion
|
|
1097
1158
|
//#region src/reconcile/compose.ts
|
|
1159
|
+
/**
|
|
1160
|
+
* The compose document a plan implies.
|
|
1161
|
+
*
|
|
1162
|
+
* The third declaration of the same containers disappears here: today a
|
|
1163
|
+
* `services: ['postgres','minio']` block is kept in step with the code by hand,
|
|
1164
|
+
* which is the triplication this design exists to remove, in the one place you
|
|
1165
|
+
* touch every day. A `database` implies Postgres; the list is derived.
|
|
1166
|
+
*
|
|
1167
|
+
* Returns an object rather than a string for the same reason `plan` is pure —
|
|
1168
|
+
* what should exist is asserted as data, and turning it into YAML is one line at
|
|
1169
|
+
* the edge.
|
|
1170
|
+
*
|
|
1171
|
+
* What stays config is unchanged: images and versions are pinned explicitly, and
|
|
1172
|
+
* a container no construct implies is still declared by hand. Neutral facts come
|
|
1173
|
+
* from the declaration, provider detail from config.
|
|
1174
|
+
*/
|
|
1098
1175
|
/** The credential every derived container is brought up with locally. */
|
|
1099
1176
|
const LOCAL_USER = "geekmidas";
|
|
1100
1177
|
/**
|
|
@@ -1355,9 +1432,18 @@ var UnassignedPort = class extends Error {
|
|
|
1355
1432
|
this.key = key;
|
|
1356
1433
|
}
|
|
1357
1434
|
};
|
|
1358
|
-
|
|
1359
1435
|
//#endregion
|
|
1360
1436
|
//#region src/reconcile/docker.ts
|
|
1437
|
+
/**
|
|
1438
|
+
* The real Docker, behind the small interface reconcile needs.
|
|
1439
|
+
*
|
|
1440
|
+
* Shells out to `docker compose` rather than talking to the daemon socket: it is
|
|
1441
|
+
* what a developer runs by hand when something is wrong, so the two cannot
|
|
1442
|
+
* disagree, and it keeps Docker out of this package's dependencies.
|
|
1443
|
+
*
|
|
1444
|
+
* Every call is scoped to the generated compose file. Nothing here can touch a
|
|
1445
|
+
* container this project did not generate.
|
|
1446
|
+
*/
|
|
1361
1447
|
const run = (0, node_util.promisify)(node_child_process.execFile);
|
|
1362
1448
|
/**
|
|
1363
1449
|
* The generated file, then the project's own if it has one.
|
|
@@ -1388,7 +1474,7 @@ const dockerCli = {
|
|
|
1388
1474
|
const port = Number(stdout.trim().split(":").pop());
|
|
1389
1475
|
return Number.isFinite(port) && port > 0 ? port : void 0;
|
|
1390
1476
|
} catch {
|
|
1391
|
-
return
|
|
1477
|
+
return;
|
|
1392
1478
|
}
|
|
1393
1479
|
},
|
|
1394
1480
|
async up(composePath, services) {
|
|
@@ -1440,8 +1526,7 @@ const dockerCli = {
|
|
|
1440
1526
|
const running = /* @__PURE__ */ new Set();
|
|
1441
1527
|
for (const line of stdout.trim().split("\n").filter(Boolean)) {
|
|
1442
1528
|
const entry = JSON.parse(line);
|
|
1443
|
-
|
|
1444
|
-
if (ok && entry.Service) running.add(entry.Service);
|
|
1529
|
+
if (entry.State === "running" && (entry.Health === void 0 || entry.Health === "" || entry.Health === "healthy") && entry.Service) running.add(entry.Service);
|
|
1445
1530
|
}
|
|
1446
1531
|
return services.every((service) => running.has(service));
|
|
1447
1532
|
} catch {
|
|
@@ -1449,10 +1534,27 @@ const dockerCli = {
|
|
|
1449
1534
|
}
|
|
1450
1535
|
}
|
|
1451
1536
|
};
|
|
1452
|
-
|
|
1453
1537
|
//#endregion
|
|
1454
1538
|
//#region src/reconcile/ports.ts
|
|
1455
1539
|
/**
|
|
1540
|
+
* Port allocation — why two projects can run at once.
|
|
1541
|
+
*
|
|
1542
|
+
* Publishing `5432:5432` means the second project on your machine cannot start.
|
|
1543
|
+
* Nothing solves that except giving each project its own ports, and what makes
|
|
1544
|
+
* it *possible* is the single-`<NAME>_URL` rule: an app reads `ORDERS_URL` and
|
|
1545
|
+
* never sees a host or a port, so reconcile is free to bind whatever is
|
|
1546
|
+
* available and compose the URL from what it bound. An app reading `DB_HOST` and
|
|
1547
|
+
* `DB_PORT` separately could not be moved this way.
|
|
1548
|
+
*
|
|
1549
|
+
* Assignments are **persisted, not recomputed**. Recomputing means adding a
|
|
1550
|
+
* construct renumbers its neighbours, and every running container, saved
|
|
1551
|
+
* connection string, and `psql` history goes stale at once.
|
|
1552
|
+
*
|
|
1553
|
+
* Pure, with the liveness probe injected — a collision with another project's
|
|
1554
|
+
* stack is a fact about the machine, and keeping it a parameter is what lets the
|
|
1555
|
+
* rules be asserted without binding a socket.
|
|
1556
|
+
*/
|
|
1557
|
+
/**
|
|
1456
1558
|
* The window ports are drawn from.
|
|
1457
1559
|
*
|
|
1458
1560
|
* Above the registered range so nothing here needs privileges, and below the
|
|
@@ -1550,17 +1652,33 @@ async function nextFree(from, taken, probe) {
|
|
|
1550
1652
|
* rather than as a connection failure ten minutes later.
|
|
1551
1653
|
*/
|
|
1552
1654
|
function isPortFree(port) {
|
|
1553
|
-
return new Promise((resolve
|
|
1655
|
+
return new Promise((resolve) => {
|
|
1554
1656
|
const server = (0, node_net.createServer)();
|
|
1555
|
-
server.once("error", () => resolve
|
|
1556
|
-
server.once("listening", () => server.close(() => resolve
|
|
1657
|
+
server.once("error", () => resolve(false));
|
|
1658
|
+
server.once("listening", () => server.close(() => resolve(true)));
|
|
1557
1659
|
server.listen(port, "0.0.0.0");
|
|
1558
1660
|
});
|
|
1559
1661
|
}
|
|
1560
|
-
|
|
1561
1662
|
//#endregion
|
|
1562
1663
|
//#region src/reconcile/provision.ts
|
|
1563
1664
|
/**
|
|
1665
|
+
* Creating what the URLs name.
|
|
1666
|
+
*
|
|
1667
|
+
* Convergent and idempotent: every statement asks whether the thing exists
|
|
1668
|
+
* first, so reconciling repeatedly is free and a half-applied run recovers by
|
|
1669
|
+
* being run again. That property is what lets `gkm dev` do this on every start.
|
|
1670
|
+
*
|
|
1671
|
+
* The line the design draws is at data, not at side effects — this creates
|
|
1672
|
+
* databases, schemas, and buckets, and it never seeds, resets, or drops. A
|
|
1673
|
+
* developer who wants their data gone asks for it explicitly.
|
|
1674
|
+
*
|
|
1675
|
+
* Statement generation is separated from application for the reason the design
|
|
1676
|
+
* gives: the same DDL has to run in-process locally and from a provisioner in a
|
|
1677
|
+
* VPC, and one implementation is what stops "works locally, fails deployed".
|
|
1678
|
+
* When the role DDL lands in `@geekmidas/db` this delegates to it rather than
|
|
1679
|
+
* growing its own.
|
|
1680
|
+
*/
|
|
1681
|
+
/**
|
|
1564
1682
|
* The Postgres work a plan implies.
|
|
1565
1683
|
*
|
|
1566
1684
|
* Databases before the schemas inside them, which `provisionOrder` already
|
|
@@ -1611,9 +1729,9 @@ function postgresStatements(plan, project = "") {
|
|
|
1611
1729
|
function cacheTableDdl(cache, home, plan) {
|
|
1612
1730
|
const database = rootDatabase(home, plan);
|
|
1613
1731
|
const schema = home.roles === false ? void 0 : home.schema;
|
|
1614
|
-
const name = cache.table ?? (0,
|
|
1732
|
+
const name = cache.table ?? (0, _geekmidas_manifest.cacheTable)(cache.id);
|
|
1615
1733
|
const table = schema ? `${schema}.${name}` : name;
|
|
1616
|
-
const created = (0,
|
|
1734
|
+
const created = (0, _geekmidas_cache_postgres.cacheTableStatements)({ table }).map((statement) => ({
|
|
1617
1735
|
id: cache.id,
|
|
1618
1736
|
describe: statement.describe,
|
|
1619
1737
|
database,
|
|
@@ -1622,7 +1740,7 @@ function cacheTableDdl(cache, home, plan) {
|
|
|
1622
1740
|
}));
|
|
1623
1741
|
if (!schema) return created;
|
|
1624
1742
|
const runtime = localRole(home);
|
|
1625
|
-
const owner = (0,
|
|
1743
|
+
const owner = (0, _geekmidas_db_pg_roles.ownerRole)(runtime);
|
|
1626
1744
|
const qualified = table.split(".").map((part) => quoteIdentifier(part)).join(".");
|
|
1627
1745
|
return [
|
|
1628
1746
|
...created,
|
|
@@ -1650,9 +1768,9 @@ function cacheTableDdl(cache, home, plan) {
|
|
|
1650
1768
|
function rolesFor(resource, schema, plan, project) {
|
|
1651
1769
|
if (resource.roles === false) return [];
|
|
1652
1770
|
const runtime = localRole(resource);
|
|
1653
|
-
const owner = (0,
|
|
1654
|
-
const reader = plan.resources.some((r) => r.kind === "database-reader" && r.of === resource.id) ? (0,
|
|
1655
|
-
return (0,
|
|
1771
|
+
const owner = (0, _geekmidas_db_pg_roles.ownerRole)(runtime);
|
|
1772
|
+
const reader = plan.resources.some((r) => r.kind === "database-reader" && r.of === resource.id) ? (0, _geekmidas_db_pg_roles.readerRole)(runtime) : void 0;
|
|
1773
|
+
return (0, _geekmidas_db_pg_roles.roleStatements)({
|
|
1656
1774
|
runtime,
|
|
1657
1775
|
owner,
|
|
1658
1776
|
...reader ? { reader } : {},
|
|
@@ -1702,8 +1820,7 @@ async function applyPostgres(client, statements) {
|
|
|
1702
1820
|
});
|
|
1703
1821
|
continue;
|
|
1704
1822
|
}
|
|
1705
|
-
|
|
1706
|
-
if (rows.length > 0) {
|
|
1823
|
+
if ((await client.query(statement.database, statement.exists.sql, statement.exists.values)).length > 0) {
|
|
1707
1824
|
applied.push({
|
|
1708
1825
|
id: statement.id,
|
|
1709
1826
|
describe: statement.describe,
|
|
@@ -1828,9 +1945,20 @@ async function applyBuckets(client, buckets) {
|
|
|
1828
1945
|
}
|
|
1829
1946
|
return applied;
|
|
1830
1947
|
}
|
|
1831
|
-
|
|
1832
1948
|
//#endregion
|
|
1833
1949
|
//#region src/reconcile/state.ts
|
|
1950
|
+
/**
|
|
1951
|
+
* What reconcile records, and the hash that lets it do nothing.
|
|
1952
|
+
*
|
|
1953
|
+
* Reconciling on every `gkm dev` is only acceptable if the converged case is
|
|
1954
|
+
* free, so the desired plan is hashed: matching hash plus healthy containers
|
|
1955
|
+
* means there is nothing to do. Without that, the automatic reconcile the design
|
|
1956
|
+
* asks for would tax every start.
|
|
1957
|
+
*
|
|
1958
|
+
* Almost nothing needs recording — roles are queried, migrations have their own
|
|
1959
|
+
* table, containers are remembered by Docker. Only ports and this hash have no
|
|
1960
|
+
* other owner.
|
|
1961
|
+
*/
|
|
1834
1962
|
const STATE_DIR = ".gkm/reconcile";
|
|
1835
1963
|
/**
|
|
1836
1964
|
* The hash of everything a reconcile would act on.
|
|
@@ -1859,7 +1987,7 @@ async function loadState(root, stage) {
|
|
|
1859
1987
|
const state = JSON.parse(raw);
|
|
1860
1988
|
return state.stage === stage ? state : void 0;
|
|
1861
1989
|
} catch {
|
|
1862
|
-
return
|
|
1990
|
+
return;
|
|
1863
1991
|
}
|
|
1864
1992
|
}
|
|
1865
1993
|
/** Record what was applied, so the next run can skip it. */
|
|
@@ -1871,10 +1999,28 @@ async function saveState(root, state) {
|
|
|
1871
1999
|
function statePath(root, stage) {
|
|
1872
2000
|
return (0, node_path.join)(root, STATE_DIR, `${stage}.json`);
|
|
1873
2001
|
}
|
|
1874
|
-
|
|
1875
2002
|
//#endregion
|
|
1876
2003
|
//#region src/reconcile/index.ts
|
|
1877
2004
|
/**
|
|
2005
|
+
* Reconcile — the one convergent function `gkm dev`, `gkm test`, and `gkm setup`
|
|
2006
|
+
* all call.
|
|
2007
|
+
*
|
|
2008
|
+
* Three phases, and only this one has side effects: declaring is pure (`gkm
|
|
2009
|
+
* build` and the dev watcher), running reads `<NAME>_URL` and provisions
|
|
2010
|
+
* nothing. Reconcile computes the desired state, compares, and applies the
|
|
2011
|
+
* difference — which is what makes "when does it run" answerable with
|
|
2012
|
+
* *whenever, repeatedly*.
|
|
2013
|
+
*
|
|
2014
|
+
* It is safe to run automatically because its blast radius is entirely local:
|
|
2015
|
+
* this project's containers, this project's `.gkm/`. Nothing it does can reach a
|
|
2016
|
+
* cloud. The line is drawn at data, not at side effects — it allocates ports,
|
|
2017
|
+
* writes compose, starts containers, and creates roles; it never seeds, resets,
|
|
2018
|
+
* or drops.
|
|
2019
|
+
*
|
|
2020
|
+
* Docker is injected rather than imported so the rules above can be asserted
|
|
2021
|
+
* without a daemon. The default implementation is the real one.
|
|
2022
|
+
*/
|
|
2023
|
+
/**
|
|
1878
2024
|
* Where the generated compose file is written, relative to the project root.
|
|
1879
2025
|
*
|
|
1880
2026
|
* At the root, beside the project's own `docker-compose.yml`, because the two
|
|
@@ -1919,7 +2065,7 @@ const CADDY_ROOT_IN_CONTAINER = "/data/caddy/pki/authorities/local/root.crt";
|
|
|
1919
2065
|
*/
|
|
1920
2066
|
async function reconcile(options) {
|
|
1921
2067
|
const { root, project, manifest, stage, start = true, provision = true, docker = dockerCli, probe = isPortFree, sql = pgClient, buckets = bucketClient } = options;
|
|
1922
|
-
const plan = planFor(manifest, stage, (0,
|
|
2068
|
+
const plan = planFor(manifest, stage, (0, _geekmidas_manifest.provisionOrder)(manifest), {
|
|
1923
2069
|
localStage: options.localStage,
|
|
1924
2070
|
events: options.events,
|
|
1925
2071
|
cache: options.cache,
|
|
@@ -1958,9 +2104,7 @@ async function reconcile(options) {
|
|
|
1958
2104
|
hash,
|
|
1959
2105
|
changed: false
|
|
1960
2106
|
};
|
|
1961
|
-
|
|
1962
|
-
const converged = recorded?.hash === hash && (0, node_fs.existsSync)(composePath) && (!start || await docker.healthy(composePath, plan.containers));
|
|
1963
|
-
if (converged) return result;
|
|
2107
|
+
if ((await loadState(root, stage))?.hash === hash && (0, node_fs.existsSync)(composePath) && (!start || await docker.healthy(composePath, plan.containers))) return result;
|
|
1964
2108
|
await write(composePath, toYaml(compose));
|
|
1965
2109
|
if (plan.containers.includes("caddy")) {
|
|
1966
2110
|
await write((0, node_path.join)(root, CADDYFILE_PATH), caddyfileRoot());
|
|
@@ -2037,10 +2181,28 @@ async function write(path, content) {
|
|
|
2037
2181
|
await (0, node_fs_promises.mkdir)((0, node_path.dirname)(path), { recursive: true });
|
|
2038
2182
|
await (0, node_fs_promises.writeFile)(path, content);
|
|
2039
2183
|
}
|
|
2040
|
-
|
|
2041
2184
|
//#endregion
|
|
2042
2185
|
//#region src/reconcile/workspace.ts
|
|
2043
2186
|
/**
|
|
2187
|
+
* Workspace config → reconcile.
|
|
2188
|
+
*
|
|
2189
|
+
* Nothing here is read from a `services:` block — there is none. Which
|
|
2190
|
+
* containers exist comes from the manifest; which backend a cache or a broker
|
|
2191
|
+
* resolves to comes from the deploy target; and an image pin is the project's
|
|
2192
|
+
* own `docker-compose.yml`, merged over the generated file.
|
|
2193
|
+
*
|
|
2194
|
+
* Shared by `gkm setup`, `gkm dev`, and `gkm test` so all three converge on the
|
|
2195
|
+
* same state, differing only in the stage they pass.
|
|
2196
|
+
*/
|
|
2197
|
+
var workspace_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
2198
|
+
backendsOf: () => backendsOf,
|
|
2199
|
+
constructGlobs: () => constructGlobs,
|
|
2200
|
+
derivedContainers: () => derivedContainers,
|
|
2201
|
+
reconcileWorkspace: () => reconcileWorkspace,
|
|
2202
|
+
surfaceAddresses: () => surfaceAddresses,
|
|
2203
|
+
usesConstructs: () => usesConstructs
|
|
2204
|
+
});
|
|
2205
|
+
/**
|
|
2044
2206
|
* Every constructs glob in the workspace, resolved against its app.
|
|
2045
2207
|
*
|
|
2046
2208
|
* Absolute because discovery globs from a single cwd while apps live in
|
|
@@ -2076,7 +2238,7 @@ async function derivedContainers(workspace, stage, manifest) {
|
|
|
2076
2238
|
patterns: constructGlobs(workspace),
|
|
2077
2239
|
cwd: workspace.root
|
|
2078
2240
|
});
|
|
2079
|
-
return planFor(found, stage, (0,
|
|
2241
|
+
return planFor(found, stage, (0, _geekmidas_manifest.provisionOrder)(found), {
|
|
2080
2242
|
localStage: workspace.stages.local,
|
|
2081
2243
|
...backendsOf(workspace)
|
|
2082
2244
|
}).containers;
|
|
@@ -2127,22 +2289,16 @@ function surfaceAddresses(workspace, manifest, at = (_app, port) => localAddress
|
|
|
2127
2289
|
const addresses = {};
|
|
2128
2290
|
for (const [id, declaration] of Object.entries(manifest)) {
|
|
2129
2291
|
if (declaration.kind !== "rest-api" && declaration.kind !== "site") continue;
|
|
2130
|
-
const host =
|
|
2131
|
-
const
|
|
2132
|
-
if (
|
|
2292
|
+
const host = require_config.appKey(id);
|
|
2293
|
+
const port = workspace.apps[host]?.port;
|
|
2294
|
+
if (port) addresses[id] = at(host, port);
|
|
2133
2295
|
}
|
|
2134
2296
|
return addresses;
|
|
2135
2297
|
}
|
|
2136
|
-
/** The app key serving a surface, following a mount to its host. */
|
|
2137
|
-
function appKeyOfHost(manifest, id) {
|
|
2138
|
-
const host = require_config.hostOf(manifest, id);
|
|
2139
|
-
return host ? require_config.appKey(host) : void 0;
|
|
2140
|
-
}
|
|
2141
2298
|
/** Where a local process answers, given the port the workspace gave it. */
|
|
2142
2299
|
function localAddress(port) {
|
|
2143
2300
|
return `http://localhost:${port}`;
|
|
2144
2301
|
}
|
|
2145
|
-
|
|
2146
2302
|
//#endregion
|
|
2147
2303
|
//#region src/credentials/index.ts
|
|
2148
2304
|
const logger = console;
|
|
@@ -2175,15 +2331,15 @@ function loadEnvFiles(envConfig, cwd = process.cwd()) {
|
|
|
2175
2331
|
* @internal Exported for testing
|
|
2176
2332
|
*/
|
|
2177
2333
|
async function isPortAvailable(port) {
|
|
2178
|
-
return new Promise((resolve
|
|
2334
|
+
return new Promise((resolve) => {
|
|
2179
2335
|
const server = (0, node_net.createServer)();
|
|
2180
2336
|
server.once("error", (err) => {
|
|
2181
|
-
if (err.code === "EADDRINUSE") resolve
|
|
2182
|
-
else resolve
|
|
2337
|
+
if (err.code === "EADDRINUSE") resolve(false);
|
|
2338
|
+
else resolve(false);
|
|
2183
2339
|
});
|
|
2184
2340
|
server.once("listening", () => {
|
|
2185
2341
|
server.close();
|
|
2186
|
-
resolve
|
|
2342
|
+
resolve(true);
|
|
2187
2343
|
});
|
|
2188
2344
|
server.listen(port);
|
|
2189
2345
|
});
|
|
@@ -2252,11 +2408,10 @@ async function savePortState(workspaceRoot, ports) {
|
|
|
2252
2408
|
*/
|
|
2253
2409
|
function getContainerHostPort(workspaceRoot, service, containerPort) {
|
|
2254
2410
|
try {
|
|
2255
|
-
const
|
|
2411
|
+
const match = (0, node_child_process.execSync)(`docker compose port ${service} ${containerPort}`, {
|
|
2256
2412
|
cwd: workspaceRoot,
|
|
2257
2413
|
stdio: "pipe"
|
|
2258
|
-
}).toString().trim();
|
|
2259
|
-
const match = result.match(/:(\d+)$/);
|
|
2414
|
+
}).toString().trim().match(/:(\d+)$/);
|
|
2260
2415
|
return match ? Number(match[1]) : null;
|
|
2261
2416
|
} catch {
|
|
2262
2417
|
return null;
|
|
@@ -2269,8 +2424,7 @@ function getContainerHostPort(workspaceRoot, service, containerPort) {
|
|
|
2269
2424
|
* @internal Exported for testing
|
|
2270
2425
|
*/
|
|
2271
2426
|
async function resolveServicePorts(workspaceRoot) {
|
|
2272
|
-
const
|
|
2273
|
-
const mappings = parseComposePortMappings(composePath);
|
|
2427
|
+
const mappings = parseComposePortMappings((0, node_path.join)(workspaceRoot, "docker-compose.yml"));
|
|
2274
2428
|
if (mappings.length === 0) return {
|
|
2275
2429
|
dockerEnv: {},
|
|
2276
2430
|
ports: {},
|
|
@@ -2504,13 +2658,12 @@ ${generateCredentialsInjection(secretsJsonPath)}`;
|
|
|
2504
2658
|
* @internal Exported for testing
|
|
2505
2659
|
*/
|
|
2506
2660
|
async function createEntryWrapper(wrapperPath, entryPath, secretsJsonPath) {
|
|
2507
|
-
const credentialsInjection = secretsJsonPath ? `${generateCredentialsInjection(secretsJsonPath)}
|
|
2508
|
-
` : "";
|
|
2509
2661
|
const content = `#!/usr/bin/env node
|
|
2510
2662
|
/**
|
|
2511
2663
|
* Entry wrapper generated by 'gkm dev --entry'
|
|
2512
2664
|
*/
|
|
2513
|
-
${
|
|
2665
|
+
${secretsJsonPath ? `${generateCredentialsInjection(secretsJsonPath)}
|
|
2666
|
+
` : ""}// Import and run the user's entry file (dynamic import ensures secrets load first)
|
|
2514
2667
|
await import('${entryPath}');
|
|
2515
2668
|
`;
|
|
2516
2669
|
await (0, node_fs_promises.writeFile)(wrapperPath, content);
|
|
@@ -2550,8 +2703,8 @@ async function prepareEntryCredentials(options) {
|
|
|
2550
2703
|
credentials.PORT = String(resolvedPort);
|
|
2551
2704
|
const declaredKeys = [];
|
|
2552
2705
|
if (appInfo && usesConstructs(appInfo.workspace)) {
|
|
2553
|
-
const { reconcileWorkspace
|
|
2554
|
-
const reconciled = await reconcileWorkspace
|
|
2706
|
+
const { reconcileWorkspace } = await Promise.resolve().then(() => workspace_exports);
|
|
2707
|
+
const reconciled = await reconcileWorkspace(appInfo.workspace, {
|
|
2555
2708
|
stage: options.reconcileStage ?? appInfo.workspace.stages.local,
|
|
2556
2709
|
start: options.startDocker ?? false
|
|
2557
2710
|
});
|
|
@@ -2559,8 +2712,7 @@ async function prepareEntryCredentials(options) {
|
|
|
2559
2712
|
declaredKeys.push(...Object.keys(reconciled.env));
|
|
2560
2713
|
if (Object.keys(reconciled.env).length > 0) logger.log(`🔌 Resolved ${Object.keys(reconciled.env).length} declared URL(s)`);
|
|
2561
2714
|
} else {
|
|
2562
|
-
const
|
|
2563
|
-
const mappings = parseComposePortMappings(composePath);
|
|
2715
|
+
const mappings = parseComposePortMappings((0, node_path.join)(secretsRoot, "docker-compose.yml"));
|
|
2564
2716
|
if (mappings.length > 0) {
|
|
2565
2717
|
let resolvedPorts;
|
|
2566
2718
|
if (portMode === "full") resolvedPorts = await resolveServicePorts(secretsRoot);
|
|
@@ -2581,8 +2733,10 @@ async function prepareEntryCredentials(options) {
|
|
|
2581
2733
|
mappings
|
|
2582
2734
|
};
|
|
2583
2735
|
}
|
|
2584
|
-
if (options.startDocker)
|
|
2585
|
-
|
|
2736
|
+
if (options.startDocker) {
|
|
2737
|
+
if (appInfo) await startWorkspaceServices(appInfo.workspace, resolvedPorts.dockerEnv, credentials);
|
|
2738
|
+
else await startComposeServices(secretsRoot, resolvedPorts.dockerEnv, credentials);
|
|
2739
|
+
}
|
|
2586
2740
|
if (Object.keys(resolvedPorts.ports).length > 0) {
|
|
2587
2741
|
const rewritten = rewriteUrlsWithPorts(credentials, resolvedPorts);
|
|
2588
2742
|
Object.assign(credentials, rewritten);
|
|
@@ -2620,150 +2774,144 @@ async function prepareEntryCredentials(options) {
|
|
|
2620
2774
|
declaredKeys
|
|
2621
2775
|
};
|
|
2622
2776
|
}
|
|
2623
|
-
|
|
2624
2777
|
//#endregion
|
|
2625
|
-
Object.defineProperty(exports,
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
});
|
|
2631
|
-
Object.defineProperty(exports, 'LOCAL_CA_PATH', {
|
|
2632
|
-
enumerable: true,
|
|
2633
|
-
get: function () {
|
|
2634
|
-
return LOCAL_CA_PATH;
|
|
2635
|
-
}
|
|
2778
|
+
Object.defineProperty(exports, "COMPOSE_PATH", {
|
|
2779
|
+
enumerable: true,
|
|
2780
|
+
get: function() {
|
|
2781
|
+
return COMPOSE_PATH;
|
|
2782
|
+
}
|
|
2636
2783
|
});
|
|
2637
|
-
Object.defineProperty(exports,
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2784
|
+
Object.defineProperty(exports, "LOCAL_CA_PATH", {
|
|
2785
|
+
enumerable: true,
|
|
2786
|
+
get: function() {
|
|
2787
|
+
return LOCAL_CA_PATH;
|
|
2788
|
+
}
|
|
2642
2789
|
});
|
|
2643
|
-
Object.defineProperty(exports,
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2790
|
+
Object.defineProperty(exports, "applyPostgres", {
|
|
2791
|
+
enumerable: true,
|
|
2792
|
+
get: function() {
|
|
2793
|
+
return applyPostgres;
|
|
2794
|
+
}
|
|
2648
2795
|
});
|
|
2649
|
-
Object.defineProperty(exports,
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2796
|
+
Object.defineProperty(exports, "cacheBackendFor", {
|
|
2797
|
+
enumerable: true,
|
|
2798
|
+
get: function() {
|
|
2799
|
+
return cacheBackendFor;
|
|
2800
|
+
}
|
|
2654
2801
|
});
|
|
2655
|
-
Object.defineProperty(exports,
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2802
|
+
Object.defineProperty(exports, "constructGlobs", {
|
|
2803
|
+
enumerable: true,
|
|
2804
|
+
get: function() {
|
|
2805
|
+
return constructGlobs;
|
|
2806
|
+
}
|
|
2660
2807
|
});
|
|
2661
|
-
Object.defineProperty(exports,
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2808
|
+
Object.defineProperty(exports, "createCredentialsPreload", {
|
|
2809
|
+
enumerable: true,
|
|
2810
|
+
get: function() {
|
|
2811
|
+
return createCredentialsPreload;
|
|
2812
|
+
}
|
|
2666
2813
|
});
|
|
2667
|
-
Object.defineProperty(exports,
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2814
|
+
Object.defineProperty(exports, "createEntryWrapper", {
|
|
2815
|
+
enumerable: true,
|
|
2816
|
+
get: function() {
|
|
2817
|
+
return createEntryWrapper;
|
|
2818
|
+
}
|
|
2672
2819
|
});
|
|
2673
|
-
Object.defineProperty(exports,
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2820
|
+
Object.defineProperty(exports, "derivedContainers", {
|
|
2821
|
+
enumerable: true,
|
|
2822
|
+
get: function() {
|
|
2823
|
+
return derivedContainers;
|
|
2824
|
+
}
|
|
2678
2825
|
});
|
|
2679
|
-
Object.defineProperty(exports,
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2826
|
+
Object.defineProperty(exports, "eventsBackendFor", {
|
|
2827
|
+
enumerable: true,
|
|
2828
|
+
get: function() {
|
|
2829
|
+
return eventsBackendFor;
|
|
2830
|
+
}
|
|
2684
2831
|
});
|
|
2685
|
-
Object.defineProperty(exports,
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2832
|
+
Object.defineProperty(exports, "findAvailablePort", {
|
|
2833
|
+
enumerable: true,
|
|
2834
|
+
get: function() {
|
|
2835
|
+
return findAvailablePort;
|
|
2836
|
+
}
|
|
2690
2837
|
});
|
|
2691
|
-
Object.defineProperty(exports,
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2838
|
+
Object.defineProperty(exports, "isPortAvailable", {
|
|
2839
|
+
enumerable: true,
|
|
2840
|
+
get: function() {
|
|
2841
|
+
return isPortAvailable;
|
|
2842
|
+
}
|
|
2696
2843
|
});
|
|
2697
|
-
Object.defineProperty(exports,
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2844
|
+
Object.defineProperty(exports, "loadEnvFiles", {
|
|
2845
|
+
enumerable: true,
|
|
2846
|
+
get: function() {
|
|
2847
|
+
return loadEnvFiles;
|
|
2848
|
+
}
|
|
2702
2849
|
});
|
|
2703
|
-
Object.defineProperty(exports,
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2850
|
+
Object.defineProperty(exports, "loadSecretsForApp", {
|
|
2851
|
+
enumerable: true,
|
|
2852
|
+
get: function() {
|
|
2853
|
+
return loadSecretsForApp;
|
|
2854
|
+
}
|
|
2708
2855
|
});
|
|
2709
|
-
Object.defineProperty(exports,
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2856
|
+
Object.defineProperty(exports, "prepareEntryCredentials", {
|
|
2857
|
+
enumerable: true,
|
|
2858
|
+
get: function() {
|
|
2859
|
+
return prepareEntryCredentials;
|
|
2860
|
+
}
|
|
2714
2861
|
});
|
|
2715
|
-
Object.defineProperty(exports,
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2862
|
+
Object.defineProperty(exports, "providerOf", {
|
|
2863
|
+
enumerable: true,
|
|
2864
|
+
get: function() {
|
|
2865
|
+
return providerOf;
|
|
2866
|
+
}
|
|
2720
2867
|
});
|
|
2721
|
-
Object.defineProperty(exports,
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2868
|
+
Object.defineProperty(exports, "reconcileWorkspace", {
|
|
2869
|
+
enumerable: true,
|
|
2870
|
+
get: function() {
|
|
2871
|
+
return reconcileWorkspace;
|
|
2872
|
+
}
|
|
2726
2873
|
});
|
|
2727
|
-
Object.defineProperty(exports,
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2874
|
+
Object.defineProperty(exports, "resolveServicePorts", {
|
|
2875
|
+
enumerable: true,
|
|
2876
|
+
get: function() {
|
|
2877
|
+
return resolveServicePorts;
|
|
2878
|
+
}
|
|
2732
2879
|
});
|
|
2733
|
-
Object.defineProperty(exports,
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2880
|
+
Object.defineProperty(exports, "resourceName", {
|
|
2881
|
+
enumerable: true,
|
|
2882
|
+
get: function() {
|
|
2883
|
+
return resourceName;
|
|
2884
|
+
}
|
|
2738
2885
|
});
|
|
2739
|
-
Object.defineProperty(exports,
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2886
|
+
Object.defineProperty(exports, "rewriteUrlsWithPorts", {
|
|
2887
|
+
enumerable: true,
|
|
2888
|
+
get: function() {
|
|
2889
|
+
return rewriteUrlsWithPorts;
|
|
2890
|
+
}
|
|
2744
2891
|
});
|
|
2745
|
-
Object.defineProperty(exports,
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2892
|
+
Object.defineProperty(exports, "startWorkspaceServices", {
|
|
2893
|
+
enumerable: true,
|
|
2894
|
+
get: function() {
|
|
2895
|
+
return startWorkspaceServices;
|
|
2896
|
+
}
|
|
2750
2897
|
});
|
|
2751
|
-
Object.defineProperty(exports,
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2898
|
+
Object.defineProperty(exports, "storageBackendFor", {
|
|
2899
|
+
enumerable: true,
|
|
2900
|
+
get: function() {
|
|
2901
|
+
return storageBackendFor;
|
|
2902
|
+
}
|
|
2756
2903
|
});
|
|
2757
|
-
Object.defineProperty(exports,
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2904
|
+
Object.defineProperty(exports, "usesConstructs", {
|
|
2905
|
+
enumerable: true,
|
|
2906
|
+
get: function() {
|
|
2907
|
+
return usesConstructs;
|
|
2908
|
+
}
|
|
2762
2909
|
});
|
|
2763
|
-
Object.defineProperty(exports,
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2910
|
+
Object.defineProperty(exports, "workspace_exports", {
|
|
2911
|
+
enumerable: true,
|
|
2912
|
+
get: function() {
|
|
2913
|
+
return workspace_exports;
|
|
2914
|
+
}
|
|
2768
2915
|
});
|
|
2769
|
-
|
|
2916
|
+
|
|
2917
|
+
//# sourceMappingURL=credentials-Q6F0uqJq.cjs.map
|