create-next-pro-cli 0.1.32 → 0.1.33

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/README.md CHANGED
@@ -126,6 +126,8 @@ Every page belongs to an explicit route area. Use `--area public` for routes ren
126
126
 
127
127
  `addpage` creates `layout`, `page`, and `loading` files by default. Available long options are `--layout`, `--page`, `--loading`, `--not-found`, `--error`, `--global-error`, `--route`, `--template`, and `--default`. The historical short forms remain available.
128
128
 
129
+ Generated page-level layouts accept only `children` because they do not read route parameters. If a customized Next.js 16 layout needs the locale, make the component asynchronous, type `params` as `Promise<{ locale: string }>` and await it before use. Projects generated with `create-next-pro-cli@0.1.32` may contain the obsolete synchronous `params: { locale: string }` signature: remove that property when it is unused, or migrate it to the asynchronous contract.
130
+
129
131
  `rmpage` only lists routes that contain an actual `page.tsx` in the `(public)` or `(user)` route group. Technical directories remain hidden. Removal is confined to the selected area and project, and it preserves shared parent directories and unrelated files.
130
132
 
131
133
  ## Generated project architecture
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-next-pro-cli",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "Advanced Next.js project scaffolder with i18n, Tailwind, App Router and more.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,11 +1,5 @@
1
- import React from "react";
1
+ import type { ReactNode } from "react";
2
2
 
3
- export default function templateLayout({
4
- children,
5
- params,
6
- }: {
7
- children: React.ReactNode;
8
- params: { locale: string };
9
- }) {
3
+ export default function templateLayout({ children }: { children: ReactNode }) {
10
4
  return children;
11
5
  }
@@ -47,6 +47,8 @@ For `Account.Security --area user`, expect resources under:
47
47
 
48
48
  The route area affects only the App Router path and layout. UI and message paths remain area-independent. Public page UI uses its own `<main>` landmark; user page UI uses `<section>` because the user layout already provides `<main>`.
49
49
 
50
+ The generated page-level `layout.tsx` accepts only `children` because it does not read route parameters. If you customize it to read the locale under Next.js 16, make the component asynchronous, type `params` as `Promise<{ locale: string }>` and await it before use.
51
+
50
52
  The command creates only missing code files and preserves existing ones as `unchanged`. Repeating the command in the same area is idempotent and can add requested missing route files. Requesting the same logical page in the other area fails with `TARGET_EXISTS`. Flat historical routes or ambiguous route definitions fail with `INCONSISTENT_ROUTE` before any write.
51
53
 
52
54
  ## Workflow
@@ -87,3 +89,5 @@ bun run check
87
89
  ```
88
90
 
89
91
  Confirm every `created` or `updated` event path exists. A repeated command should preserve existing code and normally report those resources as `unchanged`.
92
+
93
+ When a generated or customized layout reads route parameters, include `next build` in validation so Next.js checks the inferred `LayoutProps` contract.
@@ -107,6 +107,12 @@ interactive page flows expose the same area-aware catalog. Areas select a route
107
107
  layout without changing the public URL; see the linked command skills for the
108
108
  complete contract.
109
109
 
110
+ Page-level layouts generated by the CLI accept only `children` when they do not
111
+ read route parameters. A customized Next.js 16 layout that reads the locale must
112
+ type `params` as `Promise<{ locale: string }>` and await it. Projects created
113
+ with `create-next-pro-cli@0.1.32` should remove the obsolete synchronous
114
+ `params` property when unused, or migrate it to this asynchronous contract.
115
+
110
116
  ## Template Features
111
117
 
112
118
  - Next.js 16 App Router