@geekmidas/cli 10.0.0-alpha.74 → 10.0.0-alpha.76

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.
Files changed (161) hide show
  1. package/dist/{LegacyStateStore-D_78eaHM.cjs → LegacyStateStore-DwngfJxr.cjs} +2 -2
  2. package/dist/{LegacyStateStore-D_78eaHM.cjs.map → LegacyStateStore-DwngfJxr.cjs.map} +1 -1
  3. package/dist/{LegacyStateStore-DTo7z924.mjs → LegacyStateStore-dyq07_Ir.mjs} +2 -2
  4. package/dist/{LegacyStateStore-DTo7z924.mjs.map → LegacyStateStore-dyq07_Ir.mjs.map} +1 -1
  5. package/dist/{LocalStateStore-BhrlQIXD.cjs → LocalStateStore-B0NCde8Z.cjs} +2 -2
  6. package/dist/{LocalStateStore-BhrlQIXD.cjs.map → LocalStateStore-B0NCde8Z.cjs.map} +1 -1
  7. package/dist/{LocalStateStore-CNjgkRk4.mjs → LocalStateStore-DLxCCatI.mjs} +2 -2
  8. package/dist/{LocalStateStore-CNjgkRk4.mjs.map → LocalStateStore-DLxCCatI.mjs.map} +1 -1
  9. package/dist/{S3StateStore-oCxRs6HM.cjs → S3StateStore-BOenb-3o.cjs} +2 -2
  10. package/dist/{S3StateStore-oCxRs6HM.cjs.map → S3StateStore-BOenb-3o.cjs.map} +1 -1
  11. package/dist/{S3StateStore-g2P7T_Mo.mjs → S3StateStore-CGK_4hlo.mjs} +2 -2
  12. package/dist/{S3StateStore-g2P7T_Mo.mjs.map → S3StateStore-CGK_4hlo.mjs.map} +1 -1
  13. package/dist/{SSMStateStore-CYenunmK.mjs → SSMStateStore-B_5_RqY-.mjs} +2 -2
  14. package/dist/{SSMStateStore-CYenunmK.mjs.map → SSMStateStore-B_5_RqY-.mjs.map} +1 -1
  15. package/dist/{SSMStateStore-DXp0m7XI.cjs → SSMStateStore-DYeD__7p.cjs} +2 -2
  16. package/dist/{SSMStateStore-DXp0m7XI.cjs.map → SSMStateStore-DYeD__7p.cjs.map} +1 -1
  17. package/dist/{add-BTH7WaH3.mjs → add-B7IMXzou.mjs} +3 -3
  18. package/dist/{add-BTH7WaH3.mjs.map → add-B7IMXzou.mjs.map} +1 -1
  19. package/dist/{add-Djrr12Xc.cjs → add-j2yI3cbS.cjs} +3 -3
  20. package/dist/{add-Djrr12Xc.cjs.map → add-j2yI3cbS.cjs.map} +1 -1
  21. package/dist/{aws-DojzQnLd.mjs → aws-Bja4zGSs.mjs} +13 -9
  22. package/dist/aws-Bja4zGSs.mjs.map +1 -0
  23. package/dist/{aws-DkHdTV-p.cjs → aws-CQAuluiu.cjs} +13 -9
  24. package/dist/aws-CQAuluiu.cjs.map +1 -0
  25. package/dist/awsStore-7VmS_cZR.cjs +54 -0
  26. package/dist/awsStore-7VmS_cZR.cjs.map +1 -0
  27. package/dist/awsStore-B529csle.mjs +43 -0
  28. package/dist/awsStore-B529csle.mjs.map +1 -0
  29. package/dist/{bundler-utHuESvL.cjs → bundler-Cf6OgaOe.cjs} +5 -5
  30. package/dist/bundler-Cf6OgaOe.cjs.map +1 -0
  31. package/dist/{bundler-BUojOkof.mjs → bundler-DO6bHhnb.mjs} +5 -5
  32. package/dist/bundler-DO6bHhnb.mjs.map +1 -0
  33. package/dist/{cli-CyYceKTS.mjs → cli-BCPOHmg9.mjs} +3 -3
  34. package/dist/{cli-CyYceKTS.mjs.map → cli-BCPOHmg9.mjs.map} +1 -1
  35. package/dist/{cli-Bx0sUzxH.cjs → cli-CNanUB7a.cjs} +3 -3
  36. package/dist/{cli-Bx0sUzxH.cjs.map → cli-CNanUB7a.cjs.map} +1 -1
  37. package/dist/{compose-DZp8DJ0A.mjs → compose-Dq4VCtu5.mjs} +221 -153
  38. package/dist/compose-Dq4VCtu5.mjs.map +1 -0
  39. package/dist/{compose-iuw8wfHk.cjs → compose-h_6oNnHC.cjs} +243 -151
  40. package/dist/compose-h_6oNnHC.cjs.map +1 -0
  41. package/dist/{config-B38YWicj.d.cts → config-CWyhLSY1.d.cts} +3 -3
  42. package/dist/{config-B38YWicj.d.cts.map → config-CWyhLSY1.d.cts.map} +1 -1
  43. package/dist/{config-DA0kRTQe.d.mts → config-CqAvPP-f.d.mts} +3 -3
  44. package/dist/{config-DA0kRTQe.d.mts.map → config-CqAvPP-f.d.mts.map} +1 -1
  45. package/dist/config.cjs +1 -1
  46. package/dist/config.d.cts +3 -3
  47. package/dist/config.d.mts +3 -3
  48. package/dist/config.mjs +1 -1
  49. package/dist/deploy/public.cjs +7 -6
  50. package/dist/deploy/public.d.cts +14 -3
  51. package/dist/deploy/public.d.cts.map +1 -1
  52. package/dist/deploy/public.d.mts +14 -3
  53. package/dist/deploy/public.d.mts.map +1 -1
  54. package/dist/deploy/public.mjs +7 -7
  55. package/dist/{deploy-eWorhvQp.cjs → deploy-CT3R9de9.cjs} +27 -5
  56. package/dist/deploy-CT3R9de9.cjs.map +1 -0
  57. package/dist/{deploy-C17K7Imy.mjs → deploy-CVXEx7Nm.mjs} +22 -6
  58. package/dist/deploy-CVXEx7Nm.mjs.map +1 -0
  59. package/dist/{dokploy-DKa49Nqm.mjs → dokploy-CYm2ozFs.mjs} +2 -2
  60. package/dist/{dokploy-DKa49Nqm.mjs.map → dokploy-CYm2ozFs.mjs.map} +1 -1
  61. package/dist/{dokploy-DKzcI-RL.cjs → dokploy-eSGmlhhj.cjs} +2 -2
  62. package/dist/{dokploy-DKzcI-RL.cjs.map → dokploy-eSGmlhhj.cjs.map} +1 -1
  63. package/dist/{encryption-sTMz3aWi.mjs → encryption-DC0rsR1W.mjs} +3 -3
  64. package/dist/{encryption-sTMz3aWi.mjs.map → encryption-DC0rsR1W.mjs.map} +1 -1
  65. package/dist/{encryption-DSkJdoyk.cjs → encryption-vS3Qzw73.cjs} +3 -3
  66. package/dist/{encryption-DSkJdoyk.cjs.map → encryption-vS3Qzw73.cjs.map} +1 -1
  67. package/dist/{engine-B1b4I34Z.mjs → engine-BOO5TWZd.mjs} +193 -5
  68. package/dist/engine-BOO5TWZd.mjs.map +1 -0
  69. package/dist/{engine-Bh76sAHy.cjs → engine-C0N2d1i5.cjs} +196 -8
  70. package/dist/engine-C0N2d1i5.cjs.map +1 -0
  71. package/dist/{github-C9ODoyZU.mjs → github-CEaFDL6t.mjs} +6 -6
  72. package/dist/github-CEaFDL6t.mjs.map +1 -0
  73. package/dist/{github-BvN3CfxM.cjs → github-ClkdCOL9.cjs} +6 -6
  74. package/dist/github-ClkdCOL9.cjs.map +1 -0
  75. package/dist/{index-B-1lLGzy.d.mts → index-Ccu0f_2m.d.cts} +2 -2
  76. package/dist/{index-B-1lLGzy.d.mts.map → index-Ccu0f_2m.d.cts.map} +1 -1
  77. package/dist/{index-vMidfqhU.d.cts → index-DOxmDKqv.d.mts} +2 -2
  78. package/dist/{index-vMidfqhU.d.cts.map → index-DOxmDKqv.d.mts.map} +1 -1
  79. package/dist/index.cjs +106 -52
  80. package/dist/index.cjs.map +1 -1
  81. package/dist/index.mjs +105 -51
  82. package/dist/index.mjs.map +1 -1
  83. package/dist/migrate-BRbYtFXG.cjs +93 -0
  84. package/dist/migrate-BRbYtFXG.cjs.map +1 -0
  85. package/dist/migrate-D3NAT7Ns.mjs +93 -0
  86. package/dist/migrate-D3NAT7Ns.mjs.map +1 -0
  87. package/dist/{migrate-B0FCZNkp.cjs → migrate-D5_-ylI1.cjs} +3 -3
  88. package/dist/{migrate-B0FCZNkp.cjs.map → migrate-D5_-ylI1.cjs.map} +1 -1
  89. package/dist/{migrate-CTtJhGV9.mjs → migrate-DrO2p9Rl.mjs} +3 -3
  90. package/dist/{migrate-CTtJhGV9.mjs.map → migrate-DrO2p9Rl.mjs.map} +1 -1
  91. package/dist/openapi.cjs +16 -6
  92. package/dist/openapi.cjs.map +1 -1
  93. package/dist/openapi.d.cts +1 -1
  94. package/dist/openapi.d.cts.map +1 -1
  95. package/dist/openapi.d.mts +1 -1
  96. package/dist/openapi.d.mts.map +1 -1
  97. package/dist/openapi.mjs +16 -6
  98. package/dist/openapi.mjs.map +1 -1
  99. package/dist/reconcile/public.d.cts +1 -1
  100. package/dist/reconcile/public.d.mts +1 -1
  101. package/dist/{resolve-DSAXj_47.mjs → resolve-C1muFos5.mjs} +3 -3
  102. package/dist/{resolve-DSAXj_47.mjs.map → resolve-C1muFos5.mjs.map} +1 -1
  103. package/dist/{resolve-D_BU-wKA.cjs → resolve-Fa1Ii0BK.cjs} +3 -3
  104. package/dist/{resolve-D_BU-wKA.cjs.map → resolve-Fa1Ii0BK.cjs.map} +1 -1
  105. package/dist/{rollback-DJy3t696.cjs → rollback-C9N5lKVf.cjs} +5 -5
  106. package/dist/{rollback-DJy3t696.cjs.map → rollback-C9N5lKVf.cjs.map} +1 -1
  107. package/dist/{rollback-CWYTUhfW.mjs → rollback-DeQzbRqM.mjs} +5 -5
  108. package/dist/{rollback-CWYTUhfW.mjs.map → rollback-DeQzbRqM.mjs.map} +1 -1
  109. package/dist/{runtime-BzZD5HHi.d.cts → runtime-BSvzPqXW.d.mts} +2 -2
  110. package/dist/{runtime-BzZD5HHi.d.cts.map → runtime-BSvzPqXW.d.mts.map} +1 -1
  111. package/dist/{runtime-Cm6J6L7n.d.mts → runtime-Cm7QA53H.d.cts} +2 -2
  112. package/dist/{runtime-Cm6J6L7n.d.mts.map → runtime-Cm7QA53H.d.cts.map} +1 -1
  113. package/dist/secretsManager-DUXW3fQt.cjs +70 -0
  114. package/dist/secretsManager-DUXW3fQt.cjs.map +1 -0
  115. package/dist/secretsManager-Ti0oZwsS.mjs +70 -0
  116. package/dist/secretsManager-Ti0oZwsS.mjs.map +1 -0
  117. package/dist/{sniffer-BFmdZpZ2.mjs → sniffer-DR8AlRCk.mjs} +67 -15
  118. package/dist/sniffer-DR8AlRCk.mjs.map +1 -0
  119. package/dist/{sniffer-C-T7dSMN.cjs → sniffer-Y6GQOCXB.cjs} +83 -13
  120. package/dist/sniffer-Y6GQOCXB.cjs.map +1 -0
  121. package/dist/{state-DCwRWyh-.cjs → state-C2qi0iQw.cjs} +241 -334
  122. package/dist/state-C2qi0iQw.cjs.map +1 -0
  123. package/dist/{state-DpkxSwzI.mjs → state-CUecOCNJ.mjs} +213 -306
  124. package/dist/state-CUecOCNJ.mjs.map +1 -0
  125. package/dist/target/public.cjs +1 -1
  126. package/dist/target/public.d.cts +2 -2
  127. package/dist/target/public.d.mts +2 -2
  128. package/dist/target/public.mjs +1 -1
  129. package/dist/{types-TzCChNrA.d.cts → types-BdptGBFS.d.cts} +59 -6
  130. package/dist/types-BdptGBFS.d.cts.map +1 -0
  131. package/dist/{types-Dp9lgx_S.d.mts → types-OxE0OAn2.d.mts} +59 -6
  132. package/dist/types-OxE0OAn2.d.mts.map +1 -0
  133. package/dist/workspace/index.cjs +1 -1
  134. package/dist/workspace/index.d.cts +2 -2
  135. package/dist/workspace/index.d.mts +2 -2
  136. package/dist/workspace/index.mjs +1 -1
  137. package/dist/{workspace-vdrcRI-m.cjs → workspace-DOm81oUo.cjs} +54 -1
  138. package/dist/workspace-DOm81oUo.cjs.map +1 -0
  139. package/dist/{workspace-C7NqCsQF.mjs → workspace-QUTqYmVy.mjs} +43 -2
  140. package/dist/workspace-QUTqYmVy.mjs.map +1 -0
  141. package/package.json +18 -17
  142. package/dist/aws-DkHdTV-p.cjs.map +0 -1
  143. package/dist/aws-DojzQnLd.mjs.map +0 -1
  144. package/dist/bundler-BUojOkof.mjs.map +0 -1
  145. package/dist/bundler-utHuESvL.cjs.map +0 -1
  146. package/dist/compose-DZp8DJ0A.mjs.map +0 -1
  147. package/dist/compose-iuw8wfHk.cjs.map +0 -1
  148. package/dist/deploy-C17K7Imy.mjs.map +0 -1
  149. package/dist/deploy-eWorhvQp.cjs.map +0 -1
  150. package/dist/engine-B1b4I34Z.mjs.map +0 -1
  151. package/dist/engine-Bh76sAHy.cjs.map +0 -1
  152. package/dist/github-BvN3CfxM.cjs.map +0 -1
  153. package/dist/github-C9ODoyZU.mjs.map +0 -1
  154. package/dist/sniffer-BFmdZpZ2.mjs.map +0 -1
  155. package/dist/sniffer-C-T7dSMN.cjs.map +0 -1
  156. package/dist/state-DCwRWyh-.cjs.map +0 -1
  157. package/dist/state-DpkxSwzI.mjs.map +0 -1
  158. package/dist/types-Dp9lgx_S.d.mts.map +0 -1
  159. package/dist/types-TzCChNrA.d.cts.map +0 -1
  160. package/dist/workspace-C7NqCsQF.mjs.map +0 -1
  161. package/dist/workspace-vdrcRI-m.cjs.map +0 -1
