mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-06 01:25:28 +00:00
remove bun for database, bun isn't compatible with current entity setup, joins lead to circular includes
This commit is contained in:
parent
d831380a1e
commit
f1e619f3a2
@ -1,26 +0,0 @@
|
|||||||
import fs from 'node:fs'
|
|
||||||
import { latestDbVersion } from './src/config/detectLastDBVersion'
|
|
||||||
|
|
||||||
await Bun.build({
|
|
||||||
entrypoints: ['entity/index.ts'],
|
|
||||||
bundle: true,
|
|
||||||
target: 'bun',
|
|
||||||
packages: 'external',
|
|
||||||
outdir: './build',
|
|
||||||
plugins: [
|
|
||||||
{
|
|
||||||
// hardcode last db version string into index.ts, before parsing
|
|
||||||
name: 'replace-latest-db-version-import',
|
|
||||||
setup(build) {
|
|
||||||
build.onLoad({ filter: /index\.ts$/ }, async (args) => {
|
|
||||||
let source = await fs.promises.readFile(args.path, 'utf8')
|
|
||||||
source = source.replace(
|
|
||||||
/import\s*\{\s*latestDbVersion\s*\}\s*from\s*['"][^'"]+['"]/,
|
|
||||||
`const latestDbVersion = "${latestDbVersion}";`,
|
|
||||||
)
|
|
||||||
return { contents: source, loader: 'ts' }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
|
||||||
@ -16,7 +16,6 @@
|
|||||||
"private": false,
|
"private": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsx ./esbuild.config.ts",
|
"build": "tsx ./esbuild.config.ts",
|
||||||
"build:bun": "bun ./bun.build.ts",
|
|
||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"up": "cross-env TZ=UTC tsx src/index.ts up",
|
"up": "cross-env TZ=UTC tsx src/index.ts up",
|
||||||
"down": "cross-env TZ=UTC tsx src/index.ts down",
|
"down": "cross-env TZ=UTC tsx src/index.ts down",
|
||||||
@ -34,7 +33,6 @@
|
|||||||
"@types/faker": "^5.5.9",
|
"@types/faker": "^5.5.9",
|
||||||
"@types/geojson": "^7946.0.13",
|
"@types/geojson": "^7946.0.13",
|
||||||
"@types/node": "^17.0.21",
|
"@types/node": "^17.0.21",
|
||||||
"bun": "^1.2.11",
|
|
||||||
"esbuild": "^0.25.2",
|
"esbuild": "^0.25.2",
|
||||||
"prettier": "^2.8.7",
|
"prettier": "^2.8.7",
|
||||||
"tsx": "^4.19.4",
|
"tsx": "^4.19.4",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user