@geekmidas/cli 1.1.0 → 1.2.0

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 (50) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{config-ClfjsfwH.mjs → config-BQ4a36Rq.mjs} +2 -2
  3. package/dist/{config-ClfjsfwH.mjs.map → config-BQ4a36Rq.mjs.map} +1 -1
  4. package/dist/{config-CKfif10N.cjs → config-Bayob8pB.cjs} +2 -2
  5. package/dist/{config-CKfif10N.cjs.map → config-Bayob8pB.cjs.map} +1 -1
  6. package/dist/config.cjs +2 -2
  7. package/dist/config.d.cts +1 -1
  8. package/dist/config.d.mts +1 -1
  9. package/dist/config.mjs +2 -2
  10. package/dist/{index-CHQs8G3q.d.mts → index-Bi9vGQJy.d.mts} +56 -13
  11. package/dist/index-Bi9vGQJy.d.mts.map +1 -0
  12. package/dist/{index-afBljZKY.d.cts → index-CufAAnge.d.cts} +56 -13
  13. package/dist/index-CufAAnge.d.cts.map +1 -0
  14. package/dist/index.cjs +12 -7
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.mjs +12 -7
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/{openapi-D3p6s8UA.cjs → openapi-BZP8jkI4.cjs} +2 -2
  19. package/dist/{openapi-D3p6s8UA.cjs.map → openapi-BZP8jkI4.cjs.map} +1 -1
  20. package/dist/{openapi-C6sa0L8b.mjs → openapi-DrbBWq0s.mjs} +2 -2
  21. package/dist/{openapi-C6sa0L8b.mjs.map → openapi-DrbBWq0s.mjs.map} +1 -1
  22. package/dist/openapi.cjs +3 -3
  23. package/dist/openapi.mjs +3 -3
  24. package/dist/workspace/index.cjs +2 -1
  25. package/dist/workspace/index.d.cts +2 -2
  26. package/dist/workspace/index.d.mts +2 -2
  27. package/dist/workspace/index.mjs +2 -2
  28. package/dist/{workspace-CjT323qw.cjs → workspace-BMJE18LV.cjs} +44 -5
  29. package/dist/workspace-BMJE18LV.cjs.map +1 -0
  30. package/dist/{workspace-CmITpum4.mjs → workspace-CASoZOjs.mjs} +39 -6
  31. package/dist/workspace-CASoZOjs.mjs.map +1 -0
  32. package/package.json +3 -3
  33. package/src/deploy/__tests__/CachedStateProvider.spec.ts +7 -0
  34. package/src/deploy/__tests__/LocalStateProvider.spec.ts +4 -0
  35. package/src/deploy/__tests__/SSMStateProvider.spec.ts +5 -0
  36. package/src/deploy/__tests__/dns-verification.spec.ts +1 -1
  37. package/src/deploy/__tests__/env-resolver.spec.ts +9 -9
  38. package/src/deploy/__tests__/state-e2e.spec.ts +2 -0
  39. package/src/deploy/__tests__/state.spec.ts +53 -29
  40. package/src/deploy/index.ts +6 -1
  41. package/src/deploy/state.ts +4 -0
  42. package/src/init/versions.ts +1 -1
  43. package/src/workspace/__tests__/index.spec.ts +68 -0
  44. package/src/workspace/index.ts +43 -0
  45. package/src/workspace/schema.ts +17 -6
  46. package/src/workspace/types.ts +19 -9
  47. package/dist/index-CHQs8G3q.d.mts.map +0 -1
  48. package/dist/index-afBljZKY.d.cts.map +0 -1
  49. package/dist/workspace-CjT323qw.cjs.map +0 -1
  50. package/dist/workspace-CmITpum4.mjs.map +0 -1
@@ -3492,13 +3492,15 @@ const ServicesConfigSchema = object({
3492
3492
  });
3493
3493
  /**
3494
3494
  * Dokploy workspace configuration schema.
3495
+ * Supports either a single endpoint or per-stage endpoints.
3495
3496
  */
3496
3497
  const DokployWorkspaceConfigSchema = object({
3497
- endpoint: url("Dokploy endpoint must be a valid URL"),
3498
- projectId: string().min(1, "Project ID is required"),
3498
+ endpoint: url("Dokploy endpoint must be a valid URL").optional(),
3499
+ endpoints: record(string(), url("Endpoint must be a valid URL")).optional(),
3499
3500
  registry: string().optional(),
3500
- registryId: string().optional()
3501
- });
3501
+ registryId: string().optional(),
3502
+ domains: record(string(), string()).optional()
3503
+ }).refine((data) => data.endpoint || data.endpoints, { message: "Either endpoint or endpoints must be provided" });
3502
3504
  /**
3503
3505
  * Valid AWS regions.
3504
3506
  */
@@ -4115,7 +4117,38 @@ function getDependencyEnvVars(workspace, appName, urlPrefix = "http://localhost"
4115
4117
  }
4116
4118
  return env;
4117
4119
  }
4120
+ /**
4121
+ * Resolve the Dokploy endpoint for a specific stage.
4122
+ *
4123
+ * Uses per-stage endpoint from `endpoints` if available,
4124
+ * otherwise falls back to the global `endpoint`.
4125
+ *
4126
+ * @param dokployConfig - Dokploy workspace configuration
4127
+ * @param stage - Deployment stage (e.g., 'development', 'production')
4128
+ * @returns The endpoint URL for the stage, or undefined if not configured
4129
+ *
4130
+ * @example
4131
+ * ```ts
4132
+ * // With per-stage endpoints
4133
+ * const config = {
4134
+ * endpoints: {
4135
+ * development: 'https://dev.dokploy.example.com:3000',
4136
+ * production: 'https://prod.dokploy.example.com:3000',
4137
+ * },
4138
+ * };
4139
+ * getEndpointForStage(config, 'production'); // => 'https://prod.dokploy.example.com:3000'
4140
+ *
4141
+ * // With single endpoint
4142
+ * const config = { endpoint: 'https://dokploy.example.com:3000' };
4143
+ * getEndpointForStage(config, 'production'); // => 'https://dokploy.example.com:3000'
4144
+ * ```
4145
+ */
4146
+ function getEndpointForStage(dokployConfig, stage) {
4147
+ if (!dokployConfig) return void 0;
4148
+ if (dokployConfig.endpoints?.[stage]) return dokployConfig.endpoints[stage];
4149
+ return dokployConfig.endpoint;
4150
+ }
4118
4151
 
4119
4152
  //#endregion
4120
- export { PHASE_2_DEPLOY_TARGETS, SUPPORTED_DEPLOY_TARGETS, WorkspaceConfigSchema, __require, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDependencyEnvVars, getDeployTargetError, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace };
4121
- //# sourceMappingURL=workspace-CmITpum4.mjs.map
4153
+ export { PHASE_2_DEPLOY_TARGETS, SUPPORTED_DEPLOY_TARGETS, WorkspaceConfigSchema, __require, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDependencyEnvVars, getDeployTargetError, getEndpointForStage, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace };
4154
+ //# sourceMappingURL=workspace-CASoZOjs.mjs.map