sales-frontend-utils 0.0.27 → 0.0.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/dist/index.cjs +23 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -108,6 +108,28 @@ var isStorybookEnv = () => {
|
|
|
108
108
|
var getBusinessWorkDivisionCode = () => {
|
|
109
109
|
return location.pathname.split("/")[1] ?? "";
|
|
110
110
|
};
|
|
111
|
+
var getDudApiHostNameFromEnvironment = (serviceCode, hostname) => {
|
|
112
|
+
const environment = getEnvironmentFromHostname(hostname);
|
|
113
|
+
switch (environment) {
|
|
114
|
+
/**
|
|
115
|
+
* local에서 호출시, rewrite동작을 위해 상대주소를 호출합니다.
|
|
116
|
+
* (cors이슈 해결을 위해 필수)
|
|
117
|
+
*/
|
|
118
|
+
case "local":
|
|
119
|
+
return `${serviceCode}/api/dud`;
|
|
120
|
+
/**
|
|
121
|
+
* local 이 아닌 환경에서는 전체주소를 호출합니다.
|
|
122
|
+
*/
|
|
123
|
+
case "dev":
|
|
124
|
+
return `https://dsp-dud-dev.hanwhalife.com:10101`;
|
|
125
|
+
case "stg":
|
|
126
|
+
return `https://dsp-dud-stg.hanwhalife.com:10102`;
|
|
127
|
+
case "prd":
|
|
128
|
+
return `https://dsp-dud.hanwhalife.com`;
|
|
129
|
+
default:
|
|
130
|
+
return "";
|
|
131
|
+
}
|
|
132
|
+
};
|
|
111
133
|
|
|
112
134
|
// src/utils/user-agent-utils.ts
|
|
113
135
|
var getDspExecutionEnvironment = () => {
|
|
@@ -762,6 +784,7 @@ exports.getCurrentOSName = getCurrentOSName;
|
|
|
762
784
|
exports.getCurrentOSVersion = getCurrentOSVersion;
|
|
763
785
|
exports.getDeviceModel = getDeviceModel;
|
|
764
786
|
exports.getDspExecutionEnvironment = getDspExecutionEnvironment;
|
|
787
|
+
exports.getDudApiHostNameFromEnvironment = getDudApiHostNameFromEnvironment;
|
|
765
788
|
exports.getE2EDataIDs = getE2EDataIDs;
|
|
766
789
|
exports.getEnvironmentFromHostname = getEnvironmentFromHostname;
|
|
767
790
|
exports.getExt = getExt;
|