@lenne.tech/cli 1.15.0 → 1.17.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.
@@ -27,7 +27,7 @@ const NewCommand = {
27
27
  // Info
28
28
  info('Create a new fullstack workspace');
29
29
  // Hint for non-interactive callers (e.g. Claude Code)
30
- toolbox.tools.nonInteractiveHint('lt fullstack init --name <name> --frontend <nuxt|angular> --api-mode <Rest|GraphQL|Both> --framework-mode <npm|vendor> [--framework-upstream-branch <ref>] [--next] [--dry-run] --noConfirm');
30
+ toolbox.tools.nonInteractiveHint('lt fullstack init --name <name> --frontend <nuxt|angular> --api-mode <Rest|GraphQL|Both> --framework-mode <npm|vendor> [--framework-upstream-branch <ref>] [--next: implies nuxt-base-starter#next unless --frontend-branch overrides] [--dry-run] --noConfirm');
31
31
  // Check git
32
32
  if (!(yield git.gitInstalled())) {
33
33
  return;
@@ -264,7 +264,12 @@ const NewCommand = {
264
264
  }
265
265
  // Determine branches and copy/link paths with priority: CLI > config
266
266
  const apiBranch = cliApiBranch || configApiBranch;
267
- const frontendBranch = cliFrontendBranch || configFrontendBranch;
267
+ // Under `--next`, default the nuxt-base-starter ref to the `next`
268
+ // branch — that branch ships an auth basePath (`/api/auth`) that
269
+ // matches the experimental nest-base API. Explicit
270
+ // `--frontend-branch` (or lt.config) still wins so consumers can
271
+ // target a custom branch on either line.
272
+ const frontendBranch = cliFrontendBranch || configFrontendBranch || (experimental ? 'next' : undefined);
268
273
  const apiCopy = cliApiCopy || configApiCopy;
269
274
  const apiLink = cliApiLink || configApiLink;
270
275
  const frontendCopy = cliFrontendCopy || configFrontendCopy;
@@ -472,6 +477,39 @@ const NewCommand = {
472
477
  serverSpinner.fail(`Failed to set up API: ${apiResult.path}`);
473
478
  return;
474
479
  }
480
+ // Auto-run `bun run rename <projectDir>` for the experimental nest-base
481
+ // template. The template ships with hard-coded `nest-base` references in
482
+ // four files (package.json, README.md, portless.yml, docker-compose.yml).
483
+ // The rename script patches all four idempotently. Since the consumer
484
+ // already gave us --name, doing this for them is strictly less
485
+ // friction-prone than relying on a manual follow-up step (which agents
486
+ // and humans both forget). Failure is non-fatal: the workspace is still
487
+ // usable, the user can re-run `bun run rename <name>` manually.
488
+ //
489
+ // Note: setupServerForFullstack already patched projects/api/package.json
490
+ // to set `name = projectDir`. The rename planner reads that name as the
491
+ // "old" slug, which would short-circuit the README/portless/compose
492
+ // rewrites because they still say `nest-base`. We restore the canonical
493
+ // `name = "nest-base"` first so the planner has a coherent starting
494
+ // state across all four files; the rename then writes the project name
495
+ // into every spot consistently.
496
+ if (experimental && apiResult.method !== 'link') {
497
+ const apiPackageJsonPath = `${apiDest}/package.json`;
498
+ if (filesystem.exists(apiPackageJsonPath)) {
499
+ yield patching.update(apiPackageJsonPath, (config) => {
500
+ config.name = 'nest-base';
501
+ return config;
502
+ });
503
+ }
504
+ const renameSpinner = spin(`Rename nest-base → ${projectDir}`);
505
+ try {
506
+ yield system.run(`cd ${apiDest} && bun run rename ${projectDir}`);
507
+ renameSpinner.succeed(`Renamed nest-base → ${projectDir} in projects/api`);
508
+ }
509
+ catch (err) {
510
+ renameSpinner.warn(`Auto-rename failed (${err.message}). Run \`bun run rename ${projectDir}\` manually inside projects/api.`);
511
+ }
512
+ }
475
513
  // Create lt.config.json for API
476
514
  // Note: frameworkMode is persisted under meta so that subsequent `lt
477
515
  // server module` / `addProp` / `permissions` calls can detect the mode
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lenne.tech/cli",
3
- "version": "1.15.0",
3
+ "version": "1.17.0",
4
4
  "description": "lenne.Tech CLI: lt",
5
5
  "keywords": [
6
6
  "lenne.Tech",