@scayle/storefront-nuxt 7.85.15 → 7.85.16

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @scayle/storefront-nuxt
2
2
 
3
+ ## 7.85.16
4
+
5
+ ### Patch Changes
6
+
7
+ **Dependencies**
8
+
9
+ - Updated dependency to @scayle/storefront-core@7.65.8
10
+
3
11
  ## 7.85.15
4
12
 
5
13
  ### Patch Changes
@@ -135,28 +143,28 @@ For example:
135
143
  ```ts
136
144
  useBrand({
137
145
  params: { brandId: 1 },
138
- }).data satisfies Ref<Brand>;
146
+ }).data satisfies Ref<Brand>
139
147
 
140
148
  useBrand({
141
149
  params: { brandId: 1 },
142
150
  options: {
143
- pick: ["id", "isActive"],
151
+ pick: ['id', 'isActive'],
144
152
  },
145
- }).data satisfies Ref<Brand>;
153
+ }).data satisfies Ref<Brand>
146
154
 
147
155
  useBrand({
148
156
  params: { brandId: 1 },
149
157
  options: {
150
158
  transform: (brand) => brand.slug,
151
159
  },
152
- }).data satisfies Ref<Brand>;
160
+ }).data satisfies Ref<Brand>
153
161
 
154
162
  useBrand({
155
163
  params: { brandId: 1 },
156
164
  options: {
157
- default: () => "Brand not found",
165
+ default: () => 'Brand not found',
158
166
  },
159
- }).data satisfies Ref<Brand>;
167
+ }).data satisfies Ref<Brand>
160
168
  ```
161
169
 
162
170
  **In 7.85.0**
