@teispace/next-maker 1.20.1 → 2.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.0](https://github.com/teispace/npm-packages/compare/next-maker-v1.20.1...next-maker-v2.0.0) (2026-05-15)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **next-maker:** apps generated before this release are missing shared/ and api-url.ts. Run `next-maker doctor --fix` or `next-maker setup http-client` to restore them.
9
+ * **next-maker:** services generated by `next-maker service <name>` or `next-maker service <name> --crud` now emit bare-path endpoints. Any hand-rolled endpoints in app-apis.ts that still use \`\${API_PREFIX}\` will double-prefix once the rest of the template (getApiBaseUrl) lands — strip the interpolation when migrating.
10
+ * **next-maker:** apps generated before this release are missing shared/ and api-url.ts. Run `next-maker doctor --fix` or `next-maker setup http-client` to restore them.
11
+
12
+ ### Features
13
+
14
+ * **next-maker:** emit bare-path endpoints in generated AppApis entries ([#71](https://github.com/teispace/npm-packages/issues/71)) ([0d836b3](https://github.com/teispace/npm-packages/commit/0d836b3dab9dd84dae3b04f74c4671b59e28b75b))
15
+ * **next-maker:** sync http-client setup with shared/ + api-url layout ([#70](https://github.com/teispace/npm-packages/issues/70)) ([3df79a4](https://github.com/teispace/npm-packages/commit/3df79a4c6de1698f1488311ab22f7fd80b662cdc))
16
+
17
+
18
+ ### Documentation
19
+
20
+ * **next-maker:** sync README with shared/ + api-url layout ([#72](https://github.com/teispace/npm-packages/issues/72)) ([3d64863](https://github.com/teispace/npm-packages/commit/3d648636ce1b88fa88c6f0788eb6538ea717b154))
21
+
22
+
23
+ ### Tests
24
+
25
+ * **next-maker:** cover copyHttpClientFiles and crudApiConfigTemplate ([#73](https://github.com/teispace/npm-packages/issues/73)) ([10597cf](https://github.com/teispace/npm-packages/commit/10597cfee2ec70000d79419a7f25669351caffcc))
26
+
3
27
  ## [1.20.1](https://github.com/teispace/npm-packages/compare/next-maker-v1.20.0...next-maker-v1.20.1) (2026-05-06)
4
28
 
5
29
 
package/README.md CHANGED
@@ -100,7 +100,7 @@ The starter at [`teispace/nextjs-starter`](https://github.com/teispace/nextjs-st
100
100
  - Pino structured logger with redaction
101
101
  - Zod-validated env schema in `src/lib/env/`
102
102
  - Feature-based DDD architecture
103
- - Result-based HTTP clients (when enabled)
103
+ - Dual HTTP clients (`fetchClient` + `axiosClient`) on a shared foundation: runtime-aware cookie forwarding (browser jar in CSR, `next/headers` injection in RSC), automatic `X-Request-Id` correlation, single `parseApiError` pipeline, cookie-mode auth by default, typed query params via `{ params }`
104
104
  - Hardened security headers in `next.config.ts`
105
105
  - `scripts/sync-env.ts` and `scripts/check-deprecated.ts` (used by the `validate` chain)
106
106
 
@@ -393,6 +393,8 @@ npx @teispace/next-maker service <name> [options]
393
393
 
394
394
  CRUD mode also generates `<Name>Summary` (list view) and `<Name>Detail` (detail view) types, `Create<Name>Dto`, `Update<Name>Dto`, and registers the endpoints in `app-apis.ts`.
395
395
 
396
+ Endpoints are emitted as **bare paths** (e.g. `'/users'`, `` `/users/${id}` ``) — the `/api/v{n}` prefix is owned by `getApiBaseUrl()` in `src/lib/config/api-url.ts` and applied at request time. Don't add `${API_PREFIX}` interpolation in `app-apis.ts`; the base URL composer handles it.
397
+
396
398
  ```bash
397
399
  npx @teispace/next-maker service payment --axios
398
400
  npx @teispace/next-maker service users --fetch --crud
@@ -749,17 +751,18 @@ my-project/
749
751
  │ │ ├── api/ # API service barrel
750
752
  │ │ └── storage/ # react-secure-storage wrapper
751
753
  │ ├── lib/
752
- │ │ ├── config/ # seo, app-apis, app-paths, app-locales, constants
754
+ │ │ ├── config/ # seo, app-apis, app-paths, app-locales, constants, api-url (getApiBaseUrl)
753
755
  │ │ ├── env/ # Zod-validated env schema (schema.ts, validate.ts)
754
756
  │ │ ├── logger/ # Pino logger with auto-redaction
755
- │ │ ├── errors/ # ApiException, catchError
757
+ │ │ ├── errors/ # ApiException (carries requestId), catchError
756
758
  │ │ ├── enums/
757
759
  │ │ └── utils/
758
760
  │ │ ├── http/ # (opt, http-client)
761
+ │ │ │ ├── shared/ # runtime detection, cookie injection, request-id, parseApiError, toSearchParams
759
762
  │ │ │ ├── axios-client/ # interceptors, token refresh, Result-based
760
- │ │ │ ├── fetch-client/ # same Result pattern on native fetch
763
+ │ │ │ ├── fetch-client/ # same Result pattern on native fetch, typed `params`
761
764
  │ │ │ ├── client-utils.ts
762
- │ │ │ └── token-store.ts
765
+ │ │ │ └── token-store.ts # inert in cookie-mode (the default)
763
766
  │ │ └── validations/
764
767
  │ ├── i18n/ # (opt, i18n) routing, request, navigation, translations/
765
768
  │ ├── styles/globals.css # Tailwind v4 directives
@@ -796,7 +799,7 @@ Features that have first-class opt-out prompts during `init`: `httpClient`, `dar
796
799
 
797
800
  **CLI:** TypeScript, esbuild, Commander.js, Enquirer, Vitest, degit.
798
801
 
799
- **Generated apps:** Next.js 16+, TypeScript, Tailwind CSS v4, Biome, Pino, Zod, Redux Toolkit, `@teispace/next-themes`, next-intl, Axios, Vitest + RTL, React Compiler.
802
+ **Generated apps:** Next.js 16+, TypeScript, Tailwind CSS v4, Biome, Pino, Zod, Redux Toolkit, `@teispace/next-themes`, next-intl, Fetch / Axios HTTP clients (shared foundation), Vitest + RTL, React Compiler.
800
803
 
801
804
  ---
802
805