-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass peer instance as argument to message service (#78)
* Pass peer instance to message service * Instantiate and pass peer instance in browser app * Check protocols before dialing for peer info exchange * Exchange nitro info with already connected peers * Remove util package and move code to nitro-client * Fix nitro import in react-app * Add publish workflows --------- Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
- Loading branch information
1 parent
7734207
commit 49d1bd7
Showing
40 changed files
with
320 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Publish package | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
npm_publish_node: | ||
name: Push packages to gitea | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [ 18.x ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: 'https://npm.pkg.github.com' | ||
- name: "Install dependencies" | ||
- run: yarn | ||
- name: Run yarn build | ||
run: | | ||
yarn build:node | ||
- name: Configure git.vdb.to npm registry | ||
run: | | ||
npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/ | ||
- name: Authenticate to git.vdb.to registry | ||
run: | | ||
npm config set -- '//git.vdb.to/api/packages/cerc-io/npm/:_authToken' "${{ secrets.GITEA_PUBLISH_TOKEN }}" | ||
- name: lerna publish | ||
run: | | ||
yarn lerna publish from-package --no-git-tag-version --yes | ||
npm_publish_browser: | ||
name: Push nitro-client-browser package to gitea | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [ 18.x ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: 'https://npm.pkg.github.com' | ||
- name: "Install dependencies" | ||
run: yarn | ||
- name: Run yarn build | ||
run: | | ||
yarn build:browser --ignore @cerc-io/example-web-app | ||
- name: Rename nitro-client package | ||
run: | | ||
cd packages/nitro-client | ||
yarn build:update-package-name | ||
cd ../../ | ||
- name: Configure git.vdb.to npm registry | ||
run: | | ||
npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/ | ||
- name: Authenticate to git.vdb.to registry | ||
run: | | ||
npm config set -- '//git.vdb.to/api/packages/cerc-io/npm/:_authToken' "${{ secrets.GITEA_PUBLISH_TOKEN }}" | ||
- name: npm publish nitro-client-browser | ||
run: | | ||
cd packages/nitro-client | ||
npm publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import PackageJson from '@npmcli/package-json'; | ||
|
||
async function main() { | ||
const pkgJson = await PackageJson.load('.'); | ||
const { content } = pkgJson; | ||
|
||
content.name = '@cerc-io/nitro-client-browser'; | ||
pkgJson.update(content); | ||
|
||
await pkgJson.save(); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.