**test(web-service): add cloud storage integration tests and update package settings**
- **Cloud Storage Integration Testing**:
- Added `cloud-storage.test.ts` to validate cloud storage configurations (AWS S3, Cloudflare R2, Google Cloud Storage) and local storage fallback behavior:
- Includes tests for environment variable priority and configuration detection.
- Ensures proper override with `FORCE_LOCAL_STORAGE` when specified.
- **Package Settings Updates**:
- Introduced `web-service-package/package.json` with configurations for building, running, testing, and deployment:
- Added NPM scripts for building (`npm run build`), development (`npm run dev`), and testing (`npm run test:cloud`).
- Configured dependencies and devDependencies for web service functionality and cloud integration.
- **Purpose**:
- This update ensures comprehensive cloud storage testing and provides structured project configurations for seamless development and deployment workflows.
This commit is contained in:
parent
2425b3ad42
commit
0c7e999a2f
14 changed files with 7241 additions and 0 deletions
57
web-service-package/rollup.config.js
Normal file
57
web-service-package/rollup.config.js
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import typescript from '@rollup/plugin-typescript'
|
||||
import json from '@rollup/plugin-json'
|
||||
import terser from '@rollup/plugin-terser'
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production'
|
||||
|
||||
export default {
|
||||
input: 'src/server.ts',
|
||||
output: {
|
||||
file: 'dist/server.js',
|
||||
format: 'es',
|
||||
sourcemap: true,
|
||||
banner: '#!/usr/bin/env node'
|
||||
},
|
||||
external: [
|
||||
// Node.js built-ins
|
||||
'fs',
|
||||
'path',
|
||||
'url',
|
||||
'crypto',
|
||||
'os',
|
||||
'util',
|
||||
'events',
|
||||
'stream',
|
||||
'buffer',
|
||||
'querystring',
|
||||
'http',
|
||||
'https',
|
||||
'net',
|
||||
'tls',
|
||||
'zlib',
|
||||
// External dependencies that should not be bundled
|
||||
'express',
|
||||
'cors',
|
||||
'helmet',
|
||||
'compression',
|
||||
'express-rate-limit',
|
||||
'express-validator',
|
||||
'@soulcraft/brainy'
|
||||
],
|
||||
plugins: [
|
||||
resolve({
|
||||
preferBuiltins: true,
|
||||
exportConditions: ['node']
|
||||
}),
|
||||
commonjs(),
|
||||
json(),
|
||||
typescript({
|
||||
tsconfig: './tsconfig.json',
|
||||
sourceMap: true,
|
||||
inlineSources: !isProduction
|
||||
}),
|
||||
...(isProduction ? [terser()] : [])
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue