diff --git a/packages/events/package.json b/packages/events/package.json index a8cded785e..c4761ac09c 100644 --- a/packages/events/package.json +++ b/packages/events/package.json @@ -4,6 +4,7 @@ "description": "OpenCRVS Events service", "license": "MPL-2.0", "private": true, + "main": "dist/src/index.js", "scripts": { "start": "cross-env NODE_ENV=development NODE_OPTIONS=--dns-result-order=ipv4first nodemon --exec ts-node -r tsconfig-paths/register src/index.ts", "start:prod": "TS_NODE_BASEURL=./build/dist/src node -r tsconfig-paths/register build/dist/src/index.js", diff --git a/packages/events/tsconfig.json b/packages/events/tsconfig.json index 2c51ebffab..d218fa514a 100644 --- a/packages/events/tsconfig.json +++ b/packages/events/tsconfig.json @@ -18,7 +18,8 @@ "noImplicitAny": true, "strictNullChecks": true, "noUnusedLocals": true, - "types": ["fhir", "jest"] + "types": ["fhir", "jest"], + "composite": true }, "include": ["src/**/*.ts", "typings", "tslint-rules"], "exclude": ["node_modules", "build", "scripts", "acceptance-tests"] diff --git a/packages/gateway/package.json b/packages/gateway/package.json index ff8f005809..571012b393 100644 --- a/packages/gateway/package.json +++ b/packages/gateway/package.json @@ -28,6 +28,7 @@ "@hapi/h2o2": "^9.1.0", "@hapi/hapi": "^20.0.1", "@opencrvs/commons": "^1.3.0", + "superjson": "1.9.0-0", "@trpc/client": "^11.0.0-rc.532", "@types/archiver": "^3.0.0", "@types/flat": "^0.0.28", @@ -153,7 +154,8 @@ "" ], "moduleNameMapper": { - "@gateway/(.*)": "/src/$1" + "@gateway/(.*)": "/src/$1", + "@opencrvs/events": "@opencrvs/events/build/dist/src/index.js" }, "coverageReporters": [ "json", diff --git a/packages/gateway/tsconfig.json b/packages/gateway/tsconfig.json index 7c94cd211e..e8a326faac 100644 --- a/packages/gateway/tsconfig.json +++ b/packages/gateway/tsconfig.json @@ -4,7 +4,7 @@ "baseUrl": "./src", "paths": { "@gateway/*": ["./*"], - "@events/*": ["../../events/src/*"] + "@events/*": ["../../events/src/index.ts"] }, "target": "es6", "module": "node16", @@ -23,6 +23,7 @@ "types": ["fhir", "jest"], "esModuleInterop": true }, + "references": [{ "path": "../events" }], "include": ["src/**/*.ts", "typings"], "exclude": ["node_modules", "build", "scripts", "acceptance-tests"] }