@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.
@@ -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('persist:simulator');
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