@geekmidas/cli 0.54.0 → 1.0.1

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 (154) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +26 -5
  3. package/dist/CachedStateProvider-D73dCqfH.cjs +60 -0
  4. package/dist/CachedStateProvider-D73dCqfH.cjs.map +1 -0
  5. package/dist/CachedStateProvider-DVyKfaMm.mjs +54 -0
  6. package/dist/CachedStateProvider-DVyKfaMm.mjs.map +1 -0
  7. package/dist/CachedStateProvider-D_uISMmJ.cjs +3 -0
  8. package/dist/CachedStateProvider-OiFUGr7p.mjs +3 -0
  9. package/dist/HostingerProvider-DUV9-Tzg.cjs +210 -0
  10. package/dist/HostingerProvider-DUV9-Tzg.cjs.map +1 -0
  11. package/dist/HostingerProvider-DqUq6e9i.mjs +210 -0
  12. package/dist/HostingerProvider-DqUq6e9i.mjs.map +1 -0
  13. package/dist/LocalStateProvider-CdspeSVL.cjs +43 -0
  14. package/dist/LocalStateProvider-CdspeSVL.cjs.map +1 -0
  15. package/dist/LocalStateProvider-DxoSaWUV.mjs +42 -0
  16. package/dist/LocalStateProvider-DxoSaWUV.mjs.map +1 -0
  17. package/dist/Route53Provider-CpRIqu69.cjs +157 -0
  18. package/dist/Route53Provider-CpRIqu69.cjs.map +1 -0
  19. package/dist/Route53Provider-KUAX3vz9.mjs +156 -0
  20. package/dist/Route53Provider-KUAX3vz9.mjs.map +1 -0
  21. package/dist/SSMStateProvider-BxAPU99a.cjs +53 -0
  22. package/dist/SSMStateProvider-BxAPU99a.cjs.map +1 -0
  23. package/dist/SSMStateProvider-C4wp4AZe.mjs +52 -0
  24. package/dist/SSMStateProvider-C4wp4AZe.mjs.map +1 -0
  25. package/dist/{bundler-DGry2vaR.mjs → bundler-BqTN5Dj5.mjs} +3 -3
  26. package/dist/{bundler-DGry2vaR.mjs.map → bundler-BqTN5Dj5.mjs.map} +1 -1
  27. package/dist/{bundler-BB-kETMd.cjs → bundler-tHLLwYuU.cjs} +3 -3
  28. package/dist/{bundler-BB-kETMd.cjs.map → bundler-tHLLwYuU.cjs.map} +1 -1
  29. package/dist/{config-HYiM3iQJ.cjs → config-BGeJsW1r.cjs} +2 -2
  30. package/dist/{config-HYiM3iQJ.cjs.map → config-BGeJsW1r.cjs.map} +1 -1
  31. package/dist/{config-C3LSBNSl.mjs → config-C6awcFBx.mjs} +2 -2
  32. package/dist/{config-C3LSBNSl.mjs.map → config-C6awcFBx.mjs.map} +1 -1
  33. package/dist/config.cjs +2 -2
  34. package/dist/config.d.cts +1 -1
  35. package/dist/config.d.mts +2 -2
  36. package/dist/config.mjs +2 -2
  37. package/dist/credentials-C8DWtnMY.cjs +174 -0
  38. package/dist/credentials-C8DWtnMY.cjs.map +1 -0
  39. package/dist/credentials-DT1dSxIx.mjs +126 -0
  40. package/dist/credentials-DT1dSxIx.mjs.map +1 -0
  41. package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -1
  42. package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -1
  43. package/dist/deploy/sniffer-loader.cjs +1 -1
  44. package/dist/{dokploy-api-94KzmTVf.mjs → dokploy-api-7k3t7_zd.mjs} +1 -1
  45. package/dist/{dokploy-api-94KzmTVf.mjs.map → dokploy-api-7k3t7_zd.mjs.map} +1 -1
  46. package/dist/dokploy-api-CHa8G51l.mjs +3 -0
  47. package/dist/{dokploy-api-YD8WCQfW.cjs → dokploy-api-CQvhV6Hd.cjs} +1 -1
  48. package/dist/{dokploy-api-YD8WCQfW.cjs.map → dokploy-api-CQvhV6Hd.cjs.map} +1 -1
  49. package/dist/dokploy-api-CWc02yyg.cjs +3 -0
  50. package/dist/{encryption-DaCB_NmS.cjs → encryption-BE0UOb8j.cjs} +1 -1
  51. package/dist/{encryption-DaCB_NmS.cjs.map → encryption-BE0UOb8j.cjs.map} +1 -1
  52. package/dist/{encryption-Biq0EZ4m.cjs → encryption-Cv3zips0.cjs} +1 -1
  53. package/dist/{encryption-BC4MAODn.mjs → encryption-JtMsiGNp.mjs} +1 -1
  54. package/dist/{encryption-BC4MAODn.mjs.map → encryption-JtMsiGNp.mjs.map} +1 -1
  55. package/dist/encryption-UUmaWAmz.mjs +3 -0
  56. package/dist/{index-pOA56MWT.d.cts → index-B5rGIc4g.d.cts} +553 -196
  57. package/dist/index-B5rGIc4g.d.cts.map +1 -0
  58. package/dist/{index-A70abJ1m.d.mts → index-KFEbMIRa.d.mts} +554 -197
  59. package/dist/index-KFEbMIRa.d.mts.map +1 -0
  60. package/dist/index.cjs +2265 -658
  61. package/dist/index.cjs.map +1 -1
  62. package/dist/index.mjs +2242 -635
  63. package/dist/index.mjs.map +1 -1
  64. package/dist/{openapi-C3C-BzIZ.mjs → openapi-BMFmLnX6.mjs} +51 -7
  65. package/dist/openapi-BMFmLnX6.mjs.map +1 -0
  66. package/dist/{openapi-D7WwlpPF.cjs → openapi-D1KXv2Ml.cjs} +51 -7
  67. package/dist/openapi-D1KXv2Ml.cjs.map +1 -0
  68. package/dist/{openapi-react-query-C_MxpBgF.cjs → openapi-react-query-BeXvk-wa.cjs} +1 -1
  69. package/dist/{openapi-react-query-C_MxpBgF.cjs.map → openapi-react-query-BeXvk-wa.cjs.map} +1 -1
  70. package/dist/{openapi-react-query-ZoP9DPbY.mjs → openapi-react-query-DGEkD39r.mjs} +1 -1
  71. package/dist/{openapi-react-query-ZoP9DPbY.mjs.map → openapi-react-query-DGEkD39r.mjs.map} +1 -1
  72. package/dist/openapi-react-query.cjs +1 -1
  73. package/dist/openapi-react-query.mjs +1 -1
  74. package/dist/openapi.cjs +3 -3
  75. package/dist/openapi.d.cts +1 -1
  76. package/dist/openapi.d.mts +2 -2
  77. package/dist/openapi.mjs +3 -3
  78. package/dist/{storage-Dhst7BhI.mjs → storage-BMW6yLu3.mjs} +1 -1
  79. package/dist/{storage-Dhst7BhI.mjs.map → storage-BMW6yLu3.mjs.map} +1 -1
  80. package/dist/{storage-fOR8dMu5.cjs → storage-C7pmBq1u.cjs} +1 -1
  81. package/dist/{storage-BPRgh3DU.cjs → storage-CoCNe0Pt.cjs} +1 -1
  82. package/dist/{storage-BPRgh3DU.cjs.map → storage-CoCNe0Pt.cjs.map} +1 -1
  83. package/dist/{storage-DNj_I11J.mjs → storage-D8XzjVaO.mjs} +1 -1
  84. package/dist/{types-BtGL-8QS.d.mts → types-BldpmqQX.d.mts} +1 -1
  85. package/dist/{types-BtGL-8QS.d.mts.map → types-BldpmqQX.d.mts.map} +1 -1
  86. package/dist/workspace/index.cjs +1 -1
  87. package/dist/workspace/index.d.cts +1 -1
  88. package/dist/workspace/index.d.mts +2 -2
  89. package/dist/workspace/index.mjs +1 -1
  90. package/dist/{workspace-CaVW6j2q.cjs → workspace-BFRUOOrh.cjs} +309 -25
  91. package/dist/workspace-BFRUOOrh.cjs.map +1 -0
  92. package/dist/{workspace-DLFRaDc-.mjs → workspace-DAxG3_H2.mjs} +309 -25
  93. package/dist/workspace-DAxG3_H2.mjs.map +1 -0
  94. package/package.json +14 -8
  95. package/scripts/sync-versions.ts +86 -0
  96. package/src/build/__tests__/handler-templates.spec.ts +115 -47
  97. package/src/deploy/CachedStateProvider.ts +86 -0
  98. package/src/deploy/LocalStateProvider.ts +57 -0
  99. package/src/deploy/SSMStateProvider.ts +93 -0
  100. package/src/deploy/StateProvider.ts +171 -0
  101. package/src/deploy/__tests__/CachedStateProvider.spec.ts +228 -0
  102. package/src/deploy/__tests__/HostingerProvider.spec.ts +347 -0
  103. package/src/deploy/__tests__/LocalStateProvider.spec.ts +126 -0
  104. package/src/deploy/__tests__/Route53Provider.spec.ts +402 -0
  105. package/src/deploy/__tests__/SSMStateProvider.spec.ts +177 -0
  106. package/src/deploy/__tests__/__fixtures__/env-parsers/throwing-env-parser.ts +1 -3
  107. package/src/deploy/__tests__/__fixtures__/route-apps/services.ts +28 -19
  108. package/src/deploy/__tests__/createDnsProvider.spec.ts +172 -0
  109. package/src/deploy/__tests__/createStateProvider.spec.ts +116 -0
  110. package/src/deploy/__tests__/dns-orchestration.spec.ts +192 -0
  111. package/src/deploy/__tests__/dns-verification.spec.ts +2 -2
  112. package/src/deploy/__tests__/env-resolver.spec.ts +37 -15
  113. package/src/deploy/__tests__/sniffer.spec.ts +4 -20
  114. package/src/deploy/__tests__/state.spec.ts +13 -5
  115. package/src/deploy/dns/DnsProvider.ts +163 -0
  116. package/src/deploy/dns/HostingerProvider.ts +100 -0
  117. package/src/deploy/dns/Route53Provider.ts +256 -0
  118. package/src/deploy/dns/index.ts +257 -165
  119. package/src/deploy/env-resolver.ts +12 -5
  120. package/src/deploy/index.ts +16 -13
  121. package/src/deploy/sniffer-envkit-patch.ts +3 -1
  122. package/src/deploy/sniffer-routes-worker.ts +104 -0
  123. package/src/deploy/sniffer.ts +77 -55
  124. package/src/deploy/state-commands.ts +274 -0
  125. package/src/dev/__tests__/entry.spec.ts +8 -2
  126. package/src/dev/__tests__/index.spec.ts +1 -3
  127. package/src/dev/index.ts +9 -3
  128. package/src/docker/__tests__/templates.spec.ts +3 -1
  129. package/src/index.ts +88 -0
  130. package/src/init/__tests__/generators.spec.ts +273 -0
  131. package/src/init/__tests__/init.spec.ts +3 -3
  132. package/src/init/generators/auth.ts +1 -0
  133. package/src/init/generators/config.ts +2 -0
  134. package/src/init/generators/models.ts +6 -1
  135. package/src/init/generators/monorepo.ts +3 -0
  136. package/src/init/generators/ui.ts +1472 -0
  137. package/src/init/generators/web.ts +134 -87
  138. package/src/init/index.ts +22 -3
  139. package/src/init/templates/api.ts +109 -3
  140. package/src/init/versions.ts +25 -53
  141. package/src/openapi.ts +99 -13
  142. package/src/workspace/__tests__/schema.spec.ts +107 -0
  143. package/src/workspace/schema.ts +314 -4
  144. package/src/workspace/types.ts +22 -36
  145. package/dist/dokploy-api-CItuaWTq.mjs +0 -3
  146. package/dist/dokploy-api-DBNE8MDt.cjs +0 -3
  147. package/dist/encryption-CQXBZGkt.mjs +0 -3
  148. package/dist/index-A70abJ1m.d.mts.map +0 -1
  149. package/dist/index-pOA56MWT.d.cts.map +0 -1
  150. package/dist/openapi-C3C-BzIZ.mjs.map +0 -1
  151. package/dist/openapi-D7WwlpPF.cjs.map +0 -1
  152. package/dist/workspace-CaVW6j2q.cjs.map +0 -1
  153. package/dist/workspace-DLFRaDc-.mjs.map +0 -1
  154. package/tsconfig.tsbuildinfo +0 -1
