@adstage/web-sdk 2.4.10 → 2.4.11
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.js +8 -1
- package/dist/index.esm.js +8 -1
- package/dist/index.standalone.js +8 -1
- package/package.json +1 -1
- package/src/constants/endpoints.ts +3 -3
- package/src/core/AdStage.ts +9 -0
package/dist/index.cjs.js
CHANGED
|
@@ -911,7 +911,7 @@ class EndpointBuilder {
|
|
|
911
911
|
batch: () => `${this.baseUrl}${API_PATHS.events.batch}`
|
|
912
912
|
};
|
|
913
913
|
// 기본값은 베타 환경 사용
|
|
914
|
-
this.baseUrl = baseUrl || API_ENDPOINTS.
|
|
914
|
+
this.baseUrl = baseUrl || API_ENDPOINTS.production;
|
|
915
915
|
}
|
|
916
916
|
/**
|
|
917
917
|
* 기본 URL 변경
|
|
@@ -3324,6 +3324,13 @@ class AdStage {
|
|
|
3324
3324
|
productionMode: false,
|
|
3325
3325
|
...config
|
|
3326
3326
|
};
|
|
3327
|
+
// 🔧 baseUrl이 설정된 경우 전역 endpoints 객체 업데이트
|
|
3328
|
+
if (instance._config.baseUrl) {
|
|
3329
|
+
endpoints.setBaseUrl(instance._config.baseUrl);
|
|
3330
|
+
if (config.debug) {
|
|
3331
|
+
console.log('🌐 API endpoint configured:', instance._config.baseUrl);
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3327
3334
|
// 모듈 동기 초기화
|
|
3328
3335
|
const enabledModules = instance._config.modules || ['ads', 'events', 'config'];
|
|
3329
3336
|
for (const moduleName of enabledModules) {
|
package/dist/index.esm.js
CHANGED
|
@@ -909,7 +909,7 @@ class EndpointBuilder {
|
|
|
909
909
|
batch: () => `${this.baseUrl}${API_PATHS.events.batch}`
|
|
910
910
|
};
|
|
911
911
|
// 기본값은 베타 환경 사용
|
|
912
|
-
this.baseUrl = baseUrl || API_ENDPOINTS.
|
|
912
|
+
this.baseUrl = baseUrl || API_ENDPOINTS.production;
|
|
913
913
|
}
|
|
914
914
|
/**
|
|
915
915
|
* 기본 URL 변경
|
|
@@ -3322,6 +3322,13 @@ class AdStage {
|
|
|
3322
3322
|
productionMode: false,
|
|
3323
3323
|
...config
|
|
3324
3324
|
};
|
|
3325
|
+
// 🔧 baseUrl이 설정된 경우 전역 endpoints 객체 업데이트
|
|
3326
|
+
if (instance._config.baseUrl) {
|
|
3327
|
+
endpoints.setBaseUrl(instance._config.baseUrl);
|
|
3328
|
+
if (config.debug) {
|
|
3329
|
+
console.log('🌐 API endpoint configured:', instance._config.baseUrl);
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3325
3332
|
// 모듈 동기 초기화
|
|
3326
3333
|
const enabledModules = instance._config.modules || ['ads', 'events', 'config'];
|
|
3327
3334
|
for (const moduleName of enabledModules) {
|
package/dist/index.standalone.js
CHANGED
|
@@ -906,7 +906,7 @@ class EndpointBuilder {
|
|
|
906
906
|
batch: () => `${this.baseUrl}${API_PATHS.events.batch}`
|
|
907
907
|
};
|
|
908
908
|
// 기본값은 베타 환경 사용
|
|
909
|
-
this.baseUrl = baseUrl || API_ENDPOINTS.
|
|
909
|
+
this.baseUrl = baseUrl || API_ENDPOINTS.production;
|
|
910
910
|
}
|
|
911
911
|
/**
|
|
912
912
|
* 기본 URL 변경
|
|
@@ -3319,6 +3319,13 @@ class AdStage {
|
|
|
3319
3319
|
productionMode: false,
|
|
3320
3320
|
...config
|
|
3321
3321
|
};
|
|
3322
|
+
// 🔧 baseUrl이 설정된 경우 전역 endpoints 객체 업데이트
|
|
3323
|
+
if (instance._config.baseUrl) {
|
|
3324
|
+
endpoints.setBaseUrl(instance._config.baseUrl);
|
|
3325
|
+
if (config.debug) {
|
|
3326
|
+
console.log('🌐 API endpoint configured:', instance._config.baseUrl);
|
|
3327
|
+
}
|
|
3328
|
+
}
|
|
3322
3329
|
// 모듈 동기 초기화
|
|
3323
3330
|
const enabledModules = instance._config.modules || ['ads', 'events', 'config'];
|
|
3324
3331
|
for (const moduleName of enabledModules) {
|
package/package.json
CHANGED
|
@@ -15,9 +15,9 @@ export const API_ENDPOINTS = {
|
|
|
15
15
|
} as const;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* 기본 엔드포인트 (
|
|
18
|
+
* 기본 엔드포인트 (프로덕션 환경)
|
|
19
19
|
*/
|
|
20
|
-
export const DEFAULT_API_ENDPOINT = API_ENDPOINTS.
|
|
20
|
+
export const DEFAULT_API_ENDPOINT = API_ENDPOINTS.production;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* API 경로 상수
|
|
@@ -45,7 +45,7 @@ export class EndpointBuilder {
|
|
|
45
45
|
|
|
46
46
|
constructor(baseUrl?: string) {
|
|
47
47
|
// 기본값은 베타 환경 사용
|
|
48
|
-
this.baseUrl = baseUrl || API_ENDPOINTS.
|
|
48
|
+
this.baseUrl = baseUrl || API_ENDPOINTS.production;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/**
|
package/src/core/AdStage.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { AdStageConfig, ModuleName } from '../types/config';
|
|
|
7
7
|
import { AdsModule } from '../modules/ads/AdsModule';
|
|
8
8
|
import { ConfigModule } from '../modules/config/ConfigModule';
|
|
9
9
|
import { EventsModule } from '../modules/events/EventsModule';
|
|
10
|
+
import { endpoints } from '../constants/endpoints';
|
|
10
11
|
|
|
11
12
|
export class AdStage {
|
|
12
13
|
private static instance: AdStage;
|
|
@@ -52,6 +53,14 @@ export class AdStage {
|
|
|
52
53
|
...config
|
|
53
54
|
};
|
|
54
55
|
|
|
56
|
+
// 🔧 baseUrl이 설정된 경우 전역 endpoints 객체 업데이트
|
|
57
|
+
if (instance._config.baseUrl) {
|
|
58
|
+
endpoints.setBaseUrl(instance._config.baseUrl);
|
|
59
|
+
if (config.debug) {
|
|
60
|
+
console.log('🌐 API endpoint configured:', instance._config.baseUrl);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
55
64
|
// 모듈 동기 초기화
|
|
56
65
|
const enabledModules = instance._config.modules || ['ads', 'events', 'config'];
|
|
57
66
|
|