This repository was archived by the owner on Jan 29, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathrollup.consensus.config.js
More file actions
70 lines (68 loc) · 1.91 KB
/
rollup.consensus.config.js
File metadata and controls
70 lines (68 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';
import json from '@rollup/plugin-json';
import terser from '@rollup/plugin-terser';
import { visualizer } from 'rollup-plugin-visualizer';
const isProduction = process.env.NODE_ENV === 'production';
export default {
input: 'src/protocols/a2a/security/consensus-coordinator.ts',
output: [
{
file: 'dist/consensus/consensus-coordinator.js',
format: 'es',
sourcemap: !isProduction
},
{
file: 'dist/consensus/consensus-coordinator.cjs',
format: 'cjs',
sourcemap: !isProduction
}
],
external: [
// Node.js built-ins
'crypto', 'events', 'fs', 'http', 'https', 'net', 'os', 'path', 'stream', 'url', 'util',
// External dependencies
'express', 'ws', 'redis', 'mongodb', 'kafka-node', 'prometheus-client',
'pino', 'joi', 'lodash', 'moment', 'uuid', 'crypto-js', 'jsonwebtoken',
'bcryptjs', 'helmet', 'cors', 'compression', 'rate-limiter-flexible',
'bull', 'ioredis', 'pg', 'sequelize', 'mongoose', 'axios', 'node-fetch'
],
plugins: [
resolve({
preferBuiltins: true,
browser: false
}),
commonjs(),
typescript({
tsconfig: './tsconfig.json',
sourceMap: !isProduction,
inlineSources: !isProduction
}),
json(),
...(isProduction ? [
terser({
compress: {
drop_console: true,
drop_debugger: true
},
mangle: {
keep_classnames: true,
keep_fnames: true
}
})
] : []),
visualizer({
filename: 'dist/consensus/bundle-analysis.html',
open: false,
gzipSize: true
})
],
onwarn: (warning, warn) => {
// Suppress circular dependency warnings for known safe cases
if (warning.code === 'CIRCULAR_DEPENDENCY') {
return;
}
warn(warning);
}
};