@geekmidas/cli 0.42.0 → 0.43.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.43.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";
@@ -3223,7 +3223,7 @@ CMD ["node", "server.mjs"]
3223
3223
  }
3224
3224
  /**
3225
3225
  * Generate a Dockerfile for apps with a custom entry point.
3226
- * Uses tsdown to bundle the entry point into dist/index.mjs.
3226
+ * Uses esbuild to bundle the entry point into dist/index.mjs with all dependencies.
3227
3227
  * This is used for apps that don't use gkm routes (e.g., Better Auth servers).
3228
3228
  * @internal Exported for testing
3229
3229
  */
@@ -3286,17 +3286,22 @@ RUN if [ -n "$GKM_ENCRYPTED_CREDENTIALS" ]; then \
3286
3286
  echo "$GKM_CREDENTIALS_IV" > ${appPath}/.gkm/credentials.iv; \
3287
3287
  fi
3288
3288
 
3289
- # Bundle entry point with tsdown (outputs to dist/index.mjs)
3289
+ # Bundle entry point with esbuild (outputs to dist/index.mjs)
3290
+ # Creates a fully standalone bundle with all dependencies included
3290
3291
  # Use define to embed credentials if present
3291
3292
  RUN cd ${appPath} && \
3292
3293
  if [ -f .gkm/credentials.enc ]; then \
3293
3294
  CREDS=$(cat .gkm/credentials.enc) && \
3294
3295
  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\\"'"; \
3296
+ npx esbuild ${entry} --bundle --platform=node --target=node22 --format=esm \
3297
+ --outfile=dist/index.mjs --packages=bundle \
3298
+ --banner:js='import { createRequire } from "module"; const require = createRequire(import.meta.url);' \
3299
+ --define:__GKM_ENCRYPTED_CREDENTIALS__="'\\"$CREDS\\"'" \
3300
+ --define:__GKM_CREDENTIALS_IV__="'\\"$IV\\"'"; \
3298
3301
  else \
3299
- npx tsdown ${entry} --outDir dist --format esm; \
3302
+ npx esbuild ${entry} --bundle --platform=node --target=node22 --format=esm \
3303
+ --outfile=dist/index.mjs --packages=bundle \
3304
+ --banner:js='import { createRequire } from "module"; const require = createRequire(import.meta.url);'; \
3300
3305
  fi
3301
3306
 
3302
3307
  # Stage 4: Production
@@ -6243,6 +6248,7 @@ export default defineWorkspace({
6243
6248
  type: 'backend',
6244
6249
  path: 'apps/auth',
6245
6250
  port: 3002,
6251
+ entry: './src/index.ts',
6246
6252
  envParser: './src/config/env#envParser',
6247
6253
  logger: './src/config/logger#logger',
6248
6254
  },