Files
GDevelop-BYOK/patch/manifest.json
T

83 lines
5.3 KiB
JSON

[
{
"id": "P001",
"file": "newIDE/app/src/Utils/GDevelopServices/Usage.js",
"description": "hasValidSubscriptionPlan always returns true (R004)",
"required": true,
"finder": "export const hasValidSubscriptionPlan = \\([\\s\\S]*?return false;\\n\\};",
"replacer": "export const hasValidSubscriptionPlan = (\n subscription: ?Subscription\n): boolean => {\n return true; // BYOK PATCH: always return valid subscription\n};",
"verify": "BYOK PATCH: always return valid subscription"
},
{
"id": "P002",
"file": "newIDE/app/src/Utils/GDevelopServices/Usage.js",
"description": "getUserLimits returns maximum capabilities (R005)",
"required": true,
"finder": "export const getUserLimits = async \\([\\s\\S]*?return ensureObjectHasProperty\\(\\{\\}\\);\\n\\};",
"replacer": "export const getUserLimits = async (\n getAuthorizationHeader: () => Promise<string>,\n userId: string\n): Promise<Limits> => {\n // BYOK PATCH: return maximum limits\n return {\n 'gdevelop.maxGames': 9999,\n 'gdevelop.maxCloudProjects': 9999,\n 'gdevelop.maxBuildsPerDay': 9999,\n 'gdevelop.maxBuildsPerMonth': 9999,\n 'gdevelop.maxBuildsTotal': 9999,\n 'gdevelop.maxExtensions': 9999,\n 'gdevelop.maxLeaderboards': 9999,\n 'gdevelop.maxMultiplayerGames': 9999,\n 'gdevelop.maxTextToSpeech': 9999,\n 'gdevelop.maxAITokens': 9999,\n 'gdevelop.maxAIProjects': 9999,\n 'gdevelop.maxCloudBuilds': 9999,\n 'gdevelop.maxEvents': 9999,\n 'gdevelop.maxObjects': 9999,\n 'gdevelop.maxLayers': 9999,\n 'gdevelop.maxScenes': 9999,\n 'gdevelop.maxExternalLayouts': 9999,\n 'gdevelop.maxEffects': 9999,\n 'gdevelop.maxAdMob': 9999,\n };\n};",
"verify": "BYOK PATCH: return maximum limits"
},
{
"id": "P003",
"file": "newIDE/app/src/Utils/GDevelopServices/ApiConfigs.js",
"description": "GDevelopGenerationApi baseUrl dynamic override",
"required": true,
"finder": "baseUrl: \\(\\(isDev[\\s\\S]*?\\): string\\),",
"replacer": "baseUrl: typeof window !== 'undefined' && window.__BYOK_API_BASE_URL__\n ? window.__BYOK_API_BASE_URL__\n : ((isDev\n ? 'https://api-dev.gdevelop.io/generation'\n : 'https://api.gdevelop.io/generation'): string), // BYOK PATCH: dynamic override",
"verify": "BYOK PATCH: dynamic override"
},
{
"id": "P004",
"file": "newIDE/electron-app/app/scripts/preload.js",
"description": "Inject BYOK proxy detection into preload script",
"required": true,
"finder": "// Expose protected methods\\n// Preload script for GDevelop electron app\\ncontextBridge\\.exposeInMainWorld\\('electronAPI', \\{\\}\\)\\;",
"replacer": "// Expose protected methods\n// BYOK PATCH: inject proxy detection\nif (process.env.BYOK_PROXY === 'true') {\n contextBridge.exposeInMainWorld('__BYOK_PROXY__', true);\n}\n// Preload script for GDevelop electron app\ncontextBridge.exposeInMainWorld('electronAPI', {});",
"verify": "BYOK PATCH: inject proxy detection"
},
{
"id": "P005",
"file": "newIDE/app/src/ProjectCreation/ProjectPropertiesDialog.js",
"description": "Watermark toggle always unlocked (R006)",
"required": true,
"finder": "const canRemoveWatermark = hasValidSubscription && subscription\\.planId;",
"replacer": "const canRemoveWatermark = true; // BYOK PATCH: always allow watermark removal",
"verify": "BYOK PATCH: always allow watermark removal"
},
{
"id": "P006",
"file": "newIDE/app/src/ExportAndShare/ShareDialog/DummyDialog.js",
"description": "Remove build quota limit check",
"required": true,
"finder": "const limitReached = currentBuilds >= maximumCount;",
"replacer": "const limitReached = false; /* BYOK PATCH: remove build quota */",
"verify": "BYOK PATCH: remove build quota"
},
{
"id": "P007",
"file": "GDJS/Runtime/index.html",
"description": "Watermark default to false in GDJS runtime (R006)",
"required": true,
"finder": "\"showWatermark\": true,",
"replacer": "\"showWatermark\": false, // BYOK PATCH",
"verify": "\"showWatermark\": false,"
},
{
"id": "P008",
"file": "Core/GDCore/Project/Project.cpp",
"description": "Watermark default to false in C++ core (R006)",
"required": true,
"finder": "SetShowWatermark\\(true\\);",
"replacer": "SetShowWatermark(false); // BYOK PATCH",
"verify": "SetShowWatermark\\(false\\);"
},
{
"id": "P009",
"file": "newIDE/electron-app/app/scripts/main.js",
"description": "Inject BYOK proxy initialization into Electron main process",
"required": true,
"finder": "(const \\{ app, BrowserWindow \\} = require\\('electron'\\);)([\\s\\S]*?)(app\\.on\\('ready', createWindow\\);)",
"replacer": "$1\nconst { createByokProxy } = require('./byok-proxy'); // BYOK PATCH\nconst { createByokConfigStore, getByokConfig } = require('./byok-config'); // BYOK PATCH\n\n$2app.on('ready', () => {\n // BYOK PATCH: start proxy before creating main window\n const __store = createByokConfigStore();\n const __proxy = createByokProxy(() => getByokConfig(__store));\n __proxy.start(11400).then(\n () => console.log('[BYOK] Proxy running on port 11400'),\n (err) => console.error('[BYOK] Proxy start failed:', err)\n );\n createWindow();\n});",
"verify": "const \\{ createByokProxy \\} = require\\('./byok-proxy'\\);"
}
]