@geekmidas/cli 10.0.0-alpha.98 → 10.0.0-alpha.99
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-C2fK-zeQ.mjs → GoDaddyProvider-206NguW1.mjs} +2 -2
- package/dist/{GoDaddyProvider-C2fK-zeQ.mjs.map → GoDaddyProvider-206NguW1.mjs.map} +1 -1
- package/dist/{GoDaddyProvider-SLlyDwD1.cjs → GoDaddyProvider-D1aQy2i1.cjs} +2 -2
- package/dist/{GoDaddyProvider-SLlyDwD1.cjs.map → GoDaddyProvider-D1aQy2i1.cjs.map} +1 -1
- package/dist/{LegacyStateStore-CAvxM8U5.cjs → LegacyStateStore-CgJEr1G7.cjs} +3 -3
- package/dist/{LegacyStateStore-CAvxM8U5.cjs.map → LegacyStateStore-CgJEr1G7.cjs.map} +1 -1
- package/dist/{LegacyStateStore-D9QDWCst.mjs → LegacyStateStore-wmFfdzuh.mjs} +3 -3
- package/dist/{LegacyStateStore-D9QDWCst.mjs.map → LegacyStateStore-wmFfdzuh.mjs.map} +1 -1
- package/dist/{LocalStateStore-QcrdjCl6.cjs → LocalStateStore-BD14kra9.cjs} +2 -2
- package/dist/{LocalStateStore-QcrdjCl6.cjs.map → LocalStateStore-BD14kra9.cjs.map} +1 -1
- package/dist/{LocalStateStore-DPQSqkSb.mjs → LocalStateStore-C5mNp91D.mjs} +2 -2
- package/dist/{LocalStateStore-DPQSqkSb.mjs.map → LocalStateStore-C5mNp91D.mjs.map} +1 -1
- package/dist/{S3StateStore-jorgKaee.mjs → S3StateStore-CEGbsDHi.mjs} +4 -4
- package/dist/{S3StateStore-jorgKaee.mjs.map → S3StateStore-CEGbsDHi.mjs.map} +1 -1
- package/dist/{S3StateStore-C16tVikU.cjs → S3StateStore-Csu_kJCy.cjs} +5 -5
- package/dist/{S3StateStore-C16tVikU.cjs.map → S3StateStore-Csu_kJCy.cjs.map} +1 -1
- package/dist/{SSMStateStore-Dvjt_INw.mjs → SSMStateStore-Bd62qwp4.mjs} +2 -2
- package/dist/{SSMStateStore-Dvjt_INw.mjs.map → SSMStateStore-Bd62qwp4.mjs.map} +1 -1
- package/dist/{SSMStateStore-mPAEr2P2.cjs → SSMStateStore-Rp21jtP5.cjs} +2 -2
- package/dist/{SSMStateStore-mPAEr2P2.cjs.map → SSMStateStore-Rp21jtP5.cjs.map} +1 -1
- package/dist/{add-CZIIsTcv.mjs → add-DyIEYI97.mjs} +4 -4
- package/dist/{add-CZIIsTcv.mjs.map → add-DyIEYI97.mjs.map} +1 -1
- package/dist/{add-SRk65Udu.cjs → add-Iuo3ao5E.cjs} +5 -5
- package/dist/{add-SRk65Udu.cjs.map → add-Iuo3ao5E.cjs.map} +1 -1
- package/dist/{bundler-B0Pj5FXT.cjs → bundler-Bgoq8IyR.cjs} +5 -5
- package/dist/{bundler-B0Pj5FXT.cjs.map → bundler-Bgoq8IyR.cjs.map} +1 -1
- package/dist/{bundler-DxJ-cIEt.mjs → bundler-Q6Kp8b0r.mjs} +5 -5
- package/dist/{bundler-DxJ-cIEt.mjs.map → bundler-Q6Kp8b0r.mjs.map} +1 -1
- package/dist/{cli-CV85bY3-.mjs → cli-B9BudUV0.mjs} +2 -4
- package/dist/cli-B9BudUV0.mjs.map +1 -0
- package/dist/{cli-CRDJWWmZ.cjs → cli-W2DMRIbP.cjs} +2 -4
- package/dist/cli-W2DMRIbP.cjs.map +1 -0
- package/dist/compose-CIrFNWHb.cjs +3147 -0
- package/dist/compose-CIrFNWHb.cjs.map +1 -0
- package/dist/compose-CLsRcHkA.mjs +3052 -0
- package/dist/compose-CLsRcHkA.mjs.map +1 -0
- package/dist/{config-pBzLfNef.d.mts → config-BVdHfj8b.d.cts} +4 -4
- package/dist/{config-CS76CzXM.d.cts.map → config-BVdHfj8b.d.cts.map} +1 -1
- package/dist/{config-CS76CzXM.d.cts → config-D2OqCmAM.d.mts} +4 -4
- package/dist/{config-pBzLfNef.d.mts.map → config-D2OqCmAM.d.mts.map} +1 -1
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/config.mjs +1 -1
- package/dist/deploy/public.cjs +9 -8
- package/dist/deploy/public.cjs.map +1 -1
- package/dist/deploy/public.d.cts +5 -16
- package/dist/deploy/public.d.cts.map +1 -1
- package/dist/deploy/public.d.mts +5 -16
- package/dist/deploy/public.d.mts.map +1 -1
- package/dist/deploy/public.mjs +8 -7
- package/dist/deploy/public.mjs.map +1 -1
- package/dist/{deploy-277jek46.cjs → deploy-CbJMJsgX.cjs} +26 -62
- package/dist/deploy-CbJMJsgX.cjs.map +1 -0
- package/dist/{deploy-Dw8g3sLY.mjs → deploy-n_IB8r6H.mjs} +17 -59
- package/dist/deploy-n_IB8r6H.mjs.map +1 -0
- package/dist/{discover-DJCCgimv.d.mts → discover-Caf6Hnv1.d.cts} +2 -2
- package/dist/{discover-CU1LjCOf.d.cts.map → discover-Caf6Hnv1.d.cts.map} +1 -1
- package/dist/{discover-CU1LjCOf.d.cts → discover-Cd5M2jPv.d.mts} +2 -2
- package/dist/{discover-DJCCgimv.d.mts.map → discover-Cd5M2jPv.d.mts.map} +1 -1
- package/dist/{dns-LqWzPb8l.mjs → dns-C_LPS3qV.mjs} +3 -3
- package/dist/{dns-LqWzPb8l.mjs.map → dns-C_LPS3qV.mjs.map} +1 -1
- package/dist/{dns-Dhjbnjgl.cjs → dns-kp8To8Qj.cjs} +3 -3
- package/dist/{dns-Dhjbnjgl.cjs.map → dns-kp8To8Qj.cjs.map} +1 -1
- package/dist/{dokploy-D_uCbZQ7.mjs → dokploy-Dl_kNVeE.mjs} +2 -2
- package/dist/{dokploy-D_uCbZQ7.mjs.map → dokploy-Dl_kNVeE.mjs.map} +1 -1
- package/dist/{dokploy-Dw4oCXqR.cjs → dokploy-gRIae9Ht.cjs} +2 -2
- package/dist/{dokploy-Dw4oCXqR.cjs.map → dokploy-gRIae9Ht.cjs.map} +1 -1
- package/dist/{encryption-C0uKYE9v.mjs → encryption-C3DcVZQs.mjs} +3 -3
- package/dist/{encryption-C0uKYE9v.mjs.map → encryption-C3DcVZQs.mjs.map} +1 -1
- package/dist/{encryption-CtVPHWWq.cjs → encryption-CmQvQOSe.cjs} +3 -3
- package/dist/{encryption-CtVPHWWq.cjs.map → encryption-CmQvQOSe.cjs.map} +1 -1
- package/dist/{engine-BE5PdE8S.mjs → engine-DBXuhHyf.mjs} +5 -4
- package/dist/{engine-BE5PdE8S.mjs.map → engine-DBXuhHyf.mjs.map} +1 -1
- package/dist/{engine-HI8aLw1M.cjs → engine-Dk19Mxc4.cjs} +27 -26
- package/dist/{engine-HI8aLw1M.cjs.map → engine-Dk19Mxc4.cjs.map} +1 -1
- package/dist/{github-BCdfZ9zO.cjs → github-Ds2RYnSU.cjs} +9 -8
- package/dist/{github-BCdfZ9zO.cjs.map → github-Ds2RYnSU.cjs.map} +1 -1
- package/dist/{github-CT3X720_.mjs → github-RawRLERq.mjs} +7 -6
- package/dist/{github-CT3X720_.mjs.map → github-RawRLERq.mjs.map} +1 -1
- package/dist/identity-CBXr4wNi.mjs +129 -0
- package/dist/identity-CBXr4wNi.mjs.map +1 -0
- package/dist/identity-CbLfgQNT.cjs +182 -0
- package/dist/identity-CbLfgQNT.cjs.map +1 -0
- package/dist/{index-DKtB01YC.d.cts → index-BU4G20G6.d.cts} +2 -2
- package/dist/{index-DKtB01YC.d.cts.map → index-BU4G20G6.d.cts.map} +1 -1
- package/dist/{index-ZAUrXH6Q.d.mts → index-yDbd1WcM.d.mts} +2 -2
- package/dist/{index-ZAUrXH6Q.d.mts.map → index-yDbd1WcM.d.mts.map} +1 -1
- package/dist/index.cjs +131 -141
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +128 -138
- package/dist/index.mjs.map +1 -1
- package/dist/{migrate-CCZUgxMK.mjs → migrate-CZIGT3kB.mjs} +3 -3
- package/dist/{migrate-CCZUgxMK.mjs.map → migrate-CZIGT3kB.mjs.map} +1 -1
- package/dist/{migrate-DBGyoBvZ.cjs → migrate-CxZYzF_u.cjs} +3 -3
- package/dist/{migrate-DBGyoBvZ.cjs.map → migrate-CxZYzF_u.cjs.map} +1 -1
- package/dist/{migrate-DH-lOK3j.mjs → migrate-DR1x96I4.mjs} +3 -3
- package/dist/{migrate-DH-lOK3j.mjs.map → migrate-DR1x96I4.mjs.map} +1 -1
- package/dist/{migrate-Cs7kQxD5.cjs → migrate-DjrTwWJA.cjs} +3 -3
- package/dist/{migrate-Cs7kQxD5.cjs.map → migrate-DjrTwWJA.cjs.map} +1 -1
- package/dist/openapi.cjs +1 -1
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.mts +1 -1
- package/dist/openapi.mjs +1 -1
- package/dist/{projectBucket-DrkEht-j.mjs → projectBucket-BYOxRnHY.mjs} +2 -2
- package/dist/{projectBucket-DrkEht-j.mjs.map → projectBucket-BYOxRnHY.mjs.map} +1 -1
- package/dist/{projectBucket-BjeDcAYy.cjs → projectBucket-CDu5rXjp.cjs} +2 -2
- package/dist/{projectBucket-BjeDcAYy.cjs.map → projectBucket-CDu5rXjp.cjs.map} +1 -1
- package/dist/reconcile/public.d.cts +2 -2
- package/dist/reconcile/public.d.mts +2 -2
- package/dist/{resolve-OfLaxaxY.mjs → resolve-CNYbGH8g.mjs} +3 -3
- package/dist/{resolve-OfLaxaxY.mjs.map → resolve-CNYbGH8g.mjs.map} +1 -1
- package/dist/{resolve-CScrqgdC.cjs → resolve-DC98Rl1t.cjs} +3 -3
- package/dist/{resolve-CScrqgdC.cjs.map → resolve-DC98Rl1t.cjs.map} +1 -1
- package/dist/{rollback-DQBSN-i7.mjs → rollback-BkIkE8Qe.mjs} +5 -5
- package/dist/{rollback-DQBSN-i7.mjs.map → rollback-BkIkE8Qe.mjs.map} +1 -1
- package/dist/{rollback-D7p4wJNO.cjs → rollback-DBfLvC8k.cjs} +5 -5
- package/dist/{rollback-D7p4wJNO.cjs.map → rollback-DBfLvC8k.cjs.map} +1 -1
- package/dist/{runtime-BlHOVx8L.d.cts → runtime-CLz3bf07.d.mts} +2 -2
- package/dist/{runtime-BlHOVx8L.d.cts.map → runtime-CLz3bf07.d.mts.map} +1 -1
- package/dist/{runtime-DMq9C3KB.d.mts → runtime-CUWf0IUk.d.cts} +2 -2
- package/dist/{runtime-DMq9C3KB.d.mts.map → runtime-CUWf0IUk.d.cts.map} +1 -1
- package/dist/{s3-CUKzBBae.mjs → s3-BwhQk3QM.mjs} +3 -3
- package/dist/{s3-CUKzBBae.mjs.map → s3-BwhQk3QM.mjs.map} +1 -1
- package/dist/{s3-QQi4sNOQ.cjs → s3-DLp0V-Ox.cjs} +3 -3
- package/dist/{s3-QQi4sNOQ.cjs.map → s3-DLp0V-Ox.cjs.map} +1 -1
- package/dist/{sandbox-Cm4X6HRh.d.mts → sandbox-CfpLWTPP.d.mts} +2 -2
- package/dist/{sandbox-ArJ_hEKk.d.cts.map → sandbox-CfpLWTPP.d.mts.map} +1 -1
- package/dist/{sandbox-ArJ_hEKk.d.cts → sandbox-D1XeNEJ9.d.cts} +2 -2
- package/dist/{sandbox-Cm4X6HRh.d.mts.map → sandbox-D1XeNEJ9.d.cts.map} +1 -1
- package/dist/{seeds-Df4BI-T3.cjs → seeds-BNHSpjNP.cjs} +9 -179
- package/dist/seeds-BNHSpjNP.cjs.map +1 -0
- package/dist/{seeds-BvxWUGKJ.mjs → seeds-C4bZ8L-T.mjs} +10 -132
- package/dist/seeds-C4bZ8L-T.mjs.map +1 -0
- package/dist/{sniffer-BqjXvcaK.mjs → sniffer-BIBm9dAb.mjs} +7 -7
- package/dist/{sniffer-BqjXvcaK.mjs.map → sniffer-BIBm9dAb.mjs.map} +1 -1
- package/dist/{sniffer-DZeQJKty.cjs → sniffer-Cylp9W2D.cjs} +7 -7
- package/dist/{sniffer-DZeQJKty.cjs.map → sniffer-Cylp9W2D.cjs.map} +1 -1
- package/dist/{stages-6SEoRA4x.mjs → stages-CcS9vnNu.mjs} +3 -17
- package/dist/stages-CcS9vnNu.mjs.map +1 -0
- package/dist/{stages-DH5z89eT.cjs → stages-DdBV7msu.cjs} +3 -17
- package/dist/stages-DdBV7msu.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-Drpl9HX9.d.mts → types-BhThob0H.d.mts} +29 -13
- package/dist/types-BhThob0H.d.mts.map +1 -0
- package/dist/{types-DipUP9zp.d.cts → types-DwoLHelT.d.cts} +29 -13
- package/dist/types-DwoLHelT.d.cts.map +1 -0
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-BBeT6Pil.mjs → workspace-D5CpOp1y.mjs} +22 -2
- package/dist/workspace-D5CpOp1y.mjs.map +1 -0
- package/dist/{workspace-BJ78Bgvm.cjs → workspace-DRjdu1OY.cjs} +22 -2
- package/dist/workspace-DRjdu1OY.cjs.map +1 -0
- package/package.json +15 -15
- package/dist/cli-CRDJWWmZ.cjs.map +0 -1
- package/dist/cli-CV85bY3-.mjs.map +0 -1
- package/dist/compose-CQQRRJC3.mjs +0 -1511
- package/dist/compose-CQQRRJC3.mjs.map +0 -1
- package/dist/compose-DMY4ouEk.cjs +0 -1558
- package/dist/compose-DMY4ouEk.cjs.map +0 -1
- package/dist/deploy-277jek46.cjs.map +0 -1
- package/dist/deploy-Dw8g3sLY.mjs.map +0 -1
- package/dist/dns-4RAiVFa7.cjs +0 -55
- package/dist/dns-4RAiVFa7.cjs.map +0 -1
- package/dist/dns-CU22K_i0.mjs +0 -44
- package/dist/dns-CU22K_i0.mjs.map +0 -1
- package/dist/secrets-AA_tQUl-.mjs +0 -36
- package/dist/secrets-AA_tQUl-.mjs.map +0 -1
- package/dist/secrets-B_biKsKx.cjs +0 -47
- package/dist/secrets-B_biKsKx.cjs.map +0 -1
- package/dist/seeds-BvxWUGKJ.mjs.map +0 -1
- package/dist/seeds-Df4BI-T3.cjs.map +0 -1
- package/dist/stack-A6MAFZ6u.mjs +0 -1201
- package/dist/stack-A6MAFZ6u.mjs.map +0 -1
- package/dist/stack-BpkZEEfB.cjs +0 -1308
- package/dist/stack-BpkZEEfB.cjs.map +0 -1
- package/dist/stages-6SEoRA4x.mjs.map +0 -1
- package/dist/stages-DH5z89eT.cjs.map +0 -1
- package/dist/types-DipUP9zp.d.cts.map +0 -1
- package/dist/types-Drpl9HX9.d.mts.map +0 -1
- package/dist/workspace-BBeT6Pil.mjs.map +0 -1
- package/dist/workspace-BJ78Bgvm.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as NormalizedAppConfig, jt as GkmError, r as GkmConfig, v as LoadedConfig, x as NormalizedWorkspace } from "./types-
|
|
2
|
-
import { n as Sandbox } from "./sandbox-
|
|
3
|
-
import "./index-
|
|
1
|
+
import { b as NormalizedAppConfig, jt as GkmError, r as GkmConfig, v as LoadedConfig, x as NormalizedWorkspace } from "./types-DwoLHelT.cjs";
|
|
2
|
+
import { n as Sandbox } from "./sandbox-D1XeNEJ9.cjs";
|
|
3
|
+
import "./index-BU4G20G6.cjs";
|
|
4
4
|
import { ConstructManifest } from "@geekmidas/manifest";
|
|
5
5
|
//#region src/dev/discovery.d.ts
|
|
6
6
|
/** Where an app is in its life. `stopped` is a server that exited on its own. */
|
|
@@ -266,4 +266,4 @@ interface WorkspaceAppInfo {
|
|
|
266
266
|
declare function loadWorkspaceAppInfo(cwd?: string): Promise<WorkspaceAppInfo>;
|
|
267
267
|
//#endregion
|
|
268
268
|
export { DiscoveredApp as C, DiscoveryResponse as D, DiscoveryEvent as E, DataApiKind as S, DiscoveredWorkspace as T, loadWorkspaceAppInfo as _, ConfigNotFound as a, parseModuleConfig as b, NotABackendApp as c, WorkspaceAppInfo as d, WorkspaceDeclaresNoConstructs as f, loadConfig as g, loadAppConfig as h, ConfigLoadFailed as i, NotInAnApp as l, findWorkspaceRoot as m, CONFIG_LOAD_TIMEOUT_MS as n, ConfigObjectNotSerializable as o, defineConfig as p, ConfigDiscoveryResult as r, LoadConfigOptions as s, AppConfigResult as t, ParsedModuleConfig as u, loadWorkspaceConfig as v, DiscoveredDataApi as w, AppStatus as x, loadWorkspaceSettings as y };
|
|
269
|
-
//# sourceMappingURL=config-
|
|
269
|
+
//# sourceMappingURL=config-BVdHfj8b.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-BVdHfj8b.d.cts","names":[],"sources":["../src/dev/discovery.ts","../src/config.ts"],"mappings":";;;;;;KAqFY;;KAGA;;;;;;UAyBK;;EAEhB;;EAEA;;UA8BgB;EAChB,MAAM;;EAEN;;EAEA;;EAEA;;UAGgB;EAChB;EACA;EACA;;EAEA;EACA;EACA,QAAQ;EACR;;EAEA;EACA,UAAU;;UAGM;;EAEhB;EACA;EACA;EACA;EACA,UAAU;;EAEV,WAAW;EACX,MAAM;;;UAIU;EAChB;;EAEA;IAAQ;IAAa;;;EAErB;EACA,YAAY;;;KAID;EACP;EAAkB,UAAU;;EAC5B;EAAiD;;EAEnD;EACA;EACA,KAAK;;;;;;;;;;;;;;;;;;;;;iBCpJQ,aAAa,QAAQ,YAAY;UAIhC;EAChB;EACA;;;;;;;;;;;;;;;;;;;iBAoBe,kBACf,sBACA,uBACE;UAac;EAChB;EACA;;;;;;;;iBAgDe,kBAAkB;;cAKrB,uBAAuB;WACd;EAArB,YAAqB;;UAaL;;;;;;;;EAQhB,UAAU;;;;;EAKV;;;;;;;cAQY;;cAGA,yBAAyB;WAE3B;WACA;EAFV,YACU,oBACA;;;;;;;cAYE,oCAAoC;WAEtC;WACA;EAFV,YACU,oBACA;;;;;;;;iBA0GW,WACrB,eACE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCW,sBACrB,cACA,UAAS,oBACP,QAAQ;iBAKW,oBACrB,cACA,UAAS,oBACP,QAAQ;;;;;;;;cAmEE,sCAAsC;WAC7B;EAArB,YAAqB;;UAWL;EAChB;EACA,KAAK;EACL,WAAW;EACX,WAAW;EACX;EACA;;;cAqCY,mBAAmB;WAErB;WACA,MAAM,SAAS;EAFzB,YACU,aACA,MAAM,SAAS;;;;;;;;;;;;;;;iBAoCJ,cACrB,eACE,QAAQ;;cAkBE,uBAAuB;WACd;EAArB,YAAqB;;UAQL;;EAEhB;EACA,KAAK;EACL,WAAW;EACX;;;;;;;;;iBAUqB,qBACrB,eACE,QAAQ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as NormalizedAppConfig, jt as GkmError, r as GkmConfig, v as LoadedConfig, x as NormalizedWorkspace } from "./types-
|
|
2
|
-
import { n as Sandbox } from "./sandbox-
|
|
3
|
-
import "./index-
|
|
1
|
+
import { b as NormalizedAppConfig, jt as GkmError, r as GkmConfig, v as LoadedConfig, x as NormalizedWorkspace } from "./types-BhThob0H.mjs";
|
|
2
|
+
import { n as Sandbox } from "./sandbox-CfpLWTPP.mjs";
|
|
3
|
+
import "./index-yDbd1WcM.mjs";
|
|
4
4
|
import { ConstructManifest } from "@geekmidas/manifest";
|
|
5
5
|
//#region src/dev/discovery.d.ts
|
|
6
6
|
/** Where an app is in its life. `stopped` is a server that exited on its own. */
|
|
@@ -266,4 +266,4 @@ interface WorkspaceAppInfo {
|
|
|
266
266
|
declare function loadWorkspaceAppInfo(cwd?: string): Promise<WorkspaceAppInfo>;
|
|
267
267
|
//#endregion
|
|
268
268
|
export { DiscoveredApp as C, DiscoveryResponse as D, DiscoveryEvent as E, DataApiKind as S, DiscoveredWorkspace as T, loadWorkspaceAppInfo as _, ConfigNotFound as a, parseModuleConfig as b, NotABackendApp as c, WorkspaceAppInfo as d, WorkspaceDeclaresNoConstructs as f, loadConfig as g, loadAppConfig as h, ConfigLoadFailed as i, NotInAnApp as l, findWorkspaceRoot as m, CONFIG_LOAD_TIMEOUT_MS as n, ConfigObjectNotSerializable as o, defineConfig as p, ConfigDiscoveryResult as r, LoadConfigOptions as s, AppConfigResult as t, ParsedModuleConfig as u, loadWorkspaceConfig as v, DiscoveredDataApi as w, AppStatus as x, loadWorkspaceSettings as y };
|
|
269
|
-
//# sourceMappingURL=config-
|
|
269
|
+
//# sourceMappingURL=config-D2OqCmAM.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-
|
|
1
|
+
{"version":3,"file":"config-D2OqCmAM.d.mts","names":[],"sources":["../src/dev/discovery.ts","../src/config.ts"],"mappings":";;;;;;KAqFY;;KAGA;;;;;;UAyBK;;EAEhB;;EAEA;;UA8BgB;EAChB,MAAM;;EAEN;;EAEA;;EAEA;;UAGgB;EAChB;EACA;EACA;;EAEA;EACA;EACA,QAAQ;EACR;;EAEA;EACA,UAAU;;UAGM;;EAEhB;EACA;EACA;EACA;EACA,UAAU;;EAEV,WAAW;EACX,MAAM;;;UAIU;EAChB;;EAEA;IAAQ;IAAa;;;EAErB;EACA,YAAY;;;KAID;EACP;EAAkB,UAAU;;EAC5B;EAAiD;;EAEnD;EACA;EACA,KAAK;;;;;;;;;;;;;;;;;;;;;iBCpJQ,aAAa,QAAQ,YAAY;UAIhC;EAChB;EACA;;;;;;;;;;;;;;;;;;;iBAoBe,kBACf,sBACA,uBACE;UAac;EAChB;EACA;;;;;;;;iBAgDe,kBAAkB;;cAKrB,uBAAuB;WACd;EAArB,YAAqB;;UAaL;;;;;;;;EAQhB,UAAU;;;;;EAKV;;;;;;;cAQY;;cAGA,yBAAyB;WAE3B;WACA;EAFV,YACU,oBACA;;;;;;;cAYE,oCAAoC;WAEtC;WACA;EAFV,YACU,oBACA;;;;;;;;iBA0GW,WACrB,eACE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCW,sBACrB,cACA,UAAS,oBACP,QAAQ;iBAKW,oBACrB,cACA,UAAS,oBACP,QAAQ;;;;;;;;cAmEE,sCAAsC;WAC7B;EAArB,YAAqB;;UAWL;EAChB;EACA,KAAK;EACL,WAAW;EACX,WAAW;EACX;EACA;;;cAqCY,mBAAmB;WAErB;WACA,MAAM,SAAS;EAFzB,YACU,aACA,MAAM,SAAS;;;;;;;;;;;;;;;iBAoCJ,cACrB,eACE,QAAQ;;cAkBE,uBAAuB;WACd;EAArB,YAAqB;;UAQL;;EAEhB;EACA,KAAK;EACL,WAAW;EACX;;;;;;;;;iBAUqB,qBACrB,eACE,QAAQ"}
|
package/dist/config.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const require_schemas = require("./schemas-BObwxB_t.cjs");
|
|
|
4
4
|
const require_discover = require("./discover-DPgu-ScS.cjs");
|
|
5
5
|
const require_sandbox = require("./sandbox-CHv3OYXg.cjs");
|
|
6
6
|
const require_derive = require("./derive-DAbo49sm.cjs");
|
|
7
|
-
const require_workspace = require("./workspace-
|
|
7
|
+
const require_workspace = require("./workspace-DRjdu1OY.cjs");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
10
10
|
//#region src/config.ts
|
package/dist/config.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as WorkspaceConfig, m as DevConfig, r as GkmConfig, v as LoadedConfig } from "./types-
|
|
2
|
-
import { l as defineWorkspace } from "./index-
|
|
3
|
-
import { C as DiscoveredApp, D as DiscoveryResponse, E as DiscoveryEvent, S as DataApiKind, T as DiscoveredWorkspace, _ as loadWorkspaceAppInfo, a as ConfigNotFound, b as parseModuleConfig, c as NotABackendApp, d as WorkspaceAppInfo, f as WorkspaceDeclaresNoConstructs, g as loadConfig, h as loadAppConfig, i as ConfigLoadFailed, l as NotInAnApp, m as findWorkspaceRoot, n as CONFIG_LOAD_TIMEOUT_MS, o as ConfigObjectNotSerializable, p as defineConfig, r as ConfigDiscoveryResult, s as LoadConfigOptions, t as AppConfigResult, u as ParsedModuleConfig, v as loadWorkspaceConfig, w as DiscoveredDataApi, x as AppStatus, y as loadWorkspaceSettings } from "./config-
|
|
1
|
+
import { D as WorkspaceConfig, m as DevConfig, r as GkmConfig, v as LoadedConfig } from "./types-DwoLHelT.cjs";
|
|
2
|
+
import { l as defineWorkspace } from "./index-BU4G20G6.cjs";
|
|
3
|
+
import { C as DiscoveredApp, D as DiscoveryResponse, E as DiscoveryEvent, S as DataApiKind, T as DiscoveredWorkspace, _ as loadWorkspaceAppInfo, a as ConfigNotFound, b as parseModuleConfig, c as NotABackendApp, d as WorkspaceAppInfo, f as WorkspaceDeclaresNoConstructs, g as loadConfig, h as loadAppConfig, i as ConfigLoadFailed, l as NotInAnApp, m as findWorkspaceRoot, n as CONFIG_LOAD_TIMEOUT_MS, o as ConfigObjectNotSerializable, p as defineConfig, r as ConfigDiscoveryResult, s as LoadConfigOptions, t as AppConfigResult, u as ParsedModuleConfig, v as loadWorkspaceConfig, w as DiscoveredDataApi, x as AppStatus, y as loadWorkspaceSettings } from "./config-BVdHfj8b.cjs";
|
|
4
4
|
export { AppConfigResult, type AppStatus, CONFIG_LOAD_TIMEOUT_MS, ConfigDiscoveryResult, ConfigLoadFailed, ConfigNotFound, ConfigObjectNotSerializable, type DataApiKind, type DevConfig, type DiscoveredApp, type DiscoveredDataApi, type DiscoveredWorkspace, type DiscoveryEvent, type DiscoveryResponse, type GkmConfig, LoadConfigOptions, type LoadedConfig, NotABackendApp, NotInAnApp, ParsedModuleConfig, WorkspaceAppInfo, type WorkspaceConfig, WorkspaceDeclaresNoConstructs, defineConfig, defineWorkspace, findWorkspaceRoot, loadAppConfig, loadConfig, loadWorkspaceAppInfo, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig };
|
package/dist/config.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as WorkspaceConfig, m as DevConfig, r as GkmConfig, v as LoadedConfig } from "./types-
|
|
2
|
-
import { l as defineWorkspace } from "./index-
|
|
3
|
-
import { C as DiscoveredApp, D as DiscoveryResponse, E as DiscoveryEvent, S as DataApiKind, T as DiscoveredWorkspace, _ as loadWorkspaceAppInfo, a as ConfigNotFound, b as parseModuleConfig, c as NotABackendApp, d as WorkspaceAppInfo, f as WorkspaceDeclaresNoConstructs, g as loadConfig, h as loadAppConfig, i as ConfigLoadFailed, l as NotInAnApp, m as findWorkspaceRoot, n as CONFIG_LOAD_TIMEOUT_MS, o as ConfigObjectNotSerializable, p as defineConfig, r as ConfigDiscoveryResult, s as LoadConfigOptions, t as AppConfigResult, u as ParsedModuleConfig, v as loadWorkspaceConfig, w as DiscoveredDataApi, x as AppStatus, y as loadWorkspaceSettings } from "./config-
|
|
1
|
+
import { D as WorkspaceConfig, m as DevConfig, r as GkmConfig, v as LoadedConfig } from "./types-BhThob0H.mjs";
|
|
2
|
+
import { l as defineWorkspace } from "./index-yDbd1WcM.mjs";
|
|
3
|
+
import { C as DiscoveredApp, D as DiscoveryResponse, E as DiscoveryEvent, S as DataApiKind, T as DiscoveredWorkspace, _ as loadWorkspaceAppInfo, a as ConfigNotFound, b as parseModuleConfig, c as NotABackendApp, d as WorkspaceAppInfo, f as WorkspaceDeclaresNoConstructs, g as loadConfig, h as loadAppConfig, i as ConfigLoadFailed, l as NotInAnApp, m as findWorkspaceRoot, n as CONFIG_LOAD_TIMEOUT_MS, o as ConfigObjectNotSerializable, p as defineConfig, r as ConfigDiscoveryResult, s as LoadConfigOptions, t as AppConfigResult, u as ParsedModuleConfig, v as loadWorkspaceConfig, w as DiscoveredDataApi, x as AppStatus, y as loadWorkspaceSettings } from "./config-D2OqCmAM.mjs";
|
|
4
4
|
export { AppConfigResult, type AppStatus, CONFIG_LOAD_TIMEOUT_MS, ConfigDiscoveryResult, ConfigLoadFailed, ConfigNotFound, ConfigObjectNotSerializable, type DataApiKind, type DevConfig, type DiscoveredApp, type DiscoveredDataApi, type DiscoveredWorkspace, type DiscoveryEvent, type DiscoveryResponse, type GkmConfig, LoadConfigOptions, type LoadedConfig, NotABackendApp, NotInAnApp, ParsedModuleConfig, WorkspaceAppInfo, type WorkspaceConfig, WorkspaceDeclaresNoConstructs, defineConfig, defineWorkspace, findWorkspaceRoot, loadAppConfig, loadConfig, loadWorkspaceAppInfo, loadWorkspaceConfig, loadWorkspaceSettings, parseModuleConfig };
|
package/dist/config.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { a as discriminatedUnion, d as record, f as string, h as unknown, n as a
|
|
|
3
3
|
import { c as runWorker, d as output, r as discover } from "./discover-qjFapetL.mjs";
|
|
4
4
|
import { i as activeSandbox } from "./sandbox-CbVB7uOD.mjs";
|
|
5
5
|
import { n as derivedApps } from "./derive-B4vDpzgP.mjs";
|
|
6
|
-
import { a as allConstructGlobs, b as isWorkspaceConfig, d as getAppGkmConfig, l as defineWorkspace, m as processConfig } from "./workspace-
|
|
6
|
+
import { a as allConstructGlobs, b as isWorkspaceConfig, d as getAppGkmConfig, l as defineWorkspace, m as processConfig } from "./workspace-D5CpOp1y.mjs";
|
|
7
7
|
import { dirname, join, parse, resolve, sep } from "node:path";
|
|
8
8
|
import { existsSync, realpathSync } from "node:fs";
|
|
9
9
|
//#region src/config.ts
|
package/dist/deploy/public.cjs
CHANGED
|
@@ -4,16 +4,17 @@ const require_run = require("../run-fVZ-rLnc.cjs");
|
|
|
4
4
|
const require_credentials = require("../credentials-Zqr3QQYB.cjs");
|
|
5
5
|
const require_discover = require("../discover-DPgu-ScS.cjs");
|
|
6
6
|
const require_sandbox = require("../sandbox-CHv3OYXg.cjs");
|
|
7
|
-
const require_workspace = require("../workspace-
|
|
7
|
+
const require_workspace = require("../workspace-DRjdu1OY.cjs");
|
|
8
8
|
const require_define = require("../define-crmMcXFS.cjs");
|
|
9
9
|
const require_config = require("../config.cjs");
|
|
10
|
-
const require_seeds = require("../seeds-
|
|
11
|
-
const
|
|
10
|
+
const require_seeds = require("../seeds-BNHSpjNP.cjs");
|
|
11
|
+
const require_identity = require("../identity-CbLfgQNT.cjs");
|
|
12
|
+
const require_resolve = require("../resolve-DC98Rl1t.cjs");
|
|
12
13
|
const require_local = require("../local-DNhnkugT.cjs");
|
|
13
|
-
const require_sniffer = require("../sniffer-
|
|
14
|
-
const require_deploy = require("../deploy-
|
|
15
|
-
const require_engine = require("../engine-
|
|
16
|
-
const require_rollback = require("../rollback-
|
|
14
|
+
const require_sniffer = require("../sniffer-Cylp9W2D.cjs");
|
|
15
|
+
const require_deploy = require("../deploy-CbJMJsgX.cjs");
|
|
16
|
+
const require_engine = require("../engine-Dk19Mxc4.cjs");
|
|
17
|
+
const require_rollback = require("../rollback-DBfLvC8k.cjs");
|
|
17
18
|
const require_provider = require("../provider-BqpjG9QM.cjs");
|
|
18
19
|
const require_sst = require("../sst-DGuHDxVU.cjs");
|
|
19
20
|
let node_path = require("node:path");
|
|
@@ -202,7 +203,7 @@ exports.allowlistedEnv = require_local.allowlistedEnv;
|
|
|
202
203
|
exports.chainCredentials = require_credentials.chainCredentials;
|
|
203
204
|
exports.confineCwd = require_sandbox.confineCwd;
|
|
204
205
|
exports.deploy = require_deploy.deploy;
|
|
205
|
-
exports.deployIdentity =
|
|
206
|
+
exports.deployIdentity = require_identity.deployIdentity;
|
|
206
207
|
exports.gkmHome = require_run.gkmHome;
|
|
207
208
|
exports.installDependencies = installDependencies;
|
|
208
209
|
exports.rollbackStage = require_rollback.rollbackStage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.cjs","names":["GkmError","existsSync","join","detectPackageManager","resolve","CommandFailed"],"sources":["../../src/sandbox/install.ts"],"sourcesContent":["/**\n * Installing a project's dependencies in a sandbox, with or without their\n * lifecycle scripts.\n *\n * `postinstall` is the oldest way into a build machine: any package in the\n * lockfile — a dependency of a dependency — runs whatever it likes the moment\n * it is installed. For a build the host trusts that is how native modules get\n * built. For one it does not, the scripts are skipped, and the few packages\n * that genuinely need theirs (esbuild's binary, a database driver) are named\n * and rebuilt — with nothing but the sandbox's environment either way.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\nimport { detectPackageManager, type PackageManager } from '../docker/templates';\nimport { GkmError } from '../errors';\nimport { CommandFailed } from '../run';\nimport type { Sandbox, SandboxOutput, SandboxResult } from './sandbox';\n\n/** Long enough for a cold install of a large monorepo. */\nexport const INSTALL_TIMEOUT_MS = 15 * 60_000;\n\nexport interface InstallOptions {\n\t/** The directory to install in. Defaults to the sandbox's root. */\n\tcwd?: string;\n\t/** Defaults to the one the lockfile above `cwd` names. */\n\tpackageManager?: PackageManager;\n\t/**\n\t * Skip every lifecycle script — dependencies' and the project's own —\n\t * except those of {@link allowScripts}. Defaults to false: scripts run as\n\t * a plain install runs them, under the package manager's own policy —\n\t * npm 12 and pnpm 10 skip dependencies' scripts nobody approved.\n\t */\n\tignoreScripts?: boolean;\n\t/**\n\t * With `ignoreScripts`, the packages whose scripts still run: rebuilt by\n\t * name once the install is done.\n\t */\n\tallowScripts?: readonly string[];\n\t/** Variables the install needs beyond the sandbox's own. */\n\tenv?: Readonly<Record<string, string>>;\n\t/** Defaults to {@link INSTALL_TIMEOUT_MS}, for each command. */\n\ttimeoutMs?: number;\n\t/** Where the package manager's output goes. Defaults to `inherit`. */\n\toutput?: SandboxOutput;\n\tsignal?: AbortSignal;\n}\n\n/** A name in `allowScripts` that is not a package name. */\nexport class InstallAllowlistNameInvalid extends GkmError {\n\tconstructor(readonly packageName: string) {\n\t\tsuper(\n\t\t\t`'${packageName}' is not a package name, so its scripts cannot be ` +\n\t\t\t\t'allowed. Name the package as it appears in package.json — ' +\n\t\t\t\t\"'esbuild', '@prisma/client'.\",\n\t\t);\n\t\tthis.name = 'InstallAllowlistNameInvalid';\n\t}\n}\n\n/** The package manager has no way to run only some packages' scripts. */\nexport class InstallScriptsAllowlistUnsupported extends GkmError {\n\tconstructor(\n\t\treadonly packageManager: string,\n\t\treadonly allowScripts: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`${packageManager} cannot rebuild named packages after an install ` +\n\t\t\t\t`without scripts, so ${allowScripts.join(', ')} cannot be allowed ` +\n\t\t\t\t'theirs. Use pnpm, npm or Yarn 2+, or install with every script ' +\n\t\t\t\t'skipped.',\n\t\t);\n\t\tthis.name = 'InstallScriptsAllowlistUnsupported';\n\t}\n}\n\n/**\n * npm's package-name grammar, less a leading `-`: each name is an argument to\n * `rebuild`, and must never be read as a flag.\n */\nconst PACKAGE_NAME = /^(?:@[a-z0-9~][a-z0-9._~-]*\\/)?[a-z0-9~][a-z0-9._~-]*$/;\n\n/**\n * The commands an install runs, in order. Exported for the tests, which\n * check each package manager's flags without installing with all four.\n */\nexport function installCommands(\n\tpackageManager: PackageManager,\n\tcwd: string,\n\toptions: Pick<InstallOptions, 'ignoreScripts' | 'allowScripts'> = {},\n): [string, string[]][] {\n\tconst ignore = options.ignoreScripts ?? false;\n\tconst allow = ignore ? [...(options.allowScripts ?? [])] : [];\n\tfor (const name of allow) {\n\t\tif (!PACKAGE_NAME.test(name)) throw new InstallAllowlistNameInvalid(name);\n\t}\n\n\tswitch (packageManager) {\n\t\tcase 'pnpm':\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'pnpm',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t// pnpm 10 builds no dependency it was not told to, even by name;\n\t\t\t\t// this command names exactly the ones allowed, so it may build\n\t\t\t\t// what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'pnpm',\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'rebuild',\n\t\t\t\t\t\t\t\t\t'--config.dangerouslyAllowAllBuilds=true',\n\t\t\t\t\t\t\t\t\t...allow,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\tcase 'npm': {\n\t\t\tconst locked = existsSync(join(cwd, 'package-lock.json'));\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'npm',\n\t\t\t\t\t[locked ? 'ci' : 'install', ...(ignore ? ['--ignore-scripts'] : [])],\n\t\t\t\t],\n\t\t\t\t// npm 12 runs no dependency's install script its `allowScripts`\n\t\t\t\t// policy does not approve, rebuilt by name or not, and refuses\n\t\t\t\t// `--allow-scripts` on a project's command line. This command\n\t\t\t\t// names exactly the packages allowed, so it may run what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'npm',\n\t\t\t\t\t\t\t\t['rebuild', '--dangerously-allow-all-scripts', ...allow],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\t}\n\t\tcase 'yarn': {\n\t\t\t// Yarn 2+ keeps a `.yarnrc.yml`; it skips builds by mode and can\n\t\t\t// rebuild by name. Yarn 1 can only skip them all.\n\t\t\tconst berry = existsSync(join(cwd, '.yarnrc.yml'));\n\t\t\tif (berry) {\n\t\t\t\treturn [\n\t\t\t\t\t[\n\t\t\t\t\t\t'yarn',\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'install',\n\t\t\t\t\t\t\t'--immutable',\n\t\t\t\t\t\t\t...(ignore ? ['--mode=skip-build'] : []),\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t...(allow.length > 0\n\t\t\t\t\t\t? [['yarn', ['rebuild', ...allow]] as [string, string[]]]\n\t\t\t\t\t\t: []),\n\t\t\t\t];\n\t\t\t}\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('Yarn 1', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'yarn',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t\t}\n\t\tcase 'bun':\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('bun', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'bun',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t}\n}\n\n/**\n * Install the project's dependencies in `sandbox`.\n *\n * ```ts\n * // A checkout nobody has reviewed: no scripts but esbuild's.\n * await installDependencies(sandbox, {\n * ignoreScripts: true,\n * allowScripts: ['esbuild'],\n * });\n * ```\n *\n * Resolves with each command's result, in order — with its output when\n * `output` is `capture`.\n *\n * @throws {CommandFailed} when the package manager exits unsuccessfully.\n * @throws {InstallScriptsAllowlistUnsupported} for an allowlist the package\n * manager cannot honour, before anything is installed.\n */\nexport async function installDependencies(\n\tsandbox: Sandbox,\n\toptions: InstallOptions = {},\n): Promise<SandboxResult[]> {\n\tconst cwd = options.cwd ?? sandbox.root;\n\tconst results: SandboxResult[] = [];\n\tconst packageManager =\n\t\toptions.packageManager ?? detectPackageManager(resolve(sandbox.root, cwd));\n\n\tfor (const [command, args] of installCommands(\n\t\tpackageManager,\n\t\tresolve(sandbox.root, cwd),\n\t\toptions,\n\t)) {\n\t\tconst result = await sandbox.exec(command, args, {\n\t\t\tcwd,\n\t\t\tenv: { ...sandbox.env, ...options.env },\n\t\t\ttimeoutMs: options.timeoutMs ?? INSTALL_TIMEOUT_MS,\n\t\t\toutput: options.output ?? 'inherit',\n\t\t\t...(options.signal ? { signal: options.signal } : {}),\n\t\t});\n\t\tresults.push(result);\n\t\tif (result.exitCode !== 0) {\n\t\t\tthrow new CommandFailed(\n\t\t\t\tcommand,\n\t\t\t\targs,\n\t\t\t\tresult.exitC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QAAQ,QAAQ,OAAO,IAAI,CAAC;EACpD,CAAC;EACD,QAAQ,KAAK,MAAM;EACnB,IAAI,OAAO,aAAa,GACvB,MAAM,IAAIC,YAAAA,cACT,SACA,MACA,OAAO,UACP,OAAO,MACR;CAEF;CACA,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"public.cjs","names":["GkmError","existsSync","join","detectPackageManager","resolve","CommandFailed"],"sources":["../../src/sandbox/install.ts"],"sourcesContent":["/**\n * Installing a project's dependencies in a sandbox, with or without their\n * lifecycle scripts.\n *\n * `postinstall` is the oldest way into a build machine: any package in the\n * lockfile — a dependency of a dependency — runs whatever it likes the moment\n * it is installed. For a build the host trusts that is how native modules get\n * built. For one it does not, the scripts are skipped, and the few packages\n * that genuinely need theirs (esbuild's binary, a database driver) are named\n * and rebuilt — with nothing but the sandbox's environment either way.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\nimport { detectPackageManager, type PackageManager } from '../docker/templates';\nimport { GkmError } from '../errors';\nimport { CommandFailed } from '../run';\nimport type { Sandbox, SandboxOutput, SandboxResult } from './sandbox';\n\n/** Long enough for a cold install of a large monorepo. */\nexport const INSTALL_TIMEOUT_MS = 15 * 60_000;\n\nexport interface InstallOptions {\n\t/** The directory to install in. Defaults to the sandbox's root. */\n\tcwd?: string;\n\t/** Defaults to the one the lockfile above `cwd` names. */\n\tpackageManager?: PackageManager;\n\t/**\n\t * Skip every lifecycle script — dependencies' and the project's own —\n\t * except those of {@link allowScripts}. Defaults to false: scripts run as\n\t * a plain install runs them, under the package manager's own policy —\n\t * npm 12 and pnpm 10 skip dependencies' scripts nobody approved.\n\t */\n\tignoreScripts?: boolean;\n\t/**\n\t * With `ignoreScripts`, the packages whose scripts still run: rebuilt by\n\t * name once the install is done.\n\t */\n\tallowScripts?: readonly string[];\n\t/** Variables the install needs beyond the sandbox's own. */\n\tenv?: Readonly<Record<string, string>>;\n\t/** Defaults to {@link INSTALL_TIMEOUT_MS}, for each command. */\n\ttimeoutMs?: number;\n\t/** Where the package manager's output goes. Defaults to `inherit`. */\n\toutput?: SandboxOutput;\n\tsignal?: AbortSignal;\n}\n\n/** A name in `allowScripts` that is not a package name. */\nexport class InstallAllowlistNameInvalid extends GkmError {\n\tconstructor(readonly packageName: string) {\n\t\tsuper(\n\t\t\t`'${packageName}' is not a package name, so its scripts cannot be ` +\n\t\t\t\t'allowed. Name the package as it appears in package.json — ' +\n\t\t\t\t\"'esbuild', '@prisma/client'.\",\n\t\t);\n\t\tthis.name = 'InstallAllowlistNameInvalid';\n\t}\n}\n\n/** The package manager has no way to run only some packages' scripts. */\nexport class InstallScriptsAllowlistUnsupported extends GkmError {\n\tconstructor(\n\t\treadonly packageManager: string,\n\t\treadonly allowScripts: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`${packageManager} cannot rebuild named packages after an install ` +\n\t\t\t\t`without scripts, so ${allowScripts.join(', ')} cannot be allowed ` +\n\t\t\t\t'theirs. Use pnpm, npm or Yarn 2+, or install with every script ' +\n\t\t\t\t'skipped.',\n\t\t);\n\t\tthis.name = 'InstallScriptsAllowlistUnsupported';\n\t}\n}\n\n/**\n * npm's package-name grammar, less a leading `-`: each name is an argument to\n * `rebuild`, and must never be read as a flag.\n */\nconst PACKAGE_NAME = /^(?:@[a-z0-9~][a-z0-9._~-]*\\/)?[a-z0-9~][a-z0-9._~-]*$/;\n\n/**\n * The commands an install runs, in order. Exported for the tests, which\n * check each package manager's flags without installing with all four.\n */\nexport function installCommands(\n\tpackageManager: PackageManager,\n\tcwd: string,\n\toptions: Pick<InstallOptions, 'ignoreScripts' | 'allowScripts'> = {},\n): [string, string[]][] {\n\tconst ignore = options.ignoreScripts ?? false;\n\tconst allow = ignore ? [...(options.allowScripts ?? [])] : [];\n\tfor (const name of allow) {\n\t\tif (!PACKAGE_NAME.test(name)) throw new InstallAllowlistNameInvalid(name);\n\t}\n\n\tswitch (packageManager) {\n\t\tcase 'pnpm':\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'pnpm',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t// pnpm 10 builds no dependency it was not told to, even by name;\n\t\t\t\t// this command names exactly the ones allowed, so it may build\n\t\t\t\t// what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'pnpm',\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'rebuild',\n\t\t\t\t\t\t\t\t\t'--config.dangerouslyAllowAllBuilds=true',\n\t\t\t\t\t\t\t\t\t...allow,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\tcase 'npm': {\n\t\t\tconst locked = existsSync(join(cwd, 'package-lock.json'));\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'npm',\n\t\t\t\t\t[locked ? 'ci' : 'install', ...(ignore ? ['--ignore-scripts'] : [])],\n\t\t\t\t],\n\t\t\t\t// npm 12 runs no dependency's install script its `allowScripts`\n\t\t\t\t// policy does not approve, rebuilt by name or not, and refuses\n\t\t\t\t// `--allow-scripts` on a project's command line. This command\n\t\t\t\t// names exactly the packages allowed, so it may run what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'npm',\n\t\t\t\t\t\t\t\t['rebuild', '--dangerously-allow-all-scripts', ...allow],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\t}\n\t\tcase 'yarn': {\n\t\t\t// Yarn 2+ keeps a `.yarnrc.yml`; it skips builds by mode and can\n\t\t\t// rebuild by name. Yarn 1 can only skip them all.\n\t\t\tconst berry = existsSync(join(cwd, '.yarnrc.yml'));\n\t\t\tif (berry) {\n\t\t\t\treturn [\n\t\t\t\t\t[\n\t\t\t\t\t\t'yarn',\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'install',\n\t\t\t\t\t\t\t'--immutable',\n\t\t\t\t\t\t\t...(ignore ? ['--mode=skip-build'] : []),\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t...(allow.length > 0\n\t\t\t\t\t\t? [['yarn', ['rebuild', ...allow]] as [string, string[]]]\n\t\t\t\t\t\t: []),\n\t\t\t\t];\n\t\t\t}\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('Yarn 1', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'yarn',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t\t}\n\t\tcase 'bun':\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('bun', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'bun',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t}\n}\n\n/**\n * Install the project's dependencies in `sandbox`.\n *\n * ```ts\n * // A checkout nobody has reviewed: no scripts but esbuild's.\n * await installDependencies(sandbox, {\n * ignoreScripts: true,\n * allowScripts: ['esbuild'],\n * });\n * ```\n *\n * Resolves with each command's result, in order — with its output when\n * `output` is `capture`.\n *\n * @throws {CommandFailed} when the package manager exits unsuccessfully.\n * @throws {InstallScriptsAllowlistUnsupported} for an allowlist the package\n * manager cannot honour, before anything is installed.\n */\nexport async function installDependencies(\n\tsandbox: Sandbox,\n\toptions: InstallOptions = {},\n): Promise<SandboxResult[]> {\n\tconst cwd = options.cwd ?? sandbox.root;\n\tconst results: SandboxResult[] = [];\n\tconst packageManager =\n\t\toptions.packageManager ?? detectPackageManager(resolve(sandbox.root, cwd));\n\n\tfor (const [command, args] of installCommands(\n\t\tpackageManager,\n\t\tresolve(sandbox.root, cwd),\n\t\toptions,\n\t)) {\n\t\tconst result = await sandbox.exec(command, args, {\n\t\t\tcwd,\n\t\t\tenv: { ...sandbox.env, ...options.env },\n\t\t\ttimeoutMs: options.timeoutMs ?? INSTALL_TIMEOUT_MS,\n\t\t\toutput: options.output ?? 'inherit',\n\t\t\t...(options.signal ? { signal: options.signal } : {}),\n\t\t});\n\t\tresults.push(result);\n\t\tif (result.exitCode !== 0) {\n\t\t\tthrow new CommandFailed(\n\t\t\t\tcommand,\n\t\t\t\targs,\n\t\t\t\tresult.exitCode,\n\t\t\t\tresult.signal as NodeJS.Signals | null,\n\t\t\t);\n\t\t}\n\t}\n\treturn results;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,MAAa,qBAAqB;;AA6BlC,IAAa,8BAAb,cAAiDA,eAAAA,SAAS;CACpC;CAArB,YAAY,aAA8B;EACzC,MACC,IAAI,YAAY,yIAGjB;EALoB,KAAA,cAAA;EAMpB,KAAK,OAAO;CACb;AACD;;AAGA,IAAa,qCAAb,cAAwDA,eAAAA,SAAS;CAEtD;CACA;CAFV,YACC,gBACA,cACC;EACD,MACC,GAAG,eAAe,sEACM,aAAa,KAAK,IAAI,EAAE,2FAGjD;EARS,KAAA,iBAAA;EACA,KAAA,eAAA;EAQT,KAAK,OAAO;CACb;AACD;;;;;AAMA,MAAM,eAAe;;;;;AAMrB,SAAgB,gBACf,gBACA,KACA,UAAkE,CAAC,GAC5C;CACvB,MAAM,SAAS,QAAQ,iBAAiB;CACxC,MAAM,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A,GAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC;GACtC,CACD,CACD;CACF;AACD;;;;;;;;;;;;;;;;;;;AAoBA,eAAsB,oBACrB,SACA,UAA0B,CAAC,GACA;CAC3B,MAAM,MAAM,QAAQ,OAAO,QAAQ;CACnC,MAAM,UAA2B,CAAC;CAClC,MAAM,iBACL,QAAQ,kBAAkBC,cAAAA,sBAAAA,GAAqBC,UAAAA,QAAAA,CAAQ,QAAQ,MAAM,GAAG,CAAC;CAE1E,KAAK,MAAM,CAAC,SAAS,SAAS,gBAC7B,iBAAA,GACAA,UAAAA,QAAAA,CAAQ,QAAQ,MAAM,GAAG,GACzB,OACD,GAAG;EACF,MAAM,SAAS,MAAM,QAAQ,KAAK,SAAS,MAAM;GAChD;GACA,KAAK;IAAE,GAAG,QAAQ;IAAK,GAAG,QAAQ;GAAI;GACtC,WAAW,QAAQ,aAAA;GACnB,QAAQ,QAAQ,UAAU;GAC1B,GAAI,QAAQ,SAAS,EAAE,QAAQ,QAAQ,OAAO,IAAI,CAAC;EACpD,CAAC;EACD,QAAQ,KAAK,MAAM;EACnB,IAAI,OAAO,aAAa,GACvB,MAAM,IAAIC,YAAAA,cACT,SACA,MACA,OAAO,UACP,OAAO,MACR;CAEF;CACA,OAAO;AACR"}
|
package/dist/deploy/public.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { At as deployIdentity, Ct as StateVersionConflict, Dt as LocalActor, Et as GithubActor, Tt as Actor, U as AnyDeployTarget, _t as StoredCredentialsOptions, at as DeployPhase, bt as LocalStateInCi, ct as AppDeployResult, dt as Credential, ft as CredentialKind, gt as MissingCredential, ht as CredentialRequest, it as DeployEventType, jt as GkmError, kt as DeployIdentity, lt as DeployResult, mt as CredentialProvider, nt as DeployEvent, ot as ResourceChange, pt as CredentialKinds, rt as DeployEventError, st as ResourceVia, ut as AwsCredential, vt as chainCredentials, wt as ReleasedImage, xt as StateLocked, yt as storedCredentials } from "../types-
|
|
2
|
-
import { a as SandboxOutput, c as confineCwd, i as SandboxExecOptions, n as Sandbox, o as SandboxResult, r as SandboxCwdEscape, s as SecretNameInvalid, t as SECRETS_DIR_ENV } from "../sandbox-
|
|
3
|
-
import { i as ConfigLoadFailed, o as ConfigObjectNotSerializable } from "../config-
|
|
4
|
-
import { n as ConstructsNotSerializable, t as ConstructDiscoveryFailed } from "../discover-
|
|
5
|
-
import { a as TargetRuntimeMismatch, c as DeployTargetNotYetSupported, i as TargetPackageInvalid, l as UnknownDeployTarget, n as InvalidTargetOptions, o as ProviderRemoved, r as TargetEntryInvalid, s as TargetPackageNotFound, t as TargetRuntimeUndeclared } from "../runtime-
|
|
1
|
+
import { At as deployIdentity, Ct as StateVersionConflict, Dt as LocalActor, Et as GithubActor, Tt as Actor, U as AnyDeployTarget, _t as StoredCredentialsOptions, at as DeployPhase, bt as LocalStateInCi, ct as AppDeployResult, dt as Credential, ft as CredentialKind, gt as MissingCredential, ht as CredentialRequest, it as DeployEventType, jt as GkmError, kt as DeployIdentity, lt as DeployResult, mt as CredentialProvider, nt as DeployEvent, ot as ResourceChange, pt as CredentialKinds, rt as DeployEventError, st as ResourceVia, ut as AwsCredential, vt as chainCredentials, wt as ReleasedImage, xt as StateLocked, yt as storedCredentials } from "../types-DwoLHelT.cjs";
|
|
2
|
+
import { a as SandboxOutput, c as confineCwd, i as SandboxExecOptions, n as Sandbox, o as SandboxResult, r as SandboxCwdEscape, s as SecretNameInvalid, t as SECRETS_DIR_ENV } from "../sandbox-D1XeNEJ9.cjs";
|
|
3
|
+
import { i as ConfigLoadFailed, o as ConfigObjectNotSerializable } from "../config-BVdHfj8b.cjs";
|
|
4
|
+
import { n as ConstructsNotSerializable, t as ConstructDiscoveryFailed } from "../discover-Caf6Hnv1.cjs";
|
|
5
|
+
import { a as TargetRuntimeMismatch, c as DeployTargetNotYetSupported, i as TargetPackageInvalid, l as UnknownDeployTarget, n as InvalidTargetOptions, o as ProviderRemoved, r as TargetEntryInvalid, s as TargetPackageNotFound, t as TargetRuntimeUndeclared } from "../runtime-CUWf0IUk.cjs";
|
|
6
6
|
import { ConstructManifest, Declaration } from "@geekmidas/manifest";
|
|
7
7
|
import "@geekmidas/envkit/sniffer";
|
|
8
8
|
import "@geekmidas/db/pg/roles";
|
|
@@ -525,17 +525,6 @@ interface DeployInput {
|
|
|
525
525
|
* CDN or proxy in front of the server, or records written by another step.
|
|
526
526
|
*/
|
|
527
527
|
skipDns?: boolean;
|
|
528
|
-
/**
|
|
529
|
-
* Create the stage's resources — its providers' (deploy.<kind>.<stage>)
|
|
530
|
-
* and its DNS records — and nothing else: what a CI runner runs with the
|
|
531
|
-
* cloud credentials and DNS token before the server deploys.
|
|
532
|
-
*/
|
|
533
|
-
resourcesOnly?: boolean;
|
|
534
|
-
/**
|
|
535
|
-
* An earlier `resourcesOnly` run created the stage's resources: run no
|
|
536
|
-
* provider, and write or check no DNS record.
|
|
537
|
-
*/
|
|
538
|
-
skipResources?: boolean;
|
|
539
528
|
/** Each provider issues its runtime keys a successor. */
|
|
540
529
|
rotateKeys?: boolean;
|
|
541
530
|
/** Delete a rotated-out key now, not after the next deploy. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.cts","names":[],"sources":["../../src/home.ts","../../src/providers/types.ts","../../src/providers/config.ts","../../src/deploy/devServices.ts","../../src/providers/notes.ts","../../src/providers/s3/errors.ts","../../src/run.ts","../../src/sandbox/env.ts","../../src/docker/templates.ts","../../src/sandbox/install.ts","../../src/sandbox/local.ts","../../src/sandbox/worker.ts","../../src/target/dokploy/dokploy-api.ts","../../src/target/dokploy/engine.ts","../../src/target/dokploy/health.ts","../../src/target/dokploy/migrations.ts","../../src/target/dokploy/rollback.ts","../../src/target/seeds.ts","../../src/target/sst/health.ts","../../src/target/sst/outputs.ts","../../src/target/sst/index.ts","../../src/deploy/deploy.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":";;;;;;;;;;;;;;;;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KA;;;;;;EAMA,UAAU,eAAe;;EAEzB;;EAEA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA,cAAc;;;;;;;;;;EAUd;;;;;;EAMA
|
|
1
|
+
{"version":3,"file":"public.d.cts","names":[],"sources":["../../src/home.ts","../../src/providers/types.ts","../../src/providers/config.ts","../../src/deploy/devServices.ts","../../src/providers/notes.ts","../../src/providers/s3/errors.ts","../../src/run.ts","../../src/sandbox/env.ts","../../src/docker/templates.ts","../../src/sandbox/install.ts","../../src/sandbox/local.ts","../../src/sandbox/worker.ts","../../src/target/dokploy/dokploy-api.ts","../../src/target/dokploy/engine.ts","../../src/target/dokploy/health.ts","../../src/target/dokploy/migrations.ts","../../src/target/dokploy/rollback.ts","../../src/target/seeds.ts","../../src/target/sst/health.ts","../../src/target/sst/outputs.ts","../../src/target/sst/index.ts","../../src/deploy/deploy.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAaa;;wBAGG,QAAQ,MAAK,OAAO;;;;cCYvB;KAED,uBAAuB;;;;qBC8BtB,6BAA6B;WAE/B,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;;;;;qBCpBE;KAED,qBAAqB;;qBAcpB,oCAAoC;WAC3B;EAArB,YAAqB;;;;;;;qBAeT,qCAAqC;WAC5B;EAArB,YAAqB;;;UAiCL;EAChB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,UAAU;;EAEV;;EAEA;;;;;;qBAOY,sCAAsC;WAExC;WACA,kBAAkB;EAF5B,YACU,eACA,kBAAkB;;;;;qBCjHhB,8BAA8B;WAEhC,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;qBCyHE,qCAAqC;WAEvC;WACA;WACA;WACA;EAJV,YACU,YACA,gBACA,eACA;;;;;qBCjHE,sBAAsB;WAExB;WACA;WACA;WACA,QAAQ,OAAO;EAJzB,YACU,iBACA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;;;qBChBE,8BAA8B;WACrB;EAArB,YAAqB;;;qBAUT,yBAAyB;WAChB;EAArB,YAAqB;;;qBAUT,0BAA0B;WAE5B;WACA;EAFV,YACU,kBACA"}
|
package/dist/deploy/public.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { At as deployIdentity, Ct as StateVersionConflict, Dt as LocalActor, Et as GithubActor, Tt as Actor, U as AnyDeployTarget, _t as StoredCredentialsOptions, at as DeployPhase, bt as LocalStateInCi, ct as AppDeployResult, dt as Credential, ft as CredentialKind, gt as MissingCredential, ht as CredentialRequest, it as DeployEventType, jt as GkmError, kt as DeployIdentity, lt as DeployResult, mt as CredentialProvider, nt as DeployEvent, ot as ResourceChange, pt as CredentialKinds, rt as DeployEventError, st as ResourceVia, ut as AwsCredential, vt as chainCredentials, wt as ReleasedImage, xt as StateLocked, yt as storedCredentials } from "../types-
|
|
2
|
-
import { a as SandboxOutput, c as confineCwd, i as SandboxExecOptions, n as Sandbox, o as SandboxResult, r as SandboxCwdEscape, s as SecretNameInvalid, t as SECRETS_DIR_ENV } from "../sandbox-
|
|
3
|
-
import { i as ConfigLoadFailed, o as ConfigObjectNotSerializable } from "../config-
|
|
4
|
-
import { n as ConstructsNotSerializable, t as ConstructDiscoveryFailed } from "../discover-
|
|
5
|
-
import { a as TargetRuntimeMismatch, c as DeployTargetNotYetSupported, i as TargetPackageInvalid, l as UnknownDeployTarget, n as InvalidTargetOptions, o as ProviderRemoved, r as TargetEntryInvalid, s as TargetPackageNotFound, t as TargetRuntimeUndeclared } from "../runtime-
|
|
1
|
+
import { At as deployIdentity, Ct as StateVersionConflict, Dt as LocalActor, Et as GithubActor, Tt as Actor, U as AnyDeployTarget, _t as StoredCredentialsOptions, at as DeployPhase, bt as LocalStateInCi, ct as AppDeployResult, dt as Credential, ft as CredentialKind, gt as MissingCredential, ht as CredentialRequest, it as DeployEventType, jt as GkmError, kt as DeployIdentity, lt as DeployResult, mt as CredentialProvider, nt as DeployEvent, ot as ResourceChange, pt as CredentialKinds, rt as DeployEventError, st as ResourceVia, ut as AwsCredential, vt as chainCredentials, wt as ReleasedImage, xt as StateLocked, yt as storedCredentials } from "../types-BhThob0H.mjs";
|
|
2
|
+
import { a as SandboxOutput, c as confineCwd, i as SandboxExecOptions, n as Sandbox, o as SandboxResult, r as SandboxCwdEscape, s as SecretNameInvalid, t as SECRETS_DIR_ENV } from "../sandbox-CfpLWTPP.mjs";
|
|
3
|
+
import { i as ConfigLoadFailed, o as ConfigObjectNotSerializable } from "../config-D2OqCmAM.mjs";
|
|
4
|
+
import { n as ConstructsNotSerializable, t as ConstructDiscoveryFailed } from "../discover-Cd5M2jPv.mjs";
|
|
5
|
+
import { a as TargetRuntimeMismatch, c as DeployTargetNotYetSupported, i as TargetPackageInvalid, l as UnknownDeployTarget, n as InvalidTargetOptions, o as ProviderRemoved, r as TargetEntryInvalid, s as TargetPackageNotFound, t as TargetRuntimeUndeclared } from "../runtime-CLz3bf07.mjs";
|
|
6
6
|
import { ConstructManifest, Declaration } from "@geekmidas/manifest";
|
|
7
7
|
import "@geekmidas/db/pg/roles";
|
|
8
8
|
import "@geekmidas/envkit/sniffer";
|
|
@@ -525,17 +525,6 @@ interface DeployInput {
|
|
|
525
525
|
* CDN or proxy in front of the server, or records written by another step.
|
|
526
526
|
*/
|
|
527
527
|
skipDns?: boolean;
|
|
528
|
-
/**
|
|
529
|
-
* Create the stage's resources — its providers' (deploy.<kind>.<stage>)
|
|
530
|
-
* and its DNS records — and nothing else: what a CI runner runs with the
|
|
531
|
-
* cloud credentials and DNS token before the server deploys.
|
|
532
|
-
*/
|
|
533
|
-
resourcesOnly?: boolean;
|
|
534
|
-
/**
|
|
535
|
-
* An earlier `resourcesOnly` run created the stage's resources: run no
|
|
536
|
-
* provider, and write or check no DNS record.
|
|
537
|
-
*/
|
|
538
|
-
skipResources?: boolean;
|
|
539
528
|
/** Each provider issues its runtime keys a successor. */
|
|
540
529
|
rotateKeys?: boolean;
|
|
541
530
|
/** Delete a rotated-out key now, not after the next deploy. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.mts","names":[],"sources":["../../src/home.ts","../../src/providers/types.ts","../../src/providers/config.ts","../../src/deploy/devServices.ts","../../src/providers/notes.ts","../../src/providers/s3/errors.ts","../../src/run.ts","../../src/sandbox/env.ts","../../src/docker/templates.ts","../../src/sandbox/install.ts","../../src/sandbox/local.ts","../../src/sandbox/worker.ts","../../src/target/dokploy/dokploy-api.ts","../../src/target/dokploy/engine.ts","../../src/target/dokploy/health.ts","../../src/target/dokploy/migrations.ts","../../src/target/dokploy/rollback.ts","../../src/target/seeds.ts","../../src/target/sst/health.ts","../../src/target/sst/outputs.ts","../../src/target/sst/index.ts","../../src/deploy/deploy.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAaa;;wBAGG,QAAQ,MAAK,OAAO;;;;cCYvB;KAED,uBAAuB;;;;qBC8BtB,6BAA6B;WAE/B,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;;;;;qBCpBE;KAED,qBAAqB;;qBAcpB,oCAAoC;WAC3B;EAArB,YAAqB;;;;;;;qBAeT,qCAAqC;WAC5B;EAArB,YAAqB;;;UAiCL;EAChB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,UAAU;;EAEV;;EAEA;;;;;;qBAOY,sCAAsC;WAExC;WACA,kBAAkB;EAF5B,YACU,eACA,kBAAkB;;;;;qBCjHhB,8BAA8B;WAEhC,MAAM;WACN;WACA;EAHV,YACU,MAAM,cACN,eACA;;;;;qBCyHE,qCAAqC;WAEvC;WACA;WACA;WACA;EAJV,YACU,YACA,gBACA,eACA;;;;;qBCjHE,sBAAsB;WAExB;WACA;WACA;WACA,QAAQ,OAAO;EAJzB,YACU,iBACA,yBACA,yBACA,QAAQ,OAAO;;;qBAUb,wBAAwB;WAE1B;WACA;WACA;EAHV,YACU,i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MAAM;EACN,IAAI;;;qBAIQ,yBAAyB;WAE3B;;WAEA;EAHV,YACU,eAEA;;EAAA;;;qBAWE,0BAA0B;WAE5B;WACA;EAFV,YACU,eACA;;;qBAWE,2BAA2B;WAClB;EAArB,YAAqB;;;;;;wBAaA,cACrB,OAAO,gBACL,QAAQ;;;;qBChGE,0BAA0B;WAE5B;;WAEA;;WAEA;WACS;EANnB,YACU,eAEA;;EAAA,mBAEA;;EAAA,cACS;;;;;qBCKP,0BAA0B;WAE5B;;WAEA;IACR;IACA;IACA;IACA;;EAPF,YACU,eAEA;;EAAA;IACR;IACA;IACA;IACA;;;;;;qBCZU,6BAA6B;WAE/B;WACA;EAFV,YACU,cACA;;;;;qBC2BE,0BAA0B;WACjB;EAArB,YAAqB;;;;;;;;UCtBL;EAChB,KAAK;EACL,KAAK;EACL,OAAO;;UAGS;;;;;EAKhB;;;;;EAKA;;;;;EAKA;;;;;;EAMA,UAAU,eAAe;;EAEzB;;EAEA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA,cAAc;;;;;;;;;;EAUd;;;;;;EAMA
|
|
1
|
+
{"version":3,"file":"public.d.mts","names":[],"sources":["../../src/home.ts","../../src/providers/types.ts","../../src/providers/config.ts","../../src/deploy/devServices.ts","../../src/providers/notes.ts","../../src/providers/s3/errors.ts","../../src/run.ts","../../src/sandbox/env.ts","../../src/docker/templates.ts","../../src/sandbox/install.ts","../../src/sandbox/local.ts","../../src/sandbox/worker.ts","../../src/target/dokploy/dokploy-api.ts","../../src/target/dokploy/engine.ts","../../src/target/dokploy/health.ts","../../src/target/dokploy/migrations.ts","../../src/target/dokploy/rollback.ts","../../src/target/seeds.ts","../../src/target/sst/health.ts","../../src/target/sst/outputs.ts","../../src/target/sst/index.ts","../../src/deploy/deploy.ts","../../src/deploy/orchestrate.ts","../../src/deploy/ownership.ts","../../src/deploy/registry.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAaa;;wBAGG,QAAQ,MAAK,OAAO;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EAEA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA,cAAc;;;;;;;;;;EAUd;;;;;;EAMA;;EAEA;;EAEA;;EAEA,SAAS;;;;;;EAMT,SAAS;;;;;EAKT;;;;;EAKA;;;;;;;;;;;;EAYA,UAAU;;;UAIM,kBAAkB,cAAc;;;;;;WAMvC,QAAQ,QAAQ;;;;;;;;;;;;;;;;;;wBAqEV,OAAO,OAAO,cAAc;;;;qBChH/B,0BAA0B;WAE5B;WACA;EAFV,YACU,yBACA;;;qBAWE,yBAAyB;WAE3B;WACA;EAFV,YACU,eACA;;;qBAUE,4BAA4B;WACnB;EAArB,YAAqB;;;qBAST,uBAAuB;WAEzB;;WAEA;EAHV,YACU,gBAEA;;EAAA,kBACT;;;;;;;;qBCnHW,wBAAwB;WAE1B;WACA;WACA;;WAEA;EALV,YACU,qBACA,mBACA,kBAEA;;EAAA;;;;;qBChBE,8BAA8B;WACrB;EAArB,YAAqB;;;qBAUT,yBAAyB;WAChB;EAArB,YAAqB;;;qBAUT,0BAA0B;WAE5B;WACA;EAFV,YACU,kBACA"}
|
package/dist/deploy/public.mjs
CHANGED
|
@@ -3,16 +3,17 @@ import { n as CommandTimedOut, o as GKM_HOME_ENV, s as gkmHome, t as CommandFail
|
|
|
3
3
|
import { n as chainCredentials, r as storedCredentials, t as MissingCredential } from "../credentials-B5N5yKk6.mjs";
|
|
4
4
|
import { n as ConstructsNotSerializable, o as SandboxWorkerFailed, t as ConstructDiscoveryFailed } from "../discover-qjFapetL.mjs";
|
|
5
5
|
import { n as SandboxCwdEscape, o as confineCwd, r as SecretNameInvalid, t as SECRETS_DIR_ENV } from "../sandbox-CbVB7uOD.mjs";
|
|
6
|
-
import { V as UnknownStageProvider, et as ProvisionedBucketUnreachable } from "../workspace-
|
|
6
|
+
import { V as UnknownStageProvider, et as ProvisionedBucketUnreachable } from "../workspace-D5CpOp1y.mjs";
|
|
7
7
|
import { a as UnknownDeployTarget, i as DeployTargetNotYetSupported } from "../define-6poNqm5O.mjs";
|
|
8
8
|
import { ConfigLoadFailed, ConfigObjectNotSerializable } from "../config.mjs";
|
|
9
|
-
import { A as StageProviderDisabled, Kt as detectPackageManager,
|
|
10
|
-
import {
|
|
9
|
+
import { A as StageProviderDisabled, Kt as detectPackageManager, b as DevServicesNeedServerTarget, t as DeploySeedsFailed, v as AllowDevServicesTakesNoValue, x as ExternalServicesNotConfigured, y as DEV_SERVICES } from "../seeds-C4bZ8L-T.mjs";
|
|
10
|
+
import { n as deployIdentity } from "../identity-CBXr4wNi.mjs";
|
|
11
|
+
import { i as TargetRuntimeMismatch, l as TargetPackageNotFound, n as TargetEntryInvalid, r as TargetPackageInvalid, s as TargetRuntimeUndeclared, t as InvalidTargetOptions } from "../resolve-CNYbGH8g.mjs";
|
|
11
12
|
import { n as SANDBOX_ENV_ALLOWLIST, r as allowlistedEnv, t as LocalSandbox } from "../local-BwC2v2Y8.mjs";
|
|
12
|
-
import { a as DeploymentTimedOut, f as StateLocked, g as StateVersionConflict, i as DeploymentFailed, u as LocalStateInCi } from "../sniffer-
|
|
13
|
-
import { a as UnknownDeployApps, i as TargetBuildsNothing, n as NoDeployableApps, r as RollbackFailed, t as deploy } from "../deploy-
|
|
14
|
-
import { _ as RegistryNotConfigured, g as RegistryAmbiguous, h as HealthCheckTimedOut, m as DeployMigrationsFailed, n as FrontendDeployFailed, r as MissingEnvVars, t as BackendDeployFailed, v as RegistryNotFound, y as ProjectNotOwned } from "../engine-
|
|
15
|
-
import { i as rollbackStage, n as RollbackNeedsApp, r as StageNeverDeployed, t as NothingToRollBack } from "../rollback-
|
|
13
|
+
import { a as DeploymentTimedOut, f as StateLocked, g as StateVersionConflict, i as DeploymentFailed, u as LocalStateInCi } from "../sniffer-BIBm9dAb.mjs";
|
|
14
|
+
import { a as UnknownDeployApps, i as TargetBuildsNothing, n as NoDeployableApps, r as RollbackFailed, t as deploy } from "../deploy-n_IB8r6H.mjs";
|
|
15
|
+
import { _ as RegistryNotConfigured, g as RegistryAmbiguous, h as HealthCheckTimedOut, m as DeployMigrationsFailed, n as FrontendDeployFailed, r as MissingEnvVars, t as BackendDeployFailed, v as RegistryNotFound, y as ProjectNotOwned } from "../engine-DBXuhHyf.mjs";
|
|
16
|
+
import { i as rollbackStage, n as RollbackNeedsApp, r as StageNeverDeployed, t as NothingToRollBack } from "../rollback-BkIkE8Qe.mjs";
|
|
16
17
|
import { t as ProviderRemoved } from "../provider-CEOKk8NS.mjs";
|
|
17
18
|
import { i as SurfacesUnhealthy, r as SstOutputsUnreadable, t as SstConfigNotFound } from "../sst-CGdjHn2A.mjs";
|
|
18
19
|
import { join, resolve } from "node:path";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.mjs","names":[],"sources":["../../src/sandbox/install.ts"],"sourcesContent":["/**\n * Installing a project's dependencies in a sandbox, with or without their\n * lifecycle scripts.\n *\n * `postinstall` is the oldest way into a build machine: any package in the\n * lockfile — a dependency of a dependency — runs whatever it likes the moment\n * it is installed. For a build the host trusts that is how native modules get\n * built. For one it does not, the scripts are skipped, and the few packages\n * that genuinely need theirs (esbuild's binary, a database driver) are named\n * and rebuilt — with nothing but the sandbox's environment either way.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\nimport { detectPackageManager, type PackageManager } from '../docker/templates';\nimport { GkmError } from '../errors';\nimport { CommandFailed } from '../run';\nimport type { Sandbox, SandboxOutput, SandboxResult } from './sandbox';\n\n/** Long enough for a cold install of a large monorepo. */\nexport const INSTALL_TIMEOUT_MS = 15 * 60_000;\n\nexport interface InstallOptions {\n\t/** The directory to install in. Defaults to the sandbox's root. */\n\tcwd?: string;\n\t/** Defaults to the one the lockfile above `cwd` names. */\n\tpackageManager?: PackageManager;\n\t/**\n\t * Skip every lifecycle script — dependencies' and the project's own —\n\t * except those of {@link allowScripts}. Defaults to false: scripts run as\n\t * a plain install runs them, under the package manager's own policy —\n\t * npm 12 and pnpm 10 skip dependencies' scripts nobody approved.\n\t */\n\tignoreScripts?: boolean;\n\t/**\n\t * With `ignoreScripts`, the packages whose scripts still run: rebuilt by\n\t * name once the install is done.\n\t */\n\tallowScripts?: readonly string[];\n\t/** Variables the install needs beyond the sandbox's own. */\n\tenv?: Readonly<Record<string, string>>;\n\t/** Defaults to {@link INSTALL_TIMEOUT_MS}, for each command. */\n\ttimeoutMs?: number;\n\t/** Where the package manager's output goes. Defaults to `inherit`. */\n\toutput?: SandboxOutput;\n\tsignal?: AbortSignal;\n}\n\n/** A name in `allowScripts` that is not a package name. */\nexport class InstallAllowlistNameInvalid extends GkmError {\n\tconstructor(readonly packageName: string) {\n\t\tsuper(\n\t\t\t`'${packageName}' is not a package name, so its scripts cannot be ` +\n\t\t\t\t'allowed. Name the package as it appears in package.json — ' +\n\t\t\t\t\"'esbuild', '@prisma/client'.\",\n\t\t);\n\t\tthis.name = 'InstallAllowlistNameInvalid';\n\t}\n}\n\n/** The package manager has no way to run only some packages' scripts. */\nexport class InstallScriptsAllowlistUnsupported extends GkmError {\n\tconstructor(\n\t\treadonly packageManager: string,\n\t\treadonly allowScripts: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`${packageManager} cannot rebuild named packages after an install ` +\n\t\t\t\t`without scripts, so ${allowScripts.join(', ')} cannot be allowed ` +\n\t\t\t\t'theirs. Use pnpm, npm or Yarn 2+, or install with every script ' +\n\t\t\t\t'skipped.',\n\t\t);\n\t\tthis.name = 'InstallScriptsAllowlistUnsupported';\n\t}\n}\n\n/**\n * npm's package-name grammar, less a leading `-`: each name is an argument to\n * `rebuild`, and must never be read as a flag.\n */\nconst PACKAGE_NAME = /^(?:@[a-z0-9~][a-z0-9._~-]*\\/)?[a-z0-9~][a-z0-9._~-]*$/;\n\n/**\n * The commands an install runs, in order. Exported for the tests, which\n * check each package manager's flags without installing with all four.\n */\nexport function installCommands(\n\tpackageManager: PackageManager,\n\tcwd: string,\n\toptions: Pick<InstallOptions, 'ignoreScripts' | 'allowScripts'> = {},\n): [string, string[]][] {\n\tconst ignore = options.ignoreScripts ?? false;\n\tconst allow = ignore ? [...(options.allowScripts ?? [])] : [];\n\tfor (const name of allow) {\n\t\tif (!PACKAGE_NAME.test(name)) throw new InstallAllowlistNameInvalid(name);\n\t}\n\n\tswitch (packageManager) {\n\t\tcase 'pnpm':\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'pnpm',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t// pnpm 10 builds no dependency it was not told to, even by name;\n\t\t\t\t// this command names exactly the ones allowed, so it may build\n\t\t\t\t// what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'pnpm',\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'rebuild',\n\t\t\t\t\t\t\t\t\t'--config.dangerouslyAllowAllBuilds=true',\n\t\t\t\t\t\t\t\t\t...allow,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\tcase 'npm': {\n\t\t\tconst locked = existsSync(join(cwd, 'package-lock.json'));\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'npm',\n\t\t\t\t\t[locked ? 'ci' : 'install', ...(ignore ? ['--ignore-scripts'] : [])],\n\t\t\t\t],\n\t\t\t\t// npm 12 runs no dependency's install script its `allowScripts`\n\t\t\t\t// policy does not approve, rebuilt by name or not, and refuses\n\t\t\t\t// `--allow-scripts` on a project's command line. This command\n\t\t\t\t// names exactly the packages allowed, so it may run what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'npm',\n\t\t\t\t\t\t\t\t['rebuild', '--dangerously-allow-all-scripts', ...allow],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\t}\n\t\tcase 'yarn': {\n\t\t\t// Yarn 2+ keeps a `.yarnrc.yml`; it skips builds by mode and can\n\t\t\t// rebuild by name. Yarn 1 can only skip them all.\n\t\t\tconst berry = existsSync(join(cwd, '.yarnrc.yml'));\n\t\t\tif (berry) {\n\t\t\t\treturn [\n\t\t\t\t\t[\n\t\t\t\t\t\t'yarn',\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'install',\n\t\t\t\t\t\t\t'--immutable',\n\t\t\t\t\t\t\t...(ignore ? ['--mode=skip-build'] : []),\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t...(allow.length > 0\n\t\t\t\t\t\t? [['yarn', ['rebuild', ...allow]] as [string, string[]]]\n\t\t\t\t\t\t: []),\n\t\t\t\t];\n\t\t\t}\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('Yarn 1', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'yarn',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t\t}\n\t\tcase 'bun':\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('bun', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'bun',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t}\n}\n\n/**\n * Install the project's dependencies in `sandbox`.\n *\n * ```ts\n * // A checkout nobody has reviewed: no scripts but esbuild's.\n * await installDependencies(sandbox, {\n * ignoreScripts: true,\n * allowScripts: ['esbuild'],\n * });\n * ```\n *\n * Resolves with each command's result, in order — with its output when\n * `output` is `capture`.\n *\n * @throws {CommandFailed} when the package manager exits unsuccessfully.\n * @throws {InstallScriptsAllowlistUnsupported} for an allowlist the package\n * manager cannot honour, before anything is installed.\n */\nexport async function installDependencies(\n\tsandbox: Sandbox,\n\toptions: InstallOptions = {},\n): Promise<SandboxResult[]> {\n\tconst cwd = options.cwd ?? sandbox.root;\n\tconst results: SandboxResult[] = [];\n\tconst packageManager =\n\t\toptions.packageManager ?? detectPackageManager(resolve(sandbox.root, cwd));\n\n\tfor (const [command, args] of installCommands(\n\t\tpackageManager,\n\t\tresolve(sandbox.root, cwd),\n\t\toptions,\n\t)) {\n\t\tconst result = await sandbox.exec(command, args, {\n\t\t\tcwd,\n\t\t\tenv: { ...sandbox.env, ...options.env },\n\t\t\ttimeoutMs: options.timeoutMs ?? INSTALL_TIMEOUT_MS,\n\t\t\toutput: options.output ?? 'inherit',\n\t\t\t...(options.signal ? { signal: options.signal } : {}),\n\t\t});\n\t\tresults.push(result);\n\t\tif (result.exitCode !== 0) {\n\t\t\tthrow new CommandFailed(\n\t\t\t\tcommand,\n\t\t\t\targs,\n\t\t\t\tresult.exitCode,\n\t\t\t\tresult.signal as NodeJS.Signals | null,\n\t\t\t);\n\t\t}\n\t}\n\treturn results;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,MAAa,qBAAqB;;AA6BlC,IAAa,8BAAb,cAAiD,SAAS;CACpC;CAArB,YAAY,aAA8B;EACzC,MACC,IAAI,YAAY,yIAGjB;EALoB,KAAA,cAAA;EAMpB,KAAK,OAAO;CACb;AACD;;AAGA,IAAa,qCAAb,cAAwD,SAAS;CAEtD;CACA;CAFV,YACC,gBACA,cACC;EACD,MACC,GAAG,eAAe,sEACM,aAAa,KAAK,IAAI,EAAE,2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AK;GACJ,IAAI,MAAM,SAAS,GAClB,MAAM,IAAI,mCAAmC,OAAO,KAAK;GAE1D,OAAO,CACN,CACC,OACA;IACC;IACA;IACA,GAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC;GACtC,CACD,CACD;CACF;AACD;;;;;;;;;;;;;;;;;;;AAoBA,eAAsB,oBACrB,SACA,UAA0B,CAAC,GACA;CAC3B,MAAM,MAAM,QAAQ,OAAO,QAAQ;CACnC,MAAM,UAA2B,CAAC;CAClC,MAAM,iBACL,QAAQ,kBAAkB,qBAAqB,QAAQ,QAAQ,MAAM,GAAG,CAAC;CAE1E,KAAK,MAAM,CAAC,SAAS,SAAS,gBAC7B,gBACA,QAAQ,QAAQ,MAAM,GAAG,GACzB,OACD,GAAG;EACF,MAAM,SAAS,MAAM,QAAQ,KAAK,SAAS,MAAM;GAChD;GACA,KAAK;IAAE,GAAG,QAAQ;IAAK,GAAG,QAAQ;GAAI;GACtC,WAAW,QAAQ,aAAA;GACnB,QAAQ,QAAQ,UAAU;GAC1B,GAAI,QAAQ,SAAS,EAAE,QAAQ,QAAQ,OAAO,IAAI,CAAC;EACpD,CAAC;EACD,QAAQ,KAAK,MAAM;EACnB,IAAI,OAAO,aAAa,GACvB,MAAM,IAAI,cACT,SACA,MACA,OAAO,UACP,OAAO,MACR;CAEF;CACA,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"public.mjs","names":[],"sources":["../../src/sandbox/install.ts"],"sourcesContent":["/**\n * Installing a project's dependencies in a sandbox, with or without their\n * lifecycle scripts.\n *\n * `postinstall` is the oldest way into a build machine: any package in the\n * lockfile — a dependency of a dependency — runs whatever it likes the moment\n * it is installed. For a build the host trusts that is how native modules get\n * built. For one it does not, the scripts are skipped, and the few packages\n * that genuinely need theirs (esbuild's binary, a database driver) are named\n * and rebuilt — with nothing but the sandbox's environment either way.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join, resolve } from 'node:path';\nimport { detectPackageManager, type PackageManager } from '../docker/templates';\nimport { GkmError } from '../errors';\nimport { CommandFailed } from '../run';\nimport type { Sandbox, SandboxOutput, SandboxResult } from './sandbox';\n\n/** Long enough for a cold install of a large monorepo. */\nexport const INSTALL_TIMEOUT_MS = 15 * 60_000;\n\nexport interface InstallOptions {\n\t/** The directory to install in. Defaults to the sandbox's root. */\n\tcwd?: string;\n\t/** Defaults to the one the lockfile above `cwd` names. */\n\tpackageManager?: PackageManager;\n\t/**\n\t * Skip every lifecycle script — dependencies' and the project's own —\n\t * except those of {@link allowScripts}. Defaults to false: scripts run as\n\t * a plain install runs them, under the package manager's own policy —\n\t * npm 12 and pnpm 10 skip dependencies' scripts nobody approved.\n\t */\n\tignoreScripts?: boolean;\n\t/**\n\t * With `ignoreScripts`, the packages whose scripts still run: rebuilt by\n\t * name once the install is done.\n\t */\n\tallowScripts?: readonly string[];\n\t/** Variables the install needs beyond the sandbox's own. */\n\tenv?: Readonly<Record<string, string>>;\n\t/** Defaults to {@link INSTALL_TIMEOUT_MS}, for each command. */\n\ttimeoutMs?: number;\n\t/** Where the package manager's output goes. Defaults to `inherit`. */\n\toutput?: SandboxOutput;\n\tsignal?: AbortSignal;\n}\n\n/** A name in `allowScripts` that is not a package name. */\nexport class InstallAllowlistNameInvalid extends GkmError {\n\tconstructor(readonly packageName: string) {\n\t\tsuper(\n\t\t\t`'${packageName}' is not a package name, so its scripts cannot be ` +\n\t\t\t\t'allowed. Name the package as it appears in package.json — ' +\n\t\t\t\t\"'esbuild', '@prisma/client'.\",\n\t\t);\n\t\tthis.name = 'InstallAllowlistNameInvalid';\n\t}\n}\n\n/** The package manager has no way to run only some packages' scripts. */\nexport class InstallScriptsAllowlistUnsupported extends GkmError {\n\tconstructor(\n\t\treadonly packageManager: string,\n\t\treadonly allowScripts: readonly string[],\n\t) {\n\t\tsuper(\n\t\t\t`${packageManager} cannot rebuild named packages after an install ` +\n\t\t\t\t`without scripts, so ${allowScripts.join(', ')} cannot be allowed ` +\n\t\t\t\t'theirs. Use pnpm, npm or Yarn 2+, or install with every script ' +\n\t\t\t\t'skipped.',\n\t\t);\n\t\tthis.name = 'InstallScriptsAllowlistUnsupported';\n\t}\n}\n\n/**\n * npm's package-name grammar, less a leading `-`: each name is an argument to\n * `rebuild`, and must never be read as a flag.\n */\nconst PACKAGE_NAME = /^(?:@[a-z0-9~][a-z0-9._~-]*\\/)?[a-z0-9~][a-z0-9._~-]*$/;\n\n/**\n * The commands an install runs, in order. Exported for the tests, which\n * check each package manager's flags without installing with all four.\n */\nexport function installCommands(\n\tpackageManager: PackageManager,\n\tcwd: string,\n\toptions: Pick<InstallOptions, 'ignoreScripts' | 'allowScripts'> = {},\n): [string, string[]][] {\n\tconst ignore = options.ignoreScripts ?? false;\n\tconst allow = ignore ? [...(options.allowScripts ?? [])] : [];\n\tfor (const name of allow) {\n\t\tif (!PACKAGE_NAME.test(name)) throw new InstallAllowlistNameInvalid(name);\n\t}\n\n\tswitch (packageManager) {\n\t\tcase 'pnpm':\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'pnpm',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t// pnpm 10 builds no dependency it was not told to, even by name;\n\t\t\t\t// this command names exactly the ones allowed, so it may build\n\t\t\t\t// what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'pnpm',\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'rebuild',\n\t\t\t\t\t\t\t\t\t'--config.dangerouslyAllowAllBuilds=true',\n\t\t\t\t\t\t\t\t\t...allow,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\tcase 'npm': {\n\t\t\tconst locked = existsSync(join(cwd, 'package-lock.json'));\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'npm',\n\t\t\t\t\t[locked ? 'ci' : 'install', ...(ignore ? ['--ignore-scripts'] : [])],\n\t\t\t\t],\n\t\t\t\t// npm 12 runs no dependency's install script its `allowScripts`\n\t\t\t\t// policy does not approve, rebuilt by name or not, and refuses\n\t\t\t\t// `--allow-scripts` on a project's command line. This command\n\t\t\t\t// names exactly the packages allowed, so it may run what it names.\n\t\t\t\t...(allow.length > 0\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'npm',\n\t\t\t\t\t\t\t\t['rebuild', '--dangerously-allow-all-scripts', ...allow],\n\t\t\t\t\t\t\t] as [string, string[]],\n\t\t\t\t\t\t]\n\t\t\t\t\t: []),\n\t\t\t];\n\t\t}\n\t\tcase 'yarn': {\n\t\t\t// Yarn 2+ keeps a `.yarnrc.yml`; it skips builds by mode and can\n\t\t\t// rebuild by name. Yarn 1 can only skip them all.\n\t\t\tconst berry = existsSync(join(cwd, '.yarnrc.yml'));\n\t\t\tif (berry) {\n\t\t\t\treturn [\n\t\t\t\t\t[\n\t\t\t\t\t\t'yarn',\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'install',\n\t\t\t\t\t\t\t'--immutable',\n\t\t\t\t\t\t\t...(ignore ? ['--mode=skip-build'] : []),\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t...(allow.length > 0\n\t\t\t\t\t\t? [['yarn', ['rebuild', ...allow]] as [string, string[]]]\n\t\t\t\t\t\t: []),\n\t\t\t\t];\n\t\t\t}\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('Yarn 1', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'yarn',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t\t}\n\t\tcase 'bun':\n\t\t\tif (allow.length > 0) {\n\t\t\t\tthrow new InstallScriptsAllowlistUnsupported('bun', allow);\n\t\t\t}\n\t\t\treturn [\n\t\t\t\t[\n\t\t\t\t\t'bun',\n\t\t\t\t\t[\n\t\t\t\t\t\t'install',\n\t\t\t\t\t\t'--frozen-lockfile',\n\t\t\t\t\t\t...(ignore ? ['--ignore-scripts'] : []),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t}\n}\n\n/**\n * Install the project's dependencies in `sandbox`.\n *\n * ```ts\n * // A checkout nobody has reviewed: no scripts but esbuild's.\n * await installDependencies(sandbox, {\n * ignoreScripts: true,\n * allowScripts: ['esbuild'],\n * });\n * ```\n *\n * Resolves with each command's result, in order — with its output when\n * `output` is `capture`.\n *\n * @throws {CommandFailed} when the package manager exits unsuccessfully.\n * @throws {InstallScriptsAllowlistUnsupported} for an allowlist the package\n * manager cannot honour, before anything is installed.\n */\nexport async function installDependencies(\n\tsandbox: Sandbox,\n\toptions: InstallOptions = {},\n): Promise<SandboxResult[]> {\n\tconst cwd = options.cwd ?? sandbox.root;\n\tconst results: SandboxResult[] = [];\n\tconst packageManager =\n\t\toptions.packageManager ?? detectPackageManager(resolve(sandbox.root, cwd));\n\n\tfor (const [command, args] of installCommands(\n\t\tpackageManager,\n\t\tresolve(sandbox.root, cwd),\n\t\toptions,\n\t)) {\n\t\tconst result = await sandbox.exec(command, args, {\n\t\t\tcwd,\n\t\t\tenv: { ...sandbox.env, ...options.env },\n\t\t\ttimeoutMs: options.timeoutMs ?? INSTALL_TIMEOUT_MS,\n\t\t\toutput: options.output ?? 'inherit',\n\t\t\t...(options.signal ? { signal: options.signal } : {}),\n\t\t});\n\t\tresults.push(result);\n\t\tif (result.exitCode !== 0) {\n\t\t\tthrow new CommandFailed(\n\t\t\t\tcommand,\n\t\t\t\targs,\n\t\t\t\tresult.exit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OAAO;AACR"}
|
|
@@ -5,15 +5,15 @@ const require_credentials = require("./credentials-Zqr3QQYB.cjs");
|
|
|
5
5
|
const require_discover = require("./discover-DPgu-ScS.cjs");
|
|
6
6
|
const require_sandbox = require("./sandbox-CHv3OYXg.cjs");
|
|
7
7
|
const require_derive = require("./derive-DAbo49sm.cjs");
|
|
8
|
-
const require_workspace = require("./workspace-
|
|
8
|
+
const require_workspace = require("./workspace-DRjdu1OY.cjs");
|
|
9
9
|
const require_define = require("./define-crmMcXFS.cjs");
|
|
10
10
|
const require_config = require("./config.cjs");
|
|
11
|
-
const require_seeds = require("./seeds-
|
|
12
|
-
const
|
|
11
|
+
const require_seeds = require("./seeds-BNHSpjNP.cjs");
|
|
12
|
+
const require_identity = require("./identity-CbLfgQNT.cjs");
|
|
13
|
+
const require_resolve = require("./resolve-DC98Rl1t.cjs");
|
|
13
14
|
const require_local = require("./local-DNhnkugT.cjs");
|
|
14
|
-
const require_sniffer = require("./sniffer-
|
|
15
|
-
const require_dns = require("./dns-
|
|
16
|
-
const require_dns$1 = require("./dns-4RAiVFa7.cjs");
|
|
15
|
+
const require_sniffer = require("./sniffer-Cylp9W2D.cjs");
|
|
16
|
+
const require_dns = require("./dns-kp8To8Qj.cjs");
|
|
17
17
|
const require_credentialSchemas = require("./credentialSchemas-CAPKFkrG.cjs");
|
|
18
18
|
let node_path = require("node:path");
|
|
19
19
|
let _geekmidas_manifest = require("@geekmidas/manifest");
|
|
@@ -50,7 +50,7 @@ var Redactor = class {
|
|
|
50
50
|
function secretValues(secrets) {
|
|
51
51
|
return [
|
|
52
52
|
secrets.seed,
|
|
53
|
-
...Object.
|
|
53
|
+
...Object.entries(secrets.custom ?? {}).filter(([key]) => !require_workspace.isReservedStageKey(key)).map(([, value]) => value),
|
|
54
54
|
...Object.values(secrets.urls ?? {}),
|
|
55
55
|
...Object.values(secrets.services ?? {}).map((service) => service?.password)
|
|
56
56
|
].filter((value) => typeof value === "string");
|
|
@@ -80,6 +80,12 @@ async function deploySecrets(workspace, stage, redactor, options = {}) {
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
//#endregion
|
|
83
|
+
//#region src/providers/dns.ts
|
|
84
|
+
/** Whether the workspace deploys through the compose target. */
|
|
85
|
+
function deploysWithCompose(workspace) {
|
|
86
|
+
return workspace.deploy?.default === "compose" || Object.values(workspace.apps).some((app) => app.resolvedDeployTarget === "compose");
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
83
89
|
//#region src/providers/aws.ts
|
|
84
90
|
/**
|
|
85
91
|
* The AWS account a provider provisions in — the stage's, found the way the
|
|
@@ -1134,7 +1140,7 @@ var ProviderCredentialsMissing = class extends require_errors.GkmError {
|
|
|
1134
1140
|
describe;
|
|
1135
1141
|
login;
|
|
1136
1142
|
constructor(stage, kind, provider, ids, env, describe, login) {
|
|
1137
|
-
super(`deploy.${kind}.${stage} is ${provider}, so the deploy creates what ${ids.join(", ")} ${ids.length === 1 ? "is" : "are"} backed by on '${stage}' and writes ${ids.length === 1 ? "its key" : "their keys"} into the stage's secrets — and it found no ${provider} credentials to do it with. On this machine, supply ${describe}` + (login ? `, or run gkm login --provider ${login}` : "") + `. In CI, the step that runs the deploy
|
|
1143
|
+
super(`deploy.${kind}.${stage} is ${provider}, so the deploy creates what ${ids.join(", ")} ${ids.length === 1 ? "is" : "are"} backed by on '${stage}' and writes ${ids.length === 1 ? "its key" : "their keys"} into the stage's secrets — and it found no ${provider} credentials to do it with. On this machine, supply ${describe}` + (login ? `, or run gkm login --provider ${login}` : "") + `. In CI, the step that runs the deploy needs them: the '${stage}' environment's role (AWS_ROLE_ARN, from gkm deploy:github), assumed before that step. With the keys set by hand instead, set deploy.${kind}.${stage} to 'external'.`);
|
|
1138
1144
|
this.stage = stage;
|
|
1139
1145
|
this.kind = kind;
|
|
1140
1146
|
this.provider = provider;
|
|
@@ -1198,10 +1204,10 @@ async function provisionStage(options) {
|
|
|
1198
1204
|
});
|
|
1199
1205
|
}
|
|
1200
1206
|
if (configured.length === 0) return reports;
|
|
1201
|
-
const identity =
|
|
1207
|
+
const identity = require_identity.deployIdentity(workspace, stage);
|
|
1202
1208
|
let secrets = (await options.secrets.read())?.custom ?? {};
|
|
1203
1209
|
for (const entry of configured) entry.report.planned = entry.provider.runtimeKeys(manifest).filter((key) => secrets[key] === void 0);
|
|
1204
|
-
const state = dryRun ? await readOnlyState(options.state, stage) : journalState(await require_seeds.DeployJournal.open(options.state, stage, () =>
|
|
1210
|
+
const state = dryRun ? await readOnlyState(options.state, stage) : journalState(await require_seeds.DeployJournal.open(options.state, stage, () => deploysWithCompose(workspace) ? require_seeds.createComposeState(stage) : require_seeds.createEmptyState(stage, "", "")));
|
|
1205
1211
|
const writeSecrets = async (values) => {
|
|
1206
1212
|
if (dryRun) return;
|
|
1207
1213
|
const stored = await options.secrets.read() ?? require_seeds.initStageSecrets(stage);
|
|
@@ -1439,13 +1445,6 @@ async function assertStageReady(ctx) {
|
|
|
1439
1445
|
* reporting each as it starts, finishes or fails. Everything that is about
|
|
1440
1446
|
* *where* the stage goes is the target's.
|
|
1441
1447
|
*/
|
|
1442
|
-
/** `--resources-only` with `--skip-resources`: the one asks for what the other skips. */
|
|
1443
|
-
var ResourcesOnlyAndSkipped = class extends require_errors.GkmError {
|
|
1444
|
-
constructor() {
|
|
1445
|
-
super("--resources-only creates the stage's resources and nothing else, and --skip-resources deploys without creating them. Run the first where the cloud credentials are (a CI runner), then the second where the stack runs.");
|
|
1446
|
-
this.name = "ResourcesOnlyAndSkipped";
|
|
1447
|
-
}
|
|
1448
|
-
};
|
|
1449
1448
|
/** Apps were asked for by name that the workspace does not have. */
|
|
1450
1449
|
var UnknownDeployApps = class extends require_errors.GkmError {
|
|
1451
1450
|
apps;
|
|
@@ -1557,7 +1556,7 @@ async function runDeploy(source, request, ctx) {
|
|
|
1557
1556
|
}
|
|
1558
1557
|
const { resolved, phaseCtx, store } = prepared;
|
|
1559
1558
|
const { target } = resolved;
|
|
1560
|
-
const resources = !ctx.buildOnly &&
|
|
1559
|
+
const resources = !ctx.buildOnly && phaseCtx.stage !== phaseCtx.workspace.stages.local;
|
|
1561
1560
|
const provision = async () => {
|
|
1562
1561
|
if (!request.skipDns && resolved.target.runtime === "server") try {
|
|
1563
1562
|
await require_dns.dnsCredentials(phaseCtx.stage, require_dns.stageDnsDomains(phaseCtx.stage, phaseCtx.workspace.domains, phaseCtx.workspace.dns), ctx.credentials);
|
|
@@ -1573,7 +1572,6 @@ async function runDeploy(source, request, ctx) {
|
|
|
1573
1572
|
};
|
|
1574
1573
|
if (ctx.dryRun) {
|
|
1575
1574
|
if (resources) await provision();
|
|
1576
|
-
if (request.resourcesOnly) return resourcesOnly(target, phaseCtx, emit);
|
|
1577
1575
|
const run = await validate(phaseCtx, emit, () => readyToDeploy(target, phaseCtx));
|
|
1578
1576
|
await phase("plan", () => target.plan(phaseCtx, run));
|
|
1579
1577
|
return target.result(phaseCtx, run);
|
|
@@ -1608,7 +1606,6 @@ async function runDeploy(source, request, ctx) {
|
|
|
1608
1606
|
throw error;
|
|
1609
1607
|
}
|
|
1610
1608
|
if (resources) await provision();
|
|
1611
|
-
if (request.resourcesOnly) return resourcesOnly(target, phaseCtx, emit);
|
|
1612
1609
|
const run = await validate(phaseCtx, emit, () => readyToDeploy(target, phaseCtx));
|
|
1613
1610
|
if (target.provision) await phase("provision", () => target.provision(phaseCtx, run));
|
|
1614
1611
|
if (target.build) await phase("build", () => target.build(phaseCtx, run));
|
|
@@ -1682,41 +1679,6 @@ async function provisionResources(phaseCtx, request, ctx, store, emit) {
|
|
|
1682
1679
|
}
|
|
1683
1680
|
/** What a dry run reads for a key its providers would write. */
|
|
1684
1681
|
const PLANNED_BY_THE_DEPLOY = "s3://planned-by-this-deploy";
|
|
1685
|
-
/** `--resources-only`: the target's own resources, and nothing else. */
|
|
1686
|
-
async function resourcesOnly(target, phaseCtx, emit) {
|
|
1687
|
-
try {
|
|
1688
|
-
if (target.resources) await target.resources(phaseCtx);
|
|
1689
|
-
} catch (error) {
|
|
1690
|
-
emit({
|
|
1691
|
-
type: "phase.failed",
|
|
1692
|
-
phase: "validate",
|
|
1693
|
-
error: require_sniffer.eventError(error)
|
|
1694
|
-
});
|
|
1695
|
-
throw error;
|
|
1696
|
-
}
|
|
1697
|
-
emit({
|
|
1698
|
-
type: "phase.finished",
|
|
1699
|
-
phase: "validate"
|
|
1700
|
-
});
|
|
1701
|
-
return resourcesResult(phaseCtx);
|
|
1702
|
-
}
|
|
1703
|
-
/** A `--resources-only` run: no app was deployed. */
|
|
1704
|
-
function resourcesResult(phaseCtx) {
|
|
1705
|
-
return {
|
|
1706
|
-
apps: [],
|
|
1707
|
-
projectId: "",
|
|
1708
|
-
successCount: 0,
|
|
1709
|
-
failedCount: 0,
|
|
1710
|
-
stage: phaseCtx.stage,
|
|
1711
|
-
identity: phaseCtx.identity.key,
|
|
1712
|
-
tag: phaseCtx.tag,
|
|
1713
|
-
dryRun: phaseCtx.dryRun,
|
|
1714
|
-
environmentId: "",
|
|
1715
|
-
skipped: [...phaseCtx.skipped],
|
|
1716
|
-
urls: {},
|
|
1717
|
-
changes: []
|
|
1718
|
-
};
|
|
1719
|
-
}
|
|
1720
1682
|
/**
|
|
1721
1683
|
* What a deploy validates: the stage ready to be deployed — every key it
|
|
1722
1684
|
* needs, read as its providers left them — then what the target would run,
|
|
@@ -1760,7 +1722,6 @@ async function validate(phaseCtx, emit, body) {
|
|
|
1760
1722
|
/** Everything the phases are handed, worked out before the first of them. */
|
|
1761
1723
|
async function prepare(source, request, ctx, emit, redactor) {
|
|
1762
1724
|
const { stage } = request;
|
|
1763
|
-
if (request.resourcesOnly && request.skipResources) throw new ResourcesOnlyAndSkipped();
|
|
1764
1725
|
const configured = typeof source === "function" ? await source() : source;
|
|
1765
1726
|
const local = stage === configured.stages.local;
|
|
1766
1727
|
if (!local) require_workspace.assertDeployedStage(configured.stages, stage);
|
|
@@ -1796,7 +1757,7 @@ async function prepare(source, request, ctx, emit, redactor) {
|
|
|
1796
1757
|
...configured,
|
|
1797
1758
|
apps: units
|
|
1798
1759
|
} : configured;
|
|
1799
|
-
const identity =
|
|
1760
|
+
const identity = require_identity.deployIdentity(workspace, stage);
|
|
1800
1761
|
const tag = request.tag ?? (resolved.target.tag ? await resolved.target.tag({
|
|
1801
1762
|
cwd: workspace.root,
|
|
1802
1763
|
stage
|
|
@@ -1866,7 +1827,6 @@ async function prepare(source, request, ctx, emit, redactor) {
|
|
|
1866
1827
|
atomic: request.atomic ?? false,
|
|
1867
1828
|
allowDevServices,
|
|
1868
1829
|
...request.skipDns ? { skipDns: true } : {},
|
|
1869
|
-
...request.skipResources ? { skipResources: true } : {},
|
|
1870
1830
|
credentials: ctx.credentials,
|
|
1871
1831
|
state: store,
|
|
1872
1832
|
secrets,
|
|
@@ -1875,7 +1835,7 @@ async function prepare(source, request, ctx, emit, redactor) {
|
|
|
1875
1835
|
childOutput: ctx.childOutput ?? "inherit",
|
|
1876
1836
|
emit,
|
|
1877
1837
|
skip,
|
|
1878
|
-
name: (resource) =>
|
|
1838
|
+
name: (resource) => require_identity.applicationName(identity, resource)
|
|
1879
1839
|
},
|
|
1880
1840
|
store
|
|
1881
1841
|
};
|
|
@@ -1981,8 +1941,6 @@ function deploy(input) {
|
|
|
1981
1941
|
...input.atomic ? { atomic: true } : {},
|
|
1982
1942
|
...input.allowDevServices ? { allowDevServices: input.allowDevServices } : {},
|
|
1983
1943
|
...input.skipDns ? { skipDns: true } : {},
|
|
1984
|
-
...input.resourcesOnly ? { resourcesOnly: true } : {},
|
|
1985
|
-
...input.skipResources ? { skipResources: true } : {},
|
|
1986
1944
|
...input.rotateKeys ? { rotateKeys: true } : {},
|
|
1987
1945
|
...input.retireOldKeys ? { retireOldKeys: true } : {}
|
|
1988
1946
|
}, ctx));
|
|
@@ -2058,6 +2016,12 @@ Object.defineProperty(exports, "deploy", {
|
|
|
2058
2016
|
return deploy;
|
|
2059
2017
|
}
|
|
2060
2018
|
});
|
|
2019
|
+
Object.defineProperty(exports, "deploysWithCompose", {
|
|
2020
|
+
enumerable: true,
|
|
2021
|
+
get: function() {
|
|
2022
|
+
return deploysWithCompose;
|
|
2023
|
+
}
|
|
2024
|
+
});
|
|
2061
2025
|
Object.defineProperty(exports, "iamUserName", {
|
|
2062
2026
|
enumerable: true,
|
|
2063
2027
|
get: function() {
|
|
@@ -2065,4 +2029,4 @@ Object.defineProperty(exports, "iamUserName", {
|
|
|
2065
2029
|
}
|
|
2066
2030
|
});
|
|
2067
2031
|
|
|
2068
|
-
//# sourceMappingURL=deploy-
|
|
2032
|
+
//# sourceMappingURL=deploy-CbJMJsgX.cjs.map
|