@dimina-kit/devtools 0.4.0-dev.20260616024534 → 0.4.0-dev.20260616085026
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/index.bundle.js +15 -13
- package/dist/main/runtime/devtools-backend.d.ts +5 -0
- package/dist/main/runtime/devtools-backend.js +10 -3
- package/dist/main/services/workspace/workspace-service.js +9 -1
- package/dist/main/windows/main-window/create.js +17 -14
- package/dist/renderer/assets/index-BYV0bEvB.js +50 -0
- package/dist/renderer/assets/{input-hGF71bn3.js → input-B8NDCYv3.js} +2 -2
- package/dist/renderer/assets/ipc-transport-9agi76dX.css +1 -0
- package/dist/renderer/assets/{ipc-transport-BKWkvwKK.js → ipc-transport-DhrajiC5.js} +1 -1
- package/dist/renderer/assets/{popover-NNQNyjgI.js → popover-CI5uE9ZZ.js} +2 -2
- package/dist/renderer/assets/{select-Bb1AKeSq.js → select-tInleY0z.js} +2 -2
- package/dist/renderer/assets/{settings-7uwimev-.js → settings-CZJOHt8b.js} +2 -2
- package/dist/renderer/assets/{settings-api-DkrPHroq.js → settings-api-BSKzKiWd.js} +2 -2
- package/dist/renderer/assets/{workbenchSettings-EaMYvKHG.js → workbenchSettings-BGxjl25x.js} +2 -2
- 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/types.d.ts +13 -3
- package/package.json +4 -4
- package/dist/renderer/assets/index-BFwsvw4p.js +0 -50
- package/dist/renderer/assets/ipc-transport-Cg1q1gwD.css +0 -1
|
@@ -885,15 +885,13 @@ function createMainWindow(opts) {
|
|
|
885
885
|
}
|
|
886
886
|
});
|
|
887
887
|
mainWindow.once("ready-to-show", () => {
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
mainWindow.webContents.openDevTools({ mode: "detach" });
|
|
896
|
-
}
|
|
888
|
+
const isTest = process.env.NODE_ENV === "test";
|
|
889
|
+
if (opts.autoShow !== false) {
|
|
890
|
+
if (isTest) mainWindow.showInactive();
|
|
891
|
+
else mainWindow.show();
|
|
892
|
+
}
|
|
893
|
+
if (!isTest && !app3.isPackaged && process.env.DIMINA_DEVTOOLS_MAIN_INSPECTOR === "1") {
|
|
894
|
+
mainWindow.webContents.openDevTools({ mode: "detach" });
|
|
897
895
|
}
|
|
898
896
|
});
|
|
899
897
|
const rendererDir2 = path5.dirname(opts.indexHtml);
|
|
@@ -2950,7 +2948,9 @@ function createWorkspaceService(ctx) {
|
|
|
2950
2948
|
try {
|
|
2951
2949
|
await ctx.onBeforeOpenProject(projectPath);
|
|
2952
2950
|
} catch (err) {
|
|
2953
|
-
|
|
2951
|
+
const error = err instanceof Error ? err.message : String(err);
|
|
2952
|
+
sendStatus("error", error);
|
|
2953
|
+
return { success: false, error };
|
|
2954
2954
|
}
|
|
2955
2955
|
}
|
|
2956
2956
|
clearSimulatorServicewechatReferer();
|
|
@@ -9151,9 +9151,11 @@ function createDevtoolsBackend(config = {}) {
|
|
|
9151
9151
|
// NOTE: `ownsWindows` is NOT structurally required — the framework's
|
|
9152
9152
|
// `mainWindowWebPreferences()` + `onMainWindowCreated()` hooks can supply both,
|
|
9153
9153
|
// and the project close→back lifecycle maps onto the Window facade's
|
|
9154
|
-
// `onClose`/`newSession` (probe-validated).
|
|
9155
|
-
// `runtime.windows.main`
|
|
9156
|
-
//
|
|
9154
|
+
// `onClose`/`newSession` (probe-validated). It is RETAINED BY DECISION, not
|
|
9155
|
+
// inertia: migrating to `runtime.windows.main` buys no user value at high
|
|
9156
|
+
// regression cost (see docs/deck-adoption-decision.md, F1). (The
|
|
9157
|
+
// `persist:simulator` partition is a fixed session used by child WCVs, not
|
|
9158
|
+
// main-window state.)
|
|
9157
9159
|
ownsWindows: true,
|
|
9158
9160
|
// Pre-ready: app name / CDP port / CSP / privileged scheme — must run before
|
|
9159
9161
|
// the framework awaits app.whenReady().
|
|
@@ -12,6 +12,11 @@ import type { WorkbenchAppConfig } from '../../shared/types.js';
|
|
|
12
12
|
* backend is present), so `assemble` ignores the framework `runtime` and builds
|
|
13
13
|
* the real devtools main window itself. Trust/frame unification and surfacing
|
|
14
14
|
* the runtime facade are deferred (see framework-extraction-v2.md §7).
|
|
15
|
+
*
|
|
16
|
+
* NOT migrating onto deck's high-level host API (Window facade / runtime.view /
|
|
17
|
+
* DeckSession / grants) is a DELIBERATE, reviewed decision — not a backlog item.
|
|
18
|
+
* The ROI matrix (every candidate NO-GO) + revisit conditions live in
|
|
19
|
+
* docs/deck-adoption-decision.md. Read it before re-proposing such a migration.
|
|
15
20
|
*/
|
|
16
21
|
export declare function createDevtoolsBackend(config?: WorkbenchAppConfig): RuntimeBackend;
|
|
17
22
|
//# sourceMappingURL=devtools-backend.d.ts.map
|
|
@@ -12,6 +12,11 @@ import { registerAppLifecycle } from '../app/lifecycle.js';
|
|
|
12
12
|
* backend is present), so `assemble` ignores the framework `runtime` and builds
|
|
13
13
|
* the real devtools main window itself. Trust/frame unification and surfacing
|
|
14
14
|
* the runtime facade are deferred (see framework-extraction-v2.md §7).
|
|
15
|
+
*
|
|
16
|
+
* NOT migrating onto deck's high-level host API (Window facade / runtime.view /
|
|
17
|
+
* DeckSession / grants) is a DELIBERATE, reviewed decision — not a backlog item.
|
|
18
|
+
* The ROI matrix (every candidate NO-GO) + revisit conditions live in
|
|
19
|
+
* docs/deck-adoption-decision.md. Read it before re-proposing such a migration.
|
|
15
20
|
*/
|
|
16
21
|
export function createDevtoolsBackend(config = {}) {
|
|
17
22
|
// Hoisted so `onShutdown` can reach the assembled context (assigned by `assemble`).
|
|
@@ -23,9 +28,11 @@ export function createDevtoolsBackend(config = {}) {
|
|
|
23
28
|
// NOTE: `ownsWindows` is NOT structurally required — the framework's
|
|
24
29
|
// `mainWindowWebPreferences()` + `onMainWindowCreated()` hooks can supply both,
|
|
25
30
|
// and the project close→back lifecycle maps onto the Window facade's
|
|
26
|
-
// `onClose`/`newSession` (probe-validated).
|
|
27
|
-
// `runtime.windows.main`
|
|
28
|
-
//
|
|
31
|
+
// `onClose`/`newSession` (probe-validated). It is RETAINED BY DECISION, not
|
|
32
|
+
// inertia: migrating to `runtime.windows.main` buys no user value at high
|
|
33
|
+
// regression cost (see docs/deck-adoption-decision.md, F1). (The
|
|
34
|
+
// `persist:simulator` partition is a fixed session used by child WCVs, not
|
|
35
|
+
// main-window state.)
|
|
29
36
|
ownsWindows: true,
|
|
30
37
|
// Pre-ready: app name / CDP port / CSP / privileged scheme — must run before
|
|
31
38
|
// the framework awaits app.whenReady().
|
|
@@ -90,7 +90,15 @@ export function createWorkspaceService(ctx) {
|
|
|
90
90
|
await ctx.onBeforeOpenProject(projectPath);
|
|
91
91
|
}
|
|
92
92
|
catch (err) {
|
|
93
|
-
|
|
93
|
+
// Surface the veto to the status bar — symmetric with the
|
|
94
|
+
// validateProjectDir rejection below (which already emits an error
|
|
95
|
+
// status). The framework caught the error, so it owns the minimal
|
|
96
|
+
// user-visible feedback; a host gate must not have to thread
|
|
97
|
+
// `notify` through a singleton just to report why the open was
|
|
98
|
+
// denied. The host can still layer richer UX (e.g. a dialog).
|
|
99
|
+
const error = err instanceof Error ? err.message : String(err);
|
|
100
|
+
sendStatus('error', error);
|
|
101
|
+
return { success: false, error };
|
|
94
102
|
}
|
|
95
103
|
}
|
|
96
104
|
clearSimulatorServicewechatReferer();
|
|
@@ -22,21 +22,24 @@ export function createMainWindow(opts) {
|
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
24
|
mainWindow.once('ready-to-show', () => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
const isTest = process.env.NODE_ENV === 'test';
|
|
26
|
+
// Visibility is governed by `autoShow` in BOTH envs. A login-gating host
|
|
27
|
+
// opts out via `autoShow: false` and reveals the window itself once auth
|
|
28
|
+
// passes — don't flash an un-authed window. The env only chooses HOW to
|
|
29
|
+
// show: test uses showInactive() so e2e windows don't steal focus, prod
|
|
30
|
+
// uses show(). The framework must never force-show when the host opted
|
|
31
|
+
// out, in test env either (that would fight the host's own reveal handler).
|
|
32
|
+
if (opts.autoShow !== false) {
|
|
33
|
+
if (isTest)
|
|
34
|
+
mainWindow.showInactive();
|
|
35
|
+
else
|
|
32
36
|
mainWindow.show();
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
37
|
+
}
|
|
38
|
+
// Don't auto-open a detached DevTools for the devtools UI shell itself —
|
|
39
|
+
// it's noise for normal use (the mini-app's Console lives in the embedded
|
|
40
|
+
// right-panel DevTools, not here). Opt in via env for debugging the shell.
|
|
41
|
+
if (!isTest && !app.isPackaged && process.env.DIMINA_DEVTOOLS_MAIN_INSPECTOR === '1') {
|
|
42
|
+
mainWindow.webContents.openDevTools({ mode: 'detach' });
|
|
40
43
|
}
|
|
41
44
|
});
|
|
42
45
|
const rendererDir = path.dirname(opts.indexHtml);
|