@dargmuesli/nuxt-vio 3.0.0-beta.6 → 3.0.0-beta.8
Sign up to get free protection for your applications and to get access to all the features.
- package/app.config.ts +0 -2
- package/composables/useGetServiceHref.ts +2 -2
- package/locales/de.json +1 -1
- package/locales/en.json +1 -1
- package/nuxt.config.ts +5 -0
- package/package.json +10 -10
- package/plugins/dayjs.ts +0 -1
- package/server/middleware/headers.ts +1 -1
- package/server/tsconfig.json +1 -1
- package/server/utils/util.ts +2 -0
- package/tailwind.config.ts +3 -3
- package/utils/networking.ts +1 -4
package/app.config.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export const useGetServiceHref = () => {
|
2
2
|
const host = useHost()
|
3
|
-
const
|
3
|
+
const runtimeConfig = useRuntimeConfig()
|
4
4
|
|
5
5
|
return ({
|
6
6
|
isSsr = true,
|
@@ -16,6 +16,6 @@ export const useGetServiceHref = () => {
|
|
16
16
|
isSsr,
|
17
17
|
name,
|
18
18
|
port,
|
19
|
-
stagingHost:
|
19
|
+
stagingHost: runtimeConfig.public.stagingHost,
|
20
20
|
})
|
21
21
|
}
|
package/locales/de.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"globalStatusLoading": "Lade...",
|
3
2
|
"globalPlaceholderUrl": "https://websei.te",
|
4
3
|
"globalStatusError": "Fehler",
|
4
|
+
"globalStatusLoading": "Lade...",
|
5
5
|
"globalValidationFailed": "Bitte überprüfe deine Eingaben 🙈",
|
6
6
|
"globalValidationFormatUrlHttps": "Muss mit \"https://\" beginnen",
|
7
7
|
"globalValidationLength": "Zu lang",
|
package/locales/en.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
|
-
"globalStatusLoading": "Loading...",
|
3
2
|
"globalPlaceholderUrl": "https://websi.te",
|
4
3
|
"globalStatusError": "Error",
|
4
|
+
"globalStatusLoading": "Loading...",
|
5
5
|
"globalValidationFailed": "Please check your input 🙈",
|
6
6
|
"globalValidationFormatUrlHttps": "Must start with \"https://\"",
|
7
7
|
"globalValidationLength": "Too long",
|
package/nuxt.config.ts
CHANGED
@@ -65,6 +65,11 @@ export default defineNuxtConfig({
|
|
65
65
|
},
|
66
66
|
isInProduction: process.env.NODE_ENV === 'production',
|
67
67
|
isTesting: false,
|
68
|
+
stagingHost:
|
69
|
+
process.env.NODE_ENV !== 'production' &&
|
70
|
+
!process.env.NUXT_PUBLIC_STACK_DOMAIN
|
71
|
+
? 'localhost:3000'
|
72
|
+
: undefined,
|
68
73
|
},
|
69
74
|
},
|
70
75
|
typescript: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "3.0.0-beta.
|
3
|
+
"version": "3.0.0-beta.8",
|
4
4
|
"type": "module",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -29,17 +29,17 @@
|
|
29
29
|
],
|
30
30
|
"main": "nuxt.config.ts",
|
31
31
|
"scripts": {
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"generate": "
|
35
|
-
"preview": "nuxi preview .playground",
|
36
|
-
"prepare": "nuxi prepare .playground",
|
37
|
-
"lint": "pnpm lint:js && pnpm lint:ts && pnpm lint:style",
|
32
|
+
"build": "nuxt build .playground",
|
33
|
+
"dev": "nuxt dev .playground",
|
34
|
+
"generate": "nuxt generate .playground",
|
38
35
|
"lint:fix": "pnpm lint:js --fix && pnpm lint:ts --fix && pnpm lint:style --fix",
|
39
36
|
"lint:js": "eslint --cache --ext .js,.ts,.vue --ignore-path .gitignore .",
|
40
37
|
"lint:staged": "lint-staged",
|
41
38
|
"lint:style": "stylelint **/*.{vue,css} --ignore-path .gitignore",
|
42
|
-
"lint:ts": "
|
39
|
+
"lint:ts": "nuxt typecheck",
|
40
|
+
"lint": "pnpm lint:js && pnpm lint:ts && pnpm lint:style",
|
41
|
+
"prepare": "nuxt prepare .playground",
|
42
|
+
"preview": "nuxt preview .playground"
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
45
|
"@dargmuesli/nuxt-cookie-control": "6.1.5",
|
@@ -57,8 +57,9 @@
|
|
57
57
|
"@urql/exchange-graphcache": "6.3.1",
|
58
58
|
"@urql/vue": "1.1.2",
|
59
59
|
"@vuelidate/core": "2.0.3",
|
60
|
+
"@vuelidate/validators": "2.0.3",
|
60
61
|
"clipboard": "2.0.11",
|
61
|
-
"dayjs": "
|
62
|
+
"dayjs": "2.0.0-alpha.4",
|
62
63
|
"is-https": "4.0.0",
|
63
64
|
"jose": "4.14.4",
|
64
65
|
"marked": "7.0.1",
|
@@ -85,7 +86,6 @@
|
|
85
86
|
"stylelint-config-standard": "34.0.0",
|
86
87
|
"stylelint-no-unsupported-browser-features": "7.0.0",
|
87
88
|
"tailwindcss": "3.3.3",
|
88
|
-
"typescript": "5.1.6",
|
89
89
|
"vue": "3.3.4",
|
90
90
|
"vue-tsc": "1.8.8"
|
91
91
|
}
|
package/plugins/dayjs.ts
CHANGED
@@ -21,7 +21,7 @@ export default defineEventHandler(async (event) => {
|
|
21
21
|
// );
|
22
22
|
// };
|
23
23
|
|
24
|
-
const setRequestHeader = (event: H3Event, name: string, value
|
24
|
+
const setRequestHeader = (event: H3Event, name: string, value?: string) => {
|
25
25
|
event.node.req.headers[name] = value
|
26
26
|
}
|
27
27
|
|
package/server/tsconfig.json
CHANGED
package/tailwind.config.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { Config } from 'tailwindcss'
|
2
|
-
import colors from 'tailwindcss/colors'
|
3
|
-
import { PluginAPI } from 'tailwindcss/types/config'
|
4
1
|
import formsPlugin from '@tailwindcss/forms'
|
5
2
|
import typographyPlugin from '@tailwindcss/typography'
|
3
|
+
import type { Config } from 'tailwindcss'
|
4
|
+
import colors from 'tailwindcss/colors'
|
5
|
+
import type { PluginAPI } from 'tailwindcss/types/config'
|
6
6
|
|
7
7
|
const heading = (theme: PluginAPI['theme']): Record<string, string> => ({
|
8
8
|
fontWeight: theme('fontWeight.bold'),
|
package/utils/networking.ts
CHANGED
@@ -60,9 +60,6 @@ export const getCombinedErrorMessages = (
|
|
60
60
|
return errorMessages
|
61
61
|
}
|
62
62
|
|
63
|
-
export const getCspAsString = (csp = {} as Record<string, Array<string>>) =>
|
64
|
-
Object.keys(csp).reduce((p, c) => (p += `${c} ${csp[c].join(' ')};`), '')
|
65
|
-
|
66
63
|
export const getDomainTldPort = (host: string) => {
|
67
64
|
const hostParts = host.split('.')
|
68
65
|
|
@@ -114,7 +111,7 @@ export const getTimezone = async (event: H3Event) => {
|
|
114
111
|
}
|
115
112
|
|
116
113
|
if (event.node.req.headers['x-real-ip']) {
|
117
|
-
const ipApiResult = await ofetch(
|
114
|
+
const ipApiResult = await ofetch<{ timezone: string }>(
|
118
115
|
`http://ip-api.com/json/${event.node.req.headers['x-real-ip']}`,
|
119
116
|
).catch(() => {})
|
120
117
|
|