@dimina-kit/devtools 0.4.0-dev.20260702175315 → 0.4.0-dev.20260703051110
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/main/app/app.js +5 -25
- package/dist/main/app/native-overview.d.ts +27 -0
- package/dist/main/app/native-overview.js +44 -0
- package/dist/main/index.bundle.js +826 -690
- package/dist/main/ipc/bridge-router.js +180 -141
- package/dist/main/ipc/project-fs.js +39 -21
- package/dist/main/services/automation/handlers/app.js +143 -109
- package/dist/main/services/mcp/tools/simulator-tools.js +118 -97
- package/dist/main/services/network-forward/dispatch-batch.d.ts +22 -0
- package/dist/main/services/network-forward/dispatch-batch.js +21 -0
- package/dist/main/services/network-forward/index.js +5 -20
- package/dist/main/services/projects/create-project-service.js +54 -34
- package/dist/main/services/projects/types.d.ts +1 -32
- package/dist/main/services/service-console/console-api.js +36 -27
- package/dist/main/services/simulator-temp-files/disk.js +109 -86
- package/dist/main/services/workbench-coi-server.js +58 -45
- package/dist/main/utils/logger.d.ts +5 -12
- package/dist/main/utils/logger.js +5 -45
- package/dist/preload/instrumentation/wxml-extract.js +94 -62
- package/dist/preload/runtime/main-api-runner.d.ts +1 -1
- package/dist/preload/windows/main.cjs +284 -565
- package/dist/preload/windows/main.cjs.map +2 -2
- package/dist/preload/windows/simulator.cjs +37 -39
- package/dist/preload/windows/simulator.cjs.map +2 -2
- package/dist/preload/windows/simulator.js +37 -39
- package/dist/render-host/render-inspect.js +63 -52
- package/dist/renderer/assets/index-D-ksyN1p.js +49 -0
- package/dist/renderer/assets/workbenchSettings-COhuFF-i.js +8 -0
- package/dist/renderer/entries/main/index.html +1 -1
- package/dist/renderer/entries/workbench-settings/index.html +1 -1
- package/dist/shared/appdata-accumulator.js +53 -48
- package/dist/shared/open-in-editor-resource-path.d.ts +56 -0
- package/dist/shared/open-in-editor-resource-path.js +133 -0
- package/dist/shared/open-in-editor.d.ts +2 -9
- package/dist/shared/open-in-editor.js +8 -93
- package/dist/shared/types.d.ts +13 -0
- package/dist/simulator/assets/{device-shell-CUl0ILfn.js → device-shell-CiLAPa0I.js} +2 -2
- package/dist/simulator/assets/simulator-Dvnxry3y.js +10 -0
- package/dist/simulator/simulator.html +1 -1
- package/dist/vscode-workbench/assets/__vite-browser-external-CXi6Kz9W.js +1 -0
- package/dist/vscode-workbench/assets/{dist-CS7SQP3K.js → dist-TpGpmMGi.js} +3 -3
- package/dist/vscode-workbench/assets/{iconv-lite-umd-D3q-1-o6.js → iconv-lite-umd-C9tiCAJa.js} +1 -1
- package/dist/vscode-workbench/assets/{index-zjigpZ25.js → index-DJ1HyMZ7.js} +20 -22
- package/dist/vscode-workbench/assets/{jschardet-Cu4ufeHq.js → jschardet-DE1jV513.js} +1 -1
- package/dist/vscode-workbench/index.html +1 -1
- package/package.json +5 -5
- package/dist/renderer/assets/index-B-Dqb7G0.js +0 -49
- package/dist/renderer/assets/workbenchSettings-Bim9ol9R.js +0 -8
- package/dist/simulator/assets/simulator-Dz8iGcgy.js +0 -10
- package/dist/vscode-workbench/assets/__vite-browser-external-B0DTNerG.js +0 -1
|
@@ -381,53 +381,51 @@ function installConsoleInstrumentation() {
|
|
|
381
381
|
}
|
|
382
382
|
|
|
383
383
|
// src/shared/appdata-accumulator.ts
|
|
384
|
-
function
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
return null;
|
|
391
|
-
}
|
|
384
|
+
function parseMessagePayload(message) {
|
|
385
|
+
if (typeof message !== "string") return message;
|
|
386
|
+
try {
|
|
387
|
+
return JSON.parse(message);
|
|
388
|
+
} catch {
|
|
389
|
+
return null;
|
|
392
390
|
}
|
|
391
|
+
}
|
|
392
|
+
function decodeUpdateBatchBody(rawBody) {
|
|
393
|
+
const body = rawBody;
|
|
394
|
+
if (!body || typeof body !== "object") return null;
|
|
395
|
+
if (typeof body.bridgeId !== "string" || !Array.isArray(body.updates)) return null;
|
|
396
|
+
const out = [];
|
|
397
|
+
for (const u of body.updates) {
|
|
398
|
+
if (!u || typeof u.moduleId !== "string") continue;
|
|
399
|
+
if (!u.moduleId.startsWith("page_")) continue;
|
|
400
|
+
out.push({ mode: "patch", bridgeId: body.bridgeId, moduleId: u.moduleId, data: u.data });
|
|
401
|
+
}
|
|
402
|
+
return out.length > 0 ? out : null;
|
|
403
|
+
}
|
|
404
|
+
function decodePageInitBody(moduleId, rawBody) {
|
|
405
|
+
const body = rawBody;
|
|
406
|
+
if (!body || typeof body !== "object") return null;
|
|
407
|
+
if (typeof body.bridgeId !== "string" || typeof body.path !== "string") return null;
|
|
408
|
+
if (!body.data || typeof body.data !== "object") return null;
|
|
409
|
+
return [{
|
|
410
|
+
mode: "init",
|
|
411
|
+
bridgeId: body.bridgeId,
|
|
412
|
+
moduleId,
|
|
413
|
+
componentPath: body.path,
|
|
414
|
+
data: body.data
|
|
415
|
+
}];
|
|
416
|
+
}
|
|
417
|
+
function decodeWorkerMessage(message) {
|
|
418
|
+
const payload = parseMessagePayload(message);
|
|
393
419
|
if (!payload || typeof payload !== "object") return null;
|
|
394
420
|
const record = payload;
|
|
395
|
-
if (record.type === "ub")
|
|
396
|
-
const body = record.body;
|
|
397
|
-
if (!body || typeof body !== "object") return null;
|
|
398
|
-
if (typeof body.bridgeId !== "string" || !Array.isArray(body.updates)) return null;
|
|
399
|
-
const out = [];
|
|
400
|
-
for (const u of body.updates) {
|
|
401
|
-
if (!u || typeof u.moduleId !== "string") continue;
|
|
402
|
-
if (!u.moduleId.startsWith("page_")) continue;
|
|
403
|
-
out.push({ mode: "patch", bridgeId: body.bridgeId, moduleId: u.moduleId, data: u.data });
|
|
404
|
-
}
|
|
405
|
-
return out.length > 0 ? out : null;
|
|
406
|
-
}
|
|
421
|
+
if (record.type === "ub") return decodeUpdateBatchBody(record.body);
|
|
407
422
|
if (typeof record.type === "string" && record.type.startsWith("page_")) {
|
|
408
|
-
|
|
409
|
-
if (!body || typeof body !== "object") return null;
|
|
410
|
-
if (typeof body.bridgeId !== "string" || typeof body.path !== "string") return null;
|
|
411
|
-
if (!body.data || typeof body.data !== "object") return null;
|
|
412
|
-
return [{
|
|
413
|
-
mode: "init",
|
|
414
|
-
bridgeId: body.bridgeId,
|
|
415
|
-
moduleId: record.type,
|
|
416
|
-
componentPath: body.path,
|
|
417
|
-
data: body.data
|
|
418
|
-
}];
|
|
423
|
+
return decodePageInitBody(record.type, record.body);
|
|
419
424
|
}
|
|
420
425
|
return null;
|
|
421
426
|
}
|
|
422
427
|
function decodeOutgoingMessage(message) {
|
|
423
|
-
|
|
424
|
-
if (typeof payload === "string") {
|
|
425
|
-
try {
|
|
426
|
-
payload = JSON.parse(payload);
|
|
427
|
-
} catch {
|
|
428
|
-
return null;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
428
|
+
const payload = parseMessagePayload(message);
|
|
431
429
|
if (!payload || typeof payload !== "object") return null;
|
|
432
430
|
const r = payload;
|
|
433
431
|
if (typeof r.type !== "string") return null;
|