prepare federation for using emails

This commit is contained in:
einhornimmond 2025-11-24 14:45:50 +01:00
parent d9647183c5
commit d07e9ba413
3 changed files with 12 additions and 3 deletions

View File

@ -8,8 +8,9 @@ build({
target: 'node18.20.7',
bundle: true,
keepNames: true,
entryNames: '[name]',
// legalComments: 'inline',
external: ['sodium-native'],
external: ['sodium-native', 'email-templates'],
plugins: [esbuildDecorators()],
minify: true,
sourcemap: true,

View File

@ -8,13 +8,14 @@
"license": "Apache-2.0",
"private": false,
"scripts": {
"build": "ts-node ./esbuild.config.ts",
"build": "ts-node ./esbuild.config.ts && mkdirp build/templates/ && ncp ../core/src/emails/templates build/templates",
"start": "cross-env TZ=UTC NODE_ENV=production node build/index.js",
"start:bun": "cross-env TZ=UTC NODE_ENV=production bun build/index.js",
"dev": "cross-env TZ=UTC nodemon -w src --ext ts,json,css -r tsconfig-paths/register src/index.ts",
"dev:bun": "cross-env TZ=UTC bun --hot src/index.ts",
"typecheck": "tsc --noEmit",
"test": "cross-env TZ=UTC NODE_ENV=development DB_DATABASE=gradido_test_federation jest --runInBand --forceExit --detectOpenHandles",
"test:bun": "cross-env TZ=UTC NODE_ENV=development DB_DATABASE=gradido_test_federation bun test",
"test:debug": "cross-env TZ=UTC NODE_ENV=development DB_DATABASE=gradido_test_federation node --inspect-brk node_modules/.bin/jest --bail --runInBand --forceExit --detectOpenHandles",
"test:coverage": "cross-env TZ=UTC NODE_ENV=development DB_DATABASE=gradido_test_federation jest --coverage --runInBand --forceExit --detectOpenHandles",
"lint": "biome check --error-on-warnings .",
@ -23,6 +24,7 @@
},
"dependencies": {
"cross-env": "^7.0.3",
"email-templates": "^10.0.1",
"sodium-native": "^3.4.1"
},
"devDependencies": {
@ -60,6 +62,8 @@
"joi": "17.13.3",
"lodash.clonedeep": "^4.5.0",
"log4js": "^6.7.1",
"mkdirp": "^3.0.1",
"ncp": "^2.0.0",
"nodemon": "^2.0.7",
"prettier": "^3.5.3",
"reflect-metadata": "^0.1.13",

View File

@ -6,6 +6,7 @@
// "incremental": true, /* Enable incremental compilation */
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
"resolveJsonModule": true,
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
@ -62,7 +63,7 @@
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
"typeRoots": [ /* List of folders to include type definitions from. */
"node_modules/@types",
"../node_modules/@types"
"../node_modules/@types",
],
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
@ -84,6 +85,9 @@
"skipLibCheck": true, /* Skip type checking of declaration files. */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
},
"include": [
"../core/src/types",
],
"ts-node": {
"swc": true
}