@dimina-kit/devtools 0.3.2-dev.20260610082053 → 0.3.2-dev.20260610114009
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 +8 -1
- package/dist/main/index.bundle.js +286 -161
- package/dist/main/ipc/bridge-router.js +36 -3
- package/dist/main/ipc/simulator.js +1 -21
- package/dist/main/services/simulator-temp-files/index.js +38 -16
- package/dist/main/services/views/miniapp-partition.d.ts +80 -0
- package/dist/main/services/views/miniapp-partition.js +138 -0
- package/dist/main/services/views/simulator-session-policy.d.ts +28 -0
- package/dist/main/services/views/simulator-session-policy.js +82 -0
- package/dist/main/services/views/view-manager.js +22 -9
- package/dist/main/windows/main-window/create.js +1 -27
- package/dist/main/windows/service-host-window/create.d.ts +19 -4
- package/dist/main/windows/service-host-window/create.js +34 -8
- package/dist/preload/windows/main.cjs.map +1 -1
- package/dist/preload/windows/simulator.cjs.map +1 -1
- package/dist/service-host/sync-impls/menu-button-geometry.js +8 -0
- package/dist/service-host/sync-impls/menu-button.js +1 -1
- package/dist/shared/bridge-channels.d.ts +14 -0
- package/dist/shared/bridge-channels.js +27 -0
- package/dist/simulator/assets/{device-shell-vwYSOVrh.js → device-shell-fH2cI-3q.js} +2 -2
- package/dist/simulator/assets/{simulator-DddliUL5.js → simulator-DHylZf9Z.js} +3 -3
- package/dist/simulator/simulator.html +1 -1
- package/package.json +8 -7
package/dist/main/app/app.js
CHANGED
|
@@ -19,6 +19,8 @@ import { setupSimulatorAppData } from '../services/simulator-appdata/index.js';
|
|
|
19
19
|
import { setupSimulatorCurrentPage } from '../services/simulator-current-page/index.js';
|
|
20
20
|
import { createRenderInspector } from '../services/render-inspect/index.js';
|
|
21
21
|
import { setupSimulatorTempFiles } from '../services/simulator-temp-files/index.js';
|
|
22
|
+
import { SHARED_MINIAPP_PARTITION } from '../services/views/miniapp-partition.js';
|
|
23
|
+
import { setupSimulatorSessionPolicy } from '../services/views/simulator-session-policy.js';
|
|
22
24
|
import { UpdateManager } from '../services/update/index.js';
|
|
23
25
|
import { toDisposable } from '@dimina-kit/electron-deck/main';
|
|
24
26
|
import { IpcRegistry } from '../utils/ipc-registry.js';
|
|
@@ -310,6 +312,11 @@ export async function createDevtoolsRuntime(config = {}) {
|
|
|
310
312
|
context.registry.add(registerAppIpc(context));
|
|
311
313
|
// Sandboxed project file-system IPC for the in-renderer Monaco editor.
|
|
312
314
|
context.registry.add(registerProjectFsIpc(context));
|
|
315
|
+
// Referer/CORS webRequest policy for the simulator runtime's sessions (shared
|
|
316
|
+
// fallback + every per-project partition). Registered into the context
|
|
317
|
+
// registry so its configurator + per-session listeners are torn down with the
|
|
318
|
+
// context — re-creating the app never leaks a duplicate configurator.
|
|
319
|
+
context.registry.add(setupSimulatorSessionPolicy());
|
|
313
320
|
// One process-wide listener that re-syncs every window's native
|
|
314
321
|
// backgroundColor on theme change — windows otherwise keep the stale
|
|
315
322
|
// creation-time color (see installThemeBackgroundSync).
|
|
@@ -320,7 +327,7 @@ export async function createDevtoolsRuntime(config = {}) {
|
|
|
320
327
|
// protocol live. The module installs its own narrow sender-policy
|
|
321
328
|
// (simulator-session-only) — see file header — because the default
|
|
322
329
|
// workbench policy intentionally rejects the simulator <webview>.
|
|
323
|
-
const simSession = session.fromPartition(
|
|
330
|
+
const simSession = session.fromPartition(SHARED_MINIAPP_PARTITION);
|
|
324
331
|
context.registry.add(setupSimulatorTempFiles(simSession));
|
|
325
332
|
installMenu(config, mainWindow, context);
|
|
326
333
|
// Gated custom-IPC surface for the host. Bound to ctx.senderPolicy so
|