@geekmidas/cli 0.40.0 → 0.41.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.40.0";
31
+ var version = "0.41.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";
@@ -2121,7 +2121,7 @@ async function buildForProvider(provider, context, rootOutputDir, endpointGenera
2121
2121
  let masterKey;
2122
2122
  if (context.production?.bundle && !skipBundle) {
2123
2123
  logger$6.log(`\n📦 Bundling production server...`);
2124
- const { bundleServer } = await import("./bundler-Db83tLti.mjs");
2124
+ const { bundleServer } = await import("./bundler-DGry2vaR.mjs");
2125
2125
  const allConstructs = [
2126
2126
  ...endpoints.map((e) => e.construct),
2127
2127
  ...functions.map((f) => f.construct),
@@ -3078,6 +3078,13 @@ ${publicUrlEnvDeclarations}
3078
3078
  # Copy pruned source
3079
3079
  COPY --from=pruner /app/out/full/ ./
3080
3080
 
3081
+ # Copy workspace root configs for turbo builds (turbo prune doesn't include root configs)
3082
+ # Using wildcard to make it optional for single-app projects
3083
+ COPY --from=pruner /app/tsconfig.* ./
3084
+
3085
+ # Ensure public directory exists (may be empty for scaffolded projects)
3086
+ RUN mkdir -p ${appPath}/public
3087
+
3081
3088
  # Set Next.js to produce standalone output
3082
3089
  ENV NEXT_TELEMETRY_DISABLED=1
3083
3090
 
@@ -3172,6 +3179,11 @@ ARG GKM_CREDENTIALS_IV=""
3172
3179
  # Copy pruned source
3173
3180
  COPY --from=pruner /app/out/full/ ./
3174
3181
 
3182
+ # Copy workspace root configs for turbo builds (turbo prune doesn't include root configs)
3183
+ # Using wildcard to make it optional for single-app projects
3184
+ COPY --from=pruner /app/gkm.config.* ./
3185
+ COPY --from=pruner /app/tsconfig.* ./
3186
+
3175
3187
  # Write encrypted credentials for gkm build to embed
3176
3188
  RUN if [ -n "$GKM_ENCRYPTED_CREDENTIALS" ]; then \
3177
3189
  mkdir -p ${appPath}/.gkm && \
@@ -3263,6 +3275,10 @@ ARG GKM_CREDENTIALS_IV=""
3263
3275
  # Copy pruned source
3264
3276
  COPY --from=pruner /app/out/full/ ./
3265
3277
 
3278
+ # Copy workspace root configs for turbo builds (turbo prune doesn't include root configs)
3279
+ # Using wildcard to make it optional for single-app projects
3280
+ COPY --from=pruner /app/tsconfig.* ./
3281
+
3266
3282
  # Write encrypted credentials for tsdown to embed via define
3267
3283
  RUN if [ -n "$GKM_ENCRYPTED_CREDENTIALS" ]; then \
3268
3284
  mkdir -p ${appPath}/.gkm && \
@@ -3473,7 +3489,10 @@ async function pushDockerImage(imageName, options) {
3473
3489
  */
3474
3490
  function getAppPackageName(appPath) {
3475
3491
  try {
3476
- const pkg$1 = __require(`${appPath}/package.json`);
3492
+ const pkgPath = join(appPath, "package.json");
3493
+ if (!existsSync(pkgPath)) return void 0;
3494
+ const content = readFileSync(pkgPath, "utf-8");
3495
+ const pkg$1 = JSON.parse(content);
3477
3496
  return pkg$1.name;
3478
3497
  } catch {
3479
3498
  return void 0;
@@ -6371,8 +6390,8 @@ export const listUsersEndpoint = e
6371
6390
  .output(ListUsersResponseSchema)
6372
6391
  .handle(async () => ({
6373
6392
  users: [
6374
- { id: '1', name: 'Alice' },
6375
- { id: '2', name: 'Bob' },
6393
+ { id: '550e8400-e29b-41d4-a716-446655440001', name: 'Alice' },
6394
+ { id: '550e8400-e29b-41d4-a716-446655440002', name: 'Bob' },
6376
6395
  ],
6377
6396
  }));
6378
6397
  ` : `import { e } from '@geekmidas/constructs/endpoints';
@@ -6399,12 +6418,12 @@ export const listUsersEndpoint = e
6399
6418
  {
6400
6419
  path: getRoutePath("users/get.ts"),
6401
6420
  content: modelsImport ? `import { e } from '@geekmidas/constructs/endpoints';
6402
- import { z } from 'zod';
6421
+ import { IdSchema } from '${modelsImport}/common';
6403
6422
  import { UserResponseSchema } from '${modelsImport}/user';
6404
6423
 
6405
6424
  export const getUserEndpoint = e
6406
6425
  .get('/users/:id')
6407
- .params(z.object({ id: z.string() }))
6426
+ .params({ id: IdSchema })
6408
6427
  .output(UserResponseSchema)
6409
6428
  .handle(async ({ params }) => ({
6410
6429
  id: params.id,