@@ -1,8 +1,545 @@
1
1
  import { GkmConfig, HooksConfig, OpenApiConfig, ProvidersConfig, Routes, Runtime, StudioConfig, TelescopeConfig } from "./types-l53qUmGt.cjs";
2
2
  import { z } from "zod/v4";
3
3
 
4
- //#region src/workspace/types.d.ts
4
+ //#region src/deploy/state.d.ts
5
5
 
6
+ /**
7
+ * Deploy state management for Dokploy deployments
8
+ *
9
+ * Stores resource IDs (applications, services) per stage to avoid
10
+ * re-creating resources on subsequent deploys.
11
+ */
12
+ /**
13
+ * Per-app database credentials
14
+ */
15
+ interface AppDbCredentials {
16
+ dbUser: string;
17
+ dbPassword: string;
18
+ }
19
+ /**
20
+ * DNS verification record for a hostname
21
+ */
22
+ interface DnsVerificationRecord {
23
+ serverIp: string;
24
+ verifiedAt: string;
25
+ }
26
+ /**
27
+ * State for a single stage deployment
28
+ */
29
+ interface DokployStageState {
30
+ provider: 'dokploy';
31
+ stage: string;
32
+ environmentId: string;
33
+ applications: Record<string, string>;
34
+ services: {
35
+ postgresId?: string;
36
+ redisId?: string;
37
+ };
38
+ /** Per-app database credentials for reuse on subsequent deploys */
39
+ appCredentials?: Record<string, AppDbCredentials>;
40
+ /** Auto-generated secrets per app (e.g., BETTER_AUTH_SECRET) */
41
+ generatedSecrets?: Record<string, Record<string, string>>;
42
+ /** DNS verification state per hostname */
43
+ dnsVerified?: Record<string, DnsVerificationRecord>;
44
+ lastDeployedAt: string;
45
+ }
46
+ /**
47
+ * Read the deploy state for a stage
48
+ * Returns null if state file doesn't exist
49
+ */
50
+ //#endregion
51
+ //#region src/deploy/StateProvider.d.ts
52
+ /**
53
+ * Interface for deployment state storage providers.
54
+ *
55
+ * Implementations must handle:
56
+ * - Reading state for a stage (returns null if not found)
57
+ * - Writing state for a stage (creates or updates)
58
+ */
59
+ interface StateProvider {
60
+ /**
61
+ * Read deployment state for a stage.
62
+ *
63
+ * @param stage - The deployment stage (e.g., 'development', 'production')
64
+ * @returns The state object or null if not found
65
+ */
66
+ read(stage: string): Promise<DokployStageState | null>;
67
+ /**
68
+ * Write deployment state for a stage.
69
+ *
70
+ * @param stage - The deployment stage
71
+ * @param state - The state object to persist
72
+ */
73
+ write(stage: string, state: DokployStageState): Promise<void>;
74
+ }
75
+ /**
76
+ * Valid AWS regions.
77
+ */
78
+ type AwsRegion = 'us-east-1' | 'us-east-2' | 'us-west-1' | 'us-west-2' | 'af-south-1' | 'ap-east-1' | 'ap-south-1' | 'ap-south-2' | 'ap-southeast-1' | 'ap-southeast-2' | 'ap-southeast-3' | 'ap-southeast-4' | 'ap-northeast-1' | 'ap-northeast-2' | 'ap-northeast-3' | 'ca-central-1' | 'eu-central-1' | 'eu-central-2' | 'eu-west-1' | 'eu-west-2' | 'eu-west-3' | 'eu-south-1' | 'eu-south-2' | 'eu-north-1' | 'me-south-1' | 'me-central-1' | 'sa-east-1';
79
+ /**
80
+ * Local state provider config.
81
+ */
82
+ interface LocalStateConfig {
83
+ provider: 'local';
84
+ }
85
+ /**
86
+ * SSM state provider config (requires region).
87
+ */
88
+ interface SSMStateConfig {
89
+ provider: 'ssm';
90
+ /** AWS region (required for SSM provider) */
91
+ region: AwsRegion;
92
+ }
93
+ /**
94
+ * Custom state provider config.
95
+ */
96
+ interface CustomStateConfig {
97
+ /** Custom StateProvider implementation */
98
+ provider: StateProvider;
99
+ }
100
+ /**
101
+ * State configuration types.
102
+ */
103
+ type StateConfig = LocalStateConfig | SSMStateConfig | CustomStateConfig;
104
+ /**
105
+ * Check if value is a StateProvider implementation.
106
+ */
107
+ //#endregion
108
+ //#region src/workspace/schema.d.ts
109
+ /**
110
+ * Supported deploy targets (Phase 1).
111
+ */
112
+ declare const SUPPORTED_DEPLOY_TARGETS: readonly ["dokploy"];
113
+ /**
114
+ * Phase 2 deploy targets (not yet implemented).
115
+ */
116
+ declare const PHASE_2_DEPLOY_TARGETS: readonly ["vercel", "cloudflare"];
117
+ /**
118
+ * Check if a deploy target is supported.
119
+ */
120
+ declare function isDeployTargetSupported(target: string): boolean;
121
+ /**
122
+ * Check if a deploy target is planned for Phase 2.
123
+ */
124
+ declare function isPhase2DeployTarget(target: string): boolean;
125
+ /**
126
+ * Get error message for unsupported deploy targets.
127
+ */
128
+ declare function getDeployTargetError(target: string, appName?: string): string;
129
+ /**
130
+ * DNS record types supported across providers.
131
+ */
132
+
133
+ /**
134
+ * Combined DNS config that supports both new multi-domain and legacy single-domain formats.
135
+ */
136
+ declare const DnsConfigWithLegacySchema: z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
137
+ provider: z.ZodLiteral<"hostinger">;
138
+ ttl: z.ZodOptional<z.ZodNumber>;
139
+ }, z.core.$strip>, z.ZodObject<{
140
+ provider: z.ZodLiteral<"route53">;
141
+ region: z.ZodOptional<z.ZodEnum<{
142
+ "us-east-1": "us-east-1";
143
+ "us-east-2": "us-east-2";
144
+ "us-west-1": "us-west-1";
145
+ "us-west-2": "us-west-2";
146
+ "af-south-1": "af-south-1";
147
+ "ap-east-1": "ap-east-1";
148
+ "ap-south-1": "ap-south-1";
149
+ "ap-south-2": "ap-south-2";
150
+ "ap-southeast-1": "ap-southeast-1";
151
+ "ap-southeast-2": "ap-southeast-2";
152
+ "ap-southeast-3": "ap-southeast-3";
153
+ "ap-southeast-4": "ap-southeast-4";
154
+ "ap-northeast-1": "ap-northeast-1";
155
+ "ap-northeast-2": "ap-northeast-2";
156
+ "ap-northeast-3": "ap-northeast-3";
157
+ "ca-central-1": "ca-central-1";
158
+ "eu-central-1": "eu-central-1";
159
+ "eu-central-2": "eu-central-2";
160
+ "eu-west-1": "eu-west-1";
161
+ "eu-west-2": "eu-west-2";
162
+ "eu-west-3": "eu-west-3";
163
+ "eu-south-1": "eu-south-1";
164
+ "eu-south-2": "eu-south-2";
165
+ "eu-north-1": "eu-north-1";
166
+ "me-south-1": "me-south-1";
167
+ "me-central-1": "me-central-1";
168
+ "sa-east-1": "sa-east-1";
169
+ }>>;
170
+ profile: z.ZodOptional<z.ZodString>;
171
+ hostedZoneId: z.ZodOptional<z.ZodString>;
172
+ ttl: z.ZodOptional<z.ZodNumber>;
173
+ }, z.core.$strip>, z.ZodObject<{
174
+ provider: z.ZodLiteral<"cloudflare">;
175
+ ttl: z.ZodOptional<z.ZodNumber>;
176
+ }, z.core.$strip>, z.ZodObject<{
177
+ provider: z.ZodLiteral<"manual">;
178
+ }, z.core.$strip>], "provider">, z.ZodObject<{
179
+ provider: z.ZodCustom<{
180
+ name: string;
181
+ getRecords: Function;
182
+ upsertRecords: Function;
183
+ }, {
184
+ name: string;
185
+ getRecords: Function;
186
+ upsertRecords: Function;
187
+ }>;
188
+ ttl: z.ZodOptional<z.ZodNumber>;
189
+ }, z.core.$strip>]>>, z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
190
+ provider: z.ZodLiteral<"hostinger">;
191
+ ttl: z.ZodOptional<z.ZodNumber>;
192
+ domain: z.ZodString;
193
+ }, z.core.$strip>, z.ZodObject<{
194
+ provider: z.ZodLiteral<"route53">;
195
+ region: z.ZodOptional<z.ZodEnum<{
196
+ "us-east-1": "us-east-1";
197
+ "us-east-2": "us-east-2";
198
+ "us-west-1": "us-west-1";
199
+ "us-west-2": "us-west-2";
200
+ "af-south-1": "af-south-1";
201
+ "ap-east-1": "ap-east-1";
202
+ "ap-south-1": "ap-south-1";
203
+ "ap-south-2": "ap-south-2";
204
+ "ap-southeast-1": "ap-southeast-1";
205
+ "ap-southeast-2": "ap-southeast-2";
206
+ "ap-southeast-3": "ap-southeast-3";
207
+ "ap-southeast-4": "ap-southeast-4";
208
+ "ap-northeast-1": "ap-northeast-1";
209
+ "ap-northeast-2": "ap-northeast-2";
210
+ "ap-northeast-3": "ap-northeast-3";
211
+ "ca-central-1": "ca-central-1";
212
+ "eu-central-1": "eu-central-1";
213
+ "eu-central-2": "eu-central-2";
214
+ "eu-west-1": "eu-west-1";
215
+ "eu-west-2": "eu-west-2";
216
+ "eu-west-3": "eu-west-3";
217
+ "eu-south-1": "eu-south-1";
218
+ "eu-south-2": "eu-south-2";
219
+ "eu-north-1": "eu-north-1";
220
+ "me-south-1": "me-south-1";
221
+ "me-central-1": "me-central-1";
222
+ "sa-east-1": "sa-east-1";
223
+ }>>;
224
+ profile: z.ZodOptional<z.ZodString>;
225
+ hostedZoneId: z.ZodOptional<z.ZodString>;
226
+ ttl: z.ZodOptional<z.ZodNumber>;
227
+ domain: z.ZodString;
228
+ }, z.core.$strip>, z.ZodObject<{
229
+ provider: z.ZodLiteral<"cloudflare">;
230
+ ttl: z.ZodOptional<z.ZodNumber>;
231
+ domain: z.ZodString;
232
+ }, z.core.$strip>, z.ZodObject<{
233
+ provider: z.ZodLiteral<"manual">;
234
+ domain: z.ZodString;
235
+ }, z.core.$strip>], "provider">, z.ZodObject<{
236
+ provider: z.ZodCustom<{
237
+ name: string;
238
+ getRecords: Function;
239
+ upsertRecords: Function;
240
+ }, {
241
+ name: string;
242
+ getRecords: Function;
243
+ upsertRecords: Function;
244
+ }>;
245
+ ttl: z.ZodOptional<z.ZodNumber>;
246
+ domain: z.ZodString;
247
+ }, z.core.$strip>]>]>;
248
+ /**
249
+ * Workspace configuration schema.
250
+ */
251
+ declare const WorkspaceConfigSchema: z.ZodObject<{
252
+ name: z.ZodOptional<z.ZodString>;
253
+ apps: z.ZodRecord<z.ZodString, z.ZodObject<{
254
+ type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
255
+ backend: "backend";
256
+ frontend: "frontend";
257
+ auth: "auth";
258
+ }>>>;
259
+ path: z.ZodString;
260
+ port: z.ZodNumber;
261
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
262
+ deploy: z.ZodOptional<z.ZodEnum<{
263
+ dokploy: "dokploy";
264
+ vercel: "vercel";
265
+ cloudflare: "cloudflare";
266
+ }>>;
267
+ routes: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
268
+ functions: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
269
+ crons: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
270
+ subscribers: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
271
+ envParser: z.ZodOptional<z.ZodString>;
272
+ logger: z.ZodOptional<z.ZodString>;
273
+ hooks: z.ZodOptional<z.ZodObject<{
274
+ server: z.ZodOptional<z.ZodString>;
275
+ }, z.core.$strip>>;
276
+ telescope: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodObject<{
277
+ enabled: z.ZodOptional<z.ZodBoolean>;
278
+ port: z.ZodOptional<z.ZodNumber>;
279
+ path: z.ZodOptional<z.ZodString>;
280
+ ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
281
+ recordBody: z.ZodOptional<z.ZodBoolean>;
282
+ maxEntries: z.ZodOptional<z.ZodNumber>;
283
+ websocket: z.ZodOptional<z.ZodBoolean>;
284
+ }, z.core.$strip>]>>;
285
+ studio: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodObject<{
286
+ enabled: z.ZodOptional<z.ZodBoolean>;
287
+ path: z.ZodOptional<z.ZodString>;
288
+ schema: z.ZodOptional<z.ZodString>;
289
+ }, z.core.$strip>]>>;
290
+ openapi: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
291
+ enabled: z.ZodOptional<z.ZodBoolean>;
292
+ title: z.ZodOptional<z.ZodString>;
293
+ version: z.ZodOptional<z.ZodString>;
294
+ description: z.ZodOptional<z.ZodString>;
295
+ }, z.core.$strip>]>>;
296
+ runtime: z.ZodOptional<z.ZodEnum<{
297
+ node: "node";
298
+ bun: "bun";
299
+ }>>;
300
+ env: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
301
+ entry: z.ZodOptional<z.ZodString>;
302
+ framework: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
303
+ hono: "hono";
304
+ "better-auth": "better-auth";
305
+ express: "express";
306
+ fastify: "fastify";
307
+ }>, z.ZodEnum<{
308
+ nextjs: "nextjs";
309
+ remix: "remix";
310
+ vite: "vite";
311
+ }>]>>;
312
+ client: z.ZodOptional<z.ZodObject<{
313
+ output: z.ZodOptional<z.ZodString>;
314
+ }, z.core.$strip>>;
315
+ provider: z.ZodOptional<z.ZodEnum<{
316
+ "better-auth": "better-auth";
317
+ }>>;
318
+ }, z.core.$strip>>;
319
+ shared: z.ZodOptional<z.ZodObject<{
320
+ packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
321
+ models: z.ZodOptional<z.ZodObject<{
322
+ path: z.ZodOptional<z.ZodString>;
323
+ schema: z.ZodOptional<z.ZodEnum<{
324
+ zod: "zod";
325
+ }>>;
326
+ }, z.core.$strip>>;
327
+ }, z.core.$strip>>;
328
+ deploy: z.ZodOptional<z.ZodObject<{
329
+ default: z.ZodOptional<z.ZodEnum<{
330
+ dokploy: "dokploy";
331
+ vercel: "vercel";
332
+ cloudflare: "cloudflare";
333
+ }>>;
334
+ dokploy: z.ZodOptional<z.ZodObject<{
335
+ endpoint: z.ZodURL;
336
+ projectId: z.ZodString;
337
+ registry: z.ZodOptional<z.ZodString>;
338
+ registryId: z.ZodOptional<z.ZodString>;
339
+ }, z.core.$strip>>;
340
+ dns: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
341
+ provider: z.ZodLiteral<"hostinger">;
342
+ ttl: z.ZodOptional<z.ZodNumber>;
343
+ }, z.core.$strip>, z.ZodObject<{
344
+ provider: z.ZodLiteral<"route53">;
345
+ region: z.ZodOptional<z.ZodEnum<{
346
+ "us-east-1": "us-east-1";
347
+ "us-east-2": "us-east-2";
348
+ "us-west-1": "us-west-1";
349
+ "us-west-2": "us-west-2";
350
+ "af-south-1": "af-south-1";
351
+ "ap-east-1": "ap-east-1";
352
+ "ap-south-1": "ap-south-1";
353
+ "ap-south-2": "ap-south-2";
354
+ "ap-southeast-1": "ap-southeast-1";
355
+ "ap-southeast-2": "ap-southeast-2";
356
+ "ap-southeast-3": "ap-southeast-3";
357
+ "ap-southeast-4": "ap-southeast-4";
358
+ "ap-northeast-1": "ap-northeast-1";
359
+ "ap-northeast-2": "ap-northeast-2";
360
+ "ap-northeast-3": "ap-northeast-3";
361
+ "ca-central-1": "ca-central-1";
362
+ "eu-central-1": "eu-central-1";
363
+ "eu-central-2": "eu-central-2";
364
+ "eu-west-1": "eu-west-1";
365
+ "eu-west-2": "eu-west-2";
366
+ "eu-west-3": "eu-west-3";
367
+ "eu-south-1": "eu-south-1";
368
+ "eu-south-2": "eu-south-2";
369
+ "eu-north-1": "eu-north-1";
370
+ "me-south-1": "me-south-1";
371
+ "me-central-1": "me-central-1";
372
+ "sa-east-1": "sa-east-1";
373
+ }>>;
374
+ profile: z.ZodOptional<z.ZodString>;
375
+ hostedZoneId: z.ZodOptional<z.ZodString>;
376
+ ttl: z.ZodOptional<z.ZodNumber>;
377
+ }, z.core.$strip>, z.ZodObject<{
378
+ provider: z.ZodLiteral<"cloudflare">;
379
+ ttl: z.ZodOptional<z.ZodNumber>;
380
+ }, z.core.$strip>, z.ZodObject<{
381
+ provider: z.ZodLiteral<"manual">;
382
+ }, z.core.$strip>], "provider">, z.ZodObject<{
383
+ provider: z.ZodCustom<{
384
+ name: string;
385
+ getRecords: Function;
386
+ upsertRecords: Function;
387
+ }, {
388
+ name: string;
389
+ getRecords: Function;
390
+ upsertRecords: Function;
391
+ }>;
392
+ ttl: z.ZodOptional<z.ZodNumber>;
393
+ }, z.core.$strip>]>>, z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
394
+ provider: z.ZodLiteral<"hostinger">;
395
+ ttl: z.ZodOptional<z.ZodNumber>;
396
+ domain: z.ZodString;
397
+ }, z.core.$strip>, z.ZodObject<{
398
+ provider: z.ZodLiteral<"route53">;
399
+ region: z.ZodOptional<z.ZodEnum<{
400
+ "us-east-1": "us-east-1";
401
+ "us-east-2": "us-east-2";
402
+ "us-west-1": "us-west-1";
403
+ "us-west-2": "us-west-2";
404
+ "af-south-1": "af-south-1";
405
+ "ap-east-1": "ap-east-1";
406
+ "ap-south-1": "ap-south-1";
407
+ "ap-south-2": "ap-south-2";
408
+ "ap-southeast-1": "ap-southeast-1";
409
+ "ap-southeast-2": "ap-southeast-2";
410
+ "ap-southeast-3": "ap-southeast-3";
411
+ "ap-southeast-4": "ap-southeast-4";
412
+ "ap-northeast-1": "ap-northeast-1";
413
+ "ap-northeast-2": "ap-northeast-2";
414
+ "ap-northeast-3": "ap-northeast-3";
415
+ "ca-central-1": "ca-central-1";
416
+ "eu-central-1": "eu-central-1";
417
+ "eu-central-2": "eu-central-2";
418
+ "eu-west-1": "eu-west-1";
419
+ "eu-west-2": "eu-west-2";
420
+ "eu-west-3": "eu-west-3";
421
+ "eu-south-1": "eu-south-1";
422
+ "eu-south-2": "eu-south-2";
423
+ "eu-north-1": "eu-north-1";
424
+ "me-south-1": "me-south-1";
425
+ "me-central-1": "me-central-1";
426
+ "sa-east-1": "sa-east-1";
427
+ }>>;
428
+ profile: z.ZodOptional<z.ZodString>;
429
+ hostedZoneId: z.ZodOptional<z.ZodString>;
430
+ ttl: z.ZodOptional<z.ZodNumber>;
431
+ domain: z.ZodString;
432
+ }, z.core.$strip>, z.ZodObject<{
433
+ provider: z.ZodLiteral<"cloudflare">;
434
+ ttl: z.ZodOptional<z.ZodNumber>;
435
+ domain: z.ZodString;
436
+ }, z.core.$strip>, z.ZodObject<{
437
+ provider: z.ZodLiteral<"manual">;
438
+ domain: z.ZodString;
439
+ }, z.core.$strip>], "provider">, z.ZodObject<{
440
+ provider: z.ZodCustom<{
441
+ name: string;
442
+ getRecords: Function;
443
+ upsertRecords: Function;
444
+ }, {
445
+ name: string;
446
+ getRecords: Function;
447
+ upsertRecords: Function;
448
+ }>;
449
+ ttl: z.ZodOptional<z.ZodNumber>;
450
+ domain: z.ZodString;
451
+ }, z.core.$strip>]>]>>;
452
+ }, z.core.$strip>>;
453
+ services: z.ZodOptional<z.ZodObject<{
454
+ db: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
455
+ version: z.ZodOptional<z.ZodString>;
456
+ image: z.ZodOptional<z.ZodString>;
457
+ }, z.core.$strip>]>>;
458
+ cache: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
459
+ version: z.ZodOptional<z.ZodString>;
460
+ image: z.ZodOptional<z.ZodString>;
461
+ }, z.core.$strip>]>>;
462
+ mail: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
463
+ version: z.ZodOptional<z.ZodString>;
464
+ image: z.ZodOptional<z.ZodString>;
465
+ smtp: z.ZodOptional<z.ZodObject<{
466
+ host: z.ZodString;
467
+ port: z.ZodNumber;
468
+ user: z.ZodOptional<z.ZodString>;
469
+ pass: z.ZodOptional<z.ZodString>;
470
+ }, z.core.$strip>>;
471
+ }, z.core.$strip>]>>;
472
+ }, z.core.$strip>>;
473
+ secrets: z.ZodOptional<z.ZodObject<{
474
+ enabled: z.ZodOptional<z.ZodBoolean>;
475
+ algorithm: z.ZodOptional<z.ZodString>;
476
+ kdf: z.ZodOptional<z.ZodEnum<{
477
+ scrypt: "scrypt";
478
+ pbkdf2: "pbkdf2";
479
+ }>>;
480
+ }, z.core.$strip>>;
481
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
482
+ provider: z.ZodLiteral<"local">;
483
+ }, z.core.$strip>, z.ZodObject<{
484
+ provider: z.ZodLiteral<"ssm">;
485
+ region: z.ZodEnum<{
486
+ "us-east-1": "us-east-1";
487
+ "us-east-2": "us-east-2";
488
+ "us-west-1": "us-west-1";
489
+ "us-west-2": "us-west-2";
490
+ "af-south-1": "af-south-1";
491
+ "ap-east-1": "ap-east-1";
492
+ "ap-south-1": "ap-south-1";
493
+ "ap-south-2": "ap-south-2";
494
+ "ap-southeast-1": "ap-southeast-1";
495
+ "ap-southeast-2": "ap-southeast-2";
496
+ "ap-southeast-3": "ap-southeast-3";
497
+ "ap-southeast-4": "ap-southeast-4";
498
+ "ap-northeast-1": "ap-northeast-1";
499
+ "ap-northeast-2": "ap-northeast-2";
500
+ "ap-northeast-3": "ap-northeast-3";
501
+ "ca-central-1": "ca-central-1";
502
+ "eu-central-1": "eu-central-1";
503
+ "eu-central-2": "eu-central-2";
504
+ "eu-west-1": "eu-west-1";
505
+ "eu-west-2": "eu-west-2";
506
+ "eu-west-3": "eu-west-3";
507
+ "eu-south-1": "eu-south-1";
508
+ "eu-south-2": "eu-south-2";
509
+ "eu-north-1": "eu-north-1";
510
+ "me-south-1": "me-south-1";
511
+ "me-central-1": "me-central-1";
512
+ "sa-east-1": "sa-east-1";
513
+ }>;
514
+ }, z.core.$strip>], "provider">, z.ZodObject<{
515
+ provider: z.ZodCustom<{
516
+ read: Function;
517
+ write: Function;
518
+ }, {
519
+ read: Function;
520
+ write: Function;
521
+ }>;
522
+ }, z.core.$strip>]>>;
523
+ }, z.core.$strip>;
524
+ /**
525
+ * Validate workspace configuration.
526
+ * Throws ZodError with detailed messages on validation failure.
527
+ */
528
+ declare function validateWorkspaceConfig(config: unknown): z.infer<typeof WorkspaceConfigSchema>;
529
+ /**
530
+ * Safe validation that returns result instead of throwing.
531
+ */
532
+ declare function safeValidateWorkspaceConfig(config: unknown): {
533
+ success: boolean;
534
+ data?: z.infer<typeof WorkspaceConfigSchema>;
535
+ error?: z.ZodError;
536
+ };
537
+ /**
538
+ * Format Zod errors into user-friendly messages.
539
+ */
540
+ declare function formatValidationErrors(error: z.ZodError): string;
541
+ //#endregion
542
+ //#region src/workspace/types.d.ts
6
543
  /**
7
544
  * Deploy target for an app.
8
545
  *
@@ -233,54 +770,34 @@ interface DokployWorkspaceConfig {
233
770
  /**
234
771
  * DNS provider types for automatic DNS record creation.
235
772
  */
