Files
bruno/packages/bruno-common/rollup.config.js
Pragadesh-45 58942b383d Feat: Support PAC file upload (#7651)
* Add proxy .pac file resolver

chore(dependencies): update package-lock.json with new dependencies and version upgrades

- Added new dependencies: ajv, git-url-parse, @opencollection/types, and storybook packages.
- Updated existing dependencies to their latest versions, including eslint and babel packages.
- Removed deprecated entries and cleaned up the package-lock structure for better maintainability.

* tests

* wip

* wip

* wip

* wip

* feat: file upload .pac

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* feat: Refactor proxy settings to use a new structure for PAC configuration. Introduced 'source' field to determine proxy type (manual or PAC) and updated related validation and state management. Removed deprecated 'pacUrl' field in favor of 'pac.source'. Updated preferences schema and test data accordingly.

* fix: Update proxy settings to correctly reference 'source' field for PAC configuration. Adjusted state management and validation logic to align with new structure. Enhanced tests for backward compatibility and new format handling.

* feat: Enhance proxy configuration by adding 'proxyModeReason' to provide context for proxy settings. Updated related functions to accommodate the new parameter and improved logging for proxy mode changes.

* wip

* refactor: Update proxy settings to remove 'inherit' field and replace it with 'source' for better clarity. Adjusted validation schema, default preferences, and migration logic to align with the new structure. Enhanced tests to ensure compatibility with the updated proxy configuration.

* wip

* wip

* wip

* wip

* wip

* chore: consistent path check

* chore: consistency

* tests(pac): fix unit params

---------

Co-authored-by: Gianluca D'Abrosca <gianluca.dabrosca.1999@gmail.com>
Co-authored-by: Sid <siddharth@usebruno.com>
2026-04-07 17:00:32 +05:30

75 lines
1.8 KiB
JavaScript

const { nodeResolve } = require('@rollup/plugin-node-resolve');
const commonjs = require('@rollup/plugin-commonjs');
const typescript = require('@rollup/plugin-typescript');
const dts = require('rollup-plugin-dts');
const terser = require('@rollup/plugin-terser').default;
const peerDepsExternal = require('rollup-plugin-peer-deps-external');
const packageJson = require('./package.json');
function createBuildConfig({ inputDir, input, cjsOutput, esmOutput, dtsOutput, external = [] }) {
return [
{
input,
external,
output: [
{
file: cjsOutput,
format: 'cjs',
sourcemap: true
},
{
file: esmOutput,
format: 'esm',
sourcemap: true
}
],
plugins: [
peerDepsExternal(),
nodeResolve(),
commonjs(),
typescript({
tsconfig: './tsconfig.json',
include: [inputDir]
}),
terser()
],
treeshake: {
moduleSideEffects: false
}
},
{
input,
external,
output: { file: dtsOutput, format: 'es' },
plugins: [dts.default({ tsconfig: './tsconfig.json' })]
}
];
}
module.exports = [
// Main package build
...createBuildConfig({
inputDir: 'src/**/*',
input: 'src/index.ts',
cjsOutput: packageJson.main,
esmOutput: packageJson.module,
dtsOutput: packageJson.types
}),
// reports/html
...createBuildConfig({
inputDir: 'src/runner/**/*',
input: 'src/runner/index.ts',
cjsOutput: 'dist/runner/cjs/index.js',
esmOutput: 'dist/runner/esm/index.js',
dtsOutput: 'dist/runner/index.d.ts'
}),
...createBuildConfig({
inputDir: 'src/utils/**/*',
input: 'src/utils/index.ts',
cjsOutput: 'dist/utils/cjs/index.js',
esmOutput: 'dist/utils/esm/index.js',
dtsOutput: 'dist/utils/index.d.ts'
}),
];