diff --git a/.npmrc b/.npmrc index 1d6cdc62..db6784df 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ +registry=https://git.vdb.to/api/packages/cerc-io/npm/ @vulcanize:registry=https://npm.pkg.github.com diff --git a/README.md b/README.md index c2083968..65625faf 100644 --- a/README.md +++ b/README.md @@ -2,31 +2,6 @@ ## Setup -There are packages used from github so we need to follow the following steps to install them: - -1. Create a github PAT (personal access token) if it does not already exist. - - https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-token - -2. Configure the PAT with scopes mentioned in https://docs.github.com/en/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries. This is required to install or publish github packages. - -3. Follow the steps in https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-with-a-personal-access-token to authenticate to github packages. We can also run the follwing to authenticate by logging in to npm. - - ```bash - $ npm login --scope=@cerc-io --registry=https://npm.pkg.github.com - - > Username: USERNAME - > Password: TOKEN - > Email: PUBLIC-EMAIL-ADDRESS - ``` - - Replace with the following: - - `USERNAME`: GitHub username - - `TOKEN`: Personal access token (configured above) - - `PUBLIC-EMAIL-ADDRESS`: Email address - -4. When authenticating to github packages for the first time, yarn install may throw Unauthorized error. To overcome this we need to run yarn install in `packages/graph-node` directory. After this yarn install for watcher-ts works properly even from root of the repo. - This project uses [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/). Install packages (Node.JS v16.13.1): diff --git a/packages/graph-node/package.json b/packages/graph-node/package.json index ce02c87d..f83a5c88 100644 --- a/packages/graph-node/package.json +++ b/packages/graph-node/package.json @@ -53,7 +53,7 @@ "@cerc-io/ipld-eth-client": "^0.2.17", "@cerc-io/util": "^0.2.17", "@types/json-diff": "^0.5.2", - "@vulcanize/assemblyscript": "0.0.1", + "@cerc-io/assemblyscript": "0.19.10-watcher-ts-0.1.2", "bn.js": "^4.11.9", "debug": "^4.3.1", "fs-extra": "^10.0.0", diff --git a/packages/graph-node/src/loader.ts b/packages/graph-node/src/loader.ts index b558bf05..d8b157cb 100644 --- a/packages/graph-node/src/loader.ts +++ b/packages/graph-node/src/loader.ts @@ -14,7 +14,7 @@ import BN from 'bn.js'; import debug from 'debug'; import { BaseProvider } from '@ethersproject/providers'; -import loader from '@vulcanize/assemblyscript/lib/loader'; +import loader from '@cerc-io/assemblyscript/lib/loader'; import { IndexerInterface, GraphDecimal, diff --git a/packages/graph-node/src/watcher.ts b/packages/graph-node/src/watcher.ts index cc700c90..34cdc81d 100644 --- a/packages/graph-node/src/watcher.ts +++ b/packages/graph-node/src/watcher.ts @@ -10,7 +10,7 @@ import fs from 'fs'; import { ContractInterface, utils, providers } from 'ethers'; import { SelectionNode } from 'graphql'; -import { ResultObject } from '@vulcanize/assemblyscript/lib/loader'; +import { ResultObject } from '@cerc-io/assemblyscript/lib/loader'; import { EthClient } from '@cerc-io/ipld-eth-client'; import { getFullBlock, diff --git a/yarn.lock b/yarn.lock index bfc592cb..b1bc7751 100644 --- a/yarn.lock +++ b/yarn.lock @@ -248,6 +248,15 @@ "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" +"@cerc-io/assemblyscript@0.19.10-watcher-ts-0.1.2": + version "0.19.10-watcher-ts-0.1.2" + resolved "https://git.vdb.to/api/packages/cerc-io/npm/%40cerc-io%2Fassemblyscript/-/0.19.10-watcher-ts-0.1.2/assemblyscript-0.19.10-watcher-ts-0.1.2.tgz#c6a20eeddca44ddb08994831845c0b172433566b" + integrity sha512-iovY7xoH5ZMGQZgsK/Wy8175AN2z6I0WUnzEWaxykkAFQUvnErgiw/Y4crkcOb/fDp8gslRfTeEFtR90m1AyPA== + dependencies: + asyncify-wasm "^1.2.1" + binaryen "101.0.0-nightly.20210723" + long "^4.0.0" + "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" @@ -3129,15 +3138,6 @@ resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.7.tgz#c792bf92d19025e7940358536d468218a11eeedb" integrity sha512-YwGOcNZjOY/MmadpzFBXWyHEwZSf0lVU4XF5zpD7tXC9dmqjdo38Jkk06wATu4LYHDPW4emXKMB5YLFPWPkwFA== -"@vulcanize/assemblyscript@0.0.1": - version "0.0.1" - resolved "https://npm.pkg.github.com/download/@vulcanize/assemblyscript/0.0.1/f1dc67712e8582a0748a9eeac772920b4a33baf03aba382b5086a8d0054e43b5#c98f2a706f797ba205f49b86a9de7093e7033726" - integrity sha512-CCTyGjUH9NPASd3YRx2YeJQquEeiPRcQ5DaZjQn2c/PHOdSAoKStU/9JkO1+oKTDhuF/eEX7LZh09NeojWjibg== - dependencies: - asyncify-wasm "^1.2.1" - binaryen "101.0.0-nightly.20210723" - long "^4.0.0" - "@wry/context@^0.6.0": version "0.6.0" resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.6.0.tgz#f903eceb89d238ef7e8168ed30f4511f92d83e06"