@shopbite-de/storefront 1.9.2 → 1.10.1

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/.env.example CHANGED
@@ -12,6 +12,7 @@ NUXT_SHOPWARE_ADMIN_CLIENT_ID=your_client_id
12
12
  NUXT_SHOPWARE_ADMIN_CLIENT_SECRET=your_client_secret
13
13
 
14
14
  NUXT_PUBLIC_SHOP_BITE_FEATURE_MULTI_CHANNEL=false
15
+ NUXT_PUBLIC_SHOP_BITE_FEATURE_SECURE_KEY=
15
16
 
16
17
  OPENAPI_ACCESS_KEY=key
17
18
  OPENAPI_JSON_URL="https://shopware.shopbite.net"
@@ -66,7 +66,7 @@ jobs:
66
66
  - name: Install pnpm
67
67
  uses: pnpm/action-setup@v4
68
68
  with:
69
- version: 10.29.2
69
+ version: 10.29.3
70
70
 
71
71
  - name: Install dependencies
72
72
  run: pnpm install --frozen-lockfile
package/.nuxtrc ADDED
@@ -0,0 +1 @@
1
+ setups.@nuxt/test-utils="3.23.0"
package/app/error.vue CHANGED
@@ -30,7 +30,7 @@ useSeoMeta({
30
30
  <h3 class="max-w-lg whitespace-pre-line pb-8 pt-5 text-3xl">
31
31
  {{ error.statusCode }}
32
32
  </h3>
33
- <NuxtLink to="" class="button">Zurück zur Starseite</NuxtLink>
33
+ <NuxtLink to="/" class="button">Zurück zur Startseite</NuxtLink>
34
34
  </div>
35
35
  </NuxtLayout>
36
36
  </template>
@@ -0,0 +1,46 @@
1
+ import { defineNuxtRouteMiddleware, navigateTo, useCookie } from "#app";
2
+
3
+ export default defineNuxtRouteMiddleware((to) => {
4
+ // Normalize query param (can be string | string[] | undefined)
5
+ const q = to.query.secureKey as string | string[] | undefined;
6
+ const providedSecureKey = Array.isArray(q) ? q[0] : q;
7
+
8
+ // Read secure key from public runtime config
9
+ const definedSecureKey = useRuntimeConfig().public?.shopBite?.feature
10
+ ?.secureKey as string | undefined;
11
+
12
+ if (!definedSecureKey) return;
13
+
14
+ // Cookie used to persist successful auth
15
+ const cookie = useCookie<string | null>("store_secure_key", {
16
+ sameSite: "lax",
17
+ secure: process.env.NODE_ENV === "production",
18
+ path: "/",
19
+ maxAge: 60 * 60 * 24 * 30, // 30 days
20
+ });
21
+
22
+ // If a key is provided in the URL, always persist it and strip it from the URL
23
+ if (providedSecureKey) {
24
+ cookie.value = providedSecureKey;
25
+
26
+ // Strip auth-related query params from URL
27
+ const { path, query, hash } = to;
28
+ const {
29
+ secureKey: _s,
30
+ key: _k,
31
+ token: _t,
32
+ ...rest
33
+ } = query as typeof to.query;
34
+
35
+ // Navigate once to clean the URL; middleware will re-run after this
36
+ return navigateTo({ path, query: rest, hash }, { replace: true });
37
+ }
38
+
39
+ // When feature is enabled, enforce that cookie matches configured key
40
+ if (cookie.value === definedSecureKey) return;
41
+
42
+ if (to.path === "/maintenance") return;
43
+
44
+ // Not authorized — redirect to maintenance
45
+ return navigateTo("/maintenance");
46
+ });
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <div class="min-h-screen flex items-center justify-center p-6 text-center">
3
+ <div>
4
+ <h1 class="text-3xl font-semibold mb-3">Wartungsmodus</h1>
5
+ <p class="text-gray-600">
6
+ Der Shop ist vorübergehend nicht verfügbar. Bitte versuchen Sie es
7
+ später erneut.
8
+ </p>
9
+ </div>
10
+ </div>
11
+ </template>
package/content/index.yml CHANGED
@@ -5,7 +5,7 @@ seo:
5
5
  title: ShopBite
6
6
  description: Reduziere Kosten und steigere deinen Umsatz
7
7
  hero:
8
- backgroundVideo: https://shopware.shopbite.de/media/10/59/96/1762465181/background.mp4?ts=1762465194
8
+ backgroundVideo: https://shopware.shopbite.de/media/10/59/96/1762465181/background.mp4
9
9
  headline: SHOPBITE
10
10
  usps:
11
11
  - title: 4.5 ⭐
@@ -68,17 +68,17 @@ gallery:
68
68
  variant: subtle
69
69
  trailingIcon: i-lucide-phone
70
70
  images:
71
- - image: https://shopware.shopbite.de/media/71/2a/1a/1762465670/restaurant1.webp?ts=1762465670
71
+ - image: https://shopware.shopbite.de/media/71/2a/1a/1762465670/restaurant1.webp
72
72
  alt: La Fattoria Restaurant Innenbereich 1
73
- - image: https://shopware.shopbite.de/media/61/ea/77/1762465670/restaurant2.webp?ts=1762465670
73
+ - image: https://shopware.shopbite.de/media/61/ea/77/1762465670/restaurant2.webp
74
74
  alt: La Fattoria Restaurant Innenbereich 2
75
- - image: https://shopware.shopbite.de/media/6d/ac/ca/1762465670/restaurant3.webp?ts=1762465670
75
+ - image: https://shopware.shopbite.de/media/6d/ac/ca/1762465670/restaurant3.webp
76
76
  alt: La Fattoria Restaurant Innenbereich 3
77
- - image: https://shopware.shopbite.de/media/af/d6/da/1762465670/restaurant4.webp?ts=1762465670
77
+ - image: https://shopware.shopbite.de/media/af/d6/da/1762465670/restaurant4.webp
78
78
  alt: La Fattoria Restaurant Innenbereich 4
79
- - image: https://shopware.shopbite.de/media/6a/ff/e2/1762465670/restaurant5.webp?ts=1762465670
79
+ - image: https://shopware.shopbite.de/media/6a/ff/e2/1762465670/restaurant5.webp
80
80
  alt: La Fattoria Restaurant Innenbereich 5
81
- - image: https://shopware.shopbite.de/media/80/76/d0/1762465670/restaurant6.webp?ts=1762465670
81
+ - image: https://shopware.shopbite.de/media/80/76/d0/1762465670/restaurant6.webp
82
82
  alt: La Fattoria Restaurant Innenbereich 6
83
83
 
84
84
  cta:
package/nuxt.config.ts CHANGED
@@ -57,6 +57,7 @@ export default defineNuxtConfig({
57
57
  shopBite: {
58
58
  feature: {
59
59
  multiChannel: "",
60
+ secureKey: "",
60
61
  },
61
62
  },
62
63
  site: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopbite-de/storefront",
3
- "version": "1.9.2",
3
+ "version": "1.10.1",
4
4
  "main": "nuxt.config.ts",
5
5
  "description": "Shopware storefront for food delivery shops",
6
6
  "keywords": [
@@ -18,7 +18,7 @@
18
18
  "@heroicons/vue": "^2.2.0",
19
19
  "@iconify-json/lucide": "^1.2.73",
20
20
  "@iconify-json/simple-icons": "^1.2.59",
21
- "@nuxt/content": "3.8.2",
21
+ "@nuxt/content": "3.10.0",
22
22
  "@nuxt/image": "^2.0.0",
23
23
  "@nuxt/scripts": "0.13.2",
24
24
  "@nuxt/ui": "^4.1.0",
@@ -49,9 +49,9 @@
49
49
  "@vue/compiler-dom": "^3.5.26",
50
50
  "@vue/server-renderer": "^3.5.26",
51
51
  "@vue/test-utils": "^2.4.6",
52
- "eslint": "^9.39.1",
52
+ "eslint": "^10.0.0",
53
53
  "happy-dom": "^20.0.10",
54
- "jsdom": "^27.2.0",
54
+ "jsdom": "^28.0.0",
55
55
  "playwright-core": "^1.56.1",
56
56
  "prettier": "^3.6.2",
57
57
  "tailwindcss": "^4.1.18",