create-nuxt-base 0.2.8 → 0.2.10

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.
@@ -6,6 +6,7 @@
6
6
  "init": "npm install",
7
7
  "reinit": "rm -rf node_modules && rm -rf package-lock.json && yes | npx nuxt cleanup && npm cache clean --force && npm i",
8
8
  "build": "nuxt build",
9
+ "app:build": "npm run build",
9
10
  "build:develop": "nuxt build",
10
11
  "build:test": "nuxt build",
11
12
  "start": "nuxt dev",
@@ -19,46 +20,47 @@
19
20
  "generate": "nuxt generate",
20
21
  "preview": "nuxt preview",
21
22
  "postinstall": "nuxt prepare",
22
- "test:e2e": "playwright test",
23
+ "app:e2e": "playwright test",
24
+ "test": "echo 'No test specified' && exit 0",
23
25
  "lint": "eslint --ext .ts,.js,.vue .",
24
26
  "lint:fix": "eslint --ext .ts,.js,.vue . --fix",
25
27
  "postbuild": "cd .output/server/node_modules/tslib; npm pkg set 'exports[.].import.node'='./tslib.es6.mjs'"
26
28
  },
27
29
  "dependencies": {
28
30
  "@egoist/tailwindcss-icons": "1.8.1",
29
- "@iconify-json/bi": "1.2.0",
31
+ "@iconify-json/bi": "1.2.1",
30
32
  "@lenne.tech/nuxt-base": "3.21.0",
31
- "@nuxt/image": "1.8.0",
32
- "@vee-validate/yup": "4.13.2",
33
+ "@nuxt/image": "1.8.1",
34
+ "@vee-validate/yup": "4.14.3",
33
35
  "@vueuse/core": "11.1.0",
34
36
  "@vueuse/integrations": "11.1.0",
35
37
  "@vueuse/nuxt": "11.1.0",
36
38
  "ios-pwa-splash": "1.0.0",
37
- "pinia": "2.2.2",
38
- "tailwind-merge": "2.5.2",
39
- "vee-validate": "4.13.2"
39
+ "pinia": "2.2.4",
40
+ "tailwind-merge": "2.5.4",
41
+ "vee-validate": "4.14.3"
40
42
  },
41
43
  "devDependencies": {
42
44
  "@lenne.tech/eslint-config-vue": "0.0.16",
43
- "@nuxt/devtools": "1.5.1",
44
- "@nuxt/test-utils": "3.14.2",
45
+ "@nuxt/devtools": "1.6.0",
46
+ "@nuxt/test-utils": "3.14.4",
45
47
  "@nuxtjs/color-mode": "3.5.1",
46
48
  "@nuxtjs/google-fonts": "3.2.0",
47
- "@nuxtjs/plausible": "1.0.2",
48
- "@nuxtjs/robots": "4.1.7",
49
- "@nuxtjs/sitemap": "6.1.1",
50
- "@nuxtjs/tailwindcss": "6.12.1",
51
- "@playwright/test": "1.47.2",
49
+ "@nuxtjs/plausible": "1.0.3",
50
+ "@nuxtjs/robots": "4.1.9",
51
+ "@nuxtjs/sitemap": "6.1.2",
52
+ "@nuxtjs/tailwindcss": "6.12.2",
53
+ "@playwright/test": "1.48.1",
52
54
  "@tailwindcss/forms": "0.5.9",
53
55
  "@tailwindcss/typography": "0.5.15",
54
- "@types/node": "22.7.4",
56
+ "@types/node": "22.7.8",
55
57
  "@vitejs/plugin-vue": "5.1.4",
56
58
  "@vue/test-utils": "2.4.6",
57
- "eslint": "9.11.1",
59
+ "eslint": "8.57.1",
58
60
  "jsdom": "24.1.3",
59
61
  "nuxt": "3.13.2",
60
62
  "ts-loader": "9.5.1",
61
- "typescript": "5.6.2"
63
+ "typescript": "5.6.3"
62
64
  },
