INBUXA Admin built its own source into every deployment: the whole tree packed as source.tar.gz next to the app, with an identity string shown beside the link and in the version tooltip. The top bar menu and the source link offered that download. It answered the AGPL precisely -- the source of *this* build, uncommitted work and all -- but it paid for that by carrying the tree into every deployment, to a repository that is public and already has it. The version shown beside the link already names the build, so the link and the version together say what the archive said. This is the same change already made to ihasmail-inbuxa, for the same reason, and it leaves the two forks answering the offer the same way. It is also what lets INBUXA Admin be built in an Alpine image: the plugin shelled out to `tar --transform`, which BusyBox tar does not have, so `npm run build` failed there and nowhere else. Removed with it: source-archive.ts, the Vite plugin call, __SOURCE_ID__ and sourceDownloadUrl(). The build no longer shells out to git or tar, and nothing is written next to the app. The two strings that named the archive change with it: the link now reads "Source code (<version>), AGPL-3.0" rather than naming a tree id, and the version tooltip drops the id it appended.
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
// defineConfig comes from vitest/config rather than vite, which is what puts
|
|
// the `test` key below in scope. It replaces a triple-slash reference that did
|
|
// the same job and that eslint rejects.
|
|
import { configDefaults, defineConfig } from 'vitest/config'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import path from 'path'
|
|
import { version } from './package.json' with { type: 'json' }
|
|
// INBUXA's own dated version lives apart from package.json, whose version
|
|
// follows upstream WebUI so its bumps merge without conflicts.
|
|
import inbuxa from './inbuxa-version.json' with { type: 'json' }
|
|
|
|
export default defineConfig({
|
|
base: './',
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(`${inbuxa.version} (base ${version})`),
|
|
},
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(import.meta.dirname, './src'),
|
|
},
|
|
},
|
|
test: {
|
|
globals: false,
|
|
environment: 'happy-dom',
|
|
exclude: [...configDefaults.exclude, '**/.ignore/**'],
|
|
},
|
|
})
|