Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

feat: return multiple devfiles when having multiple components #116

Merged
merged 8 commits into from
Jan 24, 2023

Conversation

lstocchi
Copy link
Collaborator

@lstocchi lstocchi commented Dec 12, 2022

it resolves #114 #117

This patch contains some improvements to solve the issue faced with the quarkus super heroes ui app.

  • it checks devDependencies to search for the framework
  • it accepts multiple components detection in same path (e.g java and typescript in the root)
  • it adds a new method to retrieve a list of devfiles for the project
  • JavaScript and TypeScript are considered equivalent when picking a devfile. So a ts devfile is valid for a js project and viceversa.

The ouput of the quarkus super heroes ui app is

[
        {
                "Name": "java-maven",
                "Language": "Java",
                "ProjectType": "Maven",
                "Tags": [
                        "Java",
                        "Maven"
                ]
        },
        {
                "Name": "java-openliberty",
                "Language": "Java",
                "ProjectType": "Open Liberty",
                "Tags": [
                        "Java",
                        "Maven"
                ]
        },
        {
                "Name": "java-websphereliberty",
                "Language": "Java",
                "ProjectType": "WebSphere Liberty",
                "Tags": [
                        "Java",
                        "Maven",
                        "WebSphere Liberty"
                ]
        },
        {
                "Name": "java-wildfly-bootable-jar",
                "Language": "Java",
                "ProjectType": "WildFly",
                "Tags": [
                        "RHEL8",
                        "Java",
                        "OpenJDK",
                        "Maven",
                        "WildFly",
                        "Microprofile",
                        "WildFly Bootable"
                ]
        },
        {
                "Name": "nodejs",
                "Language": "JavaScript",
                "ProjectType": "Node.js",
                "Tags": [
                        "Node.js",
                        "Express",
                        "ubi8"
                ]
        },
        {
                "Name": "nodejs-angular",
                "Language": "TypeScript",
                "ProjectType": "Angular",
                "Tags": [
                        "Node.js",
                        "Angular"
                ]
        }
]

@lstocchi lstocchi changed the title feat: enhance detection by giving priorities to framework based component feat: return multiple devfiles when having multiple components Dec 15, 2022
@lstocchi lstocchi marked this pull request as ready for review December 15, 2022 12:59
@lstocchi lstocchi requested review from jeffmaury and kadel December 15, 2022 12:59
@lstocchi lstocchi requested a review from jeffmaury January 16, 2023 09:01
Copy link
Member

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…nent

Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
@lstocchi lstocchi merged commit f78e274 into redhat-developer:main Jan 24, 2023
@lstocchi lstocchi deleted the i114 branch January 24, 2023 14:10
@lstocchi
Copy link
Collaborator Author

@kadel now alizer provides the functions that return a list of devfiles. You just need to use the proper function (just add an s to devfile keyword.)
E.g

SelectDevFileFromRegistry -> SelectDevFilesFromRegistry
SelectDevFileUsingLanguagesFromTypes -> SelectDevFilesUsingLanguagesFromTypes
SelectDevFileFromTypes -> SelectDevFilesFromTypes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants