@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.
- package/CHANGELOG.md +6 -0
- package/dist/{config-ClfjsfwH.mjs → config-BQ4a36Rq.mjs} +2 -2
- package/dist/{config-ClfjsfwH.mjs.map → config-BQ4a36Rq.mjs.map} +1 -1
- package/dist/{config-CKfif10N.cjs → config-Bayob8pB.cjs} +2 -2
- package/dist/{config-CKfif10N.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-CHQs8G3q.d.mts → index-Bi9vGQJy.d.mts} +56 -13
- package/dist/index-Bi9vGQJy.d.mts.map +1 -0
- package/dist/{index-afBljZKY.d.cts → index-CufAAnge.d.cts} +56 -13
- package/dist/index-CufAAnge.d.cts.map +1 -0
- package/dist/index.cjs +12 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +12 -7
- package/dist/index.mjs.map +1 -1
- package/dist/{openapi-D3p6s8UA.cjs → openapi-BZP8jkI4.cjs} +2 -2
- package/dist/{openapi-D3p6s8UA.cjs.map → openapi-BZP8jkI4.cjs.map} +1 -1
- package/dist/{openapi-C6sa0L8b.mjs → openapi-DrbBWq0s.mjs} +2 -2
- package/dist/{openapi-C6sa0L8b.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-CjT323qw.cjs → workspace-BMJE18LV.cjs} +44 -5
- package/dist/workspace-BMJE18LV.cjs.map +1 -0
- package/dist/{workspace-CmITpum4.mjs → workspace-CASoZOjs.mjs} +39 -6
- package/dist/workspace-CASoZOjs.mjs.map +1 -0
- package/package.json +3 -3
- 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 +5 -0
- 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 +2 -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/versions.ts +1 -1
- package/src/workspace/__tests__/index.spec.ts +68 -0
- package/src/workspace/index.ts +43 -0
- package/src/workspace/schema.ts +17 -6
- package/src/workspace/types.ts +19 -9
- package/dist/index-CHQs8G3q.d.mts.map +0 -1
- package/dist/index-afBljZKY.d.cts.map +0 -1
- package/dist/workspace-CjT323qw.cjs.map +0 -1
- package/dist/workspace-CmITpum4.mjs.map +0 -1
package/dist/openapi.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env -S npx tsx
|
|
2
|
-
require('./workspace-
|
|
3
|
-
require('./config-
|
|
4
|
-
const require_openapi = require('./openapi-
|
|
2
|
+
require('./workspace-BMJE18LV.cjs');
|
|
3
|
+
require('./config-Bayob8pB.cjs');
|
|
4
|
+
const require_openapi = require('./openapi-BZP8jkI4.cjs');
|
|
5
5
|
|
|
6
6
|
exports.OPENAPI_OUTPUT_PATH = require_openapi.OPENAPI_OUTPUT_PATH;
|
|
7
7
|
exports.generateOpenApi = require_openapi.generateOpenApi;
|
package/dist/openapi.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env -S npx tsx
|
|
2
|
-
import "./workspace-
|
|
3
|
-
import "./config-
|
|
4
|
-
import { OPENAPI_OUTPUT_PATH, generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi-
|
|
2
|
+
import "./workspace-CASoZOjs.mjs";
|
|
3
|
+
import "./config-BQ4a36Rq.mjs";
|
|
4
|
+
import { OPENAPI_OUTPUT_PATH, generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi-DrbBWq0s.mjs";
|
|
5
5
|
|
|
6
6
|
export { OPENAPI_OUTPUT_PATH, generateOpenApi, openapiCommand, resolveOpenApiConfig };
|
package/dist/workspace/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_workspace = require('../workspace-
|
|
1
|
+
const require_workspace = require('../workspace-BMJE18LV.cjs');
|
|
2
2
|
|
|
3
3
|
exports.PHASE_2_DEPLOY_TARGETS = require_workspace.PHASE_2_DEPLOY_TARGETS;
|
|
4
4
|
exports.SUPPORTED_DEPLOY_TARGETS = require_workspace.SUPPORTED_DEPLOY_TARGETS;
|
|
@@ -9,6 +9,7 @@ exports.getAppBuildOrder = require_workspace.getAppBuildOrder;
|
|
|
9
9
|
exports.getAppGkmConfig = require_workspace.getAppGkmConfig;
|
|
10
10
|
exports.getDependencyEnvVars = require_workspace.getDependencyEnvVars;
|
|
11
11
|
exports.getDeployTargetError = require_workspace.getDeployTargetError;
|
|
12
|
+
exports.getEndpointForStage = require_workspace.getEndpointForStage;
|
|
12
13
|
exports.isDeployTargetSupported = require_workspace.isDeployTargetSupported;
|
|
13
14
|
exports.isPhase2DeployTarget = require_workspace.isPhase2DeployTarget;
|
|
14
15
|
exports.isWorkspaceConfig = require_workspace.isWorkspaceConfig;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../types-l53qUmGt.cjs";
|
|
2
|
-
import { 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 } from "../index-
|
|
3
|
-
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 };
|
|
2
|
+
import { 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, getEndpointForStage, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace } from "../index-CufAAnge.cjs";
|
|
3
|
+
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, getEndpointForStage, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../types-BldpmqQX.mjs";
|
|
2
|
-
import { 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 } from "../index-
|
|
3
|
-
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 };
|
|
2
|
+
import { 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, getEndpointForStage, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace } from "../index-Bi9vGQJy.mjs";
|
|
3
|
+
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, getEndpointForStage, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace };
|
package/dist/workspace/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PHASE_2_DEPLOY_TARGETS, SUPPORTED_DEPLOY_TARGETS, WorkspaceConfigSchema, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDependencyEnvVars, getDeployTargetError, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace } from "../workspace-
|
|
1
|
+
import { PHASE_2_DEPLOY_TARGETS, SUPPORTED_DEPLOY_TARGETS, WorkspaceConfigSchema, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDependencyEnvVars, getDeployTargetError, getEndpointForStage, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace } from "../workspace-CASoZOjs.mjs";
|
|
2
2
|
|
|
3
|
-
export { PHASE_2_DEPLOY_TARGETS, SUPPORTED_DEPLOY_TARGETS, WorkspaceConfigSchema, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDependencyEnvVars, getDeployTargetError, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace };
|
|
3
|
+
export { PHASE_2_DEPLOY_TARGETS, SUPPORTED_DEPLOY_TARGETS, WorkspaceConfigSchema, defineWorkspace, formatValidationErrors, getAppBuildOrder, getAppGkmConfig, getDependencyEnvVars, getDeployTargetError, getEndpointForStage, isDeployTargetSupported, isPhase2DeployTarget, isWorkspaceConfig, normalizeWorkspace, processConfig, safeValidateWorkspaceConfig, validateWorkspaceConfig, wrapSingleAppAsWorkspace };
|
|
@@ -3488,13 +3488,15 @@ const ServicesConfigSchema = object({
|
|
|
3488
3488
|
});
|
|
3489
3489
|
/**
|
|
3490
3490
|
* Dokploy workspace configuration schema.
|
|
3491
|
+
* Supports either a single endpoint or per-stage endpoints.
|
|
3491
3492
|
*/
|
|
3492
3493
|
const DokployWorkspaceConfigSchema = object({
|
|
3493
|
-
endpoint: url("Dokploy endpoint must be a valid URL"),
|
|
3494
|
-
|
|
3494
|
+
endpoint: url("Dokploy endpoint must be a valid URL").optional(),
|
|
3495
|
+
endpoints: record(string(), url("Endpoint must be a valid URL")).optional(),
|
|
3495
3496
|
registry: string().optional(),
|
|
3496
|
-
registryId: string().optional()
|
|
3497
|
-
|
|
3497
|
+
registryId: string().optional(),
|
|
3498
|
+
domains: record(string(), string()).optional()
|
|
3499
|
+
}).refine((data) => data.endpoint || data.endpoints, { message: "Either endpoint or endpoints must be provided" });
|
|
3498
3500
|
/**
|
|
3499
3501
|
* Valid AWS regions.
|
|
3500
3502
|
*/
|
|
@@ -4111,6 +4113,37 @@ function getDependencyEnvVars(workspace, appName, urlPrefix = "http://localhost"
|
|
|
4111
4113
|
}
|
|
4112
4114
|
return env;
|
|
4113
4115
|
}
|
|
4116
|
+
/**
|
|
4117
|
+
* Resolve the Dokploy endpoint for a specific stage.
|
|
4118
|
+
*
|
|
4119
|
+
* Uses per-stage endpoint from `endpoints` if available,
|
|
4120
|
+
* otherwise falls back to the global `endpoint`.
|
|
4121
|
+
*
|
|
4122
|
+
* @param dokployConfig - Dokploy workspace configuration
|
|
4123
|
+
* @param stage - Deployment stage (e.g., 'development', 'production')
|
|
4124
|
+
* @returns The endpoint URL for the stage, or undefined if not configured
|
|
4125
|
+
*
|
|
4126
|
+
* @example
|
|
4127
|
+
* ```ts
|
|
4128
|
+
* // With per-stage endpoints
|
|
4129
|
+
* const config = {
|
|
4130
|
+
* endpoints: {
|
|
4131
|
+
* development: 'https://dev.dokploy.example.com:3000',
|
|
4132
|
+
* production: 'https://prod.dokploy.example.com:3000',
|
|
4133
|
+
* },
|
|
4134
|
+
* };
|
|
4135
|
+
* getEndpointForStage(config, 'production'); // => 'https://prod.dokploy.example.com:3000'
|
|
4136
|
+
*
|
|
4137
|
+
* // With single endpoint
|
|
4138
|
+
* const config = { endpoint: 'https://dokploy.example.com:3000' };
|
|
4139
|
+
* getEndpointForStage(config, 'production'); // => 'https://dokploy.example.com:3000'
|
|
4140
|
+
* ```
|
|
4141
|
+
*/
|
|
4142
|
+
function getEndpointForStage(dokployConfig, stage) {
|
|
4143
|
+
if (!dokployConfig) return void 0;
|
|
4144
|
+
if (dokployConfig.endpoints?.[stage]) return dokployConfig.endpoints[stage];
|
|
4145
|
+
return dokployConfig.endpoint;
|
|
4146
|
+
}
|
|
4114
4147
|
|
|
4115
4148
|
//#endregion
|
|
4116
4149
|
Object.defineProperty(exports, 'PHASE_2_DEPLOY_TARGETS', {
|
|
@@ -4167,6 +4200,12 @@ Object.defineProperty(exports, 'getDeployTargetError', {
|
|
|
4167
4200
|
return getDeployTargetError;
|
|
4168
4201
|
}
|
|
4169
4202
|
});
|
|
4203
|
+
Object.defineProperty(exports, 'getEndpointForStage', {
|
|
4204
|
+
enumerable: true,
|
|
4205
|
+
get: function () {
|
|
4206
|
+
return getEndpointForStage;
|
|
4207
|
+
}
|
|
4208
|
+
});
|
|
4170
4209
|
Object.defineProperty(exports, 'isDeployTargetSupported', {
|
|
4171
4210
|
enumerable: true,
|
|
4172
4211
|
get: function () {
|
|
@@ -4215,4 +4254,4 @@ Object.defineProperty(exports, 'wrapSingleAppAsWorkspace', {
|
|
|
4215
4254
|
return wrapSingleAppAsWorkspace;
|
|
4216
4255
|
}
|
|
4217
4256
|
});
|
|
4218
|
-
//# sourceMappingURL=workspace-
|
|
4257
|
+
//# sourceMappingURL=workspace-BMJE18LV.cjs.map
|