From c92ac975c4b29211a057785506d4f7d14718bc0a Mon Sep 17 00:00:00 2001 From: Khuda Dad Nomani Date: Thu, 12 Oct 2023 15:19:26 +0100 Subject: [PATCH] discard changes in coverall --- .github/workflows/coverall.yml | 75 ++++--------------- .../crypto-websockets/client/glee.config.js | 3 + .../client/package-lock.json | 46 ++++++------ .../crypto-websockets/server/glee.config.js | 7 ++ .../server/package-lock.json | 46 ++++++------ src/adapters/mqtt/index.ts | 2 +- 6 files changed, 73 insertions(+), 106 deletions(-) create mode 100644 examples/crypto-websockets/server/glee.config.js diff --git a/.github/workflows/coverall.yml b/.github/workflows/coverall.yml index a981c94df..1f7e18168 100644 --- a/.github/workflows/coverall.yml +++ b/.github/workflows/coverall.yml @@ -1,68 +1,25 @@ -name: Check test coverage - on: push: branches: - master pull_request: types: [opened, reopened, synchronize, ready_for_review] - +name: Check test coverage jobs: - test-coveralls: - name: Test and Run Coveralls + build: + name: Build runs-on: ubuntu-latest steps: - - if: > - !github.event.pull_request.draft && !( - (github.actor == 'asyncapi-bot' && ( - startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || - startsWith(github.event.pull_request.title, 'chore(release):') - )) || - (github.actor == 'asyncapi-bot-eve' && ( - startsWith(github.event.pull_request.title, 'ci: update of files from global .github repo') || - startsWith(github.event.pull_request.title, 'chore(release):') - )) || - (github.actor == 'allcontributors[bot]' && - startsWith(github.event.pull_request.title, 'docs: add') - ) - ) - id: should_run - name: Should Run - run: echo "shouldrun=true" >> $GITHUB_OUTPUT - - if: steps.should_run.outputs.shouldrun == 'true' - name: Set git to use LF #to once and for all finish neverending fight between Unix and Windows - run: | - git config --global core.autocrlf false - git config --global core.eol lf - - if: steps.should_run.outputs.shouldrun == 'true' - name: Checkout repository - uses: actions/checkout@v3 - - if: steps.should_run.outputs.shouldrun == 'true' - name: Check package-lock version - uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master - id: lockversion - - if: steps.should_run.outputs.shouldrun == 'true' - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: "${{ steps.lockversion.outputs.version }}" - cache: 'npm' - cache-dependency-path: '**/package-lock.json' - - if: steps.should_run.outputs.shouldrun == 'true' - name: Install dependencies - id: first-installation - run: npm install --loglevel verbose - continue-on-error: true - - if: steps.first-installation.outputs.status == 'failure' - name: Clear NPM cache and install deps again - run: | - npm cache clean --force - npm install --loglevel verbose - - if: steps.should_run.outputs.shouldrun == 'true' - name: Test - run: npm test --if-present - - if: steps.should_run.outputs.shouldrun == 'true' - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: npm install, run test + run: | + npm install + npm run test + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/examples/crypto-websockets/client/glee.config.js b/examples/crypto-websockets/client/glee.config.js index b6732bec7..affe191b3 100644 --- a/examples/crypto-websockets/client/glee.config.js +++ b/examples/crypto-websockets/client/glee.config.js @@ -1,5 +1,8 @@ export default async function () { return { + docs: { + enabled: false + }, ws: { client: { auth: async ({serverName}) => { diff --git a/examples/crypto-websockets/client/package-lock.json b/examples/crypto-websockets/client/package-lock.json index a1933a36d..722de8e40 100644 --- a/examples/crypto-websockets/client/package-lock.json +++ b/examples/crypto-websockets/client/package-lock.json @@ -15,11 +15,13 @@ }, "../../..": { "name": "@asyncapi/glee", - "version": "0.10.17", + "version": "0.26.10", "license": "Apache-2.0", "dependencies": { - "@asyncapi/generator": "^1.9.3", - "@asyncapi/parser": "^1.13.1", + "@asyncapi/generator": "^1.13.1", + "@asyncapi/html-template": "^0.28.4", + "@asyncapi/markdown-template": "^1.3.3", + "@asyncapi/parser": "^2.1.0", "@types/jest": "^27.4.0", "@types/qs": "^6.9.7", "ajv": "^6.12.6", @@ -34,7 +36,9 @@ "emojis": "^1.0.10", "eslint-plugin-github": "^4.3.5", "eslint-plugin-security": "^1.4.0", - "mqtt": "^4.2.6", + "got": "^12.5.3", + "kafkajs": "^2.2.3", + "mqtt": "^4.3.7", "path-to-regexp": "^6.2.0", "qs": "^6.11.0", "redis": "^4.0.2", @@ -52,31 +56,27 @@ "glee": "dist/cli/index.js" }, "devDependencies": { - "@semantic-release/commit-analyzer": "^8.0.1", - "@semantic-release/github": "^7.0.4", - "@semantic-release/npm": "^7.0.6", - "@semantic-release/release-notes-generator": "^9.0.1", "@tsconfig/node14": "^1.0.1", "@types/async": "^3.2.11", "@types/debug": "^4.1.7", "@types/socket.io": "^3.0.2", "@types/uri-templates": "^0.1.31", + "@types/ws": "^8.5.3", "@typescript-eslint/eslint-plugin": "^5.9.0", "@typescript-eslint/parser": "^5.9.0", "all-contributors-cli": "^6.14.2", - "conventional-changelog-conventionalcommits": "^4.4.0", "eslint": "^8.6.0", "eslint-plugin-jest": "^23.8.2", - "eslint-plugin-sonarjs": "^0.5.0", + "eslint-plugin-sonarjs": "^0.19.0", + "fs-extra": "^10.1.0", "jest": "^27.4.7", "jest-extended": "^1.2.0", "jsdoc-to-markdown": "^5.0.3", "markdown-toc": "^1.2.0", "rimraf": "^3.0.2", - "semantic-release": "^17.2.2", "ts-jest": "^27.1.2", "tsc-watch": "^4.5.0", - "typedoc": "^0.22.10", + "typedoc": "^0.23.28", "typedoc-plugin-markdown": "^3.11.8", "unixify": "^1.0.0" }, @@ -98,12 +98,10 @@ "@asyncapi/glee": { "version": "file:../../..", "requires": { - "@asyncapi/generator": "^1.9.3", - "@asyncapi/parser": "^1.13.1", - "@semantic-release/commit-analyzer": "^8.0.1", - "@semantic-release/github": "^7.0.4", - "@semantic-release/npm": "^7.0.6", - "@semantic-release/release-notes-generator": "^9.0.1", + "@asyncapi/generator": "^1.13.1", + "@asyncapi/html-template": "^0.28.4", + "@asyncapi/markdown-template": "^1.3.3", + "@asyncapi/parser": "^2.1.0", "@tsconfig/node14": "^1.0.1", "@types/async": "^3.2.11", "@types/debug": "^4.1.7", @@ -111,6 +109,7 @@ "@types/qs": "^6.9.7", "@types/socket.io": "^3.0.2", "@types/uri-templates": "^0.1.31", + "@types/ws": "^8.5.3", "@typescript-eslint/eslint-plugin": "^5.9.0", "@typescript-eslint/parser": "^5.9.0", "ajv": "^6.12.6", @@ -119,7 +118,6 @@ "better-ajv-errors": "^0.7.0", "bufferutil": "^4.0.3", "chalk": "^4.1.1", - "conventional-changelog-conventionalcommits": "^4.4.0", "cross-spawn": "^7.0.3", "debug": "^4.3.1", "dotenv": "^10.0.0", @@ -129,22 +127,24 @@ "eslint-plugin-github": "^4.3.5", "eslint-plugin-jest": "^23.8.2", "eslint-plugin-security": "^1.4.0", - "eslint-plugin-sonarjs": "^0.5.0", + "eslint-plugin-sonarjs": "^0.19.0", + "fs-extra": "^10.1.0", + "got": "^12.5.3", "jest": "^27.4.7", "jest-extended": "^1.2.0", "jsdoc-to-markdown": "^5.0.3", + "kafkajs": "^2.2.3", "markdown-toc": "^1.2.0", - "mqtt": "^4.2.6", + "mqtt": "^4.3.7", "path-to-regexp": "^6.2.0", "qs": "^6.11.0", "redis": "^4.0.2", "rimraf": "^3.0.2", - "semantic-release": "^17.2.2", "socket.io": "^4.1.2", "terminal-image": "^2.0.0", "ts-jest": "^27.1.2", "tsc-watch": "^4.5.0", - "typedoc": "^0.22.10", + "typedoc": "^0.23.28", "typedoc-plugin-markdown": "^3.11.8", "typescript": "^4.5.4", "unixify": "^1.0.0", diff --git a/examples/crypto-websockets/server/glee.config.js b/examples/crypto-websockets/server/glee.config.js new file mode 100644 index 000000000..a2845c34c --- /dev/null +++ b/examples/crypto-websockets/server/glee.config.js @@ -0,0 +1,7 @@ +export default async function () { + return { + docs: { + enabled: false + }, + } +} diff --git a/examples/crypto-websockets/server/package-lock.json b/examples/crypto-websockets/server/package-lock.json index 1c115ba77..3139e0dfe 100644 --- a/examples/crypto-websockets/server/package-lock.json +++ b/examples/crypto-websockets/server/package-lock.json @@ -14,11 +14,13 @@ }, "../../..": { "name": "@asyncapi/glee", - "version": "0.10.17", + "version": "0.26.10", "license": "Apache-2.0", "dependencies": { - "@asyncapi/generator": "^1.9.3", - "@asyncapi/parser": "^1.13.1", + "@asyncapi/generator": "^1.13.1", + "@asyncapi/html-template": "^0.28.4", + "@asyncapi/markdown-template": "^1.3.3", + "@asyncapi/parser": "^2.1.0", "@types/jest": "^27.4.0", "@types/qs": "^6.9.7", "ajv": "^6.12.6", @@ -33,7 +35,9 @@ "emojis": "^1.0.10", "eslint-plugin-github": "^4.3.5", "eslint-plugin-security": "^1.4.0", - "mqtt": "^4.2.6", + "got": "^12.5.3", + "kafkajs": "^2.2.3", + "mqtt": "^4.3.7", "path-to-regexp": "^6.2.0", "qs": "^6.11.0", "redis": "^4.0.2", @@ -51,31 +55,27 @@ "glee": "dist/cli/index.js" }, "devDependencies": { - "@semantic-release/commit-analyzer": "^8.0.1", - "@semantic-release/github": "^7.0.4", - "@semantic-release/npm": "^7.0.6", - "@semantic-release/release-notes-generator": "^9.0.1", "@tsconfig/node14": "^1.0.1", "@types/async": "^3.2.11", "@types/debug": "^4.1.7", "@types/socket.io": "^3.0.2", "@types/uri-templates": "^0.1.31", + "@types/ws": "^8.5.3", "@typescript-eslint/eslint-plugin": "^5.9.0", "@typescript-eslint/parser": "^5.9.0", "all-contributors-cli": "^6.14.2", - "conventional-changelog-conventionalcommits": "^4.4.0", "eslint": "^8.6.0", "eslint-plugin-jest": "^23.8.2", - "eslint-plugin-sonarjs": "^0.5.0", + "eslint-plugin-sonarjs": "^0.19.0", + "fs-extra": "^10.1.0", "jest": "^27.4.7", "jest-extended": "^1.2.0", "jsdoc-to-markdown": "^5.0.3", "markdown-toc": "^1.2.0", "rimraf": "^3.0.2", - "semantic-release": "^17.2.2", "ts-jest": "^27.1.2", "tsc-watch": "^4.5.0", - "typedoc": "^0.22.10", + "typedoc": "^0.23.28", "typedoc-plugin-markdown": "^3.11.8", "unixify": "^1.0.0" }, @@ -92,12 +92,10 @@ "@asyncapi/glee": { "version": "file:../../..", "requires": { - "@asyncapi/generator": "^1.9.3", - "@asyncapi/parser": "^1.13.1", - "@semantic-release/commit-analyzer": "^8.0.1", - "@semantic-release/github": "^7.0.4", - "@semantic-release/npm": "^7.0.6", - "@semantic-release/release-notes-generator": "^9.0.1", + "@asyncapi/generator": "^1.13.1", + "@asyncapi/html-template": "^0.28.4", + "@asyncapi/markdown-template": "^1.3.3", + "@asyncapi/parser": "^2.1.0", "@tsconfig/node14": "^1.0.1", "@types/async": "^3.2.11", "@types/debug": "^4.1.7", @@ -105,6 +103,7 @@ "@types/qs": "^6.9.7", "@types/socket.io": "^3.0.2", "@types/uri-templates": "^0.1.31", + "@types/ws": "^8.5.3", "@typescript-eslint/eslint-plugin": "^5.9.0", "@typescript-eslint/parser": "^5.9.0", "ajv": "^6.12.6", @@ -113,7 +112,6 @@ "better-ajv-errors": "^0.7.0", "bufferutil": "^4.0.3", "chalk": "^4.1.1", - "conventional-changelog-conventionalcommits": "^4.4.0", "cross-spawn": "^7.0.3", "debug": "^4.3.1", "dotenv": "^10.0.0", @@ -123,22 +121,24 @@ "eslint-plugin-github": "^4.3.5", "eslint-plugin-jest": "^23.8.2", "eslint-plugin-security": "^1.4.0", - "eslint-plugin-sonarjs": "^0.5.0", + "eslint-plugin-sonarjs": "^0.19.0", + "fs-extra": "^10.1.0", + "got": "^12.5.3", "jest": "^27.4.7", "jest-extended": "^1.2.0", "jsdoc-to-markdown": "^5.0.3", + "kafkajs": "^2.2.3", "markdown-toc": "^1.2.0", - "mqtt": "^4.2.6", + "mqtt": "^4.3.7", "path-to-regexp": "^6.2.0", "qs": "^6.11.0", "redis": "^4.0.2", "rimraf": "^3.0.2", - "semantic-release": "^17.2.2", "socket.io": "^4.1.2", "terminal-image": "^2.0.0", "ts-jest": "^27.1.2", "tsc-watch": "^4.5.0", - "typedoc": "^0.22.10", + "typedoc": "^0.23.28", "typedoc-plugin-markdown": "^3.11.8", "typescript": "^4.5.4", "unixify": "^1.0.0", diff --git a/src/adapters/mqtt/index.ts b/src/adapters/mqtt/index.ts index b904fd72a..1b85d449e 100644 --- a/src/adapters/mqtt/index.ts +++ b/src/adapters/mqtt/index.ts @@ -62,7 +62,7 @@ class MqttAdapter extends Adapter { X509SecurityReq = sec break default: - throw Error(`Invalid security type '${securityType}' specified for server '${this.serverName}'. Please double-check your configuration to ensure you're using a supported security type. Here is a list of supported types: ${Object.values(SecurityTypes)}`) + this.emit("error", new Error(`Invalid security type '${securityType}' specified for server '${this.serverName}'. Please double-check your configuration to ensure you're using a supported security type. Here is a list of supported types: ${Object.values(SecurityTypes)}`)) } } })