@shopbite-de/storefront 2.3.0 → 2.5.0

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.
Files changed (100) hide show
  1. package/.env.example +13 -1
  2. package/.github/workflows/build.yaml +2 -2
  3. package/.github/workflows/ci.yaml +11 -11
  4. package/.nuxtrc +1 -1
  5. package/CLAUDE.md +8 -5
  6. package/app/app.vue +1 -1
  7. package/app/components/Address/Fields.vue +1 -2
  8. package/app/components/Header.vue +4 -0
  9. package/app/components/Home/Categories.vue +2 -2
  10. package/app/components/Menu/BonCard.vue +1 -2
  11. package/app/components/Navigation/MobileTop.vue +1 -1
  12. package/app/components/Order/Confirmation.vue +1 -2
  13. package/app/components/Product/QuickView.vue +1 -2
  14. package/app/composables/useAddressAutocomplete.ts +3 -11
  15. package/app/composables/useCheckoutMethodGuard.ts +1 -1
  16. package/app/composables/useShippingMethodChoice.ts +2 -2
  17. package/app/composables/useTrackEvent.ts +4 -3
  18. package/app/pages/account/recover/password/index.vue +10 -0
  19. package/app/pages/registrierung/bestaetigen.vue +4 -0
  20. package/app/utils/openingHours.ts +1 -1
  21. package/app/utils/schema.ts +2 -2
  22. package/app/utils/trackingUrl.ts +39 -0
  23. package/content/index.yml +16 -16
  24. package/content/zahlung-und-versand.md +3 -3
  25. package/docs/notes/2026-07-04-issue-239-hydration-mismatches.md +1 -1
  26. package/docs/notes/2026-09-08-issue-244-category-url-trailing-slash.md +2 -2
  27. package/docs/notes/2026-09-10-issue-251-shop-data-in-base-layer.md +4 -4
  28. package/docs/notes/2026-09-10-issue-272-restaurant-schema.md +3 -3
  29. package/docs/notes/2026-09-10-issue-273-performance-media.md +4 -4
  30. package/docs/notes/2026-09-10-issue-274-seo-basics.md +6 -6
  31. package/docs/notes/2026-09-10-issue-275-accessibility.md +3 -3
  32. package/docs/notes/2026-09-10-issue-290-footer-nap.md +5 -5
  33. package/docs/notes/2026-09-10-issue-294-matomo-without-config.md +1 -1
  34. package/docs/notes/2026-09-10-issue-296-track-direct-search.md +1 -1
  35. package/docs/notes/2026-09-10-issue-312-store-api-criteria-post.md +3 -3
  36. package/docs/notes/2026-09-10-issue-313-wishlist-scoped-tailwind.md +1 -1
  37. package/docs/notes/2026-09-10-issue-314-mobile-js-cost.md +1 -1
  38. package/docs/notes/2026-09-12-issue-319-stylesheet-cost.md +1 -1
  39. package/docs/notes/2026-09-12-issue-325-product-card.md +2 -2
  40. package/docs/notes/2026-09-12-issue-327-home-hero.md +2 -2
  41. package/docs/notes/2026-09-13-issue-332-home-info-cards.md +1 -1
  42. package/docs/notes/2026-09-13-quick-view-flicker.md +1 -1
  43. package/docs/notes/2026-09-14-demo-noindex.md +2 -2
  44. package/docs/notes/2026-09-17-quick-view-compact-options.md +1 -1
  45. package/docs/notes/2026-09-21-issue-273-cache-and-demo-video.md +1 -1
  46. package/docs/notes/2026-09-21-issue-363-non-fatal-404.md +2 -2
  47. package/docs/notes/2026-09-21-issue-366-wishlist-404.md +1 -1
  48. package/docs/notes/2026-09-21-issue-378-dev-modules.md +1 -1
  49. package/docs/notes/2026-10-05-issue-289-product-deep-links.md +1 -1
  50. package/docs/notes/2026-10-05-issue-400-menu-item-ingredients-diet.md +1 -1
  51. package/docs/notes/2026-10-05-issue-401-restaurant-schema-ordering.md +1 -1
  52. package/docs/notes/2026-10-05-issue-402-llms-txt.md +1 -1
  53. package/docs/notes/2026-10-05-issue-403-ai-crawlers.md +1 -1
  54. package/docs/notes/2026-10-05-issue-404-faq.md +1 -1
  55. package/docs/notes/2026-10-06-old-seo-url-redirect.md +5 -5
  56. package/docs/notes/2026-10-07-issue-434-property-group-projection.md +1 -1
  57. package/docs/notes/2026-11-18-dependency-update.md +118 -0
  58. package/node.dockerfile +7 -7
  59. package/nuxt.config.ts +65 -9
  60. package/package.json +41 -40
  61. package/pnpm-workspace.yaml +0 -2
  62. package/server/api/address/autocomplete.get.ts +79 -14
  63. package/server/api/listing/[categoryId].get.ts +5 -28
  64. package/server/api/search.get.ts +4 -18
  65. package/server/plugins/ai-crawlers.ts +1 -1
  66. package/server/plugins/bounded-cache.ts +28 -0
  67. package/server/plugins/security-headers.ts +54 -0
  68. package/server/plugins/site-url.ts +2 -2
  69. package/server/routes/llms.txt.ts +7 -3
  70. package/server/utils/addressAutocomplete.ts +181 -0
  71. package/server/utils/listingParams.ts +117 -0
  72. package/server/utils/securityHeaders.ts +165 -0
  73. package/server/utils/storeApi.ts +4 -2
  74. package/test/a11y/presets.test.ts +3 -1
  75. package/test/layer/nuxt.config.ts +2 -2
  76. package/test/nuxt/AccountPagesPreset.test.ts +10 -10
  77. package/test/nuxt/AuthPagesPreset.test.ts +3 -0
  78. package/test/nuxt/CheckoutFormsPreset.test.ts +5 -5
  79. package/test/nuxt/CheckoutOnePage.test.ts +2 -0
  80. package/test/nuxt/CheckoutSummary.test.ts +1 -1
  81. package/test/nuxt/HeaderFooterPreset.test.ts +23 -14
  82. package/test/nuxt/HomeFaq.test.ts +1 -1
  83. package/test/nuxt/NavigationMobileTop.test.ts +1 -1
  84. package/test/nuxt/OrderPagesPreset.test.ts +2 -2
  85. package/test/nuxt/RegisterConfirmPage.test.ts +12 -0
  86. package/test/nuxt/useAddressAutocomplete.test.ts +7 -22
  87. package/test/nuxt/useCheckoutMethodGuard.test.ts +1 -1
  88. package/test/nuxt/useShippingMethodChoice.test.ts +1 -1
  89. package/test/nuxt/useTrackEvent.test.ts +16 -0
  90. package/test/unit/addressAutocomplete.spec.ts +247 -0
  91. package/test/unit/boundedCache.spec.ts +231 -0
  92. package/test/unit/highlight.spec.ts +2 -2
  93. package/test/unit/llmsTxt.spec.ts +28 -28
  94. package/test/unit/openingHours.spec.ts +3 -3
  95. package/test/unit/schema.spec.ts +29 -32
  96. package/test/unit/securityHeaders.spec.ts +254 -0
  97. package/test/unit/seo.spec.ts +23 -29
  98. package/test/unit/sitemap.spec.ts +1 -1
  99. package/test/unit/trackingUrl.spec.ts +48 -0
  100. package/patches/@shopware__nuxt-module@1.5.2.patch +0 -13
