@scayle/storefront-nuxt 8.4.0 → 8.5.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/CHANGELOG.md +23 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -1
- package/dist/runtime/api/rpcHandler.d.ts +1 -50
- package/dist/runtime/cached.d.ts +2 -0
- package/dist/runtime/cached.js +10 -0
- package/dist/runtime/composables/storefront/useStorefrontSearch.d.ts +1 -1
- package/dist/runtime/context.js +6 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 8.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependency `@vueuse/core@12.4.0` to `@vueuse/core@12.5.0`
|
|
8
|
+
|
|
9
|
+
**Dependencies**
|
|
10
|
+
|
|
11
|
+
- Updated dependency to @scayle/storefront-core@8.2.1
|
|
12
|
+
|
|
13
|
+
## 8.5.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [Performance] Remove the 'autobinding' of the methods on the `Cached` instance. Instead the `execute` method only is bound when constructing the `RpcContext`. This simplifies the code and improves the performance of the `bootstrap` function. This change is internal to `storefront-core` and the API of `RpcContext` is unchanged.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
**Dependencies**
|
|
22
|
+
|
|
23
|
+
- Updated dependency to @scayle/storefront-core@8.2.0
|
|
24
|
+
- Updated dependency to @scayle/h3-session@0.6.0
|
|
25
|
+
|
|
3
26
|
## 8.4.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -45,7 +45,7 @@ export default {
|
|
|
45
45
|
}`;
|
|
46
46
|
}
|
|
47
47
|
const PACKAGE_NAME = "@scayle/storefront-nuxt";
|
|
48
|
-
const PACKAGE_VERSION = "8.
|
|
48
|
+
const PACKAGE_VERSION = "8.5.1";
|
|
49
49
|
const logger = createConsola({
|
|
50
50
|
fancy: true,
|
|
51
51
|
formatOptions: {
|
|
@@ -220,6 +220,7 @@ Missing RPC Overrides: ${Array.from(overridenRPCMethodNames).map((name) => `'${n
|
|
|
220
220
|
"handler",
|
|
221
221
|
"error/handler",
|
|
222
222
|
"campaignKey",
|
|
223
|
+
"cached",
|
|
223
224
|
"context",
|
|
224
225
|
"createLog",
|
|
225
226
|
"log",
|
|
@@ -1,51 +1,2 @@
|
|
|
1
|
-
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<
|
|
2
|
-
count: number;
|
|
3
|
-
} | {
|
|
4
|
-
filters: import("@scayle/storefront-api").FiltersEndpointResponseData;
|
|
5
|
-
unfilteredCount: number;
|
|
6
|
-
} | {
|
|
7
|
-
products: import("@scayle/storefront-api").Product[];
|
|
8
|
-
pagination: {
|
|
9
|
-
current: number;
|
|
10
|
-
total: number;
|
|
11
|
-
perPage: number;
|
|
12
|
-
page: number;
|
|
13
|
-
first: number;
|
|
14
|
-
prev: number;
|
|
15
|
-
next: number;
|
|
16
|
-
last: number;
|
|
17
|
-
};
|
|
18
|
-
} | {
|
|
19
|
-
basket: import("@scayle/storefront-api").BasketResponseData<import("@scayle/storefront-api").Product, import("@scayle/storefront-api").Variant>;
|
|
20
|
-
} | {
|
|
21
|
-
readonly type: "success";
|
|
22
|
-
readonly basket: import("@scayle/storefront-api").BasketResponseData<import("@scayle/storefront-api").Product, import("@scayle/storefront-api").Variant>;
|
|
23
|
-
} | {
|
|
24
|
-
readonly type: "failure";
|
|
25
|
-
readonly basket: import("@scayle/storefront-api").BasketResponseData<import("@scayle/storefront-api").Product, import("@scayle/storefront-api").Variant>;
|
|
26
|
-
readonly errors: import("@scayle/storefront-api").AddOrUpdateItemError[];
|
|
27
|
-
} | import("@scayle/storefront-api").BrandsEndpointResponseData | import("@scayle/storefront-api").Brand | {
|
|
28
|
-
categories: import("@scayle/storefront-api").Category[];
|
|
29
|
-
activeNode: undefined;
|
|
30
|
-
} | import("@scayle/storefront-api").Category | {
|
|
31
|
-
categories: import("@scayle/storefront-api").Category;
|
|
32
|
-
activeNode: import("@scayle/storefront-api").Category;
|
|
33
|
-
} | import("@scayle/storefront-core").Order | import("@scayle/storefront-api").SearchV2SuggestionsEndpointResponseData | import("@scayle/storefront-api").SearchEntity | import("@scayle/storefront-api").ShopConfiguration | {
|
|
34
|
-
user: import("@scayle/storefront-core").ShopUser | undefined;
|
|
35
|
-
} | import("@scayle/storefront-api").Wishlist | import("@scayle/storefront-core").ShopUserAddress[] | {
|
|
36
|
-
accessToken: string;
|
|
37
|
-
checkoutJwt: string;
|
|
38
|
-
} | import("@scayle/storefront-api").VariantDetail[] | import("@scayle/storefront-api").NavigationAllEndpointResponseData | import("@scayle/storefront-api").NavigationTree | {
|
|
39
|
-
success: true;
|
|
40
|
-
} | {
|
|
41
|
-
success: false;
|
|
42
|
-
} | {
|
|
43
|
-
result: true;
|
|
44
|
-
} | {
|
|
45
|
-
result: false;
|
|
46
|
-
} | import("@scayle/storefront-api").PromotionsEndpointResponseData | {
|
|
47
|
-
[k: string]: string;
|
|
48
|
-
} | {
|
|
49
|
-
message: string;
|
|
50
|
-
} | null | undefined>>;
|
|
1
|
+
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
|
|
51
2
|
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { type Log, type CacheInterface } from '@scayle/storefront-core';
|
|
2
|
+
export declare function getCachedFunction($cache: CacheInterface, $log: Log, enabled: boolean | undefined): <TArgs extends unknown[], TResult>(fn: (...args: TArgs) => Promise<TResult>, options?: import("@scayle/storefront-core").CacheOptions) => Awaited<(...args: TArgs) => Promise<TResult>>;
|
|
@@ -14,5 +14,5 @@ export declare function useStorefrontSearch(searchQuery: Ref<string>, { params }
|
|
|
14
14
|
error: Ref<unknown, unknown>;
|
|
15
15
|
resetSearch: () => void;
|
|
16
16
|
getSearchSuggestions: () => Promise<void>;
|
|
17
|
-
resolveSearch: () => Promise<
|
|
17
|
+
resolveSearch: () => Promise<any>;
|
|
18
18
|
};
|
package/dist/runtime/context.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getRequestIP, getRequestHeaders } from "h3";
|
|
2
2
|
import {
|
|
3
|
-
Cached,
|
|
4
3
|
createAndPurifyHeaders,
|
|
5
4
|
StorefrontAPIClient
|
|
6
5
|
} from "@scayle/storefront-core";
|
|
@@ -10,6 +9,7 @@ import {
|
|
|
10
9
|
} from "@scayle/storefront-core/dist/utils/keys";
|
|
11
10
|
import { useNitroApp } from "nitropack/runtime";
|
|
12
11
|
import { fetchCampaignKey } from "./campaignKey.js";
|
|
12
|
+
import { getCachedFunction } from "./cached.js";
|
|
13
13
|
async function getWishlistKey(appKeys, session, $log, $shopConfig) {
|
|
14
14
|
return session.data.user ? await generateWishlistKey({
|
|
15
15
|
keyTemplate: appKeys.wishlistKey,
|
|
@@ -94,7 +94,11 @@ export const buildContext = async (context) => {
|
|
|
94
94
|
"x-internal-access": $storefront.internalAccessHeader
|
|
95
95
|
} : {}
|
|
96
96
|
});
|
|
97
|
-
const cached =
|
|
97
|
+
const cached = getCachedFunction(
|
|
98
|
+
$cache,
|
|
99
|
+
$log,
|
|
100
|
+
$storefront.cache?.enabled
|
|
101
|
+
);
|
|
98
102
|
const { hooks } = useNitroApp();
|
|
99
103
|
const baseContext = {
|
|
100
104
|
cached,
|
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.5.1",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@opentelemetry/api": "^1.9.0",
|
|
74
|
-
"@scayle/h3-session": "0.
|
|
75
|
-
"@scayle/storefront-core": "8.1
|
|
74
|
+
"@scayle/h3-session": "0.6.0",
|
|
75
|
+
"@scayle/storefront-core": "8.2.1",
|
|
76
76
|
"@scayle/unstorage-compression-driver": "^0.2.3",
|
|
77
|
-
"@vueuse/core": "12.
|
|
77
|
+
"@vueuse/core": "12.5.0",
|
|
78
78
|
"consola": "^3.2.3",
|
|
79
79
|
"core-js": "^3.37.1",
|
|
80
80
|
"defu": "^6.1.4",
|