@geekmidas/cli 1.0.2 → 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.
- package/CHANGELOG.md +12 -0
- package/dist/{SSMStateProvider-C4wp4AZe.mjs → SSMStateProvider-BjCi_58g.mjs} +16 -7
- package/dist/SSMStateProvider-BjCi_58g.mjs.map +1 -0
- package/dist/{SSMStateProvider-BxAPU99a.cjs → SSMStateProvider-D79o_JjM.cjs} +16 -7
- package/dist/SSMStateProvider-D79o_JjM.cjs.map +1 -0
- package/dist/{config-C6awcFBx.mjs → config-BQ4a36Rq.mjs} +2 -2
- package/dist/{config-C6awcFBx.mjs.map → config-BQ4a36Rq.mjs.map} +1 -1
- package/dist/{config-BGeJsW1r.cjs → config-Bayob8pB.cjs} +2 -2
- package/dist/{config-BGeJsW1r.cjs.map → config-Bayob8pB.cjs.map} +1 -1
- package/dist/config.cjs +2 -2
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -2
- package/dist/{index-KFEbMIRa.d.mts → index-Bi9vGQJy.d.mts} +61 -13
- package/dist/index-Bi9vGQJy.d.mts.map +1 -0
- package/dist/{index-B5rGIc4g.d.cts → index-CufAAnge.d.cts} +61 -13
- package/dist/index-CufAAnge.d.cts.map +1 -0
- package/dist/index.cjs +14 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +14 -9
- package/dist/index.mjs.map +1 -1
- package/dist/{openapi-D1KXv2Ml.cjs → openapi-BZP8jkI4.cjs} +2 -2
- package/dist/{openapi-D1KXv2Ml.cjs.map → openapi-BZP8jkI4.cjs.map} +1 -1
- package/dist/{openapi-BMFmLnX6.mjs → openapi-DrbBWq0s.mjs} +2 -2
- package/dist/{openapi-BMFmLnX6.mjs.map → openapi-DrbBWq0s.mjs.map} +1 -1
- package/dist/openapi.cjs +3 -3
- package/dist/openapi.mjs +3 -3
- package/dist/workspace/index.cjs +2 -1
- package/dist/workspace/index.d.cts +2 -2
- package/dist/workspace/index.d.mts +2 -2
- package/dist/workspace/index.mjs +2 -2
- package/dist/{workspace-BFRUOOrh.cjs → workspace-BMJE18LV.cjs} +46 -6
- package/dist/workspace-BMJE18LV.cjs.map +1 -0
- package/dist/{workspace-DAxG3_H2.mjs → workspace-CASoZOjs.mjs} +41 -7
- package/dist/workspace-CASoZOjs.mjs.map +1 -0
- package/package.json +4 -4
- package/src/deploy/SSMStateProvider.ts +20 -7
- package/src/deploy/StateProvider.ts +1 -1
- package/src/deploy/__tests__/CachedStateProvider.spec.ts +7 -0
- package/src/deploy/__tests__/LocalStateProvider.spec.ts +4 -0
- package/src/deploy/__tests__/SSMStateProvider.spec.ts +20 -8
- package/src/deploy/__tests__/dns-verification.spec.ts +1 -1
- package/src/deploy/__tests__/env-resolver.spec.ts +9 -9
- package/src/deploy/__tests__/state-e2e.spec.ts +387 -0
- package/src/deploy/__tests__/state.spec.ts +53 -29
- package/src/deploy/index.ts +6 -1
- package/src/deploy/state.ts +4 -0
- package/src/init/__tests__/init.spec.ts +10 -1
- package/src/init/versions.ts +1 -1
- package/src/secrets/__tests__/storage.spec.ts +6 -2
- package/src/workspace/__tests__/index.spec.ts +129 -0
- package/src/workspace/index.ts +44 -0
- package/src/workspace/schema.ts +17 -6
- package/src/workspace/types.ts +26 -9
- package/dist/SSMStateProvider-BxAPU99a.cjs.map +0 -1
- package/dist/SSMStateProvider-C4wp4AZe.mjs.map +0 -1
- package/dist/index-B5rGIc4g.d.cts.map +0 -1
- package/dist/index-KFEbMIRa.d.mts.map +0 -1
- package/dist/workspace-BFRUOOrh.cjs.map +0 -1
- package/dist/workspace-DAxG3_H2.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
|
-
|
|
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
|
*/
|
|
@@ -3972,7 +3974,8 @@ function normalizeWorkspace(config$1, cwd) {
|
|
|
3972
3974
|
services: config$1.services ?? {},
|
|
3973
3975
|
deploy: config$1.deploy ?? { default: "dokploy" },
|
|
3974
3976
|
shared: config$1.shared ?? { packages: ["packages/*"] },
|
|
3975
|
-
secrets: config$1.secrets ?? {}
|
|
3977
|
+
secrets: config$1.secrets ?? {},
|
|
3978
|
+
state: config$1.state
|
|
3976
3979
|
};
|
|
3977
3980
|
}
|
|
3978
3981
|
/**
|
|
@@ -4114,7 +4117,38 @@ function getDependencyEnvVars(workspace, appName, urlPrefix = "http://localhost"
|
|
|
4114
4117
|
}
|
|
4115
4118
|
return env;
|
|
4116
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
|
+
}
|
|
4117
4151
|
|
|
4118
4152
|
//#endregion
|
|
4119
|
-
export { PHASE_2_DEPLOY_TARGETS, SUPPORTED_DEPLOY_TARGETS, WorkspaceConfigSchema, __require, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDependencyEnvVars, getDeployTargetError, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace };
|
|
4120
|
-
//# sourceMappingURL=workspace-
|
|
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
|