@scayle/storefront-nuxt 8.21.0 → 8.23.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.
- package/CHANGELOG.md +43 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/api/rpcHandler.js +2 -2
- package/dist/runtime/handler.d.ts +1 -1
- package/dist/runtime/handler.js +1 -1
- package/dist/runtime/nitro/plugins/cacheRuntimeConfig.js +7 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 8.23.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix an issue where the `runtimeConfig` caching plugin returned a [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) `runtimeConfig` object. The behavior should now match that of the `runtimeConfig` which is generated for each request and should ensure compatibility with any code which depends on modifying the `runtimeConfig` during a request.
|
|
8
|
+
|
|
9
|
+
**Dependencies**
|
|
10
|
+
|
|
11
|
+
**@scayle/storefront-core v8.23.0**
|
|
12
|
+
|
|
13
|
+
- Minor
|
|
14
|
+
|
|
15
|
+
- Deprecated attribute group specific utilities `getFlattenedVariantCrosssellings` and
|
|
16
|
+
`getFlattenedMaterialComposition`.
|
|
17
|
+
|
|
18
|
+
These functions should be a part of the Storefront application.
|
|
19
|
+
|
|
20
|
+
## 8.22.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- The `useIDP` composable supports the `authUrlParameters` option for `getExternalIdpRedirects`. Values provided here will be processed by the Auth service and appended to the IDP URL.
|
|
25
|
+
|
|
26
|
+
Example:
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
const idp = useIDP({
|
|
30
|
+
authUrlParameters: {
|
|
31
|
+
theme: 'dark',
|
|
32
|
+
},
|
|
33
|
+
})
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
**Dependencies**
|
|
39
|
+
|
|
40
|
+
**@scayle/storefront-core v8.22.0**
|
|
41
|
+
|
|
42
|
+
- Minor
|
|
43
|
+
- Allow passing `authUrlParameters` to the `getExternalIdpRedirect` RPC method. This parameter is an optional `Record<string, string>`. Values provided here will be processed by the Auth service and appended to the final redirect URL.
|
|
44
|
+
- Exported the `ShopCountryCustomData` interface.
|
|
45
|
+
|
|
3
46
|
## 8.21.0
|
|
4
47
|
|
|
5
48
|
### Patch Changes
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineEventHandler, readBody, createError, getRequestURL } from "h3";
|
|
2
2
|
import { purifySensitiveData, HttpStatusCode } from "@scayle/storefront-core";
|
|
3
3
|
import { trace, SpanStatusCode } from "@opentelemetry/api";
|
|
4
|
-
import {
|
|
4
|
+
import { invokeRpc } from "../handler.js";
|
|
5
5
|
import { resolveError } from "../error/handler.js";
|
|
6
6
|
import { useNitroApp } from "nitropack/runtime";
|
|
7
7
|
export default defineEventHandler(async (event) => {
|
|
@@ -50,7 +50,7 @@ export default defineEventHandler(async (event) => {
|
|
|
50
50
|
$rpcContext,
|
|
51
51
|
body?.payload
|
|
52
52
|
);
|
|
53
|
-
result = await
|
|
53
|
+
result = await invokeRpc(method, body?.payload, $rpcContext);
|
|
54
54
|
await nitroApp.hooks.callHook(
|
|
55
55
|
"storefront:rpc:after",
|
|
56
56
|
method,
|
|
@@ -19,4 +19,4 @@ import type { RpcContext, RpcMethodName, RpcMethodParameters, RpcMethodReturnTyp
|
|
|
19
19
|
*
|
|
20
20
|
* @throws {Error} If the specified RPC method is not found.
|
|
21
21
|
*/
|
|
22
|
-
export declare const
|
|
22
|
+
export declare const invokeRpc: <N extends RpcMethodName, P extends RpcMethodParameters<N>, TResult extends Awaited<RpcMethodReturnType<N>>, TakesParameters = P extends RpcContext ? undefined : boolean, TParams = TakesParameters extends undefined ? null : P>(method: N, payload: TParams, rpcContext: RpcContext) => Promise<TResult | Response>;
|
package/dist/runtime/handler.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { rpcMethods as coreRpcMethods } from "@scayle/storefront-core";
|
|
2
2
|
import * as storefrontRpcMethods from "#virtual/customRpcMethods";
|
|
3
|
-
export const
|
|
3
|
+
export const invokeRpc = async (method, payload, rpcContext) => {
|
|
4
4
|
const rpcMethods = {
|
|
5
5
|
...coreRpcMethods,
|
|
6
6
|
...storefrontRpcMethods
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { defineNitroPlugin } from "nitropack/runtime/plugin";
|
|
2
2
|
import { useRuntimeConfig } from "#imports";
|
|
3
3
|
export default defineNitroPlugin((nitroApp) => {
|
|
4
|
-
|
|
4
|
+
let runtimeConfig;
|
|
5
5
|
nitroApp.hooks.hook("request", (event) => {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
if (runtimeConfig) {
|
|
7
|
+
event.context.nitro = event.context.nitro ?? {};
|
|
8
|
+
event.context.nitro.runtimeConfig = runtimeConfig;
|
|
9
|
+
} else {
|
|
10
|
+
runtimeConfig = useRuntimeConfig(event);
|
|
11
|
+
}
|
|
8
12
|
});
|
|
9
13
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.23.0",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@opentelemetry/api": "^1.9.0",
|
|
84
84
|
"@scayle/h3-session": "0.6.0",
|
|
85
|
-
"@scayle/storefront-core": "8.
|
|
85
|
+
"@scayle/storefront-core": "8.23.0",
|
|
86
86
|
"@scayle/unstorage-compression-driver": "^0.2.6",
|
|
87
87
|
"@vercel/nft": "0.29.2",
|
|
88
88
|
"@vueuse/core": "13.1.0",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"publint": "0.2.12",
|
|
124
124
|
"typescript": "5.8.3",
|
|
125
125
|
"unbuild": "2.0.0",
|
|
126
|
-
"vitest": "
|
|
126
|
+
"vitest": "3.1.1",
|
|
127
127
|
"vue-tsc": "2.2.8"
|
|
128
128
|
},
|
|
129
129
|
"peerDependencies": {
|