@ait-co/devtools 0.1.94 → 0.1.96
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/mcp/cli.js +3 -3
- package/dist/mcp/server.js +1 -1
- package/dist/mock/index.d.ts +111 -175
- package/dist/mock/index.d.ts.map +1 -1
- package/dist/mock/index.js +37 -60
- package/dist/mock/index.js.map +1 -1
- package/dist/panel/index.js +51 -54
- package/dist/panel/index.js.map +1 -1
- package/dist/{tunnel-D2G3RuGF.cjs → tunnel-Bsv-Zg5_.cjs} +12 -2
- package/dist/tunnel-Bsv-Zg5_.cjs.map +1 -0
- package/dist/{tunnel-nX6LVnwi.js → tunnel-BxIGQK50.js} +12 -2
- package/dist/tunnel-BxIGQK50.js.map +1 -0
- package/dist/unplugin/index.cjs +6 -2
- package/dist/unplugin/index.cjs.map +1 -1
- package/dist/unplugin/index.d.cts +18 -1
- package/dist/unplugin/index.d.cts.map +1 -1
- package/dist/unplugin/index.d.ts +18 -1
- package/dist/unplugin/index.d.ts.map +1 -1
- package/dist/unplugin/index.js +6 -2
- package/dist/unplugin/index.js.map +1 -1
- package/dist/unplugin/tunnel.cjs +11 -1
- package/dist/unplugin/tunnel.cjs.map +1 -1
- package/dist/unplugin/tunnel.d.cts +36 -0
- package/dist/unplugin/tunnel.d.cts.map +1 -1
- package/dist/unplugin/tunnel.d.ts +36 -0
- package/dist/unplugin/tunnel.d.ts.map +1 -1
- package/dist/unplugin/tunnel.js +11 -1
- package/dist/unplugin/tunnel.js.map +1 -1
- package/package.json +4 -3
- package/dist/tunnel-D2G3RuGF.cjs.map +0 -1
- package/dist/tunnel-nX6LVnwi.js.map +0 -1
package/dist/panel/index.js
CHANGED
|
@@ -26561,7 +26561,7 @@ function readGlobalString(key) {
|
|
|
26561
26561
|
}
|
|
26562
26562
|
const TELEMETRY_ENDPOINT = readGlobalString("__TELEMETRY_ENDPOINT__") ?? "https://t.aitc.dev";
|
|
26563
26563
|
function getVersion() {
|
|
26564
|
-
return "0.1.
|
|
26564
|
+
return "0.1.96";
|
|
26565
26565
|
}
|
|
26566
26566
|
let panelVisibleSince = null;
|
|
26567
26567
|
let accumulatedMs = 0;
|
|
@@ -27050,10 +27050,6 @@ function waitForPromptResponse(type) {
|
|
|
27050
27050
|
//#endregion
|
|
27051
27051
|
//#region src/mock/permissions.ts
|
|
27052
27052
|
/**
|
|
27053
|
-
* 권한 시스템 mock
|
|
27054
|
-
* 각 디바이스 API (.getPermission, .openPermissionDialog)에 부착된다.
|
|
27055
|
-
*/
|
|
27056
|
-
/**
|
|
27057
27053
|
* web-framework 3.0+ 권한 에러 기반 클래스.
|
|
27058
27054
|
* `instanceof PermissionError`로 체크하는 코드와 호환된다.
|
|
27059
27055
|
*/
|
|
@@ -27108,19 +27104,25 @@ const permissionErrorMap = {
|
|
|
27108
27104
|
getClipboardText: GetClipboardTextPermissionError,
|
|
27109
27105
|
setClipboardText: SetClipboardTextPermissionError
|
|
27110
27106
|
};
|
|
27111
|
-
async function getPermission(
|
|
27112
|
-
return aitState.state.permissions[name];
|
|
27107
|
+
async function getPermission(permission) {
|
|
27108
|
+
return aitState.state.permissions[permission.name];
|
|
27113
27109
|
}
|
|
27114
|
-
async function openPermissionDialog(
|
|
27115
|
-
if (aitState.state.permissions[name] === "allowed") return "allowed";
|
|
27116
|
-
aitState.patch("permissions", { [name]: "allowed" });
|
|
27110
|
+
async function openPermissionDialog(permission) {
|
|
27111
|
+
if (aitState.state.permissions[permission.name] === "allowed") return "allowed";
|
|
27112
|
+
aitState.patch("permissions", { [permission.name]: "allowed" });
|
|
27117
27113
|
return "allowed";
|
|
27118
27114
|
}
|
|
27119
27115
|
/** 권한이 필요한 함수에 .getPermission(), .openPermissionDialog()를 부착 */
|
|
27120
27116
|
function withPermission(fn, permissionName) {
|
|
27121
27117
|
const enhanced = fn;
|
|
27122
|
-
enhanced.getPermission = () => getPermission(
|
|
27123
|
-
|
|
27118
|
+
enhanced.getPermission = () => getPermission({
|
|
27119
|
+
name: permissionName,
|
|
27120
|
+
access: "access"
|
|
27121
|
+
});
|
|
27122
|
+
enhanced.openPermissionDialog = () => openPermissionDialog({
|
|
27123
|
+
name: permissionName,
|
|
27124
|
+
access: "access"
|
|
27125
|
+
});
|
|
27124
27126
|
return enhanced;
|
|
27125
27127
|
}
|
|
27126
27128
|
/**
|
|
@@ -27308,7 +27310,8 @@ const _fetchAlbumItems = async (options) => {
|
|
|
27308
27310
|
if (mode === "prompt") return fetchAlbumItemsPrompt(maxCount);
|
|
27309
27311
|
return fetchAlbumItemsMock(maxCount, types);
|
|
27310
27312
|
};
|
|
27311
|
-
withPermission(_fetchAlbumItems, "photos");
|
|
27313
|
+
const _fetchAlbumItemsWithPermission = withPermission(_fetchAlbumItems, "photos");
|
|
27314
|
+
Object.assign(_fetchAlbumItemsWithPermission, { isSupported: () => true });
|
|
27312
27315
|
//#endregion
|
|
27313
27316
|
//#region src/mock/device/clipboard.ts
|
|
27314
27317
|
/**
|
|
@@ -27527,6 +27530,17 @@ const _startUpdateLocation = (eventParams) => {
|
|
|
27527
27530
|
};
|
|
27528
27531
|
withPermission(_startUpdateLocation, "geolocation");
|
|
27529
27532
|
//#endregion
|
|
27533
|
+
//#region src/mock/device/pdf.ts
|
|
27534
|
+
/**
|
|
27535
|
+
* Base64로 인코딩된 PDF 데이터를 네이티브 PDF 뷰어로 여는 mock.
|
|
27536
|
+
* mock 환경에서는 즉시 `'CLOSE'`를 반환한다.
|
|
27537
|
+
*/
|
|
27538
|
+
const _openPDFViewerImpl = async (_params) => {
|
|
27539
|
+
await Promise.resolve();
|
|
27540
|
+
return "CLOSE";
|
|
27541
|
+
};
|
|
27542
|
+
Object.assign(_openPDFViewerImpl, { isSupported: () => true });
|
|
27543
|
+
//#endregion
|
|
27530
27544
|
//#region src/mock/proxy.ts
|
|
27531
27545
|
/**
|
|
27532
27546
|
* 미구현 API용 Proxy 트립와이어.
|
|
@@ -27906,16 +27920,6 @@ function safeSerialize(value) {
|
|
|
27906
27920
|
}
|
|
27907
27921
|
//#endregion
|
|
27908
27922
|
//#region src/mock/ads/index.ts
|
|
27909
|
-
/**
|
|
27910
|
-
* 광고 mock (GoogleAdMob, TossAds, FullScreenAd)
|
|
27911
|
-
*
|
|
27912
|
-
* 변경 이력 (#196):
|
|
27913
|
-
* - slot 레지스트리로 TossAds destroy/destroyAll 누수 수정 (🟡→🟢)
|
|
27914
|
-
* - attachBanner BannerSlotCallbacks 발화 (onAdRendered/onAdImpression/onNoFill 등)
|
|
27915
|
-
* - initialize onInitialized/onInitializationFailed 발화
|
|
27916
|
-
* - AdMob reward 파라미터화 (state.ads.rewardUnitType/rewardAmount)
|
|
27917
|
-
* - 모든 호출 observe()로 sdkCallLog에 기록
|
|
27918
|
-
*/
|
|
27919
27923
|
function withIsSupported(fn) {
|
|
27920
27924
|
fn.isSupported = () => true;
|
|
27921
27925
|
return fn;
|
|
@@ -27936,7 +27940,7 @@ const GoogleAdMob = createMockProxy("GoogleAdMob", {
|
|
|
27936
27940
|
aitState.patch("ads", { isLoaded: true });
|
|
27937
27941
|
args.onEvent({
|
|
27938
27942
|
type: "loaded",
|
|
27939
|
-
data: {
|
|
27943
|
+
data: { responseInfo: { responseId: `mock-response-${args.options.adGroupId}` } }
|
|
27940
27944
|
});
|
|
27941
27945
|
}, 200);
|
|
27942
27946
|
return () => {};
|
|
@@ -27946,19 +27950,14 @@ const GoogleAdMob = createMockProxy("GoogleAdMob", {
|
|
|
27946
27950
|
args.onError(/* @__PURE__ */ new Error("Ad not loaded"));
|
|
27947
27951
|
return () => {};
|
|
27948
27952
|
}
|
|
27949
|
-
|
|
27950
|
-
setTimeout(() => args.onEvent({
|
|
27951
|
-
|
|
27952
|
-
|
|
27953
|
-
|
|
27954
|
-
|
|
27955
|
-
|
|
27956
|
-
|
|
27957
|
-
unitType: rewardUnitType,
|
|
27958
|
-
unitAmount: rewardAmount
|
|
27959
|
-
}
|
|
27960
|
-
});
|
|
27961
|
-
}, 1e3);
|
|
27953
|
+
const { rewardUnitType, rewardAmount } = aitState.state.ads;
|
|
27954
|
+
setTimeout(() => args.onEvent({
|
|
27955
|
+
type: "userEarnedReward",
|
|
27956
|
+
data: {
|
|
27957
|
+
unitType: rewardUnitType,
|
|
27958
|
+
unitAmount: rewardAmount
|
|
27959
|
+
}
|
|
27960
|
+
}), 1e3);
|
|
27962
27961
|
setTimeout(() => {
|
|
27963
27962
|
args.onEvent({ type: "dismissed" });
|
|
27964
27963
|
aitState.patch("ads", { isLoaded: false });
|
|
@@ -28059,10 +28058,7 @@ const loadFullScreenAd = withIsSupported(observe("loadFullScreenAd", "faithful",
|
|
|
28059
28058
|
return;
|
|
28060
28059
|
}
|
|
28061
28060
|
aitState.patch("ads", { isLoaded: true });
|
|
28062
|
-
args.onEvent({
|
|
28063
|
-
type: "loaded",
|
|
28064
|
-
data: { adGroupId: args.options?.adGroupId }
|
|
28065
|
-
});
|
|
28061
|
+
args.onEvent({ type: "loaded" });
|
|
28066
28062
|
}, 200);
|
|
28067
28063
|
return () => {};
|
|
28068
28064
|
}));
|
|
@@ -28071,7 +28067,7 @@ const showFullScreenAd = withIsSupported(observe("showFullScreenAd", "faithful",
|
|
|
28071
28067
|
args.onError(/* @__PURE__ */ new Error("Ad not loaded"));
|
|
28072
28068
|
return () => {};
|
|
28073
28069
|
}
|
|
28074
|
-
setTimeout(() => args.onEvent({ type: "
|
|
28070
|
+
setTimeout(() => args.onEvent({ type: "clicked" }), 100);
|
|
28075
28071
|
setTimeout(() => args.onEvent({ type: "dismissed" }), 1500);
|
|
28076
28072
|
return () => {};
|
|
28077
28073
|
}));
|
|
@@ -28179,13 +28175,15 @@ function renderAdsTab() {
|
|
|
28179
28175
|
if (!Number.isNaN(n)) aitState.patch("ads", { rewardAmount: n });
|
|
28180
28176
|
}, disabled), lastEventLine()), adSection(t("ads.section.googleAdMob"), () => {
|
|
28181
28177
|
GoogleAdMob.loadAppsInTossAdMob({
|
|
28178
|
+
options: { adGroupId: "mock-group" },
|
|
28182
28179
|
onEvent: (e) => recordEvent(e.type),
|
|
28183
|
-
onError: (err) => recordError(err.message)
|
|
28180
|
+
onError: (err) => recordError(err instanceof Error ? err.message : String(err))
|
|
28184
28181
|
});
|
|
28185
28182
|
}, () => {
|
|
28186
28183
|
GoogleAdMob.showAppsInTossAdMob({
|
|
28184
|
+
options: { adGroupId: "mock-group" },
|
|
28187
28185
|
onEvent: (e) => recordEvent(e.type),
|
|
28188
|
-
onError: (err) => recordError(err.message)
|
|
28186
|
+
onError: (err) => recordError(err instanceof Error ? err.message : String(err))
|
|
28189
28187
|
});
|
|
28190
28188
|
}, disabled), adSection(t("ads.section.tossAds"), () => {
|
|
28191
28189
|
TossAds.initialize({ callbacks: {
|
|
@@ -28193,7 +28191,7 @@ function renderAdsTab() {
|
|
|
28193
28191
|
aitState.patch("ads", { isLoaded: true });
|
|
28194
28192
|
recordEvent("loaded");
|
|
28195
28193
|
},
|
|
28196
|
-
onInitializationFailed: (err) => recordError(err.message)
|
|
28194
|
+
onInitializationFailed: (err) => recordError(err instanceof Error ? err.message : String(err))
|
|
28197
28195
|
} });
|
|
28198
28196
|
}, () => {
|
|
28199
28197
|
if (!aitState.state.ads.isLoaded) {
|
|
@@ -28207,13 +28205,15 @@ function renderAdsTab() {
|
|
|
28207
28205
|
}, 1500);
|
|
28208
28206
|
}, disabled), tossAdsBannerSection(disabled), adSection(t("ads.section.fullScreenAd"), () => {
|
|
28209
28207
|
loadFullScreenAd({
|
|
28208
|
+
options: { adGroupId: "mock-fullscreen-group" },
|
|
28210
28209
|
onEvent: (e) => recordEvent(e.type),
|
|
28211
|
-
onError: (err) => recordError(err.message)
|
|
28210
|
+
onError: (err) => recordError(err instanceof Error ? err.message : String(err))
|
|
28212
28211
|
});
|
|
28213
28212
|
}, () => {
|
|
28214
28213
|
showFullScreenAd({
|
|
28214
|
+
options: { adGroupId: "mock-fullscreen-group" },
|
|
28215
28215
|
onEvent: (e) => recordEvent(e.type),
|
|
28216
|
-
onError: (err) => recordError(err.message)
|
|
28216
|
+
onError: (err) => recordError(err instanceof Error ? err.message : String(err))
|
|
28217
28217
|
});
|
|
28218
28218
|
}, disabled));
|
|
28219
28219
|
return container;
|
|
@@ -28396,9 +28396,6 @@ function renderEventsTab() {
|
|
|
28396
28396
|
}
|
|
28397
28397
|
//#endregion
|
|
28398
28398
|
//#region src/mock/iap/index.ts
|
|
28399
|
-
/**
|
|
28400
|
-
* IAP (인앱결제) mock
|
|
28401
|
-
*/
|
|
28402
28399
|
let orderCounter = 0;
|
|
28403
28400
|
function generateOrderId() {
|
|
28404
28401
|
return `mock-order-${++orderCounter}-${Date.now()}`;
|
|
@@ -29017,10 +29014,10 @@ const requestReview = observe("requestReview", "inert", async () => {
|
|
|
29017
29014
|
console.log("[@ait-co/devtools] requestReview called");
|
|
29018
29015
|
});
|
|
29019
29016
|
requestReview.isSupported = () => true;
|
|
29020
|
-
async
|
|
29017
|
+
const _getServerTimeImpl = async () => {
|
|
29021
29018
|
return Date.now();
|
|
29022
|
-
}
|
|
29023
|
-
|
|
29019
|
+
};
|
|
29020
|
+
Object.assign(_getServerTimeImpl, { isSupported: () => true });
|
|
29024
29021
|
//#endregion
|
|
29025
29022
|
//#region src/panel/device-emulation.ts
|
|
29026
29023
|
/**
|
|
@@ -30850,7 +30847,7 @@ function Panel() {
|
|
|
30850
30847
|
color: "#666",
|
|
30851
30848
|
fontWeight: 400
|
|
30852
30849
|
},
|
|
30853
|
-
children: ["v", "0.1.
|
|
30850
|
+
children: ["v", "0.1.96"]
|
|
30854
30851
|
}),
|
|
30855
30852
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
30856
30853
|
type: "button",
|