From 03f7713a7a534e24584796cdfcc132adc739aad6 Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Tue, 30 Jul 2024 08:16:38 +0100 Subject: [PATCH] chore(subgraph): configure maci-subgraph to be a public npm package (#1712) --- coordinator/.env.example | 4 +--- coordinator/package.json | 1 + pnpm-lock.yaml | 3 +++ subgraph/package.json | 5 ++++- subgraph/tsconfig.build.json | 10 ++++++++++ 5 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 subgraph/tsconfig.build.json diff --git a/coordinator/.env.example b/coordinator/.env.example index d0d9753c80..22628679a7 100644 --- a/coordinator/.env.example +++ b/coordinator/.env.example @@ -43,6 +43,4 @@ SUBGRAPH_PROVIDER_URL=https://api.studio.thegraph.com/deploy/ SUBGRAPH_DEPLOY_KEY= # Subgraph project folder -SUBGRAPH_FOLDER=../subgraph - - +SUBGRAPH_FOLDER=./node_modules/maci-subgraph diff --git a/coordinator/package.json b/coordinator/package.json index 4bbf789b93..143528879d 100644 --- a/coordinator/package.json +++ b/coordinator/package.json @@ -41,6 +41,7 @@ "maci-cli": "2.0.0-alpha", "maci-contracts": "2.0.0-alpha", "maci-domainobjs": "2.0.0-alpha", + "maci-subgraph": "2.0.0-alpha", "mustache": "^4.2.0", "reflect-metadata": "^0.2.0", "rxjs": "^7.8.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d413f5bb1b..ec2a4facef 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -383,6 +383,9 @@ importers: maci-domainobjs: specifier: 2.0.0-alpha version: link:../domainobjs + maci-subgraph: + specifier: 2.0.0-alpha + version: link:../subgraph mustache: specifier: ^4.2.0 version: 4.2.0 diff --git a/subgraph/package.json b/subgraph/package.json index 6cd31db369..c5a55a74a5 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -2,9 +2,12 @@ "name": "maci-subgraph", "version": "2.0.0-alpha", "description": "A subgraph to index data from MACI protocol to serve as data layer for frontend integration", - "private": true, + "private": false, "files": [ "build", + "schemas", + "config", + "templates", "README.md" ], "scripts": { diff --git a/subgraph/tsconfig.build.json b/subgraph/tsconfig.build.json new file mode 100644 index 0000000000..a688e95db7 --- /dev/null +++ b/subgraph/tsconfig.build.json @@ -0,0 +1,10 @@ +{ + "extend": "./node_modules/@graphprotocol/graph-ts/tsconfig.json", + "compilerOptions": { + "outDir": "./build", + "strictNullChecks": true, + "skipLibCheck": true, + "typeRoots": ["./src/@types/global.d.ts"] + }, + "include": ["./src", "./generated"] +}