Refactor serverless and initial hasura migrations.

This commit is contained in:
Patrick Fic
2026-01-19 15:19:21 -08:00
parent bcdc305251
commit 8954147976
13 changed files with 95 additions and 1062 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -19,8 +19,8 @@
"license": "ISC",
"type": "commonjs",
"dependencies": {
"@aws-sdk/client-secrets-manager": "^3.965.0",
"@aws-sdk/client-s3": "^3.965.0",
"@aws-sdk/client-secrets-manager": "^3.965.0",
"@aws-sdk/s3-request-presigner": "^3.965.0",
"axios": "^1.13.2",
"drizzle-orm": "^0.44.5",
@@ -32,7 +32,6 @@
"@types/node": "^25.0.8",
"@typescript-eslint/eslint-plugin": "^8.53.0",
"@typescript-eslint/parser": "^8.53.0",
"drizzle-kit": "^0.31.5",
"esbuild": "^0.27.2",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
@@ -40,7 +39,6 @@
"prettier": "^3.7.4",
"serverless-esbuild": "^1.57.0",
"ts-node": "^10.9.2",
"pg": "^8.16.3",
"typescript": "^5.9.3"
}
}

View File

@@ -2,55 +2,43 @@ service: esdp-api
app: esdp-api-app
frameworkVersion: '4'
# Common parameters shared across all stages
custom:
commonParams:
es_user: Imex2
es_password: Patrick
hasura_secret_arn: arn:aws:secretsmanager:ca-central-1:714144183158:secret:esdp-hasura-credentials-s81i1u-BDFgPi
stages:
prod:
# Enables observability in the prod stage
observability: true
# Sepcify parameter values to be used in the prod stage
# Stage-specific parameter values for prod
params:
es_endpoint: https://insurtechtoolkit.com
domain: es.imex.online
es_user: Imex2
es_password: Patrick
beta:
# Enables observability in the prod stage
observability: false
# Sepcify parameter values to be used in the prod stage
# Stage-specific parameter values for beta
params:
es_endpoint: https://4284-79073.el-alt.com
domain: beta.es.imex.online
es_user: Imex2
es_password: Patrick
alpha:
# Enables observability in the prod stage
observability: false
# Sepcify parameter values to be used in the prod stage
# Stage-specific parameter values for alpha
params:
es_endpoint: https://4284-79287.el-alt.com
domain: alpha.es.imex.online
es_user: Imex2
es_password: Patrick
dev:
# Enables observability in the prod stage
observability: false
# Sepcify parameter values to be used in the prod stage
# Stage-specific parameter values for dev
params:
es_endpoint: https://4284-79287.el-alt.com
domain: dev.es.imex.online
es_user: Imex2
es_password: Patrick
# params:
# dev:
# domain: dev.es.imex.online
# alpha:
# domain: alpha.es.imex.online
# beta:
# domain: beta.es.imex.online
# prod:
# domain: es.imex.online
provider:
name: aws
@@ -81,8 +69,8 @@ functions:
handler: src/handlers/scrub.handler
environment:
ES_ENDPOINT: ${param:es_endpoint}
ES_USER: ${param:es_user}
ES_PASSWORD: ${param:es_password}
ES_USER: ${self:custom.commonParams.es_user}
ES_PASSWORD: ${self:custom.commonParams.es_password}
events:
- httpApi:
path: /scrub