sales-frontend-utils 0.0.36 → 0.0.37

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/index.cjs CHANGED
@@ -217,6 +217,25 @@ var getDspApiBasePathFromEnvironment = (serviceCodeTo, hostname) => {
217
217
  return "";
218
218
  }
219
219
  };
220
+ var getNlcHostFromEnvironment = (hostname) => {
221
+ if (!isClient()) {
222
+ return "";
223
+ }
224
+ const environment = getEnvironmentFromHostname(hostname || location.hostname);
225
+ switch (environment) {
226
+ case "local":
227
+ return `https://nxl-nlc-stg.hanwhalife.com`;
228
+ case "dev":
229
+ return `https://nxl-nlc-dev.hanwhalife.com`;
230
+ case "stg":
231
+ return `https://nxl-nlc-stg.hanwhalife.com`;
232
+ case "prd":
233
+ return `https://nxl-nlc.hanwhalife.com`;
234
+ default:
235
+ console.warn("NLC environment is not defined");
236
+ return "";
237
+ }
238
+ };
220
239
 
221
240
  // src/utils/user-agent-utils.ts
222
241
  var getDspExecutionEnvironment = () => {
@@ -853,6 +872,7 @@ exports.getE2EDataIDs = getE2EDataIDs;
853
872
  exports.getEnvironmentFromHostname = getEnvironmentFromHostname;
854
873
  exports.getExt = getExt;
855
874
  exports.getFormFactorFromUserAgent = getFormFactorFromUserAgent;
875
+ exports.getNlcHostFromEnvironment = getNlcHostFromEnvironment;
856
876
  exports.getOSName = getOSName;
857
877
  exports.getOSVersion = getOSVersion;
858
878
  exports.getOrCreateDeviceId = getOrCreateDeviceId;