@ikas/storefront-next 4.0.0-alpha.26 → 4.0.0-alpha.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront-next",
3
- "version": "4.0.0-alpha.26",
3
+ "version": "4.0.0-alpha.28",
4
4
  "description": "Next.js specific functions for ikas storefront themes.",
5
5
  "author": "Umut Ozan Yıldırım",
6
6
  "license": "ISC",
@@ -16,24 +16,24 @@
16
16
  "build": "rm -rf build && rollup -c"
17
17
  },
18
18
  "peerDependencies": {
19
- "next": "12.0.7",
20
- "@ikas/storefront-config": "^4.0.0-alpha.26",
21
- "@ikas/storefront-providers": "^4.0.0-alpha.26",
22
- "@ikas/storefront-models": "^4.0.0-alpha.26",
23
- "@ikas/storefront-api": "^4.0.0-alpha.26",
24
- "@ikas/storefront-assets": "^4.0.0-alpha.26",
19
+ "next": "12.2.0",
20
+ "@ikas/storefront-config": "^4.0.0-alpha.28",
21
+ "@ikas/storefront-providers": "^4.0.0-alpha.28",
22
+ "@ikas/storefront-models": "^4.0.0-alpha.28",
23
+ "@ikas/storefront-api": "^4.0.0-alpha.28",
24
+ "@ikas/storefront-assets": "^4.0.0-alpha.28",
25
25
  "axios": "^0.21.0",
26
26
  "lodash": "^4.17.21",
27
27
  "archiver": "^5.3.0",
28
28
  "cors": "^2.8.5"
29
29
  },
30
30
  "devDependencies": {
31
- "@ikas/storefront-cmd": "^4.0.0-alpha.26",
32
- "@ikas/storefront-config": "^4.0.0-alpha.26",
33
- "@ikas/storefront-providers": "^4.0.0-alpha.26",
34
- "@ikas/storefront-models": "^4.0.0-alpha.26",
35
- "@ikas/storefront-api": "^4.0.0-alpha.26",
36
- "@ikas/storefront-assets": "^4.0.0-alpha.26",
31
+ "@ikas/storefront-cmd": "^4.0.0-alpha.28",
32
+ "@ikas/storefront-config": "^4.0.0-alpha.28",
33
+ "@ikas/storefront-providers": "^4.0.0-alpha.28",
34
+ "@ikas/storefront-models": "^4.0.0-alpha.28",
35
+ "@ikas/storefront-api": "^4.0.0-alpha.28",
36
+ "@ikas/storefront-assets": "^4.0.0-alpha.28",
37
37
  "@rollup/plugin-node-resolve": "^13.3.0",
38
38
  "@rollup/plugin-commonjs": "^22.0.0",
39
39
  "@rollup/plugin-json": "^4.1.0",
@@ -42,7 +42,7 @@
42
42
  "@types/node-fetch": "^2.5.7",
43
43
  "@types/cors": "^2.8.9",
44
44
  "@types/lodash": "^4.14.168",
45
- "next": "12.0.7",
45
+ "next": "12.2.0",
46
46
  "prettier": "^2.2.1",
47
47
  "rollup": "^2.75.6",
48
48
  "rollup-plugin-terser": "^7.0.2",
@@ -21,7 +21,7 @@ import { IkasStorefrontConfig } from "@ikas/storefront-config";
21
21
  import {
22
22
  listCheckoutSettings,
23
23
  listMerchantSettings,
24
- IkasAPIClientConfig,
24
+ setAPIClientConfig,
25
25
  getStorefrontSettings,
26
26
  IkasStorefrontSettings,
27
27
  } from "@ikas/storefront-api";
@@ -98,19 +98,6 @@ export class IkasNextPageDataProvider {
98
98
  } catch {}
99
99
  }
100
100
 
101
- static setAPIClientConfig() {
102
- IkasAPIClientConfig.URL = IkasStorefrontConfig.getApiUrl() || "";
103
- IkasAPIClientConfig.HEADERS = {
104
- "x-api-key": IkasStorefrontConfig.getApiKey() || "",
105
- "x-sfid": IkasStorefrontConfig.getStorefrontId() || "",
106
- "x-sfrid": IkasStorefrontConfig.getStorefrontRoutingId() || "",
107
- };
108
-
109
- if (IkasStorefrontConfig.getCustomerToken()) {
110
- IkasAPIClientConfig.TOKEN = IkasStorefrontConfig.getCustomerToken() || "";
111
- }
112
- }
113
-
114
101
  static async getLocalSettings(locale: string): Promise<SettingsData | null> {
115
102
  let settings: IkasStorefrontSettings =
116
103
  await IkasNextPageDataProvider.readLocalSettingsFile();
@@ -448,13 +435,12 @@ export class IkasNextPageDataProvider {
448
435
  const isLocal = process.env.NEXT_PUBLIC_ENV === "local";
449
436
  const isProdEditor = !isLocal && isEditor;
450
437
 
451
- IkasNextPageDataProvider.setAPIClientConfig();
452
-
453
438
  IkasStorefrontConfig.init({
454
439
  apiUrl: process.env.NEXT_PUBLIC_GQL_URL,
455
440
  adminApiUrl: process.env.NEXT_PUBLIC_UPLOAD_GQL_URL,
456
441
  cdnUrl: process.env.NEXT_PUBLIC_IMG_BASE_URL,
457
442
  });
443
+ setAPIClientConfig();
458
444
 
459
445
  // Local editor - prod deploy - local build
460
446
  if (!isProdEditor) {