nextemos 5.4.1 → 5.4.2

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.
@@ -35,6 +35,7 @@ export declare const defaultConfig: {
35
35
  SHOPPING_CART: string;
36
36
  STOCK: string;
37
37
  CORE: string;
38
+ COUPON: string;
38
39
  };
39
40
  };
40
41
  declare const _default: typeof defaultConfig;
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.defaultConfig = void 0;
7
+ const lodash_merge_1 = __importDefault(require("lodash.merge"));
4
8
  exports.defaultConfig = {
5
9
  API_URL: "",
6
10
  USE_API_URL: true,
@@ -38,6 +42,7 @@ exports.defaultConfig = {
38
42
  SHOPPING_CART: "shoppingcartgateway",
39
43
  STOCK: "stock",
40
44
  CORE: "core",
45
+ COUPON: "coupongateway",
41
46
  },
42
47
  };
43
48
  // Try to read the config file synchronously at build time
@@ -51,7 +56,7 @@ catch (error) {
51
56
  loadedConfig = exports.defaultConfig;
52
57
  }
53
58
  // Merge with default config to ensure all required fields exist
54
- const NEXTEMOS_CONFIG = Object.assign(Object.assign({}, exports.defaultConfig), loadedConfig);
59
+ const NEXTEMOS_CONFIG = (0, lodash_merge_1.default)({}, exports.defaultConfig, loadedConfig);
55
60
  if (process.env.KEYCLOAK_CLIENT_SECRET) {
56
61
  NEXTEMOS_CONFIG.KEYCLOAK.CLIENT_SECRET = process.env.KEYCLOAK_CLIENT_SECRET;
57
62
  }
@@ -42,7 +42,7 @@ const getConfigs_1 = __importDefault(require("../../helpers/getConfigs"));
42
42
  const { K8S_NAMESPACE, K8S_SERVICE_NAMES } = getConfigs_1.default;
43
43
  exports.CouponService = {
44
44
  Namespace: K8S_NAMESPACE,
45
- ServiceUrl: () => `http://${K8S_SERVICE_NAMES.CORE}.${exports.CouponService.Namespace}.svc.cluster.local`,
45
+ ServiceUrl: () => `http://${K8S_SERVICE_NAMES.COUPON}.${exports.CouponService.Namespace}.svc.cluster.local`,
46
46
  Prefix: "/api/coupongateway",
47
47
  Url: (methodName, options, language) => (0, urls_1.getUrl)({
48
48
  serviceUrl: exports.CouponService.ServiceUrl(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "5.4.1",
3
+ "version": "5.4.2",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -26,6 +26,7 @@
26
26
  "author": "PROJE-INC",
27
27
  "license": "ISC",
28
28
  "devDependencies": {
29
+ "@types/lodash.merge": "^4.6.9",
29
30
  "@types/node": "^20.14.2",
30
31
  "rimraf": "^5.0.7",
31
32
  "typescript": "^5.4.5"
@@ -39,6 +40,7 @@
39
40
  "nextemos"
40
41
  ],
41
42
  "dependencies": {
42
- "html-entities": "^2.5.2"
43
+ "html-entities": "^2.5.2",
44
+ "lodash.merge": "^4.6.2"
43
45
  }
44
46
  }