@@ -1,20 +1,208 @@
1
+ const require_run = require("./run-fVZ-rLnc.cjs");
1
2
  const require_credentials = require("./credentials-BVs7mrtw.cjs");
2
3
  const require_schemas = require("./schemas-BObwxB_t.cjs");
3
4
  const require_discover = require("./discover-D1It5r_h.cjs");
4
5
  const require_sandbox = require("./sandbox-CL--ZDui.cjs");
5
6
  const require_derive = require("./derive-DAbo49sm.cjs");
6
- const require_workspace = require("./workspace-vdrcRI-m.cjs");
7
- const require_state = require("./state-DCwRWyh-.cjs");
8
- const require_sniffer = require("./sniffer-C-T7dSMN.cjs");
7
+ const require_workspace = require("./workspace-DOm81oUo.cjs");
8
+ const require_state = require("./state-C2qi0iQw.cjs");
9
+ const require_sniffer = require("./sniffer-Y6GQOCXB.cjs");
9
10
  const require_provider = require("./provider-B3Sv_a74.cjs");
10
11
  const require_credentialSchemas = require("./credentialSchemas-DCR4Wd1W.cjs");
11
12
  let node_path = require("node:path");
13
+ let node_fs_promises = require("node:fs/promises");
14
+ let node_os = require("node:os");
12
15
  let _geekmidas_manifest = require("@geekmidas/manifest");
