fix(plugins): add missing automations plugin to build script

The automations plugin was missing from the build-all.js script, causing
its manifest.json to not be copied to src/assets/bundled-plugins/.

This resulted in 404 errors during E2E tests (6 per test × ~199 tests =
~1,194 404s total) because plugin.service.ts tries to load all 6
bundled plugins but only 5 were being built.

Added automations plugin configuration to build-all.js with the same
pattern as other bundled plugins (build + copy dist files to assets).

Fixes: 1,146 console 404 errors in E2E test runs
Related: plugin.service.ts lines 93-156 (_discoverBuiltInPlugins)
This commit is contained in:
Johannes Millan 2026-01-23 19:54:14 +01:00
parent 5f9d529eb7
commit 28e4335c99

View file

@ -186,6 +186,33 @@ const plugins = [
return 'Built and copied to assets';
},
},
{
name: 'automations',
path: 'automations',
needsInstall: true,
copyToAssets: true,
buildCommand: async (pluginPath) => {
await execAsync(`cd ${pluginPath} && npm run build`);
// Copy to assets directory
const targetDir = path.join(
__dirname,
'../../../src/assets/bundled-plugins/automations',
);
if (!fs.existsSync(targetDir)) {
fs.mkdirSync(targetDir, { recursive: true });
}
const distPath = path.join(pluginPath, 'dist');
if (fs.existsSync(distPath)) {
const files = fs.readdirSync(distPath);
for (const file of files) {
const src = path.join(distPath, file);
const dest = path.join(targetDir, file);
copyRecursive(src, dest);
}
}
return 'Built and copied to assets';
},
},
];
async function buildPlugin(plugin) {