@commercengine/storefront-sdk-nextjs 0.1.8 → 0.1.10
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/dist/{client.d.ts → client-TT6pm_na.d.ts} +1 -1
- package/dist/client.js +1 -2
- package/dist/{index.d.ts → index-BK7lc0Kh.d.ts} +1 -1
- package/dist/index.js +1 -1
- package/dist/{sdk-manager-B9xDQQuv.d.ts → sdk-manager-B_Hed0Xr.d.ts} +1 -1
- package/dist/{sdk-manager-BTDodUFt.js → sdk-manager-CoEieWjw.js} +2 -5
- package/dist/{server.d.ts → server-BZSiN_HH.d.ts} +1 -1
- package/dist/server.js +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClientTokenStorage,
|
|
1
|
+
import { a as ClientTokenStorage, i as initializeStorefrontSDK, n as StorefrontRuntimeConfig, o as NextJSTokenStorageOptions, r as getStorefrontSDK, t as NextJSSDKConfig } from "./sdk-manager-B_Hed0Xr.js";
|
|
2
2
|
import { AuthClient, BrowserTokenStorage, CartClient, CatalogClient, CookieTokenStorage, CustomerClient, Environment, HelpersClient, MemoryTokenStorage, OrderClient, ResponseUtils, ShippingClient, StoreConfigClient, StorefrontAPIClient, StorefrontSDK, StorefrontSDKOptions, TokenStorage } from "@commercengine/storefront-sdk";
|
|
3
3
|
|
|
4
4
|
//#region src/init-client.d.ts
|
package/dist/client.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import { ClientTokenStorage, getStorefrontSDK, initializeStorefrontSDK } from "./sdk-manager-BTDodUFt.js";
|
|
3
|
+
import { i as ClientTokenStorage, n as initializeStorefrontSDK, t as getStorefrontSDK } from "./sdk-manager-CoEieWjw.js";
|
|
5
4
|
import { useEffect } from "react";
|
|
6
5
|
import { AuthClient, BrowserTokenStorage, CartClient, CatalogClient, CookieTokenStorage, CustomerClient, Environment, HelpersClient, MemoryTokenStorage, OrderClient, ResponseUtils, ShippingClient, StoreConfigClient, StorefrontAPIClient, StorefrontSDK } from "@commercengine/storefront-sdk";
|
|
7
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StorefrontRuntimeConfig } from "./sdk-manager-
|
|
1
|
+
import { n as StorefrontRuntimeConfig } from "./sdk-manager-B_Hed0Xr.js";
|
|
2
2
|
import { AuthClient, BrowserTokenStorage, CartClient, CatalogClient, CookieTokenStorage, CustomerClient, Environment, HelpersClient, MemoryTokenStorage, OrderClient, ResponseUtils, ShippingClient, StoreConfigClient, StorefrontAPIClient, StorefrontSDK, StorefrontSDK as StorefrontSDK$1 } from "@commercengine/storefront-sdk";
|
|
3
3
|
export * from "@commercengine/storefront-sdk";
|
|
4
4
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as setGlobalStorefrontConfig, t as getStorefrontSDK } from "./sdk-manager-CoEieWjw.js";
|
|
2
2
|
import { AuthClient, BrowserTokenStorage, CartClient, CatalogClient, CookieTokenStorage, CustomerClient, Environment, HelpersClient, MemoryTokenStorage, OrderClient, ResponseUtils, ShippingClient, StoreConfigClient, StorefrontAPIClient, StorefrontSDK } from "@commercengine/storefront-sdk";
|
|
3
3
|
|
|
4
4
|
//#region src/create-storefront.ts
|
|
@@ -137,4 +137,4 @@ declare function getStorefrontSDK(cookieStore: NextCookieStore): StorefrontSDK;
|
|
|
137
137
|
*/
|
|
138
138
|
declare function initializeStorefrontSDK(): void;
|
|
139
139
|
//#endregion
|
|
140
|
-
export { ClientTokenStorage
|
|
140
|
+
export { ClientTokenStorage as a, initializeStorefrontSDK as i, StorefrontRuntimeConfig as n, NextJSTokenStorageOptions as o, getStorefrontSDK as r, ServerTokenStorage as s, NextJSSDKConfig as t };
|
|
@@ -283,10 +283,7 @@ let clientSDK = null;
|
|
|
283
283
|
function createTokenStorage(cookieStore, options, config) {
|
|
284
284
|
if (typeof window !== "undefined") return new ClientTokenStorage(options);
|
|
285
285
|
if (cookieStore) return new ServerTokenStorage(cookieStore, options);
|
|
286
|
-
if (process.env.NEXT_BUILD_CACHE_TOKENS === "true" && config) {
|
|
287
|
-
const cacheKey = `${config.storeId}:${config.environment || "production"}`;
|
|
288
|
-
return new BuildCachingMemoryTokenStorage(cacheKey);
|
|
289
|
-
}
|
|
286
|
+
if (process.env.NEXT_BUILD_CACHE_TOKENS === "true" && config) return new BuildCachingMemoryTokenStorage(`${config.storeId}:${config.environment || "production"}`);
|
|
290
287
|
return new MemoryTokenStorage();
|
|
291
288
|
}
|
|
292
289
|
/**
|
|
@@ -343,4 +340,4 @@ function initializeStorefrontSDK() {
|
|
|
343
340
|
}
|
|
344
341
|
|
|
345
342
|
//#endregion
|
|
346
|
-
export {
|
|
343
|
+
export { ServerTokenStorage as a, ClientTokenStorage as i, initializeStorefrontSDK as n, setGlobalStorefrontConfig as r, getStorefrontSDK as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as initializeStorefrontSDK, o as NextJSTokenStorageOptions, r as getStorefrontSDK, s as ServerTokenStorage, t as NextJSSDKConfig } from "./sdk-manager-B_Hed0Xr.js";
|
|
2
2
|
import { AuthClient, BrowserTokenStorage, CartClient, CatalogClient, CookieTokenStorage, CustomerClient, Environment, HelpersClient, MemoryTokenStorage, OrderClient, ResponseUtils, ShippingClient, StoreConfigClient, StorefrontAPIClient, StorefrontSDK } from "@commercengine/storefront-sdk";
|
|
3
3
|
export * from "@commercengine/storefront-sdk";
|
|
4
4
|
export { AuthClient, BrowserTokenStorage, CartClient, CatalogClient, CookieTokenStorage, CustomerClient, Environment, HelpersClient, MemoryTokenStorage, type NextJSSDKConfig, type NextJSTokenStorageOptions, OrderClient, ResponseUtils, ServerTokenStorage, ShippingClient, StoreConfigClient, StorefrontAPIClient, StorefrontSDK, getStorefrontSDK, initializeStorefrontSDK };
|
package/dist/server.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServerTokenStorage,
|
|
1
|
+
import { a as ServerTokenStorage, n as initializeStorefrontSDK, t as getStorefrontSDK } from "./sdk-manager-CoEieWjw.js";
|
|
2
2
|
import { AuthClient, BrowserTokenStorage, CartClient, CatalogClient, CookieTokenStorage, CustomerClient, Environment, HelpersClient, MemoryTokenStorage, OrderClient, ResponseUtils, ShippingClient, StoreConfigClient, StorefrontAPIClient, StorefrontSDK } from "@commercengine/storefront-sdk";
|
|
3
3
|
|
|
4
4
|
export * from "@commercengine/storefront-sdk"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercengine/storefront-sdk-nextjs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Next.js wrapper for the Commerce Engine Storefront SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"react-dom": ">=19.0.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@commercengine/storefront-sdk": "0.
|
|
46
|
+
"@commercengine/storefront-sdk": "0.11.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^24.3.0",
|