@geekmidas/cli 0.41.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekmidas/cli",
3
- "version": "0.41.0",
3
+ "version": "0.43.0",
4
4
  "description": "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs",
5
5
  "private": false,
6
6
  "type": "module",
@@ -48,11 +48,11 @@
48
48
  "lodash.kebabcase": "^4.1.1",
49
49
  "openapi-typescript": "^7.4.2",
50
50
  "prompts": "~2.4.2",
51
- "@geekmidas/logger": "~0.4.0",
51
+ "@geekmidas/envkit": "~0.6.0",
52
52
  "@geekmidas/constructs": "~0.7.0",
53
53
  "@geekmidas/errors": "~0.1.0",
54
- "@geekmidas/schema": "~0.1.0",
55
- "@geekmidas/envkit": "~0.6.0"
54
+ "@geekmidas/logger": "~0.4.0",
55
+ "@geekmidas/schema": "~0.1.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/lodash.kebabcase": "^4.1.9",
@@ -823,7 +823,7 @@ export interface EntryDockerfileOptions {
823
823
 
824
824
  /**
825
825
  * Generate a Dockerfile for apps with a custom entry point.
826
- * Uses tsdown to bundle the entry point into dist/index.mjs.
826
+ * Uses esbuild to bundle the entry point into dist/index.mjs with all dependencies.
827
827
  * This is used for apps that don't use gkm routes (e.g., Better Auth servers).
828
828
  * @internal Exported for testing
829
829
  */
@@ -896,17 +896,22 @@ RUN if [ -n "$GKM_ENCRYPTED_CREDENTIALS" ]; then \
896
896
  echo "$GKM_CREDENTIALS_IV" > ${appPath}/.gkm/credentials.iv; \
897
897
  fi
898
898
 
899
- # Bundle entry point with tsdown (outputs to dist/index.mjs)
899
+ # Bundle entry point with esbuild (outputs to dist/index.mjs)
900
+ # Creates a fully standalone bundle with all dependencies included
900
901
  # Use define to embed credentials if present
901
902
  RUN cd ${appPath} && \
902
903
  if [ -f .gkm/credentials.enc ]; then \
903
904
  CREDS=$(cat .gkm/credentials.enc) && \
904
905
  IV=$(cat .gkm/credentials.iv) && \
905
- npx tsdown ${entry} --outDir dist --format esm \
906
- --define __GKM_ENCRYPTED_CREDENTIALS__="'\\"$CREDS\\"'" \
907
- --define __GKM_CREDENTIALS_IV__="'\\"$IV\\"'"; \
906
+ npx esbuild ${entry} --bundle --platform=node --target=node22 --format=esm \
907
+ --outfile=dist/index.mjs --packages=bundle \
908
+ --banner:js='import { createRequire } from "module"; const require = createRequire(import.meta.url);' \
909
+ --define:__GKM_ENCRYPTED_CREDENTIALS__="'\\"$CREDS\\"'" \
910
+ --define:__GKM_CREDENTIALS_IV__="'\\"$IV\\"'"; \
908
911
  else \
909
- npx tsdown ${entry} --outDir dist --format esm; \
912
+ npx esbuild ${entry} --bundle --platform=node --target=node22 --format=esm \
913
+ --outfile=dist/index.mjs --packages=bundle \
914
+ --banner:js='import { createRequire } from "module"; const require = createRequire(import.meta.url);'; \
910
915
  fi
911
916
 
912
917
  # Stage 4: Production
@@ -25,9 +25,7 @@ export function generateModelsPackage(
25
25
  scripts: {
26
26
  typecheck: 'tsc --noEmit',
27
27
  },
28
- dependencies: {
29
- zod: '~4.1.0',
30
- },
28
+ dependencies: {},
31
29
  devDependencies: {
32
30
  typescript: '~5.8.2',
33
31
  },
@@ -38,9 +38,13 @@ export function generateMonorepoFiles(
38
38
  ? { deploy: 'gkm deploy --provider dokploy --stage production' }
39
39
  : {}),
40
40
  },
41
+ dependencies: {
42
+ zod: '~4.1.0',
43
+ },
41
44
  devDependencies: {
42
45
  '@biomejs/biome': '~2.3.0',
43
46
  '@geekmidas/cli': GEEKMIDAS_VERSIONS['@geekmidas/cli'],
47
+ esbuild: '~0.27.0',
44
48
  turbo: '~2.3.0',
45
49
  typescript: '~5.8.2',
46
50
  vitest: '~4.0.0',
@@ -354,6 +358,7 @@ export default defineWorkspace({
354
358
  type: 'backend',
355
359
  path: 'apps/auth',
356
360
  port: 3002,
361
+ entry: './src/index.ts',
357
362
  envParser: './src/config/env#envParser',
358
363
  logger: './src/config/logger#logger',
359
364
  },
@@ -37,22 +37,19 @@ export function generatePackageJson(
37
37
  devDependencies['@types/pg'] = '~8.15.0';
38
38
  }
39
39
 
40
- // Add zod for schema validation (commonly used)
41
- dependencies.zod = '~4.1.0';
42
-
43
- // For monorepo apps, remove biome/turbo (they're at root) and lint/fmt scripts
40
+ // For monorepo apps, remove biome/turbo/esbuild (they're at root) and lint/fmt scripts
41
+ // zod is at root level for monorepos
44
42
  if (monorepo) {
45
43
  delete devDependencies['@biomejs/biome'];
46
44
  delete devDependencies.turbo;
45
+ delete devDependencies.esbuild;
46
+ delete dependencies.zod;
47
47
  delete scripts.lint;
48
48
  delete scripts.fmt;
49
49
  delete scripts['fmt:check'];
50
50
 
51
51
  // Add models package as dependency
52
52
  dependencies[`@${name}/models`] = 'workspace:*';
53
-
54
- // Remove zod from api package (it's in models)
55
- delete dependencies.zod;
56
53
  }
57
54
 
58
55
  // Sort dependencies alphabetically
@@ -23,12 +23,14 @@ export const apiTemplate: TemplateConfig = {
23
23
  '@hono/node-server': '~1.14.1',
24
24
  hono: '~4.8.2',
25
25
  pino: '~9.6.0',
26
+ zod: '~4.1.0',
26
27
  },
27
28
 
28
29
  devDependencies: {
29
30
  '@biomejs/biome': '~2.3.0',
30
31
  '@geekmidas/cli': GEEKMIDAS_VERSIONS['@geekmidas/cli'],
31
32
  '@types/node': '~22.0.0',
33
+ esbuild: '~0.27.0',
32
34
  tsx: '~4.20.0',
33
35
  turbo: '~2.3.0',
34
36
  typescript: '~5.8.2',