import alias from '@rollup/plugin-alias'; import consts from 'rollup-plugin-consts'; import url from '@rollup/plugin-url'; import commonjs from '@rollup/plugin-commonjs'; import json from '@rollup/plugin-json'; import { nodeResolve } from '@rollup/plugin-node-resolve'; import {signatureGuardStart, signatureGuardEnd} from "./signing-common.mjs" export default { input: 'updateable-launcher.mjs', output: { format: 'cjs', file: 'build/smva-indexer-bundle.js', sourcemap: 'inline', banner: Buffer.from(signatureGuardStart).toString("utf-8") + "(Unsigned)" + Buffer.from(signatureGuardEnd).toString("utf-8") }, external: ['fs/promises', 'fs', 'path', 'process', 'os', 'tty'], plugins: [ alias({ entries: [ { find: 'node:path', replacement: 'path' }, { find: 'node:process', replacement: 'process' }, { find: 'node:os', replacement: 'os' }, { find: 'node:tty', replacement: 'tty' }, { find: 'node:fs', replacement: 'fs' }, ] }), consts({ buildTimestamp: new Date().getTime(), configName: "SMVA-Indexer" }), url({ limit: 4096, include: ["./smva-indexer-release.pub.pem"], emitFiles: false, }), commonjs(), json({ compact: true, }), nodeResolve({ exportConditions: ["node"], preferBuiltins: true, }),] };