236
- type DnsProvider = 'hostinger' | 'cloudflare' | 'manual';
773
+
237
774
  /**
238
775
  * DNS configuration for automatic record creation during deployment.
239
776
  *
777
+ * Maps root domains to their DNS provider configuration.
240
778
  * When configured, the deploy command will automatically create DNS
241
779
  * A records pointing to your Dokploy server for each app's domain.
242
780
  *
243
781
  * @example
244
782
  * ```ts
245
- * // Auto-create DNS records at Hostinger
783
+ * // Multi-domain with different providers
784
+ * dns: {
785
+ * 'geekmidas.dev': { provider: 'hostinger' },
786
+ * 'geekmidas.com': { provider: 'route53' },
787
+ * }
788
+ *
789
+ * // Single domain
246
790
  * dns: {
247
- * provider: 'hostinger',
248
- * domain: 'traflabs.io',
249
- * autoCreate: true,
791
+ * 'traflabs.io': { provider: 'hostinger', ttl: 300 },
250
792
  * }
251
793
  *
252
794
  * // Manual mode - just print required records
253
795
  * dns: {
254
- * provider: 'manual',
255
- * domain: 'traflabs.io',
796
+ * 'myapp.com': { provider: 'manual' },
256
797
  * }
257
798
  * ```
258
799
  */
