diff --git a/apps/summerfi-api/lib/automation-subgraph/package.json b/apps/summerfi-api/lib/automation-subgraph/package.json index 5dc2da5c05..4be7da11b4 100644 --- a/apps/summerfi-api/lib/automation-subgraph/package.json +++ b/apps/summerfi-api/lib/automation-subgraph/package.json @@ -2,8 +2,8 @@ "name": "automation-subgraph", "version": "1.0.0", "type": "module", - "main": "src/index.ts", - "types": "src/index.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "scripts": { "tsc": "tsc", "watch": "tsc -w", diff --git a/apps/summerfi-api/lib/contracts/package.json b/apps/summerfi-api/lib/contracts/package.json index 45e556f509..6b5205aa48 100644 --- a/apps/summerfi-api/lib/contracts/package.json +++ b/apps/summerfi-api/lib/contracts/package.json @@ -1,8 +1,6 @@ { "name": "contracts", "version": "1.0.0", - "main": "src/index.ts", - "types": "src/index.ts", "scripts": { "tsc": "tsc", "watch": "tsc -w", @@ -10,7 +8,13 @@ "build": "tsc -b -v" }, "exports": { - ".": "./src/index.ts", - "./*": "./src/*.ts" + ".": { + "import": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./*": { + "import": "./dist/*.js", + "types": "./dist/*.d.ts" + } } } diff --git a/apps/summerfi-api/lib/setup-trigger/src/services/index.ts b/apps/summerfi-api/lib/setup-trigger/src/services/index.ts index 8ccb7230f0..837ea6e895 100644 --- a/apps/summerfi-api/lib/setup-trigger/src/services/index.ts +++ b/apps/summerfi-api/lib/setup-trigger/src/services/index.ts @@ -31,6 +31,7 @@ import { AgainstPositionValidator, getAgainstPositionValidator, } from './against-position-validators' +import fetch from "node-fetch"; const rpcConfig = { skipCache: false, diff --git a/apps/summerfi-api/lib/shared/package.json b/apps/summerfi-api/lib/shared/package.json index 69bc5594ba..93644882d2 100644 --- a/apps/summerfi-api/lib/shared/package.json +++ b/apps/summerfi-api/lib/shared/package.json @@ -2,8 +2,6 @@ "name": "shared", "version": "1.0.0", "type": "module", - "main": "src/index.ts", - "types": "src/index.ts", "dependencies": { "zod": "^3.22.4" }, @@ -14,7 +12,13 @@ "build": "tsc -b -v" }, "exports": { - ".": "./src/index.ts", - "./*": "./src/*.ts" + ".": { + "import": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./*": { + "import": "./dist/*.js", + "types": "./dist/*.d.ts" + } } } diff --git a/apps/summerfi-api/tsconfig-base.json b/apps/summerfi-api/tsconfig-base.json index ee650e99a0..23cacd3024 100644 --- a/apps/summerfi-api/tsconfig-base.json +++ b/apps/summerfi-api/tsconfig-base.json @@ -23,5 +23,16 @@ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ }, "include": [], - "exclude": ["node_modules", "**/*.spec.ts"] + "exclude": ["node_modules", "**/*.spec.ts"], + "references": [ + { + "path": "./lib/shared", + }, + { + "path": "./lib/automation-subgraph" + }, + { + "path": "./lib/contracts" + }, + ] }