-
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.
feat: adjust to remote access connect approach (#1)
* adjust to remote access connect approach * setup pipeline * fix build and adjust readme * fix: ensure user has remote access permissions * fix: no need to attach token if using oauth * feat: add hint regarding broken compatibility with electron agent BREAKING CHANGE: The way of establishing the WebRTC connection has changed and is no longer compatible with the old implementation.
- Loading branch information
Showing
37 changed files
with
46,851 additions
and
11,401 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,3 @@ | ||
{ | ||
"extends": ["@commitlint/config-angular"] | ||
} |
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,2 @@ | ||
node_modules/ | ||
dist/ |
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,42 @@ | ||
{ | ||
"root": true, | ||
"ignorePatterns": ["projects/**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@angular-eslint/recommended", | ||
"plugin:@angular-eslint/template/process-inline-templates", | ||
"plugin:prettier/recommended" // <--- here we inherit from the recommended setup from eslint-plugin-prettier for TS | ||
], | ||
"rules": {}, | ||
"parserOptions": { | ||
"project": ["tsconfig.json"] | ||
} | ||
}, | ||
{ | ||
"files": ["*.spec.ts"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@angular-eslint/recommended", | ||
"plugin:@angular-eslint/template/process-inline-templates", | ||
"plugin:prettier/recommended" // <--- here we inherit from the recommended setup from eslint-plugin-prettier for TS | ||
], | ||
"rules": {}, | ||
"parserOptions": { | ||
"project": ["tsconfig.spec.json"] | ||
} | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"extends": [ | ||
"plugin:@angular-eslint/template/recommended", | ||
"plugin:prettier/recommended" // <--- here we inherit from the recommended setup from eslint-plugin-prettier for HTML | ||
], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
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,54 @@ | ||
name: Pull request | ||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
build: | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-22.04 | ||
name: Build | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- uses: sibiraj-s/action-eslint@v2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
eslint-args: '--quiet' | ||
extensions: 'html,ts' | ||
annotations: true | ||
|
||
- name: Run unit tests | ||
run: | | ||
npm run test | ||
- name: Add commit hash to version | ||
run: | | ||
npm version prepatch --no-git-tag-version --preid $(git rev-parse --short HEAD) | ||
- name: Build | ||
run: npm run build:ci | ||
|
||
- name: Upload build artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build | ||
if-no-files-found: error | ||
retention-days: 5 | ||
path: | | ||
dist/apps/sag-ps-iot-pkg-webrtc-webcam-plugin/** |
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,85 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- next | ||
- beta | ||
- '*.x' | ||
- '*.*.x' | ||
|
||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 8 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Linting | ||
run: npm run lint | ||
|
||
- name: Build | ||
run: npm run build:ci | ||
|
||
- name: Zip build | ||
run: | | ||
cd dist/apps/sag-ps-iot-pkg-webrtc-webcam-plugin | ||
zip -r -q ../../build.zip * | ||
cd ../../.. | ||
rm -r dist/apps | ||
- name: Upload build artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build | ||
if-no-files-found: error | ||
retention-days: 5 | ||
path: | | ||
dist/build.zip | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
timeout-minutes: 8 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 'lts/*' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Download build | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: build | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: npx semantic-release |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit ${1} |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run lint:staged --quiet |
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,3 @@ | ||
{ | ||
"*.(ts|html)": "eslint" | ||
} |
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,11 @@ | ||
{ | ||
"singleQuote": true, | ||
"overrides": [ | ||
{ | ||
"files": "*.html", | ||
"options": { | ||
"parser": "angular" | ||
} | ||
} | ||
] | ||
} |
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,51 @@ | ||
{ | ||
"branches": [ | ||
"+([0-9])?(.{+([0-9]),x}).x", | ||
"main", | ||
"next", | ||
"next-major", | ||
{ "name": "beta", "prerelease": true }, | ||
{ "name": "alpha", "prerelease": true } | ||
], | ||
"tagFormat": "v${version}", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"npmPublish": false | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"CHANGELOG.md", | ||
"package.json", | ||
"package-lock.json", | ||
"npm-shrinkwrap.json" | ||
], | ||
"message": "ci(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "bash ./replaceVersion.sh ${nextRelease.version}" | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"assets": [ | ||
{ | ||
"path": "sag-ps-iot-pkg-webrtc-webcam-plugin-*.zip" | ||
} | ||
] | ||
} | ||
] | ||
], | ||
"preset": "angular" | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// jest.config.js | ||
module.exports = { | ||
preset: 'jest-preset-angular', | ||
setupFilesAfterEnv: ['<rootDir>/setup-jest.js'], | ||
setupFilesAfterEnv: ['<rootDir>/src/setup-jest.js'], | ||
transformIgnorePatterns: ['/!node_modules\\/lodash-es/'] | ||
}; |
Oops, something went wrong.