259
- interface DnsConfig {
260
- /**
261
- * DNS provider for automatic record creation.
262
- * - 'hostinger': Use Hostinger DNS API
263
- * - 'cloudflare': Use Cloudflare DNS API (future)
264
- * - 'manual': Don't create records, just print required records
265
- */
266
- provider: DnsProvider;
267
- /**
268
- * Root domain where records will be created.
269
- * @example 'traflabs.io', 'example.com'
270
- */
271
- domain: string;
272
- /**
273
- * Automatically create DNS records during deploy.
274
- * If false, only prints required records for manual setup.
275
- * @default true
276
- */
277
- autoCreate?: boolean;
278
- /**
279
- * TTL for created DNS records in seconds.
280
- * @default 300 (5 minutes)
281
- */
282
- ttl?: number;
283
- }
800
+ type DnsConfig = z.infer<typeof DnsConfigWithLegacySchema>;
284
801
  /**
285
802
  * Deployment configuration for the workspace.
286
803
  *
@@ -305,7 +822,6 @@ interface DnsConfig {
305
822
  * dns: {
306
823
  * provider: 'hostinger',
307
824
  * domain: 'myapp.com',
308
- * autoCreate: true,
309
825
  * },
310
826
  * }
311
827
  * ```
@@ -845,6 +1361,8 @@ interface NormalizedWorkspace {
845
1361
  shared: SharedConfig;
846
1362
  /** Secrets configuration (empty object if not specified) */
