Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/websocket transport #810

Draft
wants to merge 33 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
4543b57
feat: init acurast WebSocketP2P transport
IsaccoSordo Jul 26, 2024
ad43f7b
feat: init wsTransport
IsaccoSordo Jul 26, 2024
3edf5b6
feat: add libp2p type
IsaccoSordo Jul 26, 2024
a43eb79
feat: init libp2p transport in dappClient
IsaccoSordo Jul 26, 2024
6d04169
feat: add getPairingRequestInfo
IsaccoSordo Jul 26, 2024
836edfd
feat: add QR code generation
IsaccoSordo Jul 26, 2024
d975b11
feat: init peer
IsaccoSordo Aug 5, 2024
468c23c
fix: message send
IsaccoSordo Aug 6, 2024
d6092f8
fix: listener
IsaccoSordo Aug 6, 2024
306496e
fix: onMessage
IsaccoSordo Aug 7, 2024
825ebcb
fix: request permissions
IsaccoSordo Aug 7, 2024
3edea76
chore: update urls
IsaccoSordo Aug 7, 2024
549e116
fix: moved key generation to ws class
IsaccoSordo Aug 8, 2024
105ef0d
chore: alpha release
IsaccoSordo Aug 23, 2024
f23efd7
feat: add NodeDistributions
IsaccoSordo Aug 23, 2024
9f9ec0f
feat: init test folder
IsaccoSordo Aug 23, 2024
a3be68b
fix: removed unused helper
IsaccoSordo Aug 27, 2024
97905ce
fix: minor tweaks
IsaccoSordo Aug 27, 2024
6bbf71f
fix: use libp2p nodes
IsaccoSordo Aug 27, 2024
4eacdec
feat: generate pair from seed
IsaccoSordo Aug 27, 2024
86a3724
chore: bump node version
IsaccoSordo Aug 27, 2024
724432b
fix: elliptic version
IsaccoSordo Aug 27, 2024
3e7bea9
fix: lockfile
IsaccoSordo Aug 27, 2024
bb8bc99
fix: remove this.seed
IsaccoSordo Aug 28, 2024
e6e51f1
feat: allow alpha tags
IsaccoSordo Aug 28, 2024
38e24c7
fix: gitlab ci
IsaccoSordo Aug 28, 2024
ac6d119
fix: .prettierignore
IsaccoSordo Aug 28, 2024
32f72eb
fix: prettierignore
IsaccoSordo Aug 28, 2024
3bca04d
Merge branch 'feat/websocket_transport' of https://gitlab.papers.tech…
IsaccoSordo Aug 28, 2024
9603f2b
fix: utilities
IsaccoSordo Aug 28, 2024
c5ebb51
fix: script
IsaccoSordo Aug 28, 2024
40a891a
chore: alpha release
IsaccoSordo Aug 28, 2024
57eca9e
fix: version
IsaccoSordo Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Node 16
uses: actions/setup-node@v1
with:
node-version: 16.x
node-version: 18.x

- name: Prepare
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Node 16
uses: actions/setup-node@v1
with:
node-version: 16.x
node-version: 18.x

- name: Prepare
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-demo-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Node 16
uses: actions/setup-node@v1
with:
node-version: 16.x
node-version: 18.x

- name: Prepare
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ publish_beta:
stage: publish
when: manual
script:
- docker run --env NPM_AUTH_TOKEN --rm $GOOGLE_TAG ./npm-ci-publish-beta-only.sh
- docker run --env NPM_AUTH_TOKEN --rm $GOOGLE_TAG ./npm-ci-publish-beta-and-alpha-only.sh
tags:
- docker

Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
coverage
dist
node_modules
npm-ci-publish-beta-only.sh
npm-ci-publish-beta-and-alpha-only.sh
npm-ci-publish.sh
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN export NODE_ENV=production
# install dependencies
RUN npm install

RUN chmod +x ./npm-ci-publish-beta-only.sh
RUN chmod +x ./npm-ci-publish-beta-and-alpha-only.sh
RUN chmod +x ./npm-ci-publish.sh

CMD ["npm", "run", "test"]
1 change: 1 addition & 0 deletions clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ rm -rf ./packages/beacon-core/node_modules
rm -rf ./packages/beacon-dapp/node_modules
rm -rf ./packages/beacon-sdk/node_modules
rm -rf ./packages/beacon-transport-matrix/node_modules
rm -rf ./packages/beacon-transport-libp2p/node_modules
rm -rf ./packages/beacon-transport-postmessage/node_modules
rm -rf ./packages/beacon-types/node_modules
rm -rf ./packages/beacon-ui/node_modules
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "4.2.2",
"version": "4.2.3-alpha.1",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
25 changes: 25 additions & 0 deletions npm-ci-publish-beta-and-alpha-only.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > .npmrc

git update-index --assume-unchanged npm-ci-publish.sh
git update-index --assume-unchanged npm-ci-publish-beta-and-alpha-only.sh

VERSION=$(node -pe 'const version = JSON.parse(process.argv[1]).version; version.includes("beta") || version.includes("alpha") ? version : ""' "$(cat lerna.json)")

if [ -z "$VERSION" ]
then
echo "cannot publish non-beta/non-alpha version"
else
if [[ "$VERSION" == *"beta"* ]]
then
TAG="next"
echo "version is beta, using --tag $TAG"
elif [[ "$VERSION" == *"alpha"* ]]
then
TAG="alpha"
echo "version is alpha, using --tag $TAG"
fi
npx lerna publish from-package --contents ./ --dist-tag $TAG --yes
fi

rm .npmrc
17 changes: 0 additions & 17 deletions npm-ci-publish-beta-only.sh

This file was deleted.

23 changes: 16 additions & 7 deletions npm-ci-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,26 @@
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > .npmrc

git update-index --assume-unchanged npm-ci-publish.sh
git update-index --assume-unchanged npm-ci-publish-beta-only.sh
git update-index --assume-unchanged npm-ci-publish-beta-and-alpha-only.sh

VERSION=$(node -pe 'JSON.parse(process.argv[1]).version.indexOf("beta")' "$(cat lerna.json)")
VERSION=$(node -pe 'const version = JSON.parse(process.argv[1]).version; version.includes("beta") || version.includes("alpha") ? version : ""' "$(cat lerna.json)")

if [ "$VERSION" = "-1" ]
if [ -z "$VERSION" ]
then
echo "version is not beta or alpha, proceeding with standard publish"
npx lerna publish from-package --contents ./ --yes
# lerna exec -- "npm publish || exit 0" # If some packages fail to be published, this command ignores already published ones and publishes the missing ones
# lerna exec -- "npm publish || exit 0" # Uncomment if you need to handle already published packages separately
else
echo "version is beta, using --tag next"
npx lerna publish from-package --contents ./ --dist-tag next --yes
if [[ "$VERSION" == *"beta"* ]]
then
TAG="next"
echo "version is beta, using --tag $TAG"
elif [[ "$VERSION" == *"alpha"* ]]
then
TAG="alpha"
echo "version is alpha, using --tag $TAG"
fi
npx lerna publish from-package --contents ./ --dist-tag $TAG --yes
fi

rm .npmrc
rm .npmrc
Loading
Loading