13
16
  let node_crypto = require("node:crypto");
14
17
  let _geekmidas_db_pg_roles = require("@geekmidas/db/pg/roles");
15
18
  let pg = require("pg");
16
19
  let _geekmidas_cache_postgres = require("@geekmidas/cache/postgres");
17
20
  let node_dns_promises = require("node:dns/promises");
21
+ //#region src/deploy/docker.ts
22
+ const logger$3 = require_discover.output;
23
+ /**
24
+ * The id the Dockerfile templates mount the encrypted credentials under:
25
+ * `RUN --mount=type=secret,id=gkm_credentials`.
26
+ */
27
+ const CREDENTIALS_SECRET_ID = "gkm_credentials";
28
+ /**
29
+ * Get the full image reference
30
+ */
31
+ function getImageRef(registry, imageName, tag) {
32
+ if (registry) return `${registry}/${imageName}:${tag}`;
33
+ return `${imageName}:${tag}`;
34
+ }
35
+ /**
36
+ * The `docker build` argv for an image.
37
+ *
38
+ * One element per value, so nothing in a ref or a build arg is read by a
39
+ * shell, and `--opt=value` rather than `--opt value`, so a value that starts
40
+ * with `-` cannot be taken for one of docker's own flags.
41
+ *
42
+ * @internal Exported for testing
43
+ */
44
+ function dockerBuildArgs(options) {
45
+ const { dockerfilePath, imageRef, buildArgs = [], credentialsFile } = options;
46
+ return [
47
+ "build",
48
+ "--platform=linux/amd64",
49
+ `--file=${dockerfilePath}`,
50
+ `--tag=${imageRef}`,
51
+ ...buildArgs.map((arg) => `--build-arg=${arg}`),
52
+ ...credentialsFile ? [`--secret=id=${CREDENTIALS_SECRET_ID},src=${credentialsFile}`] : [],
53
+ "."
54
+ ];
55
+ }
56
+ /**
57
+ * The build arg that names which credentials an image embeds: a hash of the
58
+ * ciphertext, which is not a secret. A BuildKit secret is no part of the
59
+ * build cache's key, so without it a rebuild with credentials encrypted under
60
+ * a new key would reuse the layer that embedded the old ones.
61
+ */
62
+ function credentialsBuildArg(credentials) {
63
+ return `GKM_CIPHERTEXT_HASH=${(0, node_crypto.createHash)("sha256").update(`${credentials.encrypted}\n${credentials.iv}`).digest("hex").slice(0, 16)}`;
64
+ }
65
+ /** The secret file's content: ciphertext, then IV, one per line. */
66
+ function credentialsFileContent(credentials) {
67
+ return `${credentials.encrypted}\n${credentials.iv}\n`;
68
+ }
69
+ /**
70
+ * Write the encrypted credentials where `docker build --secret` reads them.
71
+ *
72
+ * Two lines — ciphertext, then IV — so a template can split them with `sed`
73
+ * in any base image. Owner-only, in a directory of its own, and the returned
74
+ * cleanup removes both whatever the build did.
75
+ *
76
+ * @internal Exported for testing
77
+ */
78
+ async function writeCredentialsFile(credentials) {
79
+ const dir = await (0, node_fs_promises.mkdtemp)((0, node_path.join)((0, node_os.tmpdir)(), "gkm-credentials-"));
80
+ const path = (0, node_path.join)(dir, CREDENTIALS_SECRET_ID);
81
+ await (0, node_fs_promises.writeFile)(path, credentialsFileContent(credentials), { mode: 384 });
82
+ await (0, node_fs_promises.chmod)(path, 384);
83
+ return {
84
+ path,
85
+ cleanup: () => (0, node_fs_promises.rm)(dir, {
86
+ recursive: true,
87
+ force: true
88
+ })
89
+ };
90
+ }
91
+ /**
92
+ * Build Docker image
93
+ * @param imageRef - Full image reference (registry/name:tag)
94
+ * @param buildArgs - Build arguments to pass to docker build
95
+ * @param credentials - Encrypted credentials, passed as a build secret
96
+ */
97
+ async function buildImage(imageRef, buildArgs, credentials, { cwd, dockerfile, signal, stdio }) {
98
+ logger$3.log(`\n🔨 Building Docker image: ${imageRef}`);
99
+ logger$3.log(" Generating Dockerfile...");
100
+ const { buildRoot } = await require_state.dockerCommand({ cwd });
101
+ const dockerfilePath = (0, node_path.relative)(buildRoot, dockerfile);
102
+ const secret = credentials ? await writeCredentialsFile(credentials) : void 0;
103
+ try {
104
+ await require_run.run("docker", dockerBuildArgs({
105
+ dockerfilePath,
106
+ imageRef,
107
+ buildArgs: [...buildArgs ?? [], ...credentials ? [credentialsBuildArg(credentials)] : []],
108
+ credentialsFile: secret?.path
109
+ }), {
110
+ cwd: buildRoot,
111
+ env: {
112
+ ...process.env,
113
+ DOCKER_BUILDKIT: "1"
114
+ },
115
+ ...signal ? { signal } : {},
116
+ ...stdio ? { stdio } : {}
117
+ });
118
+ logger$3.log(`✅ Image built: ${imageRef}`);
119
+ } catch (error) {
120
+ throw new require_state.DockerBuildFailed(imageRef, error);
121
+ } finally {
122
+ await secret?.cleanup();
123
+ }
124
+ }
125
+ /**
126
+ * Push Docker image to registry
127
+ */
128
+ async function pushImage(imageRef, { cwd, signal, stdio }) {
129
+ logger$3.log(`\n☁️ Pushing image: ${imageRef}`);
130
+ try {
131
+ await require_run.run("docker", ["push", imageRef], {
132
+ cwd,
133
+ ...signal ? { signal } : {},
134
+ ...stdio ? { stdio } : {}
135
+ });
136
+ logger$3.log(`✅ Image pushed: ${imageRef}`);
137
+ } catch (error) {
138
+ throw new require_state.DockerPushFailed(imageRef, error);
139
+ }
140
+ }
141
+ /**
142
+ * The digest the registry gave a pushed image, `sha256:…`.
143
+ *
144
+ * A tag can be pushed over — by the next deploy, or by anything else that
145
+ * shares the repository — and the digest is what says which image a stage
146
+ * actually ran. `RepoDigests` has one entry per repository the image was
147
+ * pushed to, so the one for this ref's repository is picked by name.
148
+ *
149
+ * @internal Exported for testing
150
+ */
151
+ async function pushedDigest(imageRef, { cwd, signal } = { cwd: process.cwd() }) {
152
+ const repository = imageRef.split("@")[0].replace(/:[\w][\w.-]*$/, "");
153
+ const output = await require_run.runOutput("docker", [
154
+ "image",
155
+ "inspect",
156
+ "--format={{json .RepoDigests}}",
157
+ imageRef
158
+ ], {
159
+ cwd,
160
+ ...signal ? { signal } : {}
161
+ });
162
+ let digests;
163
+ try {
164
+ digests = JSON.parse(output.trim() || "[]");
165
+ } catch {
166
+ return;
167
+ }
168
+ if (!Array.isArray(digests)) return void 0;
169
+ return digests.find((entry) => typeof entry === "string" && entry.startsWith(`${repository}@`))?.slice(repository.length + 1);
170
+ }
171
+ /**
172
+ * Deploy using Docker (build and optionally push image)
173
+ */
174
+ async function deployDocker(options) {
175
+ const { stage, tag, skipPush, masterKey, config, buildArgs, credentials } = options;
176
+ const imageName = config.imageName;
177
+ const imageRef = require_state.validateImageRef(getImageRef(config.registry, imageName, tag));
178
+ const cwd = options.cwd ?? process.cwd();
179
+ const docker = {
180
+ cwd,
181
+ dockerfile: (0, node_path.join)(cwd, options.dockerfile ?? require_state.dockerfileOf(config.appName ?? imageName, options.appPath ?? ".")),
182
+ ...options.signal ? { signal: options.signal } : {},
183
+ ...options.stdio ? { stdio: options.stdio } : {}
184
+ };
185
+ await buildImage(imageRef, buildArgs, credentials, docker);
186
+ let digest;
187
+ if (!skipPush) {
188
+ if (!config.registry) logger$3.warn("\n⚠️ No registry configured. Use --skip-push or configure docker.registry in gkm.config.ts");
189
+ else {
190
+ await pushImage(imageRef, docker);
191
+ digest = await pushedDigest(imageRef, docker);
192
+ }
193
+ }
194
+ logger$3.log("\n✅ Docker deployment ready!");
195
+ logger$3.log(`\n📋 Deployment details:`);
196
+ logger$3.log(` Image: ${imageRef}`);
197
+ logger$3.log(` Stage: ${stage}`);
198
+ if (masterKey) logger$3.log(`\n🔐 Run the container with GKM_MASTER_KEY set to the key with fingerprint ${require_sniffer.keyFingerprint(masterKey)}.`);
199
+ return {
200
+ imageRef,
201
+ ...digest ? { digest } : {},
202
+ masterKey
203
+ };
204
+ }
205
+ //#endregion
18
206
  //#region src/deploy/ownership.ts
