Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: libp2p/js-libp2p-webrtc-star
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 89cf20c43bd694146325276e4370a8c81d5377e3
Choose a base ref
...
head repository: libp2p/js-libp2p-webrtc-star
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9dc6899250d85003de21a094c231ffea3a378dfe
Choose a head ref
Loading
Showing with 1,592 additions and 651 deletions.
  1. +0 −30 .aegir.js
  2. +8 −0 .github/dependabot.yml
  3. +200 −0 .github/workflows/main.yml
  4. +0 −41 .travis.yml
  5. +5 −5 Dockerfile
  6. +5 −0 LICENSE-APACHE
  7. +4 −6 LICENSE → LICENSE-MIT
  8. +14 −118 README.md
  9. +25 −0 lerna.json
  10. +26 −100 package.json
  11. +46 −0 packages/signalling-server/.aegir.js
  12. +40 −0 packages/signalling-server/CHANGELOG.md
  13. 0 { → packages/signalling-server}/DEPLOYMENT.md
  14. +5 −0 packages/signalling-server/LICENSE-APACHE
  15. +19 −0 packages/signalling-server/LICENSE-MIT
  16. +62 −0 packages/signalling-server/README.md
  17. +86 −0 packages/signalling-server/package.json
  18. 0 {src/sig-server → packages/signalling-server/src}/bin.js
  19. 0 {src/sig-server → packages/signalling-server/src}/config.js
  20. 0 {src/sig-server → packages/signalling-server/src}/index.html
  21. +5 −1 {src/sig-server → packages/signalling-server/src}/index.js
  22. +18 −4 {src/sig-server → packages/signalling-server/src}/routes-ws/index.js
  23. +52 −0 packages/signalling-server/test/node.js
  24. +216 −0 packages/signalling-server/test/sig-server.js
  25. +46 −0 packages/transport/.aegir.js
  26. +109 −3 { → packages/transport}/CHANGELOG.md
  27. +62 −0 packages/transport/DEPLOYMENT.md
  28. +5 −0 packages/transport/LICENSE-APACHE
  29. +19 −0 packages/transport/LICENSE-MIT
  30. +101 −0 packages/transport/README.md
  31. +93 −0 packages/transport/package.json
  32. 0 { → packages/transport}/src/constants.js
  33. +15 −10 { → packages/transport}/src/index.js
  34. +41 −14 { → packages/transport}/src/listener.js
  35. 0 { → packages/transport}/src/socket-to-conn.js
  36. +5 −5 { → packages/transport}/src/utils.js
  37. 0 { → packages/transport}/test/browser.js
  38. +6 −7 { → packages/transport}/test/compliance.spec.js
  39. +2 −2 { → packages/transport}/test/node.js
  40. +24 −21 { → packages/transport}/test/transport/dial.js
  41. +6 −3 { → packages/transport}/test/transport/discovery.js
  42. +40 −0 packages/transport/test/transport/filter.js
  43. 0 { → packages/transport}/test/transport/instance.spec.js
  44. +30 −7 { → packages/transport}/test/transport/listen.js
  45. +121 −0 packages/transport/test/transport/multiple-signal-servers.js
  46. +11 −5 { → packages/transport}/test/transport/reconnect.node.js
  47. +12 −6 { → packages/transport}/test/transport/track.js
  48. +8 −8 { → packages/transport}/test/utils.spec.js
  49. +0 −215 test/sig-server.js
  50. +0 −40 test/transport/filter.js
30 changes: 0 additions & 30 deletions .aegir.js

This file was deleted.

8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "11:00"
open-pull-requests-limit: 10
200 changes: 200 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
name: Test
on:
pull_request:
branches:
- master

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./node_modules
./packages/*/node_modules
./packages/*/dist
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.event.pull_request.head.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run build --if-present
npm run link --if-present
check:
name: Check
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./node_modules
./packages/*/node_modules
./packages/*/dist
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.event.pull_request.head.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run build --if-present
npm run link --if-present
- run: |
npm run lint
npm run dep-check -- -- -- -p
npm run dep-check -- -- -- -- --unused
test-node:
name: Unit tests ${{ matrix.project }} node ${{ matrix.node }} ${{ matrix.os }}
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [16]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./node_modules
./packages/*/node_modules
./packages/*/dist
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.event.pull_request.head.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run build --if-present
npm run link --if-present
- run: npm run test:node -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1

test-browser:
name: Unit tests ${{ matrix.project }} ${{ matrix.browser }} ${{ matrix.type }}
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
browser:
- chromium
- firefox
type:
- browser
- webworker
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./node_modules
./packages/*/node_modules
./packages/*/dist
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.event.pull_request.head.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run build --if-present
npm run link --if-present
- run: npm run test:browser -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- -- --browser ${{ matrix.browser }}

test-electron-main:
name: Unit tests electron-main
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./node_modules
./packages/*/node_modules
./packages/*/dist
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.event.pull_request.head.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run build --if-present
npm run link --if-present
- uses: GabrielBB/xvfb-action@v1
with:
run: npm run test:electron-main -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- --bail

test-electron-renderer:
name: Unit tests electron-renderer
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: lts/*
- uses: actions/cache@v2
id: cache
env:
CACHE_NAME: cache-node-modules
with:
path: |
~/.npm
./node_modules
./packages/*/node_modules
./packages/*/dist
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.event.pull_request.head.sha }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
npm install
npm run build --if-present
npm run link --if-present
- uses: GabrielBB/xvfb-action@v1
with:
run: npm run test:electron-renderer -- --since ${{ github.event.pull_request.base.sha }} --concurrency 1 -- -- --bail
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -3,21 +3,21 @@ FROM node:lts-alpine as node
FROM node as builder

# Install deps
RUN apk add --update git build-base python3 libressl-dev ca-certificates
RUN apk add build-base python3 libressl-dev ca-certificates

# Setup directories for the `node` user
RUN mkdir -p /home/node/app/webrtc-star/node_modules && chown -R node:node /home/node/app/webrtc-star

WORKDIR /home/node/app/webrtc-star

# Install node modules
COPY package.json ./
COPY packages/signalling-server/package.json ./
# Switch to the node user for installation
RUN npm install --production

# Copy over source files under the node user
COPY ./src ./src
COPY ./README.md ./
COPY ./packages/signalling-server/src ./src
COPY ./packages/signalling-server/README.md ./

# Start from a clean node image
FROM node as server
@@ -36,4 +36,4 @@ EXPOSE 9090
# --port=9090 --host=0.0.0.0 --disableMetrics=false
# Server logging can be enabled via the DEBUG environment variable:
# DEBUG=signalling-server,signalling-server:error
CMD [ "node", "src/sig-server/bin.js"]
CMD [ "node", "src/bin.js"]
5 changes: 5 additions & 0 deletions LICENSE-APACHE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
10 changes: 4 additions & 6 deletions LICENSE → LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
The MIT License (MIT)

Copyright (c) 2016 David Dias

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading