@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.cjs +13 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +13 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/docker/templates.ts +11 -6
- package/src/init/generators/monorepo.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geekmidas/cli",
|
|
3
|
-
"version": "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,10 +48,10 @@
|
|
|
48
48
|
"lodash.kebabcase": "^4.1.1",
|
|
49
49
|
"openapi-typescript": "^7.4.2",
|
|
50
50
|
"prompts": "~2.4.2",
|
|
51
|
+
"@geekmidas/envkit": "~0.6.0",
|
|
51
52
|
"@geekmidas/constructs": "~0.7.0",
|
|
52
53
|
"@geekmidas/errors": "~0.1.0",
|
|
53
54
|
"@geekmidas/logger": "~0.4.0",
|
|
54
|
-
"@geekmidas/envkit": "~0.6.0",
|
|
55
55
|
"@geekmidas/schema": "~0.1.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
package/src/docker/templates.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
906
|
-
--
|
|
907
|
-
--
|
|
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
|
|
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
|