@ait-co/devtools 0.1.54-beta.0 → 0.1.55
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/README.en.md +2 -6
- package/README.md +2 -6
- package/dist/mcp/cli.js +11 -18
- package/dist/mcp/cli.js.map +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/mock/index.d.ts.map +1 -1
- package/dist/mock/index.js +18 -2
- package/dist/mock/index.js.map +1 -1
- package/dist/panel/index.js +66 -4
- package/dist/panel/index.js.map +1 -1
- package/package.json +17 -19
package/README.en.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
9
|
-
A mock library for the `@apps-in-toss/web-framework` SDK. Imports of `@apps-in-toss/webview-bridge` are
|
|
9
|
+
A mock library for the `@apps-in-toss/web-framework` SDK. Imports of `@apps-in-toss/webview-bridge` are intercepted by the unplugin too (only the high-level SDK functions are exposed — bridge primitives are not). (2.x packages `@apps-in-toss/web-bridge` and `@apps-in-toss/web-analytics` are supported for back-compat.)
|
|
10
10
|
|
|
11
11
|
Lets you develop and test Apps in Toss mini-apps in a **regular browser** — without the Toss app. All SDK features are simulated so you can move fast.
|
|
12
12
|
|
|
@@ -154,7 +154,7 @@ config.plugins.push(aitDevtools.webpack());
|
|
|
154
154
|
|
|
155
155
|
Turbopack does not support a plugin system, so use `resolveAlias` instead.
|
|
156
156
|
|
|
157
|
-
-
|
|
157
|
+
- Aliasing `@apps-in-toss/web-framework` alone is enough. Every SDK call goes through this package, so replacing it with the mock drops the whole web-framework module from the graph, and its internal `@apps-in-toss/webview-bridge` imports disappear with it.
|
|
158
158
|
- Turbopack is generally only used with `next dev`, so no extra production guard is needed.
|
|
159
159
|
|
|
160
160
|
```js
|
|
@@ -163,7 +163,6 @@ module.exports = {
|
|
|
163
163
|
turbo: {
|
|
164
164
|
resolveAlias: {
|
|
165
165
|
'@apps-in-toss/web-framework': '@ait-co/devtools/mock',
|
|
166
|
-
'@apps-in-toss/webview-bridge': '@ait-co/devtools/mock',
|
|
167
166
|
},
|
|
168
167
|
},
|
|
169
168
|
};
|
|
@@ -178,7 +177,6 @@ module.exports = {
|
|
|
178
177
|
turbo: {
|
|
179
178
|
resolveAlias: {
|
|
180
179
|
'@apps-in-toss/web-framework': '@ait-co/devtools/mock',
|
|
181
|
-
'@apps-in-toss/webview-bridge': '@ait-co/devtools/mock',
|
|
182
180
|
},
|
|
183
181
|
},
|
|
184
182
|
},
|
|
@@ -221,7 +219,6 @@ export default defineConfig({
|
|
|
221
219
|
resolve: {
|
|
222
220
|
alias: {
|
|
223
221
|
'@apps-in-toss/web-framework': '@ait-co/devtools/mock',
|
|
224
|
-
'@apps-in-toss/webview-bridge': '@ait-co/devtools/mock',
|
|
225
222
|
},
|
|
226
223
|
},
|
|
227
224
|
});
|
|
@@ -233,7 +230,6 @@ module.exports = {
|
|
|
233
230
|
resolve: {
|
|
234
231
|
alias: {
|
|
235
232
|
'@apps-in-toss/web-framework': require.resolve('@ait-co/devtools/mock'),
|
|
236
|
-
'@apps-in-toss/webview-bridge': require.resolve('@ait-co/devtools/mock'),
|
|
237
233
|
},
|
|
238
234
|
},
|
|
239
235
|
};
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
9
|
-
`@apps-in-toss/web-framework` SDK의 mock 라이브러리입니다. `@apps-in-toss/webview-bridge` import도 함께
|
|
9
|
+
`@apps-in-toss/web-framework` SDK의 mock 라이브러리입니다. `@apps-in-toss/webview-bridge` import도 unplugin이 함께 인터셉트합니다(high-level SDK 함수만 노출 — bridge primitive는 미노출). (2.x의 `@apps-in-toss/web-bridge`, `@apps-in-toss/web-analytics`도 back-compat으로 지원.)
|
|
10
10
|
|
|
11
11
|
앱인토스(Apps in Toss) 미니앱을 **일반 브라우저**에서 개발하고 테스트할 수 있게 해줍니다. 토스 앱 없이도 SDK의 모든 기능을 시뮬레이션하여 빠른 개발 사이클을 지원합니다.
|
|
12
12
|
|
|
@@ -154,7 +154,7 @@ config.plugins.push(aitDevtools.webpack());
|
|
|
154
154
|
|
|
155
155
|
Turbopack은 플러그인 시스템을 지원하지 않으므로 `resolveAlias`를 사용합니다.
|
|
156
156
|
|
|
157
|
-
- `@apps-in-toss/
|
|
157
|
+
- `@apps-in-toss/web-framework` 하나만 alias하면 됩니다. SDK 호출은 모두 이 패키지를 거치므로, mock으로 치환하면 web-framework 모듈 자체가 모듈 그래프에서 빠지고, 그 안의 `@apps-in-toss/webview-bridge` import도 함께 사라집니다.
|
|
158
158
|
- Turbopack은 일반적으로 `next dev`에서만 사용되므로 별도의 production 가드가 필요하지 않습니다.
|
|
159
159
|
|
|
160
160
|
```js
|
|
@@ -163,7 +163,6 @@ module.exports = {
|
|
|
163
163
|
turbo: {
|
|
164
164
|
resolveAlias: {
|
|
165
165
|
'@apps-in-toss/web-framework': '@ait-co/devtools/mock',
|
|
166
|
-
'@apps-in-toss/webview-bridge': '@ait-co/devtools/mock',
|
|
167
166
|
},
|
|
168
167
|
},
|
|
169
168
|
};
|
|
@@ -178,7 +177,6 @@ module.exports = {
|
|
|
178
177
|
turbo: {
|
|
179
178
|
resolveAlias: {
|
|
180
179
|
'@apps-in-toss/web-framework': '@ait-co/devtools/mock',
|
|
181
|
-
'@apps-in-toss/webview-bridge': '@ait-co/devtools/mock',
|
|
182
180
|
},
|
|
183
181
|
},
|
|
184
182
|
},
|
|
@@ -221,7 +219,6 @@ export default defineConfig({
|
|
|
221
219
|
resolve: {
|
|
222
220
|
alias: {
|
|
223
221
|
'@apps-in-toss/web-framework': '@ait-co/devtools/mock',
|
|
224
|
-
'@apps-in-toss/webview-bridge': '@ait-co/devtools/mock',
|
|
225
222
|
},
|
|
226
223
|
},
|
|
227
224
|
});
|
|
@@ -233,7 +230,6 @@ module.exports = {
|
|
|
233
230
|
resolve: {
|
|
234
231
|
alias: {
|
|
235
232
|
'@apps-in-toss/web-framework': require.resolve('@ait-co/devtools/mock'),
|
|
236
|
-
'@apps-in-toss/webview-bridge': require.resolve('@ait-co/devtools/mock'),
|
|
237
233
|
},
|
|
238
234
|
},
|
|
239
235
|
};
|
package/dist/mcp/cli.js
CHANGED
|
@@ -3097,26 +3097,19 @@ var InMemoryDiagnosticsCollector = class {
|
|
|
3097
3097
|
* when the define is absent (unbundled test runs) and the runtime fallback
|
|
3098
3098
|
* below also fails — diagnostics must never throw.
|
|
3099
3099
|
*
|
|
3100
|
-
*
|
|
3101
|
-
*
|
|
3102
|
-
*
|
|
3103
|
-
*
|
|
3100
|
+
* Earlier attempts resolved `@modelcontextprotocol/sdk/package.json` (not in
|
|
3101
|
+
* the SDK `exports` map → `ERR_PACKAGE_PATH_NOT_EXPORTED`) or the bare
|
|
3102
|
+
* `@modelcontextprotocol/sdk` main entry (also absent → `MODULE_NOT_FOUND`),
|
|
3103
|
+
* so both this fallback AND the build-time define silently produced `null` —
|
|
3104
|
+
* leaving `mcpVersion: null` in a real bundle (issue #361, observed live). The
|
|
3105
|
+
* fix resolves a subpath that IS exported (`./server/mcp.js`) and walks back to
|
|
3106
|
+
* the package root, in BOTH the build define and this fallback.
|
|
3104
3107
|
*
|
|
3105
3108
|
* Kept `async` for call-site compatibility (`Promise.all` at the caller); the
|
|
3106
3109
|
* body is synchronous apart from the best-effort fallback.
|
|
3107
3110
|
*/
|
|
3108
3111
|
async function readMcpSdkVersion() {
|
|
3109
|
-
|
|
3110
|
-
const { createRequire } = await import("node:module");
|
|
3111
|
-
const entry = createRequire(import.meta.url).resolve("@modelcontextprotocol/sdk");
|
|
3112
|
-
const root = entry.slice(0, entry.indexOf("@modelcontextprotocol/sdk") + 25);
|
|
3113
|
-
const { readFileSync } = await import("node:fs");
|
|
3114
|
-
const raw = readFileSync(`${root}/package.json`, "utf8");
|
|
3115
|
-
const parsed = JSON.parse(raw);
|
|
3116
|
-
return typeof parsed.version === "string" ? parsed.version : null;
|
|
3117
|
-
} catch {
|
|
3118
|
-
return null;
|
|
3119
|
-
}
|
|
3112
|
+
return "1.29.0";
|
|
3120
3113
|
}
|
|
3121
3114
|
/**
|
|
3122
3115
|
* Returns the `@ait-co/devtools` package version injected at build time via
|
|
@@ -3124,7 +3117,7 @@ async function readMcpSdkVersion() {
|
|
|
3124
3117
|
* some test environments that skip the build step).
|
|
3125
3118
|
*/
|
|
3126
3119
|
function readDevtoolsVersion() {
|
|
3127
|
-
return "0.1.
|
|
3120
|
+
return "0.1.55";
|
|
3128
3121
|
}
|
|
3129
3122
|
/**
|
|
3130
3123
|
* Derives the next recommended action from a completed diagnostics snapshot.
|
|
@@ -3606,7 +3599,7 @@ function createDebugServer(deps) {
|
|
|
3606
3599
|
const collector = collectorDep ?? new InMemoryDiagnosticsCollector();
|
|
3607
3600
|
const server = new Server({
|
|
3608
3601
|
name: "ait-debug",
|
|
3609
|
-
version: "0.1.
|
|
3602
|
+
version: "0.1.55"
|
|
3610
3603
|
}, { capabilities: { tools: { listChanged: true } } });
|
|
3611
3604
|
server.setRequestHandler(ListToolsRequestSchema, () => {
|
|
3612
3605
|
const conn = router.active;
|
|
@@ -4993,7 +4986,7 @@ function createDevServer(deps = {}) {
|
|
|
4993
4986
|
const aitSource = deps.aitSource ?? new HttpAitSource({ stateEndpoint });
|
|
4994
4987
|
const server = new Server({
|
|
4995
4988
|
name: "ait-devtools",
|
|
4996
|
-
version: "0.1.
|
|
4989
|
+
version: "0.1.55"
|
|
4997
4990
|
}, { capabilities: { tools: {} } });
|
|
4998
4991
|
server.setRequestHandler(ListToolsRequestSchema, () => ({ tools: DEV_TOOL_DEFINITIONS.map((tool) => ({ ...tool })) }));
|
|
4999
4992
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|