19
207
  /**
20
208
  * Which Dokploy project a deploy is allowed to deploy into.
@@ -262,7 +450,7 @@ function filterSecretsForApp(stageSecrets, sniffedEnv) {
262
450
  * @returns Encrypted payload with master key
263
451
  */
264
452
  function encryptSecretsForApp(filteredSecrets) {
265
- const payload = require_state.encryptSecrets(filteredSecrets.secrets);
453
+ const payload = require_sniffer.encryptSecrets(filteredSecrets.secrets);
266
454
  return {
267
455
  appName: filteredSecrets.appName,
268
456
  payload,
@@ -2482,7 +2670,7 @@ async function releaseDokploy(run) {
2482
2670
  if (appSecrets && credentials) logger.log(` Encrypted ${appSecrets.secretCount} secrets`);
2483
2671
  const imageRef$1 = require_state.imageRef(identity, appName, registry, imageTag);
2484
2672
  logger.log(` Building Docker image: ${imageRef$1}`);
2485
- const image = await require_state.deployDocker({
2673
+ const image = await deployDocker({
2486
2674
  stage,
2487
2675
  tag: imageTag,
2488
2676
  skipPush: false,
@@ -2572,7 +2760,7 @@ async function releaseDokploy(run) {
2572
2760
  } : void 0;
2573
2761
  const imageRef$2 = require_state.imageRef(identity, worker.name, registry, imageTag);
2574
2762
  logger.log(` Building Docker image: ${imageRef$2}`);
2575
- const image = await require_state.deployDocker({
2763
+ const image = await deployDocker({
2576
2764
  stage,
2577
2765
  tag: imageTag,
2578
2766
  skipPush: false,
@@ -2657,7 +2845,7 @@ async function releaseDokploy(run) {
2657
2845
  if (buildArgs.length > 0) logger.log(` Build args: ${publicUrlArgNames.join(", ")}`);
2658
2846
  const imageRef$3 = require_state.imageRef(identity, appName, registry, imageTag);
2659
2847
  logger.log(` Building Docker image: ${imageRef$3}`);
2660
- const image = await require_state.deployDocker({
2848
+ const image = await deployDocker({
2661
2849
  stage,
2662
2850
  tag: imageTag,
2663
2851
  skipPush: false,
@@ -3317,4 +3505,4 @@ Object.defineProperty(exports, "verifySettings", {
3317
3505
  }
3318
3506
  });
3319
3507
 
3320
- //# sourceMappingURL=engine-Bh76sAHy.cjs.map
3508
+ //# sourceMappingURL=engine-C0N2d1i5.cjs.map