From b903c3c53c6279fd5e2a1ae43e4953b7c9bb0564 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Wed, 19 Apr 2023 17:36:30 -0400 Subject: [PATCH] removing js and java implementations Signed-off-by: Michael Hoang --- .github/workflows/CI.yml | 63 +- .github/workflows/release.yml | 86 - README.md | 33 +- docs/public/alizer-spec.md | 86 +- java/.mvn/wrapper/MavenWrapperDownloader.java | 117 - java/.mvn/wrapper/maven-wrapper.jar | Bin 50710 -> 0 bytes java/.mvn/wrapper/maven-wrapper.properties | 2 - java/Jenkinsfile | 19 - java/README.md | 83 - java/alizer-api/pom.xml | 70 - .../redhat/devtools/alizer/api/Component.java | 34 - .../alizer/api/ComponentRecognizer.java | 19 - .../alizer/api/ComponentRecognizerImpl.java | 285 -- .../redhat/devtools/alizer/api/Constants.java | 39 - .../alizer/api/DevFileRecognizer.java | 9 - .../alizer/api/DevFileRecognizerImpl.java | 50 - .../devtools/alizer/api/DevfileType.java | 26 - .../redhat/devtools/alizer/api/Language.java | 68 - .../alizer/api/LanguageFileHandler.java | 167 -- .../devtools/alizer/api/LanguageFileItem.java | 101 - .../alizer/api/LanguageRecognizer.java | 18 - .../alizer/api/LanguageRecognizerImpl.java | 87 - .../devtools/alizer/api/LanguageScore.java | 62 - .../devtools/alizer/api/Recognizer.java | 35 - .../alizer/api/RecognizerFactory.java | 25 - .../DotNetLanguageEnricherProviderImpl.java | 119 - .../spi/GoLanguageEnricherProviderImpl.java | 81 - .../spi/JavaLanguageEnricherProviderImpl.java | 94 - ...avaScriptLanguageEnricherProviderImpl.java | 64 - .../api/spi/LanguageEnricherProvider.java | 79 - .../PythonLanguageEnricherProviderImpl.java | 58 - .../framework/FrameworkDetectorProvider.java | 23 - ...ameworkDetectorWithConfigFileProvider.java | 19 - ...workDetectorWithoutConfigFileProvider.java | 20 - .../BeegoFrameworkDetectorProviderImpl.java | 36 - .../go/EchoFrameworkDetectorProviderImpl.java | 36 - ...FastHttpFrameworkDetectorProviderImpl.java | 36 - .../go/GinFrameworkDetectorProviderImpl.java | 36 - .../GoFiberFrameworkDetectorProviderImpl.java | 36 - .../go/GoFrameworkDetectorProvider.java | 36 - .../go/MuxFrameworkDetectorProviderImpl.java | 36 - .../java/JavaFrameworkDetectorProvider.java | 60 - ...icronautFrameworkDetectorProviderImpl.java | 37 - ...nLibertyFrameworkDetectorProviderImpl.java | 37 - .../QuarkusFrameworkDetectorProviderImpl.java | 37 - .../SpringFrameworkDetectorProviderImpl.java | 37 - .../VertxFrameworkDetectorProviderImpl.java | 37 - .../ExpressFrameworkDetectorProviderImpl.java | 36 - .../NodeJsFrameworkDetectorProvider.java | 46 - .../ReactFrameworkDetectorProviderImpl.java | 36 - .../DjangoFrameworkDetectorProviderImpl.java | 57 - .../alizer/api/utils/DocumentParser.java | 36 - .../devtools/alizer/api/utils/Utils.java | 36 - ...ls.alizer.api.spi.LanguageEnricherProvider | 5 - ...pi.spi.framework.FrameworkDetectorProvider | 14 - .../alizer/api/AbstractRecognizerTest.java | 79 - .../alizer/api/ComponentRecognizerTest.java | 133 - .../alizer/api/DevFileRecognizerTest.java | 73 - .../alizer/api/LanguageRecognizerTest.java | 99 - .../alizer/api/LanguageScoreTest.java | 37 - .../src/test/resources/devfiles/django.yaml | 6 - .../src/test/resources/devfiles/java.yaml | 6 - .../src/test/resources/devfiles/nodejs.yaml | 6 - .../src/test/resources/devfiles/python.yaml | 6 - .../src/test/resources/devfiles/quarkus.yaml | 6 - java/alizer-cli/.dockerignore | 5 - java/alizer-cli/pom.xml | 134 - .../src/main/docker/Dockerfile.fast-jar | 54 - .../alizer-cli/src/main/docker/Dockerfile.jvm | 51 - .../src/main/docker/Dockerfile.native | 27 - .../redhat/devtools/alizer/cli/AlizerCli.java | 23 - .../devtools/alizer/cli/AnalyzeCommand.java | 49 - .../devtools/alizer/cli/BaseCommand.java | 34 - .../devtools/alizer/cli/ComponentCommand.java | 39 - .../devtools/alizer/cli/DevfileCommand.java | 51 - .../alizer/cli/DevfileTypeAdapter.java | 44 - .../com/redhat/devtools/alizer/cli/Dummy.java | 8 - .../src/main/resources/application.properties | 7 - .../templates/AnalyzeCommand/result.json | 20 - .../templates/AnalyzeCommand/result.txt | 3 - .../templates/ComponentCommand/result.json | 14 - .../templates/ComponentCommand/result.txt | 3 - .../templates/DevfileCommand/result.json | 7 - .../templates/DevfileCommand/result.txt | 5 - java/alizer-registry-support/pom.xml | 28 - .../registry/support/DevfileMetadata.java | 168 -- .../support/DevfileMetadataProvider.java | 17 - .../DevfileRegistryMetadataProvider.java | 43 - ...evfileRegistryMetadataProviderBuilder.java | 32 - .../support/DevfileRegistryProxy.java | 60 - .../registry/support/RegistryProxyTest.java | 78 - java/mvnw | 310 --- java/mvnw.cmd | 182 -- java/pom.xml | 43 - js/Jenkinsfile | 56 - js/README.md | 46 - js/package-lock.json | 2450 ----------------- js/package.json | 28 - js/src/constants.ts | 22 - js/src/javaRecognizer.ts | 61 - js/src/pythonRecognizer.ts | 29 - js/src/recognizer.ts | 150 - js/src/types.ts | 17 - js/src/utils.ts | 10 - js/test/recognizer.test.ts | 88 - js/tsconfig.json | 18 - 106 files changed, 52 insertions(+), 7817 deletions(-) delete mode 100644 .github/workflows/release.yml delete mode 100644 java/.mvn/wrapper/MavenWrapperDownloader.java delete mode 100644 java/.mvn/wrapper/maven-wrapper.jar delete mode 100644 java/.mvn/wrapper/maven-wrapper.properties delete mode 100644 java/Jenkinsfile delete mode 100644 java/README.md delete mode 100644 java/alizer-api/pom.xml delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Component.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/ComponentRecognizer.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/ComponentRecognizerImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Constants.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/DevFileRecognizer.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/DevFileRecognizerImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/DevfileType.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Language.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageFileHandler.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageFileItem.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageRecognizer.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageRecognizerImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageScore.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Recognizer.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/RecognizerFactory.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/DotNetLanguageEnricherProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/GoLanguageEnricherProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/JavaLanguageEnricherProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/JavaScriptLanguageEnricherProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/LanguageEnricherProvider.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/PythonLanguageEnricherProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/FrameworkDetectorProvider.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/FrameworkDetectorWithConfigFileProvider.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/FrameworkDetectorWithoutConfigFileProvider.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/BeegoFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/EchoFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/FastHttpFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/GinFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/GoFiberFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/GoFrameworkDetectorProvider.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/MuxFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/JavaFrameworkDetectorProvider.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/MicronautFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/OpenLibertyFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/QuarkusFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/SpringFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/VertxFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/nodejs/ExpressFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/nodejs/NodeJsFrameworkDetectorProvider.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/nodejs/ReactFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/python/DjangoFrameworkDetectorProviderImpl.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/utils/DocumentParser.java delete mode 100644 java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/utils/Utils.java delete mode 100644 java/alizer-api/src/main/resources/META-INF/services/com.redhat.devtools.alizer.api.spi.LanguageEnricherProvider delete mode 100644 java/alizer-api/src/main/resources/META-INF/services/com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider delete mode 100644 java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/AbstractRecognizerTest.java delete mode 100644 java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/ComponentRecognizerTest.java delete mode 100644 java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/DevFileRecognizerTest.java delete mode 100644 java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/LanguageRecognizerTest.java delete mode 100644 java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/LanguageScoreTest.java delete mode 100644 java/alizer-api/src/test/resources/devfiles/django.yaml delete mode 100644 java/alizer-api/src/test/resources/devfiles/java.yaml delete mode 100644 java/alizer-api/src/test/resources/devfiles/nodejs.yaml delete mode 100644 java/alizer-api/src/test/resources/devfiles/python.yaml delete mode 100644 java/alizer-api/src/test/resources/devfiles/quarkus.yaml delete mode 100644 java/alizer-cli/.dockerignore delete mode 100644 java/alizer-cli/pom.xml delete mode 100644 java/alizer-cli/src/main/docker/Dockerfile.fast-jar delete mode 100644 java/alizer-cli/src/main/docker/Dockerfile.jvm delete mode 100644 java/alizer-cli/src/main/docker/Dockerfile.native delete mode 100644 java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/AlizerCli.java delete mode 100644 java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/AnalyzeCommand.java delete mode 100644 java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/BaseCommand.java delete mode 100644 java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/ComponentCommand.java delete mode 100644 java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/DevfileCommand.java delete mode 100644 java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/DevfileTypeAdapter.java delete mode 100644 java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/Dummy.java delete mode 100644 java/alizer-cli/src/main/resources/application.properties delete mode 100644 java/alizer-cli/src/main/resources/templates/AnalyzeCommand/result.json delete mode 100644 java/alizer-cli/src/main/resources/templates/AnalyzeCommand/result.txt delete mode 100644 java/alizer-cli/src/main/resources/templates/ComponentCommand/result.json delete mode 100644 java/alizer-cli/src/main/resources/templates/ComponentCommand/result.txt delete mode 100644 java/alizer-cli/src/main/resources/templates/DevfileCommand/result.json delete mode 100644 java/alizer-cli/src/main/resources/templates/DevfileCommand/result.txt delete mode 100644 java/alizer-registry-support/pom.xml delete mode 100644 java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileMetadata.java delete mode 100644 java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileMetadataProvider.java delete mode 100644 java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileRegistryMetadataProvider.java delete mode 100644 java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileRegistryMetadataProviderBuilder.java delete mode 100644 java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileRegistryProxy.java delete mode 100644 java/alizer-registry-support/src/test/java/com/redhat/devtools/alizer/registry/support/RegistryProxyTest.java delete mode 100755 java/mvnw delete mode 100644 java/mvnw.cmd delete mode 100644 java/pom.xml delete mode 100644 js/Jenkinsfile delete mode 100644 js/README.md delete mode 100644 js/package-lock.json delete mode 100644 js/package.json delete mode 100644 js/src/constants.ts delete mode 100644 js/src/javaRecognizer.ts delete mode 100644 js/src/pythonRecognizer.ts delete mode 100644 js/src/recognizer.ts delete mode 100644 js/src/types.ts delete mode 100644 js/src/utils.ts delete mode 100644 js/test/recognizer.test.ts delete mode 100644 js/tsconfig.json diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 588221ed..f8078937 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,7 +1,7 @@ # This workflow will build a Java project with Maven # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Java/Js CI +name: CI on: push: branches: [ main ] @@ -9,67 +9,6 @@ on: branches: [ main ] jobs: - build-java: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Cache Maven packages - uses: actions/cache@v2 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Build with Maven - run: mvn -B verify -f java - - build-native: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Graalvm - # 4.0 - uses: DeLaGuardo/setup-graalvm@a766aa7b5fcc0a801fa3d4fd521ca299c03c9c00 - with: - graalvm: '21.0.0.2' - java: java11 - - name: Install native-image - run: | - gu install native-image - - name: Cache Maven packages - uses: actions/cache@v2 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Build with Maven - run: mvn -B verify -Pnative -f java - - build-js: - - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Install dependencies - run: npm install - working-directory: js - - name: Build - run: npm run test - working-directory: js - build-go: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index fa5ce32d..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Generate changelog and plugin archive for new release -on: - push: - tags: - - '*' -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - include: - - os: ubuntu-latest - suffix: Linux-x86_64.tar.xz - gu-tool: gu - - os: macos-latest - suffix: Darwin-x86_64.tar.xz - gu-tool: gu - - os: windows-latest - suffix: Windows-x86_64.zip - gu-tool: gu.cmd - steps: - - uses: actions/checkout@v2 - - name: Set up Graalvm - # 4.0 - uses: DeLaGuardo/setup-graalvm@a766aa7b5fcc0a801fa3d4fd521ca299c03c9c00 - with: - graalvm: '21.0.0.2' - java: java11 - - name: Install native-image - run: | - ${{ matrix.gu-tool }} install native-image - - name: Cache Maven packages - uses: actions/cache@v2 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - name: Get the version - id: get_version - # v2 - uses: battila7/get-version-action@d97fbc34ceb64d1f5d95f4dfd6dce33521ccccf5 - - name: Set up Visual C Build Tools Workload for Visual Studio 2017 Build Tools - run: | - choco install visualstudio2017-workload-vctools - if: ${{ matrix.os == 'windows-latest' }} - - name: Set env variables and run the Maven build - shell: cmd - run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat" - call mvn -B verify -Pnative -f java - 7z a java/alizer-cli/target/alizer-cli-${{ steps.get_version.outputs.version }}-${{ matrix.suffix }} java/alizer-cli/target/alizer-cli-${{ steps.get_version.outputs.version }}-runner.exe - if: ${{ matrix.os == 'windows-latest' }} - - name: Build with Maven - run: | - mvn -B verify -Pnative -f java - tar cfJ java/alizer-cli/target/alizer-cli-${{ steps.get_version.outputs.version }}-${{ matrix.suffix }} java/alizer-cli/target/alizer-cli-${{ steps.get_version.outputs.version }}-runner - if: ${{ matrix.os != 'windows-latest' }} - - name: Simple conventional changelog - # 0.0.11 - uses: lstocchi/simple-conventional-changelog@13071c09073f5deddf03d44d9af6a8b0f81ef227 - id: changelog - with: - token: ${{ secrets.GITHUB_TOKEN }} - current-tag: ${{ steps.get_version.outputs.version }} - types-mapping: 'feat:Features,fix:Bug Fixes,docs:Documentation,refactor:Refactoring,build:Builds,chore:Other' - - run: | - echo '${{ steps.changelog.outputs.changelog }}' - - name: Create or update Release - id: create_release - # v1 - uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - allowUpdates: true - artifact: java/alizer-cli/target/alizer-cli-${{ steps.get_version.outputs.version }}-${{ matrix.suffix }} - artifactContentType: application/zip - body: ${{ steps.changelog.outputs.changelog }} - name: ${{ steps.get_version.outputs.version }} - omitBodyDuringUpdate: true - omitNameDuringUpdate: true - replacesArtifacts: false - token: ${{ secrets.GITHUB_TOKEN }} - - diff --git a/README.md b/README.md index cce5a583..20027a33 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,47 @@ # Alizer + [release-svg]: https://img.shields.io/nexus/r/com.redhat.devtools.alizer/alizer?server=https%3A%2F%2Frepository.jboss.org%2Fnexus [nightly-svg]: https://img.shields.io/nexus/s/com.redhat.devtools.alizer/alizer?server=https%3A%2F%2Frepository.jboss.org%2Fnexus + ![Build status](https://github.com/redhat-developer/alizer/actions/workflows/CI.yml/badge.svg) ![Release][release-svg] ![Nightly][nightly-svg] ## Overview + Alizer (which stands for Application Analyzer) is a utilily whose goal is to extract informations about an application source code. Such informations are: -* Programming languages. -* Frameworks. -* Tools used to build the application. +- Programming languages. +- Frameworks. +- Tools used to build the application. Additionaly, Alizer can also select one devfile (cloud workspace file) from a list of available devfiles and/or detect components (the concept of component is taken from Odo and its definition can be read on [odo.dev](https://odo.dev/docs/getting-started/basics/#component)). -In order to be easily intergrated in other projects, comes in 3 different implementations: - -* Go library & CLI -* **[Deprecated]** Java library & CLI -* **[Deprecated]** NPM package - -*NOTE: Not all implementations support the same features. Please check the table at [alizer-spec](docs/public/alizer-spec.md#feature-table) for a detailed overview.* - ## Usage -As mentioned above Alizer comes with 3 different implementations. Each one has a different usage guide: -* [Go library & CLI](go/README.md#Usage) -* **[Deprecated]** [Java library & CLI](java/README.md#Usage) -* **[Deprecated]** [NPM package](js/README.md#Usage) +- [Go library & CLI](go/README.md#Usage) ## Contributing + This is an open source project open to anyone. This project welcomes contributions and suggestions! For information on getting started, refer to the [CONTRIBUTING instructions](CONTRIBUTING.md). ## Release process + The release process of `alizer` is very straightforward. You can create a new release [here](https://github.com/redhat-developer/alizer/releases/new). -* The *title* of the release has to be the new version. `Alizer` follows the `{major}.{minor}.{bugfix}` format (e.g `0.1.0`) -* The *description* of the release is optional. You may add a description if there were outstanding updates in the project, not mentioned in the issues or PRs of this release. +- The _title_ of the release has to be the new version. `Alizer` follows the `{major}.{minor}.{bugfix}` format (e.g `0.1.0`) +- The _description_ of the release is optional. You may add a description if there were outstanding updates in the project, not mentioned in the issues or PRs of this release. ## Feedback & Questions + If you discover an issue please file a bug and we will fix it as soon as possible. -* File a bug in [GitHub Issues](https://github.com/redhat-developer/alizer/issues). + +- File a bug in [GitHub Issues](https://github.com/redhat-developer/alizer/issues). ## License + EPL 2.0, See [LICENSE](LICENSE) for more information. diff --git a/docs/public/alizer-spec.md b/docs/public/alizer-spec.md index aa3acd93..d8a998a1 100644 --- a/docs/public/alizer-spec.md +++ b/docs/public/alizer-spec.md @@ -6,15 +6,9 @@ This document outlines the features Alizer offers and how they actually work. Currently, Alizer provides 3 detection options: -- *Language Detection* (Language/Tools/Frameworks) -- *DevFile Detection* -- *Component Detection* - -in 3 different implementations: - -- Golang library & CLI. -- **[Deprecated]**: Java library & CLI. -- **[Deprecated]**: NPM package. +- _Language Detection_ (Language/Tools/Frameworks) +- _DevFile Detection_ +- _Component Detection_ ## Language Detection @@ -33,26 +27,26 @@ presence (>2% total files) are taken into account for further calculations. If a ### Java -The first step in our deeper Java detection is finding the configuration file used. If a `pom.xml` file is discovered, +The first step in our deeper Java detection is finding the configuration file used. If a `pom.xml` file is discovered, Alizer assumes is a Maven project. The same for a `build.gradle` file which is a Gradle Project or a `build.xml` for an Ant project. NOTE: Maven, Gradle and Ant are saved as Tools inside the data structure returned by the analyze primitive -By reading the content of its configuration file and mainly its dependencies section, Alizer is also able to detect +By reading the content of its configuration file and mainly its dependencies section, Alizer is also able to detect frameworks. Currently, it recognizes: - Micronaut -- OpenLiberty +- OpenLiberty - Quarkus - SpringBoot - Vertx ``` -{ - name: 'java', - tools: [ 'maven' ], - frameworks: [ 'quarkus' ] +{ + name: 'java', + tools: [ 'maven' ], + frameworks: [ 'quarkus' ] } ``` @@ -72,28 +66,28 @@ At this point, it reads its content looking for dependencies to discover framewo - Vue ``` -{ - name: 'javascript', - tools: [ 'nodejs' ], - frameworks: [ 'express' ] +{ + name: 'javascript', + tools: [ 'nodejs' ], + frameworks: [ 'express' ] } ``` ### Python Currently, the only Python framework Alizer is able to detect is Django. -To recognize it, it scans all files within the source looking for a file such as `manage.py`, `urls.py`, `wsgi.py`, +To recognize it, it scans all files within the source looking for a file such as `manage.py`, `urls.py`, `wsgi.py`, `asgi.py`. If at least one of them if discovered, it checks its content looking for a django import. ``` -{ - name: 'python', - tools: [], - frameworks: [ 'django' ] +{ + name: 'python', + tools: [], + frameworks: [ 'django' ] } ``` -### GoLang +### GoLang The detection for GoLang works similar to Java. The first thing Alizer does is to check if a `go.mod` file is in the project. If so, Alizer assumes it is a GoLang project. @@ -108,10 +102,10 @@ At this point, it reads its content looking for dependencies to discover framewo - Mux ``` -{ - name: 'go', - tools: [ '1.17' ], - frameworks: [ 'gin' ] +{ + name: 'go', + tools: [ '1.17' ], + frameworks: [ 'gin' ] } ``` @@ -119,16 +113,16 @@ NOTE: The Go version is saved as Tools inside the data structure returned by the ## DevFile detection -It is possible to select a devfile from a list of devfile metadatas provided by the caller based on information that +It is possible to select a devfile from a list of devfile metadatas provided by the caller based on information that Alizer extracts from the source. -Alizer searches for a component in the root folder and uses its information to select a devfile. If nothing is found in the root, -a full components detection is performed and the first component in the resulting list is used to select a devfile. +Alizer searches for a component in the root folder and uses its information to select a devfile. If nothing is found in the root, +a full components detection is performed and the first component in the resulting list is used to select a devfile. If no component is found in the whole source tree, a generic Language detection is run and the first language in the resulting list is used to select a devfile. -The CLI, through the registry-support module, also works with URLS. If a registry URL is fed to Alizer, it will try to +The CLI, through the registry-support module, also works with URLS. If a registry URL is fed to Alizer, it will try to download all devfiles from it and select the one which fits best the source, by prioritizing frameworks over tools and languages. -For example, if the source is a Java Maven Quarkus project and the devfiles list contains a Quarkus devfile and a Maven +For example, if the source is a Java Maven Quarkus project and the devfiles list contains a Quarkus devfile and a Maven one, the Quarkus devfile will be selected. ## Component detection @@ -136,6 +130,7 @@ one, the Quarkus devfile will be selected. The concept of component is taken from Odo and its definition can be read on [odo.dev](https://odo.dev/docs/getting-started/basics/#component). Component detection is only enabled for a subset of programming languages + - Java - Go - .NET (C#, F#, VB.NET) @@ -144,22 +139,13 @@ Component detection is only enabled for a subset of programming languages - Rust To perform component detection Alizer splits the languages in two sets: `languages with a configuration file` (like Java -which can have a pom.xml or a build.gradle) and `languages without a configuration file` (such as Python which does not have a -default config file). +which can have a pom.xml or a build.gradle) and `languages without a configuration file` (such as Python which does not have a +default config file). -It first scans all files from the source tree looking for a file that matches the name of a known -config file. If found, it checks if this is a valid configuration file (e.g. for a multi-module Maven project only single +It first scans all files from the source tree looking for a file that matches the name of a known +config file. If found, it checks if this is a valid configuration file (e.g. for a multi-module Maven project only single modules pom.xml are taken into account). If true, a component is found. This step gets repeated for all configuration files found in the source tree. Only one component per folder is possible. -Once the first step ends up, if there are other free subfolders (free = folders that do not belong to any component) Alizer tries to search for -a `language without a configuration file` in them. A simple Language detection is performed and the first language is taken into account for further calculations. - -## Feature table - -| | Java API | Javascript | Go | -|----------------------------------|----------|------------|----| -| Language/Framework detection | X | X | X | -| Devfile detection (metadata) | X | X | X | -| Devfile detection (registry URL) | | | X | -| Component detection | X | | X | +Once the first step ends up, if there are other free subfolders (free = folders that do not belong to any component) Alizer tries to search for +a `language without a configuration file` in them. A simple Language detection is performed and the first language is taken into account for further calculations. diff --git a/java/.mvn/wrapper/MavenWrapperDownloader.java b/java/.mvn/wrapper/MavenWrapperDownloader.java deleted file mode 100644 index b901097f..00000000 --- a/java/.mvn/wrapper/MavenWrapperDownloader.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2007-present the original author or authors. - * - * 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. - */ -import java.net.*; -import java.io.*; -import java.nio.channels.*; -import java.util.Properties; - -public class MavenWrapperDownloader { - - private static final String WRAPPER_VERSION = "0.5.6"; - /** - * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. - */ - private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" - + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; - - /** - * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to - * use instead of the default one. - */ - private static final String MAVEN_WRAPPER_PROPERTIES_PATH = - ".mvn/wrapper/maven-wrapper.properties"; - - /** - * Path where the maven-wrapper.jar will be saved to. - */ - private static final String MAVEN_WRAPPER_JAR_PATH = - ".mvn/wrapper/maven-wrapper.jar"; - - /** - * Name of the property which should be used to override the default download url for the wrapper. - */ - private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; - - public static void main(String args[]) { - System.out.println("- Downloader started"); - File baseDirectory = new File(args[0]); - System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); - - // If the maven-wrapper.properties exists, read it and check if it contains a custom - // wrapperUrl parameter. - File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); - String url = DEFAULT_DOWNLOAD_URL; - if(mavenWrapperPropertyFile.exists()) { - FileInputStream mavenWrapperPropertyFileInputStream = null; - try { - mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); - Properties mavenWrapperProperties = new Properties(); - mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); - url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); - } catch (IOException e) { - System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); - } finally { - try { - if(mavenWrapperPropertyFileInputStream != null) { - mavenWrapperPropertyFileInputStream.close(); - } - } catch (IOException e) { - // Ignore ... - } - } - } - System.out.println("- Downloading from: " + url); - - File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); - if(!outputFile.getParentFile().exists()) { - if(!outputFile.getParentFile().mkdirs()) { - System.out.println( - "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); - } - } - System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); - try { - downloadFileFromURL(url, outputFile); - System.out.println("Done"); - System.exit(0); - } catch (Throwable e) { - System.out.println("- Error downloading"); - e.printStackTrace(); - System.exit(1); - } - } - - private static void downloadFileFromURL(String urlString, File destination) throws Exception { - if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { - String username = System.getenv("MVNW_USERNAME"); - char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); - Authenticator.setDefault(new Authenticator() { - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(username, password); - } - }); - } - URL website = new URL(urlString); - ReadableByteChannel rbc; - rbc = Channels.newChannel(website.openStream()); - FileOutputStream fos = new FileOutputStream(destination); - fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); - fos.close(); - rbc.close(); - } - -} diff --git a/java/.mvn/wrapper/maven-wrapper.jar b/java/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index 2cc7d4a55c0c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I9b&Dk}0$Af&08KHo+ zOwDhFvA(E|ER%a^cdh@^wLUlmIv6?_3=BvX8jKk92L=Y}7Jf5OGMfh` zBdR1wFCi-i5@`9km{isRb0O%TX+f~)KNaEz{rXQa89`YIF;EN&gN)cigu6mNh>?Cm zAO&Im2flv6D{jwm+y<%WsPe4!89n~KN|7}Cb{Z;XweER73r}Qp2 zz}WP4j}U0&(uD&9yGy6`!+_v-S(yG*iytsTR#x_Rc>=6u^vnRDnf1gP{#2>`ffrAC% zTZ5WQ@hAK;P;>kX{D)mIXe4%a5p=LO1xXH@8T?mz7Q@d)$3pL{{B!2{-v70L*o1AO+|n5beiw~ zk@(>m?T3{2k2c;NWc^`4@P&Z?BjxXJ@;x1qhn)9Mn*IFdt_J-dIqx5#d`NfyfX~m( zIS~5)MfZ2Uy?_4W`47i}u0ZgPh<{D|w_d#;D}Q&U$Q-G}xM1A@1f{#%A$jh6Qp&0hQ<0bPOM z-{1Wm&p%%#eb_?x7i;bol EfAhh=DF6Tf diff --git a/java/.mvn/wrapper/maven-wrapper.properties b/java/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index 642d572c..00000000 --- a/java/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,2 +0,0 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/java/Jenkinsfile b/java/Jenkinsfile deleted file mode 100644 index b68d9d5f..00000000 --- a/java/Jenkinsfile +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env groovy - -node('rhel7'){ - stage('Checkout repo') { - deleteDir() - git url: 'https://github.com/redhat-developer/alizer', - branch: "${sha1}" - } - - dir('java') { - stage('Build') { - sh "./mvnw verify" - } - - stage('Deploy') { - sh "./mvnw deploy" - } - } -} \ No newline at end of file diff --git a/java/README.md b/java/README.md deleted file mode 100644 index f4a05150..00000000 --- a/java/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# Alizer - Java Library & CLI - -## Usage -*DEPRECATION WARNING: This implementation is out of date and it will be deprecated soon* -### Library -Below you can find usage information about the Java library. - -#### Language Detection -In order to access the Alizer Java API you will have to create a `LanguageRecognizer` object: -```java -LanguageRecognizer recognizer = new RecognizerFactory().createLanguageRecognizer(); -``` - -Then, access the project information with the `analyze` method: -```java -List languages = recognizer.analyze("myproject"); -``` - -The result is an ordered list of information for each language detected in the source tree, with the following informations: -- *name*: the name of the detected language -- *framework*: a list of detected frameworks (Quarkus, Flash,...) used by the application -- *tools*: a list of tools (Maven,...) used by the application -- *weight*: a double value that represents the language weight compared to the others. - -*NOTE: the sum of all weights can be over 100 because a file may be associated to multiple languages and Alizer may not be able to detect it precisely. E.g. a SQL script could be associated to SPLPL, TSQL, PLSQL languages so Alizer will return all 3 with the same weight.* - -#### Devfile Detection -It is also possible to select a devfile from a list of existing devfiles (from a devfile registry or other storage) based on the information that we can now extract from the source tree: -```java -DevfileType devfile = recognizer.selectDevFileFromTypes("myproject", devfiles) -``` -where devfiles is a list of objects implementing the `DevfileType` interface which defines the following properties: -- *name*: name of the devfile -- *language*: name of the language associated with the devfile -- *projectType*: type of project associated with the devfile -- *tags*: list of tags associated with the devfile - -Please note that the devfile object that is returned by the method is one of the object from the list of devfiles given in input for better matching for the user. - -#### Component detection -Alizer is also able to detect components. The concept of component is taken from Odo and its definition can be read on [odo.dev](https://odo.dev/docs/getting-started/basics/#component). - -The detection of a component is based on only one rule. It is discovered if and only if the main language of the component source is one of those that supports component detection (Java, Python, Javascript, Go, ...) - -The result is a list of components where each component consists of: -- *path*: root of the component -- *languages*: list of languages belonging to the component ordered by their relevance. - -```java -ComponentRecognizer recognizer = new RecognizerFactory().createComponentRecognizer(); -List components = recognizer.analyze("myproject"); -``` - -### CLI -The Java implementation includes a CLI for applications. - -#### How to Build & Use -The Java CLI can be built with the below command: -```bash -# inside the java/ dir -$ ./mvnw package -``` - -In order to use the CLI: -``` -# inside the java/alizer-cli/target dir -alizer-cli-$version-runner analyze [-o json] -alizer-cli-$version-runner devfile [-o json] [-r registry-url] -``` - -#### Outputs - -Example of `analyze` command: -``` -Language:JavaScript Frameworks:Express Tools:nodejs Accuracy:100.0 -``` - -Example of `component` command: -``` -Component:path/to/the/component1 Languages:JavaScript -Component:path/to/the/component2 Languages:TypeScript,JavaScript -Component:path/to/the/component3 Languages:TypeScript -``` diff --git a/java/alizer-api/pom.xml b/java/alizer-api/pom.xml deleted file mode 100644 index a9342d6d..00000000 --- a/java/alizer-api/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - alizer - com.redhat.devtools.alizer - 0.2.0-SNAPSHOT - - 4.0.0 - - alizer-api - - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - 2.11.3 - - - - org.slf4j - slf4j-api - 1.7.32 - - - - commons-io - commons-io - 2.8.0 - - - junit - junit - 4.12 - test - - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - copy-resources - validate - - copy-resources - - - true - ${basedir}/target/classes - - - ${project.basedir}/../../resources - - languages.yml - languages-customization.yml - - - - - - - - - - \ No newline at end of file diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Component.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Component.java deleted file mode 100644 index 82f2e8f6..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Component.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import java.nio.file.Path; -import java.util.List; - -public class Component { - - private Path path; - private List languages; - - public Component(Path path, List languages) { - this.path = path; - this.languages = languages; - } - - public Path getPath() { - return path; - } - - public List getLanguages() { - return languages; - } - -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/ComponentRecognizer.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/ComponentRecognizer.java deleted file mode 100644 index 6fe5aaa7..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/ComponentRecognizer.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import java.io.IOException; -import java.util.List; - -public interface ComponentRecognizer { - List analyzeRoot(String path) throws IOException; - List analyze(String path) throws IOException; -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/ComponentRecognizerImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/ComponentRecognizerImpl.java deleted file mode 100644 index 43deb8c2..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/ComponentRecognizerImpl.java +++ /dev/null @@ -1,285 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import com.redhat.devtools.alizer.api.spi.LanguageEnricherProvider; -import com.redhat.devtools.alizer.api.utils.Utils; -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Function; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -public class ComponentRecognizerImpl extends Recognizer implements ComponentRecognizer { - - public ComponentRecognizerImpl(RecognizerFactory builder) { - super(builder); - } - - /** - * Analyze only files existing in path. It doesn't walk through all subfolders - * @param path path (root) where to make the analysis - * @return list of components found - * @throws IOException if an error occurred - */ - public List analyzeRoot(String path) throws IOException { - List files = getFilesInDirectory(Paths.get(path)); - return detectComponents(files); - } - - /** - * Analyze all files within the project to detect all components. It walks from the root through all subfolders. - * @param path path (root) where to start the search - * @return list of components found ordered. First component is the one in root. - * @throws IOException if an error occurred - */ - public List analyze(String path) throws IOException { - List files = getFiles(Paths.get(path)); - List components = detectComponents(files); - - // it may happen that a language has no a specific configuration file (e.g opposite to JAVA -> pom.xml and Nodejs -> package.json) - // we then rely on the language recognizer - List directoriesPathsWithoutConfigFile = getDirectoriesPathsWithoutConfigFile(Paths.get(path), components); - components.addAll(getComponentsWithoutConfigFile(directoriesPathsWithoutConfigFile)); - - components.sort((o1, o2) -> { - if (o1.getPath().toString().equals(path)) { - return -1; - } else if (o2.getPath().toString().equals(path)) { - return 1; - } - return 0; - }); - return components; - } - - private List getDirectoriesPathsWithoutConfigFile(Path root, List components) throws IOException { - if (components.isEmpty()) { - return Collections.singletonList(root); - } - - AtomicReference> directoriesWithoutConfigFile = new AtomicReference<>(new ArrayList<>()); - Files.walk(root, Integer.MAX_VALUE).filter(Files::isDirectory).skip(1) - .forEach(directory -> { - if (!hasDirectoryAnyComponent(directory, components)){ - directoriesWithoutConfigFile.set(getParentFolders(directory, directoriesWithoutConfigFile.get())); - } - }); - return directoriesWithoutConfigFile.get(); - } - - /** - * Check if a directory is part of a component (root path or any subfolder) - * E.g root component app/component then app/component/folder -> true app/otherfolder -> false - * - * @param directory directory path to check - * @param components list of components - * @return true if directory contains a component or it is a subfolder of a folder containing a component, false otherwise - */ - private boolean hasDirectoryAnyComponent(Path directory, List components) { - return components.stream().map(Component::getPath) - .anyMatch(directoryWithComponent -> directoryWithComponent.equals(directory) || - isFirstPathParentOfSecond(directoryWithComponent, directory)); - } - - private List getComponentsWithoutConfigFile(List directories) throws IOException { - List components = new ArrayList<>(); - for (Path directory: directories) { - Component component = detectComponent(directory, Collections.emptyList()); - // only takes component with languages that have no config file - // E.g if the directory consists of javascript files but it doesn't contain a package.json, something is wrong - // and we do not consider it as an actual component - if (component != null - && isValidNoConfigComponent(component)) { - components.add(component); - } - } - return components; - } - - /** - * Return true if it is a component with a language that does not have any config file - * E.g if the directory (and the component itself) consists of javascript files without a package.json, something is wrong - * and we do not consider it as an actual no config component - * - * @param component component - * @return true if it is a valid component, false otherwise - */ - private boolean isValidNoConfigComponent(Component component) { - if (component.getLanguages().isEmpty()) { - return false; - } - String language = component.getLanguages().get(0).getName(); - LanguageFileItem languageFileItem = LanguageFileHandler.get().getLanguageByNameOrAlias(language); - return languageFileItem.getConfigurationFiles().isEmpty(); - } - - private List detectComponents(List files) throws IOException { - Map> configurationPerLanguages = LanguageFileHandler.get().getConfigurationPerLanguageMapping(); - List components = new ArrayList<>(); - for (File file: files) { - Optional configurationMatched = getConfigurationByFile(configurationPerLanguages.keySet(), file); - if (configurationMatched.isPresent()) { - List languagesPerConfiguration = getLanguagesWithWhichConfigurationIsValid(configurationPerLanguages.get(configurationMatched.get()), file); - if (!languagesPerConfiguration.isEmpty()) { - Component component = detectComponent(file.getParentFile().toPath(), configurationPerLanguages.get(configurationMatched.get())); - if (component != null - && components.stream().noneMatch(comp -> comp.getPath().equals(component.getPath()))) { - components.add(component); - } - } - } - } - return components; - } - - private Optional getConfigurationByFile(Set regexes, File file) { - return regexes.stream().filter(regex -> Pattern.matches(regex, file.getName()) || Pattern.matches(regex, "/" + file.getName())).findFirst(); - } - - private List getLanguagesWithWhichConfigurationIsValid(List languages, File file) { - return languages.stream().filter(language -> isConfigurationValid(language, file)).collect(Collectors.toList()); - } - - private boolean isConfigurationValid(String language, File file) { - LanguageEnricherProvider enricher = Utils.getEnricherByLanguage(language); - if (enricher != null) { - return enricher.create().isConfigurationValidForComponent(language, file); - } - return false; - } - - /** - * Create a new component from root folder - * - * @param root folder where the component is stored - * @param configurationLanguages languages which uses this config file (e.g pom.xml -> java) - * @return new component or null if folder doesn't contain anything valid - * @throws IOException if errored while detecting languages/framework used - */ - private Component detectComponent(Path root, List configurationLanguages) throws IOException { - RecognizerFactory recognizerFactory = new RecognizerFactory(); - LanguageRecognizer languageRecognizer = recognizerFactory.createLanguageRecognizer(); - - List languages = getLanguagesWeightedByConfigFile(languageRecognizer.analyze(root.toString()), configurationLanguages); - if (isLanguageSupported(languages)) { - return new Component(root, languages); - } - return null; - } - - private boolean isLanguageSupported(List languages) { - if (languages.isEmpty()) { - return false; - } - Language mainLanguage = languages.get(0); - return mainLanguage.canBeComponent(); - } - - /** - * Return a list of all languages ordered by using the configurationLanguage, if any - * E.g it may happen that a java project has many javascript files in it and then the returned language list is - * 1. Javascript 2. Java. But as we are tracing a java component (found by using a pom.xml or build.gradle) the order - * of languages needs to be swapped -> 1. JAVA 2. Javascript - * - * @param languages list of all languages - * @param configurationLanguages languages that uses that configuration file - * @return an ordered language list based on the configuration file, original language list if configLanguage is empty - */ - private List getLanguagesWeightedByConfigFile(List languages, List configurationLanguages) { - if (configurationLanguages.isEmpty()) { - return languages; - } - - Optional language = languages.stream() - .filter(lang -> configurationLanguages.stream().anyMatch(l -> l.equalsIgnoreCase(lang.getName()))).findFirst(); - if (language.isPresent()) { - languages.remove(language.get()); - languages.add(0, language.get()); - } - return languages; - } - - /** - * Return true if first path is parent of the second - * - * @param path path that should be parent - * @param potentialSubFolder path that should be a sub-folder - * @return true if path contain potentialSubFolder, false otherwise - */ - private boolean isFirstPathParentOfSecond(Path path, Path potentialSubFolder) { - return isIncludedInPath(potentialSubFolder, path::equals); - } - - private boolean isIncludedInPath(Path path, Function isIncluded) { - boolean containSubFolder = false; - while (path != null && !containSubFolder) { - if (isIncluded.apply(path)) { - containSubFolder = true; - } - path = path.getParent(); - } - return containSubFolder; - } - - /** - * Return all paths which are not sub-folders of some other path within the list - * Target will be added to the list if it is not a sub-folder of any other path within the list - * If a path in the list is sub-folder of Target, that path will be removed. - * - * @param target new path to be added - * @param directories list of all previously added paths - * @return the list containing all paths which are not sub-folders of any other - */ - private List getParentFolders(Path target, List directories) { - List support = new ArrayList<>(); - for (Path directory: directories) { - Path newPath = getParentFolder(target, directory); - if (newPath != null) { - target = newPath; - } else { - support.add(directory); - } - } - support.add(target); - return support; - } - - /** - * Return the parent folder between the two directories, null if there is no sub-path - * - * @param directory1 first directory to compare - * @param directory2 second directory to compare - * @return path of the parent folder or null if no directory is parent of the other - */ - private Path getParentFolder(Path directory1, Path directory2) { - if (directory1.toString().length() > directory2.toString().length()) { - if (isFirstPathParentOfSecond(directory2, directory1)) { - return directory2; - } - } else { - if (isFirstPathParentOfSecond(directory1, directory2)) { - return directory1; - } - } - return null; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Constants.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Constants.java deleted file mode 100644 index 9250d035..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Constants.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -public class Constants { - - public static final String JAVA = "JAVA"; - public static final String PYTHON = "PYTHON"; - public static final String JAVASCRIPT = "JAVASCRIPT"; - public static final String TYPESCRIPT = "TYPESCRIPT"; - public static final String CSHARP = "C#"; - public static final String FSHARP = "F#"; - public static final String VBNET = "VISUAL BASIC .NET"; - public static final String GO = "Go"; - - - public static final String QUARKUS = "Quarkus"; - public static final String SPRING = "Spring"; - public static final String LIBERTY = "OpenLiberty"; - public static final String VERTX = "Vertx"; - public static final String MICRONAUT = "Micronaut"; - public static final String DJANGO = "Django"; - public static final String EXPRESS = "Express"; - public static final String REACT = "React"; - public static final String GIN = "Gin"; - public static final String FAST_HTTP = "FastHttp"; - public static final String ECHO = "Echo"; - public static final String BEEGO = "Beego"; - public static final String GOFIBER = "GoFiber"; - public static final String MUX = "Mux"; -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/DevFileRecognizer.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/DevFileRecognizer.java deleted file mode 100644 index 3b50c007..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/DevFileRecognizer.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.redhat.devtools.alizer.api; - -import java.io.IOException; -import java.util.List; - -public interface DevFileRecognizer { - T selectDevFileFromTypes(String srcPath, List devfileTypes) throws IOException; - T selectDevFileFromTypes(List languages, List devfileTypes) throws IOException; -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/DevFileRecognizerImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/DevFileRecognizerImpl.java deleted file mode 100644 index ea29dced..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/DevFileRecognizerImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.redhat.devtools.alizer.api; - -import java.io.IOException; -import java.util.List; -import java.util.Optional; - -public class DevFileRecognizerImpl extends Recognizer implements DevFileRecognizer { - - private RecognizerFactory builder; - - DevFileRecognizerImpl(RecognizerFactory builder) { - super(builder); - this.builder = builder; - } - - /** - * It tries to detect a component in the root and return a devfile for it. If there is no component in root, - * it start looking for some components within the sub-folders. If there are none, it uses the outcome of analyze. - * @param srcPath path (root) where to start the search - * @param devfileTypes list of all devfileTypes to pick a devfile from - * @return the devfile that matches the project the most - * @throws IOException if an error occurred - */ - public T selectDevFileFromTypes(String srcPath, List devfileTypes) throws IOException { - ComponentRecognizer componentRecognizer = builder.createComponentRecognizer(); - List componentsInRoot = componentRecognizer.analyzeRoot(srcPath); - if (!componentsInRoot.isEmpty()) { - return selectDevFileFromTypes(componentsInRoot.get(0).getLanguages(), devfileTypes); - } - - List componentsWithinFullProject = componentRecognizer.analyze(srcPath); - if (!componentsWithinFullProject.isEmpty()) { - return selectDevFileFromTypes(componentsWithinFullProject.get(0).getLanguages(), devfileTypes); - } - - LanguageRecognizer languageRecognizer = builder.createLanguageRecognizer(); - List languages = languageRecognizer.analyze(srcPath); - return selectDevFileFromTypes(languages, devfileTypes); - } - - public T selectDevFileFromTypes(List languages, List devfileTypes) { - for (Language language: languages) { - Optional score = devfileTypes.stream().map(devfileType -> new LanguageScore(language, devfileType)).sorted().findFirst(); - if (score.isPresent() && score.get().getScore() > 0) { - return (T) score.get().getDevfileType(); - } - } - return null; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/DevfileType.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/DevfileType.java deleted file mode 100644 index d9539f5a..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/DevfileType.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import java.util.List; - -public interface DevfileType { - - - String getName(); - - String getLanguage(); - - String getProjectType(); - - List getTags(); -} - diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Language.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Language.java deleted file mode 100644 index b13568d5..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Language.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2020 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import java.util.Collections; -import java.util.List; - -public class Language { - - private String name; - private List aliases; - private double usageInPercentage; - private List frameworks; - private List tools; - private boolean canBeComponent; - - public Language(String name, List aliases, double usageInPercentage, boolean canBeComponent) { - this(name, aliases, usageInPercentage, Collections.emptyList(), Collections.emptyList(), canBeComponent); - } - - public Language(String name, List aliases, double usageInPercentage, List frameworks, - List tools, boolean canBeComponent) { - this.name = name; - this.aliases = aliases; - this.usageInPercentage = usageInPercentage; - this.frameworks = frameworks; - this.tools = tools; - this.canBeComponent = canBeComponent; - } - - public String getName() { - return name; - } - - public List getAliases() { return aliases; } - - public double getUsageInPercentage() { - return usageInPercentage; - } - - public List getFrameworks() { - return frameworks; - } - - public void setFrameworks(List frameworks) { - this.frameworks = frameworks; - } - - public List getTools() { - return tools; - } - - public void setTools(List tools) { - this.tools = tools; - } - - public boolean canBeComponent() { - return canBeComponent; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageFileHandler.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageFileHandler.java deleted file mode 100644 index 602e724a..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageFileHandler.java +++ /dev/null @@ -1,167 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; - -import java.io.File; -import java.io.IOException; -import java.nio.charset.Charset; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import org.apache.commons.io.IOUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class LanguageFileHandler { - private static final Logger logger = LoggerFactory.getLogger(LanguageFileHandler.class); - - private static final String LANGUAGES_YAML_PATH = "languages.yml"; - private static final String LANGUAGES_CUSTOMIZATION_YAML_PATH = "languages-customization.yml"; - private static final ObjectMapper YAML_MAPPER = new ObjectMapper(new YAMLFactory()); - private static LanguageFileHandler INSTANCE; - private Map languages = new HashMap<>(); - private Map> extensionXLanguage = new HashMap<>(); - - private LanguageFileHandler(){ - initLanguages(); - } - - public static LanguageFileHandler get() { - if (INSTANCE == null) { - INSTANCE = new LanguageFileHandler(); - } - return INSTANCE; - } - - private void initLanguages() { - try { - String languagesYamlAsString = IOUtils.toString(LanguageFileHandler.class.getResourceAsStream("/" + LANGUAGES_YAML_PATH), Charset.defaultCharset()); - JsonNode languagesAsJsonNode = YAML_MAPPER.readTree(languagesYamlAsString); - - String customizationYamlAsString = IOUtils.toString(LanguageFileHandler.class.getResourceAsStream("/" + LANGUAGES_CUSTOMIZATION_YAML_PATH), Charset.defaultCharset()); - JsonNode customizationAsJsonNode = YAML_MAPPER.readTree(customizationYamlAsString); - for (Iterator> it = languagesAsJsonNode.fields(); it.hasNext(); ) { - Map.Entry entry = it.next(); - String nameLanguage = entry.getKey(); - JsonNode languageAttributes = entry.getValue(); - String type = languageAttributes.get("type").asText(); - String group = languageAttributes.has("group") ? languageAttributes.get("group").asText() : ""; - List aliases = getValueAsList(languageAttributes, "aliases"); - LanguageFileItem languageFileItem = new LanguageFileItem(nameLanguage, aliases, type, group); - customizeLanguage(customizationAsJsonNode, languageFileItem); - if (!languageFileItem.isDisabled()) { - languages.put(nameLanguage, languageFileItem); - populateLanguageList(extensionXLanguage, languageAttributes, "extensions", languageFileItem); - } - } - } catch (IOException e) { - logger.warn(e.getLocalizedMessage(), e); - } - } - - private void customizeLanguage(JsonNode customizationsNode, LanguageFileItem languageFileItem) { - JsonNode languageCustomization = customizationsNode.findValue(languageFileItem.getName()); - if (languageCustomization != null) { - List configurationFiles = getValueAsList(languageCustomization, "configuration_files"); - List excludeFolders = getValueAsList(languageCustomization, "exclude_folders"); - List aliases = getValueAsList(languageCustomization, "aliases"); - boolean canBeComponent = languageCustomization.has("component") && languageCustomization.get("component").asBoolean(); - boolean disabled = languageCustomization.has("disable_detection") && languageCustomization.get("disable_detection").asBoolean(); - - languageFileItem.setConfigurationFiles(configurationFiles); - languageFileItem.setExcludeFolders(excludeFolders); - languageFileItem.setCanBeComponent(canBeComponent); - languageFileItem.addAliases(aliases); - languageFileItem.setDisabled(disabled); - } - } - - private List getValueAsList(JsonNode languageAttributes, String field) { - List values = new ArrayList<>(); - if (languageAttributes.has(field)) { - JsonNode fieldValues = languageAttributes.get(field); - for (JsonNode node : fieldValues) { - values.add(node.asText()); - } - } - return values; - } - - private void populateLanguageList(Map> languageMap, JsonNode languageAttributes, String field, LanguageFileItem language) { - if (languageAttributes.has(field)) { - JsonNode fieldValues = languageAttributes.get(field); - for (JsonNode value: fieldValues) { - if (!value.asText("").isEmpty()) { - List languageMapValue = languageMap.getOrDefault(value.asText(), new ArrayList<>()); - languageMapValue.add(language); - languageMap.put(value.asText(), languageMapValue); - } - } - } - } - - - - public List getLanguagesByExtension(String extension) { - return extensionXLanguage.getOrDefault(extension, Collections.emptyList()); - } - - public LanguageFileItem getLanguageByName(String name) { - Optional languageFileItem = languages.entrySet().stream() - .filter(item -> item.getKey().equalsIgnoreCase(name)) - .map(Map.Entry::getValue) - .findFirst(); - return languageFileItem.orElse(null); - } - - public LanguageFileItem getLanguageByNameOrAlias(String name) { - LanguageFileItem languageFileItem = getLanguageByName(name); - if (languageFileItem == null) { - return getLanguageByAlias(name); - } - return languageFileItem; - } - - public LanguageFileItem getLanguageByAlias(String alias) { - String finalAlias = alias.toLowerCase(); - Optional languageFileItem = languages.values().stream() - .filter(item -> item.getAliases().contains(finalAlias)) - .findFirst(); - return languageFileItem.orElse(null); - } - - public Map> getConfigurationPerLanguageMapping() { - Map> configurationPerLanguage = new HashMap<>(); - for (LanguageFileItem fileItem: languages.values()) { - List configurationFiles = fileItem.getConfigurationFiles(); - if (!configurationFiles.isEmpty()) { - for (String configFile: configurationFiles) { - configurationPerLanguage.compute(configFile, (k, v) -> { - if (v == null) { - v = new ArrayList<>(); - } - v.add(fileItem.getName()); - return v; - }); - } - } - } - return configurationPerLanguage; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageFileItem.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageFileItem.java deleted file mode 100644 index 5a706644..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageFileItem.java +++ /dev/null @@ -1,101 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -public class LanguageFileItem { - private String name; - private List aliases; - private String type; - private String group; - private List configurationFiles, excludeFolders; - private boolean canBeComponent; - private boolean disabled; - - public LanguageFileItem(String name, List aliases, String type, String group) { - this.name = name; - this.aliases = aliases; - this.type = type; - this.group = group; - this.configurationFiles = new ArrayList<>(); - this.excludeFolders = new ArrayList<>(); - this.canBeComponent = false; - this.disabled = false; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public List getAliases() { return aliases; } - - public void addAliases(List aliasesToBeAdded) { - if (aliasesToBeAdded.isEmpty()) { - return; - } - - if (aliases == null) { - aliases = new ArrayList<>(); - } - - Set aliasesAsSet = new HashSet<>(aliases); - aliasesAsSet.addAll(aliasesToBeAdded); - aliases = new ArrayList<>(aliasesAsSet); - } - - public String getGroup() { - return group; - } - - public String getType() { - return type; - } - - public List getConfigurationFiles() { - return configurationFiles; - } - - public void setConfigurationFiles(List configurationFiles) { - this.configurationFiles = configurationFiles; - } - - public List getExcludeFolders() { - return excludeFolders; - } - - public void setExcludeFolders(List excludeFolders) { - this.excludeFolders = excludeFolders; - } - - public boolean canBeComponent() { - return canBeComponent; - } - - public void setCanBeComponent(boolean canBeComponent) { - this.canBeComponent = canBeComponent; - } - - public boolean isDisabled() { - return disabled; - } - - public void setDisabled(boolean disabled) { - this.disabled = disabled; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageRecognizer.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageRecognizer.java deleted file mode 100644 index 257a39d7..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageRecognizer.java +++ /dev/null @@ -1,18 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import java.io.IOException; -import java.util.List; - -public interface LanguageRecognizer { - List analyze(String path) throws IOException; -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageRecognizerImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageRecognizerImpl.java deleted file mode 100644 index e50d847d..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageRecognizerImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import com.redhat.devtools.alizer.api.spi.LanguageEnricherProvider; -import com.redhat.devtools.alizer.api.utils.Utils; -import java.io.File; -import java.io.IOException; -import java.nio.file.Paths; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; -import org.apache.commons.io.FilenameUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -import static java.util.stream.Collectors.counting; -import static java.util.stream.Collectors.groupingBy; - -public class LanguageRecognizerImpl extends Recognizer implements LanguageRecognizer { - - private static final Logger logger = LoggerFactory.getLogger(LanguageRecognizerImpl.class); - - LanguageRecognizerImpl(RecognizerFactory builder) { - super(builder); - } - - public List analyze(String path) throws IOException { - Map languagesDetected = new HashMap<>(); - // init dictionary with languages file - LanguageFileHandler handler = LanguageFileHandler.get(); - - List files = getFiles(Paths.get(path)); - - // save all extensions extracted from files + their occurrences - Map extensions = files.stream().collect(groupingBy(file -> "." + FilenameUtils.getExtension(file.getName()), counting())); - - // get languages belonging to extensions found - extensions.keySet().forEach(extension -> { - List languages = handler.getLanguagesByExtension(extension); - if (languages.isEmpty()) return; - languages.forEach(language -> { - LanguageFileItem tmpLanguage = language.getGroup().isEmpty() ? language : handler.getLanguageByName(language.getGroup()); - long percentage = languagesDetected.getOrDefault(tmpLanguage, 0) + extensions.get(extension); - languagesDetected.put(tmpLanguage, (int) percentage); - }); - }); - - // get only programming language and calculate percentage - int totalProgrammingOccurences = (int) languagesDetected.keySet().stream(). - filter(lang -> lang.getType().equalsIgnoreCase("programming")). - mapToLong(languagesDetected::get).sum(); - - // only keep programming language which consists of atleast the 2% of the project - return languagesDetected.keySet().stream(). - filter(lang -> lang.getType().equalsIgnoreCase("programming")). - filter(lang -> (double)languagesDetected.get(lang) / totalProgrammingOccurences > 0.02). - map(lang -> new Language(lang.getName(), lang.getAliases(), (double)languagesDetected.get(lang) / totalProgrammingOccurences * 100, lang.canBeComponent())). - map(lang -> getDetailedLanguage(lang, files)). - sorted(Comparator.comparingDouble(Language::getUsageInPercentage).reversed()). - collect(Collectors.toList()); - } - - private Language getDetailedLanguage(Language language, List files) { - LanguageEnricherProvider enricher = Utils.getEnricherByLanguage(language.getName()); - if (enricher != null) { - try { - return enricher.create().getEnrichedLanguage(language, files); - } catch (IOException e) { - logger.warn(e.getLocalizedMessage(), e); - } - } - return language; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageScore.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageScore.java deleted file mode 100644 index 67cdc05d..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/LanguageScore.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import java.util.List; - -public class LanguageScore implements Comparable { - private static final int FRAMEWORK_WEIGHT = 10; - private static final int TOOL_WEIGHT = 5; - - private int score; - - private DevfileType devfileType; - - public LanguageScore(Language language, DevfileType devfileType) { - this.devfileType = devfileType; - computeScore(language); - } - - private static boolean matches(List list, String val) { - return list.stream().filter(s -> s.equalsIgnoreCase(val)).count() > 0; - } - - private void computeScore(Language language) { - if (devfileType.getLanguage().equalsIgnoreCase(language.getName()) || - matches(language.getAliases(), devfileType.getLanguage())) { - score++; - if (devfileType.getProjectType() != null && matches(language.getFrameworks(), devfileType.getProjectType())) { - score += FRAMEWORK_WEIGHT; - } - devfileType.getTags().forEach(tag -> { - if (matches(language.getFrameworks(), tag)) { - score += FRAMEWORK_WEIGHT; - } - if (matches(language.getTools(), tag)) { - score += TOOL_WEIGHT; - } - }); - } - } - - public DevfileType getDevfileType() { - return devfileType; - } - - public int getScore() { - return score; - } - - @Override - public int compareTo(LanguageScore other) { - return other.getScore() - getScore(); - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Recognizer.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Recognizer.java deleted file mode 100644 index cf0c9979..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/Recognizer.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.stream.Collectors; - -public class Recognizer { - public Recognizer(RecognizerFactory builder) {} - - protected List getFiles(Path rootDirectory) throws IOException { - return Files.walk(rootDirectory, Integer.MAX_VALUE).filter(Files::isRegularFile).map(Path::toFile).collect(Collectors.toList()); - } - - protected List getFilesInDirectory(Path dir) { - File[] files = dir.toFile().listFiles(); - return files != null - ? new ArrayList<>(Arrays.asList(files)) - : new ArrayList<>(); - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/RecognizerFactory.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/RecognizerFactory.java deleted file mode 100644 index a0eecb1e..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/RecognizerFactory.java +++ /dev/null @@ -1,25 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -public class RecognizerFactory { - public LanguageRecognizer createLanguageRecognizer() { - return new LanguageRecognizerImpl(this); - } - - public DevFileRecognizer createDevFileRecognizer() { - return new DevFileRecognizerImpl(this); - } - - public ComponentRecognizer createComponentRecognizer() { - return new ComponentRecognizerImpl(this); - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/DotNetLanguageEnricherProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/DotNetLanguageEnricherProviderImpl.java deleted file mode 100644 index ff80c44e..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/DotNetLanguageEnricherProviderImpl.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.redhat.devtools.alizer.api.spi; - -import com.redhat.devtools.alizer.api.Language; -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider; -import com.redhat.devtools.alizer.api.spi.framework.nodejs.NodeJsFrameworkDetectorProvider; -import com.redhat.devtools.alizer.api.utils.DocumentParser; -import org.w3c.dom.Document; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.ServiceLoader; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -import static com.redhat.devtools.alizer.api.Constants.CSHARP; -import static com.redhat.devtools.alizer.api.Constants.FSHARP; -import static com.redhat.devtools.alizer.api.Constants.VBNET; - -public class DotNetLanguageEnricherProviderImpl extends LanguageEnricherProvider { - - private static final Pattern PROJ_PATTERN = Pattern.compile(".*\\.\\w+proj"); - - @Override - public LanguageEnricherProvider create() { - return new DotNetLanguageEnricherProviderImpl(); - } - - @Override - public List getSupportedLanguages() { - return Arrays.asList(CSHARP, FSHARP, VBNET); - } - - @Override - public Language getEnrichedLanguage(Language language, List files) throws IOException { - List configFiles = files.stream() - .filter(file -> PROJ_PATTERN.matcher(file.getName()).matches()) - .collect(Collectors.toList()); - - if (!configFiles.isEmpty()) { - language.setFrameworks(getFrameworks(configFiles)); - } - - return language; - } - - private List getFrameworks(List files) throws IOException { - List frameworks = new ArrayList<>(); - try { - for (File file: files) { - List frameworksDetected = getFramework(file); - if (!frameworksDetected.isEmpty()) { - frameworks.addAll(frameworksDetected); - } - } - } catch (ParserConfigurationException | SAXException e) { - - } - return frameworks; - } - - private List getFramework(File file) throws ParserConfigurationException, IOException, SAXException { - Node httpRuntimeNode = DocumentParser.getElementsByTag(file, "httpRuntime").item(0); - if (httpRuntimeNode != null) { - String framework = getFrameworkAttribute(httpRuntimeNode); - if (!framework.isEmpty()) { - return Collections.singletonList(framework); - } - } - Node compilationNode = DocumentParser.getElementsByTag(file, "compilation").item(0); - if (compilationNode != null) { - String framework = getFrameworkAttribute(compilationNode); - if (!framework.isEmpty()) { - return Collections.singletonList(framework); - } - } - NodeList targetFrameworkVersionNodeList = DocumentParser.getElementsByTag(file, "TargetFrameworkVersion"); - if (targetFrameworkVersionNodeList.getLength() > 0) { - return Collections.singletonList(targetFrameworkVersionNodeList.item(0).getTextContent()); - } - NodeList targetFrameworkNodeList = DocumentParser.getElementsByTag(file, "TargetFramework"); - if (targetFrameworkNodeList.getLength() > 0) { - return Collections.singletonList(targetFrameworkNodeList.item(0).getTextContent()); - } - NodeList targetFrameworksNodeList = DocumentParser.getElementsByTag(file, "TargetFrameworks"); - if (targetFrameworksNodeList.getLength() > 0) { - String value = targetFrameworksNodeList.item(0).getTextContent(); - if (value.contains(";")) { - return Arrays.stream(value.split(";")).filter(v -> !v.trim().isEmpty()).collect(Collectors.toList()); - } - } - return Collections.emptyList(); - } - - private String getFrameworkAttribute(Node node) { - NamedNodeMap attributes = node.getAttributes(); - if (attributes == null) { - return ""; - } - - Node targetFrameworkNode = attributes.getNamedItem("targetFramework"); - if (targetFrameworkNode != null) { - return targetFrameworkNode.getTextContent(); - } - return ""; - } - -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/GoLanguageEnricherProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/GoLanguageEnricherProviderImpl.java deleted file mode 100644 index 514ba86f..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/GoLanguageEnricherProviderImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2022 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi; - -import com.redhat.devtools.alizer.api.Language; -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider; -import com.redhat.devtools.alizer.api.spi.framework.go.GoFrameworkDetectorProvider; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.nio.file.Files; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Optional; -import java.util.ServiceLoader; -import java.util.regex.Pattern; - -import static com.redhat.devtools.alizer.api.Constants.GO; - -public class GoLanguageEnricherProviderImpl extends LanguageEnricherProvider{ - @Override - public LanguageEnricherProvider create() { - return new GoLanguageEnricherProviderImpl(); - } - - @Override - public List getSupportedLanguages() { - return Arrays.asList(GO); - } - - @Override - public Language getEnrichedLanguage(Language language, List files) throws IOException { - Optional goMod = files.stream().filter(file -> file.getName().equalsIgnoreCase("go.mod")).findFirst(); - - if (goMod.isPresent()) { - String goVersion = getGoVersion(goMod.get()); - if (!goVersion.isEmpty()) { - language.setTools(Arrays.asList(goVersion)); - } - language.setFrameworks(getFrameworks(goMod.get())); - } - - return language; - } - - private String getGoVersion(File goMod) throws IOException { - Pattern goVersionLinePattern = Pattern.compile("^go\\s+"); - Optional goVersionLine = Files.readAllLines(goMod.toPath()).stream() - .filter(line -> goVersionLinePattern.matcher(line).find()).findFirst(); - if(goVersionLine.isPresent()) { - String[] version = goVersionLinePattern.split(goVersionLine.get()); - return version.length > 0 ? version[1] : ""; - } - return ""; - } - - private List getFrameworks(File file) throws IOException { - List frameworks = new ArrayList<>(); - ServiceLoader loader = ServiceLoader.load(FrameworkDetectorProvider.class, GoLanguageEnricherProviderImpl.class.getClassLoader()); - for (FrameworkDetectorProvider provider : loader) { - if (provider instanceof GoFrameworkDetectorProvider) { - GoFrameworkDetectorProvider configProvider = (GoFrameworkDetectorProvider) provider.create(); - if (configProvider.hasFramework(file)) { - frameworks.addAll(configProvider.getFrameworks()); - } - } - } - return frameworks; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/JavaLanguageEnricherProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/JavaLanguageEnricherProviderImpl.java deleted file mode 100644 index d95ccc85..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/JavaLanguageEnricherProviderImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi; - -import com.redhat.devtools.alizer.api.Language; -import com.redhat.devtools.alizer.api.LanguageRecognizerImpl; -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider; -import com.redhat.devtools.alizer.api.spi.framework.java.JavaFrameworkDetectorProvider; -import com.redhat.devtools.alizer.api.utils.DocumentParser; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Optional; -import java.util.ServiceLoader; -import javax.xml.parsers.ParserConfigurationException; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - - -import static com.redhat.devtools.alizer.api.Constants.JAVA; - -public class JavaLanguageEnricherProviderImpl extends LanguageEnricherProvider { - @Override - public LanguageEnricherProvider create() { - return new JavaLanguageEnricherProviderImpl(); - } - - @Override - public List getSupportedLanguages() { - return Arrays.asList(JAVA); - } - - @Override - public Language getEnrichedLanguage(Language language, List files) throws IOException { - // find builder - Optional gradle = files.stream().filter(file -> file.getName().equalsIgnoreCase("build.gradle")).findFirst(); - Optional maven = files.stream().filter(file -> file.getName().equalsIgnoreCase("pom.xml")).findFirst(); - Optional ant = files.stream().filter(file -> file.getName().equalsIgnoreCase("build.xml")).findFirst(); - - if (gradle.isPresent()) { - language.setTools(Arrays.asList("Gradle")); - language.setFrameworks(getFrameworks(gradle.get())); - } else if (maven.isPresent()) { - language.setTools(Arrays.asList("Maven")); - language.setFrameworks(getFrameworks(maven.get())); - } else if (ant.isPresent()) { - language.setTools(Arrays.asList("Ant")); - } - - return language; - } - - private List getFrameworks(File file) throws IOException { - List frameworks = new ArrayList<>(); - ServiceLoader loader = ServiceLoader.load(FrameworkDetectorProvider.class, JavaLanguageEnricherProviderImpl.class.getClassLoader()); - for (FrameworkDetectorProvider provider : loader) { - if (provider instanceof JavaFrameworkDetectorProvider) { - JavaFrameworkDetectorProvider configProvider = (JavaFrameworkDetectorProvider) provider.create(); - if (configProvider.hasFramework(file)) { - frameworks.addAll(configProvider.getFrameworks()); - } - } - } - return frameworks; - } - - - @Override - public boolean isConfigurationValidForComponent(String language, File file) { - return super.isConfigurationValidForComponent(language, file) && !isParentModuleMaven(file); - } - - private boolean isParentModuleMaven(File file) { - if (!file.toPath().endsWith("pom.xml")) { - return false; - } - try { - NodeList modules = DocumentParser.getElementsByTag(file, "modules"); - return modules != null && modules.getLength() > 0; - } catch (IOException | SAXException | ParserConfigurationException e) { - return false; - } - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/JavaScriptLanguageEnricherProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/JavaScriptLanguageEnricherProviderImpl.java deleted file mode 100644 index a12309d9..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/JavaScriptLanguageEnricherProviderImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi; - -import com.redhat.devtools.alizer.api.Language; -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider; -import com.redhat.devtools.alizer.api.spi.framework.nodejs.NodeJsFrameworkDetectorProvider; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Optional; -import java.util.ServiceLoader; - - -import static com.redhat.devtools.alizer.api.Constants.JAVASCRIPT; -import static com.redhat.devtools.alizer.api.Constants.TYPESCRIPT; - -public class JavaScriptLanguageEnricherProviderImpl extends LanguageEnricherProvider { - @Override - public LanguageEnricherProvider create() { - return new JavaScriptLanguageEnricherProviderImpl(); - } - - @Override - public List getSupportedLanguages() { - return Arrays.asList(JAVASCRIPT, TYPESCRIPT); - } - - @Override - public Language getEnrichedLanguage(Language language, List files) throws IOException { - Optional packageJson = files.stream().filter(file -> file.getName().equalsIgnoreCase("package.json")).findFirst(); - - if (packageJson.isPresent()) { - language.setTools(Arrays.asList("nodejs")); - language.setFrameworks(getFrameworks(packageJson.get())); - } - - return language; - } - - private List getFrameworks(File file) throws IOException { - List frameworks = new ArrayList<>(); - ServiceLoader loader = ServiceLoader.load(FrameworkDetectorProvider.class, JavaScriptLanguageEnricherProviderImpl.class.getClassLoader()); - for (FrameworkDetectorProvider provider : loader) { - if (provider instanceof NodeJsFrameworkDetectorProvider) { - NodeJsFrameworkDetectorProvider configProvider = (NodeJsFrameworkDetectorProvider) provider.create(); - if (configProvider.hasFramework(file)) { - frameworks.addAll(configProvider.getFrameworks()); - } - } - } - return frameworks; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/LanguageEnricherProvider.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/LanguageEnricherProvider.java deleted file mode 100644 index 5e434fc4..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/LanguageEnricherProvider.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2020 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi; - -import com.redhat.devtools.alizer.api.Language; -import com.redhat.devtools.alizer.api.LanguageFileHandler; -import com.redhat.devtools.alizer.api.LanguageFileItem; -import java.io.File; -import java.io.IOException; -import java.nio.file.Path; -import java.util.List; -import java.util.function.Function; - -public abstract class LanguageEnricherProvider { - - public abstract LanguageEnricherProvider create(); - - public abstract List getSupportedLanguages(); - - public abstract Language getEnrichedLanguage(Language language, List files) throws IOException; - - public boolean isConfigurationValidForComponent(String language, File file) { - return isValidPathPerLanguage(file.toPath(), language); - } - - /** - * Check if path does not contain any folder that is excluded by the language - * E.g Nodejs -> node_modules - * - * @param path path to be verified - * @param language language to find the folders to not being considered to find components - * @return true if the path doesn't contain any excluded folder, false otherwise - */ - private boolean isValidPathPerLanguage(Path path, String language) { - LanguageFileItem languageFileItem = LanguageFileHandler.get().getLanguageByName(language); - List excludeFolders = languageFileItem.getExcludeFolders(); - if (excludeFolders.isEmpty()) { - return true; - } - for (String excludeFolder: excludeFolders) { - if (isFolderNameIncludedInPath(path, excludeFolder)) { - return false; - } - } - return true; - } - - /** - * Return true if first path contains a folder named potentialSubFolderName - * - * @param fullPath path that should be parent - * @param potentialSubFolderName folder name that should be a sub-folder - * @return true if fullPath contain potentialSubFolderName, false otherwise - */ - private boolean isFolderNameIncludedInPath(Path fullPath, String potentialSubFolderName) { - return isIncludedInPath(fullPath, (p) -> p.toFile().isDirectory() - && p.getFileName() != null - && p.getFileName().toString().equalsIgnoreCase(potentialSubFolderName)); - } - - private boolean isIncludedInPath(Path path, Function isIncluded) { - boolean containSubFolder = false; - while (path != null && !containSubFolder) { - if (isIncluded.apply(path)) { - containSubFolder = true; - } - path = path.getParent(); - } - return containSubFolder; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/PythonLanguageEnricherProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/PythonLanguageEnricherProviderImpl.java deleted file mode 100644 index ba4501cf..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/PythonLanguageEnricherProviderImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi; - -import com.redhat.devtools.alizer.api.Language; -import com.redhat.devtools.alizer.api.LanguageRecognizerImpl; -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider; -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorWithoutConfigFileProvider; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.ServiceLoader; - - -import static com.redhat.devtools.alizer.api.Constants.PYTHON; - -public class PythonLanguageEnricherProviderImpl extends LanguageEnricherProvider { - @Override - public LanguageEnricherProvider create() { - return new PythonLanguageEnricherProviderImpl(); - } - - @Override - public List getSupportedLanguages() { - return Arrays.asList(PYTHON); - } - - @Override - public Language getEnrichedLanguage(Language language, List files) throws IOException { - language.setFrameworks(getFrameworks(files)); - return language; - } - - private List getFrameworks(List files) throws IOException { - List frameworks = new ArrayList<>(); - ServiceLoader loader = ServiceLoader.load(FrameworkDetectorProvider.class, PythonLanguageEnricherProviderImpl.class.getClassLoader()); - for (FrameworkDetectorProvider provider : loader) { - if (provider instanceof FrameworkDetectorWithoutConfigFileProvider) { - FrameworkDetectorWithoutConfigFileProvider noConfigProvider = (FrameworkDetectorWithoutConfigFileProvider) provider.create(); - if (noConfigProvider.getSupportedLanguages().contains(PYTHON) && noConfigProvider.hasFramework(files)) { - frameworks.addAll(noConfigProvider.getFrameworks()); - } - } - } - return frameworks; - } - -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/FrameworkDetectorProvider.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/FrameworkDetectorProvider.java deleted file mode 100644 index 43ffa2a6..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/FrameworkDetectorProvider.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework; - -import java.util.List; - -public interface FrameworkDetectorProvider { - - FrameworkDetectorProvider create(); - - List getSupportedLanguages(); - - List getFrameworks(); - -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/FrameworkDetectorWithConfigFileProvider.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/FrameworkDetectorWithConfigFileProvider.java deleted file mode 100644 index 1f0de275..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/FrameworkDetectorWithConfigFileProvider.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework; - -import java.io.File; -import java.io.IOException; - -public interface FrameworkDetectorWithConfigFileProvider extends FrameworkDetectorProvider { - - boolean hasFramework(File file) throws IOException; -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/FrameworkDetectorWithoutConfigFileProvider.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/FrameworkDetectorWithoutConfigFileProvider.java deleted file mode 100644 index 3a757ff7..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/FrameworkDetectorWithoutConfigFileProvider.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework; - -import java.io.File; -import java.io.IOException; -import java.util.List; - -public interface FrameworkDetectorWithoutConfigFileProvider extends FrameworkDetectorProvider { - - boolean hasFramework(List files) throws IOException; -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/BeegoFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/BeegoFrameworkDetectorProviderImpl.java deleted file mode 100644 index 615e52a9..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/BeegoFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2022 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.go; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider; - -import java.util.Arrays; -import java.util.List; - -import static com.redhat.devtools.alizer.api.Constants.BEEGO; - -public class BeegoFrameworkDetectorProviderImpl extends GoFrameworkDetectorProvider { - private static final String BEEGO_TAG = "github.com/beego/beego"; - @Override - public FrameworkDetectorProvider create() { - return new BeegoFrameworkDetectorProviderImpl(); - } - - @Override - public List getFrameworks() { - return Arrays.asList(BEEGO); - } - - @Override - protected String getFrameworkTag() { - return BEEGO_TAG; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/EchoFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/EchoFrameworkDetectorProviderImpl.java deleted file mode 100644 index 48705580..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/EchoFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2022 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.go; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider; - -import java.util.Arrays; -import java.util.List; - -import static com.redhat.devtools.alizer.api.Constants.ECHO; - -public class EchoFrameworkDetectorProviderImpl extends GoFrameworkDetectorProvider { - private static final String ECHO_TAG = "github.com/labstack/echo"; - @Override - public FrameworkDetectorProvider create() { - return new EchoFrameworkDetectorProviderImpl(); - } - - @Override - public List getFrameworks() { - return Arrays.asList(ECHO); - } - - @Override - protected String getFrameworkTag() { - return ECHO_TAG; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/FastHttpFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/FastHttpFrameworkDetectorProviderImpl.java deleted file mode 100644 index dc1f9f54..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/FastHttpFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2022 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.go; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider; - -import java.util.Arrays; -import java.util.List; - -import static com.redhat.devtools.alizer.api.Constants.FAST_HTTP; - -public class FastHttpFrameworkDetectorProviderImpl extends GoFrameworkDetectorProvider { - private static final String FAST_HTTP_TAG = "github.com/valyala/fasthttp"; - @Override - public FrameworkDetectorProvider create() { - return new FastHttpFrameworkDetectorProviderImpl(); - } - - @Override - public List getFrameworks() { - return Arrays.asList(FAST_HTTP); - } - - @Override - protected String getFrameworkTag() { - return FAST_HTTP_TAG; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/GinFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/GinFrameworkDetectorProviderImpl.java deleted file mode 100644 index bac23954..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/GinFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2022 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.go; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider; - -import java.util.Arrays; -import java.util.List; - -import static com.redhat.devtools.alizer.api.Constants.GIN; - -public class GinFrameworkDetectorProviderImpl extends GoFrameworkDetectorProvider { - private static final String GIN_TAG = "github.com/gin-gonic/gin"; - @Override - public FrameworkDetectorProvider create() { - return new GinFrameworkDetectorProviderImpl(); - } - - @Override - public List getFrameworks() { - return Arrays.asList(GIN); - } - - @Override - protected String getFrameworkTag() { - return GIN_TAG; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/GoFiberFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/GoFiberFrameworkDetectorProviderImpl.java deleted file mode 100644 index e16473b3..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/GoFiberFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2022 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.go; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider; - -import java.util.Arrays; -import java.util.List; - -import static com.redhat.devtools.alizer.api.Constants.GOFIBER; - -public class GoFiberFrameworkDetectorProviderImpl extends GoFrameworkDetectorProvider { - private static final String GOFIBER_TAG = "github.com/gofiber/fiber"; - @Override - public FrameworkDetectorProvider create() { - return new GoFiberFrameworkDetectorProviderImpl(); - } - - @Override - public List getFrameworks() { - return Arrays.asList(GOFIBER); - } - - @Override - protected String getFrameworkTag() { - return GOFIBER_TAG; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/GoFrameworkDetectorProvider.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/GoFrameworkDetectorProvider.java deleted file mode 100644 index 4cb32d48..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/GoFrameworkDetectorProvider.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2022 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.go; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorWithConfigFileProvider; -import com.redhat.devtools.alizer.api.utils.DocumentParser; - -import java.io.File; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; - -import static com.redhat.devtools.alizer.api.Constants.GO; - -public abstract class GoFrameworkDetectorProvider implements FrameworkDetectorWithConfigFileProvider { - - protected abstract String getFrameworkTag(); - - @Override - public List getSupportedLanguages() { - return Arrays.asList(GO); - } - - @Override - public boolean hasFramework(File file) throws IOException { - return DocumentParser.isTagInFile(file, getFrameworkTag()); - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/MuxFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/MuxFrameworkDetectorProviderImpl.java deleted file mode 100644 index a89415f4..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/go/MuxFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2022 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.go; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider; - -import java.util.Arrays; -import java.util.List; - -import static com.redhat.devtools.alizer.api.Constants.MUX; - -public class MuxFrameworkDetectorProviderImpl extends GoFrameworkDetectorProvider { - private static final String MUX_TAG = "github.com/gorilla/mux"; - @Override - public FrameworkDetectorProvider create() { - return new MuxFrameworkDetectorProviderImpl(); - } - - @Override - public List getFrameworks() { - return Arrays.asList(MUX); - } - - @Override - protected String getFrameworkTag() { - return MUX_TAG; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/JavaFrameworkDetectorProvider.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/JavaFrameworkDetectorProvider.java deleted file mode 100644 index fc5bce32..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/JavaFrameworkDetectorProvider.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.java; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorWithConfigFileProvider; -import com.redhat.devtools.alizer.api.utils.DocumentParser; -import java.io.File; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import javax.xml.parsers.ParserConfigurationException; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - - -import static com.redhat.devtools.alizer.api.Constants.JAVA; - -public abstract class JavaFrameworkDetectorProvider implements FrameworkDetectorWithConfigFileProvider { - - protected abstract String getFrameworkTag(); - - @Override - public List getSupportedLanguages() { - return Arrays.asList(JAVA); - } - - @Override - public boolean hasFramework(File file) throws IOException { - if (file.getName().equalsIgnoreCase("build.gradle")) { - return DocumentParser.isTagInFile(file, getFrameworkTag()); - } else { - try { - return hasGroupIdMaven(file, getFrameworkTag()); - } catch (ParserConfigurationException | SAXException e) { - throw new IOException(e.getMessage()); - } - } - } - - protected boolean hasGroupIdMaven(File file, String groupId) throws ParserConfigurationException, IOException, SAXException { - NodeList nodeList = DocumentParser.getElementsByTag(file, "groupId"); - for (int i = 0; i < nodeList.getLength(); i++) { - Node node = nodeList.item(i); - if (node.getTextContent().startsWith(groupId)) { - return true; - } - } - return false; - } - -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/MicronautFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/MicronautFrameworkDetectorProviderImpl.java deleted file mode 100644 index fd3dba84..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/MicronautFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.java; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorWithConfigFileProvider; -import java.util.Arrays; -import java.util.List; - - -import static com.redhat.devtools.alizer.api.Constants.MICRONAUT; - -public class MicronautFrameworkDetectorProviderImpl extends JavaFrameworkDetectorProvider { - private static final String MICRONAUT_TAG = "io.micronaut"; - - @Override - public FrameworkDetectorWithConfigFileProvider create() { - return new MicronautFrameworkDetectorProviderImpl(); - } - - @Override - public List getFrameworks() { - return Arrays.asList(MICRONAUT); - } - - @Override - protected String getFrameworkTag() { - return MICRONAUT_TAG; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/OpenLibertyFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/OpenLibertyFrameworkDetectorProviderImpl.java deleted file mode 100644 index 8b16747f..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/OpenLibertyFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.java; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorWithConfigFileProvider; -import java.util.Arrays; -import java.util.List; - - -import static com.redhat.devtools.alizer.api.Constants.LIBERTY; - -public class OpenLibertyFrameworkDetectorProviderImpl extends JavaFrameworkDetectorProvider { - private static final String LIBERTY_TAG = "io.openliberty"; - - @Override - public FrameworkDetectorWithConfigFileProvider create() { - return new OpenLibertyFrameworkDetectorProviderImpl(); - } - - @Override - public List getFrameworks() { - return Arrays.asList(LIBERTY); - } - - @Override - protected String getFrameworkTag() { - return LIBERTY_TAG; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/QuarkusFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/QuarkusFrameworkDetectorProviderImpl.java deleted file mode 100644 index a1844ec0..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/QuarkusFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.java; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorWithConfigFileProvider; -import java.util.Arrays; -import java.util.List; - - -import static com.redhat.devtools.alizer.api.Constants.QUARKUS; - -public class QuarkusFrameworkDetectorProviderImpl extends JavaFrameworkDetectorProvider { - private static final String QUARKUS_TAG = "io.quarkus"; - - @Override - public FrameworkDetectorWithConfigFileProvider create() { - return new QuarkusFrameworkDetectorProviderImpl(); - } - - @Override - public List getFrameworks() { - return Arrays.asList(QUARKUS); - } - - @Override - protected String getFrameworkTag() { - return QUARKUS_TAG; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/SpringFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/SpringFrameworkDetectorProviderImpl.java deleted file mode 100644 index 26be497d..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/SpringFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.java; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorWithConfigFileProvider; -import java.util.Arrays; -import java.util.List; - - -import static com.redhat.devtools.alizer.api.Constants.SPRING; - -public class SpringFrameworkDetectorProviderImpl extends JavaFrameworkDetectorProvider { - private static final String SPRING_TAG = "org.springframework"; - - @Override - public FrameworkDetectorWithConfigFileProvider create() { - return new SpringFrameworkDetectorProviderImpl(); - } - - @Override - public List getFrameworks() { - return Arrays.asList(SPRING); - } - - @Override - protected String getFrameworkTag() { - return SPRING_TAG; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/VertxFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/VertxFrameworkDetectorProviderImpl.java deleted file mode 100644 index 281b5586..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/java/VertxFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.java; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorWithConfigFileProvider; -import java.util.Arrays; -import java.util.List; - - -import static com.redhat.devtools.alizer.api.Constants.VERTX; - -public class VertxFrameworkDetectorProviderImpl extends JavaFrameworkDetectorProvider { - private static final String VERTX_TAG = "io.vertx"; - - @Override - public FrameworkDetectorWithConfigFileProvider create() { - return new VertxFrameworkDetectorProviderImpl(); - } - - @Override - public List getFrameworks() { - return Arrays.asList(VERTX); - } - - @Override - protected String getFrameworkTag() { - return VERTX_TAG; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/nodejs/ExpressFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/nodejs/ExpressFrameworkDetectorProviderImpl.java deleted file mode 100644 index 938ee8d7..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/nodejs/ExpressFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.nodejs; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorWithConfigFileProvider; -import java.util.Arrays; -import java.util.List; - - -import static com.redhat.devtools.alizer.api.Constants.EXPRESS; - -public class ExpressFrameworkDetectorProviderImpl extends NodeJsFrameworkDetectorProvider { - private static final String EXPRESS_TAG = "express"; - - @Override - public List getFrameworks() { - return Arrays.asList(EXPRESS); - } - - protected String getFrameworkTag() { - return EXPRESS_TAG; - } - - @Override - public FrameworkDetectorWithConfigFileProvider create() { - return new ExpressFrameworkDetectorProviderImpl(); - } -} \ No newline at end of file diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/nodejs/NodeJsFrameworkDetectorProvider.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/nodejs/NodeJsFrameworkDetectorProvider.java deleted file mode 100644 index 082367a9..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/nodejs/NodeJsFrameworkDetectorProvider.java +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.nodejs; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorWithConfigFileProvider; -import com.redhat.devtools.alizer.api.utils.Utils; -import java.io.File; -import java.io.IOException; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; - - -import static com.redhat.devtools.alizer.api.Constants.JAVASCRIPT; -import static com.redhat.devtools.alizer.api.Constants.TYPESCRIPT; - -public abstract class NodeJsFrameworkDetectorProvider implements FrameworkDetectorWithConfigFileProvider { - @Override - public List getSupportedLanguages() { - return Arrays.asList(JAVASCRIPT, TYPESCRIPT); - } - - protected abstract String getFrameworkTag(); - - @Override - public boolean hasFramework(File file) throws IOException { - return getDependenciesFromPackageJson(file).keySet().stream().anyMatch(dependency -> dependency.equals(getFrameworkTag())); - } - - private Map getDependenciesFromPackageJson(File file) throws IOException { - Map packageJsonContent = Utils.getJsonFileAsMap(file); - if (!packageJsonContent.containsKey("dependencies")) { - return Collections.emptyMap(); - } - return (Map) packageJsonContent.get("dependencies"); - } -} \ No newline at end of file diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/nodejs/ReactFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/nodejs/ReactFrameworkDetectorProviderImpl.java deleted file mode 100644 index 38a9c45d..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/nodejs/ReactFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.nodejs; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorWithConfigFileProvider; -import java.util.Arrays; -import java.util.List; - - -import static com.redhat.devtools.alizer.api.Constants.REACT; - -public class ReactFrameworkDetectorProviderImpl extends NodeJsFrameworkDetectorProvider { - private static final String REACT_TAG = "react"; - - @Override - public List getFrameworks() { - return Arrays.asList(REACT); - } - - protected String getFrameworkTag() { - return REACT_TAG; - } - - @Override - public FrameworkDetectorWithConfigFileProvider create() { - return new ReactFrameworkDetectorProviderImpl(); - } -} \ No newline at end of file diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/python/DjangoFrameworkDetectorProviderImpl.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/python/DjangoFrameworkDetectorProviderImpl.java deleted file mode 100644 index 57c5940e..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/spi/framework/python/DjangoFrameworkDetectorProviderImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.spi.framework.python; - -import com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorWithoutConfigFileProvider; -import com.redhat.devtools.alizer.api.utils.DocumentParser; -import java.io.File; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.Optional; - - -import static com.redhat.devtools.alizer.api.Constants.DJANGO; -import static com.redhat.devtools.alizer.api.Constants.PYTHON; - -public class DjangoFrameworkDetectorProviderImpl implements FrameworkDetectorWithoutConfigFileProvider { - private static final String DJANGO_TAG = "from django."; - - @Override - public FrameworkDetectorWithoutConfigFileProvider create() { - return new DjangoFrameworkDetectorProviderImpl(); - } - - @Override - public List getSupportedLanguages() { - return Arrays.asList(PYTHON); - } - - @Override - public List getFrameworks() { - return Arrays.asList(DJANGO); - } - - @Override - public boolean hasFramework(List files) throws IOException { - Optional manage = files.stream().filter(file -> file.getName().equalsIgnoreCase("manage.py")).findFirst(); - Optional urls = files.stream().filter(file -> file.getName().equalsIgnoreCase("urls.py")).findFirst(); - Optional wsgi = files.stream().filter(file -> file.getName().equalsIgnoreCase("wsgi.py")).findFirst(); - Optional asgi = files.stream().filter(file -> file.getName().equalsIgnoreCase("asgi.py")).findFirst(); - - boolean manageIsDjango = manage.isPresent() && DocumentParser.isTagInFile(manage.get(), DJANGO_TAG); - boolean urlsIsDjango = urls.isPresent() && DocumentParser.isTagInFile(urls.get(), DJANGO_TAG); - boolean wsgiIsDjango = wsgi.isPresent() && DocumentParser.isTagInFile(wsgi.get(), DJANGO_TAG); - boolean asgiIsDjango = asgi.isPresent() && DocumentParser.isTagInFile(asgi.get(), DJANGO_TAG); - - return manageIsDjango || urlsIsDjango || wsgiIsDjango || asgiIsDjango; - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/utils/DocumentParser.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/utils/DocumentParser.java deleted file mode 100644 index fb294b76..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/utils/DocumentParser.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.utils; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -public class DocumentParser { - - public static NodeList getElementsByTag(File file, String tag) throws IOException, SAXException, ParserConfigurationException { - DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); - DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); - Document doc = dBuilder.parse(file); - doc.getDocumentElement().normalize(); - return doc.getElementsByTagName(tag); - } - - public static boolean isTagInFile(File file, String tag) throws IOException { - return Files.readAllLines(file.toPath()).stream().anyMatch(line -> line.contains(tag)); - } -} diff --git a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/utils/Utils.java b/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/utils/Utils.java deleted file mode 100644 index c2a63e26..00000000 --- a/java/alizer-api/src/main/java/com/redhat/devtools/alizer/api/utils/Utils.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api.utils; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.redhat.devtools.alizer.api.spi.LanguageEnricherProvider; -import java.io.File; -import java.io.IOException; -import java.util.Map; -import java.util.ServiceLoader; - -public class Utils { - private static final ObjectMapper JSON_MAPPER = new ObjectMapper(); - - public static LanguageEnricherProvider getEnricherByLanguage(String language) { - ServiceLoader loader = ServiceLoader.load(LanguageEnricherProvider.class, Utils.class.getClassLoader()); - for (LanguageEnricherProvider provider : loader) { - if (provider.create().getSupportedLanguages().stream().anyMatch(supported -> supported.equalsIgnoreCase(language))) { - return provider; - } - } - return null; - } - - public static Map getJsonFileAsMap(File file) throws IOException { - return JSON_MAPPER.readValue(file, Map.class); - } -} diff --git a/java/alizer-api/src/main/resources/META-INF/services/com.redhat.devtools.alizer.api.spi.LanguageEnricherProvider b/java/alizer-api/src/main/resources/META-INF/services/com.redhat.devtools.alizer.api.spi.LanguageEnricherProvider deleted file mode 100644 index b2cef081..00000000 --- a/java/alizer-api/src/main/resources/META-INF/services/com.redhat.devtools.alizer.api.spi.LanguageEnricherProvider +++ /dev/null @@ -1,5 +0,0 @@ -com.redhat.devtools.alizer.api.spi.JavaLanguageEnricherProviderImpl -com.redhat.devtools.alizer.api.spi.PythonLanguageEnricherProviderImpl -com.redhat.devtools.alizer.api.spi.JavaScriptLanguageEnricherProviderImpl -com.redhat.devtools.alizer.api.spi.DotNetLanguageEnricherProviderImpl -com.redhat.devtools.alizer.api.spi.GoLanguageEnricherProviderImpl diff --git a/java/alizer-api/src/main/resources/META-INF/services/com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider b/java/alizer-api/src/main/resources/META-INF/services/com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider deleted file mode 100644 index cb88d4f0..00000000 --- a/java/alizer-api/src/main/resources/META-INF/services/com.redhat.devtools.alizer.api.spi.framework.FrameworkDetectorProvider +++ /dev/null @@ -1,14 +0,0 @@ -com.redhat.devtools.alizer.api.spi.framework.java.MicronautFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.java.OpenLibertyFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.java.QuarkusFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.java.SpringFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.java.VertxFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.nodejs.ExpressFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.nodejs.ReactFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.python.DjangoFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.go.GinFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.go.FastHttpFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.go.EchoFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.go.BeegoFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.go.GoFiberFrameworkDetectorProviderImpl -com.redhat.devtools.alizer.api.spi.framework.go.MuxFrameworkDetectorProviderImpl diff --git a/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/AbstractRecognizerTest.java b/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/AbstractRecognizerTest.java deleted file mode 100644 index 06b84813..00000000 --- a/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/AbstractRecognizerTest.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2020 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import com.redhat.devtools.alizer.api.DevfileType; -import org.junit.BeforeClass; - -import java.util.Arrays; -import java.util.List; - -public abstract class AbstractRecognizerTest { - protected static List devfileTypes; - protected static DevfileType JAVA_MAVEN; - protected static DevfileType JAVA; - protected static DevfileType JAVA_QUARKUS; - protected static DevfileType JAVA_SPRING; - protected static DevfileType JAVA_VERTX; - protected static DevfileType JAVA_WILDFLY_BOOTABLE; - protected static DevfileType JAVA_WILDFLY; - protected static DevfileType NODEJS; - protected static DevfileType PYTHON_DJANGO; - protected static DevfileType PYTHON; - protected static DevfileType CSHARP; - protected static DevfileType NETCORE3_1; - protected static DevfileType FSHARP; - protected static DevfileType GO; - - @BeforeClass - public static void init() { - devfileTypes = Arrays.asList( - JAVA_MAVEN = createDevfileType("java-maven", "java", "java", "Java", "Maven"), - JAVA = createDevfileType("java", "java", "java"), - JAVA_QUARKUS = createDevfileType("java-quarkus", "java", "quarkus", "Java", "Quarkus"), - JAVA_SPRING = createDevfileType("java-spring", "java", "spring", "Java", "Spring"), - JAVA_VERTX = createDevfileType("java-vertx", "java", "vertx","Java", "Vert.x"), - JAVA_WILDFLY_BOOTABLE = createDevfileType("java-wildfly-bootable", "java", "wildfly", "RHEL8", "Java", "OpenJDK", "Maven", "WildFly", "Microprofile", "WildFly Bootable"), - JAVA_WILDFLY = createDevfileType("java-wildfly", "java", "wildfly", "Java", "WildFly"), - NODEJS = createDevfileType("nodejs", "nodejs", "nodejs", "NodeJS", "Express", "ubi8"), - PYTHON_DJANGO = createDevfileType("python-django", "python", "django", "Python", "pip", "Django"), - PYTHON = createDevfileType("python", "python", "python", "Python", "pip"), - CSHARP = createDevfileType("csharp", "c#", "csharp", "csharp", ".net"), - FSHARP = createDevfileType("fsharp", "f#", "fsharp", "dotnet", "fsharp"), - NETCORE3_1 = createDevfileType("netcore3.1", "dotnet", "dotnet", "dotnetcore-3.1", ".net"), - GO = createDevfileType("go", "go", "go", "go") - ); - } - - static DevfileType createDevfileType(String name, String language, String projectType, String ...tags) { - return new DevfileType() { - @Override - public String getName() { - return name; - } - - @Override - public String getLanguage() { - return language; - } - - @Override - public String getProjectType() { - return projectType; - } - - @Override - public List getTags() { - return Arrays.asList(tags); - } - }; - } -} diff --git a/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/ComponentRecognizerTest.java b/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/ComponentRecognizerTest.java deleted file mode 100644 index 31166c22..00000000 --- a/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/ComponentRecognizerTest.java +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import java.io.File; -import java.io.IOException; -import java.util.List; -import org.junit.Before; -import org.junit.Test; - - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -public class ComponentRecognizerTest extends AbstractRecognizerTest { - private ComponentRecognizer recognizer; - - @Before - public void setup() { - recognizer = new RecognizerFactory().createComponentRecognizer(); - } - - @Test - public void testSelfComponent() throws IOException { - List components = recognizer.analyze("."); - assertEquals(1, components.size()); - } - - @Test - public void testDjangoComponent() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects/django").getCanonicalPath()); - assertEquals(1, components.size()); - assertEquals("Python", components.get(0).getLanguages().get(0).getName()); - } - - @Test - public void testMicronautComponent() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects/micronaut").getCanonicalPath()); - assertEquals(1, components.size()); - assertEquals("Java", components.get(0).getLanguages().get(0).getName()); - } - - @Test - public void testQuarkusComponent() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects/quarkus").getCanonicalPath()); - assertEquals(1, components.size()); - assertEquals("Java", components.get(0).getLanguages().get(0).getName()); - assertTrue(components.get(0).getLanguages().get(0).getFrameworks().contains("Quarkus")); - } - - @Test - public void testNodeComponent() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects/nodejs-ex").getCanonicalPath()); - assertEquals(1, components.size()); - assertEquals("JavaScript", components.get(0).getLanguages().get(0).getName()); - } - - @Test - public void testSingleComponentWithExistingDevfile() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects/nodejs-ex-w-devfile").getCanonicalPath()); - assertEquals(1, components.size()); - } - - @Test - public void testNoComponent() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects/simple").getCanonicalPath()); - assertEquals(0, components.size()); - } - - @Test - public void testDoubleComponents() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects/double-components").getCanonicalPath()); - assertEquals(2, components.size()); - assertEquals("JavaScript", components.get(0).getLanguages().get(0).getName()); - assertEquals("JavaScript", components.get(1).getLanguages().get(0).getName()); - } - - @Test - public void testWrappedComponents() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects/component-wrapped-in-folder").getCanonicalPath()); - assertEquals(1, components.size()); - assertEquals("Java", components.get(0).getLanguages().get(0).getName()); - assertEquals(new File("../../resources/projects/component-wrapped-in-folder/wrapper/quarkus").getCanonicalPath(), components.get(0).getPath().toString()); - } - - @Test - public void testMultipleComponents() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects").getCanonicalPath()); - assertEquals(21, components.size()); - assertEquals(1, components.stream().filter(component -> "python".equalsIgnoreCase(component.getLanguages().get(0).getName())).count()); - assertEquals(2, components.stream().filter(component -> component.getLanguages().get(0).getFrameworks().contains("Quarkus")).count()); - assertEquals(5, components.stream().filter(component -> "javascript".equalsIgnoreCase(component.getLanguages().get(0).getName())).count()); - assertEquals(6, components.stream().filter(component -> "java".equalsIgnoreCase(component.getLanguages().get(0).getName())).count()); - assertEquals(2, components.stream().filter(component -> "c#".equalsIgnoreCase(component.getLanguages().get(0).getName())).count()); - assertEquals(1, components.stream().filter(component -> "go".equalsIgnoreCase(component.getLanguages().get(0).getName())).count()); - } - - @Test - public void testDotNetComponent() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects/s2i-dotnetcore-ex").getCanonicalPath()); - assertEquals(1, components.size()); - assertEquals(1, components.stream().filter(component -> "c#".equalsIgnoreCase(component.getLanguages().get(0).getName())).count()); - } - - @Test - public void testFSharpComponent() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects/net-fsharp").getCanonicalPath()); - assertEquals(1, components.size()); - assertEquals(1, components.stream().filter(component -> "F#".equalsIgnoreCase(component.getLanguages().get(0).getName())).count()); - } - - @Test - public void testVBComponent() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects/net-vb").getCanonicalPath()); - assertEquals(1, components.size()); - assertEquals(1, components.stream().filter(component -> "Visual Basic .NET".equalsIgnoreCase(component.getLanguages().get(0).getName())).count()); - } - - @Test - public void testGoComponent() throws IOException { - List components = recognizer.analyze(new File("../../resources/projects/golang-gin-app").getCanonicalPath()); - assertEquals(1, components.size()); - assertEquals(1, components.stream().filter(component -> "go".equalsIgnoreCase(component.getLanguages().get(0).getName())).count()); - } -} diff --git a/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/DevFileRecognizerTest.java b/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/DevFileRecognizerTest.java deleted file mode 100644 index 1ed5fbdd..00000000 --- a/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/DevFileRecognizerTest.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.redhat.devtools.alizer.api; - -import org.junit.Before; -import org.junit.Test; - -import java.io.File; -import java.io.IOException; -import java.util.List; - -import static org.junit.Assert.assertTrue; - -public class DevFileRecognizerTest extends AbstractRecognizerTest { - private DevFileRecognizer recognizer; - - @Before - public void setup() { - recognizer = new RecognizerFactory().createDevFileRecognizer(); - } - - @Test - public void testJAVAMetaDevFile() throws IOException { - DevfileType devFile = recognizer.selectDevFileFromTypes(new File("../../resources/projects/micronaut").getCanonicalPath(), devfileTypes); - assertTrue(devFile.getName().equalsIgnoreCase("java-maven")); - } - - @Test - public void testQuarkusDevFileType() throws IOException { - DevfileType devFile = recognizer.selectDevFileFromTypes(new File("../../resources/projects/quarkus").getCanonicalPath(), devfileTypes); - assertTrue(devFile.getName().equalsIgnoreCase("java-quarkus")); - } - - @Test - public void testMicronautDevFile() throws IOException { - DevfileType devFile = recognizer.selectDevFileFromTypes(new File("../../resources/projects/micronaut").getCanonicalPath(), devfileTypes); - assertTrue(devFile.getName().equalsIgnoreCase("java-maven")); - } - - @Test - public void testNodeDevFile() throws IOException { - DevfileType devFile = recognizer.selectDevFileFromTypes(new File("../../resources/projects/nodejs-ex").getCanonicalPath(), devfileTypes); - assertTrue(devFile.getName().equalsIgnoreCase("nodejs")); - } - - @Test - public void testDjangoDevFile() throws IOException { - DevfileType devFile = recognizer.selectDevFileFromTypes(new File("../../resources/projects/django").getCanonicalPath(), devfileTypes); - assertTrue(devFile.getName().equalsIgnoreCase("python-django")); - } - - @Test - public void testCSharpDevFile() throws IOException { - DevfileType devFile = recognizer.selectDevFileFromTypes(new File("../../resources/projects/s2i-dotnetcore-ex").getCanonicalPath(), devfileTypes); - assertTrue(devFile.getName().equalsIgnoreCase("csharp")); - } - - @Test - public void testFSharpDevFile() throws IOException { - DevfileType devFile = recognizer.selectDevFileFromTypes(new File("../../resources/projects/net-fsharp").getCanonicalPath(), devfileTypes); - assertTrue(devFile.getName().equalsIgnoreCase("fsharp")); - } - - @Test - public void testVBDevFile() throws IOException { - DevfileType devFile = recognizer.selectDevFileFromTypes(new File("../../resources/projects/net-vb").getCanonicalPath(), devfileTypes); - assertTrue(devFile.getName().equalsIgnoreCase("netcore3.1")); - } - - @Test - public void testGoDevFile() throws IOException { - DevfileType devFile = recognizer.selectDevFileFromTypes(new File("../../resources/projects/golang-gin-app").getCanonicalPath(), devfileTypes); - assertTrue(devFile.getName().equalsIgnoreCase("go")); - } -} diff --git a/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/LanguageRecognizerTest.java b/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/LanguageRecognizerTest.java deleted file mode 100644 index 9866ce18..00000000 --- a/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/LanguageRecognizerTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2020 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import java.io.File; -import org.junit.Before; -import org.junit.Test; - -import java.io.IOException; -import java.util.List; -import java.util.Optional; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -public class LanguageRecognizerTest extends AbstractRecognizerTest { - private LanguageRecognizer recognizer; - - @Before - public void setup() { - recognizer = new RecognizerFactory().createLanguageRecognizer(); - } - - @Test - public void testMySelf() throws IOException { - List status = recognizer.analyze("."); - assertTrue(status.stream().anyMatch(lang -> lang.getName().equalsIgnoreCase("JAVA"))); - } - - @Test - public void testQuarkus() throws IOException { - List status = recognizer.analyze(new File("../../resources/projects/quarkus").getCanonicalPath()); - assertTrue(status.stream().anyMatch(lang -> lang.getName().equalsIgnoreCase("JAVA"))); - } - - @Test - public void testMicronaut() throws IOException { - List status = recognizer.analyze(new File("../../resources/projects/micronaut").getCanonicalPath()); - assertTrue(status.stream().anyMatch(lang -> lang.getName().equalsIgnoreCase("JAVA"))); - } - - @Test - public void testNode() throws IOException { - List status = recognizer.analyze(new File("../../resources/projects/nodejs-ex").getCanonicalPath()); - assertTrue(status.stream().anyMatch(lang -> lang.getName().equalsIgnoreCase("JavaScript"))); - } - - @Test - public void testDjango() throws IOException { - List status = recognizer.analyze(new File("../../resources/projects/django").getCanonicalPath()); - assertTrue(status.stream().anyMatch(lang -> lang.getName().equalsIgnoreCase("Python"))); - } - - @Test - public void testCSharp() throws IOException { - List status = recognizer.analyze(new File("../../resources/projects/s2i-dotnetcore-ex").getCanonicalPath()); - assertTrue(status.stream().anyMatch(lang -> lang.getName().equalsIgnoreCase("C#"))); - } - - @Test - public void testFSharp() throws IOException { - List status = recognizer.analyze(new File("../../resources/projects/net-fsharp").getCanonicalPath()); - assertTrue(status.stream().anyMatch(lang -> lang.getName().equalsIgnoreCase("F#"))); - } - - @Test - public void testVB() throws IOException { - List status = recognizer.analyze(new File("../../resources/projects/net-vb").getCanonicalPath()); - assertTrue(status.stream().anyMatch(lang -> lang.getName().equalsIgnoreCase("Visual Basic .NET"))); - } - - @Test - public void testGo() throws IOException { - List status = recognizer.analyze(new File("../../resources/projects/golang-gin-app").getCanonicalPath()); - Optional goLang = status.stream().filter(lang -> lang.getName().equalsIgnoreCase("Go")).findFirst(); - assertTrue(goLang.isPresent()); - assertEquals("Gin", goLang.get().getFrameworks().get(0)); - assertEquals("1.15", goLang.get().getTools().get(0)); - } - - @Test - public void testMultipleDotNetFrameworks() throws IOException { - List status = recognizer.analyze(new File("../../resources/projects/multiple-dotnet-target-frameworks").getCanonicalPath()); - assertTrue(status.stream().anyMatch(lang -> lang.getName().equalsIgnoreCase("C#"))); - Language cSharpLang = status.stream().filter(lang -> lang.getName().equalsIgnoreCase("C#")).findFirst().get(); - assertEquals(cSharpLang.getFrameworks().size(), 3); - assertTrue(cSharpLang.getFrameworks().stream().anyMatch(f -> f.equalsIgnoreCase("net6.0"))); - assertTrue(cSharpLang.getFrameworks().stream().anyMatch(f -> f.equalsIgnoreCase("net5.0"))); - assertTrue(cSharpLang.getFrameworks().stream().anyMatch(f -> f.equalsIgnoreCase("netcoreapp3.1"))); - } -} diff --git a/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/LanguageScoreTest.java b/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/LanguageScoreTest.java deleted file mode 100644 index e2f001db..00000000 --- a/java/alizer-api/src/test/java/com/redhat/devtools/alizer/api/LanguageScoreTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.api; - -import org.junit.Assert; -import org.junit.Test; - -import java.util.Collections; - -import static org.junit.Assert.assertTrue; - -public class LanguageScoreTest extends AbstractRecognizerTest { - @Test - public void checkUnknownLanguageHasZero() { - Language lang = new Language("Unknown", Collections.emptyList(), 1.0, false); - LanguageScore score = new LanguageScore(lang, JAVA); - Assert.assertEquals(0, score.getScore()); - } - - @Test - public void checkFinestDevfilehAsHighestScore() { - Language lang = new Language("java", Collections.emptyList(), 1.0, false); - lang.setFrameworks(Collections.singletonList("quarkus")); - lang.setTools(Collections.singletonList("maven")); - LanguageScore javaScore = new LanguageScore(lang, JAVA); - LanguageScore quarkusScore = new LanguageScore(lang, JAVA_QUARKUS); - assertTrue(quarkusScore.getScore() > javaScore.getScore()); - } -} diff --git a/java/alizer-api/src/test/resources/devfiles/django.yaml b/java/alizer-api/src/test/resources/devfiles/django.yaml deleted file mode 100644 index b5411572..00000000 --- a/java/alizer-api/src/test/resources/devfiles/django.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: python-django -displayName: Django -description: Python3.7 with Django -tags: ["Python", "pip", "Django"] -projectType: "django" -language: "python" \ No newline at end of file diff --git a/java/alizer-api/src/test/resources/devfiles/java.yaml b/java/alizer-api/src/test/resources/devfiles/java.yaml deleted file mode 100644 index 87271d46..00000000 --- a/java/alizer-api/src/test/resources/devfiles/java.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: java-maven -displayName: Maven Java -description: Upstream Maven and OpenJDK 11 -tags: ["Java", "Maven"] -projectType: "maven" -language: "java" \ No newline at end of file diff --git a/java/alizer-api/src/test/resources/devfiles/nodejs.yaml b/java/alizer-api/src/test/resources/devfiles/nodejs.yaml deleted file mode 100644 index 07922c87..00000000 --- a/java/alizer-api/src/test/resources/devfiles/nodejs.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: nodejs -displayName: NodeJS Runtime -description: Stack with NodeJS 12 -tags: ["NodeJS", "Express", "ubi8"] -projectType: "nodejs" -language: "nodejs" \ No newline at end of file diff --git a/java/alizer-api/src/test/resources/devfiles/python.yaml b/java/alizer-api/src/test/resources/devfiles/python.yaml deleted file mode 100644 index 5cd80155..00000000 --- a/java/alizer-api/src/test/resources/devfiles/python.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: python -displayName: Python -description: Python Stack with Python 3.7 -tags: ["Python", "pip"] -projectType: "python" -language: "python" \ No newline at end of file diff --git a/java/alizer-api/src/test/resources/devfiles/quarkus.yaml b/java/alizer-api/src/test/resources/devfiles/quarkus.yaml deleted file mode 100644 index bb17e0ab..00000000 --- a/java/alizer-api/src/test/resources/devfiles/quarkus.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: java-quarkus -displayName: Quarkus Java -description: Upstream Quarkus with Java+GraalVM -tags: ["Java", "Quarkus"] -projectType: "quarkus" -language: "java" \ No newline at end of file diff --git a/java/alizer-cli/.dockerignore b/java/alizer-cli/.dockerignore deleted file mode 100644 index 94810d00..00000000 --- a/java/alizer-cli/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!target/*-runner -!target/*-runner.jar -!target/lib/* -!target/quarkus-app/* \ No newline at end of file diff --git a/java/alizer-cli/pom.xml b/java/alizer-cli/pom.xml deleted file mode 100644 index 23156006..00000000 --- a/java/alizer-cli/pom.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - alizer - com.redhat.devtools.alizer - 0.2.0-SNAPSHOT - - 4.0.0 - alizer-cli - - 3.8.1 - true - 1.12.0.Final - quarkus-universe-bom - io.quarkus - 1.12.0.Final - 3.0.0-M5 - - - - - ${quarkus.platform.group-id} - ${quarkus.platform.artifact-id} - ${quarkus.platform.version} - pom - import - - - - - - - io.quarkus - quarkus-picocli - - - io.quarkus - quarkus-arc - - - io.quarkus - quarkus-qute - - - io.quarkus - quarkus-junit5 - test - - - info.picocli - picocli-codegen - - - com.redhat.devtools.alizer - alizer-api - ${project.version} - - - com.redhat.devtools.alizer - alizer-registry-support - ${project.version} - - - - - - io.quarkus - quarkus-maven-plugin - ${quarkus-plugin.version} - true - - - - build - generate-code - generate-code-tests - - - - - - maven-compiler-plugin - ${compiler-plugin.version} - - - maven-surefire-plugin - ${surefire-plugin.version} - - - org.jboss.logmanager.LogManager - ${maven.home} - - - - - - - - native - - - native - - - - - - maven-failsafe-plugin - ${surefire-plugin.version} - - - - integration-test - verify - - - - ${project.build.directory}/${project.build.finalName}-runner - org.jboss.logmanager.LogManager - ${maven.home} - - - - - - - - - native - - - - diff --git a/java/alizer-cli/src/main/docker/Dockerfile.fast-jar b/java/alizer-cli/src/main/docker/Dockerfile.fast-jar deleted file mode 100644 index d79692a5..00000000 --- a/java/alizer-cli/src/main/docker/Dockerfile.fast-jar +++ /dev/null @@ -1,54 +0,0 @@ -#### -# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode -# -# Before building the container image run: -# -# ./mvnw package -Dquarkus.package.type=fast-jar -# -# Then, build the image with: -# -# docker build -f src/main/docker/Dockerfile.fast-jar -t quarkus/cli-fast-jar . -# -# Then run the container using: -# -# docker run -i --rm -p 8080:8080 quarkus/cli-fast-jar -# -# If you want to include the debug port into your docker image -# you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5050 -# -# Then run the container using : -# -# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/cli-fast-jar -# -### -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 - -ARG JAVA_PACKAGE=java-11-openjdk-headless -ARG RUN_JAVA_VERSION=1.3.8 -ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' -# Install java and the run-java script -# Also set up permissions for user `1001` -RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ - && microdnf update \ - && microdnf clean all \ - && mkdir /deployments \ - && chown 1001 /deployments \ - && chmod "g+rwX" /deployments \ - && chown 1001:root /deployments \ - && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \ - && chown 1001 /deployments/run-java.sh \ - && chmod 540 /deployments/run-java.sh \ - && echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/lib/security/java.security - -# Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size. -ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" -# We make four distinct layers so if there are application changes the library layers can be re-used -COPY --chown=1001 target/quarkus-app/lib/ /deployments/lib/ -COPY --chown=1001 target/quarkus-app/*.jar /deployments/ -COPY --chown=1001 target/quarkus-app/app/ /deployments/app/ -COPY --chown=1001 target/quarkus-app/quarkus/ /deployments/quarkus/ - -EXPOSE 8080 -USER 1001 - -ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/java/alizer-cli/src/main/docker/Dockerfile.jvm b/java/alizer-cli/src/main/docker/Dockerfile.jvm deleted file mode 100644 index 7a405f79..00000000 --- a/java/alizer-cli/src/main/docker/Dockerfile.jvm +++ /dev/null @@ -1,51 +0,0 @@ -#### -# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode -# -# Before building the container image run: -# -# ./mvnw package -# -# Then, build the image with: -# -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/cli-jvm . -# -# Then run the container using: -# -# docker run -i --rm -p 8080:8080 quarkus/cli-jvm -# -# If you want to include the debug port into your docker image -# you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5050 -# -# Then run the container using : -# -# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/cli-jvm -# -### -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 - -ARG JAVA_PACKAGE=java-11-openjdk-headless -ARG RUN_JAVA_VERSION=1.3.8 -ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' -# Install java and the run-java script -# Also set up permissions for user `1001` -RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ - && microdnf update \ - && microdnf clean all \ - && mkdir /deployments \ - && chown 1001 /deployments \ - && chmod "g+rwX" /deployments \ - && chown 1001:root /deployments \ - && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \ - && chown 1001 /deployments/run-java.sh \ - && chmod 540 /deployments/run-java.sh \ - && echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/lib/security/java.security - -# Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size. -ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" -COPY target/lib/* /deployments/lib/ -COPY target/*-runner.jar /deployments/app.jar - -EXPOSE 8080 -USER 1001 - -ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/java/alizer-cli/src/main/docker/Dockerfile.native b/java/alizer-cli/src/main/docker/Dockerfile.native deleted file mode 100644 index f1332c11..00000000 --- a/java/alizer-cli/src/main/docker/Dockerfile.native +++ /dev/null @@ -1,27 +0,0 @@ -#### -# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode -# -# Before building the container image run: -# -# ./mvnw package -Pnative -# -# Then, build the image with: -# -# docker build -f src/main/docker/Dockerfile.native -t quarkus/cli . -# -# Then run the container using: -# -# docker run -i --rm -p 8080:8080 quarkus/cli -# -### -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 -WORKDIR /work/ -RUN chown 1001 /work \ - && chmod "g+rwX" /work \ - && chown 1001:root /work -COPY --chown=1001:root target/*-runner /work/application - -EXPOSE 8080 -USER 1001 - -CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] diff --git a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/AlizerCli.java b/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/AlizerCli.java deleted file mode 100644 index 6b0bb05e..00000000 --- a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/AlizerCli.java +++ /dev/null @@ -1,23 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.cli; - -import io.quarkus.picocli.runtime.annotations.TopCommand; -import picocli.CommandLine; - -@TopCommand -@CommandLine.Command(subcommands = {AnalyzeCommand.class, DevfileCommand.class, ComponentCommand.class}) -public class AlizerCli { - - @CommandLine.Option(names = {"-h", "--help"}, usageHelp = true, description = "Help for alizer") - boolean usageHelpRequested; - -} diff --git a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/AnalyzeCommand.java b/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/AnalyzeCommand.java deleted file mode 100644 index f5d82493..00000000 --- a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/AnalyzeCommand.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.cli; - -import com.redhat.devtools.alizer.api.Language; -import com.redhat.devtools.alizer.api.LanguageRecognizer; -import com.redhat.devtools.alizer.api.RecognizerFactory; -import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; -import picocli.CommandLine; - -import java.io.IOException; -import java.util.List; - -@CommandLine.Command(name = "analyze") -public class AnalyzeCommand extends BaseCommand implements Runnable{ - - @CheckedTemplate - public static class Templates { - public static native TemplateInstance result(List result); - } - - @Override - public void run() { - LanguageRecognizer reco = new RecognizerFactory().createLanguageRecognizer(); - - try { - List languages = reco.analyze(name); - /*.forEach( - lang -> { - System.out.printf("%-10s %-10s %-10s %-10s\n", - lang.getName(), - String.join(", ", lang.getFrameworks()), - String.join(", ", lang.getTools()), - String.format(" % .2f", lang.getUsageInPercentage()) + "%"); - } - );*/ - System.out.println(getTemplateForFormat(Templates.result(languages)).render()); - } catch (IOException e) {} - } -} diff --git a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/BaseCommand.java b/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/BaseCommand.java deleted file mode 100644 index 9c80f7f5..00000000 --- a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/BaseCommand.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.cli; - -import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.Variant; -import picocli.CommandLine; - -public abstract class BaseCommand { - @CommandLine.Parameters(index = "0", description = "The project to analyze") - String name; - - @CommandLine.Option(names = {"-o"}, description = "Format") - String format; - - protected TemplateInstance getTemplateForFormat(TemplateInstance template) { - if (format == null) { - template.setAttribute(TemplateInstance.SELECTED_VARIANT, Variant.forContentType(Variant.TEXT_PLAIN)); - } else if ("json".equalsIgnoreCase(format)) { - template.setAttribute(TemplateInstance.SELECTED_VARIANT, Variant.forContentType(Variant.APPLICATION_JSON)); - } else if ("yaml".equalsIgnoreCase(format)) { - template.setAttribute(TemplateInstance.SELECTED_VARIANT, Variant.forContentType("application/yaml")); - } - return template; - } -} diff --git a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/ComponentCommand.java b/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/ComponentCommand.java deleted file mode 100644 index 3dedd52c..00000000 --- a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/ComponentCommand.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.cli; - -import com.redhat.devtools.alizer.api.Component; -import com.redhat.devtools.alizer.api.ComponentRecognizer; -import com.redhat.devtools.alizer.api.ComponentRecognizerImpl; -import com.redhat.devtools.alizer.api.RecognizerFactory; -import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; -import java.io.IOException; -import java.util.List; -import picocli.CommandLine; - -@CommandLine.Command(name = "component") -public class ComponentCommand extends BaseCommand implements Runnable{ - - @CheckedTemplate - public static class Templates { - public static native TemplateInstance result(List result); - } - - @Override - public void run() { - ComponentRecognizer reco = new RecognizerFactory().createComponentRecognizer(); - try { - List components = reco.analyze(name); - System.out.println(getTemplateForFormat(Templates.result(components)).render()); - } catch (IOException e) {} - } -} diff --git a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/DevfileCommand.java b/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/DevfileCommand.java deleted file mode 100644 index 9d2091a3..00000000 --- a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/DevfileCommand.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - ******************************************************************************/ -package com.redhat.devtools.alizer.cli; - -import com.redhat.devtools.alizer.api.DevFileRecognizer; -import com.redhat.devtools.alizer.api.DevfileType; -import com.redhat.devtools.alizer.api.LanguageRecognizer; -import com.redhat.devtools.alizer.api.RecognizerFactory; -import com.redhat.devtools.alizer.registry.support.DevfileMetadata; -import com.redhat.devtools.alizer.registry.support.DevfileRegistryMetadataProviderBuilder; -import io.quarkus.qute.TemplateInstance; -import io.quarkus.qute.api.CheckedTemplate; -import picocli.CommandLine; - -import java.io.IOException; -import java.util.List; -import java.util.stream.Collectors; - -@CommandLine.Command(name = "devfile") -public class DevfileCommand extends BaseCommand implements Runnable{ - - @CommandLine.Option(names = {"-r", "--registry"}, description = "Pass the registry") - List registries; - - @CheckedTemplate - public static class Templates { - public static native TemplateInstance result(DevfileType result); - } - - - @Override - public void run() { - DevFileRecognizer reco = new RecognizerFactory().createDevFileRecognizer(); - DevfileType type = null; - try { - if (registries != null && !registries.isEmpty()) { - List devfiles = new DevfileRegistryMetadataProviderBuilder().withURLs(registries).build().getDevfileMetada(); - type = reco.selectDevFileFromTypes(name, devfiles.stream().map(DevfileTypeAdapter::new).collect(Collectors.toList())); - } - System.out.println(getTemplateForFormat(Templates.result(type)).render()); - } catch (IOException e) {} - } -} diff --git a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/DevfileTypeAdapter.java b/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/DevfileTypeAdapter.java deleted file mode 100644 index 0c2492dd..00000000 --- a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/DevfileTypeAdapter.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.cli; - -import com.redhat.devtools.alizer.registry.support.DevfileMetadata; -import com.redhat.devtools.alizer.api.DevfileType; - -import java.util.List; - -public class DevfileTypeAdapter implements DevfileType { - private final DevfileMetadata delegate; - - public DevfileTypeAdapter(DevfileMetadata delegate) { - this.delegate = delegate; - } - - @Override - public String getName() { - return delegate.getName(); - } - - @Override - public String getLanguage() { - return delegate.getLanguage(); - } - - @Override - public String getProjectType() { - return delegate.getProjectType(); - } - - @Override - public List getTags() { - return delegate.getTags(); - } -} diff --git a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/Dummy.java b/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/Dummy.java deleted file mode 100644 index 87bfb134..00000000 --- a/java/alizer-cli/src/main/java/com/redhat/devtools/alizer/cli/Dummy.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.redhat.devtools.alizer.cli; - -import com.redhat.devtools.alizer.registry.support.DevfileMetadata; -import io.quarkus.runtime.annotations.RegisterForReflection; - -@RegisterForReflection(targets = DevfileMetadata.class) -public class Dummy { -} diff --git a/java/alizer-cli/src/main/resources/application.properties b/java/alizer-cli/src/main/resources/application.properties deleted file mode 100644 index 62d246b6..00000000 --- a/java/alizer-cli/src/main/resources/application.properties +++ /dev/null @@ -1,7 +0,0 @@ -quarkus.log.level=SEVERE -quarkus.banner.enabled=false -quarkus.native.resources.includes=languages.yml,languages-customization.yml -quarkus.native.auto-service-loader-registration=true -quarkus.picocli.native-image.processing.enable=false -quarkus.picocli.top-command=com.redhat.devtools.alizer.cli.AlizerCli -quarkus.native.enable-https-url-handler=true diff --git a/java/alizer-cli/src/main/resources/templates/AnalyzeCommand/result.json b/java/alizer-cli/src/main/resources/templates/AnalyzeCommand/result.json deleted file mode 100644 index df69a4c4..00000000 --- a/java/alizer-cli/src/main/resources/templates/AnalyzeCommand/result.json +++ /dev/null @@ -1,20 +0,0 @@ -{ "success": true, - "languages": -[ - {#for lang in result} - { - "name": "{lang.name}", - "frameworks": [ - {#for framework in lang.frameworks} - "{framework}"{#if hasNext},{/if} - {/for} - ], - "tools": [ - {#for tool in lang.tools} - "{tool}"{#if hasNext},{/if} - {/for} - ], - "percentage": {lang.usageInPercentage} - }{#if hasNext},{/if}{/for} -] -} \ No newline at end of file diff --git a/java/alizer-cli/src/main/resources/templates/AnalyzeCommand/result.txt b/java/alizer-cli/src/main/resources/templates/AnalyzeCommand/result.txt deleted file mode 100644 index 01e383dc..00000000 --- a/java/alizer-cli/src/main/resources/templates/AnalyzeCommand/result.txt +++ /dev/null @@ -1,3 +0,0 @@ -{#for lang in result} -Language:{lang.name} Frameworks:{#for framework in lang.frameworks}{framework}{#if hasNext},{/if}{/for} Tools:{#for tool in lang.tools}{tool}{#if hasNext},{/if}{/for} Accuracy:{lang.usageInPercentage} -{/for} \ No newline at end of file diff --git a/java/alizer-cli/src/main/resources/templates/ComponentCommand/result.json b/java/alizer-cli/src/main/resources/templates/ComponentCommand/result.json deleted file mode 100644 index 9aea5049..00000000 --- a/java/alizer-cli/src/main/resources/templates/ComponentCommand/result.json +++ /dev/null @@ -1,14 +0,0 @@ -{ "success": true, - "components": - [ - {#for comp in result} - { - "path": "{comp.path}", - "languages": [ - {#for language in comp.languages} - "{language.name}"{#if hasNext},{/if} - {/for} - ] - }{#if hasNext},{/if}{/for} - ] -} \ No newline at end of file diff --git a/java/alizer-cli/src/main/resources/templates/ComponentCommand/result.txt b/java/alizer-cli/src/main/resources/templates/ComponentCommand/result.txt deleted file mode 100644 index 8f2ebee8..00000000 --- a/java/alizer-cli/src/main/resources/templates/ComponentCommand/result.txt +++ /dev/null @@ -1,3 +0,0 @@ -{#for comp in result} -Component:{comp.path} Languages:{#for language in comp.languages}{language.name}{#if hasNext},{/if}{/for} -{/for} \ No newline at end of file diff --git a/java/alizer-cli/src/main/resources/templates/DevfileCommand/result.json b/java/alizer-cli/src/main/resources/templates/DevfileCommand/result.json deleted file mode 100644 index 7917dbc5..00000000 --- a/java/alizer-cli/src/main/resources/templates/DevfileCommand/result.json +++ /dev/null @@ -1,7 +0,0 @@ -{ "success": true{#if result != null},{/if} -{#if result != null} - "devfile": { - "name": "{result.name}" - } -{/if} -} \ No newline at end of file diff --git a/java/alizer-cli/src/main/resources/templates/DevfileCommand/result.txt b/java/alizer-cli/src/main/resources/templates/DevfileCommand/result.txt deleted file mode 100644 index 4922b60e..00000000 --- a/java/alizer-cli/src/main/resources/templates/DevfileCommand/result.txt +++ /dev/null @@ -1,5 +0,0 @@ -{#if result != null} -Devfile {result.name} matched -{#else} -No devfile found to match -{/if} \ No newline at end of file diff --git a/java/alizer-registry-support/pom.xml b/java/alizer-registry-support/pom.xml deleted file mode 100644 index 252f11ab..00000000 --- a/java/alizer-registry-support/pom.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - alizer - com.redhat.devtools.alizer - 0.2.0-SNAPSHOT - - 4.0.0 - - alizer-registry-support - - - - com.fasterxml.jackson.core - jackson-databind - 2.11.3 - - - org.junit.jupiter - junit-jupiter-engine - 5.7.1 - test - - - - \ No newline at end of file diff --git a/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileMetadata.java b/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileMetadata.java deleted file mode 100644 index 73f9c87c..00000000 --- a/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileMetadata.java +++ /dev/null @@ -1,168 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.registry.support; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - * Represent an entry in the registry index. - * @see https://github.com/devfile/registry-support/blob/master/index/generator/schema/schema.go - */ -@JsonIgnoreProperties(ignoreUnknown = true) -public class DevfileMetadata { - @JsonProperty("name") - private String name; - - @JsonProperty("version") - private String version; - - @JsonProperty("attributes") - private Map attributes = Collections.emptyMap(); - - @JsonProperty("displayName") - private String displayName; - - @JsonProperty("description") - private String description; - - @JsonProperty("tags") - private List tags = Collections.emptyList(); - - @JsonProperty("icon") - private String icon; - - @JsonProperty("globalMemoryLimit") - private String globalMemoryLimit; - - @JsonProperty("projectType") - private String projectType; - - @JsonProperty("language") - private String language; - - @JsonProperty("links") - private Map links = Collections.emptyMap(); - - @JsonProperty("resources") - private List resources = Collections.emptyList(); - - @JsonProperty("starterProjects") - private List starterProjects = Collections.emptyList(); - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public Map getAttributes() { - return attributes; - } - - public void setAttributes(Map attributes) { - this.attributes = attributes; - } - - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public String getIcon() { - return icon; - } - - public void setIcon(String icon) { - this.icon = icon; - } - - public String getGlobalMemoryLimit() { - return globalMemoryLimit; - } - - public void setGlobalMemoryLimit(String globalMemoryLimit) { - this.globalMemoryLimit = globalMemoryLimit; - } - - public String getProjectType() { - return projectType; - } - - public void setProjectType(String projectType) { - this.projectType = projectType; - } - - public String getLanguage() { - return language; - } - - public void setLanguage(String language) { - this.language = language; - } - - public Map getLinks() { - return links; - } - - public void setLinks(Map links) { - this.links = links; - } - - public List getResources() { - return resources; - } - - public void setResources(List resources) { - this.resources = resources; - } - - public List getStarterProjects() { - return starterProjects; - } - - public void setStarterProjects(List starterProjects) { - this.starterProjects = starterProjects; - } -} diff --git a/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileMetadataProvider.java b/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileMetadataProvider.java deleted file mode 100644 index 84a8adec..00000000 --- a/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileMetadataProvider.java +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.registry.support; - -import java.util.List; - -public interface DevfileMetadataProvider { - List getDevfileMetada(); -} diff --git a/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileRegistryMetadataProvider.java b/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileRegistryMetadataProvider.java deleted file mode 100644 index fb20ead3..00000000 --- a/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileRegistryMetadataProvider.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.registry.support; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; - -public class DevfileRegistryMetadataProvider implements DevfileMetadataProvider { - private final List urls; - private List devfileMetadata; - - public DevfileRegistryMetadataProvider(List urls) { - this.urls = urls; - } - - private void load() { - devfileMetadata = new ArrayList<>(); - for(String url : urls) { - try { - new DevfileRegistryProxy(url).collect(devfileMetadata); - } catch (IOException e) {} - } - } - - @Override - public List getDevfileMetada() { - if (devfileMetadata == null) { - load(); - } - return devfileMetadata; - } -} diff --git a/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileRegistryMetadataProviderBuilder.java b/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileRegistryMetadataProviderBuilder.java deleted file mode 100644 index 53e01db5..00000000 --- a/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileRegistryMetadataProviderBuilder.java +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.registry.support; - -import java.util.ArrayList; -import java.util.List; - -public class DevfileRegistryMetadataProviderBuilder { - private List urls = new ArrayList<>(); - - public DevfileRegistryMetadataProviderBuilder withURL(String url) { - urls.add(url); - return this; - } - - public DevfileRegistryMetadataProviderBuilder withURLs(List urls) { - this.urls = urls; - return this; - } - - public DevfileMetadataProvider build() { - return new DevfileRegistryMetadataProvider(urls); - } -} diff --git a/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileRegistryProxy.java b/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileRegistryProxy.java deleted file mode 100644 index 10c3abfc..00000000 --- a/java/alizer-registry-support/src/main/java/com/redhat/devtools/alizer/registry/support/DevfileRegistryProxy.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.registry.support; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.List; - -public class DevfileRegistryProxy { - private static final ObjectMapper MAPPER = new ObjectMapper(); - private static final String INDEX_PATH = "index"; - private static final String DEVFILES_INDEX_JSON = "blob/HEAD/devfiles/index.json"; - private final String url; - - public DevfileRegistryProxy(String url) { - this.url = url; - } - - private static String append(String url, String path) { - if (url.endsWith("/")) { - return url + path; - } else { - return url + '/' + path; - } - } - - private static String adapt(String url) throws MalformedURLException { - url = url.replaceFirst("^https://github.com/(.*)/blob/(.*)$", - "https://raw.githubusercontent.com/$1/$2"); - - url = url.replaceFirst("^https://gitlab.com/(.*)/-/blob/(.*)$", - "https://gitlab.com/$1/-/raw/$2"); - - url = url.replaceFirst("^https://bitbucket.org/(.*)/src/(.*)$", - "https://bitbucket.org/$1/raw/$2"); - return url; - } - - public void collect(List devfileMetadata) throws IOException { - try { - URL u = new URL(adapt(append(url, INDEX_PATH))); - MAPPER.readValue(u.openStream(), new TypeReference>(){}).forEach(devfile -> devfileMetadata.add(devfile)); - } catch (IOException e) { - URL u = new URL(adapt(append(url, DEVFILES_INDEX_JSON))); - MAPPER.readValue(u.openStream(), new TypeReference>(){}).forEach(devfile -> devfileMetadata.add(devfile)); - } - } -} diff --git a/java/alizer-registry-support/src/test/java/com/redhat/devtools/alizer/registry/support/RegistryProxyTest.java b/java/alizer-registry-support/src/test/java/com/redhat/devtools/alizer/registry/support/RegistryProxyTest.java deleted file mode 100644 index b0b0cb36..00000000 --- a/java/alizer-registry-support/src/test/java/com/redhat/devtools/alizer/registry/support/RegistryProxyTest.java +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.alizer.registry.support; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class RegistryProxyTest { - @Test - void checkDevfileRegistry() throws IOException { - DevfileRegistryProxy proxy = new DevfileRegistryProxy("https://registry.devfile.io"); - List devfiles = new ArrayList<>(); - proxy.collect(devfiles); - assertFalse(devfiles.isEmpty()); - } - - @Test - void checkQuarkusDevfileRegistry() throws IOException { - DevfileRegistryProxy proxy = new DevfileRegistryProxy("https://registry.devfile.io"); - List devfiles = new ArrayList<>(); - proxy.collect(devfiles); - DevfileMetadata devfile = devfiles.stream().filter(file -> file.getName().equals("java-quarkus")).findFirst().get(); - assertFalse(devfile.getVersion().isEmpty()); - Assertions.assertEquals("Quarkus Java", devfile.getDisplayName()); - Assertions.assertFalse(devfile.getDescription().isEmpty()); - assertFalse(devfile.getTags().isEmpty()); - assertEquals("quarkus", devfile.getProjectType().toLowerCase()); - assertEquals("java", devfile.getLanguage().toLowerCase()); - assertFalse(devfile.getLinks().isEmpty()); - assertTrue(devfile.getLinks().containsKey("self")); - assertFalse(devfile.getResources().isEmpty()); - assertFalse(devfile.getStarterProjects().isEmpty()); - } - - @Test - void checkOdoRegistry() throws IOException { - DevfileRegistryProxy proxy = new DevfileRegistryProxy("https://github.com/odo-devfiles/registry"); - List devfiles = new ArrayList<>(); - proxy.collect(devfiles); - assertFalse(devfiles.isEmpty()); - } - - @Test - void checkQuarkusOdoRegistry() throws IOException { - DevfileRegistryProxy proxy = new DevfileRegistryProxy("https://github.com/odo-devfiles/registry"); - List devfiles = new ArrayList<>(); - proxy.collect(devfiles); - DevfileMetadata devfile = devfiles.stream().filter(file -> file.getName().equals("java-quarkus")).findFirst().get(); - assertNull(devfile.getVersion()); - Assertions.assertEquals("Quarkus Java", devfile.getDisplayName()); - Assertions.assertFalse(devfile.getDescription().isEmpty()); - assertFalse(devfile.getTags().isEmpty()); - assertEquals("quarkus", devfile.getProjectType().toLowerCase()); - assertEquals("java", devfile.getLanguage().toLowerCase()); - assertFalse(devfile.getLinks().isEmpty()); - assertTrue(devfile.getLinks().containsKey("self")); - assertTrue(devfile.getResources().isEmpty()); - assertTrue(devfile.getStarterProjects().isEmpty()); - } -} diff --git a/java/mvnw b/java/mvnw deleted file mode 100755 index 41c0f0c2..00000000 --- a/java/mvnw +++ /dev/null @@ -1,310 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you 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. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Maven Start Up Batch script -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# M2_HOME - location of maven2's installed home dir -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "`uname`" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - export JAVA_HOME="`/usr/libexec/java_home`" - else - export JAVA_HOME="/Library/Java/Home" - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` - fi -fi - -if [ -z "$M2_HOME" ] ; then - ## resolve links - $0 may be a link to maven's home - PRG="$0" - - # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG="`dirname "$PRG"`/$link" - fi - done - - saveddir=`pwd` - - M2_HOME=`dirname "$PRG"`/.. - - # make it fully qualified - M2_HOME=`cd "$M2_HOME" && pwd` - - cd "$saveddir" - # echo Using m2 at $M2_HOME -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --unix "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$M2_HOME" ] && - M2_HOME="`(cd "$M2_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then - if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" - else - javaExecutable="`readlink -f \"$javaExecutable\"`" - fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="`which java`" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=`cd "$wdir/.."; pwd` - fi - # end of workaround - done - echo "${basedir}" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" - fi -} - -BASE_DIR=`find_maven_basedir "$(pwd)"` -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found .mvn/wrapper/maven-wrapper.jar" - fi -else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." - fi - if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - else - jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - fi - while IFS="=" read key value; do - case "$key" in (wrapperUrl) jarUrl="$value"; break ;; - esac - done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $jarUrl" - fi - wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" - if $cygwin; then - wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` - fi - - if command -v wget > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found wget ... using wget" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" - else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found curl ... using curl" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl -o "$wrapperJarPath" "$jarUrl" -f - else - curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f - fi - - else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Falling back to using Java to download" - fi - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaClass=`cygpath --path --windows "$javaClass"` - fi - if [ -e "$javaClass" ]; then - if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Compiling MavenWrapperDownloader.java ..." - fi - # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaClass") - fi - if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - # Running the downloader - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Running MavenWrapperDownloader.java ..." - fi - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR -fi -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -exec "$JAVACMD" \ - $MAVEN_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/java/mvnw.cmd b/java/mvnw.cmd deleted file mode 100644 index 86115719..00000000 --- a/java/mvnw.cmd +++ /dev/null @@ -1,182 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Maven Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - -FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %DOWNLOAD_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause - -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% - -exit /B %ERROR_CODE% diff --git a/java/pom.xml b/java/pom.xml deleted file mode 100644 index f5fd4910..00000000 --- a/java/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - 4.0.0 - - - org.jboss - jboss-parent - 37 - - - com.redhat.devtools.alizer - alizer - pom - 0.2.0-SNAPSHOT - - - https://github.com/redhat-developer/alizer - scm:git:git@github.com:redhat-developer/alizer.git - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 - true - - https://repository.jboss.org/nexus/ - ${jboss.releases.repo.id} - - - - - - - alizer-api - alizer-cli - alizer-registry-support - - diff --git a/js/Jenkinsfile b/js/Jenkinsfile deleted file mode 100644 index e54693cc..00000000 --- a/js/Jenkinsfile +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env groovy - -node('rhel8') { - stage('Checkout repo') { - deleteDir() - git url: "https://github.com/${params.FORK}/alizer.git", branch: params.BRANCH - } - - stage('Install requirements') { - def nodeHome = tool 'nodejs-12.13.1' - env.PATH = "${nodeHome}/bin:${env.PATH}" - } - - dir('js') { - stage('Build') { - sh "npm install" - sh "npm run compile" - } - - stage('Test') { - sh "npm run test" - } - - def packageJson = readJSON file: 'package.json' - - stage('Package') { - sh "npm pack" - def packs = findFiles(glob: '**.tgz') - def packName = "redhat-developer-alizer-${packageJson.version}-${env.BUILD_NUMBER}.tgz" - sh "mv ${packs[0].name} ${packName}" - sh "ln -s ${packName} redhat-developer-alizer-latest.tgz" - } - - if (params.UPLOAD_LOCATION) { - stage('Snapshot') { - def filesToPush = findFiles(glob: '**.tgz') - for (i = 0; i < filesToPush.length; i++) { - sh "rsync -Pzrlt --rsh=ssh --protocol=28 ${filesToPush[i].path} ${UPLOAD_LOCATION}/snapshots/alizer/" - } - } - } - - if (publish.equals('true')) { - stage('Publish to NPM') { - withCredentials([[$class: 'StringBinding', credentialsId: 'npm-token', variable: 'TOKEN']]) { - sh "echo registry=https://registry.npmjs.com > .npmrc" - sh "echo //registry.npmjs.com/:_authToken=${TOKEN} >> .npmrc" - sh "npm publish --access=public" - } - currentBuild.keepLog = true - currentBuild.description = "${packageJson.version}.${env.BUILD_NUMBER}" - } - } - } - -} diff --git a/js/README.md b/js/README.md deleted file mode 100644 index 27b48f1c..00000000 --- a/js/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Alizer - NPM Package - -## Usage -*DEPRECATION WARNING: This implementation is out of date and it will be deprecated soon* - -Alizer also offers a NPM package providing helpers for recognize languages/frameworks in a project. It still doesn't support devfile selection. -The syntax is the following: -```js -import * as recognizer from '@redhat-developer/alizer'; - -..... - -const languages = await recognizer.detectLanguages('my_project_folder'); - -..... - -``` -The result is an ordered list of information for each language detected in the source tree, with the following informations: -- *name*: the name of the detected language -- *aliases*: other names which identify the detected language -- *builder*: tools that used to build the application -- *frameworks*: a list of detected frameworks (Quarkus, Flash,...) used by the application. - -export interface DevfileType { - getName(): string; - getLanguage(): string; - getProjectType(): string; - getTags(): string[]; -} - -The NMP package -```js -import * as recognizer from '@redhat-developer/alizer'; - -..... - -const devfile = await recognizer.selectDevFileFromTypes('my_project_folder'); - -..... - -``` -The result is an ordered list of information for each language detected in the source tree, with the following informations: -- *name*: the name of the detected language. -- *language*: name of the language associated with the devfile. -- *projectType*: type of project associated with the devfile. -- *tags*: list of tags associated with the devfile. \ No newline at end of file diff --git a/js/package-lock.json b/js/package-lock.json deleted file mode 100644 index 40b6a5b9..00000000 --- a/js/package-lock.json +++ /dev/null @@ -1,2450 +0,0 @@ -{ - "name": "@redhat-developer/alizer", - "version": "0.0.1", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "@redhat-developer/alizer", - "version": "0.0.1", - "license": "MIT", - "dependencies": { - "glob-gitignore": "^1.0.14", - "js-yaml": "^3.14.0" - }, - "devDependencies": { - "@types/mocha": "^8.2.2", - "@types/node": "^14.14.7", - "@types/sinon": "^10.0.2", - "copyfiles": "^2.4.1", - "mocha": "^9.0.1", - "sinon": "^11.1.1", - "typescript": "^4.0.5" - } - }, - "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", - "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@sinonjs/samsam": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz", - "integrity": "sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "node_modules/@types/mocha": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz", - "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==", - "dev": true - }, - "node_modules/@types/node": { - "version": "14.14.7", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/sinon": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.2.tgz", - "integrity": "sha512-BHn8Bpkapj8Wdfxvh2jWIUoaYB/9/XhsL0oOvBfRagJtKlSl9NWPcFOz2lRukI9szwGxFtYZCTejJSqsGDbdmw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinonjs/fake-timers": "^7.1.0" - } - }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/balanced-match": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "node_modules/camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.1" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "license": "MIT" - }, - "node_modules/copyfiles": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", - "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", - "dev": true, - "dependencies": { - "glob": "^7.0.5", - "minimatch": "^3.0.3", - "mkdirp": "^1.0.4", - "noms": "0.0.0", - "through2": "^2.0.1", - "untildify": "^4.0.0", - "yargs": "^16.1.0" - }, - "bin": { - "copyfiles": "copyfiles", - "copyup": "copyfiles" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-gitignore": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/glob-gitignore/-/glob-gitignore-1.0.14.tgz", - "integrity": "sha512-YuAEPqL58bOQDqDF2kMv009rIjSAtPs+WPzyGbwRWK+wD0UWQVRoP34Pz6yJ6ivco65C9tZnaIt0I3JCuQ8NZQ==", - "dependencies": { - "glob": "^7.1.3", - "ignore": "^5.0.5", - "lodash.difference": "^4.5.0", - "lodash.union": "^4.6.0", - "make-array": "^1.0.5", - "util.inherits": "^1.0.3" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "engines": { - "node": ">=4.x" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "engines": { - "node": ">= 4" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "node_modules/js-yaml": { - "version": "3.14.0", - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.difference": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=" - }, - "node_modules/lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "node_modules/lodash.union": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", - "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-array": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/make-array/-/make-array-1.0.5.tgz", - "integrity": "sha512-sgK2SAzxT19rWU+qxKUcn6PAh/swiIiz2F8C2cZjLc1z4iwYIfdoihqFIDQ8BDzAGtWPYJ6Sr13K1j/DXynDLA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/minimatch": { - "version": "3.0.4", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.0.1.tgz", - "integrity": "sha512-9zwsavlRO+5csZu6iRtl3GHImAbhERoDsZwdRkdJ/bE+eVplmoxNKE901ZJ9LdSchYBjSCPbjKc5XvcAri2ylw==", - "dev": true, - "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.1", - "debug": "4.3.1", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.1.7", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "3.0.4", - "ms": "2.1.3", - "nanoid": "3.1.23", - "serialize-javascript": "5.0.1", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.1.4", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.1.23", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", - "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/nise": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz", - "integrity": "sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^7.0.4", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node_modules/noms": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", - "integrity": "sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "~1.0.31" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "dependencies": { - "isarray": "0.0.1" - } - }, - "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/serialize-javascript": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/sinon": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.1.tgz", - "integrity": "sha512-ZSSmlkSyhUWbkF01Z9tEbxZLF/5tRC9eojCdFh33gtQaP7ITQVaMWQHGuFM7Cuf/KEfihuh1tTl3/ABju3AQMg==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^7.1.0", - "@sinonjs/samsam": "^6.0.2", - "diff": "^5.0.0", - "nise": "^5.1.0", - "supports-color": "^7.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "license": "BSD-3-Clause" - }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/through2/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "node_modules/through2/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/through2/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/through2/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/typescript": { - "version": "4.0.5", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/util.inherits": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/util.inherits/-/util.inherits-1.0.3.tgz", - "integrity": "sha1-qcYmoNBtNIKdR7pWyrEnjXRfnOY=", - "engines": { - "node": ">=4" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/workerpool": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.4.tgz", - "integrity": "sha512-jGWPzsUqzkow8HoAvqaPWTUPCrlPJaJ5tY8Iz7n1uCz3tTp6s3CDG0FF1NsX42WNlkRSW6Mr+CDZGnNoSsKa7g==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "license": "ISC" - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", - "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@sinonjs/samsam": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz", - "integrity": "sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "@types/mocha": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz", - "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==", - "dev": true - }, - "@types/node": { - "version": "14.14.7", - "dev": true - }, - "@types/sinon": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.2.tgz", - "integrity": "sha512-BHn8Bpkapj8Wdfxvh2jWIUoaYB/9/XhsL0oOvBfRagJtKlSl9NWPcFOz2lRukI9szwGxFtYZCTejJSqsGDbdmw==", - "dev": true, - "requires": { - "@sinonjs/fake-timers": "^7.1.0" - } - }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "argparse": { - "version": "1.0.10", - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "balanced-match": { - "version": "1.0.0" - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true - }, - "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", - "dev": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" - } - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "concat-map": { - "version": "0.0.1" - }, - "copyfiles": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", - "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", - "dev": true, - "requires": { - "glob": "^7.0.5", - "minimatch": "^3.0.3", - "mkdirp": "^1.0.4", - "noms": "0.0.0", - "through2": "^2.0.1", - "untildify": "^4.0.0", - "yargs": "^16.1.0" - } - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "esprima": { - "version": "4.0.1" - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0" - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-gitignore": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/glob-gitignore/-/glob-gitignore-1.0.14.tgz", - "integrity": "sha512-YuAEPqL58bOQDqDF2kMv009rIjSAtPs+WPzyGbwRWK+wD0UWQVRoP34Pz6yJ6ivco65C9tZnaIt0I3JCuQ8NZQ==", - "requires": { - "glob": "^7.1.3", - "ignore": "^5.0.5", - "lodash.difference": "^4.5.0", - "lodash.union": "^4.6.0", - "make-array": "^1.0.5", - "util.inherits": "^1.0.3" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" - }, - "inflight": { - "version": "1.0.6", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4" - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "js-yaml": { - "version": "3.14.0", - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "lodash.difference": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=" - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "lodash.union": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", - "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=" - }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, - "make-array": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/make-array/-/make-array-1.0.5.tgz", - "integrity": "sha512-sgK2SAzxT19rWU+qxKUcn6PAh/swiIiz2F8C2cZjLc1z4iwYIfdoihqFIDQ8BDzAGtWPYJ6Sr13K1j/DXynDLA==" - }, - "minimatch": { - "version": "3.0.4", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, - "mocha": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.0.1.tgz", - "integrity": "sha512-9zwsavlRO+5csZu6iRtl3GHImAbhERoDsZwdRkdJ/bE+eVplmoxNKE901ZJ9LdSchYBjSCPbjKc5XvcAri2ylw==", - "dev": true, - "requires": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.1", - "debug": "4.3.1", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.1.7", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "3.0.4", - "ms": "2.1.3", - "nanoid": "3.1.23", - "serialize-javascript": "5.0.1", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.1.4", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "nanoid": { - "version": "3.1.23", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", - "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", - "dev": true - }, - "nise": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz", - "integrity": "sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^7.0.4", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "noms": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", - "integrity": "sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "~1.0.31" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "once": { - "version": "1.4.0", - "requires": { - "wrappy": "1" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1" - }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "requires": { - "isarray": "0.0.1" - } - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "serialize-javascript": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "sinon": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.1.tgz", - "integrity": "sha512-ZSSmlkSyhUWbkF01Z9tEbxZLF/5tRC9eojCdFh33gtQaP7ITQVaMWQHGuFM7Cuf/KEfihuh1tTl3/ABju3AQMg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^7.1.0", - "@sinonjs/samsam": "^6.0.2", - "diff": "^5.0.0", - "nise": "^5.1.0", - "supports-color": "^7.2.0" - } - }, - "sprintf-js": { - "version": "1.0.3" - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "typescript": { - "version": "4.0.5", - "dev": true - }, - "untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.inherits": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/util.inherits/-/util.inherits-1.0.3.tgz", - "integrity": "sha1-qcYmoNBtNIKdR7pWyrEnjXRfnOY=" - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "workerpool": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.4.tgz", - "integrity": "sha512-jGWPzsUqzkow8HoAvqaPWTUPCrlPJaJ5tY8Iz7n1uCz3tTp6s3CDG0FF1NsX42WNlkRSW6Mr+CDZGnNoSsKa7g==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2" - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true - }, - "yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "requires": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - } - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true - } - } -} diff --git a/js/package.json b/js/package.json deleted file mode 100644 index 3c8f0482..00000000 --- a/js/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "@redhat-developer/alizer", - "version": "0.0.1", - "description": "", - "main": "lib/src/recognizer.js", - "scripts": { - "compile": "tsc -p . && npm run copy-files", - "clean": "rm -rf lib || rmdir lib /s /q", - "build": "npm run clean && npm run compile", - "copy-files": "copyfiles ../resources/languages.yml ./lib/src/resources", - "test": "npm run clean && npm run compile && mocha ./lib/test/recognizer.test.js" - }, - "author": "Red Hat", - "license": "MIT", - "dependencies": { - "glob-gitignore": "^1.0.14", - "js-yaml": "^3.14.0" - }, - "devDependencies": { - "@types/mocha": "^8.2.2", - "@types/node": "^14.14.7", - "@types/sinon": "^10.0.2", - "copyfiles": "^2.4.1", - "mocha": "^9.0.1", - "sinon": "^11.1.1", - "typescript": "^4.0.5" - } -} diff --git a/js/src/constants.ts b/js/src/constants.ts deleted file mode 100644 index a0835298..00000000 --- a/js/src/constants.ts +++ /dev/null @@ -1,22 +0,0 @@ -/*----------------------------------------------------------------------------------------------- - * Copyright (c) Red Hat, Inc. All rights reserved. - * Licensed under the MIT License. See LICENSE file in the project root for license information. - *-----------------------------------------------------------------------------------------------*/ -export const JAVA = 'java'; - -export const GRADLE = 'gradle'; -export const MAVEN = 'maven'; -export const ANT = 'ant'; - -export const QUARKUS = 'quarkus'; -export const SPRINGBOOT = 'springboot'; -export const OPENLIBERTY = 'openliberty'; -export const MICRONAUT = 'micronaut'; - - -export const PYTHON = 'python'; - -export const DJANGO = "django"; - -export const FRAMEWORK_WEIGHT = 10; -export const TOOL_WEIGHT = 5; diff --git a/js/src/javaRecognizer.ts b/js/src/javaRecognizer.ts deleted file mode 100644 index 569e09e7..00000000 --- a/js/src/javaRecognizer.ts +++ /dev/null @@ -1,61 +0,0 @@ -/*----------------------------------------------------------------------------------------------- - * Copyright (c) Red Hat, Inc. All rights reserved. - * Licensed under the MIT License. See LICENSE file in the project root for license information. - *-----------------------------------------------------------------------------------------------*/ -import path = require("path"); -import { ANT, GRADLE, JAVA, MAVEN, MICRONAUT, OPENLIBERTY, QUARKUS, SPRINGBOOT } from "./constants"; -import { Language } from "./types"; -import { isTagInFile } from "./utils"; - -export async function getJava(files: string[]): Promise { - const language: Language = { - name: JAVA - }; - // check builder - const gradle = files.filter(file => path.basename(file).toLowerCase() === 'build.gradle')[0]; - const maven = files.filter(file => path.basename(file).toLowerCase() === 'pom.xml')[0]; - const ant = files.filter(file => path.basename(file).toLowerCase() === 'build.xml')[0]; - - if (gradle) { - language.builder = GRADLE; - language.frameworks = await getJavaFrameworks(gradle, GRADLE); - } else if (maven) { - language.builder = MAVEN; - language.frameworks = await getJavaFrameworks(maven, MAVEN); - } else if (ant) { - language.builder = ANT; - } - - return language; -} - -async function getJavaFrameworks(configFile: string, builder: string): Promise { - const frameworks: string[] = []; - const hasQuarkus = await hasDependency(configFile, 'io.quarkus', builder); - if (hasQuarkus) { - frameworks.push(QUARKUS); - } - const hasSpring = await hasDependency(configFile, 'org.springframework', builder); - if (hasSpring) { - frameworks.push(SPRINGBOOT); - } - const hasOpenLiberty = await hasDependency(configFile, 'io.openliberty', builder); - if (hasOpenLiberty) { - frameworks.push(OPENLIBERTY); - } - const hasMicronaut = await hasDependency(configFile, 'io.micronaut', builder); - if (hasMicronaut) { - frameworks.push(MICRONAUT); - } - return frameworks; -} - -async function hasDependency(configFile: string, tag: string, builder: string): Promise { - if (builder === GRADLE) { - return await isTagInFile(configFile, tag); - } else if (builder === MAVEN) { - return await isTagInFile(configFile, tag); - } - - return false; -} diff --git a/js/src/pythonRecognizer.ts b/js/src/pythonRecognizer.ts deleted file mode 100644 index 5349adf2..00000000 --- a/js/src/pythonRecognizer.ts +++ /dev/null @@ -1,29 +0,0 @@ -/*----------------------------------------------------------------------------------------------- - * Copyright (c) Red Hat, Inc. All rights reserved. - * Licensed under the MIT License. See LICENSE file in the project root for license information. - *-----------------------------------------------------------------------------------------------*/ -import path = require("path"); -import { DJANGO, PYTHON } from "./constants"; -import { Language } from "./types"; - -export async function getPython(files: string[]): Promise { - return { - name: PYTHON, - frameworks: await getPythonFrameworks(files) - }; -} - -async function getPythonFrameworks(files: string[]): Promise { - const frameworks: string[] = []; - - const manage = files.filter(file => path.basename(file).toLowerCase() === 'manage.py')[0]; - const urls = files.filter(file => path.basename(file).toLowerCase() === 'urls.py')[0]; - const wsgi = files.filter(file => path.basename(file).toLowerCase() === 'wsgi.py')[0]; - const asgi = files.filter(file => path.basename(file).toLowerCase() === 'asgi.py')[0]; - - if (manage || urls || wsgi || asgi) { - frameworks.push(DJANGO); - } - - return frameworks; -} diff --git a/js/src/recognizer.ts b/js/src/recognizer.ts deleted file mode 100644 index affd9074..00000000 --- a/js/src/recognizer.ts +++ /dev/null @@ -1,150 +0,0 @@ -/*----------------------------------------------------------------------------------------------- - * Copyright (c) Red Hat, Inc. All rights reserved. - * Licensed under the MIT License. See LICENSE file in the project root for license information. - *-----------------------------------------------------------------------------------------------*/ - -import * as jsyaml from 'js-yaml'; -import {promises as fs} from 'fs'; -import * as path from 'path'; -import { glob } from 'glob-gitignore'; -import { DevfileType, Language } from './types'; -import { FRAMEWORK_WEIGHT, JAVA, PYTHON, TOOL_WEIGHT } from './constants'; -import { getJava } from './javaRecognizer'; -import { getPython } from './pythonRecognizer'; - - -export async function selectDevFileFromTypes(root: string, devfileTypes: DevfileType[]) { - const languages = await detectLanguages(root); - for (const language of languages) { - const devfileTypesPickedUsingLanguage = devfileTypes - .map(devfileType => { - return { - score: computeLanguageScore(language, devfileType), - devfileType - }; - }) - .filter(devfileType => devfileType.score > 0) - .sort((a, b) => b.score - a.score); - if (devfileTypesPickedUsingLanguage.length > 0) { - return devfileTypesPickedUsingLanguage[0].devfileType; - } - } - return; -} - -function computeLanguageScore(language: Language, devfileType: DevfileType) { - let score = 0; - if (devfileType.getLanguage() === language.name || matches(devfileType.getLanguage(), language.aliases)) { - score++; - if (devfileType.getProjectType() && matches(devfileType.getProjectType(), language.frameworks)) { - score += FRAMEWORK_WEIGHT; - } - const tags = devfileType.getTags(); - if (tags && tags.length > 0) { - tags.forEach(tag => { - if (matches(tag, language.frameworks)) { - score += FRAMEWORK_WEIGHT; - } - if (language.builder === tag) { - score += TOOL_WEIGHT; - } - }); - } - } - return score; -} - -function matches(value: string, list?: string[]) { - value = value.toLowerCase(); - return list && list.filter(s => s.toLowerCase() === value).length > 0; -} - -export async function detectLanguages(root: string): Promise { - if (!root) { - throw new Error('The project root is not valid'); - } - - const YAMLFileWithAllLanguages = await fs.readFile(path.join(__dirname, 'resources', 'languages.yml'), 'utf-8'); - const allLanguages = jsyaml.safeLoad(YAMLFileWithAllLanguages); - - const allFilesFromRoot = await getFiles(root); - - const extensionOccurrences = allFilesFromRoot.reduce((acc, curr) => { - curr = `.${curr.split('.').pop()}`; - if (!acc[curr]) { - acc[curr] = 1; - } else { - acc[curr] += 1; - } - return acc; - }, {}); - - const languagesFiltered = {}; - - for (const [language, attributes] of Object.entries(allLanguages)) { - if (attributes.hasOwnProperty('type') && - attributes.hasOwnProperty('extensions') && - (attributes as any).type === 'programming') { - let languageOccurrence = (attributes as any).extensions - .filter(element => Object.keys(extensionOccurrences).indexOf(element) !== -1) - .reduce((acc, curr) => acc + extensionOccurrences[curr], 0); - if (languageOccurrence !== 0) { - languagesFiltered[language] = { - aliases: (attributes as any).aliases, - occurrence: languageOccurrence - } - } - } - } - - const languagesDetected: Language[] = []; - for(const language of Object.entries(languagesFiltered).sort(([_k1, v1], [_k2, v2]) => (v2 as number)-(v1 as number))) { - languagesDetected.push({ - aliases: (language[1] as any).aliases, - ...await getDetailedLanguage(language[0], allFilesFromRoot) - }); - } - return languagesDetected; - -} - -async function getDetailedLanguage(language: string, files: string[]): Promise { - language = language.toLowerCase(); - switch (language) { - case JAVA: { - return await getJava(files); - } - case PYTHON: { - return await getPython(files); - } - default: { - return { - name: language - }; - } - } -} - -async function getFiles(root: string): Promise { - const ignores = await getIgnores(root); - const searchResult = await glob(`**`, {cwd: root, ignore: ignores}); - return searchResult.map(it => path.join(root, it)); -} - -async function getIgnores(root: string): Promise { - const ignorePath = path.join(root, '.gitignore'); - let ignores = []; - try{ - const stat = await fs.stat(ignorePath); - if(stat){ - const ignoreContent = await fs.readFile(ignorePath, {encoding: 'utf-8'}); - if(ignoreContent) { - ignores = ignoreContent.split('\n').filter(it => it && !it.trim().startsWith('#')); - } - } - - } catch (err) { - //file doesn't exist - } - return ignores; -} diff --git a/js/src/types.ts b/js/src/types.ts deleted file mode 100644 index 3ed04a33..00000000 --- a/js/src/types.ts +++ /dev/null @@ -1,17 +0,0 @@ -/*----------------------------------------------------------------------------------------------- - * Copyright (c) Red Hat, Inc. All rights reserved. - * Licensed under the MIT License. See LICENSE file in the project root for license information. - *-----------------------------------------------------------------------------------------------*/ -export interface Language { - name: string; - aliases?: string[]; - builder?: string; - frameworks?: string[]; -} - -export interface DevfileType { - getName(): string; - getLanguage(): string; - getProjectType(): string; - getTags(): string[]; -} diff --git a/js/src/utils.ts b/js/src/utils.ts deleted file mode 100644 index a15ab349..00000000 --- a/js/src/utils.ts +++ /dev/null @@ -1,10 +0,0 @@ -/*----------------------------------------------------------------------------------------------- - * Copyright (c) Red Hat, Inc. All rights reserved. - * Licensed under the MIT License. See LICENSE file in the project root for license information. - *-----------------------------------------------------------------------------------------------*/ -import {promises as fs} from 'fs'; - -export async function isTagInFile(file: string, tag: string): Promise { - const content = await fs.readFile(file) - return content.includes(tag); -} diff --git a/js/test/recognizer.test.ts b/js/test/recognizer.test.ts deleted file mode 100644 index cf5c2cf3..00000000 --- a/js/test/recognizer.test.ts +++ /dev/null @@ -1,88 +0,0 @@ -import path = require('path'); -import { assert } from 'sinon'; -import { JAVA, PYTHON } from '../src/constants'; -import * as recognizer from '../src/recognizer'; -import { DevfileType } from '../src/types'; - -describe('Recognizer', () => { - - const devfileTypes: DevfileType[] = []; - - before(() => { - devfileTypes.push(createDevfileType("java-maven", "java", "java", ["Java", "Maven"])); - devfileTypes.push(createDevfileType("java", "java", "java")); - devfileTypes.push(createDevfileType("java-quarkus", "java", "quarkus", ["Java", "Quarkus"])); - devfileTypes.push(createDevfileType("java-spring", "java", "spring", ["Java", "Spring"])); - devfileTypes.push(createDevfileType("java-vertx", "java", "vertx", ["Java", "Vert.x"])); - devfileTypes.push(createDevfileType("java-wildfly-bootable", "java", "wildfly", ["RHEL8", "Java", "OpenJDK", "Maven", "WildFly", "Microprofile", "WildFly Bootable"])); - devfileTypes.push(createDevfileType("java-wildfly", "java", "wildfly", ["Java", "WildFly"])); - devfileTypes.push(createDevfileType("nodejs", "nodejs", "nodejs", ["NodeJS", "Express", "ubi8"])); - devfileTypes.push(createDevfileType("python-django", "python", "django", ["Python", "pip", "Django"])); - devfileTypes.push(createDevfileType("python", "python", "python", ["Python", "pip"])); - }); - - function createDevfileType(name: string, language: string, projectType: string, tags?: string[]): DevfileType { - return { - getName: () => name, - getLanguage: () => language, - getProjectType: () => projectType, - getTags: () => tags - }; - } - - it('TestMyself', async () => { - const languages = await recognizer.detectLanguages('.'); - assert.match(languages.some(l => l.name === 'javascript'), true); - }); - - it('testJAVAMetaDevFile', async () => { - const devFile = recognizer.selectDevFileFromTypes(path.join(__dirname, '..', '..', '..', 'resources/projects/micronaut'), devfileTypes); - assert.match((await devFile).getName(), 'java-maven'); - }); - - it('TestQuarkus', async () => { - const languages = await recognizer.detectLanguages(path.join(__dirname, '..', '..', '..', 'resources/projects/quarkus')); - assert.match(languages.some(l => l.name === JAVA), true); - }); - - it('testQuarkusDevFileType', async () => { - const devFile = recognizer.selectDevFileFromTypes(path.join(__dirname, '..', '..', '..', 'resources/projects/quarkus'), devfileTypes); - assert.match((await devFile).getName(), 'java-quarkus'); - }); - - it('TestMicronaut', async () => { - const languages = await recognizer.detectLanguages(path.join(__dirname, '..', '..', '..', 'resources/projects/micronaut')); - assert.match(languages.some(l => l.name === JAVA), true); - }); - - it('testMicronautDevFile', async () => { - const devFile = recognizer.selectDevFileFromTypes(path.join(__dirname, '..', '..', '..', 'resources/projects/micronaut'), devfileTypes); - assert.match((await devFile).getName(), 'java-maven'); - }); - - it('TestNode', async () => { - const languages = await recognizer.detectLanguages(path.join(__dirname, '..', '..', '..', 'resources/projects/nodejs-ex')); - assert.match(languages.some(l => l.name === 'javascript'), true); - }); - - it('testNodeDevFile', async () => { - const devFile = recognizer.selectDevFileFromTypes(path.join(__dirname, '..', '..', '..', 'resources/projects/nodejs-ex'), devfileTypes); - assert.match((await devFile).getName(), 'nodejs'); - }); - - it('TestDjango', async () => { - const languages = await recognizer.detectLanguages(path.join(__dirname, '..', '..', '..', 'resources/projects/django')); - assert.match(languages.some(l => l.name === PYTHON), true); - }); - - it('testDjangoDevFile', async () => { - const devFile = recognizer.selectDevFileFromTypes(path.join(__dirname, '..', '..', '..', 'resources/projects/django'), devfileTypes); - assert.match((await devFile).getName(), 'python-django'); - }); - - it('TestWithoutGitIgnore', async () => { - const languages = await recognizer.detectLanguages(path.join(__dirname, '..', '..', '..', 'resources/projects/simple')); - assert.match(languages.some(l => l.name === 'javascript'), true); - }); - -}); diff --git a/js/tsconfig.json b/js/tsconfig.json deleted file mode 100644 index e01f30a2..00000000 --- a/js/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "target": "ES6", - "module": "commonjs", - "declaration": true, - "lib": [ - "ES2017" - ], - "outDir": "lib", - "rootDir": ".", - "strictPropertyInitialization": false, - "sourceMap": true, - "noUnusedLocals": true - }, - "exclude": [ - "node_modules" - ] -} \ No newline at end of file