@geekmidas/cli 0.42.0 → 0.44.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/dist/index.mjs CHANGED
@@ -28,7 +28,7 @@ import prompts from "prompts";
28
28
 
29
29
  //#region package.json
30
30
  var name = "@geekmidas/cli";
31
- var version = "0.41.0";
31
+ var version = "0.44.0";
32
32
  var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
33
33
  var private$1 = false;
34
34
  var type = "module";
@@ -1624,7 +1624,8 @@ async function prepareEntryCredentials(options) {
1624
1624
  credentials.PORT = String(resolvedPort);
1625
1625
  const secretsDir = join(secretsRoot, ".gkm");
1626
1626
  await mkdir(secretsDir, { recursive: true });
1627
- const secretsJsonPath = join(secretsDir, "dev-secrets.json");
1627
+ const secretsFileName = appName ? `dev-secrets-${appName}.json` : "dev-secrets.json";
1628
+ const secretsJsonPath = join(secretsDir, secretsFileName);
1628
1629
  await writeFile(secretsJsonPath, JSON.stringify(credentials, null, 2));
1629
1630
  return {
1630
1631
  credentials,
@@ -3223,7 +3224,7 @@ CMD ["node", "server.mjs"]
3223
3224
  }
3224
3225
  /**
3225
3226
  * Generate a Dockerfile for apps with a custom entry point.
3226
- * Uses tsdown to bundle the entry point into dist/index.mjs.
3227
+ * Uses esbuild to bundle the entry point into dist/index.mjs with all dependencies.
3227
3228
  * This is used for apps that don't use gkm routes (e.g., Better Auth servers).
3228
3229
  * @internal Exported for testing
3229
3230
  */
@@ -3286,17 +3287,22 @@ RUN if [ -n "$GKM_ENCRYPTED_CREDENTIALS" ]; then \
3286
3287
  echo "$GKM_CREDENTIALS_IV" > ${appPath}/.gkm/credentials.iv; \
3287
3288
  fi
3288
3289
 
3289
- # Bundle entry point with tsdown (outputs to dist/index.mjs)
3290
+ # Bundle entry point with esbuild (outputs to dist/index.mjs)
3291
+ # Creates a fully standalone bundle with all dependencies included
3290
3292
  # Use define to embed credentials if present
3291
3293
  RUN cd ${appPath} && \
3292
3294
  if [ -f .gkm/credentials.enc ]; then \
3293
3295
  CREDS=$(cat .gkm/credentials.enc) && \
3294
3296
  IV=$(cat .gkm/credentials.iv) && \
3295
- npx tsdown ${entry} --outDir dist --format esm \
3296
- --define __GKM_ENCRYPTED_CREDENTIALS__="'\\"$CREDS\\"'" \
3297
- --define __GKM_CREDENTIALS_IV__="'\\"$IV\\"'"; \
3297
+ npx esbuild ${entry} --bundle --platform=node --target=node22 --format=esm \
3298
+ --outfile=dist/index.mjs --packages=bundle \
3299
+ --banner:js='import { createRequire } from "module"; const require = createRequire(import.meta.url);' \
3300
+ --define:__GKM_ENCRYPTED_CREDENTIALS__="'\\"$CREDS\\"'" \
3301
+ --define:__GKM_CREDENTIALS_IV__="'\\"$IV\\"'"; \
3298
3302
  else \
3299
- npx tsdown ${entry} --outDir dist --format esm; \
3303
+ npx esbuild ${entry} --bundle --platform=node --target=node22 --format=esm \
3304
+ --outfile=dist/index.mjs --packages=bundle \
3305
+ --banner:js='import { createRequire } from "module"; const require = createRequire(import.meta.url);'; \
3300
3306
  fi
3301
3307
 
3302
3308
  # Stage 4: Production
@@ -6243,6 +6249,7 @@ export default defineWorkspace({
6243
6249
  type: 'backend',
6244
6250
  path: 'apps/auth',
6245
6251
  port: 3002,
6252
+ entry: './src/index.ts',
6246
6253
  envParser: './src/config/env#envParser',
6247
6254
  logger: './src/config/logger#logger',
6248
6255
  },
@@ -6556,12 +6563,14 @@ const minimalTemplate = {
6556
6563
  "@geekmidas/schema": GEEKMIDAS_VERSIONS["@geekmidas/schema"],
6557
6564
  "@hono/node-server": "~1.14.1",
6558
6565
  hono: "~4.8.2",
6559
- pino: "~9.6.0"
6566
+ pino: "~9.6.0",
6567
+ zod: "~4.1.0"
6560
6568
  },
6561
6569
  devDependencies: {
6562
6570
  "@biomejs/biome": "~2.3.0",
6563
6571
  "@geekmidas/cli": GEEKMIDAS_VERSIONS["@geekmidas/cli"],
6564
6572
  "@types/node": "~22.0.0",
6573
+ esbuild: "~0.27.0",
6565
6574
  tsx: "~4.20.0",
6566
6575
  turbo: "~2.3.0",
6567
6576
  typescript: "~5.8.2",