@eui/cli 15.4.1 → 15.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.version.properties +1 -1
- package/LICENSE +296 -296
- package/README.md +26 -26
- package/bin/eui-cli.js +70 -70
- package/lib/build.js +153 -153
- package/lib/cli.js +111 -111
- package/lib/config.js +54 -54
- package/lib/generators.js +64 -64
- package/lib/install.js +54 -54
- package/lib/maven-build/build.xml +115 -115
- package/lib/maven-build/pom.xml +64 -64
- package/lib/post-build.js +33 -33
- package/lib/skeletons/_angular/base/.browserslistrc +16 -16
- package/lib/skeletons/_angular/base/.editorconfig +16 -16
- package/lib/skeletons/_angular/base/.euirc.json +8 -8
- package/lib/skeletons/_angular/base/.stylelintrc +24 -24
- package/lib/skeletons/_angular/base/README.md +26 -26
- package/lib/skeletons/_angular/base/angular.json +176 -176
- package/lib/skeletons/_angular/base/gitignore_TO_REPLACE +50 -50
- package/lib/skeletons/_angular/base/mock/app/models/user.js +8 -8
- package/lib/skeletons/_angular/base/mock/app/routes/index.js +5 -5
- package/lib/skeletons/_angular/base/mock/app/routes/user_routes.js +24 -24
- package/lib/skeletons/_angular/base/mock/db/db.json +12 -12
- package/lib/skeletons/_angular/base/mock/server.js +21 -21
- package/lib/skeletons/_angular/base/package.json +24 -24
- package/lib/skeletons/_angular/base/proxy-mock.conf.json +6 -6
- package/lib/skeletons/_angular/base/proxy.conf.json +6 -6
- package/lib/skeletons/_angular/base/src/.eslintrc.json +118 -118
- package/lib/skeletons/_angular/base/src/app/app-routing.module.ts +17 -17
- package/lib/skeletons/_angular/base/src/app/app-starter.service.ts +66 -66
- package/lib/skeletons/_angular/base/src/app/app.component.html +29 -29
- package/lib/skeletons/_angular/base/src/app/app.component.ts +51 -51
- package/lib/skeletons/_angular/base/src/app/app.module.ts +35 -35
- package/lib/skeletons/_angular/base/src/app/core/core.module.ts +87 -87
- package/lib/skeletons/_angular/base/src/app/core/reducers/index.ts +31 -31
- package/lib/skeletons/_angular/base/src/app/features/home/home-routing.module.ts +15 -15
- package/lib/skeletons/_angular/base/src/app/features/home/home.component.html +39 -39
- package/lib/skeletons/_angular/base/src/app/features/home/home.component.ts +11 -11
- package/lib/skeletons/_angular/base/src/app/features/home/home.module.ts +18 -18
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page1/page1.component.html +7 -7
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page1/page1.component.ts +7 -7
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page2/page2.component.html +7 -7
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page2/page2.component.ts +7 -7
- package/lib/skeletons/_angular/base/src/app/features/module1/module1-routing.module.ts +18 -18
- package/lib/skeletons/_angular/base/src/app/features/module1/module1.component.html +7 -7
- package/lib/skeletons/_angular/base/src/app/features/module1/module1.component.ts +8 -8
- package/lib/skeletons/_angular/base/src/app/features/module1/module1.module.ts +21 -21
- package/lib/skeletons/_angular/base/src/app/features/module2/module2-routing.module.ts +16 -16
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.component.html +7 -7
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.component.ts +7 -7
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.module.ts +17 -17
- package/lib/skeletons/_angular/base/src/app/shared/shared.module.ts +45 -45
- package/lib/skeletons/_angular/base/src/app/shared/testing/router.mock.ts +18 -18
- package/lib/skeletons/_angular/base/src/assets/config/env-json-config-dev.json +8 -8
- package/lib/skeletons/_angular/base/src/assets/config/env-json-config-prod.json +8 -8
- package/lib/skeletons/_angular/base/src/assets/config/env-json-config.json +7 -7
- package/lib/skeletons/_angular/base/src/assets/i18n/en.json +6 -6
- package/lib/skeletons/_angular/base/src/assets/i18n/fr.json +6 -6
- package/lib/skeletons/_angular/base/src/config/global.ts +20 -20
- package/lib/skeletons/_angular/base/src/config/index.ts +8 -8
- package/lib/skeletons/_angular/base/src/config/modules.ts +7 -7
- package/lib/skeletons/_angular/base/src/dummy.spec.ts +6 -6
- package/lib/skeletons/_angular/base/src/environments/environment.prod.ts +11 -11
- package/lib/skeletons/_angular/base/src/environments/environment.ts +11 -11
- package/lib/skeletons/_angular/base/src/index.html +21 -21
- package/lib/skeletons/_angular/base/src/karma.conf.js +7 -7
- package/lib/skeletons/_angular/base/src/main.ts +14 -14
- package/lib/skeletons/_angular/base/src/polyfills.ts +89 -89
- package/lib/skeletons/_angular/base/src/styles.scss +1 -1
- package/lib/skeletons/_angular/base/src/tsconfig.app.json +18 -18
- package/lib/skeletons/_angular/base/src/tsconfig.spec.json +14 -14
- package/lib/skeletons/_angular/base/tsconfig.json +27 -27
- package/lib/skeletons/_angular/base-mobile/angular.json +160 -160
- package/lib/skeletons/_angular/base-mobile/ionic.config.json +5 -5
- package/lib/skeletons/_angular/base-mobile/ngsw-config.json +33 -33
- package/lib/skeletons/_angular/base-mobile/package.json +28 -28
- package/lib/skeletons/_angular/base-mobile/src/app/app-routing.module.ts +17 -17
- package/lib/skeletons/_angular/base-mobile/src/app/app-starter.service.ts +73 -73
- package/lib/skeletons/_angular/base-mobile/src/app/app.component.html +27 -27
- package/lib/skeletons/_angular/base-mobile/src/app/app.component.ts +55 -55
- package/lib/skeletons/_angular/base-mobile/src/app/app.module.ts +44 -44
- package/lib/skeletons/_angular/base-mobile/src/app/core/core.module.ts +89 -89
- package/lib/skeletons/_angular/base-mobile/src/app/core/reducers/index.ts +31 -31
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home-routing.module.ts +15 -15
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home.component.html +14 -14
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home.component.ts +11 -11
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home.module.ts +18 -18
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page1/page1.component.html +11 -11
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page1/page1.component.ts +7 -7
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page2/page2.component.html +11 -11
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page2/page2.component.ts +7 -7
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1-routing.module.ts +18 -18
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1.component.html +15 -15
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1.component.ts +17 -17
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1.module.ts +21 -21
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2-routing.module.ts +16 -16
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2.component.html +11 -11
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2.component.ts +7 -7
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2.module.ts +17 -17
- package/lib/skeletons/_angular/base-mobile/src/app/shared/shared.module.ts +16 -16
- package/lib/skeletons/_angular/base-mobile/src/app/shared/testing/router.mock.ts +18 -18
- package/lib/skeletons/_angular/base-mobile/src/index.html +27 -27
- package/lib/skeletons/_angular/base-mobile/src/manifest.webmanifest +51 -51
- package/lib/skeletons/_angular/base-mobile/src/tsconfig.app.json +19 -19
- package/lib/skeletons/_angular/options/ecl/angular.json +193 -193
- package/lib/skeletons/_angular/options/ecl/src/app/app.component.html +262 -262
- package/lib/skeletons/_angular/options/ecl/src/app/app.component.ts +59 -59
- package/lib/skeletons/_angular/options/ecl/src/app/features/home/home.component.html +70 -70
- package/lib/skeletons/_angular/options/ecl/src/app/features/module1/components/page1/page1.component.html +1 -1
- package/lib/skeletons/_angular/options/ecl/src/app/features/module1/components/page2/page2.component.html +1 -1
- package/lib/skeletons/_angular/options/ecl/src/app/features/module1/module1.component.html +1 -1
- package/lib/skeletons/_angular/options/ecl/src/app/features/module2/module2.component.html +1 -1
- package/lib/skeletons/_angular/options/ecl/src/app/shared/shared.module.ts +19 -19
- package/lib/skeletons/_angular/options/ecl/src/config/global.ts +20 -20
- package/lib/skeletons/_angular/options/openid-jwt/package.json +22 -22
- package/lib/skeletons/_angular/options/openid-jwt/src/app/core/core.module.ts +94 -94
- package/lib/skeletons/_angular/options/openid-jwt/src/assets/config/env-json-config-dev.json +24 -24
- package/lib/skeletons/_angular/options/openid-jwt/src/assets/config/env-json-config-local-mock.json +10 -10
- package/lib/skeletons/_angular/options/openid-jwt/src/assets/config/env-json-config-local.json +23 -23
- package/lib/skeletons/_angular/options/openid-jwt/src/assets/config/env-json-config-prod.json +23 -23
- package/lib/skeletons/_angular/options/openid-jwt/src/assets/config/env-json-config.json +10 -10
- package/lib/skeletons/_angular/options/openid-jwt/src/environments/environment.prod.ts +11 -11
- package/lib/skeletons/_angular/options/openid-jwt/src/environments/environment.ts +11 -11
- package/lib/skeletons/_angular/options/openid-jwt/src/index.html +21 -21
- package/lib/skeletons/web-maven/package.json +17 -17
- package/lib/skeletons/web-maven/pom.xml +55 -55
- package/lib/skeletons/web-maven/src/main/java/eu/europa/ec/digit/eui/angular2clistarter/servlet/SpringWebApplicationInitializer.java +22 -22
- package/lib/skeletons/web-maven/src/main/java/eu/europa/ec/digit/eui/angular2clistarter/spring/SpringRestConfiguration.java +24 -24
- package/lib/skeletons/web-maven/src/main/java/eu/europa/ec/digit/eui/angular2clistarter/spring/rest/UserDetailsResource.java +23 -23
- package/lib/skeletons/web-maven/src/main/resources/ecas-config-application-name.xml +7 -7
- package/lib/skeletons/web-maven/src/main/webapp/WEB-INF/dispatcher-servlet.xml +10 -10
- package/lib/skeletons/web-maven/src/main/webapp/WEB-INF/web.xml +38 -38
- package/lib/skeletons/web-maven/src/main/webapp/WEB-INF/weblogic.xml +15 -15
- package/lib/skeletons/web-maven/src/main/webapp/index.jsp +29 -29
- package/lib/skeletons/web-spring-boot/myapp-web/pom.xml +77 -77
- package/lib/skeletons/web-spring-boot/myapp-web-rest/pom.xml +84 -84
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/MyappApplication.java +46 -46
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/domain/Address.java +65 -65
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/domain/Building.java +44 -44
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/repositories/BuildingRepository.java +10 -10
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/BuildingResource.java +26 -26
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/SwaggerConfig.java +20 -20
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/support/HateoasPageableHandlerMethodArgumentResolver.java +45 -45
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/support/HypermediaSupport.java +25 -25
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/support/PageJsonSerializer.java +17 -17
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/security/CachingPreventionFilter.java +29 -29
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/security/CsrfPreventionFilter.java +35 -35
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/security/FakeAuthenticationFilter.java +372 -372
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/security/SecurityConfig.java +47 -47
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/services/BuildingSearchCriteria.java +25 -25
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/services/BuildingService.java +9 -9
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/services/BuildingServiceImpl.java +25 -25
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/resources/data.sql +10 -10
- package/lib/skeletons/web-spring-boot/pom.xml +30 -30
- package/lib/skeletons/web-symfony/myapp-web/angular.json +170 -170
- package/lib/skeletons/web-symfony/myapp-web/package.json +23 -23
- package/lib/skeletons/web-symfony/myapp-web/src/app/app-routing.module.ts +18 -18
- package/lib/skeletons/web-symfony/myapp-web/src/app/app.component.ts +77 -77
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.html +160 -160
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.ts +104 -104
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/models/product.model.ts +6 -6
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/products-routing.module.ts +16 -16
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/products.module.ts +16 -16
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/services/products.service.ts +29 -29
- package/lib/skeletons/web-symfony/myapp-web/src/environments/environment.ts +17 -17
- package/lib/skeletons/web-symfony/myapp-web-rest/.env +28 -28
- package/lib/skeletons/web-symfony/myapp-web-rest/bin/console +42 -42
- package/lib/skeletons/web-symfony/myapp-web-rest/composer.json +67 -67
- package/lib/skeletons/web-symfony/myapp-web-rest/composer.lock +3572 -3572
- package/lib/skeletons/web-symfony/myapp-web-rest/config/bootstrap.php +21 -21
- package/lib/skeletons/web-symfony/myapp-web-rest/config/bundles.php +12 -12
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/cache.yaml +19 -19
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/dev/routing.yaml +3 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/doctrine.yaml +29 -29
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/doctrine_migrations.yaml +5 -5
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/framework.yaml +17 -17
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/prod/doctrine.yaml +32 -32
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/routing.yaml +4 -4
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/sensio_framework_extra.yaml +3 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/test/framework.yaml +4 -4
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/test/routing.yaml +3 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/twig.yaml +4 -4
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes/annotations.yaml +3 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes/dev/twig.yaml +3 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes.yaml +3 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/services.yaml +27 -27
- package/lib/skeletons/web-symfony/myapp-web-rest/public/index.php +27 -27
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Controller/ProductController.php +196 -196
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Entity/Product.php +99 -99
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Kernel.php +53 -53
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Migrations/Version20190604101623.php +31 -31
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Migrations/Version20190604101638.php +35 -35
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Repository/ProductRepository.php +51 -51
- package/lib/skeletons/web-symfony/myapp-web-rest/symfony.lock +274 -274
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/base.html.twig +12 -12
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/product/index.html.twig +20 -20
- package/lib/utils.js +17 -17
- package/package.json +3 -3
package/bin/eui-cli.js
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const tools = require('@eui/tools/scripts/utils/tools');
|
|
4
|
-
const chalk = require('chalk');
|
|
5
|
-
const figlet = require('figlet');
|
|
6
|
-
const path = require('path');
|
|
7
|
-
const generators = require('../lib/generators');
|
|
8
|
-
const config = require('../lib/config');
|
|
9
|
-
|
|
10
|
-
// fetching cli arguments
|
|
11
|
-
const args = tools.getArgs();
|
|
12
|
-
|
|
13
|
-
// Print header and version
|
|
14
|
-
console.info(
|
|
15
|
-
'\n\n',
|
|
16
|
-
chalk.yellow(figlet.textSync('eUI CLI', { horizontalLayout: 'full' })),
|
|
17
|
-
chalk.green(`\n v${config.version}\n`)
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
// remapping config if passed as argument - automated mode
|
|
21
|
-
var inputConfig = config.parseInputConfig(args.config);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// Detecting targetPath and create it if present as argument - local and automated mode
|
|
25
|
-
let targetPath;
|
|
26
|
-
|
|
27
|
-
if (args.targetPath) {
|
|
28
|
-
targetPath = path.join(config.targetPath, args.targetPath);
|
|
29
|
-
|
|
30
|
-
if (args.m) {
|
|
31
|
-
targetPath = path.join(targetPath, 'packages');
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (!tools.isDirExists(targetPath)) {
|
|
35
|
-
tools.mkdir(targetPath);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// otherwise taking the default config targetPath defined
|
|
39
|
-
} else {
|
|
40
|
-
if (args.m) {
|
|
41
|
-
targetPath = path.join(config.targetPath, 'packages');
|
|
42
|
-
|
|
43
|
-
} else {
|
|
44
|
-
targetPath = config.targetPath;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (args.v) {
|
|
49
|
-
console.info('Current eUI CLI version installed : ' + config.version);
|
|
50
|
-
|
|
51
|
-
// } else if (args.m) {
|
|
52
|
-
// // module/sub-package generator
|
|
53
|
-
// return generators.moduleGenerate({
|
|
54
|
-
// inputConfig: inputConfig,
|
|
55
|
-
// targetPath: targetPath
|
|
56
|
-
// });
|
|
57
|
-
|
|
58
|
-
// } else if (args.f) {
|
|
59
|
-
// return generators.featureGenerate({
|
|
60
|
-
// inputConfig: inputConfig,
|
|
61
|
-
// targetPath: targetPath
|
|
62
|
-
// });
|
|
63
|
-
|
|
64
|
-
} else {
|
|
65
|
-
// Application generator
|
|
66
|
-
return generators.appGenerate({
|
|
67
|
-
inputConfig: inputConfig,
|
|
68
|
-
targetPath: targetPath
|
|
69
|
-
});
|
|
70
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const tools = require('@eui/tools/scripts/utils/tools');
|
|
4
|
+
const chalk = require('chalk');
|
|
5
|
+
const figlet = require('figlet');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const generators = require('../lib/generators');
|
|
8
|
+
const config = require('../lib/config');
|
|
9
|
+
|
|
10
|
+
// fetching cli arguments
|
|
11
|
+
const args = tools.getArgs();
|
|
12
|
+
|
|
13
|
+
// Print header and version
|
|
14
|
+
console.info(
|
|
15
|
+
'\n\n',
|
|
16
|
+
chalk.yellow(figlet.textSync('eUI CLI', { horizontalLayout: 'full' })),
|
|
17
|
+
chalk.green(`\n v${config.version}\n`)
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
// remapping config if passed as argument - automated mode
|
|
21
|
+
var inputConfig = config.parseInputConfig(args.config);
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
// Detecting targetPath and create it if present as argument - local and automated mode
|
|
25
|
+
let targetPath;
|
|
26
|
+
|
|
27
|
+
if (args.targetPath) {
|
|
28
|
+
targetPath = path.join(config.targetPath, args.targetPath);
|
|
29
|
+
|
|
30
|
+
if (args.m) {
|
|
31
|
+
targetPath = path.join(targetPath, 'packages');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (!tools.isDirExists(targetPath)) {
|
|
35
|
+
tools.mkdir(targetPath);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// otherwise taking the default config targetPath defined
|
|
39
|
+
} else {
|
|
40
|
+
if (args.m) {
|
|
41
|
+
targetPath = path.join(config.targetPath, 'packages');
|
|
42
|
+
|
|
43
|
+
} else {
|
|
44
|
+
targetPath = config.targetPath;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (args.v) {
|
|
49
|
+
console.info('Current eUI CLI version installed : ' + config.version);
|
|
50
|
+
|
|
51
|
+
// } else if (args.m) {
|
|
52
|
+
// // module/sub-package generator
|
|
53
|
+
// return generators.moduleGenerate({
|
|
54
|
+
// inputConfig: inputConfig,
|
|
55
|
+
// targetPath: targetPath
|
|
56
|
+
// });
|
|
57
|
+
|
|
58
|
+
// } else if (args.f) {
|
|
59
|
+
// return generators.featureGenerate({
|
|
60
|
+
// inputConfig: inputConfig,
|
|
61
|
+
// targetPath: targetPath
|
|
62
|
+
// });
|
|
63
|
+
|
|
64
|
+
} else {
|
|
65
|
+
// Application generator
|
|
66
|
+
return generators.appGenerate({
|
|
67
|
+
inputConfig: inputConfig,
|
|
68
|
+
targetPath: targetPath
|
|
69
|
+
});
|
|
70
|
+
}
|
package/lib/build.js
CHANGED
|
@@ -1,153 +1,153 @@
|
|
|
1
|
-
const tools = require('@eui/tools/scripts/utils/tools');
|
|
2
|
-
const configUtils = require('@eui/tools/scripts/csdr/config/config-utils');
|
|
3
|
-
const gitUtils = require('@eui/tools/scripts/utils/git-utils');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const fs = require('fs');
|
|
6
|
-
const utils = require('./utils');
|
|
7
|
-
const config = require('./config');
|
|
8
|
-
const childProcess = require("child_process");
|
|
9
|
-
const replace = require('replace-in-file');
|
|
10
|
-
const execa = require('execa');
|
|
11
|
-
const execSync = childProcess.execSync;
|
|
12
|
-
|
|
13
|
-
module.exports.start = (options) => {
|
|
14
|
-
return Promise.resolve()
|
|
15
|
-
.then(() => {
|
|
16
|
-
return build(options.config, options.targetPath)
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
.catch((e) => {
|
|
20
|
-
throw e;
|
|
21
|
-
})
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const build = (cliConfig, targetPath) => {
|
|
25
|
-
let {appName, appType, appSubType, tag, groupId, artifactId, ...args} = cliConfig;
|
|
26
|
-
|
|
27
|
-
console.log(`Building app : ${appType}`);
|
|
28
|
-
|
|
29
|
-
return Promise.resolve()
|
|
30
|
-
.then(() => {
|
|
31
|
-
let target = targetPath;
|
|
32
|
-
console.log(`--cleaning target : ${target}`);
|
|
33
|
-
|
|
34
|
-
if (!tools.isDirEmpty(target)) {
|
|
35
|
-
tools.logError(`Target directory : ${target} is not empty, execute eUI CLI in a blank directory... quitting`);
|
|
36
|
-
throw new Error('DIR_NOT_EMPTY');
|
|
37
|
-
} else {
|
|
38
|
-
return tools.rimraf(`${target}/**/*`);
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
.then(() => {
|
|
43
|
-
|
|
44
|
-
// BUILD ANGULAR
|
|
45
|
-
if (appType === 'angular' || appType === 'mobile') {
|
|
46
|
-
return Promise.resolve()
|
|
47
|
-
.then(() => {
|
|
48
|
-
console.log('---building angular');
|
|
49
|
-
const angularPath = utils.getAngularPath(targetPath, appName, appType, artifactId);
|
|
50
|
-
console.log(angularPath);
|
|
51
|
-
return copyAngular(angularPath, cliConfig, true);
|
|
52
|
-
})
|
|
53
|
-
.catch((e) => {
|
|
54
|
-
throw e;
|
|
55
|
-
})
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// BUILD web-maven
|
|
59
|
-
if (appType === 'web-maven') {
|
|
60
|
-
return Promise.resolve()
|
|
61
|
-
.then(() => {
|
|
62
|
-
console.log('--building web-maven');
|
|
63
|
-
return tools.copydir(config.webMavenPath, targetPath);
|
|
64
|
-
})
|
|
65
|
-
.then(() => {
|
|
66
|
-
const angularPath = utils.getAngularPath(targetPath, appName, appType);
|
|
67
|
-
return copyAngular(angularPath, cliConfig);
|
|
68
|
-
})
|
|
69
|
-
.catch((e) => {
|
|
70
|
-
throw e;
|
|
71
|
-
})
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// BUILD web-spring-boot
|
|
75
|
-
if (appType === 'web-spring-boot') {
|
|
76
|
-
return Promise.resolve()
|
|
77
|
-
.then(() => {
|
|
78
|
-
console.log('--building web-spring-boot');
|
|
79
|
-
return execSync(`mvn generate-sources -f ./maven-build/pom.xml -Pbuild-web-spring-boot -Dsrc.path=${config.webSpringBootPath} -Dtarget.path=${targetPath} -Dapp.group.id=${groupId} -Dapp.artifact.id=${artifactId}`, {
|
|
80
|
-
cwd: path.join(__dirname),
|
|
81
|
-
stdio: "inherit"
|
|
82
|
-
});
|
|
83
|
-
})
|
|
84
|
-
.then(() => {
|
|
85
|
-
const angularPath = utils.getAngularPath(targetPath, appName, appType, artifactId);
|
|
86
|
-
return copyAngular(angularPath, cliConfig, false);
|
|
87
|
-
})
|
|
88
|
-
.catch((e) => {
|
|
89
|
-
throw e;
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
// BUILD symfony
|
|
95
|
-
if (appType === 'web-symfony') {
|
|
96
|
-
|
|
97
|
-
return Promise.resolve()
|
|
98
|
-
.then(() => {
|
|
99
|
-
console.log('--cloning eui php starter repository')
|
|
100
|
-
execa.shellSync(`git clone https://${config.webPhpStarterRepo} ${targetPath}`);
|
|
101
|
-
})
|
|
102
|
-
.then(() => {
|
|
103
|
-
console.log('--building web-symfony');
|
|
104
|
-
const angularPath = utils.getAngularPath(targetPath, appName, appType, artifactId);
|
|
105
|
-
return copyAngular(angularPath, cliConfig, false);
|
|
106
|
-
})
|
|
107
|
-
.then(() => {
|
|
108
|
-
execa.shellSync(`npm run init`, { cwd: path.join(targetPath, 'server'), stdio: "inherit" });
|
|
109
|
-
})
|
|
110
|
-
.catch((e) => {
|
|
111
|
-
throw e;
|
|
112
|
-
})
|
|
113
|
-
.finally(() => {
|
|
114
|
-
return tools.rimraf(`${targetPath}/.git`);
|
|
115
|
-
})
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
})
|
|
119
|
-
.catch((e) => {
|
|
120
|
-
console.log(e);
|
|
121
|
-
throw e;
|
|
122
|
-
})
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const copyAngular = (targetPath, cliConfig, overwrite = true) => {
|
|
129
|
-
return Promise.resolve()
|
|
130
|
-
.then(() => {
|
|
131
|
-
const {angularBasePath} = config;
|
|
132
|
-
const sourcePath = angularBasePath;
|
|
133
|
-
|
|
134
|
-
return tools.copydir(sourcePath, targetPath, overwrite);
|
|
135
|
-
})
|
|
136
|
-
.then(() => {
|
|
137
|
-
if (cliConfig.appType === 'mobile') {
|
|
138
|
-
return tools.copydir(config.angularBaseMobilePath, targetPath);
|
|
139
|
-
}
|
|
140
|
-
})
|
|
141
|
-
.then(() => {
|
|
142
|
-
if (cliConfig.appOptions && cliConfig.appOptions.length !== 0) {
|
|
143
|
-
cliConfig.appOptions.forEach((item) => {
|
|
144
|
-
console.log('Applying option : ' + item);
|
|
145
|
-
tools.copydir(config.optionsPath[item], targetPath, true);
|
|
146
|
-
})
|
|
147
|
-
}
|
|
148
|
-
return Promise.resolve();
|
|
149
|
-
})
|
|
150
|
-
.catch((e) => {
|
|
151
|
-
throw e;
|
|
152
|
-
})
|
|
153
|
-
}
|
|
1
|
+
const tools = require('@eui/tools/scripts/utils/tools');
|
|
2
|
+
const configUtils = require('@eui/tools/scripts/csdr/config/config-utils');
|
|
3
|
+
const gitUtils = require('@eui/tools/scripts/utils/git-utils');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const utils = require('./utils');
|
|
7
|
+
const config = require('./config');
|
|
8
|
+
const childProcess = require("child_process");
|
|
9
|
+
const replace = require('replace-in-file');
|
|
10
|
+
const execa = require('execa');
|
|
11
|
+
const execSync = childProcess.execSync;
|
|
12
|
+
|
|
13
|
+
module.exports.start = (options) => {
|
|
14
|
+
return Promise.resolve()
|
|
15
|
+
.then(() => {
|
|
16
|
+
return build(options.config, options.targetPath)
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
.catch((e) => {
|
|
20
|
+
throw e;
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const build = (cliConfig, targetPath) => {
|
|
25
|
+
let {appName, appType, appSubType, tag, groupId, artifactId, ...args} = cliConfig;
|
|
26
|
+
|
|
27
|
+
console.log(`Building app : ${appType}`);
|
|
28
|
+
|
|
29
|
+
return Promise.resolve()
|
|
30
|
+
.then(() => {
|
|
31
|
+
let target = targetPath;
|
|
32
|
+
console.log(`--cleaning target : ${target}`);
|
|
33
|
+
|
|
34
|
+
if (!tools.isDirEmpty(target)) {
|
|
35
|
+
tools.logError(`Target directory : ${target} is not empty, execute eUI CLI in a blank directory... quitting`);
|
|
36
|
+
throw new Error('DIR_NOT_EMPTY');
|
|
37
|
+
} else {
|
|
38
|
+
return tools.rimraf(`${target}/**/*`);
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
.then(() => {
|
|
43
|
+
|
|
44
|
+
// BUILD ANGULAR
|
|
45
|
+
if (appType === 'angular' || appType === 'mobile') {
|
|
46
|
+
return Promise.resolve()
|
|
47
|
+
.then(() => {
|
|
48
|
+
console.log('---building angular');
|
|
49
|
+
const angularPath = utils.getAngularPath(targetPath, appName, appType, artifactId);
|
|
50
|
+
console.log(angularPath);
|
|
51
|
+
return copyAngular(angularPath, cliConfig, true);
|
|
52
|
+
})
|
|
53
|
+
.catch((e) => {
|
|
54
|
+
throw e;
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// BUILD web-maven
|
|
59
|
+
if (appType === 'web-maven') {
|
|
60
|
+
return Promise.resolve()
|
|
61
|
+
.then(() => {
|
|
62
|
+
console.log('--building web-maven');
|
|
63
|
+
return tools.copydir(config.webMavenPath, targetPath);
|
|
64
|
+
})
|
|
65
|
+
.then(() => {
|
|
66
|
+
const angularPath = utils.getAngularPath(targetPath, appName, appType);
|
|
67
|
+
return copyAngular(angularPath, cliConfig);
|
|
68
|
+
})
|
|
69
|
+
.catch((e) => {
|
|
70
|
+
throw e;
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// BUILD web-spring-boot
|
|
75
|
+
if (appType === 'web-spring-boot') {
|
|
76
|
+
return Promise.resolve()
|
|
77
|
+
.then(() => {
|
|
78
|
+
console.log('--building web-spring-boot');
|
|
79
|
+
return execSync(`mvn generate-sources -f ./maven-build/pom.xml -Pbuild-web-spring-boot -Dsrc.path=${config.webSpringBootPath} -Dtarget.path=${targetPath} -Dapp.group.id=${groupId} -Dapp.artifact.id=${artifactId}`, {
|
|
80
|
+
cwd: path.join(__dirname),
|
|
81
|
+
stdio: "inherit"
|
|
82
|
+
});
|
|
83
|
+
})
|
|
84
|
+
.then(() => {
|
|
85
|
+
const angularPath = utils.getAngularPath(targetPath, appName, appType, artifactId);
|
|
86
|
+
return copyAngular(angularPath, cliConfig, false);
|
|
87
|
+
})
|
|
88
|
+
.catch((e) => {
|
|
89
|
+
throw e;
|
|
90
|
+
})
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
// BUILD symfony
|
|
95
|
+
if (appType === 'web-symfony') {
|
|
96
|
+
|
|
97
|
+
return Promise.resolve()
|
|
98
|
+
.then(() => {
|
|
99
|
+
console.log('--cloning eui php starter repository')
|
|
100
|
+
execa.shellSync(`git clone https://${config.webPhpStarterRepo} ${targetPath}`);
|
|
101
|
+
})
|
|
102
|
+
.then(() => {
|
|
103
|
+
console.log('--building web-symfony');
|
|
104
|
+
const angularPath = utils.getAngularPath(targetPath, appName, appType, artifactId);
|
|
105
|
+
return copyAngular(angularPath, cliConfig, false);
|
|
106
|
+
})
|
|
107
|
+
.then(() => {
|
|
108
|
+
execa.shellSync(`npm run init`, { cwd: path.join(targetPath, 'server'), stdio: "inherit" });
|
|
109
|
+
})
|
|
110
|
+
.catch((e) => {
|
|
111
|
+
throw e;
|
|
112
|
+
})
|
|
113
|
+
.finally(() => {
|
|
114
|
+
return tools.rimraf(`${targetPath}/.git`);
|
|
115
|
+
})
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
})
|
|
119
|
+
.catch((e) => {
|
|
120
|
+
console.log(e);
|
|
121
|
+
throw e;
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
const copyAngular = (targetPath, cliConfig, overwrite = true) => {
|
|
129
|
+
return Promise.resolve()
|
|
130
|
+
.then(() => {
|
|
131
|
+
const {angularBasePath} = config;
|
|
132
|
+
const sourcePath = angularBasePath;
|
|
133
|
+
|
|
134
|
+
return tools.copydir(sourcePath, targetPath, overwrite);
|
|
135
|
+
})
|
|
136
|
+
.then(() => {
|
|
137
|
+
if (cliConfig.appType === 'mobile') {
|
|
138
|
+
return tools.copydir(config.angularBaseMobilePath, targetPath);
|
|
139
|
+
}
|
|
140
|
+
})
|
|
141
|
+
.then(() => {
|
|
142
|
+
if (cliConfig.appOptions && cliConfig.appOptions.length !== 0) {
|
|
143
|
+
cliConfig.appOptions.forEach((item) => {
|
|
144
|
+
console.log('Applying option : ' + item);
|
|
145
|
+
tools.copydir(config.optionsPath[item], targetPath, true);
|
|
146
|
+
})
|
|
147
|
+
}
|
|
148
|
+
return Promise.resolve();
|
|
149
|
+
})
|
|
150
|
+
.catch((e) => {
|
|
151
|
+
throw e;
|
|
152
|
+
})
|
|
153
|
+
}
|
package/lib/cli.js
CHANGED
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
const inquirer = require('inquirer');
|
|
2
|
-
|
|
3
|
-
const defaultConfig = {
|
|
4
|
-
appName: 'my-app',
|
|
5
|
-
appScope: '@app',
|
|
6
|
-
appType: 'angular',
|
|
7
|
-
appOptions: [],
|
|
8
|
-
appFeatures: [],
|
|
9
|
-
groupId: 'ec.europa.digit',
|
|
10
|
-
artifactId: 'myapp',
|
|
11
|
-
useYarn: true,
|
|
12
|
-
npmInstall: true,
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
module.exports.start = (options) => {
|
|
16
|
-
|
|
17
|
-
// if inputConfig is provided, we merge it with defaultConfig and return without CLI interactions
|
|
18
|
-
if (options.inputConfig) {
|
|
19
|
-
return {
|
|
20
|
-
...defaultConfig,
|
|
21
|
-
...options.inputConfig
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// CLI interactions
|
|
26
|
-
return Promise.resolve()
|
|
27
|
-
.then(() => {
|
|
28
|
-
return inquirer.prompt([
|
|
29
|
-
{
|
|
30
|
-
type: 'list',
|
|
31
|
-
name: 'appType',
|
|
32
|
-
message: 'Select an application type :',
|
|
33
|
-
choices: [
|
|
34
|
-
{ name: 'eUI Angular - Desktop', value: 'angular' },
|
|
35
|
-
{ name: 'eUI Angular - Mobile Ionic', value: 'mobile' },
|
|
36
|
-
{ name: 'eUI Angular + Spring Boot web module - JDK + Maven required !!!', value: 'web-spring-boot' },
|
|
37
|
-
{ name: 'eUI Angular + Maven web module (JEE Spring maven web module) - JDK + Maven required !!!', value: 'web-maven' },
|
|
38
|
-
{ name: 'eUI Angular + PHP/Symfony starter - PHP7 and composer required !!!', value: 'web-symfony' },
|
|
39
|
-
],
|
|
40
|
-
default: 0,
|
|
41
|
-
validate: function (value) {
|
|
42
|
-
if (value.length) {
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: 'groupId',
|
|
49
|
-
type: 'input',
|
|
50
|
-
message: 'Enter the groupId :',
|
|
51
|
-
default: defaultConfig.groupId,
|
|
52
|
-
validate: function (value) {
|
|
53
|
-
if (value.length) {
|
|
54
|
-
return true;
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
when: function (answers) {
|
|
58
|
-
return (answers.appType === 'web-spring-boot');
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
name: 'artifactId',
|
|
63
|
-
type: 'input',
|
|
64
|
-
message: 'Enter the artifactId :',
|
|
65
|
-
default: defaultConfig.artifactId,
|
|
66
|
-
validate: function (value) {
|
|
67
|
-
if (value.length) {
|
|
68
|
-
return true;
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
when: function (answers) {
|
|
72
|
-
return (answers.appType === 'web-spring-boot');
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
type: 'checkbox',
|
|
77
|
-
name: 'appOptions',
|
|
78
|
-
default: defaultConfig.appOptions,
|
|
79
|
-
message: 'Select one or more additional configuration options :',
|
|
80
|
-
choices: [
|
|
81
|
-
{ name: 'OpenId Connect JWT implementation', value: 'openid-jwt' },
|
|
82
|
-
{ name: 'ECL app-shell template and configuration - for ec.europa.eu apps', value: 'ecl' },
|
|
83
|
-
],
|
|
84
|
-
when: function (answers) {
|
|
85
|
-
return (answers.appType !== 'mobile');
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
{
|
|
90
|
-
name: 'npmInstall',
|
|
91
|
-
type: 'confirm',
|
|
92
|
-
message: 'Yarn install dependencies when the app is generated :',
|
|
93
|
-
default: defaultConfig.npmInstall
|
|
94
|
-
}
|
|
95
|
-
]);
|
|
96
|
-
})
|
|
97
|
-
.then((answers) => {
|
|
98
|
-
let outputConfig;
|
|
99
|
-
outputConfig = {
|
|
100
|
-
...defaultConfig,
|
|
101
|
-
...answers
|
|
102
|
-
};
|
|
103
|
-
console.log('--provided config : \n', outputConfig);
|
|
104
|
-
return outputConfig;
|
|
105
|
-
})
|
|
106
|
-
.catch((e) => {
|
|
107
|
-
throw e;
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
1
|
+
const inquirer = require('inquirer');
|
|
2
|
+
|
|
3
|
+
const defaultConfig = {
|
|
4
|
+
appName: 'my-app',
|
|
5
|
+
appScope: '@app',
|
|
6
|
+
appType: 'angular',
|
|
7
|
+
appOptions: [],
|
|
8
|
+
appFeatures: [],
|
|
9
|
+
groupId: 'ec.europa.digit',
|
|
10
|
+
artifactId: 'myapp',
|
|
11
|
+
useYarn: true,
|
|
12
|
+
npmInstall: true,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
module.exports.start = (options) => {
|
|
16
|
+
|
|
17
|
+
// if inputConfig is provided, we merge it with defaultConfig and return without CLI interactions
|
|
18
|
+
if (options.inputConfig) {
|
|
19
|
+
return {
|
|
20
|
+
...defaultConfig,
|
|
21
|
+
...options.inputConfig
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// CLI interactions
|
|
26
|
+
return Promise.resolve()
|
|
27
|
+
.then(() => {
|
|
28
|
+
return inquirer.prompt([
|
|
29
|
+
{
|
|
30
|
+
type: 'list',
|
|
31
|
+
name: 'appType',
|
|
32
|
+
message: 'Select an application type :',
|
|
33
|
+
choices: [
|
|
34
|
+
{ name: 'eUI Angular - Desktop', value: 'angular' },
|
|
35
|
+
{ name: 'eUI Angular - Mobile Ionic', value: 'mobile' },
|
|
36
|
+
{ name: 'eUI Angular + Spring Boot web module - JDK + Maven required !!!', value: 'web-spring-boot' },
|
|
37
|
+
{ name: 'eUI Angular + Maven web module (JEE Spring maven web module) - JDK + Maven required !!!', value: 'web-maven' },
|
|
38
|
+
{ name: 'eUI Angular + PHP/Symfony starter - PHP7 and composer required !!!', value: 'web-symfony' },
|
|
39
|
+
],
|
|
40
|
+
default: 0,
|
|
41
|
+
validate: function (value) {
|
|
42
|
+
if (value.length) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'groupId',
|
|
49
|
+
type: 'input',
|
|
50
|
+
message: 'Enter the groupId :',
|
|
51
|
+
default: defaultConfig.groupId,
|
|
52
|
+
validate: function (value) {
|
|
53
|
+
if (value.length) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
when: function (answers) {
|
|
58
|
+
return (answers.appType === 'web-spring-boot');
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'artifactId',
|
|
63
|
+
type: 'input',
|
|
64
|
+
message: 'Enter the artifactId :',
|
|
65
|
+
default: defaultConfig.artifactId,
|
|
66
|
+
validate: function (value) {
|
|
67
|
+
if (value.length) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
when: function (answers) {
|
|
72
|
+
return (answers.appType === 'web-spring-boot');
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: 'checkbox',
|
|
77
|
+
name: 'appOptions',
|
|
78
|
+
default: defaultConfig.appOptions,
|
|
79
|
+
message: 'Select one or more additional configuration options :',
|
|
80
|
+
choices: [
|
|
81
|
+
{ name: 'OpenId Connect JWT implementation', value: 'openid-jwt' },
|
|
82
|
+
{ name: 'ECL app-shell template and configuration - for ec.europa.eu apps', value: 'ecl' },
|
|
83
|
+
],
|
|
84
|
+
when: function (answers) {
|
|
85
|
+
return (answers.appType !== 'mobile');
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
{
|
|
90
|
+
name: 'npmInstall',
|
|
91
|
+
type: 'confirm',
|
|
92
|
+
message: 'Yarn install dependencies when the app is generated :',
|
|
93
|
+
default: defaultConfig.npmInstall
|
|
94
|
+
}
|
|
95
|
+
]);
|
|
96
|
+
})
|
|
97
|
+
.then((answers) => {
|
|
98
|
+
let outputConfig;
|
|
99
|
+
outputConfig = {
|
|
100
|
+
...defaultConfig,
|
|
101
|
+
...answers
|
|
102
|
+
};
|
|
103
|
+
console.log('--provided config : \n', outputConfig);
|
|
104
|
+
return outputConfig;
|
|
105
|
+
})
|
|
106
|
+
.catch((e) => {
|
|
107
|
+
throw e;
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
|