@geekmidas/cli 10.0.0-alpha.171 → 10.0.0-alpha.173
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/{GoDaddyProvider-Cs32wo6I.cjs → GoDaddyProvider-CogJfGVY.cjs} +7 -7
- package/dist/{GoDaddyProvider-Cs32wo6I.cjs.map → GoDaddyProvider-CogJfGVY.cjs.map} +1 -1
- package/dist/{GoDaddyProvider-D7CTqN0f.mjs → GoDaddyProvider-uJkNjoF6.mjs} +2 -2
- package/dist/{GoDaddyProvider-D7CTqN0f.mjs.map → GoDaddyProvider-uJkNjoF6.mjs.map} +1 -1
- package/dist/{HostingerProvider-B_3Qs9mT.mjs → HostingerProvider-DJFdGv-x.mjs} +2 -2
- package/dist/{HostingerProvider-B_3Qs9mT.mjs.map → HostingerProvider-DJFdGv-x.mjs.map} +1 -1
- package/dist/{HostingerProvider-D0515Stf.cjs → HostingerProvider-DQEv1dim.cjs} +4 -4
- package/dist/{HostingerProvider-D0515Stf.cjs.map → HostingerProvider-DQEv1dim.cjs.map} +1 -1
- package/dist/{LegacyStateStore-CUjKKENQ.mjs → LegacyStateStore-CEAYSDxQ.mjs} +2 -2
- package/dist/{LegacyStateStore-CUjKKENQ.mjs.map → LegacyStateStore-CEAYSDxQ.mjs.map} +1 -1
- package/dist/{LegacyStateStore-Bv_2L86H.cjs → LegacyStateStore-Du-QYvvW.cjs} +2 -2
- package/dist/{LegacyStateStore-Bv_2L86H.cjs.map → LegacyStateStore-Du-QYvvW.cjs.map} +1 -1
- package/dist/{LocalStateStore-PQ2qJ5VF.cjs → LocalStateStore-CBnOEVUw.cjs} +2 -2
- package/dist/{LocalStateStore-PQ2qJ5VF.cjs.map → LocalStateStore-CBnOEVUw.cjs.map} +1 -1
- package/dist/{LocalStateStore-DXuj1BDq.mjs → LocalStateStore-DyqbqdrE.mjs} +2 -2
- package/dist/{LocalStateStore-DXuj1BDq.mjs.map → LocalStateStore-DyqbqdrE.mjs.map} +1 -1
- package/dist/{S3StateStore-cmS6iUZn.cjs → S3StateStore-BPPv8S_Q.cjs} +5 -5
- package/dist/{S3StateStore-cmS6iUZn.cjs.map → S3StateStore-BPPv8S_Q.cjs.map} +1 -1
- package/dist/{S3StateStore-BGnOwqUp.mjs → S3StateStore-CQ2kN1Pb.mjs} +4 -4
- package/dist/{S3StateStore-BGnOwqUp.mjs.map → S3StateStore-CQ2kN1Pb.mjs.map} +1 -1
- package/dist/{SSMStateStore-BtNGbg8Z.cjs → SSMStateStore-CHy4p884.cjs} +2 -2
- package/dist/{SSMStateStore-BtNGbg8Z.cjs.map → SSMStateStore-CHy4p884.cjs.map} +1 -1
- package/dist/{SSMStateStore-BqXzPBbu.mjs → SSMStateStore-Ca1_Tv6e.mjs} +2 -2
- package/dist/{SSMStateStore-BqXzPBbu.mjs.map → SSMStateStore-Ca1_Tv6e.mjs.map} +1 -1
- package/dist/{add-Dp5xRn-u.cjs → add-nvNmOV4h.cjs} +7 -7
- package/dist/{add-Dp5xRn-u.cjs.map → add-nvNmOV4h.cjs.map} +1 -1
- package/dist/{add-DW2KLCY0.mjs → add-wFkYMhYc.mjs} +5 -5
- package/dist/{add-DW2KLCY0.mjs.map → add-wFkYMhYc.mjs.map} +1 -1
- package/dist/{apps-DYGKg5SP.cjs → apps-CnTjkv-C.cjs} +9 -9
- package/dist/{apps-DYGKg5SP.cjs.map → apps-CnTjkv-C.cjs.map} +1 -1
- package/dist/{apps-DrXwv-0A.mjs → apps-Dh2ito9T.mjs} +4 -4
- package/dist/{apps-DrXwv-0A.mjs.map → apps-Dh2ito9T.mjs.map} +1 -1
- package/dist/{bundler-Swt8wHG9.mjs → bundler-BXS0AEtM.mjs} +6 -6
- package/dist/{bundler-Swt8wHG9.mjs.map → bundler-BXS0AEtM.mjs.map} +1 -1
- package/dist/{bundler-BIfEe05e.cjs → bundler-B_2Mxi7l.cjs} +9 -9
- package/dist/{bundler-BIfEe05e.cjs.map → bundler-B_2Mxi7l.cjs.map} +1 -1
- package/dist/{cli-C9wdKQy_.mjs → cli-CuCePKEc.mjs} +4 -4
- package/dist/{cli-C9wdKQy_.mjs.map → cli-CuCePKEc.mjs.map} +1 -1
- package/dist/{cli-ohJToj0E.cjs → cli-Dew5Ay8s.cjs} +6 -6
- package/dist/{cli-ohJToj0E.cjs.map → cli-Dew5Ay8s.cjs.map} +1 -1
- package/dist/{compose-Br3SQ2bW.cjs → compose-B6emrIOB.cjs} +27 -27
- package/dist/compose-B6emrIOB.cjs.map +1 -0
- package/dist/{compose-BLOnkeaJ.mjs → compose-Cfd5-ubC.mjs} +42 -16
- package/dist/compose-Cfd5-ubC.mjs.map +1 -0
- package/dist/{compose-SNYBstbO.cjs → compose-CpAmz8GF.cjs} +54 -28
- package/dist/compose-CpAmz8GF.cjs.map +1 -0
- package/dist/{compose-iUOeazjW.mjs → compose-DxreKQnX.mjs} +10 -10
- package/dist/compose-DxreKQnX.mjs.map +1 -0
- package/dist/config.cjs +1 -1
- package/dist/config.mjs +1 -1
- package/dist/deploy/public.cjs +20 -20
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.mjs +11 -11
- package/dist/{deploy-DqH8QReb.mjs → deploy-CV-e75Ja.mjs} +14 -25
- package/dist/deploy-CV-e75Ja.mjs.map +1 -0
- package/dist/{deploy-CYyf-Q8N.cjs → deploy-Cy2mXTnI.cjs} +55 -66
- package/dist/deploy-Cy2mXTnI.cjs.map +1 -0
- package/dist/{destroy-B9myEYFT.mjs → destroy-DQllGEWe.mjs} +9 -9
- package/dist/{destroy-B9myEYFT.mjs.map → destroy-DQllGEWe.mjs.map} +1 -1
- package/dist/{destroy-Bp5iHtLf.cjs → destroy-DjUM1nDI.cjs} +24 -24
- package/dist/{destroy-Bp5iHtLf.cjs.map → destroy-DjUM1nDI.cjs.map} +1 -1
- package/dist/{credentials-C2VfI-uf.mjs → dns-DPHKct-l.mjs} +123 -123
- package/dist/dns-DPHKct-l.mjs.map +1 -0
- package/dist/{credentials-BdZhygvW.cjs → dns-efZTlePp.cjs} +122 -122
- package/dist/dns-efZTlePp.cjs.map +1 -0
- package/dist/{docker-BezTRGxN.cjs → docker-1hv2ehU4.cjs} +7 -7
- package/dist/{docker-BezTRGxN.cjs.map → docker-1hv2ehU4.cjs.map} +1 -1
- package/dist/{docker-De_-Ll-A.mjs → docker-CeGpTbYR.mjs} +5 -5
- package/dist/{docker-De_-Ll-A.mjs.map → docker-CeGpTbYR.mjs.map} +1 -1
- package/dist/{dokploy-EsBgWO8W.mjs → dokploy-Cdy9uxyT.mjs} +2 -2
- package/dist/{dokploy-EsBgWO8W.mjs.map → dokploy-Cdy9uxyT.mjs.map} +1 -1
- package/dist/{dokploy-CWCIqro_.cjs → dokploy-DMCSZX9P.cjs} +2 -2
- package/dist/{dokploy-CWCIqro_.cjs.map → dokploy-DMCSZX9P.cjs.map} +1 -1
- package/dist/{eas-8t6PJRni.cjs → eas-B3vFP-9c.cjs} +3 -3
- package/dist/{eas-8t6PJRni.cjs.map → eas-B3vFP-9c.cjs.map} +1 -1
- package/dist/{eas-BalvsiH5.mjs → eas-KsVb80gp.mjs} +3 -3
- package/dist/{eas-BalvsiH5.mjs.map → eas-KsVb80gp.mjs.map} +1 -1
- package/dist/{encryption-CKBmU66R.cjs → encryption-BYpdYmaT.cjs} +6 -6
- package/dist/{encryption-CKBmU66R.cjs.map → encryption-BYpdYmaT.cjs.map} +1 -1
- package/dist/{encryption-B4mWxt4G.mjs → encryption-d_vz6csy.mjs} +3 -3
- package/dist/{encryption-B4mWxt4G.mjs.map → encryption-d_vz6csy.mjs.map} +1 -1
- package/dist/{engine-y8iWIXuv.mjs → engine-CQTK8HEF.mjs} +9 -9
- package/dist/{engine-y8iWIXuv.mjs.map → engine-CQTK8HEF.mjs.map} +1 -1
- package/dist/{engine-BTG46RG-.cjs → engine-DIzP1hty.cjs} +58 -58
- package/dist/{engine-BTG46RG-.cjs.map → engine-DIzP1hty.cjs.map} +1 -1
- package/dist/{github-CeXlzWWA.cjs → github-Chr0rEy5.cjs} +16 -16
- package/dist/{github-CeXlzWWA.cjs.map → github-Chr0rEy5.cjs.map} +1 -1
- package/dist/{github-DvGoKoQO.mjs → github-Ctmgt1Zv.mjs} +7 -7
- package/dist/{github-DvGoKoQO.mjs.map → github-Ctmgt1Zv.mjs.map} +1 -1
- package/dist/{googlePlay-CfzG7jOJ.cjs → googlePlay-C50ZneV3.cjs} +5 -5
- package/dist/{googlePlay-CfzG7jOJ.cjs.map → googlePlay-C50ZneV3.cjs.map} +1 -1
- package/dist/{googlePlay-DWv6CUgM.mjs → googlePlay-D5kL9gs5.mjs} +4 -4
- package/dist/{googlePlay-DWv6CUgM.mjs.map → googlePlay-D5kL9gs5.mjs.map} +1 -1
- package/dist/{iam-FA95ku7l.cjs → iam-CGd_oEyz.cjs} +2 -2
- package/dist/{iam-FA95ku7l.cjs.map → iam-CGd_oEyz.cjs.map} +1 -1
- package/dist/{iam-BE0qX5Lb.mjs → iam-Cs2Ph5f2.mjs} +2 -2
- package/dist/{iam-BE0qX5Lb.mjs.map → iam-Cs2Ph5f2.mjs.map} +1 -1
- package/dist/index.cjs +108 -109
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +62 -63
- package/dist/index.mjs.map +1 -1
- package/dist/{local-DH9at_0c.cjs → local-CxqlHyVX.cjs} +3 -3
- package/dist/{local-DH9at_0c.cjs.map → local-CxqlHyVX.cjs.map} +1 -1
- package/dist/{local-CvRvfktv.mjs → local-Cy6Bb9ta.mjs} +2 -2
- package/dist/{local-CvRvfktv.mjs.map → local-Cy6Bb9ta.mjs.map} +1 -1
- package/dist/{migrate-B1lHo2K2.cjs → migrate-C7AEA5wP.cjs} +6 -6
- package/dist/{migrate-B1lHo2K2.cjs.map → migrate-C7AEA5wP.cjs.map} +1 -1
- package/dist/{migrate-D1iCmQgc.mjs → migrate-DB1lxrIj.mjs} +5 -5
- package/dist/{migrate-D1iCmQgc.mjs.map → migrate-DB1lxrIj.mjs.map} +1 -1
- package/dist/{migrate-NmW2Su8s.mjs → migrate-DU_BqEwZ.mjs} +3 -3
- package/dist/{migrate-NmW2Su8s.mjs.map → migrate-DU_BqEwZ.mjs.map} +1 -1
- package/dist/{migrate-DzOWCnRR.cjs → migrate-uYiBDHF4.cjs} +6 -6
- package/dist/{migrate-DzOWCnRR.cjs.map → migrate-uYiBDHF4.cjs.map} +1 -1
- package/dist/{notes-BdIY7IoB.mjs → notes-C23PJFnm.mjs} +3 -3
- package/dist/{notes-BdIY7IoB.mjs.map → notes-C23PJFnm.mjs.map} +1 -1
- package/dist/{notes-ikElBCC8.cjs → notes-DOj8AhIz.cjs} +3 -3
- package/dist/{notes-ikElBCC8.cjs.map → notes-DOj8AhIz.cjs.map} +1 -1
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.mjs +1 -1
- package/dist/{projectBucket-uidxz03Q.cjs → projectBucket-BNxobT1q.cjs} +2 -2
- package/dist/{projectBucket-uidxz03Q.cjs.map → projectBucket-BNxobT1q.cjs.map} +1 -1
- package/dist/{projectBucket-C-FOIic4.mjs → projectBucket-BpwAxov3.mjs} +2 -2
- package/dist/{projectBucket-C-FOIic4.mjs.map → projectBucket-BpwAxov3.mjs.map} +1 -1
- package/dist/{publish-Ujng6o63.mjs → publish-CM2A0e24.mjs} +2 -2
- package/dist/{publish-Ujng6o63.mjs.map → publish-CM2A0e24.mjs.map} +1 -1
- package/dist/{publish-oO_8elIf.cjs → publish-DaFTebR5.cjs} +2 -2
- package/dist/{publish-oO_8elIf.cjs.map → publish-DaFTebR5.cjs.map} +1 -1
- package/dist/{resolve-Lk7fd8Kb.mjs → resolve-DO6xu8Da.mjs} +4 -4
- package/dist/{resolve-Lk7fd8Kb.mjs.map → resolve-DO6xu8Da.mjs.map} +1 -1
- package/dist/{resolve-CTb1gsTO.cjs → resolve-DgHrtRXG.cjs} +4 -4
- package/dist/{resolve-CTb1gsTO.cjs.map → resolve-DgHrtRXG.cjs.map} +1 -1
- package/dist/{rollback-PK4pSOLd.cjs → rollback-6Idn2ozU.cjs} +9 -9
- package/dist/{rollback-PK4pSOLd.cjs.map → rollback-6Idn2ozU.cjs.map} +1 -1
- package/dist/{rollback-B2DhSX-I.mjs → rollback-CmeGUxpC.mjs} +6 -6
- package/dist/{rollback-B2DhSX-I.mjs.map → rollback-CmeGUxpC.mjs.map} +1 -1
- package/dist/{s3-BY5ry__M.mjs → s3-DKFFpPrS.mjs} +3 -3
- package/dist/{s3-BY5ry__M.mjs.map → s3-DKFFpPrS.mjs.map} +1 -1
- package/dist/{s3-FG9qIgEB.cjs → s3-du68lLNe.cjs} +3 -3
- package/dist/{s3-FG9qIgEB.cjs.map → s3-du68lLNe.cjs.map} +1 -1
- package/dist/{serverSetup-BL1sHzRr.mjs → serverSetup-BHxCT8nA.mjs} +6 -6
- package/dist/{serverSetup-BL1sHzRr.mjs.map → serverSetup-BHxCT8nA.mjs.map} +1 -1
- package/dist/{serverSetup-C7fDKGiN.cjs → serverSetup-Uk07rJqu.cjs} +8 -8
- package/dist/{serverSetup-C7fDKGiN.cjs.map → serverSetup-Uk07rJqu.cjs.map} +1 -1
- package/dist/{sniffer-BvhDRsgI.mjs → sniffer-FQzApIZ2.mjs} +7 -7
- package/dist/{sniffer-BvhDRsgI.mjs.map → sniffer-FQzApIZ2.mjs.map} +1 -1
- package/dist/{sniffer-DJp9a2Pg.cjs → sniffer-_XeLyu2-.cjs} +7 -7
- package/dist/{sniffer-DJp9a2Pg.cjs.map → sniffer-_XeLyu2-.cjs.map} +1 -1
- package/dist/{snsSubscriptions-7y2XBXde.mjs → snsSubscriptions-BCLdw-vn.mjs} +5 -78
- package/dist/snsSubscriptions-BCLdw-vn.mjs.map +1 -0
- package/dist/{snsSubscriptions-8t1XFvoc.cjs → snsSubscriptions-By_79DkX.cjs} +20 -111
- package/dist/snsSubscriptions-By_79DkX.cjs.map +1 -0
- package/dist/{sst-8HZe83-M.cjs → sst--n0v4Fch.cjs} +7 -7
- package/dist/{sst-8HZe83-M.cjs.map → sst--n0v4Fch.cjs.map} +1 -1
- package/dist/{sst-CzFd-1om.mjs → sst-CtrAb04-.mjs} +5 -5
- package/dist/{sst-CzFd-1om.mjs.map → sst-CtrAb04-.mjs.map} +1 -1
- package/dist/{stack-j2e8ddGl.mjs → stack-BfK0IV3V.mjs} +139 -12
- package/dist/stack-BfK0IV3V.mjs.map +1 -0
- package/dist/{stack-3tvhk7SU.cjs → stack-mqaJRhoK.cjs} +160 -14
- package/dist/stack-mqaJRhoK.cjs.map +1 -0
- package/dist/{stage-DMv-IfSD.mjs → stage-DsfVOAAA.mjs} +6 -6
- package/dist/{stage-DMv-IfSD.mjs.map → stage-DsfVOAAA.mjs.map} +1 -1
- package/dist/{stage-DCSJii_y.cjs → stage-NGr_EzmY.cjs} +8 -8
- package/dist/{stage-DCSJii_y.cjs.map → stage-NGr_EzmY.cjs.map} +1 -1
- package/dist/{stages-D49CUpBY.cjs → stages-8izznWib.cjs} +2 -2
- package/dist/{stages-D49CUpBY.cjs.map → stages-8izznWib.cjs.map} +1 -1
- package/dist/{stages-CCAAe1tP.mjs → stages-QPWgbm9P.mjs} +2 -2
- package/dist/{stages-CCAAe1tP.mjs.map → stages-QPWgbm9P.mjs.map} +1 -1
- package/dist/target/public.cjs +1 -1
- package/dist/target/public.mjs +1 -1
- package/dist/{terminal-VLmWgL_N.mjs → terminal-AVJMJvk5.mjs} +2 -2
- package/dist/{terminal-VLmWgL_N.mjs.map → terminal-AVJMJvk5.mjs.map} +1 -1
- package/dist/{terminal-DIEj2Nap.cjs → terminal-BpzSISdv.cjs} +5 -5
- package/dist/{terminal-DIEj2Nap.cjs.map → terminal-BpzSISdv.cjs.map} +1 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-B0PI9k9p.mjs → workspace-BBa1Ck5j.mjs} +16 -2
- package/dist/workspace-BBa1Ck5j.mjs.map +1 -0
- package/dist/{workspace-LR9DFjU8.cjs → workspace-DirP2-ed.cjs} +21 -7
- package/dist/workspace-DirP2-ed.cjs.map +1 -0
- package/package.json +15 -15
- package/dist/compose-BLOnkeaJ.mjs.map +0 -1
- package/dist/compose-Br3SQ2bW.cjs.map +0 -1
- package/dist/compose-SNYBstbO.cjs.map +0 -1
- package/dist/compose-iUOeazjW.mjs.map +0 -1
- package/dist/credentials-BdZhygvW.cjs.map +0 -1
- package/dist/credentials-C2VfI-uf.mjs.map +0 -1
- package/dist/deploy-CYyf-Q8N.cjs.map +0 -1
- package/dist/deploy-DqH8QReb.mjs.map +0 -1
- package/dist/snsSubscriptions-7y2XBXde.mjs.map +0 -1
- package/dist/snsSubscriptions-8t1XFvoc.cjs.map +0 -1
- package/dist/stack-3tvhk7SU.cjs.map +0 -1
- package/dist/stack-j2e8ddGl.mjs.map +0 -1
- package/dist/workspace-B0PI9k9p.mjs.map +0 -1
- package/dist/workspace-LR9DFjU8.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_errors = require("./errors-DMC4Umsb.cjs");
|
|
2
|
-
const
|
|
3
|
-
const require_workspace = require("./workspace-
|
|
2
|
+
const require_dns = require("./dns-efZTlePp.cjs");
|
|
3
|
+
const require_workspace = require("./workspace-DirP2-ed.cjs");
|
|
4
4
|
const require_types = require("./types-Bl_CwZC9.cjs");
|
|
5
5
|
const require_config = require("./config.cjs");
|
|
6
6
|
let node_path = require("node:path");
|
|
@@ -177,6 +177,15 @@ var LogsPortTaken = class extends require_errors.GkmError {
|
|
|
177
177
|
this.name = "LogsPortTaken";
|
|
178
178
|
}
|
|
179
179
|
};
|
|
180
|
+
/** A deployed stage with logs on and no root login stored yet. */
|
|
181
|
+
var LogsLoginMissing = class extends require_errors.GkmError {
|
|
182
|
+
stage;
|
|
183
|
+
constructor(stage) {
|
|
184
|
+
super(`The stage '${stage}' runs OpenObserve and has no ${LOGS_EMAIL_KEY} in its secrets. Run gkm compose --stage ${stage} without --dry-run once to store it, or set the login its OpenObserve already has: gkm secrets:set ${LOGS_EMAIL_KEY} admin@… --stage ${stage}`);
|
|
185
|
+
this.stage = stage;
|
|
186
|
+
this.name = "LogsLoginMissing";
|
|
187
|
+
}
|
|
188
|
+
};
|
|
180
189
|
/** A deployed stage with logs on and no root password generated yet. */
|
|
181
190
|
var LogsPasswordMissing = class extends require_errors.GkmError {
|
|
182
191
|
stage;
|
|
@@ -198,25 +207,41 @@ function generateLogsPassword() {
|
|
|
198
207
|
return `${(0, node_crypto.randomBytes)(24).toString("base64url")}-Zo1`;
|
|
199
208
|
}
|
|
200
209
|
/**
|
|
201
|
-
* The stage's secrets with
|
|
210
|
+
* The stage's secrets with its root login stored, where they hold none:
|
|
211
|
+
* a generated password, and the email `admin@<stage domain>`.
|
|
212
|
+
*
|
|
213
|
+
* Stored once and read ever after, never derived again: OpenObserve creates
|
|
214
|
+
* its root user from these only on its first start, in its data volume, so a
|
|
215
|
+
* login computed afresh on each deploy would leave the stored user behind
|
|
216
|
+
* the moment what it was computed from — the stage's domain — moved. The
|
|
217
|
+
* first email is the one every stage's OpenObserve was created with before
|
|
218
|
+
* the login was stored, so a running stage keeps signing in.
|
|
219
|
+
*
|
|
202
220
|
* Pure, like `withGeneratedSecrets`: the caller keeps the result once the
|
|
203
221
|
* run goes ahead.
|
|
204
222
|
*/
|
|
205
|
-
function
|
|
206
|
-
|
|
223
|
+
function withLogsLogin(secrets, domain) {
|
|
224
|
+
const custom = { ...secrets.custom };
|
|
225
|
+
const generated = [];
|
|
226
|
+
if (!custom["ZO_ROOT_USER_EMAIL"] && domain) {
|
|
227
|
+
custom[LOGS_EMAIL_KEY] = `admin@${domain}`;
|
|
228
|
+
generated.push(LOGS_EMAIL_KEY);
|
|
229
|
+
}
|
|
230
|
+
if (!custom["ZO_ROOT_USER_PASSWORD"]) {
|
|
231
|
+
custom[LOGS_PASSWORD_KEY] = generateLogsPassword();
|
|
232
|
+
generated.push(LOGS_PASSWORD_KEY);
|
|
233
|
+
}
|
|
234
|
+
if (generated.length === 0) return {
|
|
207
235
|
secrets,
|
|
208
|
-
generated
|
|
236
|
+
generated
|
|
209
237
|
};
|
|
210
238
|
return {
|
|
211
239
|
secrets: {
|
|
212
240
|
...secrets,
|
|
213
|
-
custom
|
|
214
|
-
...secrets.custom,
|
|
215
|
-
[LOGS_PASSWORD_KEY]: generateLogsPassword()
|
|
216
|
-
},
|
|
241
|
+
custom,
|
|
217
242
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
218
243
|
},
|
|
219
|
-
generated
|
|
244
|
+
generated
|
|
220
245
|
};
|
|
221
246
|
}
|
|
222
247
|
/**
|
|
@@ -233,7 +258,8 @@ function otlpHeaders(email, password) {
|
|
|
233
258
|
function stackLogs(options) {
|
|
234
259
|
const { config, stage, local, custom } = options;
|
|
235
260
|
if (!local && !options.domain) throw new NoDomainForStage(stage);
|
|
236
|
-
const email = custom["ZO_ROOT_USER_EMAIL"] ?? (local ? options.localLogin?.email ?? "admin@gkm.localhost" :
|
|
261
|
+
const email = custom["ZO_ROOT_USER_EMAIL"] ?? (local ? options.localLogin?.email ?? "admin@gkm.localhost" : void 0);
|
|
262
|
+
if (!email) throw new LogsLoginMissing(stage);
|
|
237
263
|
const set = custom[LOGS_PASSWORD_KEY];
|
|
238
264
|
const password = set ?? (local ? options.localLogin?.password : void 0);
|
|
239
265
|
if (!password) throw new LogsPasswordMissing(stage);
|
|
@@ -1745,10 +1771,10 @@ function withLocalCredentials(stored, project) {
|
|
|
1745
1771
|
}
|
|
1746
1772
|
/** Where a workspace's local logins are kept on this machine. */
|
|
1747
1773
|
function localCredentialsPath(project) {
|
|
1748
|
-
const keys =
|
|
1774
|
+
const keys = require_dns.getKeystoreDir(project);
|
|
1749
1775
|
const name = keys.split(/[\\/]/).at(-1);
|
|
1750
1776
|
const namespace = keys.split(/[\\/]/).at(-2);
|
|
1751
|
-
return (0, node_path.join)(project.home ??
|
|
1777
|
+
return (0, node_path.join)(project.home ?? require_dns.gkmHome(), "local", namespace, `${name}.json`);
|
|
1752
1778
|
}
|
|
1753
1779
|
/** The local stage's logins file is there, and its key is not. */
|
|
1754
1780
|
var LocalCredentialsKeyMissing = class extends require_errors.GkmError {
|
|
@@ -1772,25 +1798,25 @@ var LocalCredentialsLocked = class extends require_errors.GkmError {
|
|
|
1772
1798
|
};
|
|
1773
1799
|
/** Read the stored logins, or `null` where none were generated yet. */
|
|
1774
1800
|
async function readLocalCredentials(workspace, home) {
|
|
1775
|
-
const project =
|
|
1801
|
+
const project = require_dns.keystoreProject(workspace, home);
|
|
1776
1802
|
const path = localCredentialsPath(project);
|
|
1777
1803
|
if (!(0, node_fs.existsSync)(path)) return null;
|
|
1778
1804
|
const stage = workspace.stages.local;
|
|
1779
|
-
const key = await
|
|
1805
|
+
const key = await require_dns.readKey(stage, project);
|
|
1780
1806
|
if (!key) throw new LocalCredentialsKeyMissing(path, stage);
|
|
1781
1807
|
const file = JSON.parse(await (0, node_fs_promises.readFile)(path, "utf-8"));
|
|
1782
|
-
return
|
|
1808
|
+
return require_dns.decrypt(file, key);
|
|
1783
1809
|
}
|
|
1784
1810
|
/** Write the logins, encrypted with the local stage's key, owner-only. */
|
|
1785
1811
|
async function saveLocalCredentials(workspace, credentials, home) {
|
|
1786
|
-
const project =
|
|
1812
|
+
const project = require_dns.keystoreProject(workspace, home);
|
|
1787
1813
|
const path = localCredentialsPath(project);
|
|
1788
|
-
const key = await
|
|
1814
|
+
const key = await require_dns.getOrCreateKey(workspace.stages.local, project);
|
|
1789
1815
|
await (0, node_fs_promises.mkdir)((0, node_path.dirname)(path), {
|
|
1790
1816
|
recursive: true,
|
|
1791
1817
|
mode: 448
|
|
1792
1818
|
});
|
|
1793
|
-
await (0, node_fs_promises.writeFile)(path, JSON.stringify(
|
|
1819
|
+
await (0, node_fs_promises.writeFile)(path, JSON.stringify(require_dns.encrypt(credentials, key), null, 2), { mode: 384 });
|
|
1794
1820
|
}
|
|
1795
1821
|
/**
|
|
1796
1822
|
* The workspace's local logins: read back, or generated and kept the first
|
|
@@ -1800,7 +1826,7 @@ async function saveLocalCredentials(workspace, credentials, home) {
|
|
|
1800
1826
|
* first run of each would otherwise generate — and keep — its own.
|
|
1801
1827
|
*/
|
|
1802
1828
|
async function loadLocalCredentials(workspace, home) {
|
|
1803
|
-
return withLock(`${localCredentialsPath(
|
|
1829
|
+
return withLock(`${localCredentialsPath(require_dns.keystoreProject(workspace, home))}.lock`, async () => {
|
|
1804
1830
|
const result = withLocalCredentials(await readLocalCredentials(workspace, home), workspace.name);
|
|
1805
1831
|
if (result.generated.length > 0) await saveLocalCredentials(workspace, result.credentials, home);
|
|
1806
1832
|
return result;
|
|
@@ -1929,7 +1955,7 @@ async function loadSecretsForApp(store, stage) {
|
|
|
1929
1955
|
const stageSecrets = await store.read(stage);
|
|
1930
1956
|
if (!stageSecrets) return {};
|
|
1931
1957
|
logger.log(`🔐 Loading secrets from stage: ${stage}`);
|
|
1932
|
-
return
|
|
1958
|
+
return require_dns.toEmbeddableSecrets(stageSecrets);
|
|
1933
1959
|
}
|
|
1934
1960
|
/**
|
|
1935
1961
|
* Walk up the directory tree to find the root containing .gkm/secrets/.
|
|
@@ -2036,21 +2062,21 @@ async function prepareEntryCredentials(options) {
|
|
|
2036
2062
|
}
|
|
2037
2063
|
const resolvedPort = options.explicitPort ?? workspaceAppPort ?? 3e3;
|
|
2038
2064
|
const stage = options.stage ?? workspace?.stages.local;
|
|
2039
|
-
const store = stage ? workspace ? await
|
|
2065
|
+
const store = stage ? workspace ? await require_dns.secretsStoreFor(workspace, stage) : new require_dns.FileSecretsStore(secretsRoot) : void 0;
|
|
2040
2066
|
const credentials = store && stage ? await loadSecretsForApp(store, stage) : {};
|
|
2041
2067
|
credentials.PORT = String(resolvedPort);
|
|
2042
2068
|
if (appInfo?.app.type === "mobile") credentials.RCT_METRO_PORT = String(resolvedPort);
|
|
2043
2069
|
const declaredKeys = [];
|
|
2044
2070
|
let reconciled;
|
|
2045
2071
|
if (workspace) {
|
|
2046
|
-
const { reconcileWorkspace } = await Promise.resolve().then(() => require("./apps-
|
|
2072
|
+
const { reconcileWorkspace } = await Promise.resolve().then(() => require("./apps-CnTjkv-C.cjs")).then((n) => n.workspace_exports);
|
|
2047
2073
|
const result = await reconcileWorkspace(workspace, {
|
|
2048
2074
|
stage: options.reconcileStage ?? workspace.stages.local,
|
|
2049
2075
|
start: options.startDocker ?? false
|
|
2050
2076
|
});
|
|
2051
2077
|
reconciled = result;
|
|
2052
2078
|
if (options.scoped && appName) {
|
|
2053
|
-
const { appProcess, processEnv } = await Promise.resolve().then(() => require("./apps-
|
|
2079
|
+
const { appProcess, processEnv } = await Promise.resolve().then(() => require("./apps-CnTjkv-C.cjs")).then((n) => n.apps_exports);
|
|
2054
2080
|
const own = processEnv(result.manifest, appProcess(workspace, result.manifest, result.background, appName), { ...credentials }, result.env);
|
|
2055
2081
|
for (const key of Object.keys(credentials)) delete credentials[key];
|
|
2056
2082
|
Object.assign(credentials, own);
|
|
@@ -2913,10 +2939,10 @@ Object.defineProperty(exports, "withGeneratedSecrets", {
|
|
|
2913
2939
|
return withGeneratedSecrets;
|
|
2914
2940
|
}
|
|
2915
2941
|
});
|
|
2916
|
-
Object.defineProperty(exports, "
|
|
2942
|
+
Object.defineProperty(exports, "withLogsLogin", {
|
|
2917
2943
|
enumerable: true,
|
|
2918
2944
|
get: function() {
|
|
2919
|
-
return
|
|
2945
|
+
return withLogsLogin;
|
|
2920
2946
|
}
|
|
2921
2947
|
});
|
|
2922
2948
|
Object.defineProperty(exports, "withRedisPassword", {
|
|
@@ -2926,4 +2952,4 @@ Object.defineProperty(exports, "withRedisPassword", {
|
|
|
2926
2952
|
}
|
|
2927
2953
|
});
|
|
2928
2954
|
|
|
2929
|
-
//# sourceMappingURL=compose-
|
|
2955
|
+
//# sourceMappingURL=compose-CpAmz8GF.cjs.map
|