@dargmuesli/nuxt-vio 3.0.0-beta.6 → 3.0.0-beta.7

Sign up to get free protection for your applications and to get access to all the features.
package/app.config.ts CHANGED
@@ -34,7 +34,6 @@ export default defineAppConfig({
34
34
  },
35
35
  },
36
36
  },
37
- stagingHost: undefined,
38
37
  themeColor: undefined,
39
38
  },
40
39
  })
@@ -95,7 +94,6 @@ declare module 'nuxt/schema' {
95
94
  }
96
95
  }
97
96
  }
98
- stagingHost?: string
99
97
  themeColor?: string
100
98
  }
101
99
  }
@@ -1,6 +1,6 @@
1
1
  export const useGetServiceHref = () => {
2
2
  const host = useHost()
3
- const appConfig = useAppConfig()
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: appConfig.vio.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.6",
3
+ "version": "3.0.0-beta.7",
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
- "dev": "nuxi dev .playground",
33
- "build": "nuxi build .playground",
34
- "generate": "nuxi generate .playground",
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": "nuxi typecheck"
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": "1.11.9",
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
@@ -1,4 +1,3 @@
1
- /* eslint-disable import/no-named-as-default-member */
2
1
  import dayjs from 'dayjs'
3
2
 
4
3
  // workaround for [1]
@@ -6,7 +6,11 @@ import { TIMEZONE_HEADER_KEY } from '../../utils/constants'
6
6
  import { getTimezone } from '../../utils/networking'
7
7
 
8
8
  export default defineEventHandler(async (event) => {
9
- setRequestHeader(event, TIMEZONE_HEADER_KEY, await getTimezone(event))
9
+ setRequestHeader(
10
+ event,
11
+ TIMEZONE_HEADER_KEY,
12
+ (await getTimezone(event)) || 'UTC',
13
+ )
10
14
  // setContentSecurityPolicy(event);
11
15
  setResponseHeaders(event)
12
16
  })
@@ -1,3 +1,3 @@
1
1
  {
2
- "extends": "../.nuxt/tsconfig.server.json"
2
+ "extends": "../.playground/.nuxt/tsconfig.server.json"
3
3
  }
@@ -0,0 +1,2 @@
1
+ export const getCspAsString = (csp = {} as Record<string, Array<string>>) =>
2
+ Object.keys(csp).reduce((p, c) => (p += `${c} ${csp[c].join(' ')};`), '')
@@ -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'),
@@ -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