@geekmidas/cli 1.2.3 → 1.3.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/{CachedStateProvider-DVyKfaMm.mjs → CachedStateProvider-BDq5WqSy.mjs} +1 -1
- package/dist/{CachedStateProvider-DVyKfaMm.mjs.map → CachedStateProvider-BDq5WqSy.mjs.map} +1 -1
- package/dist/CachedStateProvider-CI61keQ1.mjs +3 -0
- package/dist/{HostingerProvider-DqUq6e9i.mjs → HostingerProvider-B9N-TKbp.mjs} +2 -2
- package/dist/{HostingerProvider-DqUq6e9i.mjs.map → HostingerProvider-B9N-TKbp.mjs.map} +1 -1
- package/dist/{LocalStateProvider-DxoSaWUV.mjs → LocalStateProvider-BDm7ZqJo.mjs} +1 -1
- package/dist/{LocalStateProvider-DxoSaWUV.mjs.map → LocalStateProvider-BDm7ZqJo.mjs.map} +1 -1
- package/dist/{Route53Provider-KUAX3vz9.mjs → Route53Provider-DOWmFnwN.mjs} +2 -2
- package/dist/{Route53Provider-KUAX3vz9.mjs.map → Route53Provider-DOWmFnwN.mjs.map} +1 -1
- package/dist/{Route53Provider-CpRIqu69.cjs → Route53Provider-xrWuBXih.cjs} +2 -2
- package/dist/{Route53Provider-CpRIqu69.cjs.map → Route53Provider-xrWuBXih.cjs.map} +1 -1
- package/dist/{SSMStateProvider-D79o_JjM.cjs → SSMStateProvider-DGrqYll0.cjs} +8 -4
- package/dist/SSMStateProvider-DGrqYll0.cjs.map +1 -0
- package/dist/{SSMStateProvider-BjCi_58g.mjs → SSMStateProvider-DT0WV-E_.mjs} +9 -4
- package/dist/SSMStateProvider-DT0WV-E_.mjs.map +1 -0
- package/dist/{bundler-BqTN5Dj5.mjs → bundler-DgXsOSxc.mjs} +3 -3
- package/dist/{bundler-BqTN5Dj5.mjs.map → bundler-DgXsOSxc.mjs.map} +1 -1
- package/dist/chunk-Duj1WY3L.mjs +7 -0
- package/dist/{config-BQ4a36Rq.mjs → config-C1bidhvG.mjs} +2 -2
- package/dist/{config-BQ4a36Rq.mjs.map → config-C1bidhvG.mjs.map} +1 -1
- package/dist/{config-Bayob8pB.cjs → config-C1dM7aZb.cjs} +2 -2
- package/dist/{config-Bayob8pB.cjs.map → config-C1dM7aZb.cjs.map} +1 -1
- package/dist/config.cjs +2 -2
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +2 -2
- package/dist/{credentials-DT1dSxIx.mjs → credentials-s1kLcIzK.mjs} +1 -1
- package/dist/{credentials-DT1dSxIx.mjs.map → credentials-s1kLcIzK.mjs.map} +1 -1
- package/dist/deploy/sniffer-routes-worker.cjs +65 -0
- package/dist/deploy/sniffer-routes-worker.cjs.map +1 -0
- package/dist/deploy/sniffer-routes-worker.d.cts +1 -0
- package/dist/deploy/sniffer-routes-worker.d.mts +1 -0
- package/dist/deploy/sniffer-routes-worker.mjs +64 -0
- package/dist/deploy/sniffer-routes-worker.mjs.map +1 -0
- package/dist/dokploy-api-DSJYNx88.mjs +3 -0
- package/dist/{dokploy-api-7k3t7_zd.mjs → dokploy-api-z0833e7r.mjs} +1 -1
- package/dist/{dokploy-api-7k3t7_zd.mjs.map → dokploy-api-z0833e7r.mjs.map} +1 -1
- package/dist/{encryption-JtMsiGNp.mjs → encryption-BOH5M-f-.mjs} +1 -1
- package/dist/{encryption-JtMsiGNp.mjs.map → encryption-BOH5M-f-.mjs.map} +1 -1
- package/dist/encryption-a9TNMWav.mjs +3 -0
- package/dist/{index-Bi9vGQJy.d.mts → index-DvpWzLD7.d.mts} +5 -2
- package/dist/index-DvpWzLD7.d.mts.map +1 -0
- package/dist/{index-CufAAnge.d.cts → index-DzmZ6SUW.d.cts} +4 -1
- package/dist/index-DzmZ6SUW.d.cts.map +1 -0
- package/dist/index.cjs +14 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +29 -25
- package/dist/index.mjs.map +1 -1
- package/dist/{openapi-NthphEWK.mjs → openapi-9k6a6VA4.mjs} +2 -2
- package/dist/{openapi-NthphEWK.mjs.map → openapi-9k6a6VA4.mjs.map} +1 -1
- package/dist/{openapi-ZhO7wwya.cjs → openapi-Dcja4e1C.cjs} +2 -2
- package/dist/{openapi-ZhO7wwya.cjs.map → openapi-Dcja4e1C.cjs.map} +1 -1
- package/dist/{openapi-react-query-DGEkD39r.mjs → openapi-react-query-DaTMSPD5.mjs} +1 -1
- package/dist/{openapi-react-query-DGEkD39r.mjs.map → openapi-react-query-DaTMSPD5.mjs.map} +1 -1
- package/dist/openapi-react-query.mjs +1 -1
- package/dist/openapi.cjs +3 -3
- package/dist/openapi.d.mts +1 -1
- package/dist/openapi.mjs +3 -3
- package/dist/{storage-BMW6yLu3.mjs → storage-DmCbr6DI.mjs} +1 -1
- package/dist/{storage-BMW6yLu3.mjs.map → storage-DmCbr6DI.mjs.map} +1 -1
- package/dist/{storage-D8XzjVaO.mjs → storage-Dx_jZbq6.mjs} +1 -1
- package/dist/{types-BldpmqQX.d.mts → types-B9UZ7fOG.d.mts} +1 -1
- package/dist/{types-BldpmqQX.d.mts.map → types-B9UZ7fOG.d.mts.map} +1 -1
- package/dist/workspace/index.cjs +1 -1
- package/dist/workspace/index.d.cts +1 -1
- package/dist/workspace/index.d.mts +2 -2
- package/dist/workspace/index.mjs +1 -1
- package/dist/{workspace-CASoZOjs.mjs → workspace-Cb_I7oCJ.mjs} +5 -8
- package/dist/{workspace-CASoZOjs.mjs.map → workspace-Cb_I7oCJ.mjs.map} +1 -1
- package/dist/{workspace-BMJE18LV.cjs → workspace-CeFgIDC-.cjs} +3 -2
- package/dist/{workspace-BMJE18LV.cjs.map → workspace-CeFgIDC-.cjs.map} +1 -1
- package/package.json +1 -1
- package/src/deploy/SSMStateProvider.ts +14 -3
- package/src/deploy/StateProvider.ts +5 -1
- package/src/deploy/__tests__/SSMStateProvider.spec.ts +12 -0
- package/src/deploy/__tests__/createStateProvider.spec.ts +10 -0
- package/src/init/generators/web.ts +6 -2
- package/src/workspace/schema.ts +2 -0
- package/tsdown.config.ts +1 -0
- package/dist/CachedStateProvider-OiFUGr7p.mjs +0 -3
- package/dist/SSMStateProvider-BjCi_58g.mjs.map +0 -1
- package/dist/SSMStateProvider-D79o_JjM.cjs.map +0 -1
- package/dist/dokploy-api-CHa8G51l.mjs +0 -3
- package/dist/encryption-UUmaWAmz.mjs +0 -3
- package/dist/index-Bi9vGQJy.d.mts.map +0 -1
- package/dist/index-CufAAnge.d.cts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env -S npx tsx
|
|
2
|
-
import { __require
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { __require } from "./chunk-Duj1WY3L.mjs";
|
|
3
|
+
import { getAppBuildOrder, getDependencyEnvVars, getDeployTargetError, isDeployTargetSupported } from "./workspace-Cb_I7oCJ.mjs";
|
|
4
|
+
import { getAppNameFromCwd, loadAppConfig, loadConfig, loadWorkspaceConfig, parseModuleConfig } from "./config-C1bidhvG.mjs";
|
|
5
|
+
import { getCredentialsPath, getDokployCredentials, getDokployRegistryId, getDokployToken, removeDokployCredentials, storeDokployCredentials, storeDokployRegistryId } from "./credentials-s1kLcIzK.mjs";
|
|
6
|
+
import { ConstructGenerator, EndpointGenerator, OPENAPI_OUTPUT_PATH, generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi-9k6a6VA4.mjs";
|
|
7
|
+
import { getKeyPath, maskPassword, readStageSecrets, secretsExist, setCustomSecret, toEmbeddableSecrets, writeStageSecrets } from "./storage-DmCbr6DI.mjs";
|
|
8
|
+
import { DokployApi } from "./dokploy-api-z0833e7r.mjs";
|
|
9
|
+
import { encryptSecrets } from "./encryption-BOH5M-f-.mjs";
|
|
10
|
+
import { CachedStateProvider } from "./CachedStateProvider-BDq5WqSy.mjs";
|
|
11
|
+
import { generateReactQueryCommand } from "./openapi-react-query-DaTMSPD5.mjs";
|
|
11
12
|
import { createRequire } from "node:module";
|
|
12
13
|
import { copyFileSync, existsSync, readFileSync, unlinkSync } from "node:fs";
|
|
13
14
|
import { basename, dirname, join, parse, relative, resolve } from "node:path";
|
|
@@ -31,7 +32,7 @@ import prompts from "prompts";
|
|
|
31
32
|
|
|
32
33
|
//#region package.json
|
|
33
34
|
var name = "@geekmidas/cli";
|
|
34
|
-
var version = "1.2.
|
|
35
|
+
var version = "1.2.3";
|
|
35
36
|
var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
|
|
36
37
|
var private$1 = false;
|
|
37
38
|
var type = "module";
|
|
@@ -131,7 +132,7 @@ const logger$11 = console;
|
|
|
131
132
|
* Validate Dokploy token by making a test API call
|
|
132
133
|
*/
|
|
133
134
|
async function validateDokployToken(endpoint, token) {
|
|
134
|
-
const { DokployApi: DokployApi$1 } = await import("./dokploy-api-
|
|
135
|
+
const { DokployApi: DokployApi$1 } = await import("./dokploy-api-DSJYNx88.mjs");
|
|
135
136
|
const api = new DokployApi$1({
|
|
136
137
|
baseUrl: endpoint,
|
|
137
138
|
token
|
|
@@ -1954,7 +1955,7 @@ async function buildForProvider(provider, context, rootOutputDir, endpointGenera
|
|
|
1954
1955
|
let masterKey;
|
|
1955
1956
|
if (context.production?.bundle && !skipBundle) {
|
|
1956
1957
|
logger$7.log(`\n📦 Bundling production server...`);
|
|
1957
|
-
const { bundleServer } = await import("./bundler-
|
|
1958
|
+
const { bundleServer } = await import("./bundler-DgXsOSxc.mjs");
|
|
1958
1959
|
const allConstructs = [
|
|
1959
1960
|
...endpoints.map((e) => e.construct),
|
|
1960
1961
|
...functions.map((f) => f.construct),
|
|
@@ -2198,11 +2199,11 @@ async function createDnsProvider(options) {
|
|
|
2198
2199
|
if (isDnsProvider(config$1.provider)) return config$1.provider;
|
|
2199
2200
|
const provider = config$1.provider;
|
|
2200
2201
|
if (provider === "hostinger") {
|
|
2201
|
-
const { HostingerProvider } = await import("./HostingerProvider-
|
|
2202
|
+
const { HostingerProvider } = await import("./HostingerProvider-B9N-TKbp.mjs");
|
|
2202
2203
|
return new HostingerProvider();
|
|
2203
2204
|
}
|
|
2204
2205
|
if (provider === "route53") {
|
|
2205
|
-
const { Route53Provider } = await import("./Route53Provider-
|
|
2206
|
+
const { Route53Provider } = await import("./Route53Provider-DOWmFnwN.mjs");
|
|
2206
2207
|
const route53Config = config$1;
|
|
2207
2208
|
return new Route53Provider({
|
|
2208
2209
|
region: route53Config.region,
|
|
@@ -4457,24 +4458,26 @@ function isStateProvider(value) {
|
|
|
4457
4458
|
async function createStateProvider(options) {
|
|
4458
4459
|
const { config: config$1, workspaceRoot, workspaceName } = options;
|
|
4459
4460
|
if (!config$1) {
|
|
4460
|
-
const { LocalStateProvider } = await import("./LocalStateProvider-
|
|
4461
|
+
const { LocalStateProvider } = await import("./LocalStateProvider-BDm7ZqJo.mjs");
|
|
4461
4462
|
return new LocalStateProvider(workspaceRoot);
|
|
4462
4463
|
}
|
|
4463
4464
|
if (isStateProvider(config$1.provider)) return config$1.provider;
|
|
4464
4465
|
const provider = config$1.provider;
|
|
4465
4466
|
if (provider === "local") {
|
|
4466
|
-
const { LocalStateProvider } = await import("./LocalStateProvider-
|
|
4467
|
+
const { LocalStateProvider } = await import("./LocalStateProvider-BDm7ZqJo.mjs");
|
|
4467
4468
|
return new LocalStateProvider(workspaceRoot);
|
|
4468
4469
|
}
|
|
4469
4470
|
if (provider === "ssm") {
|
|
4470
4471
|
if (!workspaceName) throw new Error("Workspace name is required for SSM state provider. Set \"name\" in gkm.config.ts.");
|
|
4471
|
-
const { LocalStateProvider } = await import("./LocalStateProvider-
|
|
4472
|
-
const { SSMStateProvider } = await import("./SSMStateProvider-
|
|
4473
|
-
const { CachedStateProvider: CachedStateProvider$1 } = await import("./CachedStateProvider-
|
|
4472
|
+
const { LocalStateProvider } = await import("./LocalStateProvider-BDm7ZqJo.mjs");
|
|
4473
|
+
const { SSMStateProvider } = await import("./SSMStateProvider-DT0WV-E_.mjs");
|
|
4474
|
+
const { CachedStateProvider: CachedStateProvider$1 } = await import("./CachedStateProvider-CI61keQ1.mjs");
|
|
4475
|
+
const ssmConfig = config$1;
|
|
4474
4476
|
const local = new LocalStateProvider(workspaceRoot);
|
|
4475
4477
|
const ssm = SSMStateProvider.create({
|
|
4476
4478
|
workspaceName,
|
|
4477
|
-
region:
|
|
4479
|
+
region: ssmConfig.region,
|
|
4480
|
+
profile: ssmConfig.profile
|
|
4478
4481
|
});
|
|
4479
4482
|
return new CachedStateProvider$1(ssm, local);
|
|
4480
4483
|
}
|
|
@@ -5848,7 +5851,7 @@ async function deployCommand(options) {
|
|
|
5848
5851
|
dokployConfig = setupResult.config;
|
|
5849
5852
|
finalRegistry = dokployConfig.registry ?? dockerConfig.registry;
|
|
5850
5853
|
if (setupResult.serviceUrls) {
|
|
5851
|
-
const { readStageSecrets: readStageSecrets$1, writeStageSecrets: writeStageSecrets$1, initStageSecrets } = await import("./storage-
|
|
5854
|
+
const { readStageSecrets: readStageSecrets$1, writeStageSecrets: writeStageSecrets$1, initStageSecrets } = await import("./storage-Dx_jZbq6.mjs");
|
|
5852
5855
|
let secrets = await readStageSecrets$1(stage);
|
|
5853
5856
|
if (!secrets) {
|
|
5854
5857
|
logger$1.log(` Creating secrets file for stage "${stage}"...`);
|
|
@@ -9904,14 +9907,14 @@ export default nextConfig;
|
|
|
9904
9907
|
jsx: "preserve",
|
|
9905
9908
|
incremental: true,
|
|
9906
9909
|
plugins: [{ name: "next" }],
|
|
9910
|
+
baseUrl: ".",
|
|
9907
9911
|
paths: {
|
|
9908
|
-
"~/*": ["./src/*"],
|
|
9912
|
+
"~/*": ["./src/*", "../../packages/ui/src/*"],
|
|
9909
9913
|
[`${modelsPackage}`]: ["../../packages/models/src"],
|
|
9910
9914
|
[`${modelsPackage}/*`]: ["../../packages/models/src/*"],
|
|
9911
9915
|
[`${uiPackage}`]: ["../../packages/ui/src"],
|
|
9912
9916
|
[`${uiPackage}/*`]: ["../../packages/ui/src/*"]
|
|
9913
|
-
}
|
|
9914
|
-
baseUrl: "."
|
|
9917
|
+
}
|
|
9915
9918
|
},
|
|
9916
9919
|
include: [
|
|
9917
9920
|
"next-env.d.ts",
|
|
@@ -9919,7 +9922,8 @@ export default nextConfig;
|
|
|
9919
9922
|
"**/*.tsx",
|
|
9920
9923
|
".next/types/**/*.ts"
|
|
9921
9924
|
],
|
|
9922
|
-
exclude: ["node_modules"]
|
|
9925
|
+
exclude: ["node_modules"],
|
|
9926
|
+
references: [{ path: "../../packages/ui" }, { path: "../../packages/models" }]
|
|
9923
9927
|
};
|
|
9924
9928
|
const queryClientTs = `import { QueryClient } from '@tanstack/react-query';
|
|
9925
9929
|
|