-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
107 changed files
with
7,239 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
NODE_ENV=test | ||
LOGIN_CODE_DUMMY_NUMBERS=+420733333331 | ||
LOGIN_CODE_DUMMY_CODE=111111 | ||
|
||
SECRET_PUBLIC_KEY="LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZZd0VBWUhLb1pJemowQ0FRWUZLNEVFQUFvRFFnQUVidE9rYzJ0RmZ5VHhkVmxqSzlPQUZGYXFMMVRwU3FUaQpLbGpNenVPbjh5WjVUM3I4c04vdmUvbWdlUzg4ckNBZ29tVnJpK2pMdFU1WXQvVzlVbVozS1E9PQotLS0tLUVORCBQVUJMSUMgS0VZLS0tLS0K" | ||
SECRET_PRIVATE_KEY="LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JR0VBZ0VBTUJBR0J5cUdTTTQ5QWdFR0JTdUJCQUFLQkcwd2F3SUJBUVFnK0Raa0VIMHN0K1VjcmhHTkhGRVgKL0RKVkFaZmtwMjlMSTZ3eERwbHVubDJoUkFOQ0FBUnUwNlJ6YTBWL0pQRjFXV01yMDRBVVZxb3ZWT2xLcE9JcQpXTXpPNDZmekpubFBldnl3Mys5NythQjVMenlzSUNDaVpXdUw2TXUxVGxpMzliMVNabmNwCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K" | ||
SECRET_HMAC_KEY=test | ||
SECRET_EAS_KEY=VexlVexl | ||
DB_DEBUG=true | ||
|
||
# Local db | ||
# DB_URL=postgresql://localhost:5432 | ||
# DB_USER=postgres | ||
# DB_PASSWORD=root | ||
|
||
TEST_DB_PREFIX=chat_service_test_ | ||
TEST_DB_PORT=5432 | ||
TEST_DB_USER=postgres | ||
TEST_DB_PASSWORD=root | ||
# TEST_KEEP_DB=false | ||
# TEST_DB_FORCE_NAME=offer_service_test_ef4fba48e4174743864e39ac439dd7a9 | ||
|
||
|
||
CHALLENGE_EXPIRATION_MINUTES=10 | ||
REQUEST_TIMEOUT_DAYS=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM node:19 as builder | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
WORKDIR /app/apps/chat-service | ||
|
||
RUN yarn workspaces focus @vexl-next/chat-service | ||
RUN yarn build | ||
# RUN npx @sentry/wizard@latest -i sourcemaps | ||
|
||
|
||
FROM node:19 as runner | ||
|
||
|
||
ARG SERVICE_VERSION | ||
ARG ENVIRONMENT | ||
|
||
ENV SERVICE_VERSION=${SERVICE_VERSION} | ||
ENV SERVICE_NAME="Chat service - ${ENVIRONMENT}" | ||
|
||
COPY --from=builder /app/apps/chat-service/ /app/apps/chat-service | ||
COPY --from=builder /app/node_modules /app/node_modules | ||
COPY --from=builder /app/package.json /app/package.json | ||
|
||
WORKDIR /app/apps/chat-service | ||
|
||
CMD ["node", "dist/index.cjs"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import esbuild from '@vexl-next/esbuild' | ||
|
||
void esbuild() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { | ||
disposeRuntime, | ||
startRuntime, | ||
} from './src/__tests__/utils/runPromiseInMockedEnvironment' | ||
|
||
beforeAll(async () => { | ||
await startRuntime() | ||
}) | ||
|
||
afterAll(async () => { | ||
await disposeRuntime() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import type {JestConfigWithTsJest} from 'ts-jest' | ||
|
||
const config: JestConfigWithTsJest = { | ||
preset: 'ts-jest', | ||
verbose: true, | ||
|
||
testEnvironment: 'node', | ||
extensionsToTreatAsEsm: ['.ts'], | ||
setupFiles: ['<rootDir>/jest.setup.ts'], | ||
setupFilesAfterEnv: ['<rootDir>/jest.afterenv.ts'], | ||
|
||
testTimeout: 20000, | ||
testMatch: ['**/*.test.ts'], // This line ensures only files with .test.ts suffix are run | ||
transform: { | ||
'^.+\\.(ts|js)$': [ | ||
'ts-jest', | ||
{ | ||
useESM: true, | ||
tsconfig: { | ||
module: 'ESNext', | ||
rootDir: '../..', | ||
allowJs: true, | ||
}, | ||
}, | ||
], | ||
}, | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import dotenv from 'dotenv' | ||
|
||
dotenv.config({path: '.env.test'}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"name": "@vexl-next/chat-service", | ||
"main": "dist/index.js", | ||
"type": "module", | ||
"scripts": { | ||
"test": "TEST_DB_HOST=localhost yarn jest", | ||
"test:watch": "NODE_OPTIONS=--experimental-vm-modules yarn jest --watch", | ||
"build": "yarn typecheck && yarn build:esbuild", | ||
"build:esbuild": "node esbuild.config.js", | ||
"typecheck": "tsc --noEmit", | ||
"clean": "rimraf ./dist", | ||
"format": "prettier --check \"**/*.{js,mjs,cjs,jsx,ts,tsx,md,json}\"", | ||
"lint": "eslint src --ext .js,.jsx,.ts,.tsx", | ||
"dev": "npx tsx -r dotenv/config src/index.ts", | ||
"start": "node dist" | ||
}, | ||
"eslintConfig": { | ||
"root": true, | ||
"extends": [ | ||
"@vexl-next/eslint-config/index" | ||
] | ||
}, | ||
"dependencies": { | ||
"@effect/experimental": "^0.22.6", | ||
"@effect/opentelemetry": "^0.35.3", | ||
"@effect/platform": "^0.62.3", | ||
"@effect/platform-node": "^0.56.9", | ||
"@effect/schema": "^0.70.4", | ||
"@effect/sql": "^0.8.7", | ||
"@effect/sql-pg": "^0.8.7", | ||
"@opentelemetry/exporter-trace-otlp-http": "^0.52.1", | ||
"@opentelemetry/sdk-trace-node": "^1.23.0", | ||
"@opentelemetry/sdk-trace-web": "^1.23.0", | ||
"@sentry/esbuild-plugin": "^2.10.2", | ||
"@sentry/node": "^7.93.0", | ||
"@sentry/profiling-node": "^1.3.5", | ||
"@vexl-next/cryptography": "0.0.0", | ||
"@vexl-next/domain": "0.0.0", | ||
"@vexl-next/generic-utils": "0.0.0", | ||
"@vexl-next/rest-api": "0.0.0", | ||
"@vexl-next/server-utils": "0.0.0", | ||
"dayjs": "^1.11.11", | ||
"dotenv": "^16.4.5", | ||
"effect": "^3.6.3", | ||
"effect-http": "^0.77.4", | ||
"effect-http-node": "^0.17.7", | ||
"fast-check": "^3.20.0", | ||
"firebase-admin": "^12.3.1", | ||
"ioredis": "^5.4.1", | ||
"node-fetch": "^3.3.2", | ||
"pg": "^8.12.0", | ||
"twilio": "^5.2.1" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^29.4.0", | ||
"@types/pg": "^8", | ||
"@types/source-map-support": "^0.5.10", | ||
"@vexl-next/esbuild": "0.0.0", | ||
"@vexl-next/eslint-config": "0.0.0", | ||
"@vexl-next/prettier-config": "0.0.0", | ||
"@vexl-next/tsconfig": "0.0.0", | ||
"esbuild": "^0.17.16", | ||
"eslint": "^8.50.0", | ||
"glob": "^11.0.0", | ||
"jest": "^29.7.0", | ||
"nodemon": "^2.0.21", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^3.3.2", | ||
"rimraf": "^4.4.0", | ||
"ts-jest": "^29.2.0", | ||
"ts-node": "^10.9.1", | ||
"tsc-alias": "^1.8.10", | ||
"tsx": "^4.16.0", | ||
"typescript": "^5.5.2" | ||
}, | ||
"prettier": "@vexl-next/prettier-config" | ||
} |
Oops, something went wrong.