create-nuxt-base 0.1.17 → 0.1.19
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 +15 -0
- package/nuxt-base-template/.eslintrc +2 -3
- package/nuxt-base-template/cypress/e2e/spec.cy.ts +3 -3
- package/nuxt-base-template/cypress/support/e2e.ts +1 -1
- package/nuxt-base-template/cypress.config.ts +7 -7
- package/nuxt-base-template/nuxt.config.ts +11 -11
- package/nuxt-base-template/package.json +3 -4
- package/nuxt-base-template/src/middleware/auth.global.ts +6 -2
- package/nuxt-base-template/src/tests/hello-world.spec.ts +7 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.19](https://github.com/lenneTech/nuxt-base-starter/compare/v0.1.18...v0.1.19) (2023-07-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* added eslint-config ([d0f9146](https://github.com/lenneTech/nuxt-base-starter/commit/d0f9146eba44a72c839be8996357a9f2a55e8737))
|
|
11
|
+
* updated eslint-config version ([2f1ef56](https://github.com/lenneTech/nuxt-base-starter/commit/2f1ef56b67eb4866908753f67e9b27b98a174543))
|
|
12
|
+
|
|
13
|
+
### [0.1.18](https://github.com/lenneTech/nuxt-base-starter/compare/v0.1.17...v0.1.18) (2023-06-26)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* add init command ([defa0a4](https://github.com/lenneTech/nuxt-base-starter/commit/defa0a46b4d9d0fa0448afddcb2db25d41252159))
|
|
19
|
+
|
|
5
20
|
### [0.1.17](https://github.com/lenneTech/nuxt-base-starter/compare/v0.1.16...v0.1.17) (2023-06-26)
|
|
6
21
|
|
|
7
22
|
### [0.1.16](https://github.com/lenneTech/nuxt-base-starter/compare/v0.1.15...v0.1.16) (2023-06-12)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'
|
|
2
|
-
import * as webpack from '@cypress/webpack-preprocessor'
|
|
3
|
-
import { defineConfig } from 'cypress'
|
|
1
|
+
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor';
|
|
2
|
+
import * as webpack from '@cypress/webpack-preprocessor';
|
|
3
|
+
import { defineConfig } from 'cypress';
|
|
4
4
|
|
|
5
5
|
async function setupNodeEvents(
|
|
6
6
|
on: Cypress.PluginEvents,
|
|
7
7
|
config: Cypress.PluginConfigOptions,
|
|
8
8
|
): Promise<Cypress.PluginConfigOptions> {
|
|
9
|
-
await addCucumberPreprocessorPlugin(on, config)
|
|
9
|
+
await addCucumberPreprocessorPlugin(on, config);
|
|
10
10
|
|
|
11
11
|
on(
|
|
12
12
|
'file:preprocessor',
|
|
@@ -39,10 +39,10 @@ async function setupNodeEvents(
|
|
|
39
39
|
},
|
|
40
40
|
},
|
|
41
41
|
}),
|
|
42
|
-
)
|
|
42
|
+
);
|
|
43
43
|
|
|
44
44
|
// Make sure to return the config object as it might have been modified by the plugin.
|
|
45
|
-
return config
|
|
45
|
+
return config;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export default defineConfig({
|
|
@@ -51,4 +51,4 @@ export default defineConfig({
|
|
|
51
51
|
supportFile: false,
|
|
52
52
|
specPattern: ['cypress/e2e/**/*.cy.{js,ts}', 'cypress/integrations/**/*.feature'],
|
|
53
53
|
},
|
|
54
|
-
})
|
|
54
|
+
});
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
2
2
|
export default defineNuxtConfig({
|
|
3
|
-
srcDir:
|
|
3
|
+
srcDir: './src',
|
|
4
4
|
modules: [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
'@nuxtjs/tailwindcss',
|
|
6
|
+
'@lenne.tech/nuxt-base',
|
|
7
|
+
'@vueuse/nuxt',
|
|
8
|
+
'@formkit/nuxt',
|
|
9
9
|
],
|
|
10
10
|
nuxtBase: {
|
|
11
|
-
host:
|
|
12
|
-
schema:
|
|
11
|
+
host: 'http://localhost:3000/graphql',
|
|
12
|
+
schema: '../api/schema.gql',
|
|
13
13
|
watch: false,
|
|
14
14
|
autoImport: true,
|
|
15
15
|
apollo: {
|
|
16
|
-
authType:
|
|
17
|
-
authHeader:
|
|
18
|
-
tokenStorage:
|
|
16
|
+
authType: 'Bearer',
|
|
17
|
+
authHeader: 'Authorization',
|
|
18
|
+
tokenStorage: 'cookie',
|
|
19
19
|
proxyCookies: true,
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
imports: {
|
|
23
|
-
dirs: [
|
|
23
|
+
dirs: ['./states', './stores', './forms'],
|
|
24
24
|
},
|
|
25
25
|
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"name": "nuxt-base-template",
|
|
3
3
|
"private": true,
|
|
4
4
|
"scripts": {
|
|
5
|
+
"init": "npm install",
|
|
5
6
|
"reinit": "rm -rf node_modules && rm -rf package-lock.json && npx nuxt cleanup && npm cache clean --force && npm i",
|
|
6
7
|
"build": "nuxt build",
|
|
7
8
|
"start": "nuxt dev --port 3100",
|
|
@@ -27,17 +28,15 @@
|
|
|
27
28
|
"pinia": "2.1.3"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
|
-
"@antfu/eslint-config": "0.39.5",
|
|
31
31
|
"@badeball/cypress-cucumber-preprocessor": "18.0.0",
|
|
32
32
|
"@cypress/webpack-preprocessor": "5.17.1",
|
|
33
|
+
"@lenne.tech/eslint-config-vue": "0.0.6",
|
|
33
34
|
"@nuxt/test-utils": "3.5.3",
|
|
34
|
-
"@nuxtjs/eslint-config-typescript": "12.0.0",
|
|
35
35
|
"@nuxtjs/tailwindcss": "6.7.0",
|
|
36
36
|
"@vitejs/plugin-vue": "4.2.3",
|
|
37
37
|
"@vue/test-utils": "2.3.2",
|
|
38
38
|
"cypress": "12.14.0",
|
|
39
39
|
"eslint": "8.42.0",
|
|
40
|
-
"eslint-plugin-vitest": "0.2.6",
|
|
41
40
|
"husky": "8.0.3",
|
|
42
41
|
"jsdom": "22.1.0",
|
|
43
42
|
"nuxt": "3.5.3",
|
|
@@ -58,4 +57,4 @@
|
|
|
58
57
|
"cypress/integrations/**/*.{js,ts}"
|
|
59
58
|
]
|
|
60
59
|
}
|
|
61
|
-
}
|
|
60
|
+
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export default defineNuxtRouteMiddleware((to, from) => {
|
|
2
2
|
const store = useAuthStore();
|
|
3
3
|
|
|
4
|
-
if (to.fullPath.startsWith('/auth/'))
|
|
4
|
+
if (to.fullPath.startsWith('/auth/')) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
5
7
|
|
|
6
|
-
if (!store.token || !store.currentUser)
|
|
8
|
+
if (!store.token || !store.currentUser) {
|
|
9
|
+
return navigateTo('/auth/login');
|
|
10
|
+
}
|
|
7
11
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { mount } from '@vue/test-utils'
|
|
2
|
-
import { describe, expect, it } from 'vitest'
|
|
1
|
+
import { mount } from '@vue/test-utils';
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
3
|
|
|
4
|
-
import HelloWorld from '../components/hello-world.vue'
|
|
4
|
+
import HelloWorld from '../components/hello-world.vue';
|
|
5
5
|
|
|
6
6
|
describe('HelloWorld', () => {
|
|
7
7
|
it('is a Vue instance', () => {
|
|
8
|
-
const wrapper = mount(HelloWorld)
|
|
9
|
-
expect(wrapper.vm).toBeTruthy()
|
|
10
|
-
})
|
|
11
|
-
})
|
|
8
|
+
const wrapper = mount(HelloWorld);
|
|
9
|
+
expect(wrapper.vm).toBeTruthy();
|
|
10
|
+
});
|
|
11
|
+
});
|
package/package.json
CHANGED