Create rule handler cloud run

This commit is contained in:
Hongbo Wu
2022-11-19 11:15:26 +08:00
parent 075c1b4d14
commit dc92fe9c52
21 changed files with 309 additions and 269 deletions

View File

@ -0,0 +1,32 @@
{
"name": "@omnivore/rule-handler",
"version": "1.0.0",
"main": "build/src/index.js",
"files": [
"build/src"
],
"license": "Apache-2.0",
"scripts": {
"test": "yarn mocha -r ts-node/register --config mocha-config.json",
"lint": "eslint src --ext ts,js,tsx,jsx",
"compile": "tsc",
"build": "tsc",
"start": "functions-framework --target=ruleHandler",
"dev": "concurrently \"tsc -w\" \"nodemon --watch ./build/ --exec npm run start\"",
"gcloud-deploy": "gcloud functions deploy rule-handler --gen2 --entry-point=ruleHandler --trigger-http --allow-unauthenticated --region=us-west2 --runtime nodejs14",
"deploy": "yarn build && yarn gcloud-deploy"
},
"devDependencies": {
"chai": "^4.3.6",
"eslint-plugin-prettier": "^4.0.0",
"mocha": "^10.0.0"
},
"dependencies": {
"@google-cloud/functions-framework": "3.1.2",
"dotenv": "^16.0.1",
"firebase-admin": "^10.0.2",
"@sentry/serverless": "^6.16.1",
"typeorm": "^0.3.4",
"typeorm-naming-strategies": "^4.1.0"
}
}