@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/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env -S npx tsx
|
|
2
|
-
import { __require, getAppBuildOrder, getDependencyEnvVars, getDeployTargetError, isDeployTargetSupported } from "./workspace-
|
|
3
|
-
import { getAppNameFromCwd, loadAppConfig, loadConfig, loadWorkspaceConfig, parseModuleConfig } from "./config-
|
|
2
|
+
import { __require, getAppBuildOrder, getDependencyEnvVars, getDeployTargetError, isDeployTargetSupported } from "./workspace-CASoZOjs.mjs";
|
|
3
|
+
import { getAppNameFromCwd, loadAppConfig, loadConfig, loadWorkspaceConfig, parseModuleConfig } from "./config-BQ4a36Rq.mjs";
|
|
4
4
|
import { getCredentialsPath, getDokployCredentials, getDokployRegistryId, getDokployToken, removeDokployCredentials, storeDokployCredentials, storeDokployRegistryId } from "./credentials-DT1dSxIx.mjs";
|
|
5
|
-
import { ConstructGenerator, EndpointGenerator, OPENAPI_OUTPUT_PATH, OpenApiTsGenerator, generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi-
|
|
5
|
+
import { ConstructGenerator, EndpointGenerator, OPENAPI_OUTPUT_PATH, OpenApiTsGenerator, generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi-DrbBWq0s.mjs";
|
|
6
6
|
import { getKeyPath, maskPassword, readStageSecrets, secretsExist, setCustomSecret, toEmbeddableSecrets, writeStageSecrets } from "./storage-BMW6yLu3.mjs";
|
|
7
7
|
import { DokployApi } from "./dokploy-api-7k3t7_zd.mjs";
|
|
8
8
|
import { encryptSecrets } from "./encryption-JtMsiGNp.mjs";
|
|
@@ -31,7 +31,7 @@ import prompts from "prompts";
|
|
|
31
31
|
|
|
32
32
|
//#region package.json
|
|
33
33
|
var name = "@geekmidas/cli";
|
|
34
|
-
var version = "1.0
|
|
34
|
+
var version = "1.1.0";
|
|
35
35
|
var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
|
|
36
36
|
var private$1 = false;
|
|
37
37
|
var type = "module";
|
|
@@ -2156,10 +2156,11 @@ function getAppOutputPath(workspace, _appName, app) {
|
|
|
2156
2156
|
/**
|
|
2157
2157
|
* Create a new empty state for a stage
|
|
2158
2158
|
*/
|
|
2159
|
-
function createEmptyState(stage, environmentId) {
|
|
2159
|
+
function createEmptyState(stage, projectId, environmentId) {
|
|
2160
2160
|
return {
|
|
2161
2161
|
provider: "dokploy",
|
|
2162
2162
|
stage,
|
|
2163
|
+
projectId,
|
|
2163
2164
|
environmentId,
|
|
2164
2165
|
applications: {},
|
|
2165
2166
|
services: {},
|
|
@@ -5507,13 +5508,17 @@ async function workspaceDeployCommand(workspace, options) {
|
|
|
5507
5508
|
let state = await stateProvider.read(stage);
|
|
5508
5509
|
if (state) {
|
|
5509
5510
|
logger$1.log(` Found existing state for stage "${stage}"`);
|
|
5511
|
+
if (state.projectId !== project.projectId) {
|
|
5512
|
+
logger$1.log(` ⚠ Project ID changed, updating state`);
|
|
5513
|
+
state.projectId = project.projectId;
|
|
5514
|
+
}
|
|
5510
5515
|
if (state.environmentId !== environmentId) {
|
|
5511
5516
|
logger$1.log(` ⚠ Environment ID changed, updating state`);
|
|
5512
5517
|
state.environmentId = environmentId;
|
|
5513
5518
|
}
|
|
5514
5519
|
} else {
|
|
5515
5520
|
logger$1.log(` Creating new state for stage "${stage}"`);
|
|
5516
|
-
state = createEmptyState(stage, environmentId);
|
|
5521
|
+
state = createEmptyState(stage, project.projectId, environmentId);
|
|
5517
5522
|
}
|
|
5518
5523
|
logger$1.log("\n🐳 Checking registry...");
|
|
5519
5524
|
let registryId = await getDokployRegistryId();
|
|
@@ -6329,7 +6334,7 @@ const GEEKMIDAS_VERSIONS = {
|
|
|
6329
6334
|
"@geekmidas/storage": "~1.0.0",
|
|
6330
6335
|
"@geekmidas/studio": "~1.0.0",
|
|
6331
6336
|
"@geekmidas/telescope": "~1.0.0",
|
|
6332
|
-
"@geekmidas/testkit": "~1.0.
|
|
6337
|
+
"@geekmidas/testkit": "~1.0.1",
|
|
6333
6338
|
"@geekmidas/cli": CLI_VERSION
|
|
6334
6339
|
};
|
|
6335
6340
|
|