create-nuxt-base 2.2.6 → 2.2.7
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/nuxt-base-template/.env.example +9 -8
- package/nuxt-base-template/README.md +10 -9
- package/nuxt-base-template/app/pages/auth/register.vue +14 -10
- package/nuxt-base-template/nuxt.config.ts +14 -14
- package/nuxt-base-template/openapi-ts.config.ts +1 -1
- package/nuxt-base-template/server/api/iam/[...path].ts +2 -1
- package/package.json +2 -2
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
NUXT_PUBLIC_SITE_URL=http://localhost:3001
|
|
2
|
+
NUXT_PUBLIC_APP_ENV=development
|
|
3
3
|
NODE_ENV=development
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
NUXT_API_URL=http://localhost:3000
|
|
5
|
+
NUXT_PUBLIC_API_URL=http://localhost:3000
|
|
6
|
+
NUXT_PUBLIC_WEB_PUSH_KEY=
|
|
7
|
+
NUXT_PUBLIC_STORAGE_PREFIX=base-dev
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
NUXT_LINEAR_API_KEY=
|
|
10
|
+
NUXT_LINEAR_TEAM_NAME=
|
|
11
|
+
NUXT_LINEAR_PROJECT_NAME=
|
|
@@ -149,21 +149,22 @@ Create a `.env` file with the following variables:
|
|
|
149
149
|
|
|
150
150
|
```env
|
|
151
151
|
# Required
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
NUXT_PUBLIC_SITE_URL=http://localhost:3001
|
|
153
|
+
NUXT_API_URL=http://localhost:3000
|
|
154
|
+
NUXT_PUBLIC_API_URL=http://localhost:3000
|
|
155
|
+
NUXT_PUBLIC_APP_ENV=development
|
|
155
156
|
NODE_ENV=development
|
|
156
157
|
```
|
|
157
158
|
|
|
158
159
|
Optional variables:
|
|
159
160
|
|
|
160
161
|
```env
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
162
|
+
NUXT_PUBLIC_WEB_PUSH_KEY= # Web push notifications
|
|
163
|
+
NUXT_LINEAR_API_KEY= # Bug reporting
|
|
164
|
+
NUXT_LINEAR_TEAM_NAME= # Bug reporting
|
|
165
|
+
NUXT_LINEAR_PROJECT_NAME= # Bug reporting
|
|
166
|
+
NUXT_API_SCHEMA=../api/schema.gql # OpenAPI schema path
|
|
167
|
+
NUXT_PUBLIC_STORAGE_PREFIX=base-dev # Local storage prefix
|
|
167
168
|
```
|
|
168
169
|
|
|
169
170
|
## Project Structure
|
|
@@ -44,16 +44,20 @@ const showPasskeyPrompt = ref<boolean>(false);
|
|
|
44
44
|
const passkeyLoading = ref<boolean>(false);
|
|
45
45
|
|
|
46
46
|
// Redirect if registration is disabled
|
|
47
|
-
watch(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
watch(
|
|
48
|
+
() => features.value.signUpEnabled,
|
|
49
|
+
(val) => {
|
|
50
|
+
if (val === false) {
|
|
51
|
+
toast.add({
|
|
52
|
+
color: 'warning',
|
|
53
|
+
description: 'Die Registrierung ist derzeit deaktiviert.',
|
|
54
|
+
title: 'Registrierung nicht verfügbar',
|
|
55
|
+
});
|
|
56
|
+
navigateTo('/auth/login');
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{ immediate: true },
|
|
60
|
+
);
|
|
57
61
|
|
|
58
62
|
const requireTerms = computed(() => features.value.signUpChecks === true);
|
|
59
63
|
|
|
@@ -17,10 +17,10 @@ export default defineNuxtConfig({
|
|
|
17
17
|
// ============================================================================
|
|
18
18
|
// @ts-expect-error bug.lt module config - module temporarily disabled
|
|
19
19
|
bug: {
|
|
20
|
-
enabled: process.env.
|
|
21
|
-
linearApiKey: process.env.
|
|
22
|
-
linearProjectName: process.env.
|
|
23
|
-
linearTeamName: process.env.
|
|
20
|
+
enabled: process.env.NUXT_PUBLIC_APP_ENV !== 'production',
|
|
21
|
+
linearApiKey: process.env.NUXT_LINEAR_API_KEY,
|
|
22
|
+
linearProjectName: process.env.NUXT_LINEAR_PROJECT_NAME,
|
|
23
|
+
linearTeamName: process.env.NUXT_LINEAR_TEAM_NAME,
|
|
24
24
|
},
|
|
25
25
|
|
|
26
26
|
compatibilityDate: '2025-01-15',
|
|
@@ -49,7 +49,7 @@ export default defineNuxtConfig({
|
|
|
49
49
|
// ============================================================================
|
|
50
50
|
// Environment-specific Layers
|
|
51
51
|
// ============================================================================
|
|
52
|
-
extends: process.env.
|
|
52
|
+
extends: process.env.NUXT_PUBLIC_APP_ENV === 'development' ? ['./docs'] : [],
|
|
53
53
|
|
|
54
54
|
// ============================================================================
|
|
55
55
|
// Image Optimization
|
|
@@ -87,7 +87,7 @@ export default defineNuxtConfig({
|
|
|
87
87
|
// baseURL is used in production mode for cross-origin API requests
|
|
88
88
|
// In dev mode, Nuxt proxy is used (baseURL is ignored, requests go through /api/iam)
|
|
89
89
|
// In production, requests go directly to baseURL + basePath (e.g., https://api.example.com/iam)
|
|
90
|
-
baseURL: process.env.
|
|
90
|
+
baseURL: process.env.NUXT_API_URL || 'http://localhost:3000',
|
|
91
91
|
basePath: '/iam',
|
|
92
92
|
loginPath: '/auth/login',
|
|
93
93
|
twoFactorRedirectPath: '/auth/2fa',
|
|
@@ -138,7 +138,7 @@ export default defineNuxtConfig({
|
|
|
138
138
|
// Analytics (Plausible)
|
|
139
139
|
// ============================================================================
|
|
140
140
|
plausible: {
|
|
141
|
-
apiHost: process.env.
|
|
141
|
+
apiHost: process.env.NUXT_PLAUSIBLE_API_URL,
|
|
142
142
|
ignoredHostnames: ['localhost'],
|
|
143
143
|
},
|
|
144
144
|
|
|
@@ -153,13 +153,13 @@ export default defineNuxtConfig({
|
|
|
153
153
|
// Runtime Configuration (Environment Variables)
|
|
154
154
|
// ============================================================================
|
|
155
155
|
runtimeConfig: {
|
|
156
|
-
// Server-only
|
|
157
|
-
apiUrl:
|
|
156
|
+
// Server-only — NUXT_API_URL overrides this
|
|
157
|
+
apiUrl: 'http://localhost:3000',
|
|
158
158
|
public: {
|
|
159
|
-
// Client-side
|
|
160
|
-
apiUrl:
|
|
161
|
-
|
|
162
|
-
webPushKey:
|
|
159
|
+
// Client-side — NUXT_PUBLIC_API_URL overrides this
|
|
160
|
+
apiUrl: 'http://localhost:3000',
|
|
161
|
+
// NUXT_PUBLIC_WEB_PUSH_KEY overrides this
|
|
162
|
+
webPushKey: '',
|
|
163
163
|
},
|
|
164
164
|
},
|
|
165
165
|
|
|
@@ -168,7 +168,7 @@ export default defineNuxtConfig({
|
|
|
168
168
|
// ============================================================================
|
|
169
169
|
site: {
|
|
170
170
|
name: 'Nuxt Base Starter',
|
|
171
|
-
url: process.env.
|
|
171
|
+
url: process.env.NUXT_PUBLIC_SITE_URL,
|
|
172
172
|
},
|
|
173
173
|
|
|
174
174
|
// ============================================================================
|
|
@@ -2,7 +2,7 @@ import { defineConfig } from '@hey-api/openapi-ts';
|
|
|
2
2
|
|
|
3
3
|
export default defineConfig({
|
|
4
4
|
client: '@hey-api/client-fetch',
|
|
5
|
-
input: process.env.
|
|
5
|
+
input: process.env.NUXT_API_URL || 'http://127.0.0.1:3000/api-docs-json',
|
|
6
6
|
output: {
|
|
7
7
|
format: 'prettier',
|
|
8
8
|
lint: 'eslint',
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export default defineEventHandler(async (event) => {
|
|
15
15
|
const path = getRouterParam(event, 'path') || '';
|
|
16
|
-
const
|
|
16
|
+
const config = useRuntimeConfig(event);
|
|
17
|
+
const apiUrl = config.apiUrl || 'http://localhost:3000';
|
|
17
18
|
const targetUrl = `${apiUrl}/iam/${path}`;
|
|
18
19
|
|
|
19
20
|
// Get query string
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-nuxt-base",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.7",
|
|
4
4
|
"description": "Starter to generate a configured environment with VueJS, Nuxt, Tailwind, Linting, Unit Tests, Playwright etc.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "lenne.Tech GmbH",
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
"node": ">=22",
|
|
37
37
|
"pnpm": ">=9"
|
|
38
38
|
}
|
|
39
|
-
}
|
|
39
|
+
}
|