@dimina-kit/devtools 0.4.0-dev.20260702182435 → 0.4.0-dev.20260703101348
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 +1217 -735
- package/dist/main/ipc/bridge-router.d.ts +8 -0
- package/dist/main/ipc/bridge-router.js +526 -173
- package/dist/main/ipc/project-fs.js +39 -21
- package/dist/main/services/automation/handlers/app.js +143 -109
- package/dist/main/services/console-forward/index.d.ts +12 -1
- package/dist/main/services/console-forward/index.js +99 -1
- package/dist/main/services/diagnostics/index.d.ts +49 -0
- package/dist/main/services/diagnostics/index.js +61 -0
- 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 +37 -20
- package/dist/main/services/notifications/renderer-notifier.d.ts +39 -0
- package/dist/main/services/notifications/renderer-notifier.js +4 -1
- package/dist/main/services/projects/create-project-service.js +54 -34
- package/dist/main/services/projects/project-repository.js +2 -1
- 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/views/simulator-session-policy.js +17 -0
- package/dist/main/services/workbench-coi-server.js +58 -45
- package/dist/main/services/workbench-context.d.ts +10 -0
- package/dist/main/services/workspace/workspace-service.js +12 -3
- package/dist/main/utils/logger.d.ts +5 -12
- package/dist/main/utils/logger.js +5 -45
- package/dist/main/windows/service-host-window/create.d.ts +15 -1
- package/dist/main/windows/service-host-window/create.js +11 -3
- package/dist/preload/instrumentation/wxml-extract.js +94 -62
- package/dist/preload/runtime/main-api-runner.d.ts +1 -1
- package/dist/preload/shared/api-compat.js +18 -55
- package/dist/preload/windows/host-toolbar-runtime.cjs.map +2 -2
- package/dist/preload/windows/main.cjs +284 -565
- package/dist/preload/windows/main.cjs.map +2 -2
- package/dist/preload/windows/simulator.cjs +154 -83
- package/dist/preload/windows/simulator.cjs.map +3 -3
- package/dist/preload/windows/simulator.js +154 -83
- package/dist/render-host/render-inspect.js +63 -52
- package/dist/renderer/assets/index-BwzPwCmM.js +49 -0
- package/dist/renderer/assets/{input-Cjk0wSEh.js → input-CTb_le7F.js} +2 -2
- package/dist/renderer/assets/ipc-transport-BPWIV5hA.css +1 -0
- package/dist/renderer/assets/{ipc-transport-OZS-KmOW.js → ipc-transport-Ck5Xa8Tu.js} +2 -2
- package/dist/renderer/assets/popover-B1Zu2UQu.js +2 -0
- package/dist/renderer/assets/{select-BQDXi5ih.js → select-ozSk5Pt6.js} +2 -2
- package/dist/renderer/assets/{settings-tP3Px2KR.js → settings-CNwGOI22.js} +2 -2
- package/dist/renderer/assets/settings-api-DMbMp1Eq.js +2 -0
- package/dist/renderer/assets/workbenchSettings-Cr4EHo5w.js +8 -0
- package/dist/renderer/entries/main/index.html +6 -6
- package/dist/renderer/entries/popover/index.html +5 -5
- package/dist/renderer/entries/settings/index.html +5 -5
- package/dist/renderer/entries/workbench-settings/index.html +4 -4
- package/dist/shared/appdata-accumulator.js +53 -48
- package/dist/shared/bridge-channels.d.ts +22 -0
- package/dist/shared/ipc-channels.d.ts +3 -0
- package/dist/shared/ipc-channels.js +9 -0
- 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/request-core.d.ts +84 -0
- package/dist/shared/request-core.js +168 -0
- package/dist/shared/simulator-api-metadata.d.ts +22 -17
- package/dist/shared/simulator-api-metadata.js +36 -0
- package/dist/shared/types.d.ts +20 -4
- package/dist/simulator/assets/{device-shell-CUl0ILfn.js → device-shell-C-wcFq3Z.js} +2 -2
- package/dist/simulator/assets/{jsx-runtime-CDK-o-S0.js → jsx-runtime-BDTY6fEq.js} +2 -2
- package/dist/simulator/assets/simulator-DU3-fS3v.js +10 -0
- package/dist/simulator/assets/simulator-mini-app-DzfMfnVM.js +2 -0
- package/dist/simulator/simulator.html +2 -2
- 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 +6 -6
- package/dist/renderer/assets/index-B-Dqb7G0.js +0 -49
- package/dist/renderer/assets/ipc-transport-D5dKIti1.css +0 -1
- package/dist/renderer/assets/popover-CQVvOe90.js +0 -2
- package/dist/renderer/assets/settings-api-B6x2mhaD.js +0 -2
- package/dist/renderer/assets/workbenchSettings-Bim9ol9R.js +0 -8
- package/dist/simulator/assets/simulator-Dz8iGcgy.js +0 -10
- package/dist/simulator/assets/simulator-mini-app-Bt639XL_.js +0 -2
- package/dist/vscode-workbench/assets/__vite-browser-external-B0DTNerG.js +0 -1
package/dist/main/app/app.js
CHANGED
|
@@ -8,6 +8,7 @@ import { rendererDir as defaultRendererDir, defaultPreloadPath, devtoolsPackageR
|
|
|
8
8
|
import { installThemeBackgroundSync } from '../utils/theme.js';
|
|
9
9
|
import { createMainWindow, wireMainWindowEvents } from '../windows/main-window/index.js';
|
|
10
10
|
import { isAppQuitting } from './lifecycle.js';
|
|
11
|
+
import { resolveNativeAppDataKeys, resolveNativeStorageOverview } from './native-overview.js';
|
|
11
12
|
// eslint-disable-next-line no-restricted-syntax -- grandfathered(workbench-context): shrink-only
|
|
12
13
|
import { createWorkbenchContext } from '../services/workbench-context.js';
|
|
13
14
|
import { loadWorkbenchSettings, applyTheme } from '../services/settings/index.js';
|
|
@@ -445,31 +446,10 @@ export async function createDevtoolsRuntime(config = {}) {
|
|
|
445
446
|
appDataKeys: [],
|
|
446
447
|
};
|
|
447
448
|
if (appId) {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
if (Array.isArray(keys)) {
|
|
453
|
-
overview.storageKeys = keys.filter((key) => typeof key === 'string');
|
|
454
|
-
overview.storageCount = keys.length;
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
catch {
|
|
459
|
-
// Leave native storage empty when it is temporarily unavailable.
|
|
460
|
-
}
|
|
461
|
-
try {
|
|
462
|
-
const snapshot = context.appData?.snapshot?.(appId);
|
|
463
|
-
if (snapshot && typeof snapshot === 'object') {
|
|
464
|
-
const entries = snapshot.entries;
|
|
465
|
-
if (entries && typeof entries === 'object') {
|
|
466
|
-
overview.appDataKeys = Object.keys(entries);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
catch {
|
|
471
|
-
// Leave native appdata empty when it has not been initialized yet.
|
|
472
|
-
}
|
|
449
|
+
const storage = await resolveNativeStorageOverview(context, appId);
|
|
450
|
+
overview.storageKeys = storage.storageKeys;
|
|
451
|
+
overview.storageCount = storage.storageCount;
|
|
452
|
+
overview.appDataKeys = resolveNativeAppDataKeys(context, appId);
|
|
473
453
|
}
|
|
474
454
|
return overview;
|
|
475
455
|
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AppDataTap } from '../services/simulator-appdata/index.js';
|
|
2
|
+
import type { StorageApi } from '../services/simulator-storage/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Narrow view of the fields the native overview provider reads. Depending on
|
|
5
|
+
* this instead of the full `WorkbenchContext` grab-bag keeps this module out
|
|
6
|
+
* of the workbench-context import ratchet.
|
|
7
|
+
*/
|
|
8
|
+
export interface NativeOverviewContext {
|
|
9
|
+
storageApi?: StorageApi;
|
|
10
|
+
appData?: AppDataTap;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Best-effort native storage summary for `appId`. Any failure, or a
|
|
14
|
+
* malformed `getStorageInfo` response, leaves the caller with empty
|
|
15
|
+
* defaults rather than throwing.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveNativeStorageOverview(context: NativeOverviewContext, appId: string): Promise<{
|
|
18
|
+
storageKeys: string[];
|
|
19
|
+
storageCount: number;
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Best-effort appData key list for `appId`. Any failure, or a snapshot
|
|
23
|
+
* without an `entries` object, resolves to an empty list rather than
|
|
24
|
+
* throwing.
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveNativeAppDataKeys(context: NativeOverviewContext, appId: string): string[];
|
|
27
|
+
//# sourceMappingURL=native-overview.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Best-effort native storage summary for `appId`. Any failure, or a
|
|
3
|
+
* malformed `getStorageInfo` response, leaves the caller with empty
|
|
4
|
+
* defaults rather than throwing.
|
|
5
|
+
*/
|
|
6
|
+
export async function resolveNativeStorageOverview(context, appId) {
|
|
7
|
+
try {
|
|
8
|
+
const info = await context.storageApi?.invoke(appId, 'getStorageInfo', {});
|
|
9
|
+
if (info && typeof info === 'object') {
|
|
10
|
+
const keys = info.keys;
|
|
11
|
+
if (Array.isArray(keys)) {
|
|
12
|
+
return {
|
|
13
|
+
storageKeys: keys.filter((key) => typeof key === 'string'),
|
|
14
|
+
storageCount: keys.length,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
// Leave native storage empty when it is temporarily unavailable.
|
|
21
|
+
}
|
|
22
|
+
return { storageKeys: [], storageCount: 0 };
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Best-effort appData key list for `appId`. Any failure, or a snapshot
|
|
26
|
+
* without an `entries` object, resolves to an empty list rather than
|
|
27
|
+
* throwing.
|
|
28
|
+
*/
|
|
29
|
+
export function resolveNativeAppDataKeys(context, appId) {
|
|
30
|
+
try {
|
|
31
|
+
const snapshot = context.appData?.snapshot?.(appId);
|
|
32
|
+
if (snapshot && typeof snapshot === 'object') {
|
|
33
|
+
const entries = snapshot.entries;
|
|
34
|
+
if (entries && typeof entries === 'object') {
|
|
35
|
+
return Object.keys(entries);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
// Leave native appdata empty when it has not been initialized yet.
|
|
41
|
+
}
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=native-overview.js.map
|