-
-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10878 from murdos/extensible-npm-version-source
Extensible npm version source
- Loading branch information
Showing
36 changed files
with
246 additions
and
180 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
...in/java/tech/jhipster/lite/generator/client/angular/core/domain/AngularModuleFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...n/java/tech/jhipster/lite/generator/client/react/core/domain/ReactCoreModulesFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../tech/jhipster/lite/generator/client/react/security/jwt/domain/ReactJwtModuleFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...main/java/tech/jhipster/lite/generator/client/svelte/core/domain/SvelteModuleFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/tech/jhipster/lite/generator/init/domain/InitModuleFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/tech/jhipster/lite/generator/prettier/domain/PrettierModuleFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...generator/server/springboot/thymeleaf/template/domain/ThymeleafTemplateModuleFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ain/java/tech/jhipster/lite/generator/typescript/core/domain/TypescriptModuleFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/tech/jhipster/lite/module/domain/npm/JHLiteNpmVersionSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package tech.jhipster.lite.module.domain.npm; | ||
|
||
/** | ||
* {@link NpmVersionSource} that are handled by JHipster Lite. | ||
*/ | ||
public enum JHLiteNpmVersionSource implements NpmVersionSourceFactory { | ||
COMMON("common"), | ||
ANGULAR("angular"), | ||
REACT("react"), | ||
SVELTE("svelte"), | ||
VUE("vue"); | ||
|
||
private final String source; | ||
|
||
JHLiteNpmVersionSource(String source) { | ||
this.source = source; | ||
} | ||
|
||
@Override | ||
public NpmVersionSource build() { | ||
return new NpmVersionSource(source); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 11 additions & 6 deletions
17
src/main/java/tech/jhipster/lite/module/domain/npm/NpmVersionSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
package tech.jhipster.lite.module.domain.npm; | ||
|
||
public enum NpmVersionSource { | ||
COMMON, | ||
ANGULAR, | ||
REACT, | ||
SVELTE, | ||
VUE, | ||
import tech.jhipster.lite.shared.error.domain.Assert; | ||
|
||
public record NpmVersionSource(String name) { | ||
public NpmVersionSource { | ||
Assert.notBlank("name", name); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return name; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/tech/jhipster/lite/module/domain/npm/NpmVersionSourceFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package tech.jhipster.lite.module.domain.npm; | ||
|
||
@FunctionalInterface | ||
public interface NpmVersionSourceFactory { | ||
NpmVersionSource build(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.