@dargmuesli/nuxt-vio 10.2.1 → 10.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/components/vio/_/VioError.vue +4 -3
- package/locales/de.json +4 -2
- package/locales/en.json +4 -2
- package/nuxt.config.ts +4 -2
- package/package.json +24 -24
- package/plugins/dayjs.ts +10 -10
- package/plugins/gtag.client.ts +3 -3
- package/utils/constants.ts +0 -4
- package/plugins/siteConfig.server.ts +0 -7
@@ -12,8 +12,6 @@
|
|
12
12
|
</template>
|
13
13
|
|
14
14
|
<script setup lang="ts">
|
15
|
-
const httpUtilStatusI18n = await import('@http-util/status-i18n')
|
16
|
-
|
17
15
|
interface Props {
|
18
16
|
statusCode?: number
|
19
17
|
statusMessage?: string
|
@@ -31,7 +29,10 @@ const { locale, t } = useI18n()
|
|
31
29
|
|
32
30
|
// data
|
33
31
|
const title = `${props.statusCode ? `${props.statusCode} - ` : ''}${
|
34
|
-
|
32
|
+
(await import('@http-util/status-i18n')).status(
|
33
|
+
props.statusCode,
|
34
|
+
locale.value,
|
35
|
+
) || t('error')
|
35
36
|
}`
|
36
37
|
|
37
38
|
// initialization
|
package/locales/de.json
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"globalPlaceholderEmailAddress": "e-mail{'@'}adres.se",
|
3
3
|
"globalPlaceholderUrl": "https://websei.te",
|
4
|
-
"globalSeoSiteDescription": "Vio ist {'@'}dargmueslis Nuxt layer.",
|
5
4
|
"globalStatusError": "Fehler",
|
6
5
|
"globalStatusLoading": "Lade...",
|
7
6
|
"globalValidationFailed": "Bitte überprüfe deine Eingaben 🙈",
|
@@ -9,5 +8,8 @@
|
|
9
8
|
"globalValidationFormatIncorrect": "Falsches Format",
|
10
9
|
"globalValidationFormatUrlHttps": "Muss mit \"https://\" beginnen",
|
11
10
|
"globalValidationLength": "Zu lang",
|
12
|
-
"globalValidationRequired": "Pflichtfeld"
|
11
|
+
"globalValidationRequired": "Pflichtfeld",
|
12
|
+
"nuxtSiteConfig": {
|
13
|
+
"description": "Vio ist {'@'}dargmueslis Nuxt layer."
|
14
|
+
}
|
13
15
|
}
|
package/locales/en.json
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"globalPlaceholderEmailAddress": "email{'@'}addre.ss",
|
3
3
|
"globalPlaceholderUrl": "https://websi.te",
|
4
|
-
"globalSeoSiteDescription": "Vio is {'@'}dargmuesli's Nuxt layer.",
|
5
4
|
"globalStatusError": "Error",
|
6
5
|
"globalStatusLoading": "Loading...",
|
7
6
|
"globalValidationFailed": "Please check your input 🙈",
|
@@ -9,5 +8,8 @@
|
|
9
8
|
"globalValidationFormatIncorrect": "Incorrect format",
|
10
9
|
"globalValidationFormatUrlHttps": "Must start with \"https://\"",
|
11
10
|
"globalValidationLength": "Too long",
|
12
|
-
"globalValidationRequired": "Required"
|
11
|
+
"globalValidationRequired": "Required",
|
12
|
+
"nuxtSiteConfig": {
|
13
|
+
"description": "Vio is {'@'}dargmuesli's Nuxt layer."
|
14
|
+
}
|
13
15
|
}
|
package/nuxt.config.ts
CHANGED
@@ -89,7 +89,9 @@ export default defineNuxtConfig(
|
|
89
89
|
runtimeConfig: {
|
90
90
|
public: {
|
91
91
|
i18n: {
|
92
|
-
|
92
|
+
...(process.env.NODE_ENV === 'development'
|
93
|
+
? {}
|
94
|
+
: { baseUrl: SITE_URL }),
|
93
95
|
},
|
94
96
|
vio: {
|
95
97
|
googleAnalyticsId: '',
|
@@ -165,6 +167,7 @@ export default defineNuxtConfig(
|
|
165
167
|
logLevel: 'warning',
|
166
168
|
},
|
167
169
|
i18n: {
|
170
|
+
defaultLocale: 'en', // Must be set for the default prefix_except_default prefix strategy.
|
168
171
|
detectBrowserLanguage: false,
|
169
172
|
},
|
170
173
|
linkChecker: {
|
@@ -352,7 +355,6 @@ export default defineNuxtConfig(
|
|
352
355
|
},
|
353
356
|
},
|
354
357
|
VIO_NUXT_BASE_CONFIG({
|
355
|
-
defaultLocale: 'en',
|
356
358
|
siteName: SITE_NAME,
|
357
359
|
stagingHost: 'localhost:3000',
|
358
360
|
}),
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "10.2.
|
3
|
+
"version": "10.2.3",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/dargmuesli/vio.git"
|
@@ -12,7 +12,7 @@
|
|
12
12
|
"engines": {
|
13
13
|
"node": "20"
|
14
14
|
},
|
15
|
-
"packageManager": "pnpm@8.14.
|
15
|
+
"packageManager": "pnpm@8.14.3",
|
16
16
|
"files": [
|
17
17
|
"assets",
|
18
18
|
"components",
|
@@ -37,33 +37,33 @@
|
|
37
37
|
"@dargmuesli/nuxt-cookie-control": "8.0.0-beta.1",
|
38
38
|
"@heroicons/vue": "2.1.1",
|
39
39
|
"@http-util/status-i18n": "0.8.1",
|
40
|
-
"@nuxt/devtools": "1.0.
|
41
|
-
"@nuxt/image": "1.
|
40
|
+
"@nuxt/devtools": "1.0.8",
|
41
|
+
"@nuxt/image": "1.3.0",
|
42
42
|
"@nuxtjs/color-mode": "3.3.2",
|
43
43
|
"@nuxtjs/html-validator": "1.6.0",
|
44
44
|
"@nuxtjs/i18n": "8.0.0",
|
45
|
-
"@nuxtjs/seo": "2.0.0-rc.
|
46
|
-
"@nuxtjs/tailwindcss": "6.
|
45
|
+
"@nuxtjs/seo": "2.0.0-rc.5",
|
46
|
+
"@nuxtjs/tailwindcss": "6.11.0",
|
47
47
|
"@pinia/nuxt": "0.5.1",
|
48
48
|
"@tailwindcss/forms": "0.5.7",
|
49
49
|
"@tailwindcss/typography": "0.5.10",
|
50
50
|
"@types/lodash-es": "4.17.12",
|
51
|
-
"@urql/core": "4.2.
|
51
|
+
"@urql/core": "4.2.3",
|
52
52
|
"@vuelidate/core": "2.0.3",
|
53
53
|
"@vuelidate/validators": "2.0.4",
|
54
54
|
"clipboardy": "4.0.0",
|
55
55
|
"dayjs": "2.0.0-alpha.4",
|
56
56
|
"jose": "5.2.0",
|
57
|
-
"nuxt-security": "1.0.
|
58
|
-
"sweetalert2": "11.10.
|
57
|
+
"nuxt-security": "1.0.1",
|
58
|
+
"sweetalert2": "11.10.3",
|
59
59
|
"vue-gtag": "2.0.1"
|
60
60
|
},
|
61
61
|
"devDependencies": {
|
62
|
-
"@axe-core/playwright": "4.8.
|
63
|
-
"@intlify/eslint-plugin-vue-i18n": "3.0.0-next.
|
62
|
+
"@axe-core/playwright": "4.8.3",
|
63
|
+
"@intlify/eslint-plugin-vue-i18n": "3.0.0-next.5",
|
64
64
|
"@nuxtjs/eslint-config-typescript": "12.1.0",
|
65
|
-
"@playwright/test": "1.
|
66
|
-
"@unhead/vue": "1.8.
|
65
|
+
"@playwright/test": "1.41.1",
|
66
|
+
"@unhead/vue": "1.8.10",
|
67
67
|
"@urql/devtools": "2.0.3",
|
68
68
|
"@urql/exchange-graphcache": "6.4.0",
|
69
69
|
"@urql/vue": "1.1.2",
|
@@ -75,32 +75,32 @@
|
|
75
75
|
"eslint-config-prettier": "9.1.0",
|
76
76
|
"eslint-plugin-compat": "4.2.0",
|
77
77
|
"eslint-plugin-nuxt": "4.0.0",
|
78
|
-
"eslint-plugin-prettier": "5.1.
|
79
|
-
"eslint-plugin-yml": "1.
|
78
|
+
"eslint-plugin-prettier": "5.1.3",
|
79
|
+
"eslint-plugin-yml": "1.12.2",
|
80
80
|
"h3": "1.10.0",
|
81
81
|
"jiti": "1.21.0",
|
82
82
|
"lint-staged": "15.2.0",
|
83
83
|
"lodash-es": "4.17.21",
|
84
|
-
"nuxt": "3.9.
|
84
|
+
"nuxt": "3.9.3",
|
85
85
|
"pinia": "2.1.7",
|
86
|
-
"prettier": "3.
|
86
|
+
"prettier": "3.2.4",
|
87
87
|
"prettier-plugin-tailwindcss": "0.5.11",
|
88
88
|
"serve": "14.2.1",
|
89
|
-
"stylelint": "16.
|
89
|
+
"stylelint": "16.2.0",
|
90
90
|
"stylelint-config-recommended-vue": "1.5.0",
|
91
91
|
"stylelint-config-standard": "36.0.0",
|
92
92
|
"stylelint-no-unsupported-browser-features": "8.0.0",
|
93
93
|
"tailwindcss": "3.4.1",
|
94
94
|
"ufo": "1.3.2",
|
95
|
-
"unhead": "1.8.
|
96
|
-
"vue": "3.4.
|
95
|
+
"unhead": "1.8.10",
|
96
|
+
"vue": "3.4.15",
|
97
97
|
"vue-router": "4.2.5",
|
98
98
|
"vue-tsc": "1.8.27"
|
99
99
|
},
|
100
100
|
"peerDependencies": {
|
101
|
-
"nuxt": "3.9.
|
102
|
-
"playwright-core": "1.
|
103
|
-
"vue": "3.4.
|
101
|
+
"nuxt": "3.9.3",
|
102
|
+
"playwright-core": "1.41.1",
|
103
|
+
"vue": "3.4.15",
|
104
104
|
"vue-router": "4.2.5"
|
105
105
|
},
|
106
106
|
"scripts": {
|
@@ -121,7 +121,7 @@
|
|
121
121
|
"start:dev": "nuxt dev .playground",
|
122
122
|
"start:node": "node .playground/.output/server/index.mjs",
|
123
123
|
"start:static": "serve .playground/.output/public",
|
124
|
-
"start:static:test": "cross-env
|
124
|
+
"start:static:test": "cross-env PORT=3002 pnpm run start:static",
|
125
125
|
"test:e2e:docker:br": "pnpm run test:e2e:docker:build && pnpm run test:e2e:docker:run",
|
126
126
|
"test:e2e:docker:build": "docker build -t test-e2e_development --build-arg UID=$(id -u) --build-arg GID=$(id -g) --target test-e2e_development ..",
|
127
127
|
"test:e2e:docker:run": "docker run --rm -v \"$PWD/..:/srv/app\" -v \"$(pnpm store path):/srv/.pnpm-store\" test-e2e_development",
|
package/plugins/dayjs.ts
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
|
2
|
-
const dayjs = (await import('dayjs')).default
|
1
|
+
import dayjs from 'dayjs'
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
// workaround for [1]
|
4
|
+
import de from 'dayjs/locale/de'
|
5
|
+
// import 'dayjs/locale/de' does not make locale available
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
|
8
|
+
import localizedFormat from 'dayjs/plugin/localizedFormat'
|
9
|
+
import relativeTime from 'dayjs/plugin/relativeTime'
|
10
|
+
import timezone from 'dayjs/plugin/timezone'
|
11
|
+
import utc from 'dayjs/plugin/utc'
|
13
12
|
|
13
|
+
export default defineNuxtPlugin((_nuxtApp) => {
|
14
14
|
dayjs.extend(isSameOrBefore)
|
15
15
|
dayjs.extend(localizedFormat)
|
16
16
|
dayjs.extend(relativeTime)
|
package/plugins/gtag.client.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
import VueGtag from 'vue-gtag'
|
2
|
+
|
3
|
+
export default defineNuxtPlugin((nuxtApp) => {
|
2
4
|
const config = useRuntimeConfig()
|
3
5
|
const router = useRouter()
|
4
6
|
const cookieControl = useCookieControl()
|
5
7
|
|
6
|
-
const VueGtag = (await import('vue-gtag')).default
|
7
|
-
|
8
8
|
nuxtApp.vueApp.use(
|
9
9
|
VueGtag,
|
10
10
|
{
|
package/utils/constants.ts
CHANGED
@@ -53,11 +53,9 @@ export const TITLE_TEMPLATE = ({
|
|
53
53
|
}) => (title && title !== siteName ? `${title} · ${siteName}` : siteName)
|
54
54
|
export const VERIFICATION_FORMAT_UUID = helpers.regex(REGEX_UUID)
|
55
55
|
export const VIO_NUXT_BASE_CONFIG = ({
|
56
|
-
defaultLocale,
|
57
56
|
siteName,
|
58
57
|
stagingHost,
|
59
58
|
}: {
|
60
|
-
defaultLocale?: string
|
61
59
|
siteName: string
|
62
60
|
stagingHost?: string
|
63
61
|
}) =>
|
@@ -85,11 +83,9 @@ export const VIO_NUXT_BASE_CONFIG = ({
|
|
85
83
|
|
86
84
|
// modules
|
87
85
|
i18n: {
|
88
|
-
defaultLocale, // Must be set for the default prefix_except_default prefix strategy.
|
89
86
|
...I18N_MODULE_CONFIG, // `langDir`, `lazy` and `locales` must be configured to extend a layer having lazy-loaded translations (https://v8.i18n.nuxtjs.org/guide/layers#locales)
|
90
87
|
},
|
91
88
|
site: {
|
92
|
-
...(defaultLocale ? { defaultLocale } : {}),
|
93
89
|
name: siteName,
|
94
90
|
},
|
95
91
|
}) as Parameters<typeof defineNuxtConfig>[0]
|