@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/dist/index.cjs
CHANGED
|
@@ -29,7 +29,7 @@ const node_module = require_chunk.__toESM(require("node:module"));
|
|
|
29
29
|
|
|
30
30
|
//#region package.json
|
|
31
31
|
var name = "@geekmidas/cli";
|
|
32
|
-
var version = "0.
|
|
32
|
+
var version = "0.43.0";
|
|
33
33
|
var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
|
|
34
34
|
var private$1 = false;
|
|
35
35
|
var type = "module";
|
|
@@ -3224,7 +3224,7 @@ CMD ["node", "server.mjs"]
|
|
|
3224
3224
|
}
|
|
3225
3225
|
/**
|
|
3226
3226
|
* Generate a Dockerfile for apps with a custom entry point.
|
|
3227
|
-
* Uses
|
|
3227
|
+
* Uses esbuild to bundle the entry point into dist/index.mjs with all dependencies.
|
|
3228
3228
|
* This is used for apps that don't use gkm routes (e.g., Better Auth servers).
|
|
3229
3229
|
* @internal Exported for testing
|
|
3230
3230
|
*/
|
|
@@ -3287,17 +3287,22 @@ RUN if [ -n "$GKM_ENCRYPTED_CREDENTIALS" ]; then \
|
|
|
3287
3287
|
echo "$GKM_CREDENTIALS_IV" > ${appPath}/.gkm/credentials.iv; \
|
|
3288
3288
|
fi
|
|
3289
3289
|
|
|
3290
|
-
# Bundle entry point with
|
|
3290
|
+
# Bundle entry point with esbuild (outputs to dist/index.mjs)
|
|
3291
|
+
# Creates a fully standalone bundle with all dependencies included
|
|
3291
3292
|
# Use define to embed credentials if present
|
|
3292
3293
|
RUN cd ${appPath} && \
|
|
3293
3294
|
if [ -f .gkm/credentials.enc ]; then \
|
|
3294
3295
|
CREDS=$(cat .gkm/credentials.enc) && \
|
|
3295
3296
|
IV=$(cat .gkm/credentials.iv) && \
|
|
3296
|
-
npx
|
|
3297
|
-
--
|
|
3298
|
-
--
|
|
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\\"'"; \
|
|
3299
3302
|
else \
|
|
3300
|
-
npx
|
|
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);'; \
|
|
3301
3306
|
fi
|
|
3302
3307
|
|
|
3303
3308
|
# Stage 4: Production
|
|
@@ -6244,6 +6249,7 @@ export default defineWorkspace({
|
|
|
6244
6249
|
type: 'backend',
|
|
6245
6250
|
path: 'apps/auth',
|
|
6246
6251
|
port: 3002,
|
|
6252
|
+
entry: './src/index.ts',
|
|
6247
6253
|
envParser: './src/config/env#envParser',
|
|
6248
6254
|
logger: './src/config/logger#logger',
|
|
6249
6255
|
},
|