@eui/cli 21.0.0-alpha.4 → 21.0.0-alpha.5
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 -0
- package/bin/eui-cli.js +47 -0
- package/lib/build.js +155 -0
- package/lib/cli.js +123 -0
- package/lib/config.js +58 -0
- package/lib/generators.js +75 -0
- package/lib/install.js +45 -0
- package/lib/maven-build/build.xml +115 -0
- package/lib/maven-build/lib/ant-contrib-20061014.jar +0 -0
- package/lib/maven-build/pom.xml +64 -0
- package/lib/post-build.js +33 -0
- package/lib/skeletons/_angular/base/.browserslistrc +16 -0
- package/lib/skeletons/_angular/base/.editorconfig +16 -0
- package/lib/skeletons/_angular/base/.euirc.json +8 -0
- package/lib/skeletons/_angular/base/README.md +26 -0
- package/lib/skeletons/_angular/base/angular.json +158 -0
- package/lib/skeletons/_angular/base/gitignore_TO_REPLACE +51 -0
- package/lib/skeletons/_angular/base/mock/app/models/user.js +6 -0
- package/lib/skeletons/_angular/base/mock/app/routes/index.js +5 -0
- package/lib/skeletons/_angular/base/mock/app/routes/user_routes.js +44 -0
- package/lib/skeletons/_angular/base/mock/db/db.json +10 -0
- package/lib/skeletons/_angular/base/mock/server.js +23 -0
- package/lib/skeletons/_angular/base/package.json +38 -0
- package/lib/skeletons/_angular/base/proxy-mock.conf.json +6 -0
- package/lib/skeletons/_angular/base/proxy.conf.json +6 -0
- package/lib/skeletons/_angular/base/src/.eslintrc.json +121 -0
- package/lib/skeletons/_angular/base/src/app/app-starter.service.spec.ts +68 -0
- package/lib/skeletons/_angular/base/src/app/app-starter.service.ts +68 -0
- package/lib/skeletons/_angular/base/src/app/app.component.html +35 -0
- package/lib/skeletons/_angular/base/src/app/app.component.spec.ts +60 -0
- package/lib/skeletons/_angular/base/src/app/app.component.ts +35 -0
- package/lib/skeletons/_angular/base/src/app/app.config.ts +84 -0
- package/lib/skeletons/_angular/base/src/app/app.routes.ts +9 -0
- package/lib/skeletons/_angular/base/src/app/features/home/home.component.html +41 -0
- package/lib/skeletons/_angular/base/src/app/features/home/home.component.ts +17 -0
- package/lib/skeletons/_angular/base/src/app/features/home/home.routes.ts +6 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page1/page1.component.html +7 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page1/page1.component.ts +10 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page2/page2.component.html +7 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page2/page2.component.ts +10 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/module1.component.html +7 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/module1.component.ts +10 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/module1.routes.ts +10 -0
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.component.html +7 -0
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.component.ts +10 -0
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.routes.ts +6 -0
- package/lib/skeletons/_angular/base/src/app/shared/testing/router.mock.ts +18 -0
- package/lib/skeletons/_angular/base/src/assets/config/env-json-config-dev.json +8 -0
- package/lib/skeletons/_angular/base/src/assets/config/env-json-config-prod.json +8 -0
- package/lib/skeletons/_angular/base/src/assets/config/env-json-config.json +7 -0
- package/lib/skeletons/_angular/base/src/assets/i18n/en.json +7 -0
- package/lib/skeletons/_angular/base/src/assets/i18n/fr.json +7 -0
- package/lib/skeletons/_angular/base/src/config/global.ts +33 -0
- package/lib/skeletons/_angular/base/src/config/index.ts +8 -0
- package/lib/skeletons/_angular/base/src/config/modules.ts +7 -0
- package/lib/skeletons/_angular/base/src/dummy.spec.ts +6 -0
- package/lib/skeletons/_angular/base/src/environments/environment.prod.ts +11 -0
- package/lib/skeletons/_angular/base/src/environments/environment.ts +15 -0
- package/lib/skeletons/_angular/base/src/favicon.ico +0 -0
- package/lib/skeletons/_angular/base/src/index.html +20 -0
- package/lib/skeletons/_angular/base/src/karma.conf.js +7 -0
- package/lib/skeletons/_angular/base/src/main.ts +20 -0
- package/lib/skeletons/_angular/base/src/styles.scss +1 -0
- package/lib/skeletons/_angular/base/src/tsconfig.app.json +18 -0
- package/lib/skeletons/_angular/base/src/tsconfig.spec.json +14 -0
- package/lib/skeletons/_angular/base/tsconfig.json +27 -0
- package/lib/skeletons/_angular/base-mobile/angular.json +156 -0
- package/lib/skeletons/_angular/base-mobile/ionic.config.json +5 -0
- package/lib/skeletons/_angular/base-mobile/ngsw-config.json +33 -0
- package/lib/skeletons/_angular/base-mobile/package.json +27 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app-routing.module.ts +18 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app-starter.service.ts +73 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app.component.html +47 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app.component.ts +81 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app.config.ts +81 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app.module.ts +44 -0
- package/lib/skeletons/_angular/base-mobile/src/app/core/components/.gitkeep +0 -0
- package/lib/skeletons/_angular/base-mobile/src/app/core/core.module.ts +89 -0
- package/lib/skeletons/_angular/base-mobile/src/app/core/reducers/index.ts +32 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/about-routing.module.ts +45 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/about.component.html +70 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/about.component.ts +19 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/about.module.ts +30 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/change-log/changelog.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/change-log/changelog.component.ts +102 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/help-support/help-support.component.html +20 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/help-support/help-support.component.ts +75 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/legal-notice/legal-notice.component.html +12 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/legal-notice/legal-notice.component.ts +8 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/licence-details/licence-details.component.html +48 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/licence-details/licence-details.component.ts +7 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/opensource-licences/opensource-licences.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/opensource-licences/opensource-licences.component.ts +31 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/privacy-statement/privacy-statement.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/privacy-statement/privacy-statement.component.ts +103 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home-routing.module.ts +15 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home.component.ts +9 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home.module.ts +18 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page1/page1.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page1/page1.component.ts +8 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page2/page2.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page2/page2.component.ts +8 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1-routing.module.ts +18 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1.component.html +15 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1.component.ts +17 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1.module.ts +21 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2-routing.module.ts +16 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2.component.ts +7 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2.module.ts +17 -0
- package/lib/skeletons/_angular/base-mobile/src/app/shared/shared.module.ts +16 -0
- package/lib/skeletons/_angular/base-mobile/src/app/shared/testing/router.mock.ts +18 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/docs/pdf-test.pdf +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/i18n/en.json +25 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/i18n/es.json +24 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/i18n/fr.json +25 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/i18n/tr.json +25 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-1024.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-114.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-120.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-128.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-144.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-152.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-16.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-180.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-192.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-32.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-36.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-384.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-48.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-512.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-57.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-60.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-72.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-76.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-96.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1125-2436.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1170-2532.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1179-2556.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1242-2208.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1242-2688.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1284-2778.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1290-2796.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1488-2266.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1536-2048.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1620-2160.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1640-2360.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1668-2224.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1668-2388.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-2048-2732.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-640-1136.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-750-1334.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-828-1792.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1125-2436.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1170-2532.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1179-2556.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1242-2208.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1242-2688.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1284-2778.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1290-2796.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1488-2266.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1536-2048.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1620-2160.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1640-2360.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1668-2224.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1668-2388.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-2048-2732.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-640-1136.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-750-1334.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-828-1792.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/images/app-icon.svg +10 -0
- package/lib/skeletons/_angular/base-mobile/src/config/global.ts +39 -0
- package/lib/skeletons/_angular/base-mobile/src/config/index.ts +8 -0
- package/lib/skeletons/_angular/base-mobile/src/config/modules.ts +7 -0
- package/lib/skeletons/_angular/base-mobile/src/index.html +76 -0
- package/lib/skeletons/_angular/base-mobile/src/main.ts +23 -0
- package/lib/skeletons/_angular/base-mobile/src/manifest.webmanifest +66 -0
- package/lib/skeletons/_angular/base-mobile/src/tsconfig.app.json +20 -0
- package/lib/skeletons/_angular/options/ecl-ec/angular.json +181 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/app.component.html +237 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/app.component.ts +65 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/app.config.ts +84 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/home/home.component.html +71 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/home/home.component.ts +20 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module1/components/page1/page1.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module1/components/page1/page1.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module1/components/page2/page2.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module1/components/page2/page2.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module1/module1.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module1/module1.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module2/module2.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module2/module2.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/config/global.ts +23 -0
- package/lib/skeletons/_angular/options/ecl-eu/angular.json +181 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/app.component.html +203 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/app.component.ts +65 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/app.config.ts +84 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/home/home.component.html +71 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/home/home.component.ts +20 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/components/page1/page1.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/components/page1/page1.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/components/page2/page2.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/components/page2/page2.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/module1.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/module1.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module2/module2.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module2/module2.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/shared/shared.module.ts +19 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/config/global.ts +23 -0
- package/lib/skeletons/web-maven/package.json +17 -0
- package/lib/skeletons/web-maven/pom.xml +55 -0
- package/lib/skeletons/web-maven/src/main/java/eu/europa/ec/digit/eui/angular2clistarter/servlet/SpringWebApplicationInitializer.java +22 -0
- package/lib/skeletons/web-maven/src/main/java/eu/europa/ec/digit/eui/angular2clistarter/spring/SpringRestConfiguration.java +24 -0
- package/lib/skeletons/web-maven/src/main/java/eu/europa/ec/digit/eui/angular2clistarter/spring/rest/UserDetailsResource.java +23 -0
- package/lib/skeletons/web-maven/src/main/resources/ecas-config-application-name.xml +7 -0
- package/lib/skeletons/web-maven/src/main/webapp/WEB-INF/dispatcher-servlet.xml +11 -0
- package/lib/skeletons/web-maven/src/main/webapp/WEB-INF/web.xml +38 -0
- package/lib/skeletons/web-maven/src/main/webapp/WEB-INF/weblogic.xml +16 -0
- package/lib/skeletons/web-maven/src/main/webapp/index.jsp +30 -0
- package/lib/skeletons/web-spring-boot/myapp-web/pom.xml +83 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/pom.xml +83 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/MyappApplication.java +46 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/domain/Address.java +65 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/domain/Building.java +44 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/repositories/BuildingRepository.java +11 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/BuildingResource.java +26 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/SwaggerConfig.java +16 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/support/HateoasPageableHandlerMethodArgumentResolver.java +45 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/support/HypermediaSupport.java +25 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/support/PageJsonSerializer.java +17 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/security/CachingPreventionFilter.java +29 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/security/CsrfPreventionFilter.java +35 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/security/FakeAuthenticationFilter.java +372 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/security/SecurityConfig.java +47 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/services/BuildingSearchCriteria.java +26 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/services/BuildingService.java +10 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/services/BuildingServiceImpl.java +26 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/resources/application.properties +0 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/resources/data.sql +11 -0
- package/lib/skeletons/web-spring-boot/pom.xml +30 -0
- package/lib/skeletons/web-symfony/myapp-web/angular.json +169 -0
- package/lib/skeletons/web-symfony/myapp-web/package.json +23 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/app-routing.module.ts +18 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/app.component.ts +77 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.html +160 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.scss +0 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.ts +104 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/models/product.model.ts +6 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/products-routing.module.ts +16 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/products.module.ts +16 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/services/products.service.ts +29 -0
- package/lib/skeletons/web-symfony/myapp-web/src/environments/environment.ts +17 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/.env +28 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/bin/console +42 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/composer.json +67 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/composer.lock +3572 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/bootstrap.php +21 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/bundles.php +12 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/config.yml +0 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/cache.yaml +19 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/dev/routing.yaml +3 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/doctrine.yaml +29 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/doctrine_migrations.yaml +5 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/framework.yaml +17 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/prod/doctrine.yaml +32 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/routing.yaml +4 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/sensio_framework_extra.yaml +3 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/test/framework.yaml +4 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/test/routing.yaml +3 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/twig.yaml +4 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes/annotations.yaml +3 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes/dev/twig.yaml +3 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes.yaml +3 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/services.yaml +27 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/public/index.php +27 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Controller/ProductController.php +196 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Entity/Product.php +99 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Kernel.php +53 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Migrations/Version20190604101623.php +31 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Migrations/Version20190604101638.php +35 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Repository/ProductRepository.php +51 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/symfony.lock +274 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/base.html.twig +12 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/lucky/number.html.twig +1 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/product/index.html.twig +20 -0
- package/lib/utils.js +13 -0
- package/package.json +1 -1
- package/sonar-project.properties +14 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const tools = require('@eui/tools/scripts/utils/tools');
|
|
3
|
+
|
|
4
|
+
const utils = require('./utils');
|
|
5
|
+
|
|
6
|
+
module.exports.start = (options) => {
|
|
7
|
+
return Promise.resolve()
|
|
8
|
+
.then(() => {
|
|
9
|
+
return postBuild(options.config, options.targetPath,)
|
|
10
|
+
})
|
|
11
|
+
.catch((e) => {
|
|
12
|
+
throw e;
|
|
13
|
+
})
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const postBuild = (cliConfig, targetPath) => {
|
|
17
|
+
const appName = cliConfig.appName;
|
|
18
|
+
const appType = cliConfig.appType;
|
|
19
|
+
const artifactId = cliConfig.artifactId;
|
|
20
|
+
|
|
21
|
+
console.log(`Post build`);
|
|
22
|
+
|
|
23
|
+
return Promise.resolve()
|
|
24
|
+
.then(() => {
|
|
25
|
+
console.log('--renaming .gitignore');
|
|
26
|
+
const angularPath = utils.getAngularPath(targetPath, appName, appType, artifactId);
|
|
27
|
+
return tools.move(path.join(angularPath, 'gitignore_TO_REPLACE'), path.join(angularPath, '.gitignore'));
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
.catch((e) => {
|
|
31
|
+
throw e;
|
|
32
|
+
})
|
|
33
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
|
2
|
+
# For additional information regarding the format and rule options, please see:
|
|
3
|
+
# https://github.com/browserslist/browserslist#queries
|
|
4
|
+
|
|
5
|
+
# For the full list of supported browsers by the Angular framework, please see:
|
|
6
|
+
# https://angular.io/guide/browser-support
|
|
7
|
+
|
|
8
|
+
# You can see what browsers were selected by your queries by running:
|
|
9
|
+
# npx browserslist
|
|
10
|
+
|
|
11
|
+
last 1 Chrome version
|
|
12
|
+
last 1 Firefox version
|
|
13
|
+
last 2 Edge major versions
|
|
14
|
+
last 2 Safari major versions
|
|
15
|
+
last 2 iOS major versions
|
|
16
|
+
Firefox ESR
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Editor configuration, see http://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 4
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.scss]
|
|
12
|
+
indent_size = 4
|
|
13
|
+
|
|
14
|
+
[*.md]
|
|
15
|
+
max_line_length = off
|
|
16
|
+
trim_trailing_whitespace = false
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# eUI starter app
|
|
2
|
+
|
|
3
|
+
## Development server
|
|
4
|
+
|
|
5
|
+
````npm start```` to start the angular project with node-express proxy mock server
|
|
6
|
+
|
|
7
|
+
````npm run start-proxy```` to start the angular project with real backend proxy server deployed
|
|
8
|
+
|
|
9
|
+
````npm run build```` to build, lint and test your project for DEV
|
|
10
|
+
|
|
11
|
+
````npm run build-prod```` to build, lint and test your project for PROD
|
|
12
|
+
|
|
13
|
+
````npm run build-prod-skip-test```` to build and lint your project for PROD - Unit test skipped - to be used on Bamboo plans
|
|
14
|
+
|
|
15
|
+
````npm run build-prod-stats```` to build, lint and test your project for PROD - with stats.json file generated for webpack-bundle-analyzer input
|
|
16
|
+
|
|
17
|
+
* check package.json for more info on executable scripts provided
|
|
18
|
+
|
|
19
|
+
## Further help
|
|
20
|
+
|
|
21
|
+
- https://eui.ecdevops.eu
|
|
22
|
+
|
|
23
|
+
- register on [MS Teams](https://teams.microsoft.com/l/team/19%3a2f5bb6b7d1e24c4aabaa62229d3e1955%40thread.tacv2/conversations?groupId=fb6def72-c57b-4e8f-a82e-49be65d6e1f5&tenantId=b24c8b06-522c-46fe-9080-70926f8dddb1) with your EC mail account, for extra-muros please send a mail to DIGIT-EUI-SUPPORT@ec.europa.eu
|
|
24
|
+
|
|
25
|
+
- For bugs / request new features : Drop us an email at : DIGIT-EUI-SUPPORT@ec.europa.eu
|
|
26
|
+
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"newProjectRoot": "projects",
|
|
5
|
+
"cli": {
|
|
6
|
+
"analytics": false
|
|
7
|
+
},
|
|
8
|
+
"projects": {
|
|
9
|
+
"app": {
|
|
10
|
+
"root": "",
|
|
11
|
+
"sourceRoot": "src",
|
|
12
|
+
"projectType": "application",
|
|
13
|
+
"prefix": "app",
|
|
14
|
+
"schematics": {
|
|
15
|
+
"@schematics/angular:component": {
|
|
16
|
+
"style": "scss"
|
|
17
|
+
},
|
|
18
|
+
"@schematics/angular:application": {
|
|
19
|
+
"strict": true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"architect": {
|
|
23
|
+
"build": {
|
|
24
|
+
"builder": "@angular-devkit/build-angular:application",
|
|
25
|
+
"options": {
|
|
26
|
+
"outputPath": "dist",
|
|
27
|
+
"index": "src/index.html",
|
|
28
|
+
"browser": "src/main.ts",
|
|
29
|
+
"polyfills": ["zone.js"],
|
|
30
|
+
"tsConfig": "src/tsconfig.app.json",
|
|
31
|
+
"inlineStyleLanguage": "scss",
|
|
32
|
+
"assets": [
|
|
33
|
+
"src/favicon.ico",
|
|
34
|
+
"src/assets",
|
|
35
|
+
{
|
|
36
|
+
"glob": "**/*",
|
|
37
|
+
"input": "node_modules/@eui/core/assets/",
|
|
38
|
+
"output": "./assets"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"glob": "**/*",
|
|
42
|
+
"input": "node_modules/@eui/styles/dist/assets/",
|
|
43
|
+
"output": "./assets"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"styles": [
|
|
47
|
+
"node_modules/@eui/styles/dist/eui.css",
|
|
48
|
+
"node_modules/@eui/styles/dist/eui-utilities.css",
|
|
49
|
+
"node_modules/@eui/styles/dist/eui-theme-eui-legacy.css",
|
|
50
|
+
"src/styles.scss"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"configurations": {
|
|
54
|
+
"production": {
|
|
55
|
+
"fileReplacements": [
|
|
56
|
+
{
|
|
57
|
+
"replace": "src/environments/environment.ts",
|
|
58
|
+
"with": "src/environments/environment.prod.ts"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"optimization": false,
|
|
62
|
+
"outputHashing": "all",
|
|
63
|
+
"sourceMap": false,
|
|
64
|
+
"aot": true,
|
|
65
|
+
"extractLicenses": true,
|
|
66
|
+
"budgets": [
|
|
67
|
+
{
|
|
68
|
+
"type": "initial",
|
|
69
|
+
"maximumWarning": "1mb",
|
|
70
|
+
"maximumError": "2mb"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"production-optimized": {
|
|
75
|
+
"fileReplacements": [
|
|
76
|
+
{
|
|
77
|
+
"replace": "src/environments/environment.ts",
|
|
78
|
+
"with": "src/environments/environment.prod.ts"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"optimization": {
|
|
82
|
+
"scripts": true,
|
|
83
|
+
"styles": {
|
|
84
|
+
"minify": false,
|
|
85
|
+
"inlineCritical": true
|
|
86
|
+
},
|
|
87
|
+
"fonts": true
|
|
88
|
+
},
|
|
89
|
+
"outputHashing": "all",
|
|
90
|
+
"sourceMap": false,
|
|
91
|
+
"extractLicenses": true,
|
|
92
|
+
"budgets": [
|
|
93
|
+
{
|
|
94
|
+
"type": "initial",
|
|
95
|
+
"maximumWarning": "2mb",
|
|
96
|
+
"maximumError": "6mb"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"development": {
|
|
101
|
+
"optimization": false,
|
|
102
|
+
"extractLicenses": false,
|
|
103
|
+
"sourceMap": true
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"defaultConfiguration": "production"
|
|
107
|
+
},
|
|
108
|
+
"serve": {
|
|
109
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
110
|
+
"options": {
|
|
111
|
+
"buildTarget": "app:build"
|
|
112
|
+
},
|
|
113
|
+
"configurations": {
|
|
114
|
+
"proxy-mock": {
|
|
115
|
+
"buildTarget": "app:build:development",
|
|
116
|
+
"proxyConfig": "proxy-mock.conf.json"
|
|
117
|
+
},
|
|
118
|
+
"production": {
|
|
119
|
+
"buildTarget": "app:build:production"
|
|
120
|
+
},
|
|
121
|
+
"development": {
|
|
122
|
+
"buildTarget": "app:build:development"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"defaultConfiguration": "development"
|
|
126
|
+
},
|
|
127
|
+
"lint": {
|
|
128
|
+
"builder": "@angular-eslint/builder:lint",
|
|
129
|
+
"options": {
|
|
130
|
+
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"],
|
|
131
|
+
"eslintConfig": "src/.eslintrc.json"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"test": {
|
|
135
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
136
|
+
"options": {
|
|
137
|
+
"polyfills": ["zone.js", "zone.js/testing"],
|
|
138
|
+
"tsConfig": "src/tsconfig.spec.json",
|
|
139
|
+
"karmaConfig": "src/karma.conf.js",
|
|
140
|
+
"inlineStyleLanguage": "scss",
|
|
141
|
+
"assets": [
|
|
142
|
+
{
|
|
143
|
+
"glob": "**/*",
|
|
144
|
+
"input": "node_modules/@eui/core/assets/",
|
|
145
|
+
"output": "./assets"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"glob": "**/*",
|
|
149
|
+
"input": "node_modules/@eui/styles/dist/assets/",
|
|
150
|
+
"output": "./assets"
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# compiled output
|
|
4
|
+
**/node_modules
|
|
5
|
+
**/target
|
|
6
|
+
**/build
|
|
7
|
+
**/dist
|
|
8
|
+
**/out-tsc
|
|
9
|
+
**/tmp
|
|
10
|
+
**/test/reports
|
|
11
|
+
**/coverage
|
|
12
|
+
|
|
13
|
+
# IDEs and editors
|
|
14
|
+
/.idea
|
|
15
|
+
.project
|
|
16
|
+
.classpath
|
|
17
|
+
.c9/
|
|
18
|
+
*.launch
|
|
19
|
+
.settings/
|
|
20
|
+
*.sublime-workspace
|
|
21
|
+
|
|
22
|
+
# IDE - VSCode
|
|
23
|
+
.vscode/*
|
|
24
|
+
!.vscode/settings.json
|
|
25
|
+
!.vscode/tasks.json
|
|
26
|
+
!.vscode/launch.json
|
|
27
|
+
!.vscode/extensions.json
|
|
28
|
+
|
|
29
|
+
# misc
|
|
30
|
+
/.sass-cache
|
|
31
|
+
/connect.lock
|
|
32
|
+
/coverage
|
|
33
|
+
/libpeerconnection.log
|
|
34
|
+
npm-debug.log
|
|
35
|
+
testem.log
|
|
36
|
+
/typings
|
|
37
|
+
yarn-error.log
|
|
38
|
+
|
|
39
|
+
# e2e
|
|
40
|
+
/e2e/*.js
|
|
41
|
+
/e2e/*.map
|
|
42
|
+
|
|
43
|
+
# Angular specific
|
|
44
|
+
.angular
|
|
45
|
+
.nx
|
|
46
|
+
|
|
47
|
+
# System Files
|
|
48
|
+
.DS_Store
|
|
49
|
+
Thumbs.db
|
|
50
|
+
|
|
51
|
+
/assets/env-json-config.json
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const User = require('../models/user');
|
|
2
|
+
const uuid = require('uuid');
|
|
3
|
+
|
|
4
|
+
module.exports = function (app, db) {
|
|
5
|
+
db.then(db => {
|
|
6
|
+
app.get('/api/user-details', (req, res) => {
|
|
7
|
+
res.send(db.get('user-details'))
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
app.get('/api/users', (req, res) => {
|
|
11
|
+
res.send(db.get('users'))
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
app.get('/api/users/:userId', (req, res) => {
|
|
15
|
+
res.send(
|
|
16
|
+
db.get('users')
|
|
17
|
+
.find({ userId: req.params.userId })
|
|
18
|
+
);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
app.put('/api/users/:userId', (req, res) => {
|
|
22
|
+
db.get('users')
|
|
23
|
+
.find({ userId: req.params.userId })
|
|
24
|
+
.assign( { ...req.body } )
|
|
25
|
+
.write()
|
|
26
|
+
.then(user => res.send(user))
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
app.delete('/api/users/:userId', (req, res) => {
|
|
30
|
+
db.get('users')
|
|
31
|
+
.remove({ userId: req.params.userId })
|
|
32
|
+
.write()
|
|
33
|
+
.then(res.send())
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
app.post('/api/users', (req, res) => {
|
|
37
|
+
db.get('users')
|
|
38
|
+
.push({ ...User, ...req.body, ...{ userId: uuid.v4() } })
|
|
39
|
+
.last()
|
|
40
|
+
.write()
|
|
41
|
+
.then(user => res.send(user))
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const express = require('express');
|
|
2
|
+
const bodyParser = require('body-parser');
|
|
3
|
+
const app = express();
|
|
4
|
+
const low = require('lowdb');
|
|
5
|
+
const FileAsync = require('lowdb/adapters/FileAsync');
|
|
6
|
+
const adapter = new FileAsync('mock/db/db.json');
|
|
7
|
+
const db = low(adapter);
|
|
8
|
+
const port = 3000;
|
|
9
|
+
|
|
10
|
+
app.use(express.json());
|
|
11
|
+
app.use(bodyParser.urlencoded({ extended: true }));
|
|
12
|
+
// const cors = require('cors');
|
|
13
|
+
// if needed to be reached from another localhost server for local testing a distributed app f.e.
|
|
14
|
+
// app.use(cors({
|
|
15
|
+
// origin: 'http://127.0.0.1:8080',
|
|
16
|
+
// credentials: true,
|
|
17
|
+
// }));
|
|
18
|
+
|
|
19
|
+
require('./app/routes')(app, db);
|
|
20
|
+
|
|
21
|
+
app.listen(port, () => {
|
|
22
|
+
console.log('We are live on ' + port);
|
|
23
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "eui-angular-app",
|
|
3
|
+
"version": "21.0.0-alpha.4",
|
|
4
|
+
"license": "EUPL-1.1",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"ng": "ng",
|
|
7
|
+
"start-mock-server": "nodemon --watch ./mock ./mock/server.js",
|
|
8
|
+
"start-serve": "eui-scripts serve-app --configuration=proxy-mock",
|
|
9
|
+
"start": "npm-run-all --parallel start-mock-server start-serve",
|
|
10
|
+
"start-proxy": "eui-scripts serve-app --configuration=proxy",
|
|
11
|
+
"start-local": "eui-scripts serve-app",
|
|
12
|
+
"build": "eui-scripts build-app",
|
|
13
|
+
"build-dev": "eui-scripts build-app --configuration=development --configEnvTarget=dev",
|
|
14
|
+
"build-prod": "eui-scripts build-app --configuration=production-optimized --configEnvTarget=prod",
|
|
15
|
+
"build-prod-skip-test": "eui-scripts build-app --configuration=production-optimized --configEnvTarget=prod --skipTest",
|
|
16
|
+
"build-prod-stats": "eui-scripts build-app --configuration=production-optimized --configEnvTarget=prod --statsJson",
|
|
17
|
+
"app:build": "eui-scripts build-app",
|
|
18
|
+
"app:inject-config": "eui-scripts inject-config-app",
|
|
19
|
+
"generate-changelog": "eui-scripts generate-changelog",
|
|
20
|
+
"generate-sprite": "eui-scripts generate-sprite"
|
|
21
|
+
},
|
|
22
|
+
"private": true,
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@eui/deps-base": "21.0.0-alpha.4"
|
|
25
|
+
},
|
|
26
|
+
"resolutions": {
|
|
27
|
+
"js-yaml": ">=3.13.1",
|
|
28
|
+
"pdfjs-dist": "4.10.38",
|
|
29
|
+
"tar": ">=6.2.1",
|
|
30
|
+
"katex": ">=0.16.10",
|
|
31
|
+
"follow-redirects": ">=1.15.4",
|
|
32
|
+
"word-wrap": ">=1.2.4",
|
|
33
|
+
"postcss": ">=8.4.31",
|
|
34
|
+
"semver": ">=7.5.2",
|
|
35
|
+
"express": "4.21.2",
|
|
36
|
+
"path-to-regexp": "1.9.0"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"ignorePatterns": [
|
|
4
|
+
"**/node_modules/**",
|
|
5
|
+
"**/dist/**",
|
|
6
|
+
"**/coverage/**",
|
|
7
|
+
"**/e2e/**",
|
|
8
|
+
"**/test/**",
|
|
9
|
+
"**/testing/**"
|
|
10
|
+
],
|
|
11
|
+
"overrides": [
|
|
12
|
+
{
|
|
13
|
+
"files": [
|
|
14
|
+
"*.ts"
|
|
15
|
+
],
|
|
16
|
+
"parserOptions": {
|
|
17
|
+
"project": [
|
|
18
|
+
"tsconfig.json",
|
|
19
|
+
"e2e/tsconfig.json"
|
|
20
|
+
],
|
|
21
|
+
"createDefaultProgram": true
|
|
22
|
+
},
|
|
23
|
+
"extends": [
|
|
24
|
+
"eslint:recommended",
|
|
25
|
+
"plugin:@typescript-eslint/recommended",
|
|
26
|
+
"plugin:@angular-eslint/recommended",
|
|
27
|
+
"plugin:@angular-eslint/template/process-inline-templates"
|
|
28
|
+
],
|
|
29
|
+
"rules": {
|
|
30
|
+
"@angular-eslint/component-selector": [
|
|
31
|
+
"error",
|
|
32
|
+
{
|
|
33
|
+
"type": "element",
|
|
34
|
+
"prefix": ["app", "app"],
|
|
35
|
+
"style": "kebab-case"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"@angular-eslint/directive-selector": [
|
|
39
|
+
"error",
|
|
40
|
+
{
|
|
41
|
+
"type": "attribute",
|
|
42
|
+
"prefix": ["app", "eui"],
|
|
43
|
+
"style": "camelCase"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"@typescript-eslint/ban-ts-comment": "off",
|
|
47
|
+
"@typescript-eslint/no-empty-object-type": "error",
|
|
48
|
+
"@typescript-eslint/no-unsafe-function-type": "error",
|
|
49
|
+
"@typescript-eslint/consistent-type-definitions": "off",
|
|
50
|
+
"@typescript-eslint/dot-notation": "off",
|
|
51
|
+
"@typescript-eslint/explicit-member-accessibility": [
|
|
52
|
+
"off",
|
|
53
|
+
{
|
|
54
|
+
"accessibility": "explicit"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"@typescript-eslint/no-require-imports": "error",
|
|
58
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
59
|
+
"@typescript-eslint/no-var-requires": "error",
|
|
60
|
+
"@typescript-eslint/require-await": "error",
|
|
61
|
+
"brace-style": [
|
|
62
|
+
"error",
|
|
63
|
+
"1tbs"
|
|
64
|
+
],
|
|
65
|
+
"id-blacklist": "off",
|
|
66
|
+
"id-match": "off",
|
|
67
|
+
"no-duplicate-case": "error",
|
|
68
|
+
"no-duplicate-imports": "off",
|
|
69
|
+
"no-invalid-this": "error",
|
|
70
|
+
"no-multiple-empty-lines": [
|
|
71
|
+
"error",
|
|
72
|
+
{
|
|
73
|
+
"max": 1
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"no-new-func": "error",
|
|
77
|
+
"no-redeclare": "off",
|
|
78
|
+
"@typescript-eslint/no-redeclare": [
|
|
79
|
+
"error"
|
|
80
|
+
],
|
|
81
|
+
"no-template-curly-in-string": "error",
|
|
82
|
+
"no-underscore-dangle": "off",
|
|
83
|
+
"@typescript-eslint/naming-convention": [
|
|
84
|
+
"error",
|
|
85
|
+
{
|
|
86
|
+
"selector": "enum",
|
|
87
|
+
"format": [
|
|
88
|
+
"PascalCase",
|
|
89
|
+
"UPPER_CASE"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"@typescript-eslint/member-ordering": [
|
|
94
|
+
"error",
|
|
95
|
+
{
|
|
96
|
+
"default": [
|
|
97
|
+
"public-static-field",
|
|
98
|
+
"public-instance-field",
|
|
99
|
+
"private-static-field",
|
|
100
|
+
"private-instance-field",
|
|
101
|
+
"public-constructor",
|
|
102
|
+
"private-constructor",
|
|
103
|
+
"public-instance-method",
|
|
104
|
+
"protected-instance-method",
|
|
105
|
+
"private-instance-method"
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"files": [
|
|
113
|
+
"*.html"
|
|
114
|
+
],
|
|
115
|
+
"extends": [
|
|
116
|
+
"plugin:@angular-eslint/template/recommended"
|
|
117
|
+
],
|
|
118
|
+
"rules": {}
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {TestBed} from '@angular/core/testing';
|
|
2
|
+
import { HttpTestingController, provideHttpClientTesting } from "@angular/common/http/testing";
|
|
3
|
+
import {CONFIG_TOKEN, I18nService, UserService} from '@eui/core';
|
|
4
|
+
import {EuiAppConfig} from '@eui/core';
|
|
5
|
+
import {of} from 'rxjs';
|
|
6
|
+
import {AppStarterService} from './app-starter.service';
|
|
7
|
+
import SpyObj = jasmine.SpyObj;
|
|
8
|
+
import { EuiServiceStatus } from '@eui/base';
|
|
9
|
+
import { provideHttpClient, withInterceptorsFromDi } from "@angular/common/http";
|
|
10
|
+
|
|
11
|
+
describe('AppStarterService', () => {
|
|
12
|
+
let service: AppStarterService;
|
|
13
|
+
let httpMock: HttpTestingController;
|
|
14
|
+
let userServiceMock: SpyObj<UserService>;
|
|
15
|
+
let i18nServiceMock: SpyObj<I18nService>;
|
|
16
|
+
let configMock: EuiAppConfig;
|
|
17
|
+
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
userServiceMock = jasmine.createSpyObj('UserService', ['init']);
|
|
20
|
+
i18nServiceMock = jasmine.createSpyObj('I18nService', ['init']);
|
|
21
|
+
configMock = {global: {}, modules: {core: {base: 'localhost:3000', userDetails: 'dummy'}}};
|
|
22
|
+
|
|
23
|
+
TestBed.configureTestingModule({
|
|
24
|
+
providers: [
|
|
25
|
+
provideHttpClient(withInterceptorsFromDi()),
|
|
26
|
+
provideHttpClientTesting(),
|
|
27
|
+
AppStarterService,
|
|
28
|
+
{provide: UserService, useValue: userServiceMock},
|
|
29
|
+
{provide: I18nService, useValue: i18nServiceMock},
|
|
30
|
+
{provide: CONFIG_TOKEN, useValue: configMock},
|
|
31
|
+
],
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
service = TestBed.inject(AppStarterService);
|
|
35
|
+
httpMock = TestBed.inject(HttpTestingController);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('should be created', () => {
|
|
39
|
+
expect(service).toBeTruthy();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('should call start method', () => {
|
|
43
|
+
userServiceMock.init.and.returnValue(of({ } as EuiServiceStatus));
|
|
44
|
+
i18nServiceMock.init.and.returnValue(of({ } as EuiServiceStatus));
|
|
45
|
+
service.start().subscribe(() => {
|
|
46
|
+
expect(userServiceMock.init).toHaveBeenCalled();
|
|
47
|
+
expect(i18nServiceMock.init).toHaveBeenCalled();
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it('should call initUserService method', () => {
|
|
52
|
+
userServiceMock.init.and.returnValue(of({ } as EuiServiceStatus));
|
|
53
|
+
service.initUserService().subscribe(() => {
|
|
54
|
+
expect(userServiceMock.init).toHaveBeenCalled();
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('should fetch user details', () => {
|
|
59
|
+
const dummyUserDetails = {userId: 'anonymous'};
|
|
60
|
+
service['fetchUserDetails']().subscribe(userDetails => {
|
|
61
|
+
expect(userDetails).toEqual(dummyUserDetails);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const req = httpMock.expectOne(`${configMock.modules?.['core']['base']}${configMock.modules?.['core']['userDetails']}`);
|
|
65
|
+
expect(req.request.method).toBe('GET');
|
|
66
|
+
req.flush(dummyUserDetails);
|
|
67
|
+
});
|
|
68
|
+
});
|