Use assemblyscript from gitea packages (#272)

* Use assemblyscript from gitea packages

* Add back github registry for vulcanize/graph-ts

* Use cerc-io scoped assemblyscript package
This commit is contained in:
nikugogoi 2022-12-07 15:13:41 +05:30 committed by GitHub
parent d0ac2aa895
commit cc66f44bab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 37 deletions

1
.npmrc
View File

@ -1 +1,2 @@
registry=https://git.vdb.to/api/packages/cerc-io/npm/
@vulcanize:registry=https://npm.pkg.github.com

View File

@ -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):

View File

@ -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",

View File

@ -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,

View File

@ -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,

View File

@ -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"