@ait-co/devtools 0.1.133 → 0.1.134
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/{cdp-connection-D7AYQck2.d.ts → cdp-connection-BYE9meXe.d.ts} +12 -2
- package/dist/{cdp-connection-D7AYQck2.d.ts.map → cdp-connection-BYE9meXe.d.ts.map} +1 -1
- package/dist/{debug-server-CS1BS2BX.js → debug-server-BcSBrajf.js} +18 -8
- package/dist/debug-server-BcSBrajf.js.map +1 -0
- package/dist/{debug-server-DmzuK2c6.js → debug-server-D9SmprUI.js} +3 -3
- package/dist/{debug-server-DmzuK2c6.js.map → debug-server-D9SmprUI.js.map} +1 -1
- package/dist/mcp/cli.js +41 -15
- package/dist/mcp/cli.js.map +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/panel/index.js +1 -1
- package/dist/{pool-x28Wv1ty.d.ts → pool-C6TgrcyW.d.ts} +3 -3
- package/dist/{pool-x28Wv1ty.d.ts.map → pool-C6TgrcyW.d.ts.map} +1 -1
- package/dist/{relay-factory-BQfmK7RP.js → relay-factory-CsVO9o25.js} +2 -2
- package/dist/{relay-factory-BQfmK7RP.js.map → relay-factory-CsVO9o25.js.map} +1 -1
- package/dist/{relay-worker-DtX_eszH.d.ts → relay-worker-Dw3aIzIK.d.ts} +3 -3
- package/dist/{relay-worker-DtX_eszH.d.ts.map → relay-worker-Dw3aIzIK.d.ts.map} +1 -1
- package/dist/{relay-worker-MZq4fLv8.js → relay-worker-UK0nBfDX.js} +18 -8
- package/dist/relay-worker-UK0nBfDX.js.map +1 -0
- package/dist/{runtime-9xhN9pr8.d.ts → runtime-DfHHZms2.d.ts} +34 -5
- package/dist/runtime-DfHHZms2.d.ts.map +1 -0
- package/dist/test-runner/bin.js +32 -11
- package/dist/test-runner/bin.js.map +1 -1
- package/dist/test-runner/config.d.ts +1 -1
- package/dist/test-runner/config.js +1 -1
- package/dist/test-runner/pool.d.ts +1 -1
- package/dist/test-runner/pool.js +1 -1
- package/dist/test-runner/relay-factory.d.ts +12 -2
- package/dist/test-runner/relay-factory.d.ts.map +1 -1
- package/dist/test-runner/relay-factory.js +1 -1
- package/dist/test-runner/relay-worker.d.ts +1 -1
- package/dist/test-runner/relay-worker.js +1 -1
- package/dist/test-runner/report.d.ts +2 -2
- package/dist/test-runner/rpc.d.ts +8 -5
- package/dist/test-runner/rpc.d.ts.map +1 -1
- package/dist/test-runner/rpc.js +15 -4
- package/dist/test-runner/rpc.js.map +1 -1
- package/dist/test-runner/runtime.d.ts +2 -2
- package/dist/test-runner/runtime.js +30 -4
- package/dist/test-runner/runtime.js.map +1 -1
- package/dist/test-runner/task-graph.d.ts +1 -1
- package/package.json +1 -1
- package/dist/debug-server-CS1BS2BX.js.map +0 -1
- package/dist/relay-worker-MZq4fLv8.js.map +0 -1
- package/dist/runtime-9xhN9pr8.d.ts.map +0 -1
|
@@ -240,8 +240,18 @@ interface CdpConnection {
|
|
|
240
240
|
* Issue a CDP command (request → response). Phase 2's DOM/snapshot/screenshot
|
|
241
241
|
* tools use this; resolves with the typed result or rejects on a CDP error.
|
|
242
242
|
* Implementations must have called {@link enableDomains} first.
|
|
243
|
+
*
|
|
244
|
+
* @param opts.timeoutMs - Per-call override for the connection's own command
|
|
245
|
+
* watchdog (devtools#747). Optional — implementations without a per-command
|
|
246
|
+
* watchdog (e.g. `LocalCdpConnection`) may ignore it. Callers that already
|
|
247
|
+
* race `send` against their own longer timeout (e.g. the test-runner's
|
|
248
|
+
* file-evaluate budget) MUST pass a `timeoutMs` at least as large as that
|
|
249
|
+
* caller-side timeout, or the connection's shorter default watchdog fires
|
|
250
|
+
* first and undercuts the caller's race.
|
|
243
251
|
*/
|
|
244
|
-
send<M extends CdpCommandName>(method: M, params?: CdpCommandMap[M]['params']
|
|
252
|
+
send<M extends CdpCommandName>(method: M, params?: CdpCommandMap[M]['params'], opts?: {
|
|
253
|
+
timeoutMs?: number;
|
|
254
|
+
}): Promise<CdpCommandMap[M]['result']>;
|
|
245
255
|
/**
|
|
246
256
|
* Close the underlying transport and reject any in-flight commands.
|
|
247
257
|
* Optional so that minimal test fakes that don't need teardown remain
|
|
@@ -274,4 +284,4 @@ interface CdpConnection {
|
|
|
274
284
|
}
|
|
275
285
|
//#endregion
|
|
276
286
|
export { CdpConnection as t };
|
|
277
|
-
//# sourceMappingURL=cdp-connection-
|
|
287
|
+
//# sourceMappingURL=cdp-connection-BYE9meXe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdp-connection-
|
|
1
|
+
{"version":3,"file":"cdp-connection-BYE9meXe.d.ts","names":[],"sources":["../src/mcp/cdp-connection.ts"],"mappings":";;AAwBA;;;;;;;;;AAUA;;;;;;;;;;;AASA;;UAnBiB,SAAA;EA2BI;EAzBnB,EAAA;EAoBA;EAlBA,KAAA;EAoBA;EAlBA,GAAA;AAAA;;UAIe,eAAA;EACf,IAAA;EACA,OAAA;EACA,KAAA;EACA,WAAA;EACA,SAAA;AAAA;AAsBF;AAAA,UAlBiB,qBAAA;;EAEf,IAAA;EACA,IAAA,EAAM,eAAA;EAiBN;EAfA,SAAA;EACA,kBAAA;EACA,UAAA;IACE,UAAA,EAAY,KAAA;MACV,YAAA;MACA,GAAA;MACA,UAAA;MACA,YAAA;IAAA;EAAA;AAAA;;UAMW,6BAAA;EACf,SAAA;EACA,OAAA;IACE,GAAA;IACA,MAAA;IACA,OAAA,GAAU,MAAA;EAAA;EAkBZ;EAfA,SAAA;EAgBI;EAdJ,QAAA;EACA,IAAA;AAAA;;UAIe,4BAAA;EACf,SAAA;EACA,QAAA;IACE,GAAA;IACA,MAAA;IACA,UAAA;IACA,QAAA;EAAA;EAEF,SAAA;EACA,IAAA;AAAA;;;;;UAOe,YAAA;EACf,YAAA;EACA,QAAA;EACA,GAAA;EACA,UAAA;EACA,YAAA;AAAA;;UAIe,2BAAA;EAcD;EAZd,SAAA;EACA,gBAAA;IACE,WAAA;IACA,IAAA;IACA,UAAA;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,aAAA,IAAiB,OAAA;EA4BN;EAzBX,WAAA,IAAe,SAAA;EAyBZ;EAtBH,iBAAA,WAA4B,YAAA,EAAc,KAAA,EAAO,CAAA,GAAI,aAAA,CAAc,WAAA,CAAY,CAAA;EAyC5D;EAtCnB,EAAA,WAAa,YAAA,EAAc,KAAA,EAAO,CAAA,EAAG,QAAA,GAAW,OAAA,EAAS,WAAA,CAAY,CAAA;EAuD1D;;;;;;;;;;;;;EAxCX,IAAA,WAAe,cAAA,EACb,MAAA,EAAQ,CAAA,EACR,MAAA,GAAS,aAAA,CAAc,CAAA,aACvB,IAAA;IAAS,SAAA;EAAA,IACR,OAAA,CAAQ,aAAA,CAAc,CAAA;EAtBsD;;;;;;EA8B/E,KAAA;EA3BqE;;;;;;;;;EAsCrE,cAAA,KAAmB,OAAA,CAAQ,SAAA;EArBzB;;;;;;;;;;;EAkCF,kBAAA,EACE,QAAA,GAAW,OAAA,EAAS,SAAA,gBACpB,SAAA,WACA,cAAA,YACC,OAAA,CAAQ,SAAA;AAAA"}
|
|
@@ -347,9 +347,13 @@ var ChiiCdpConnection = class {
|
|
|
347
347
|
/**
|
|
348
348
|
* Issue a CDP command and resolve with its result (Phase 2). Rejects on a CDP
|
|
349
349
|
* error frame or when no websocket is open (no page attached yet).
|
|
350
|
+
*
|
|
351
|
+
* @param opts.timeoutMs - Per-call override for this connection's command
|
|
352
|
+
* watchdog (devtools#747) — see the `CdpConnection.send` docblock for the
|
|
353
|
+
* contract callers racing their own longer timeout must follow.
|
|
350
354
|
*/
|
|
351
|
-
send(method, params) {
|
|
352
|
-
return this.sendCommand(method, params ?? {});
|
|
355
|
+
send(method, params, opts) {
|
|
356
|
+
return this.sendCommand(method, params ?? {}, opts);
|
|
353
357
|
}
|
|
354
358
|
/**
|
|
355
359
|
* Issue an arbitrary request→response command over the relay and resolve with
|
|
@@ -360,16 +364,22 @@ var ChiiCdpConnection = class {
|
|
|
360
364
|
* auto-reconnect). Caller should re-run `list_pages` or `enableDomains` to
|
|
361
365
|
* reattach.
|
|
362
366
|
*
|
|
363
|
-
* Times out after `
|
|
364
|
-
* `AIT_CDP_COMMAND_TIMEOUT_MS`)
|
|
365
|
-
*
|
|
367
|
+
* Times out after `opts.timeoutMs` when given, else `commandTimeoutMs`
|
|
368
|
+
* (default 30s, env `AIT_CDP_COMMAND_TIMEOUT_MS`) — see devtools#747: the
|
|
369
|
+
* default 30s watchdog used to undercut the test-runner's own longer
|
|
370
|
+
* file-evaluate race no matter what `--timeout` the caller asked for. On
|
|
371
|
+
* timeout the pending entry is cleaned up and the promise rejects with a
|
|
372
|
+
* descriptive Korean error. `Number.isFinite` guards against a non-finite
|
|
373
|
+
* override (e.g. `Infinity`, mirroring `waitForFirstTarget`'s convention)
|
|
374
|
+
* so an intentional "no watchdog" override doesn't get clamped by
|
|
375
|
+
* `setTimeout`.
|
|
366
376
|
*/
|
|
367
|
-
sendCommand(method, params = {}) {
|
|
377
|
+
sendCommand(method, params = {}, opts) {
|
|
368
378
|
if (this.connectionState === "disconnected") return Promise.reject(/* @__PURE__ */ new Error(`relay에 연결되어 있지 않습니다 (${method}). list_pages로 attach 상태를 확인하고 enableDomains()로 재연결하세요.`));
|
|
369
379
|
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) return Promise.reject(/* @__PURE__ */ new Error("No mini-app page attached to the Chii relay yet. Call enableDomains() first."));
|
|
370
380
|
const id = this.nextCommandId++;
|
|
371
381
|
const ws = this.ws;
|
|
372
|
-
const timeoutMs = this.commandTimeoutMs;
|
|
382
|
+
const timeoutMs = opts?.timeoutMs !== void 0 && Number.isFinite(opts.timeoutMs) && opts.timeoutMs > 0 ? opts.timeoutMs : this.commandTimeoutMs;
|
|
373
383
|
return new Promise((resolve, reject) => {
|
|
374
384
|
const handle = setTimeout(() => {
|
|
375
385
|
this.pending.delete(id);
|
|
@@ -998,4 +1008,4 @@ async function bootRelayFamily(options = {}) {
|
|
|
998
1008
|
//#endregion
|
|
999
1009
|
export { bootRelayFamily, buildRelayVerifyAuth };
|
|
1000
1010
|
|
|
1001
|
-
//# sourceMappingURL=debug-server-
|
|
1011
|
+
//# sourceMappingURL=debug-server-BcSBrajf.js.map
|