@@ -11,23 +11,19 @@ const TEMPLATE = "%s | %siteName – Online bestellen";
11
11
 
12
12
  describe("formatPageTitle", () => {
13
13
  it("applies the title template", () => {
14
- expect(formatPageTitle("Pizza", "La Fattoria", TEMPLATE)).toBe(
15
- "Pizza | La Fattoria – Online bestellen",
14
+ expect(formatPageTitle("Pizza", "Esempio", TEMPLATE)).toBe(
15
+ "Pizza | Esempio – Online bestellen",
16
16
  );
17
17
  });
18
18
 
19
19
  it("renders the bare site name for a missing or site-name title", () => {
20
- expect(formatPageTitle(undefined, "La Fattoria", TEMPLATE)).toBe(
21
- "La Fattoria",
22
- );
23
- expect(formatPageTitle("", "La Fattoria", TEMPLATE)).toBe("La Fattoria");
24
- expect(formatPageTitle("La Fattoria", "La Fattoria", TEMPLATE)).toBe(
25
- "La Fattoria",
26
- );
20
+ expect(formatPageTitle(undefined, "Esempio", TEMPLATE)).toBe("Esempio");
21
+ expect(formatPageTitle("", "Esempio", TEMPLATE)).toBe("Esempio");
22
+ expect(formatPageTitle("Esempio", "Esempio", TEMPLATE)).toBe("Esempio");
27
23
  });
28
24
 
29
25
  it("renders the title as is without a template", () => {
30
- expect(formatPageTitle("Pizza", "La Fattoria", "")).toBe("Pizza");
26
+ expect(formatPageTitle("Pizza", "Esempio", "")).toBe("Pizza");
31
27
  });
32
28
  });
33
29
 
@@ -56,20 +52,20 @@ describe("toAbsoluteUrl", () => {
56
52
 
57
53
  describe("buildHomeTitle", () => {
58
54
  it("adds the city to the shop name", () => {
59
- expect(buildHomeTitle({ name: "La Fattoria", city: "Obertshausen" })).toBe(
60
- "La Fattoria Obertshausen | Online bestellen & liefern lassen",
55
+ expect(buildHomeTitle({ name: "Esempio", city: "Musterstadt" })).toBe(
56
+ "Esempio Musterstadt | Online bestellen & liefern lassen",
61
57
  );
62
58
  });
63
59
 
64
60
  it("does not repeat a city that is already part of the name", () => {
65
61
  expect(
66
- buildHomeTitle({ name: "Pizzeria Obertshausen", city: "Obertshausen" }),
67
- ).toBe("Pizzeria Obertshausen | Online bestellen & liefern lassen");
62
+ buildHomeTitle({ name: "Pizzeria Musterstadt", city: "Musterstadt" }),
63
+ ).toBe("Pizzeria Musterstadt | Online bestellen & liefern lassen");
68
64
  });
69
65
 
70
66
  it("works without a city", () => {
71
- expect(buildHomeTitle({ name: "La Fattoria", city: "" })).toBe(
72
- "La Fattoria | Online bestellen & liefern lassen",
67
+ expect(buildHomeTitle({ name: "Esempio", city: "" })).toBe(
68
+ "Esempio | Online bestellen & liefern lassen",
73
69
  );
74
70
  });
75
71
  });
@@ -78,40 +74,38 @@ describe("buildHomeDescription", () => {
78
74
  it("combines cuisine, city and name", () => {
79
75
  expect(
80
76
  buildHomeDescription({
81
- name: "La Fattoria",
82
- city: "Obertshausen",
77
+ name: "Esempio",
78
+ city: "Musterstadt",
83
79
  cuisine: "Italienische Küche",
84
80
  }),
85
81
  ).toBe(
86
- "Italienische Küche in Obertshausen: Bei La Fattoria online bestellen und liefern lassen oder abholen.",
82
+ "Italienische Küche in Musterstadt: Bei Esempio online bestellen und liefern lassen oder abholen.",
87
83
  );
88
84
  });
89
85
 
90
86
  it("uses city or cuisine alone", () => {
91
- expect(
92
- buildHomeDescription({ name: "La Fattoria", city: "Obertshausen" }),
93
- ).toBe(
94
- "La Fattoria in Obertshausen: Online bestellen und liefern lassen oder abholen.",
87
+ expect(buildHomeDescription({ name: "Esempio", city: "Musterstadt" })).toBe(
88
+ "Esempio in Musterstadt: Online bestellen und liefern lassen oder abholen.",
95
89
  );
96
90
  expect(
97
- buildHomeDescription({ name: "La Fattoria", cuisine: "Pizza & Pasta" }),
91
+ buildHomeDescription({ name: "Esempio", cuisine: "Pizza & Pasta" }),
98
92
  ).toBe(
99
- "Pizza & Pasta: Bei La Fattoria online bestellen und liefern lassen oder abholen.",
93
+ "Pizza & Pasta: Bei Esempio online bestellen und liefern lassen oder abholen.",
100
94
  );
101
95
  });
102
96
 
103
97
  it("returns undefined without city and cuisine", () => {
104
98
  expect(
105
- buildHomeDescription({ name: "La Fattoria", city: "", cuisine: "" }),
99
+ buildHomeDescription({ name: "Esempio", city: "", cuisine: "" }),
106
100
  ).toBeUndefined();
107
101
  });
108
102
  });
109
103
 
110
104
  describe("splitList", () => {
111
105
  it("splits a comma-separated value and keeps arrays", () => {
112
- expect(splitList("63179 Obertshausen, 63165 Lämmerspiel,")).toEqual([
113
- "63179 Obertshausen",
114
- "63165 Lämmerspiel",
106
+ expect(splitList("12345 Musterstadt, 12346 Beispieldorf,")).toEqual([
107
+ "12345 Musterstadt",
108
+ "12346 Beispieldorf",
115
109
  ]);
116
110
  expect(splitList(["A", "B"])).toEqual(["A", "B"]);
117
111
  expect(splitList("")).toEqual([]);
@@ -50,7 +50,7 @@ describe("categoriesToSitemapUrls", () => {
50
50
  seoUrl: "/navigation/018d9f1649c9709580aab97a16368d8d",
51
51
  },
52
52
  { type: "link", seoUrl: "/agb" },
53
- { type: "link", seoUrl: "tel:+491726723920" },
53
+ { type: "link", seoUrl: "tel:+49123456780" },
54
54
  { type: "folder", seoUrl: null },
55
55
  { type: "page", seoUrl: "//evil.example.com/" },
56
56
  { type: "page" },
@@ -0,0 +1,48 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { trackingUrl } from "../../app/utils/trackingUrl";
3
+
4
+ describe("trackingUrl", () => {
5
+ it("keeps a plain path", () => {
6
+ expect(trackingUrl("/Speisekarte/Pizza/")).toBe("/Speisekarte/Pizza/");
7
+ });
8
+
9
+ it("drops query parameters that may carry secrets", () => {
10
+ expect(trackingUrl("/account/recover/password?hash=abc123")).toBe(
11
+ "/account/recover/password",
12
+ );
13
+ expect(trackingUrl("/registrierung/bestaetigen?em=e1&hash=h1")).toBe(
14
+ "/registrierung/bestaetigen",
15
+ );
16
+ expect(
17
+ trackingUrl("/bestellung/1?token=t&deepLinkCode=d&email=a@b.c"),
18
+ ).toBe("/bestellung/1");
19
+ });
20
+
21
+ it("drops the fragment", () => {
22
+ expect(trackingUrl("/konto#access_token=x")).toBe("/konto");
23
+ expect(trackingUrl("/?produkt=P1#x")).toBe("/?produkt=P1");
24
+ });
25
+
26
+ it("keeps campaign parameters and the quick view configuration", () => {
27
+ expect(
28
+ trackingUrl(
29
+ "/Speisekarte/Pizza/?produkt=P1&ohne=Zwiebeln&extras=E1&hash=x",
30
+ ),
31
+ ).toBe("/Speisekarte/Pizza/?produkt=P1&ohne=Zwiebeln&extras=E1");
32
+ expect(
33
+ trackingUrl(
34
+ "/?utm_source=flyer&utm_medium=print&mtm_campaign=a&pk_kwd=b&em=x",
35
+ ),
36
+ ).toBe("/?utm_source=flyer&utm_medium=print&mtm_campaign=a&pk_kwd=b");
37
+ });
38
+
39
+ it("matches parameter names exactly, not by prefix", () => {
40
+ expect(trackingUrl("/?produkt_hash=x&extrasToken=y&utm=z")).toBe("/");
41
+ });
42
+
43
+ it("keeps encoded values as they are", () => {
44
+ expect(trackingUrl("/?ohne=K%C3%A4se&extras=E1%2CE2")).toBe(
45
+ "/?ohne=K%C3%A4se&extras=E1%2CE2",
46
+ );
47
+ });
48
+ });
@@ -1,13 +0,0 @@
1
- diff --git a/plugin.ts b/plugin.ts
2
- index 2b843eaa6d89f38ef4bd1bce3a0090aa41034572..3a59bd45ac795e80d668fa195f5f311bb92c8a4b 100644
3
- --- a/plugin.ts
4
- +++ b/plugin.ts
5
- @@ -16,7 +16,7 @@ import {
6
- } from "#imports";
7
- import type { ApiClient } from "#shopware";
8
-
9
- -import type { ShopwareNuxtOptions } from "./src";
10
- +import type { ShopwareNuxtOptions } from "./dist/index";
11
-
12
- type ShopwarePluginInjections = {
13
- shopwareApiClient: ApiClient;