6989a98d75
- Arkitektur: docs/auth/passwordless-architecture.md - Backend: iom/quixzoom-auth-service/ (FastAPI + Redis) - Webb: quixzoom-market-pages/se/login/ (QR-kod + polling) - App: iom/quixzoom-app/src/features/auth/ (push + deep links) Flöde: QR-kod → app-godkännande → webb-inloggad
125 lines
2.3 KiB
JavaScript
125 lines
2.3 KiB
JavaScript
import pkg from './package.json' with { type: 'json' };
|
|
import { babel } from '@rollup/plugin-babel';
|
|
import copy from 'rollup-plugin-copy';
|
|
|
|
const external = [
|
|
'stream',
|
|
'fs',
|
|
'zlib',
|
|
'fontkit',
|
|
'events',
|
|
'linebreak',
|
|
'png-js',
|
|
'js-md5',
|
|
'@noble/hashes/utils',
|
|
'@noble/hashes/sha256',
|
|
'@noble/ciphers/aes',
|
|
'crypto',
|
|
'saslprep',
|
|
];
|
|
|
|
const supportedBrowsers = [
|
|
'Firefox 115', // ESR from 2023
|
|
'iOS 16', // from 2022
|
|
'Safari 16', // from 2022
|
|
];
|
|
|
|
export default [
|
|
// CommonJS build for Node
|
|
{
|
|
input: 'lib/document.js',
|
|
external,
|
|
output: {
|
|
name: 'pdfkit',
|
|
file: pkg.main,
|
|
format: 'cjs',
|
|
sourcemap: true,
|
|
interop: 'default',
|
|
},
|
|
plugins: [
|
|
babel({
|
|
babelHelpers: 'bundled',
|
|
babelrc: false,
|
|
presets: [
|
|
[
|
|
'@babel/preset-env',
|
|
{
|
|
modules: false,
|
|
targets: {
|
|
node: '20',
|
|
},
|
|
},
|
|
],
|
|
],
|
|
comments: false,
|
|
}),
|
|
copy({
|
|
targets: [
|
|
{
|
|
src: ['lib/font/data/*.afm', 'lib/mixins/data/*.icc'],
|
|
dest: 'js/data',
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
},
|
|
// ES for green browsers
|
|
{
|
|
input: 'lib/document.js',
|
|
external,
|
|
output: {
|
|
name: 'pdfkit.es',
|
|
file: pkg.module,
|
|
format: 'es',
|
|
sourcemap: true,
|
|
},
|
|
plugins: [
|
|
babel({
|
|
babelHelpers: 'bundled',
|
|
babelrc: false,
|
|
presets: [
|
|
[
|
|
'@babel/preset-env',
|
|
{
|
|
modules: false,
|
|
bugfixes: true,
|
|
targets: {
|
|
browsers: supportedBrowsers,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
comments: false,
|
|
}),
|
|
],
|
|
},
|
|
{
|
|
input: 'lib/virtual-fs.js',
|
|
external,
|
|
output: {
|
|
name: 'virtual-fs',
|
|
file: 'js/virtual-fs.js',
|
|
format: 'es',
|
|
sourcemap: false,
|
|
},
|
|
plugins: [
|
|
babel({
|
|
babelHelpers: 'bundled',
|
|
babelrc: false,
|
|
presets: [
|
|
[
|
|
'@babel/preset-env',
|
|
{
|
|
loose: true,
|
|
modules: false,
|
|
targets: {
|
|
browsers: supportedBrowsers,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
}),
|
|
],
|
|
},
|
|
];
|