63
65
  "overrides": {
64
66
  "vue": "latest",
@@ -1,7 +1,8 @@
1
- import { fileURLToPath } from 'node:url'
2
- import { defineConfig, devices } from '@playwright/test'
3
- import type { ConfigOptions } from '@nuxt/test-utils/playwright'
4
- import { isCI, isWindows } from 'std-env'
1
+ import type { ConfigOptions } from '@nuxt/test-utils/playwright';
2
+
3
+ import { defineConfig, devices } from '@playwright/test';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { isCI, isWindows } from 'std-env';
5
6
 
6
7
  const devicesToTest = [
7
8
  'Desktop Chrome',
@@ -14,30 +15,51 @@ const devicesToTest = [
14
15
  // Test against branded browsers.
15
16
  // { ...devices['Desktop Edge'], channel: 'msedge' },
16
17
  // { ...devices['Desktop Chrome'], channel: 'chrome' },
17
- ] satisfies Array<string | typeof devices[string]>
18
+ ] satisfies Array<(typeof devices)[string] | string>;
18
19
 
19
20
  /* See https://playwright.dev/docs/test-configuration. */
20
21
  export default defineConfig<ConfigOptions>({
21
- testDir: './tests',
22
- /* Run tests in files in parallel */
23
- fullyParallel: true,
24
22
  /* Fail the build on CI if you accidentally left test.only in the source code. */
25
23
  forbidOnly: !!isCI,
24
+ /* Run tests in files in parallel */
25
+ fullyParallel: true,
26
+ projects: devicesToTest.map((p) => (typeof p === 'string' ? { name: p, use: devices[p] } : p)),
27
+ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
28
+ reporter: 'html',
26
29
  /* Retry on CI only */
27
30
  retries: isCI ? 2 : 0,
28
- /* Opt out of parallel tests on CI. */
29
- workers: isCI ? 1 : undefined,
31
+ testDir: './tests',
32
+ timeout: 5 * 60 * 1000,
30
33
  timeout: isWindows ? 60000 : undefined,
31
- /* Reporter to use. See https://playwright.dev/docs/test-reporters */
32
- reporter: 'html',
33
34
  /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
34
35
  use: {
35
- /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
36
- trace: 'on-first-retry',
36
+ baseURL: 'http://localhost:3001',
37
+
38
+ launchOptions: {
39
+ // Slows down Playwright operations by the specified amount of milliseconds
40
+ slowMo: 10,
41
+ },
42
+
43
+ // Use German language
44
+ locale: 'de',
37
45
  /* Nuxt configuration options */
38
46
  nuxt: {
47
+ host: 'http://localhost:3001',
39
48
  rootDir: fileURLToPath(new URL('.', import.meta.url)),
40
49
  },
50
+ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
51
+ trace: 'on-first-retry',
41
52
  },
42
- projects: devicesToTest.map(p => typeof p === 'string' ? ({ name: p, use: devices[p] }) : p),
43
- })
53
+ webServer: [
54
+ {
55
+ command: 'npm run start',
56
+ reuseExistingServer: !process.env.CI,
57
+ stderr: 'pipe',
58
+ stdout: 'pipe',
59
+ timeout: 120 * 1000,
60
+ url: 'http://localhost:3001',
61
+ },
62
+ ],
63
+ /* Opt out of parallel tests on CI. */
64
+ workers: isCI ? 1 : undefined,
65
+ });
@@ -17,7 +17,7 @@ export default defineNuxtPlugin({
17
17
 
18
18
  let token = accessTokenState.value;
19
19
  if (isTokenExpired(accessTokenState.value)) {
20
- const refreshTokenResult = await ofetch(config.public.host, {
20
+ const refreshTokenResult = await ofetch(config.public.gqlHost, {
21
21
  body: JSON.stringify({
22
22
  query: 'mutation refreshToken {refreshToken {token, refreshToken}}',
23
23
  variables: {},
@@ -29,7 +29,7 @@ export default defineNuxtPlugin({
29
29
  }).catch((err) => {
30
30
  console.error('2.auth.server.ts::refreshToken::catch', err.data);
31
31
  clearSession();
32
- navigateTo('/auth/login');
32
+ navigateTo('/auth');
33
33
  });
34
34
 
35
35
  const data = refreshTokenResult?.data?.refreshToken;
@@ -38,14 +38,14 @@ export default defineNuxtPlugin({
38
38
  token = data?.token;
39
39
  } else {
40
40
  clearSession();
41
- await navigateTo('/auth/login');
41
+ await navigateTo('/auth');
42
42
  }
43
43
  }
44
44
 
45
45
  if (token && payload?.id) {
46
- const userResult = await ofetch(config.public.host, {
46
+ const userResult = await ofetch(config.public.gqlHost, {
47
47
  body: JSON.stringify({
48
- query: 'query getUser($id: String!){' + 'getUser(id: $id){' + 'id ' + 'avatar ' + 'firstName ' + 'lastName ' + 'email ' + 'gender ' + 'roles ' + '}}',
48
+ query: 'query getUser($id: String!){' + 'getUser(id: $id){' + 'id ' + 'firstName ' + 'lastName ' + 'email ' + 'roles ' + '}}',
49
49
  variables: {
50
50
  id: payload.id,
51
51
  },
@@ -60,7 +60,7 @@ export default defineNuxtPlugin({
60
60
 
61
61
  if (userResult?.errors) {
62
62
  clearSession();
63
- navigateTo('/auth/login');
63
+ navigateTo('/auth');
64
64
  return;
65
65
  }
66
66
 
@@ -1,6 +1,5 @@
1
- import { expect, test } from '@nuxt/test-utils/playwright'
1
+ import { test } from '@nuxt/test-utils/playwright';
2
2
 
3
- test('init test', async ({ page, goto }) => {
4
- await goto('https://lenne.tech', { waitUntil: 'domcontentloaded' })
5
- await expect(page.getByRole('heading', { name: 'Wir unterstützen Dich!' })).toHaveText('Wir unterstützen Dich!')
6
- })
3
+ test('init test', async ({ goto, page }) => {
4
+ await goto('.', { waitUntil: 'domcontentloaded' });
5
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nuxt-base",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "Starter to generate a configured environment with VueJS, Nuxt, Tailwind, Eslint, @lenne.tech/nuxt-base, Unit Tests, Cypress etc.",
5
5
  "main": "index.js",
6
6
  "bin": {