From 5fe96e3923986738a2be0cafcee7e88d168e1893 Mon Sep 17 00:00:00 2001 From: akshatnema Date: Sat, 28 Sep 2024 15:48:54 +0530 Subject: [PATCH] removed monorepo style for github action --- .gitignore | 2 + github-action/.all-contributorsrc | 63 -------------------- github-action/.eslintignore | 2 - github-action/.eslintrc | 95 ------------------------------- github-action/.gitignore | 5 -- github-action/Dockerfile | 2 +- github-action/package-lock.json | 13 ----- github-action/package.json | 26 --------- package.json | 5 +- 9 files changed, 7 insertions(+), 206 deletions(-) delete mode 100644 github-action/.all-contributorsrc delete mode 100644 github-action/.eslintignore delete mode 100644 github-action/.eslintrc delete mode 100644 github-action/.gitignore delete mode 100644 github-action/package-lock.json delete mode 100644 github-action/package.json diff --git a/.gitignore b/.gitignore index b50ab0c5d88..6838f087126 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,8 @@ asyncapi.yml test/fixtures/minimaltemplate/__transpiled .vscode +/action/ + oclif.manifest.json spec-examples.zip diff --git a/github-action/.all-contributorsrc b/github-action/.all-contributorsrc deleted file mode 100644 index 9b28a65ac28..00000000000 --- a/github-action/.all-contributorsrc +++ /dev/null @@ -1,63 +0,0 @@ -{ - "files": [ - "README.md" - ], - "imageSize": 100, - "commit": false, - "contributors": [ - { - "login": "derberg", - "name": "Lukasz Gornicki", - "avatar_url": "https://avatars.githubusercontent.com/u/6995927?v=4", - "profile": "https://www.brainfart.dev/", - "contributions": [ - "code", - "maintenance", - "infra", - "review" - ] - }, - { - "login": "magicmatatjahu", - "name": "Maciej UrbaƄczyk", - "avatar_url": "https://avatars.githubusercontent.com/u/20404945?v=4", - "profile": "https://github.com/magicmatatjahu", - "contributions": [ - "review" - ] - }, - { - "login": "victormartingarcia", - "name": "Victor", - "avatar_url": "https://avatars.githubusercontent.com/u/659832?v=4", - "profile": "https://www.victormartingarcia.com", - "contributions": [ - "code" - ] - }, - { - "login": "HUTCHHUTCHHUTCH", - "name": "HUTCHHUTCHHUTCH", - "avatar_url": "https://avatars.githubusercontent.com/u/55915170?v=4", - "profile": "https://github.com/HUTCHHUTCHHUTCH", - "contributions": [ - "infra" - ] - }, - { - "login": "pioneer2k", - "name": "Thomas Heyer", - "avatar_url": "https://avatars.githubusercontent.com/u/32297829?v=4", - "profile": "https://github.com/pioneer2k", - "contributions": [ - "infra" - ] - } - ], - "contributorsPerLine": 7, - "projectName": "github-action-for-generator", - "projectOwner": "asyncapi", - "repoType": "github", - "repoHost": "https://github.com", - "commitConvention": "none" -} diff --git a/github-action/.eslintignore b/github-action/.eslintignore deleted file mode 100644 index d18209b7166..00000000000 --- a/github-action/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -output -node_modules diff --git a/github-action/.eslintrc b/github-action/.eslintrc deleted file mode 100644 index 076089e8c1f..00000000000 --- a/github-action/.eslintrc +++ /dev/null @@ -1,95 +0,0 @@ -env: - node: true - es6: true - -plugins: - - sonarjs - -extends: - - plugin:sonarjs/recommended - -parserOptions: - ecmaVersion: 2018 - -rules: - # Ignore Rules - strict: 0 - no-underscore-dangle: 0 - no-mixed-requires: 0 - no-process-exit: 0 - no-warning-comments: 0 - curly: 0 - no-multi-spaces: 0 - no-alert: 0 - consistent-return: 0 - consistent-this: [0, self] - func-style: 0 - max-nested-callbacks: 0 - - # Warnings - no-debugger: 1 - no-empty: 1 - no-invalid-regexp: 1 - no-unused-expressions: 1 - no-native-reassign: 1 - no-fallthrough: 1 - camelcase: 0 - - # Errors - eqeqeq: 2 - no-undef: 2 - no-dupe-keys: 2 - no-empty-character-class: 2 - no-self-compare: 2 - valid-typeof: 2 - no-unused-vars: [2, { "args": "none" }] - handle-callback-err: 2 - no-shadow-restricted-names: 2 - no-new-require: 2 - no-mixed-spaces-and-tabs: 2 - block-scoped-var: 2 - no-else-return: 2 - no-throw-literal: 2 - no-void: 2 - radix: 2 - wrap-iife: [2, outside] - no-shadow: 0 - no-use-before-define: [2, nofunc] - no-path-concat: 2 - valid-jsdoc: [0, {requireReturn: false, requireParamDescription: false, requireReturnDescription: false}] - - # stylistic errors - no-spaced-func: 2 - semi-spacing: 2 - quotes: [2, 'single'] - key-spacing: [2, { beforeColon: false, afterColon: true }] - indent: [2, 2] - no-lonely-if: 2 - no-floating-decimal: 2 - brace-style: [2, 1tbs, { allowSingleLine: true }] - comma-style: [2, last] - no-multiple-empty-lines: [2, {max: 1}] - no-nested-ternary: 2 - operator-assignment: [2, always] - padded-blocks: [2, never] - quote-props: [2, as-needed] - keyword-spacing: [2, {'before': true, 'after': true, 'overrides': {}}] - space-before-blocks: [2, always] - array-bracket-spacing: [2, never] - computed-property-spacing: [2, never] - space-in-parens: [2, never] - space-unary-ops: [2, {words: true, nonwords: false}] - wrap-regex: 2 - linebreak-style: 0 - semi: [2, always] - arrow-spacing: [2, {before: true, after: true}] - no-class-assign: 2 - no-const-assign: 2 - no-dupe-class-members: 2 - no-this-before-super: 2 - no-var: 2 - object-shorthand: [2, always] - prefer-arrow-callback: 2 - prefer-const: 2 - prefer-spread: 2 - prefer-template: 2 diff --git a/github-action/.gitignore b/github-action/.gitignore deleted file mode 100644 index daaf8510a3e..00000000000 --- a/github-action/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -coverage -.DS_Store -output -node_modules -dist \ No newline at end of file diff --git a/github-action/Dockerfile b/github-action/Dockerfile index 93cdef580c5..4046e3f3b0e 100644 --- a/github-action/Dockerfile +++ b/github-action/Dockerfile @@ -17,4 +17,4 @@ COPY entrypoint.sh /entrypoint.sh # Make the bash file executable RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/entrypoint.sh"] diff --git a/github-action/package-lock.json b/github-action/package-lock.json deleted file mode 100644 index a7463145084..00000000000 --- a/github-action/package-lock.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "github-action-for-cli", - "version": "3.1.2", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "github-action-for-cli", - "version": "3.1.2", - "license": "Apache-2.0" - } - } -} diff --git a/github-action/package.json b/github-action/package.json deleted file mode 100644 index a1bbfd1c089..00000000000 --- a/github-action/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "github-action-for-cli", - "description": "This is to be used for running tests for the GitHub Action using the MakeFile", - "version": "3.1.2", - "scripts": { - "test": "make test", - "generate:assets": "echo 'No additional assets need to be generated at the moment'", - "docker:build": "docker build -t asyncapi/github-action-for-cli:latest .", - "bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/asyncapi/github-action-for-cli.git" - }, - "keywords": [ - "GitHub", - "Actions", - "AsyncAPI" - ], - "author": "Lukasz Gornicki ", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/asyncapi/github-action-for-cli/issues" - }, - "homepage": "https://github.com/asyncapi/github-action-for-cli#readme" -} diff --git a/package.json b/package.json index 0c76565940c..b61f545cba3 100644 --- a/package.json +++ b/package.json @@ -172,7 +172,10 @@ "test:one": "cross-env NODE_ENV=development TEST=1 CUSTOM_CONTEXT_FILENAME=\"test.asyncapi-cli\" CUSTOM_CONTEXT_FILE_LOCATION=\"\" nyc --extension .ts mocha --require ts-node/register --require test/helpers/init.js --reporter spec --timeout 100000", "get-version": "echo $npm_package_version", "createhook": "oclif generate hook myhook --event=command_not_found", - "createhookinit": "oclif generate hook inithook --event=init" + "createhookinit": "oclif generate hook inithook --event=init", + "action:docker:build": "docker build -f github-action/Dockerfile -t asyncapi/github-action-for-cli:latest action", + "action:bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION", + "action:test": "make -f github-action/MakeFile test" }, "types": "lib/index.d.ts" }