Add Discordjs
CI / Build & Test (push) Failing after 52s

This commit is contained in:
2026-09-04 22:10:35 -04:00
parent 998cb3521f
commit 693814f46b
85 changed files with 5945 additions and 28 deletions
@@ -0,0 +1,36 @@
import fs from 'node:fs/promises';
import path from 'node:path';
const args = process.argv.slice(2);
const discordRoot = args.includes('--discord-root')
? args[args.indexOf('--discord-root') + 1]
: path.join(process.cwd(), 'node_modules', 'discord.js');
const out = args.includes('--out') ? args[args.indexOf('--out') + 1] : path.join(process.cwd(), 'patches');
if (!discordRoot || !out) {
console.error('Usage: node scripts/generate-patches.mjs [--discord-root <path>] [--out <path>]');
process.exit(1);
}
const manifest = {
generatedAt: new Date().toISOString(),
discordRoot,
patches: [
{
id: 'runtime-loader-hook',
description: 'Placeholder patch for injected runtime websocket/fetch adapters.',
target: 'packages/ws/src/ws/WebSocketShard.ts',
strategy: 'future-overlay'
},
{
id: 'rest-transport-bridge',
description: 'Placeholder patch for undici/Bare transport bridge if needed.',
target: 'packages/rest/src/index.ts',
strategy: 'future-overlay'
}
]
};
await fs.mkdir(out, { recursive: true });
await fs.writeFile(path.join(out, 'patch-manifest.json'), JSON.stringify(manifest, null, 2));
console.log('Generated patch manifest at', path.join(out, 'patch-manifest.json'));