@@ -164,28 +172,28 @@ useBrand({
164
172
  ```ts
165
173
  useBrand({
166
174
  params: { brandId: 1 },
167
- }).data satisfies Ref<Brand | null>;
175
+ }).data satisfies Ref<Brand | null>
168
176
 
169
177
  useBrand({
170
178
  params: { brandId: 1 },
171
179
  options: {
172
- pick: ["id", "isActive"],
180
+ pick: ['id', 'isActive'],
173
181
  },
174
- }).data satisfies Ref<Pick<Brand, "id" | "isActive"> | null>;
182
+ }).data satisfies Ref<Pick<Brand, 'id' | 'isActive'> | null>
175
183
 
176
184
  useBrand({
177
185
  params: { brandId: 1 },
178
186
  options: {
179
187
  transform: (brand) => brand.slug,
180
188
  },
181
- }).data satisfies Ref<string | null>;
189
+ }).data satisfies Ref<string | null>
182
190
 
183
191
  useBrand({
184
192
  params: { brandId: 1 },
185
193
  options: {
186
- default: () => "Brand not found",
194
+ default: () => 'Brand not found',
187
195
  },
188
- }).data satisfies Ref<Brand | string>;
196
+ }).data satisfies Ref<Brand | string>
189
197
  ```
190
198
 
191
199
  For more details on `useAsyncData` usage check out the [Nuxt Docs](https://nuxt.com/docs/api/composables/use-async-data)
@@ -219,7 +227,8 @@ For more details on `useAsyncData` usage check out the [Nuxt Docs](https://nuxt.
219
227
 
220
228
  ### Patch Changes
221
229
 
222
- - - Updated dependencies
230
+ -
231
+ - Updated dependencies
223
232
  - @scayle/storefront-core@7.64.0
224
233
 
225
234
  ## 7.84.2
@@ -344,27 +353,27 @@ For more details on `useAsyncData` usage check out the [Nuxt Docs](https://nuxt.
344
353
  Hooks can be registered by adding a nitro plugin inside ´server/plugins/´:
345
354
 
346
355
  ```ts
347
- import { defineNitroPlugin } from "#imports";
356
+ import { defineNitroPlugin } from '#imports'
348
357
 
349
358
  export default defineNitroPlugin((nitroApp) => {
350
- nitroApp.hooks.hook("storefront:rpc:before", (rpcName, rpcContext) => {
351
- rpcContext.log.debug(`Before: ${rpcName}`);
352
- });
359
+ nitroApp.hooks.hook('storefront:rpc:before', (rpcName, rpcContext) => {
360
+ rpcContext.log.debug(`Before: ${rpcName}`)
361
+ })
353
362
 
354
363
  nitroApp.hooks.hook(
355
- "storefront:rpc:after",
364
+ 'storefront:rpc:after',
356
365
  (rpcName, rpcContext, result) => {
357
- rpcContext.log.debug(`After: ${rpcName} returned ${result}`);
358
- }
359
- );
366
+ rpcContext.log.debug(`After: ${rpcName} returned ${result}`)
367
+ },
368
+ )
360
369
 
361
370
  nitroApp.hooks.hook(
362
- "storefront:rpc:error",
371
+ 'storefront:rpc:error',
363
372
  (rpcName, rpcContext, error) => {
364
- rpcContext.log.error(`ERROR: ${rpcName} did throw ${error}`);
365
- }
366
- );
367
- });
373
+ rpcContext.log.error(`ERROR: ${rpcName} did throw ${error}`)
374
+ },
375
+ )
376
+ })
368
377
  ```
369
378
 
370
379
  Added [`callHook`](https://github.com/unjs/hookable?tab=readme-ov-file#async-callhook-name-args), `callHookParallel` and [`callHookWith`](https://github.com/unjs/hookable?tab=readme-ov-file#callhookwith-name-callerfn) to `RpcContext` to allow triggering hooks within RPCs
@@ -632,20 +641,20 @@ For more details on `useAsyncData` usage check out the [Nuxt Docs](https://nuxt.
632
641
  - It is now also possible to extend the RPCContext using the `storefront:context:created` nitro runtime hook.
633
642
 
634
643
  ```ts
635
- import { defineNitroPlugin } from "nitropack/runtime/plugin";
644
+ import { defineNitroPlugin } from 'nitropack/runtime/plugin'
636
645
  // Augment RpxContext type
637
- declare module "@scayle/storefront-nuxt" {
646
+ declare module '@scayle/storefront-nuxt' {
638
647
  interface AdditionalRpcContext {
639
- myNewProp: string;
648
+ myNewProp: string
640
649
  }
641
650
  }
642
651
 
643
652
  // Set new value on rpcContext
644
653
  export default defineNitroPlugin((nitroApp) => {
645
- nitroApp.hooks.hook("storefront:context:created", (rpcContext) => {
646
- rpcContext.myNewProp = "My campaign key";
647
- });
648
- });
654
+ nitroApp.hooks.hook('storefront:context:created', (rpcContext) => {
655
+ rpcContext.myNewProp = 'My campaign key'
656
+ })
657
+ })
649
658
  ```
650
659
 
651
660
  ### Patch Changes
@@ -848,8 +857,8 @@ For more details on `useAsyncData` usage check out the [Nuxt Docs](https://nuxt.
848
857
 
849
858
  ```ts
850
859
  const { data: externalIDPRedirects } = await useIDP({
851
- queryParams: { redirectTo: "/account" },
852
- });
860
+ queryParams: { redirectTo: '/account' },
861
+ })
853
862
  ```
854
863
 
855
864
  Please note that `code` and `state` are not supported as these are used by the SCAYLE Authentication API.
@@ -1268,16 +1277,16 @@ There is an `unwrap` function exported by this package (>=7.55.0) that can be us
1268
1277
  Before:
1269
1278
 
1270
1279
  ```typescript
1271
- toCurrency(100, { currency: "EUR" });
1272
- formatPrice(100, { currencyFractionDigits: 2 });
1280
+ toCurrency(100, { currency: 'EUR' })
1281
+ formatPrice(100, { currencyFractionDigits: 2 })
1273
1282
  ```
1274
1283
 
1275
1284
  After:
1276
1285
 
1277
1286
  ```typescript
1278
- const { formatCurrency } = useFormatHelpers();
1279
- formatCurrency(100, { currency: "EUR" });
1280
- formatCurrency(100, { style: "decimal", currencyFractionDigits: 2 });
1287
+ const { formatCurrency } = useFormatHelpers()
1288
+ formatCurrency(100, { currency: 'EUR' })
1289
+ formatCurrency(100, { style: 'decimal', currencyFractionDigits: 2 })
1281
1290
  ```
1282
1291
 
1283
1292
  ## 7.44.1
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
- "version": "7.85.15",
3
+ "version": "7.85.16",
4
4
  "configKey": "storefront",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.9.0"
package/dist/module.mjs CHANGED
@@ -48,7 +48,7 @@ export default {
48
48
  }`;
49
49
  }
50
50
  const PACKAGE_NAME = "@scayle/storefront-nuxt";
51
- const PACKAGE_VERSION = "7.85.15";
51
+ const PACKAGE_VERSION = "7.85.16";
52
52
  const logger = createConsola({
53
53
  fancy: true,
54
54
  formatOptions: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "7.85.15",
4
+ "version": "7.85.16",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -61,7 +61,7 @@
61
61
  "@nuxt/kit": "^3.12.2",
62
62
  "@opentelemetry/api": "^1.9.0",
63
63
  "@scayle/h3-session": "^0.4.1",
64
- "@scayle/storefront-core": "7.65.7",
64
+ "@scayle/storefront-core": "7.65.8",
65
65
  "@scayle/unstorage-compression-driver": "^0.1.4",
66
66
  "@vueuse/core": "11.1.0",
67
67
  "consola": "^3.2.3",