fix buzzer activated dependencies
This commit is contained in:
parent
aa1de04fe7
commit
fe8f5ae738
Binary file not shown.
@ -13,13 +13,16 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@twilio-labs/serverless-runtime-types": "^4.0.1",
|
"@twilio-labs/serverless-runtime-types": "^4.0.1",
|
||||||
"@twilio/runtime-handler": "1.3.0",
|
"@twilio/runtime-handler": "1.3.0",
|
||||||
|
"doorman-api": "workspace:*",
|
||||||
"node-fetch": "^2.7.0",
|
"node-fetch": "^2.7.0",
|
||||||
"prom-client": "^15.1.3",
|
"prom-client": "^15.1.3",
|
||||||
"prometheus-remote-write": "^0.5.1",
|
"prometheus-remote-write": "^0.5.1",
|
||||||
"promise.timeout": "^1.2.0",
|
"promise.timeout": "^1.2.0",
|
||||||
"twilio": "^3.84.1",
|
"twilio": "^3.84.1",
|
||||||
"winston": "^3.17.0",
|
"winston": "^3.17.0",
|
||||||
"winston-loki": "^6.1.3"
|
"winston-loki": "^6.1.3",
|
||||||
|
"zod": "^3.25.56",
|
||||||
|
"zod_utilz": "^0.8.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bun": "latest",
|
"@types/bun": "latest",
|
||||||
|
|||||||
@ -10,12 +10,26 @@ const functionFiles = paths.map(path => readdirSync(path).map(file => path + "/"
|
|||||||
// for hot reload to work, we import all the files we want to build
|
// for hot reload to work, we import all the files we want to build
|
||||||
const imports = functionFiles.forEach(file => require('./' + path.relative('src', file)));
|
const imports = functionFiles.forEach(file => require('./' + path.relative('src', file)));
|
||||||
|
|
||||||
|
|
||||||
console.log("functions to build:", functionFiles);
|
console.log("functions to build:", functionFiles);
|
||||||
|
|
||||||
|
const bundledModules = ['zod_utilz'];
|
||||||
|
|
||||||
|
const externalModules = Object.keys(require('../package.json').dependencies)
|
||||||
|
.filter(dep => !bundledModules.includes(dep));
|
||||||
|
|
||||||
|
console.log("Explicitly bundling dependencies", bundledModules);
|
||||||
|
|
||||||
|
// console.log("external modules: ", externalModules);
|
||||||
|
|
||||||
console.log("Building functions...");
|
console.log("Building functions...");
|
||||||
|
|
||||||
await Bun.build({
|
await Bun.build({
|
||||||
entrypoints: functionFiles,
|
entrypoints: functionFiles,
|
||||||
outdir: './build/functions',
|
outdir: './build/functions',
|
||||||
packages: 'external',
|
packages: 'bundle',
|
||||||
target: 'node',
|
target: 'node',
|
||||||
|
external: externalModules,
|
||||||
|
root: './src/functions',
|
||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
});
|
});
|
||||||
|
|||||||
@ -15,7 +15,9 @@
|
|||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
"types": [
|
"types": [
|
||||||
|
"cypress",
|
||||||
"bun-types" // add Bun global
|
"bun-types" // add Bun global
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user