mirror of
https://github.com/Heretek-AI/GDevelop-BYOK.git
synced 2026-07-20 05:53:34 -04:00
[GH-ISSUE #19] M001/S01/T03: Update patch manifest and test fixtures for embedded proxy #20
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BillyOutlast on GitHub (May 16, 2026).
Original GitHub issue: https://github.com/Heretek-AI/GDevelop-BYOK/issues/19
T03: Update patch manifest and test fixtures for embedded proxy
The patch manifest (patch/manifest.json) currently has 9 entries (P001-P009). P004 and P009 reference the old Express proxy pattern. They need new finder/replacer/verify patterns for the IPC-based embedded model. The premium-unlock entries (P001-P002, P005-P008) stay unchanged. P003 (ApiConfigs.js) stays unchanged — will be replaced in S03 with a Generation.js patch. (1) Update patch/manifest.json: Add new P004 entry — finder looks for 'contextBridge.exposeInMainWorld("electronAPI", {})', replacer inserts byokAiRequest and byokAiRequestStatus before the electronAPI exposure. Verify pattern confirms byokAiRequest presence. Add new P009 entry — finder matches from 'const { app, BrowserWindow } = require("electron")' through 'app.on("ready", createWindow)', replacer injects 'const { registerByokIpcHandlers } = require("./byok-embedded");' after require and changes ready handler to wire ipcMain. Verify pattern confirms registerByokIpcHandlers. Update restore-fixtures.js comment header to reflect S01 fixture state. (2) Add new fixture file: create test/fixtures/newIDE/electron-app/app/scripts/byok-embedded.js — a minimal module that exports registerByokIpcHandlers so the P009 verify check passes.
Files
patch/manifest.jsontest/fixtures/newIDE/electron-app/app/scripts/main.jstest/fixtures/newIDE/electron-app/app/scripts/preload.jstest/fixtures/newIDE/electron-app/app/scripts/byok-embedded.jsscripts/restore-fixtures.jsVerification