847
1363
  secrets: SecretsConfig;
1364
+ /** State provider configuration (undefined = local filesystem) */
1365
+ state?: StateConfig;
848
1366
  }
849
1367
  /**
850
1368
  * Result of loading and processing a configuration.
@@ -871,167 +1389,6 @@ interface LoadedConfig {
871
1389
  */
872
1390
  declare function isWorkspaceConfig(config: GkmConfig | WorkspaceConfig): config is WorkspaceConfig;
873
1391
  //#endregion
874
- //#region src/workspace/schema.d.ts
875
- /**
876
- * Supported deploy targets (Phase 1).
877
- */
878
- declare const SUPPORTED_DEPLOY_TARGETS: readonly ["dokploy"];
879
- /**
880
- * Phase 2 deploy targets (not yet implemented).
881
- */
882
- declare const PHASE_2_DEPLOY_TARGETS: readonly ["vercel", "cloudflare"];
883
- /**
884
- * Check if a deploy target is supported.
885
- */
886
- declare function isDeployTargetSupported(target: string): boolean;
887
- /**
888
- * Check if a deploy target is planned for Phase 2.
889
- */
890
- declare function isPhase2DeployTarget(target: string): boolean;
891
- /**
892
- * Get error message for unsupported deploy targets.
893
- */
894
- declare function getDeployTargetError(target: string, appName?: string): string;
895
- /**
896
- * Workspace configuration schema.
897
- */
898
- declare const WorkspaceConfigSchema: z.ZodObject<{
899
- name: z.ZodOptional<z.ZodString>;
900
- apps: z.ZodRecord<z.ZodString, z.ZodObject<{
901
- type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
902
- backend: "backend";
903
- frontend: "frontend";
904
- auth: "auth";
905
- }>>>;
906
- path: z.ZodString;
907
- port: z.ZodNumber;
908
- dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
909
- deploy: z.ZodOptional<z.ZodEnum<{
910
- dokploy: "dokploy";
911
- vercel: "vercel";
912
- cloudflare: "cloudflare";
913
- }>>;
914
- routes: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
915
- functions: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
916
- crons: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
917
- subscribers: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
918
- envParser: z.ZodOptional<z.ZodString>;
919
- logger: z.ZodOptional<z.ZodString>;
920
- hooks: z.ZodOptional<z.ZodObject<{
921
- server: z.ZodOptional<z.ZodString>;
922
- }, z.core.$strip>>;
923
- telescope: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodObject<{
924
- enabled: z.ZodOptional<z.ZodBoolean>;
925
- port: z.ZodOptional<z.ZodNumber>;
926
- path: z.ZodOptional<z.ZodString>;
927
- ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
928
- recordBody: z.ZodOptional<z.ZodBoolean>;
929
- maxEntries: z.ZodOptional<z.ZodNumber>;
930
- websocket: z.ZodOptional<z.ZodBoolean>;
931
- }, z.core.$strip>]>>;
932
- studio: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodObject<{
933
- enabled: z.ZodOptional<z.ZodBoolean>;
934
- path: z.ZodOptional<z.ZodString>;
935
- schema: z.ZodOptional<z.ZodString>;
936
- }, z.core.$strip>]>>;
937
- openapi: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
938
- enabled: z.ZodOptional<z.ZodBoolean>;
939
- title: z.ZodOptional<z.ZodString>;
940
- version: z.ZodOptional<z.ZodString>;
941
- description: z.ZodOptional<z.ZodString>;
942
- }, z.core.$strip>]>>;
943
- runtime: z.ZodOptional<z.ZodEnum<{
944
- node: "node";
945
- bun: "bun";
946
- }>>;
947
- env: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
948
- entry: z.ZodOptional<z.ZodString>;
949
- framework: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
950
- hono: "hono";
951
- "better-auth": "better-auth";
952
- express: "express";
953
- fastify: "fastify";
954
- }>, z.ZodEnum<{
955
- nextjs: "nextjs";
956
- remix: "remix";
957
- vite: "vite";
958
- }>]>>;
959
- client: z.ZodOptional<z.ZodObject<{
960
- output: z.ZodOptional<z.ZodString>;
961
- }, z.core.$strip>>;
962
- provider: z.ZodOptional<z.ZodEnum<{
963
- "better-auth": "better-auth";
964
- }>>;
965
- }, z.core.$strip>>;
966
- shared: z.ZodOptional<z.ZodObject<{
967
- packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
968
- models: z.ZodOptional<z.ZodObject<{
969
- path: z.ZodOptional<z.ZodString>;
970
- schema: z.ZodOptional<z.ZodEnum<{
971
- zod: "zod";
972
- }>>;
973
- }, z.core.$strip>>;
974
- }, z.core.$strip>>;
975
- deploy: z.ZodOptional<z.ZodObject<{
976
- default: z.ZodOptional<z.ZodEnum<{
977
- dokploy: "dokploy";
978
- vercel: "vercel";
979
- cloudflare: "cloudflare";
980
- }>>;
981
- dokploy: z.ZodOptional<z.ZodObject<{
982
- endpoint: z.ZodURL;
983
- projectId: z.ZodString;
984
- registry: z.ZodOptional<z.ZodString>;
985
- registryId: z.ZodOptional<z.ZodString>;
986
- }, z.core.$strip>>;
987
- }, z.core.$strip>>;
988
- services: z.ZodOptional<z.ZodObject<{
989
- db: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
990
- version: z.ZodOptional<z.ZodString>;
991
- image: z.ZodOptional<z.ZodString>;
992
- }, z.core.$strip>]>>;
993
- cache: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
994
- version: z.ZodOptional<z.ZodString>;
995
- image: z.ZodOptional<z.ZodString>;
996
- }, z.core.$strip>]>>;
997
- mail: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
998
- version: z.ZodOptional<z.ZodString>;
999
- image: z.ZodOptional<z.ZodString>;
1000
- smtp: z.ZodOptional<z.ZodObject<{
1001
- host: z.ZodString;
1002
- port: z.ZodNumber;
1003
- user: z.ZodOptional<z.ZodString>;
1004
- pass: z.ZodOptional<z.ZodString>;
1005
- }, z.core.$strip>>;
1006
- }, z.core.$strip>]>>;
1007
- }, z.core.$strip>>;
1008
- secrets: z.ZodOptional<z.ZodObject<{
1009
- enabled: z.ZodOptional<z.ZodBoolean>;
1010
- algorithm: z.ZodOptional<z.ZodString>;
1011
- kdf: z.ZodOptional<z.ZodEnum<{
1012
- scrypt: "scrypt";
1013
- pbkdf2: "pbkdf2";
1014
- }>>;
1015
- }, z.core.$strip>>;
1016
- }, z.core.$strip>;
1017
- /**
1018
- * Validate workspace configuration.
1019
- * Throws ZodError with detailed messages on validation failure.
1020
- */
1021
- declare function validateWorkspaceConfig(config: unknown): z.infer<typeof WorkspaceConfigSchema>;
1022
- /**
1023
- * Safe validation that returns result instead of throwing.
1024
- */
1025
- declare function safeValidateWorkspaceConfig(config: unknown): {
1026
- success: boolean;
1027
- data?: z.infer<typeof WorkspaceConfigSchema>;
1028
- error?: z.ZodError;
1029
- };
1030
- /**
1031
- * Format Zod errors into user-friendly messages.
1032
- */
1033
- declare function formatValidationErrors(error: z.ZodError): string;
1034
- //#endregion
1035
1392
  //#region src/workspace/index.d.ts
1036
1393
  /**
1037
1394
  * Define workspace configuration with full TypeScript support and type inference.
@@ -1109,4 +1466,4 @@ declare function getDependencyEnvVars(workspace: NormalizedWorkspace, appName: s
1109
1466
 
1110
1467
  //#endregion
1111
1468
  export { AppConfig, AppConfigInput, AppInput, AppsRecord, BackendFramework, ClientConfig, ConstrainedApps, DeployConfig, DeployTarget, DokployWorkspaceConfig, FrontendFramework, InferAppNames, InferredWorkspaceConfig, LoadedConfig, MailServiceConfig, ModelsConfig, NormalizedAppConfig, NormalizedWorkspace, PHASE_2_DEPLOY_TARGETS, SUPPORTED_DEPLOY_TARGETS, SecretsConfig, ServiceImageConfig, ServicesConfig, SharedConfig, WorkspaceConfig, WorkspaceConfigSchema, WorkspaceInput, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDependencyEnvVars, getDeployTargetError, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace };
1112
- //# sourceMappingURL=index-pOA56MWT.d.cts.map
1469
+ //# sourceMappingURL=index-B5rGIc4g.d.cts.map