diff --git a/.aliases b/.aliases new file mode 100644 index 00000000..03428b86 --- /dev/null +++ b/.aliases @@ -0,0 +1,9 @@ +alias gw='./gradlew' +alias pg-sql-run='docker run --name hsadmin-ng-postgres -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres:13.7-bullseye' +alias pg-sql-stop='docker stop hsadmin-ng-postgres' +alias pg-sql-start='docker container start hsadmin-ng-postgres' +alias pg-sql-remove='docker rm hsadmin-ng-postgres' +alias pg-sql-reset='pg-sql-stop; pg-sql-remove; pg-sql-run' +alias pg-sql-backup='docker exec -i hsadmin-ng-postgres /usr/bin/pg_dump --clean --create -U postgres postgres | gzip -9' +alias pg-sql-restore='gunzip --stdout | docker exec -i hsadmin-ng-postgres psql -U postgres -d postgres' + diff --git a/.editorconfig b/.editorconfig index a79c052f..51ceaea8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -18,7 +18,3 @@ insert_final_newline = true [*.md] trim_trailing_whitespace = false - -[package.json] -indent_style = space -indent_size = 2 diff --git a/.huskyrc b/.huskyrc deleted file mode 100644 index 9e18d876..00000000 --- a/.huskyrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "hooks": { - "pre-commit": "lint-staged" - } -} diff --git a/.jhipster/Asset.json b/.jhipster/Asset.json deleted file mode 100644 index ff8816aa..00000000 --- a/.jhipster/Asset.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "Asset", - "fields": [ - { - "fieldName": "documentDate", - "fieldType": "LocalDate", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "valueDate", - "fieldType": "LocalDate", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "action", - "fieldType": "AssetAction", - "fieldValues": "PAYMENT,HANDOVER,ADOPTION,LOSS,CLEARING,PAYBACK", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "amount", - "fieldType": "BigDecimal", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "remark", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 160 - } - ], - "relationships": [ - { - "relationshipType": "many-to-one", - "otherEntityName": "membership", - "otherEntityRelationshipName": "asset", - "relationshipValidateRules": "required", - "relationshipName": "membership", - "otherEntityField": "admissionDocumentDate" - } - ], - "changelogDate": "20190507105335", - "entityTableName": "asset", - "dto": "mapstruct", - "pagination": "infinite-scroll", - "service": "serviceClass", - "jpaMetamodelFiltering": true, - "fluentMethods": true, - "clientRootFolder": "", - "applications": "*" -} \ No newline at end of file diff --git a/.jhipster/Customer.json b/.jhipster/Customer.json deleted file mode 100644 index 97a58c7e..00000000 --- a/.jhipster/Customer.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "name": "Customer", - "fields": [ - { - "fieldName": "reference", - "fieldType": "Integer", - "fieldValidateRules": [ - "required", - "unique", - "min", - "max" - ], - "fieldValidateRulesMin": 10000, - "fieldValidateRulesMax": 99999 - }, - { - "fieldName": "prefix", - "fieldType": "String", - "fieldValidateRules": [ - "required", - "maxlength", - "unique", - "pattern" - ], - "fieldValidateRulesMaxlength": 3, - "fieldValidateRulesPattern": "[a-z][a-z0-9]+" - }, - { - "fieldName": "name", - "fieldType": "String", - "fieldValidateRules": [ - "required", - "maxlength" - ], - "fieldValidateRulesMaxlength": 80 - }, - { - "fieldName": "kind", - "fieldType": "CustomerKind", - "fieldValues": "NATURAL,LEGAL", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "birthDate", - "fieldType": "LocalDate" - }, - { - "fieldName": "birthPlace", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 80 - }, - { - "fieldName": "registrationCourt", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 80 - }, - { - "fieldName": "registrationNumber", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 80 - }, - { - "fieldName": "vatRegion", - "fieldType": "VatRegion", - "fieldValues": "DOMESTIC,EU,OTHER", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "vatNumber", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 40 - }, - { - "fieldName": "contractualSalutation", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 80 - }, - { - "fieldName": "contractualAddress", - "fieldType": "String", - "fieldValidateRules": [ - "required", - "maxlength" - ], - "fieldValidateRulesMaxlength": 400 - }, - { - "fieldName": "billingSalutation", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 80 - }, - { - "fieldName": "billingAddress", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 400 - }, - { - "fieldName": "remark", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 160 - } - ], - "relationships": [ - { - "relationshipType": "one-to-many", - "otherEntityName": "membership", - "otherEntityRelationshipName": "customer", - "relationshipName": "membership" - }, - { - "relationshipType": "one-to-many", - "otherEntityName": "sepaMandate", - "otherEntityRelationshipName": "customer", - "relationshipName": "sepamandate" - } - ], - "changelogDate": "20190507105332", - "entityTableName": "customer", - "dto": "mapstruct", - "pagination": "infinite-scroll", - "service": "serviceClass", - "jpaMetamodelFiltering": true, - "fluentMethods": true, - "clientRootFolder": "", - "applications": "*" -} \ No newline at end of file diff --git a/.jhipster/Membership.json b/.jhipster/Membership.json deleted file mode 100644 index 90797b5b..00000000 --- a/.jhipster/Membership.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "Membership", - "fields": [ - { - "fieldName": "admissionDocumentDate", - "fieldType": "LocalDate", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "cancellationDocumentDate", - "fieldType": "LocalDate" - }, - { - "fieldName": "memberFromDate", - "fieldType": "LocalDate", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "memberUntilDate", - "fieldType": "LocalDate" - }, - { - "fieldName": "remark", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 160 - } - ], - "relationships": [ - { - "relationshipType": "one-to-many", - "otherEntityName": "share", - "otherEntityRelationshipName": "membership", - "relationshipName": "share" - }, - { - "relationshipType": "one-to-many", - "otherEntityName": "asset", - "otherEntityRelationshipName": "membership", - "relationshipName": "asset" - }, - { - "relationshipType": "many-to-one", - "otherEntityName": "customer", - "otherEntityRelationshipName": "membership", - "relationshipValidateRules": "required", - "relationshipName": "customer", - "otherEntityField": "prefix" - } - ], - "changelogDate": "20190507105333", - "entityTableName": "membership", - "dto": "mapstruct", - "pagination": "infinite-scroll", - "service": "serviceClass", - "jpaMetamodelFiltering": true, - "fluentMethods": true, - "clientRootFolder": "", - "applications": "*" -} \ No newline at end of file diff --git a/.jhipster/SepaMandate.json b/.jhipster/SepaMandate.json deleted file mode 100644 index 5879f6ed..00000000 --- a/.jhipster/SepaMandate.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "SepaMandate", - "fields": [ - { - "fieldName": "reference", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength", - "unique", - "required" - ], - "fieldValidateRulesMaxlength": 40 - }, - { - "fieldName": "iban", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 34 - }, - { - "fieldName": "bic", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 11 - }, - { - "fieldName": "grantingDocumentDate", - "fieldType": "LocalDate", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "revokationDocumentDate", - "fieldType": "LocalDate" - }, - { - "fieldName": "validFromDate", - "fieldType": "LocalDate", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "validUntilDate", - "fieldType": "LocalDate" - }, - { - "fieldName": "lastUsedDate", - "fieldType": "LocalDate" - }, - { - "fieldName": "remark", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 160 - } - ], - "relationships": [ - { - "relationshipType": "many-to-one", - "otherEntityName": "customer", - "otherEntityRelationshipName": "sepamandate", - "relationshipValidateRules": "required", - "relationshipName": "customer", - "otherEntityField": "prefix" - } - ], - "changelogDate": "20190507105336", - "entityTableName": "sepa_mandate", - "dto": "mapstruct", - "pagination": "infinite-scroll", - "service": "serviceClass", - "jpaMetamodelFiltering": true, - "fluentMethods": true, - "clientRootFolder": "", - "applications": "*" -} \ No newline at end of file diff --git a/.jhipster/Share.json b/.jhipster/Share.json deleted file mode 100644 index 206438bd..00000000 --- a/.jhipster/Share.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "Share", - "fields": [ - { - "fieldName": "documentDate", - "fieldType": "LocalDate", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "valueDate", - "fieldType": "LocalDate", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "action", - "fieldType": "ShareAction", - "fieldValues": "SUBSCRIPTION,CANCELLATION", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "quantity", - "fieldType": "Integer", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "remark", - "fieldType": "String", - "fieldValidateRules": [ - "maxlength" - ], - "fieldValidateRulesMaxlength": 160 - } - ], - "relationships": [ - { - "relationshipType": "many-to-one", - "otherEntityName": "membership", - "otherEntityRelationshipName": "share", - "relationshipValidateRules": "required", - "relationshipName": "membership", - "otherEntityField": "admissionDocumentDate" - } - ], - "changelogDate": "20190507105334", - "entityTableName": "share", - "dto": "mapstruct", - "pagination": "infinite-scroll", - "service": "serviceClass", - "jpaMetamodelFiltering": true, - "fluentMethods": true, - "clientRootFolder": "", - "applications": "*" -} \ No newline at end of file diff --git a/.jhipster/UserRoleAssignment.json b/.jhipster/UserRoleAssignment.json deleted file mode 100644 index 493221c3..00000000 --- a/.jhipster/UserRoleAssignment.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "UserRoleAssignment", - "fields": [ - { - "fieldName": "entityTypeId", - "fieldType": "String", - "fieldValidateRules": [ - "required", - "maxlength" - ], - "fieldValidateRulesMaxlength": 32 - }, - { - "fieldName": "entityObjectId", - "fieldType": "Long", - "fieldValidateRules": [ - "required" - ] - }, - { - "fieldName": "assignedRole", - "fieldType": "UserRole", - "fieldValues": "HOSTMASTER,ADMIN,SUPPORTER,CONTRACTUAL_CONTACT,FINANCIAL_CONTACT,TECHNICAL_CONTACT,CUSTOMER_USER", - "fieldValidateRules": [ - "required" - ] - } - ], - "relationships": [ - { - "relationshipType": "many-to-one", - "otherEntityName": "user", - "otherEntityRelationshipName": "required", - "relationshipName": "user", - "otherEntityField": "login" - } - ], - "changelogDate": "20190507105342", - "entityTableName": "user_role_assignment", - "dto": "no", - "pagination": "infinite-scroll", - "service": "serviceClass", - "jpaMetamodelFiltering": true, - "fluentMethods": true, - "clientRootFolder": "", - "applications": "*" -} \ No newline at end of file diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 151fcf79..00000000 --- a/.prettierignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -target -package-lock.json diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 6fd4aa12..00000000 --- a/.prettierrc +++ /dev/null @@ -1,12 +0,0 @@ -# Prettier configuration - -printWidth: 140 -singleQuote: true -tabWidth: 4 -useTabs: false - -# js and ts rules: -arrowParens: avoid - -# jsx and tsx rules: -jsxBracketSameLine: false diff --git a/.run/00-util.sql.run.xml b/.run/00-util.sql.run.xml new file mode 100644 index 00000000..765612b0 --- /dev/null +++ b/.run/00-util.sql.run.xml @@ -0,0 +1,8 @@ + + + + FILE + + + + \ No newline at end of file diff --git a/.run/10-rbac-base.sql.run.xml b/.run/10-rbac-base.sql.run.xml new file mode 100644 index 00000000..161d087d --- /dev/null +++ b/.run/10-rbac-base.sql.run.xml @@ -0,0 +1,8 @@ + + + + FILE + + + + \ No newline at end of file diff --git a/.run/12-rbac-role-builder.sql.run.xml b/.run/12-rbac-role-builder.sql.run.xml new file mode 100644 index 00000000..795a8278 --- /dev/null +++ b/.run/12-rbac-role-builder.sql.run.xml @@ -0,0 +1,8 @@ + + + + FILE + + + + \ No newline at end of file diff --git a/.run/18--rbac-all.sql.run.xml b/.run/18--rbac-all.sql.run.xml new file mode 100644 index 00000000..fb6890e6 --- /dev/null +++ b/.run/18--rbac-all.sql.run.xml @@ -0,0 +1,8 @@ + + + + FILE + + + + \ No newline at end of file diff --git a/.run/20-hs-base.sql.run.xml b/.run/20-hs-base.sql.run.xml new file mode 100644 index 00000000..90368bd3 --- /dev/null +++ b/.run/20-hs-base.sql.run.xml @@ -0,0 +1,8 @@ + + + + FILE + + + + \ No newline at end of file diff --git a/.run/21-hs-customer.sql.run.xml b/.run/21-hs-customer.sql.run.xml new file mode 100644 index 00000000..0b9f91e8 --- /dev/null +++ b/.run/21-hs-customer.sql.run.xml @@ -0,0 +1,8 @@ + + + + FILE + + + + \ No newline at end of file diff --git a/.run/22-hs-packages.sql.run.xml b/.run/22-hs-packages.sql.run.xml new file mode 100644 index 00000000..84095cc5 --- /dev/null +++ b/.run/22-hs-packages.sql.run.xml @@ -0,0 +1,8 @@ + + + + FILE + + + + \ No newline at end of file diff --git a/.run/23-hs-unixuser.sql.run.xml b/.run/23-hs-unixuser.sql.run.xml new file mode 100644 index 00000000..7b87185b --- /dev/null +++ b/.run/23-hs-unixuser.sql.run.xml @@ -0,0 +1,8 @@ + + + + FILE + + + + \ No newline at end of file diff --git a/.run/24-hs-domain.sql.run.xml b/.run/24-hs-domain.sql.run.xml new file mode 100644 index 00000000..678151b0 --- /dev/null +++ b/.run/24-hs-domain.sql.run.xml @@ -0,0 +1,8 @@ + + + + FILE + + + + \ No newline at end of file diff --git a/.run/25-hs-emailaddress.sql.run.xml b/.run/25-hs-emailaddress.sql.run.xml new file mode 100644 index 00000000..e33ea706 --- /dev/null +++ b/.run/25-hs-emailaddress.sql.run.xml @@ -0,0 +1,8 @@ + + + + FILE + + + + \ No newline at end of file diff --git a/.run/29-hs-statistics.sql.run.xml b/.run/29-hs-statistics.sql.run.xml new file mode 100644 index 00000000..e9790ad4 --- /dev/null +++ b/.run/29-hs-statistics.sql.run.xml @@ -0,0 +1,8 @@ + + + + FILE + + + + \ No newline at end of file diff --git a/.run/run all up to emailaddresses.run.xml b/.run/run all up to emailaddresses.run.xml new file mode 100644 index 00000000..ddbed0d5 --- /dev/null +++ b/.run/run all up to emailaddresses.run.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + FILE + + + + \ No newline at end of file diff --git a/.yo-rc.json b/.yo-rc.json deleted file mode 100644 index 9b35dabe..00000000 --- a/.yo-rc.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "generator-jhipster": { - "promptValues": { - "packageName": "org.hostsharing.hsadminng", - "nativeLanguage": "de" - }, - "jhipsterVersion": "5.8.2", - "applicationType": "monolith", - "baseName": "hsadminNg", - "packageName": "org.hostsharing.hsadminng", - "packageFolder": "org/hostsharing/hsadminng", - "serverPort": "8080", - "authenticationType": "jwt", - "cacheProvider": "ehcache", - "enableHibernateCache": false, - "websocket": false, - "databaseType": "sql", - "devDatabaseType": "h2Memory", - "prodDatabaseType": "postgresql", - "searchEngine": false, - "messageBroker": false, - "serviceDiscoveryType": false, - "buildTool": "gradle", - "enableSwaggerCodegen": true, - "jwtSecretKey": "ZDFlMDUzODIzMTUzZDEwZjExN2E5ZjAzY2VhZmYzNDE1YjhlYWUxZGRhMGU3ODZiNjRkNjVlNzEwZjExYWY4YzczM2NlYzI5YWE1OTRkNWM0YThlYjZjZjA5Zjc5YWJkOTgzYjdhZjQxZWQyZGUyYjFlYjI5ZDE3NmE4M2UzYjQ=", - "clientFramework": "angularX", - "useSass": false, - "clientPackageManager": "npm", - "testFrameworks": ["cucumber"], - "jhiPrefix": "jhi", - "entitySuffix": "", - "dtoSuffix": "DTO", - "otherModules": [], - "enableTranslation": true, - "nativeLanguage": "de", - "languages": ["de", "en"] - } -} diff --git a/JHIPSTER.md b/JHIPSTER.md deleted file mode 100644 index 7ae9184c..00000000 --- a/JHIPSTER.md +++ /dev/null @@ -1,196 +0,0 @@ -# hsadminNg - -This application was generated using JHipster 5.8.2, you can find documentation and help at [https://www.jhipster.tech/documentation-archive/v5.8.2](https://www.jhipster.tech/documentation-archive/v5.8.2). - -## Development - -Before you can build this project, you must install and configure the following dependencies on your machine: - -1. [Node.js][]: We use Node to run a development web server and build the project. - Depending on your system, you can install Node either from source or as a pre-packaged bundle. - -After installing Node, you should be able to run the following command to install development tools. -You will only need to run this command when dependencies change in [package.json](package.json). - - npm install - -We use npm scripts and [Webpack][] as our build system. - -Run the following commands in two separate terminals to create a blissful development experience where your browser -auto-refreshes when files change on your hard drive. - - ./gradlew - npm start - -Npm is also used to manage CSS and JavaScript dependencies used in this application. You can upgrade dependencies by -specifying a newer version in [package.json](package.json). You can also run `npm update` and `npm install` to manage dependencies. -Add the `help` flag on any command to see how you can use it. For example, `npm help update`. - -The `npm run` command will list all of the scripts available to run for this project. - -### Service workers - -Service workers are commented by default, to enable them please uncomment the following code. - -- The service worker registering script in index.html - -```html - -``` - -Note: workbox creates the respective service worker and dynamically generate the `service-worker.js` - -### Managing dependencies - -For example, to add [Leaflet][] library as a runtime dependency of your application, you would run following command: - - npm install --save --save-exact leaflet - -To benefit from TypeScript type definitions from [DefinitelyTyped][] repository in development, you would run following command: - - npm install --save-dev --save-exact @types/leaflet - -Then you would import the JS and CSS files specified in library's installation instructions so that [Webpack][] knows about them: -Edit [src/main/webapp/app/vendor.ts](src/main/webapp/app/vendor.ts) file: - -``` -import 'leaflet/dist/leaflet.js'; -``` - -Edit [src/main/webapp/content/css/vendor.css](src/main/webapp/content/css/vendor.css) file: - -``` -@import '~leaflet/dist/leaflet.css'; -``` - -Note: there are still few other things remaining to do for Leaflet that we won't detail here. - -For further instructions on how to develop with JHipster, have a look at [Using JHipster in development][]. - -### Using angular-cli - -You can also use [Angular CLI][] to generate some custom client code. - -For example, the following command: - - ng generate component my-component - -will generate few files: - - create src/main/webapp/app/my-component/my-component.component.html - create src/main/webapp/app/my-component/my-component.component.ts - update src/main/webapp/app/app.module.ts - -### Doing API-First development using openapi-generator - -[OpenAPI-Generator]() is configured for this application. You can generate API code from the `src/main/resources/swagger/api.yml` definition file by running: - -```bash -./gradlew openApiGenerate -``` - -Then implements the generated delegate classes with `@Service` classes. - -To edit the `api.yml` definition file, you can use a tool such as [Swagger-Editor](). Start a local instance of the swagger-editor using docker by running: `docker-compose -f src/main/docker/swagger-editor.yml up -d`. The editor will then be reachable at [http://localhost:7742](http://localhost:7742). - -Refer to [Doing API-First development][] for more details. - -## Building for production - -To optimize the hsadminNg application for production, run: - - ./gradlew -Pprod clean bootWar - -This will concatenate and minify the client CSS and JavaScript files. It will also modify `index.html` so it references these new files. -To ensure everything worked, run: - - java -jar build/libs/*.war - -Then navigate to [http://localhost:8080](http://localhost:8080) in your browser. - -Refer to [Using JHipster in production][] for more details. - -## Testing - -To launch your application's tests, run: - - ./gradlew test - -### Client tests - -Unit tests are run by [Jest][] and written with [Jasmine][]. They're located in [src/test/javascript/](src/test/javascript/) and can be run with: - - npm test - -For more information, refer to the [Running tests page][]. - -### Code quality - -Sonar is used to analyse code quality. You can start a local Sonar server (accessible on http://localhost:9001) with: - -``` -docker-compose -f src/main/docker/sonar.yml up -d -``` - -Then, run a Sonar analysis: - -``` -./gradlew -Pprod clean test sonarqube -``` - -For more information, refer to the [Code quality page][]. - -## Using Docker to simplify development (optional) - -You can use Docker to improve your JHipster development experience. A number of docker-compose configuration are available in the [src/main/docker](src/main/docker) folder to launch required third party services. - -For example, to start a postgresql database in a docker container, run: - - docker-compose -f src/main/docker/postgresql.yml up -d - -To stop it and remove the container, run: - - docker-compose -f src/main/docker/postgresql.yml down - -You can also fully dockerize your application and all the services that it depends on. -To achieve this, first build a docker image of your app by running: - - ./gradlew bootWar -Pprod jibDockerBuild - -Then run: - - docker-compose -f src/main/docker/app.yml up -d - -For more information refer to [Using Docker and Docker-Compose][], this page also contains information on the docker-compose sub-generator (`jhipster docker-compose`), which is able to generate docker configurations for one or several JHipster applications. - -## Continuous Integration (optional) - -To configure CI for your project, run the ci-cd sub-generator (`jhipster ci-cd`), this will let you generate configuration files for a number of Continuous Integration systems. Consult the [Setting up Continuous Integration][] page for more information. - -[jhipster homepage and latest documentation]: https://www.jhipster.tech -[jhipster 5.8.2 archive]: https://www.jhipster.tech/documentation-archive/v5.8.2 -[using jhipster in development]: https://www.jhipster.tech/documentation-archive/v5.8.2/development/ -[using docker and docker-compose]: https://www.jhipster.tech/documentation-archive/v5.8.2/docker-compose -[using jhipster in production]: https://www.jhipster.tech/documentation-archive/v5.8.2/production/ -[running tests page]: https://www.jhipster.tech/documentation-archive/v5.8.2/running-tests/ -[code quality page]: https://www.jhipster.tech/documentation-archive/v5.8.2/code-quality/ -[setting up continuous integration]: https://www.jhipster.tech/documentation-archive/v5.8.2/setting-up-ci/ -[node.js]: https://nodejs.org/ -[yarn]: https://yarnpkg.org/ -[webpack]: https://webpack.github.io/ -[angular cli]: https://cli.angular.io/ -[browsersync]: http://www.browsersync.io/ -[jest]: https://facebook.github.io/jest/ -[jasmine]: http://jasmine.github.io/2.0/introduction.html -[protractor]: https://angular.github.io/protractor/ -[leaflet]: http://leafletjs.com/ -[definitelytyped]: http://definitelytyped.org/ -[openapi-generator]: https://openapi-generator.tech -[swagger-editor]: http://editor.swagger.io -[doing api-first development]: https://www.jhipster.tech/documentation-archive/v5.8.2/doing-api-first-development/ diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index bb4438e7..00000000 --- a/Jenkinsfile +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env groovy - -node { - withEnv(["PATH=$HOME/bin:$PATH"]) { - stage('checkout') { - checkout scm - } - - stage('check java') { - sh "java -version" - } - - stage('clean+spotless') { - sh "chmod +x gradlew" - sh "./gradlew clean spotlessCheck --no-daemon" - } - - stage('npm install') { - sh "./gradlew npm_install -PnodeInstall --no-daemon" - } - - stage('backend tests') { - try { - sh "./gradlew test -PnodeInstall --no-daemon" - } catch (err) { - throw err - } finally { - junit '**/build/**/TEST-*.xml' - } - } - - stage('backend check') { - try { - sh "./gradlew check -PnodeInstall --no-daemon" - } catch (err) { - throw err - } finally { - archiveArtifacts artifacts: '**/build/reports/jacoco/test/html/', fingerprint: true - } - } - - stage('frontend tests') { - try { - sh "./gradlew npm_run_test -PnodeInstall --no-daemon" - } catch (err) { - throw err - } finally { - junit '**/build/test-results/TESTS-*.xml' - } - } - - stage('packaging') { - sh "./gradlew bootWar -x test -Pprod -PnodeInstall --no-daemon" - archiveArtifacts artifacts: '**/build/libs/*.war', fingerprint: true - } - } -} diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..a7ab6be3 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,26 @@ +The MIT License (MIT) +===================== + +Copyright ©2022 Michael Hönnig + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + diff --git a/README.md b/README.md index f7ab026e..5830fdfa 100644 --- a/README.md +++ b/README.md @@ -1,350 +1,332 @@ # hsadminNg Development - - +This documents gives an overview of the development environment and tools. +For architecture consider the files in the `doc` and `adr` folder. -- [Setting up the Development Environment](#setting-up-the-development-environment) -- [Frequent Tasks](#frequent-tasks) - - [Building the Application with Test Execution](#building-the-application-with-test-execution) - - [Starting the Application](#starting-the-application) - - [Running JUnit tests with branch coverage](#running-junit-tests-with-branch-coverage) -- [HOWTO Commits](#howto-commits) - - [Creating HOWTO Commits](#creating-howto-commits) -- [Special Build Tasks](#special-build-tasks) - - [Spotless Formatting](#spotless-formatting) - - [Mutation Testing PiTest](#mutation-testing-pitest) - - [Git Workflow for JHipster Generator](#git-workflow-for-jhipster-generator) - - [Generating the Table of Contents for Markdown](#generating-the-table-of-contents-for-markdown) - - + +- [Setting up the Development Environment](#setting-up-the-development-environment) + - [SDKMAN](#sdkman) + - [PostgreSQL Server](#postgresql-server) + - [Markdown](#markdown) + - [Render Markdown embedded PlantUML](#render-markdown-embedded-plantuml) + - [Other Tools](#other-tools) +- [Running the SQL files](#running-the-sql-files) + - [For RBAC](#for-rbac) + - [For Historization](#for-historization) + ## Setting up the Development Environment -You'll often need to execute `./gradlew`, therefore we suggest to define this alias: +All instructions assume that you're using a current _Linux_ or _MacOS_ operating system. +Everything is tested on _Ubuntu Linux 22.04_ and _MacOS Monterey (12.4)_. - alias gw='./gradlew' +To be able to build and run the Java Spring Boot application, you need the following tools: -TODO: Instructions for setting up the dev environment from scratch. +- Docker 20.x (on MacOS you also need *Docker Desktop* or similar) +- PostgreSQL Server 13.7-bullseye (see instructions below to install and run in Docker) +- Java JDK 17.x +- Gradle in some not too outdated version (7.4 will be installed via wrapper) -## Frequent Tasks +You also might need an IDE (e.g. *IntelliJ IDEA* or *Eclipse* or *VS Code* with *[STS](https://spring.io/tools)* and a GUI Frontend for *PostgreSQL* like *Postbird*. -### Building the Application with Test Execution +If you have at least Docker, the Java JDK and Gradle installed in appropriate versions and in your `PATH`, then you can start like this: - gw build + cd your-hsadmin-ng-directory + + gradle wrapper # downloads Gradle 7.5 into the project + source .aliases # creates some comforable bash aliases, e.g. 'gw'='./gradlew' -### Starting the Application + gw test # compiles and runs unit- and integration-tests + + pg-sql-run # downloads + runs PostgreSQL in a Docker container on localhost:5432 + gw bootRun # compiles and runs the application on localhost:8080 -To use an **H2 in-memory database** populated with sample-data. + # the following command should reply with "pong": + curl http://localhost:8080/api/ping - gw bootRun + # the following command should return a JSON array with just all customers: + curl \ + -H 'current-user: mike@hostsharing.net' \ + http://localhost:8080/api/customers -To use an **H2 file-based database**, start the application with the h2file profile: + # the following command should return a JSON array with just all packages visible for the admin of the customer aab: + curl \ + -H 'current-user: mike@hostsharing.net' -H 'assumed-roles: customer#aab.admin' \ + http://localhost:8080/api/packages - gw bootRun -Ph2file - gw bootRun -Ph2file -Psample-data # populated with sample data + # add a new customer + curl \ + -H 'current-user: mike@hostsharing.net' -H "Content-Type: application/json" \ + -d '{ "prefix":"baa", "reference":80001, "adminUserName":"admin@baa.example.com" }' \ + -X POST http://localhost:8080/api/customers -To use a **local Postgres database**, first prepare your environment: +If you wonder who 'mike@hostsharing.net' and 'sven@hostsharing.net' are and where the data comes from: +Mike and Sven are just example Hostsharing hostmaster accounts as part of the example data which is automatically inserted in Testcontainers and Development environments. +Also try for example 'admin@aaa.example.com' or 'unknown@example.org'. - export HSADMINNG_DB_URL='jdbc:postgresql://localhost:5432/DBNAME' - export HSADMINNG_DB_USER='DBUSER' - export HSADMINNG_DB_PASS='DBPASS' +If you want a formatted JSON output, you can pipe the result to `jq` or similar. -Where `DBNAME`, `DBUSER` and `DBPASS` are replaced by your credentials. +And to see the full, currently implemented, API, open http://localhost:8080/swagger-ui/index.html. -Then start the application with the pgsql profile: +If you still need to install some of these tools, find some hints in the next chapters. - gw bootRun -Ppgsql - gw bootRun -Ppgsql -Psample-data # populated with sample data -To use a **remote Postgres database** on a Hostsharing server, +### SDKMAN - autossh -M 0 -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" \ - -f -N -L 55432:127.0.0.1:5432 "xyz00@xyz.hostsharing.net" +*SdkMan* is not necessary, but helpful to install and switch between different versions of SDKs (Software-Development-Kits) and development tools in general, e.g. *JDK* and *Gradle*. +It is available for _Linux_ and _MacOS_, _WSL_, _Cygwin_, _Solaris_ and _FreeBSD_. -Then prepare your environment, e.g. like this: +You can get it from: https://sdkman.io/. - export HSADMINNG_DB_URL='jdbc:postgresql://localhost:55432/xyz00_hsadminng' - export HSADMINNG_DB_USER='xyz00_hsadminng' - export HSADMINNG_DB_PASS='whatever' +**⚠** +Yeah, the `curl ... | bash` install method looks quite scary; +but in a development environment you're downloading executables all the time, +e.g. through `npm`, `Maven` or `Gradle` when downloading dependencies. +Thus, maybe you should at least use a separate Linux account for development. -In all cases, you can also **specify the port** to used for the application via environment: +Once it's installed, you can install *JDK* and *Gradle*: - SERVER_PORT=8081 gw bootRun ... + sdk install java 17.0.3-tem + sdk install gradle -For starting the JVM of the application in **debug-mode**, add `--debug-jvm` to any of the options above, e.g. + sdk use java 17.0.3-tem # use this to switch between installed JDK versions - gw bootRun -Ppgsql -Psample-data --debug-jvm -### Running JUnit tests with branch coverage +### PostgreSQL Server -#### for IntelliJ IDEA +You could use any PostgreSQL Server (from version 13 on) installed on your machine. +You might amend the port and user settings in `src/main/resources/application.yml`, though. -see: https://confluence.jetbrains.com/display/IDEADEV/IDEA+Coverage+Runner +But the easiest way to run PostgreSQL is via Docker. -Either apply it to specific test configurations or, -better, delete the previous test configurations and amend the JUnit template. +Initially, pull an image compatible to current PostgreSQL version of Hostsharing: -## HOWTO Commits + docker pull postgres:13.7-bullseye -There are git tags on some commits which show how to add certain features. +**⚠** +If we switch the version, please also amend the documentation as well as the aliases file. Thanks! -Find all of such tags with: +Create and run a container with the given PostgreSQL version: - git tag | grep HOWTO + docker run --name hsadmin-ng-postgres -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres:13.7-bullseye -### Creating HOWTO Commits + # or via alias: + pg-sql-run -If you want to add such a commit, make sure that it contains no clutter -(no changes which are not necessary for whatever the commit is about to explain), -and is complete with all unit tests, code coverage, pitest and other checks. -Otherwise the next developer would run into the same problems again. +To check if the PostgreSQL container is running, the following command should list a container with the name "hsadmin-ng-postgres": -One way to keep the commit clean, is to develop it on a local branch. -If any other changes (e.g. bugfixes, API extensions etc.) are necessary, -apply these only to the master or cherry-pick just these to the master, -then rebase your local branch. Do not forget to run all checks locally: + docker container ls - gw clean check pitest # might need over an hour +Stop the PostgreSQL container: + + docker stop hsadmin-ng-postgres + # or via alias: pg-sql-stop -(Check the PiTest section for speeding up mutation testing.) +Start the PostgreSQL container again: -To create and push a new tag use: + docker container start hsadmin-ng-postgres + # or via alias: pg-sql-start - git tag HOWTO-... master - git push origin HOWTO-... +Remove the PostgreSQL container: -To moved an existing the tag to another commit (here current master again), do this: + docker rm hsadmin-ng-postgres + + # or via alias: + pg-sql-remove - git tag --force HOWTO-... master - git push --force origin HOWTO-... +To reset to a clean database, use: -## Special Build Tasks + pg-sql-stop; pg-sql-remove; pg-sql-run -Besides common build tasks like `build`, `test` or `bootRun` this projects has some not so common tasks which are explained in this section. + # or via alias: + pg-sql-reset -### Spotless Formatting +After the PostgreSQL container is removed, you need to create it again as shown in "Create and run ..." above. -To make sure that no IDE auto-formatter destroys the git history of any file and -especially to avoid merge conflicts from JHipster generated files after these had been changed, -we are using a standard formatter enforced by _spotless_, which is based on the standard Eclipse formatter. +Given the container is running, to create a backup in ~/backup, run: -The rules can be checked and applied with these commands: + docker exec -i hsadmin-ng-postgres /usr/bin/pg_dump --clean --create -U postgres postgres | gzip -9 > ~/backup/hsadmin-ng-postgres.sql.gz - gw spotlessCheck - gw spotlessApply + # or via alias: + pg-sql-backup >~/backup/hsadmin-ng-postgres.sql.gz -The spotlessCheck task is included as an early step in our Jenkins build pipeline. -Therefore wrong formatting is automatically detected. -Our configuration can be found under the directory `cfg/spotless`. -Currently we only have specific rules for _\*.java_-files and their import-order. +Again, given the container is running, to restore the backup from ~/backup, run: -#### Our Changes to the Standard Eclipse Formatter + gunzip --stdout --keep ~/backup/hsadmin-ng-postgres.sql.gz | docker exec -i hsadmin-ng-postgres psql -U postgres -d postgres -We amended the Standard Eclipse Formatter in these respects: + # or via alias: + pg-sql-restore <~/backup/hsadmin-ng-postgres.sql.gz -- Lines of code are never joined, thus the developer has control about linebreaks, - which is important for readability in some implementations like toString(). -- Lines in comments are never joined either, because that often destroys readable stucture. -- Parts of files can be excluded from getting formatted, by using `@formatter:off` and `@formatter:on` in a comment. - See for example in class `SecurityConfiguration`. -#### Pre-Commit Hook +### Markdown -If you like, you could add this code to the _pre-commit or \_pre_push_ hook\_ in your `.git/hooks` directory: +To generate the TOC (Table of Contents), a little bash script from a +[Blog Article](https://medium.com/@acrodriguez/one-liner-to-generate-a-markdown-toc-f5292112fd14) was used. - if ! ./gradlew spotlessCheck; then - exit 1 - fi +To render the Markdown files, especially to watch embedded PlantUML diagrams, you can use one of the following methods: -#### The Tagged Spotless Commit +#### Render Markdown embedded PlantUML -The commit which introduces the spotless configuration is tagged. -Through this tag it can easily be cherry-picked in the JHipster workflow. +Can you see the following diagram right in your IDE? +I mean a real graphic diagram, not just some markup code. -If you need to amend the commit tagged 'spotless', e.g. to change the spotless configuration, -it can be done with these steps: +```plantuml +@startuml +me -> you: Can you see this diagram? +you -> me: Sorry, I don't :-( +me -> you: Install some tooling! +@enduml +``` - git tag REAL-HEAD - git reset --hard spotless^ - git cherry-pick -n spotless - ... - git add . - # do NOT run: gw spotlessApply yet! - # for the case you have a commit hook which runs spotlessCheck: - git commit --no-verify - git tag --force spotless - git push --no-verify origin spotless - git reset --hard REAL-HEAD - git tag -d REAL-HEAD +If not, you need to install some tooling. -### Mutation Testing PiTest +##### for IntelliJ IDEA (or derived products) - ./gradlew pitest +You just need the bundled Markdown plugin enabled and install and activate the PlantUML plugin in its settings: -Runs (almost) all JUnit tests under mutation testing. -Mutation testing is a means to determine the quality of the tests. +jetbrains://idea/settings?name=Languages+%26+Frameworks--Markdown -On Jenkins, the results can be found in the build artifacts under: +You might also need to install Graphviz on your operating system. +For Debian-based Linux systems this might work: -- https://ci.hostsharing.net/job/hsadmin-ng-pitest/XX/artifact/build/reports/pitest/index.html +```sh +sudo apt install graphviz +``` -Where XX is the build number. Or for the latest build under: -- https://ci.hostsharing.net/job/hsadmin-ng-pitest/lastCompletedBuild/artifact/build/reports/pitest/index.html +##### Ubuntu Linux command line -#### Some Background Information on Mutation Testing +```sh +sudo apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra pandoc-plantuml-filter +``` -PiTest does it with these steps: +```sh +pandoc --filter pandoc-plantuml rbac.md -o rbac.pdf +``` -- initially PiTest checks which production code is executed by which tests -- if the tests don't pass, it stops -- otherwise the production code is 'mutated' and PiTest checks whether this makes a test fail ('mutant killed') -- Finally it checks thresholds for coverage and mutant killing. +##### for other IDEs / operating systems -More information about can be found here: +If you have figured out how it works, please add instructions above this section. -- PiTest: http://pitest.org/ -- gradle-plugin: https://gradle-pitest-plugin.solidsoft.info/ +### Other Tools -#### How to Configure PiTest +**jq**: a JSON formatter. +On _Debian_'oid systems you can install it with `sudo apt-get install jq`. +On _MacOS_ you can install it with `brew install jq`, given you have _brew_ installed. -These thresholds can be configured in `build.gradle`, -but we should generally not lower these. +## Running the SQL files -There is also a list of excluded files, all generated by JHipster or MapStruct, not containing any changes by us. +### For RBAC -As you might figure, mutation testing is CPU-hungry. -To limit load in our Jenkins build server, it only uses 2 CPU threads, thus it needs over an hour. +The Schema is automatically created via *Liquibase*, a database migration library. +Currently, also some test data is automatically created. -If you want to spend more CPU threads on your local system, you can change that via command line: +To increase the amount of test data, increase the number of generated customers in `2022-07-28-051-hs-customer.sql` and run that - gw pitest -Doverride.pitest.threads=7 +If you already have data, e.g. for customers 0..999 (thus with reference numbers 10000..10999) and want to add another 1000 customers, amend the for loop to 1000...1999 and also uncomment and amend the `CONTINUE WHEN` or `WHERE` conditions in the other test data generators, using the first new customer reference number (in the example that's 11000). -I suggest to leave one CPU thread for other tasks or your might lag extremely. +### For Historization -### Git Workflow for JHipster Generator +The historization is not yet integrated into the *Liquibase*-scripts. +You can explore the prototype as follows: -The following workflow steps make sure that +- start with an empty database + (the example tables are currently not compatible with RBAC), +- then run `historization.sql` in the database, +- finally run `examples.sql` in the database. -- JHipster re-imports work properly, -- the git history of changes to the JDL-files, the generated code and the master is comprehensible, -- and merging newly generated code to the master branch is smooth. +## Coding Guidelines -It uses a git branch `jhipster-generated` to track the history of the JDL model file and the generated source code. -Applying commits which contain non-generated changes to that branch breaks the normal git history for generated files. -Therefore, this documentation is also not available in that branch. -Thus: +### Directory and Package Structure -**MANUAL STEP before starting:** Copy this workflow documentation, because this file will be gone once you switched the branch. +Generally, the standard Java directory structure is used, where productive and test code are sparated like this: -| WARNING: The following steps are just a guideline. You should understand what you are doing! | -| -------------------------------------------------------------------------------------------- | +``` +src + main/ + java/ + net.hostsharing.hasadminng/ + resources/ + + test/ + java/ + net.hostsharing.hasadminng/ + resources/ +``` +The Java package structure below contains: -#### 1. Preparing the `jhipster-generated` git Branch +- config and global (utility) packages, + these should not access any other packages within the project +- rbac, containing all packages related to the RBAC subsystem +- hs, containing Hostsharing business object related packages -This step assumes that the latest `*.jdl` files are on the `HEAD` of the `jhipster-generated` git branch. -On a re-import of a JDL-file, JHipster does not remove any generated classes which belong to entities deleted from the JDL-file. -Therefore, the project has to be reset to a clean state before changes to the JDL file can be re-imported. -We have not yet finally tested a simplified workflow for just adding new entities or properties. +Underneath of rbac and hs, the structure is business oriented, NOT technical / layer -oriented. -A git tag `jdl-base` is assumed to sit on the base commit after the application was generated, but before any entities were imported. +Some of these rules are checked with *ArchUnit* unit tests. - git checkout jhipster-generated - git pull - git tag REAL-HEAD - git reset --hard jdl-base - git clean -f -d - git cherry-pick -n spotless - git reset --soft REAL-HEAD - git checkout REAL-HEAD src/main/jdl/customer.jdl - git checkout REAL-HEAD src/main/jdl/accessrights.jdl - git checkout REAL-HEAD src/main/jdl/... # once there are more - git tag -d REAL-HEAD +### Spotless Code Formatting -#### 2. Amending and Re-Importing the JDL +Code formatting for Java is checked via *spotless*. +The formatting style can be checked with this command: -**MANUAL STEP:** First apply all necessary changes to the JDL files. -Then re-import like this: +```shell +gw spotlessCheck +``` - # (Re-) Importing - jhipster import-jdl src/main/jdl/customer.jdl - jhipster import-jdl src/main/jdl/accessrights.jdl - jhipster import-jdl src/main/jdl/... # once there are more +This task is also included in `gw build`. -For smoothly being able to merge, we need the same formatting in the generated code as on the master: +To apply formatting rules, use: - gw spotlessApply +```shell +gw spotlessApply +``` -#### 3. Committing our Changes - git add . - git commit -m"..." +## How To -#### 4. Merging our Changes to the `master` Branch +### How to Use a Persistent Database for Integration Tests? - git checkout master - git pull +Usually, the `DataJpaTest` integration tests run against a database in a temporary docker container. +As soon as the test ends, the database is gone; this might make debugging difficult. -**MANUAL STEP:** If you've renamed any identifiers, use the refactoring feature of your IDE to rename in master as well. -To avoid oodles of merge-conflicts, you need to do that **BEFORE MERGING!** -Commit any of such changes, if any. +Alternatively -Now we can finally merge our changes to master. +If the persistent database and the temporary database show different results, one of these reasons could be the cause: - git merge jhipster-generated +1. You might have some changesets only running in either context, + check the `context: ...` in the changeset control lines. +2. You might have changes in the database which interfere with the tests, + e.g. from a previous run of tests or manually applied. + It's best to run `pg-sql-reset && gw bootRun` before each test run, to have a clean database. + +## How to Amend Liquibase SQL Changesets? -It's a good idea doing this step in an IDE because it makes conflict resolving much easier. -Typical merge conflicts stem from: +Liquibase changesets are meant to be immutable and based on each other. +That means, once a changeset is written, it never changes, not even a whitespace or comment. +Liquibase is a *database migration tool*, not a *database initialization tool*. -- Random numbers in test data of `*IntTest.java` files. -- Timestamps in Liquibase-xml-Files. +This, if you need to add change a table, stored procedure or whatever, +create a new changeset and apply `ALTER`, `DROP`, `CREATE OR REPLACE` or whatever SQL commands to perform your changes. +These changes will be automatically applied once the application starts up again. +This way, any staging or production database will always match the application code. -Now, I suggest to run all tests locally: +But, during initial development that can be a big hassle because the database structure changes a lot in that stage. +Also, the actual structure of the database won't be easily recognized anymore through lots of migration changesets. - gw clean test +Therefore, during initial development, it's good approach just to amend the existing changesets and delete the database: -Once everything works again, we can push our new version: +```shell +pg-sql-reset +gw bootRun +``` - git push +**⚠** +Just don't forget switching to the migration mode, once there is a production database! -#### 5. General Aftermath +## Further Documentation -Think about which additional code could be effected by your JDL-changes! -Files which are not at all in the `jhipster-generated` branch, don't show conflicts even though they might need changes. - -Here some examples for amendments to be done: - -- in `historicization_*.xml`: the columns or their constraints -- `sampledata/*.xml/csv` - -If you find more of such general cases, please add them here! - -#### 6. Special Aftermath for new Entities - -Because we have added quite some functionality, after introducing new entities, there is a lot more to amend. -Here some issues to consider: - -- add sample-data for the new entity -- internal (Angular) frontend: add table filters -- internal (Angular) frontend: amend input fields for multiline, if applicable -- internal (Angular) frontend: check if dates are properly formatted -- \*Mapper: add displayLabel for entity itself and parents -- \*DTO: add access-right annotations with customized JSON serializer/deserializer -- Validator: implement entity-based validator and call it in the generated service -- external API: add new type to client library - -WARNING: This list is most likely incomplete. Pleas add any new found issue! - -For many of these issues look for HOWTO-commits in git or HOWTO comments in the source code. - -### Generating the Table of Contents for Markdown - -This README file contains a table of contents generated by _doctoc_. -It's quite simple to use: - -npm install -g doctoc -doctoc --maxlevel 3 README.md - -Further information can be found [https://github.com/thlorenz/doctoc/blob/master/README.md](on the _doctoc_ github page). +- the `doc` directory contains architecture concepts and a glossary +- TODO.md tracks requirements and progress for the contract of the initial project, + please do not amend anything in this document diff --git a/TODO-progress.png b/TODO-progress.png new file mode 100644 index 00000000..b08f6f12 Binary files /dev/null and b/TODO-progress.png differ diff --git a/angular.json b/angular.json deleted file mode 100644 index 85278e71..00000000 --- a/angular.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "hsadmin-ng": { - "root": "", - "sourceRoot": "src/main/webapp", - "projectType": "application", - "architect": {} - } - }, - "defaultProject": "hsadmin-ng", - "cli": { - "packageManager": "npm" - }, - "schematics": { - "@schematics/angular:component": { - "inlineStyle": true, - "inlineTemplate": false, - "spec": false, - "prefix": "jhi", - "styleExt": "css" - }, - "@schematics/angular:directive": { - "spec": false, - "prefix": "jhi" - }, - "@schematics/angular:guard": { - "spec": false - }, - "@schematics/angular:pipe": { - "spec": false - }, - "@schematics/angular:service": { - "spec": false - } - } -} diff --git a/build-cucumber.gradle b/build-cucumber.gradle deleted file mode 100644 index edc24fa2..00000000 --- a/build-cucumber.gradle +++ /dev/null @@ -1,24 +0,0 @@ -// Behaviour tests based on a deployed application. - -task cucumberTest(type: Test) { - description = "Execute cucumber BDD tests." - group = "verification" - include '**/CucumberTest*' - - // uncomment if the tests reports are not generated - // see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484 - // ignoreFailures true - reports.html.enabled = false -} - -check.dependsOn cucumberTest -task testReport(type: TestReport) { - destinationDir = file("$buildDir/reports/tests") - reportOn test -} - -task cucumberTestReport(type: TestReport) { - destinationDir = file("$buildDir/reports/tests") - reportOn cucumberTest -} - diff --git a/build-jacoco.gradle b/build-jacoco.gradle deleted file mode 100644 index 4b8de1ee..00000000 --- a/build-jacoco.gradle +++ /dev/null @@ -1,84 +0,0 @@ -// Checks code coverage of JUnit based tests. - -apply plugin: 'jacoco' - -jacoco { - toolVersion = "0.8.3a" -} - -test.finalizedBy jacocoTestReport -check.dependsOn jacocoTestCoverageVerification - -// Only for purely JHipster/MapStruct generated classes. -// Please do NOT add any self coded classes! -// Keep in mind, git will blame you ;-) -def jhipsterGeneratedClassesWithDecentCoverage = [ - 'org.hostsharing.hsadminng.repository.CustomAuditEventRepository', - 'org.hostsharing.hsadminng.service.ContactQueryService', - 'org.hostsharing.hsadminng.service.UserService', - 'org.hostsharing.hsadminng.service.CustomerContactQueryService' -] - -// Only for purely JHipster/MapStruct generated classes. -// Please do NOT add any self coded classes! -// Keep in mind, git will blame you ;-) -def jhipsterGeneratedClassesWithLowCoverage = [ - 'org.hostsharing.hsadminng.service.MailService', - 'org.hostsharing.hsadminng.security.SecurityUtils', - 'org.hostsharing.hsadminng.config.DefaultProfileUtil', - 'org.hostsharing.hsadminng.config.WebConfigurer', - 'org.hostsharing.hsadminng.web.rest.AccountResource', - 'org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator', - 'org.hostsharing.hsadminng.web.rest.errors.CustomParameterizedException', - 'org.hostsharing.hsadminng.config.audit.AuditEventConverter', - 'org.hostsharing.hsadminng.security.jwt.TokenProvider', - 'org.hostsharing.hsadminng.aop.logging.LoggingAspect', - 'org.hostsharing.hsadminng.HsadminNgApp', - '*.*QueryService', - '*.*Configuration', - '*MapperImpl', - '*Criteria', - '*_' -] - -def specialExceptions = [ - // lots of unreachable code due to error handling / verifications - 'org.hostsharing.hsadminng.service.accessfilter.JSonAccessFilter', - 'org.hostsharing.hsadminng.service.util.ReflectionUtil' -] - -jacocoTestCoverageVerification { - violationRules { - rule { - element = 'CLASS' - limit { - counter = 'BRANCH' - value = 'COVEREDRATIO' - // Increasing the threshold is fine, decreasing is not. - // Keep in mind, git will blame you ;-) - minimum = 0.95 - } - excludes = jhipsterGeneratedClassesWithDecentCoverage + jhipsterGeneratedClassesWithLowCoverage + specialExceptions - } - - rule { - element = 'CLASS' - limit { - counter = 'BRANCH' - value = 'COVEREDRATIO' - minimum = 0.80 - } - includes = jhipsterGeneratedClassesWithDecentCoverage - } - - rule { - element = 'CLASS' - limit { - counter = 'LINE' - value = 'COVEREDRATIO' - minimum = 0.85 - } - includes = specialExceptions - } - } -} diff --git a/build-pitest.gradle b/build-pitest.gradle deleted file mode 100644 index 2c6c5f83..00000000 --- a/build-pitest.gradle +++ /dev/null @@ -1,36 +0,0 @@ -// PiTest based mutation testing - -pitest { - targetClasses = ['org.hostsharing.hsadminng.*'] - - excludedClasses = [ - // Unit Testing Spring configurations makes little sense in most cases. - 'org.hostsharing.hsadminng.config.*', - 'org.hostsharing.hsadminng.ApplicationWebXml', - 'org.hostsharing.hsadminng.HsadminNgApp', - - // Unit testing this would need PowerMock and - // blackbox testing of random values has little value. - 'org.hostsharing.hsadminng.service.util.RandomUtil', - - // The following are mostly generated classes, - // as soon as we amend these, consider removing the exclude. - 'org.hostsharing.hsadminng.**Criteria', - 'org.hostsharing.hsadminng.**MapperImpl', - 'org.hostsharing.hsadminng.aop.logging.*', - 'org.hostsharing.hsadminng.web.rest.vm.*', - 'org.hostsharing.hsadminng.security.jwt.TokenProvider', - 'org.hostsharing.hsadminng.web.api.*' // API helpers, not the API itself - ] - threads = 2 - - // Do not set these limit lower! 96% each might sound great, but keep in mind: - // 91%*91% means that ~8% of the code are NOT properly covered by automated tests - // (100%-94%*96% = ~8%). Not counting defects which come through missing code :-) - coverageThreshold = 94 - mutationThreshold = 96 - - outputFormats = ['XML', 'HTML'] - timestampedReports = false - verbose = false -} diff --git a/build-spotless.gradle b/build-spotless.gradle deleted file mode 100644 index 7f2fe589..00000000 --- a/build-spotless.gradle +++ /dev/null @@ -1,15 +0,0 @@ -// apply and check standard formatting of files - -apply plugin: "com.diffplug.gradle.spotless" - -spotless { - // automatically format source files, see https://github.com/diffplug/spotless - java { - licenseHeader '// Licensed under Apache-2.0' - importOrderFile 'cfg/spotless/hsadminng.importorder' - eclipse().configFile 'cfg/spotless/eclipse_formatter.xml' - target 'src/main/**/*.java', 'src/test/**/*.java' - removeUnusedImports() - endWithNewline() - } -} diff --git a/build.gradle b/build.gradle index 1902c6d5..1554c337 100644 --- a/build.gradle +++ b/build.gradle @@ -1,297 +1,68 @@ -import org.gradle.internal.os.OperatingSystem - -buildscript { - repositories { - mavenLocal() - mavenCentral() - maven { url "http://repo.spring.io/plugins-release" } - maven { url "https://plugins.gradle.org/m2/" } - } - dependencies { - classpath "org.springframework.boot:spring-boot-gradle-plugin:${spring_boot_version}" - classpath "io.spring.gradle:propdeps-plugin:0.0.10.RELEASE" - classpath "org.openapitools:openapi-generator-gradle-plugin:3.3.0" - classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:1.5.2" - //jhipster-needle-gradle-buildscript-dependency - JHipster will add additional gradle build script plugins here - - classpath "com.diffplug.spotless:spotless-plugin-gradle:3.22.0" - classpath 'org.owasp:dependency-check-gradle:4.0.2' - } -} - plugins { - id "org.sonarqube" version "2.6.2" - id "net.ltgt.apt-eclipse" version "0.19" - id "net.ltgt.apt-idea" version "0.19" - id "net.ltgt.apt" version "0.19" - id "io.spring.dependency-management" version "1.0.6.RELEASE" - id "com.moowork.node" version "1.2.0" - id 'org.liquibase.gradle' version '2.0.1' - id 'info.solidsoft.pitest' version '1.4.0' - //jhipster-needle-gradle-plugins - JHipster will add additional gradle plugins here + id 'java' + id 'org.springframework.boot' version '2.7.2' + id 'io.spring.dependency-management' version '1.0.12.RELEASE' + id "com.diffplug.spotless" version "6.9.0" } -apply plugin: 'java' -apply plugin: 'org.owasp.dependencycheck' -sourceCompatibility=1.8 -targetCompatibility=1.8 - -apply plugin: 'maven' -apply plugin: 'org.springframework.boot' -apply plugin: 'war' -apply plugin: 'propdeps' -apply plugin: 'com.moowork.node' -apply plugin: 'io.spring.dependency-management' -apply plugin: 'idea' - -apply from: 'build-jacoco.gradle' -apply from: 'build-pitest.gradle' -apply from: 'build-spotless.gradle' - -idea { - module { - excludeDirs += files('node_modules') - } -} - -dependencyManagement { - imports { - mavenBom 'io.github.jhipster:jhipster-dependencies:' + jhipster_dependencies_version - //jhipster-needle-gradle-dependency-management - JHipster will add additional dependencies management here - } -} - -defaultTasks 'bootRun' - -group = 'org.hostsharing.hsadminng' +group = 'net.hostsharing' version = '0.0.1-SNAPSHOT' - -description = '' - -bootWar { - mainClassName = 'org.hostsharing.hsadminng.HsadminNgApp' -} - -war { - webAppDirName = 'build/www/' - enabled = true - extension = 'war.original' -} - -springBoot { - mainClassName = 'org.hostsharing.hsadminng.HsadminNgApp' -} - -if (OperatingSystem.current().isWindows()) { - // https://stackoverflow.com/questions/40037487/the-filename-or-extension-is-too-long-error-using-gradle - task classpathJar(type: Jar) { - dependsOn configurations.runtime - appendix = 'classpath' - - doFirst { - manifest { - attributes 'Class-Path': configurations.runtime.files.collect { - it.toURI().toURL().toString().replaceFirst(/file:\/+/, '/').replaceAll(' ', '%20') - }.join(' ') - } - } - } - - bootRun { - dependsOn classpathJar - doFirst { - classpath = files("$buildDir/classes/java/main", "$buildDir/resources/main", classpathJar.archivePath) - } - } -} - -test { - exclude '**/CucumberTest*' - - // uncomment if the tests reports are not generated - // see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484 - // ignoreFailures true - reports.html.enabled = false -} - -task cucumberTest(type: Test) { - description = "Execute cucumber BDD tests." - group = "verification" - include '**/CucumberTest*' - - // uncomment if the tests reports are not generated - // see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484 - // ignoreFailures true - reports.html.enabled = false -} - -check.dependsOn cucumberTest -task testReport(type: TestReport) { - destinationDir = file("$buildDir/reports/tests") - reportOn test -} - -task cucumberTestReport(type: TestReport) { - destinationDir = file("$buildDir/reports/tests") - reportOn cucumberTest -} - -apply from: 'gradle/docker.gradle' -apply from: 'gradle/sonar.gradle' -apply from: 'gradle/swagger.gradle' -//jhipster-needle-gradle-apply-from - JHipster will add additional gradle scripts to be applied here - -if (project.hasProperty('prod')) { - apply from: 'gradle/profile_prod.gradle' -} else { - apply from: 'gradle/profile_dev.gradle' -} - - -if (!project.hasProperty('runList')) { - project.ext.runList = 'main' -} - -project.ext.diffChangelogFile = 'src/main/resources/config/liquibase/changelog/' + new Date().format('yyyyMMddHHmmss') + '_changelog.xml' - -liquibase { - activities { - main { - driver '' - url '' - username 'hsadminNg' - password '' - changeLogFile 'src/main/resources/config/liquibase/master.xml' - defaultSchemaName '' - logLevel 'debug' - classpath 'src/main/resources/' - if (project.hasProperty('sample-data')) { - contexts 'sample-data' - } - } - diffLog { - driver '' - url '' - username 'hsadminNg' - password '' - changeLogFile project.ext.diffChangelogFile - referenceUrl 'hibernate:spring:org.hostsharing.hsadminng.domain?dialect=&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy' - defaultSchemaName '' - logLevel 'debug' - classpath "$buildDir/classes/java/main" - } - } - - runList = project.ext.runList -} +sourceCompatibility = '17' configurations { - providedRuntime - compile.exclude module: "spring-boot-starter-tomcat" + compileOnly { + extendsFrom annotationProcessor + } } repositories { - mavenLocal() mavenCentral() - jcenter() - //jhipster-needle-gradle-repositories - JHipster will add additional repositories } +ext { + set('testcontainersVersion', "1.17.3") +} + +// wrapper + dependencies { - // Use ", version: jhipster_dependencies_version, changing: true" if you want - // to use a SNAPSHOT release instead of a stable release - compile group: "io.github.jhipster", name: "jhipster-framework" - compile "org.springframework.boot:spring-boot-starter-cache" - compile "io.dropwizard.metrics:metrics-core" - compile 'io.micrometer:micrometer-registry-prometheus' - compile "net.logstash.logback:logstash-logback-encoder" - compile "com.fasterxml.jackson.datatype:jackson-datatype-hppc" - compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" - compile "com.fasterxml.jackson.datatype:jackson-datatype-hibernate5" - compile "com.fasterxml.jackson.core:jackson-annotations" - compile "com.fasterxml.jackson.core:jackson-databind" - compile "com.fasterxml.jackson.module:jackson-module-afterburner" - compile "javax.cache:cache-api" - compile "org.hibernate:hibernate-core" - compile "com.zaxxer:HikariCP" - compile "org.apache.commons:commons-lang3" - compile "commons-io:commons-io" - compile "javax.transaction:javax.transaction-api" - compile "org.ehcache:ehcache" - compile "org.hibernate:hibernate-entitymanager" - compile "org.hibernate:hibernate-envers" - compile "org.hibernate.validator:hibernate-validator" - compile "org.liquibase:liquibase-core" - compile "com.mattbertolini:liquibase-slf4j" - liquibaseRuntime "org.liquibase:liquibase-core" - liquibaseRuntime "org.liquibase.ext:liquibase-hibernate5:${liquibase_hibernate5_version}" - liquibaseRuntime sourceSets.main.compileClasspath - compile "org.springframework.boot:spring-boot-loader-tools" - compile "org.springframework.boot:spring-boot-starter-mail" - compile "org.springframework.boot:spring-boot-starter-logging" - compile "org.springframework.boot:spring-boot-starter-actuator" - compile "org.springframework.boot:spring-boot-starter-aop" - compile "org.springframework.boot:spring-boot-starter-data-jpa" - compile "org.springframework.boot:spring-boot-starter-security" - compile ("org.springframework.boot:spring-boot-starter-web") { - exclude module: 'spring-boot-starter-tomcat' - } - compile "org.springframework.boot:spring-boot-starter-undertow" - compile "org.springframework.boot:spring-boot-starter-thymeleaf" - compile "org.zalando:problem-spring-web:0.24.0-RC.0" - compile "org.springframework.boot:spring-boot-starter-cloud-connectors" - compile "org.springframework.security:spring-security-config" - compile "org.springframework.security:spring-security-data" - compile "org.springframework.security:spring-security-web" - compile "io.jsonwebtoken:jjwt-api" - runtime "io.jsonwebtoken:jjwt-impl" - runtime "io.jsonwebtoken:jjwt-jackson" - compile ("io.springfox:springfox-swagger2") { - exclude module: 'mapstruct' - } - compile "io.springfox:springfox-bean-validators" - compile "org.postgresql:postgresql" - liquibaseRuntime "org.postgresql:postgresql" - compile "org.mapstruct:mapstruct-jdk8:${mapstruct_version}" - annotationProcessor "org.mapstruct:mapstruct-processor:${mapstruct_version}" - annotationProcessor "org.hibernate:hibernate-jpamodelgen" - annotationProcessor ("org.springframework.boot:spring-boot-configuration-processor") { - exclude group: 'com.vaadin.external.google', module: 'android-json' - } - testCompile "com.jayway.jsonpath:json-path" - testCompile "io.cucumber:cucumber-junit" - testCompile "io.cucumber:cucumber-spring" - testCompile ("org.springframework.boot:spring-boot-starter-test") { - exclude group: 'com.vaadin.external.google', module: 'android-json' - } - testCompile "org.springframework.security:spring-security-test" - testCompile "org.springframework.boot:spring-boot-test" - testCompile "org.assertj:assertj-core" - testCompile "junit:junit" - testCompile "org.mockito:mockito-core" - testCompile "com.mattbertolini:liquibase-slf4j" - testCompile "org.hamcrest:hamcrest-library" - testCompile "com.h2database:h2" - liquibaseRuntime "com.h2database:h2" - //jhipster-needle-gradle-dependency - JHipster will add additional dependencies here + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-data-rest' + implementation 'org.springframework.boot:spring-boot-starter-jdbc' + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springdoc:springdoc-openapi-ui:1.6.9' + implementation 'org.liquibase:liquibase-core' + implementation 'com.vladmihalcea:hibernate-types-55:2.17.1' + + compileOnly 'org.projectlombok:lombok' + + developmentOnly 'org.springframework.boot:spring-boot-devtools' + + runtimeOnly 'org.postgresql:postgresql' + + annotationProcessor 'org.projectlombok:lombok' + + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation 'org.testcontainers:testcontainers' + testImplementation 'org.testcontainers:junit-jupiter' + testImplementation 'org.testcontainers:postgresql' + testImplementation 'com.tngtech.archunit:archunit-junit5:1.0.0-rc1' } -task cleanResources(type: Delete) { - delete 'build/resources' -} - -wrapper { - gradleVersion = '4.10.2' -} - -task stage(dependsOn: 'bootWar') { -} - -if (project.hasProperty('nodeInstall')) { - node { - version = "${node_version}" - npmVersion = "${npm_version}" - yarnVersion = "${yarn_version}" - download = false +dependencyManagement { + imports { + mavenBom "org.testcontainers:testcontainers-bom:${testcontainersVersion}" + } +} + +tasks.named('test') { + useJUnitPlatform() +} + +spotless { + java { + removeUnusedImports() + endWithNewline() + toggleOffOn() } } diff --git a/cfg/spotless/eclipse_formatter.xml b/cfg/spotless/eclipse_formatter.xml deleted file mode 100644 index 4a564e15..00000000 --- a/cfg/spotless/eclipse_formatter.xml +++ /dev/null @@ -1,315 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cfg/spotless/hsadminng.importorder b/cfg/spotless/hsadminng.importorder deleted file mode 100644 index da8e19e5..00000000 --- a/cfg/spotless/hsadminng.importorder +++ /dev/null @@ -1,8 +0,0 @@ -#Organize Import Order -6=javax -5=java -4=org -3=com -2= -1=org.hostsharing -0=\# diff --git a/cfg/spotless/javascript_formatters.xml b/cfg/spotless/javascript_formatters.xml deleted file mode 100755 index 08bdd71d..00000000 --- a/cfg/spotless/javascript_formatters.xml +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/doc/adr/2022-07-18.row-level-security-mechanism.md b/doc/adr/2022-07-18.row-level-security-mechanism.md new file mode 100644 index 00000000..51b72245 --- /dev/null +++ b/doc/adr/2022-07-18.row-level-security-mechanism.md @@ -0,0 +1,160 @@ +# Use VIEWs with JOIN into Permission-Assignments for Row-Level-Security + +**Status:** +- [x] proposed by Michael Hönnig +- [ ] accepted by (Participants) +- [ ] rejected by (Participants) +- [ ] superseded by (superseding ADR) + +## Context and Problem Statement + +We need to decide how to apply the access rules defined in our RBAC system to the visibility of table rows for the accessing user. + +The core problem here is, that in our RBAC system, determining the permissions of the accessing user has to consider a hierarchy of roles. + +### Technical Background + +The session variable `hsadminng.currentUser` contains the accessing (domain-level) user, which is unrelated to the PostgreSQL user). + +Given is a stored function `isPermissionGrantedToSubject` which detects if the accessing user has a given permission (e.g. 'view'). + +Given is also a stored function `queryAllPermissionsOfSubjectId` which returns the flattened view to all permissions assigned to the given accessing user. + +In the following code snippets `customer` is just an example domain table. + +## Considered Options + +* Perform Visibility-Checks programmatically in the Backend +* Add Visibility-Checks in the Backend +* POLICY with ENABLE ROW LEVEL SECURITY +* VIEW-RULE with ON SELECT DO INSTEAD +* VIEW with JOIN into Flattened Permissions + +### Perform Visibility-Checks programmatically in the Backend + +In this solution, the database ignores row level visibility and returns all rows which match a given query. Afterwards, the result is filtered programmatically with Java-code in the backend. + +#### Advantages + +Very flexible access, programmatic, rules could be implemented. + +The role-hierarchy and permissions for currently logged-in users user could be cached in the backend. + +The access logic can be tested in pure Java unit tests. + +At least regarding this aspect, an in-memory database could be used for integration testing; though the recursive Role-evaluation uses PostgreSQL features anyway. + +#### Disadvantages + +It's inefficient when initial query is not very restrictive, e.g. as on overview pages in a frontend, which often show all accessible objects, large parts or even whole database tables need to be transferred from the database to the backend. + +It's error-prone and security leaks can happen too easily, because after every query the access rights for all participating joins have to be considered. + +### Add Visibility-Checks in the Backend + +In this solution again, the database ignores row level visibility and returns all rows which match a given query. And the backend adds filter conditions to each query sent to the database. + +#### Advantages + +At least regarding this aspect, an in-memory database could be used for integration testing. + +#### Disadvantages + +It's error-prone and security leaks can happen too easily, because for every query the access rights for all participating joins have to be considered. + +### POLICY with ENABLE ROW LEVEL SECURITY + +For restricted DB-users, which are used by the backend, access to rows is filtered using a policy: + + SET SESSION AUTHORIZATION DEFAULT; + CREATE ROLE restricted; + GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO restricted; + ALTER TABLE customer ENABLE ROW LEVEL SECURITY; + CREATE POLICY customer_policy ON customer + FOR SELECT + TO restricted + USING ( + isPermissionGrantedToSubject(findPermissionId('customer', id, 'view'), currentUserId()) + ); + + SET SESSION AUTHORIZATION restricted; + SET hsadminng.currentUser TO 'alex@example.com'; + SELECT * from customer; -- will only return visible rows + +#### Advantages + +Using POLICY together with ENABLE ROW LEVEL SECURITY is the PostgreSQL native mechanism to control access to data on the role level. Therefore, it looked like an obvious and elegant solution. + +Every access at from the backend is under access control at the database level. + +### Disadvantages + +Unfortunately security mechanisms in PostgreSQL prevent the query optimizer to work well beyond ownership barriers (session user vs. table owner) and a SELECT from a table with 1 million objects needed over 30 seconds with our hierarchical RBAC policy. + +We are bound to PostgreSQL, including integration tests and testing the RBAC system itself. + +### VIEW-RULE with ON SELECT DO INSTEAD + + SET SESSION SESSION AUTHORIZATION DEFAULT; + CREATE VIEW cust_view AS + SELECT * FROM customer; + CREATE OR REPLACE RULE "_RETURN" AS + ON SELECT TO cust_view + DO INSTEAD + SELECT * FROM customer WHERE isPermissionGrantedToSubject(findPermissionId('customer', id, 'view'), currentUserId()); + + SET SESSION AUTHORIZATION restricted; + SET hsadminng.currentUser TO 'alex@example.com'; + SELECT * from customer; -- will only return visible rows + +#### Advantages + +Every access at from the backend is under access control at the database level. + +Also using ON UPDATE etc., original tables could be completely hidden from the backend, and thus improved security. + +### Disadvantages + +Unfortunately security mechanisms in PostgreSQL prevent the query optimizer to work well beyond ownership barriers (session user vs. table owner) and a SELECT from a table with 1 million objects needed over 30 seconds with our hierarchical RBAC policy. + +We are bound to PostgreSQL, including integration tests and testing the RBAC system itself. + +An extra view needed for every table. + + +### VIEW with JOIN into flattened permissions + +We do not access the tables directly from the backend, but via views which join the flattened permissions + + SET SESSION SESSION AUTHORIZATION DEFAULT; + CREATE OR REPLACE VIEW cust_view AS + SELECT c.id, c.reference, c.prefix + FROM customer AS c + JOIN queryAllPermissionsOfSubjectId(currentUserId()) AS p + ON p.tableName='customer' AND p.rowId=c.id AND p.op='view'; + GRANT ALL PRIVILEGES ON cust_view TO restricted; + + SET SESSION SESSION AUTHORIZATION restricted; + SET hsadminng.currentUser TO 'alex@example.com'; + SELECT * from cust_view; -- will only return visible rows + +Alternatively the JOIN could also be applied in a "ON SELECT DO INSTEAD"-RULE, if there is any advantage for later features. + +#### Advantages + +Every access at from the backend is under access control at the database level. + +No special PostgreSQL features needed; though the recursive Role-evaluation uses PostgreSQL features anyway. + +Very fast, on my laptop a SELECT * FROM a table with 1 million rows just took about 50ms. + +Also using ON UPDATE etc., original tables could be completely hidden from the backend, and thus improved security. + +### Disadvantages + +An extra view needed for every table. + + +## Decision Outcome + +We chose the option **"VIEW with JOIN into flattened permissions"** because it supports the best combination of performance and security with almost no disadvantge. diff --git a/doc/glossary.md b/doc/glossary.md new file mode 100644 index 00000000..cef96856 --- /dev/null +++ b/doc/glossary.md @@ -0,0 +1,64 @@ +### hsadminNg Glossary + +This is a collection of terms used in this project, which either might not be generally known or unclear in meaning. +If you miss something, please add it with a `TODO` marker. + +#### Blackbox-Test + +A blackbox-test does not know and not consider such internals of an implementation, it just tests externally observable behaviour. + + +#### Business Object + +Used in the RBAC-system to refer to an object from the business realm. +The usual term is *domain object* but in our context, the term *domain* could be too easily confused with a DNS *Internet domain*. + + +#### Dummy + +A *dummy* is a kind of *Test-Double* which replaces a real dependency which is not really needed in the test case. + + +#### Fake + +A *fake* is a kind of *Test-Double* without using any library, but rather a manual fake implementation of a dependency. + + +#### Mock + +A *mock* is a kind of *Test-Double* which can be configured to behaviours as needed by a test-case. + +Often the term "mock" is used in a generic way, because typical mocking libraries like *Mockito* can also be used as dummies or spies and can replace fakes. + + +#### RBAC + +Abbreviation for *Role Based Access Control*. +A system to control access to business objects by defining users, roles, and permissions. +See also [The INCITS 359-2012 Standard](https://www.techstreet.com/standards/incits-359-2012?product_id=1837530). + +In our case we are implementing a hierarchical RBAC for a hierarchical and dynamic business object structure. +More information can be found in our [RBAC Architecture Document](rbac.md). + + +#### Tenant + +*Tenant* is one of the standard roles of Hostsharing's RBAC system. +It is assigned as a sub-role to those who have rights on sub-objects of a business object. +Usually, tenants can only view the contents. + +Generally, tenant roles only apply for the mere existence, id and name of a business object, +not for internal details. +E.g. a tenant of a customer could be the administrator of a hosting package of that customer. +They can view some identifying information of that customer, but not view their billing and banking information. + + +#### Whitebox-Test + +A whitebox-test knows and considers the internals of an implementation, e.g. it knows which dependencies it needs and can test special, implementation-dependent cases. + + +#### Test-Double + +A "double" is a general term for something which replaces a real implementation of a dependency of the unit under test. +This can be a "dummy", a "fake", a "mock", a "spy" or a "stub". diff --git a/doc/rbac.md b/doc/rbac.md new file mode 100644 index 00000000..83a02241 --- /dev/null +++ b/doc/rbac.md @@ -0,0 +1,635 @@ +## *hsadmin-ng*'s Role-Based-Access-Management (RBAC) + +The requirements of *hsadmin-ng* include table-m row- and column-level-security for read and write access to business-objects. +More precisely, any access has to be controlled according to given rules depending on the accessing users, their roles and the accessed business-object. +Further, roles and business-objects are hierarchical. + +To avoid misunderstandings, we are using the term "business-object" what's usually called a "domain-object". +But as we are in the context of a webhosting infrastructure provider, "domain" would have a double meaning. + +Our implementation is based on Role-Based-Access-Management (RBAC) in conjunction with views and triggers on the business-objects. +As far as possible, we are using the same terms as defined in the RBAC standard, for our function names though, we chose more expressive names. + +In RBAC, subjects can be assigned to roles, roles can be hierarchical and eventually have assigned permissions. +A permission allows a specific operation (e.g. view or edit) on a specific (business-) object. + +You can find the entity structure as a UML class diagram as follows: + +```plantuml +@startuml +' left to right direction +top to bottom direction + +' hide the ugly E in a circle left to the entity name +hide circle + +' use right-angled line routing +skinparam linetype ortho + +package RBAC { + + ' forward declarations + entity RbacUser + + together { + + entity RbacRole + entity RbacPermission + + + RbacUser -[hidden]> RbacRole + RbacRole -[hidden]> RbacUser + } + + together { + entity RbacGrant + enum RbacReferenceType + entity RbacReference + } + RbacReference -[hidden]> RbacReferenceType + + entity RbacGrant { + ascendantUuid: uuid(RbackReference) + descendantUuid: uuid(RbackReference) + auto + } + RbacGrant o-u-> RbacReference + RbacGrant o-u-> RbacReference + + enum RbacReferenceType { + RbacUser + RbacRole + RbacPermission + } + RbacReferenceType ..> RbacUser + RbacReferenceType ..> RbacRole + RbacReferenceType ..> RbacPermission + + entity RbacReference { + *uuid : uuid <> + -- + type : RbacReferenceType + } + RbacReference o--> RbacReferenceType + entity RbacUser { + *uuid : uuid <> + -- + name : varchar + } + RbacUser o-- RbacReference + + entity RbacRole { + *uuid : uuid(RbacReference) + -- + name : varchar + } + RbacRole o-- RbacReference + + together { + enum RbacOperation + entity RbacObject + } + + entity RbacPermission { + *uuid : uuid(RbacReference) + -- + objectUuid: RbacObject + op: RbacOperation + } + RbacPermission o-- RbacReference + RbacPermission o-- RbacOperation + RbacPermission *-- RbacObject + + enum RbacOperation { + add-package + add-domain + add-unixuser + ... + view + edit + delete + } + + entity RbacObject { + *uuid : uuid <> + -- + objectTable: varchar + } + RbacObject o- "Business Objects" +} + +package "Business Objects" { + + entity package + package *--u- RbacObject + + entity customer + customer *--u- RbacObject + + entity "..." as moreBusinessObjects + moreBusinessObjects *-u- RbacObject +} + +@enduml +``` + +### The RBAC Entity Types + +#### RbacReference + +An *RbacReference* is a generalization of all entity types which participate in the hierarchical role system, defined via *RbacGrant*. + +The primary key of the *RbacReference* and its referred object is always identical. + +#### RbacReferenceType + +The enum *RbacReferenceType* describes the type of reference. +It's only needed to make it easier to find the referred object in *RbacUser*, *RbacRole* or *RbacPermission*. + +#### RbacUser + +An *RbacUser* is a type of RBAC-subject which references a login account outside this system, identified by a name (usually an email-address). + +*RbacUser*s can be assigned to multiple *RbacRole*s, through which they can get permissions to *RbacObject*s. + +The primary key of the *RbacUser* is identical to its related *RbacReference*. + +#### RbacRole + +An *RbacRole* represents a collection of directly or indirectly assigned *RbacPermission*s. +Each *RbacRole* can be assigned to *RbacUser*s or to another *RbacRole*. + +Both kinds of assignments are represented via *RbacGrant*. + +*RbacRole* entities can *RbacObject*s, or more precise + +#### RbacPermission + +An *RbacPermission* allows a specific *RbacOperation* on a specific *RbacObject*. + +#### RbacOperation + +An *RbacOperation* determines, what an *RbacPermission* allows to do. +It can be one of: + +- **'add-...'** - permits creating new instances of specific entity types underneath the object specified by the permission, e.g. "add-package" +- **'view'** - permits reading the contents of the object specified by the permission +- **'edit'** - change the contents of the object specified by the permission +- **'delete'** - delete the object specified by the permission +- **'\*'** + +This list is extensible according to the needs of the access rule system. + +Please notice, that there is no **create** operation to create new instances of unrelated business-object-types. +For such a singleton business-object-type, e.g. *Organization" or "Hostsharing" has to be defined, and its single entity is referred in the permission. +Only with this rule, the foreign key in *RbacPermission* can be defined as `NOT NULL`. + +#### RbacGrant + +The *RbacGrant* entities represent the access-rights structure from *RbacUser*s via hierarchical *RbacRoles* down to *RbacPermission*s. + +The core SQL queries to determine access rights are all recursive queries on the *RbacGrant* table. + +### Role naming + +The naming pattern of a role is important to be able to address specific roles. +E.g. if a new package is added, the admin-role of the related customer has to be addressed. + +There can be global roles like 'administrators'. +Most roles, though, are specific for certain business-objects and automatically generated as such: + + business-object-table#business-object-name.relative-role + + +Where *business-object-table* is the name of the SQL table of the business object (e.g *customer* or 'package'), +*business-object-name* is generated from an immutable business key(e.g. a prefix like 'xyz' or 'xyz00') +and the *relative-role*' describes the role relative to the referenced business-object as follows: + +#### owner + +The owner-role is granted to the subject which created the business object. +E.g. for a new *customer* it would be granted to 'administrators' and for a new *package* to the 'customer#...admin'. + +Whoever has the owner-role assigned can do everything with the related business-object, including deleting (or deactivating) it. + +In most cases, the permissions to other operations than 'delete' are granted through the 'admin' role. +By this, all roles ob sub-objects, which are assigned to the 'admin' role, are also granted to the 'owner'. + +#### admin + +The admin-role is granted to a role of those subjects who manage the business object. +E.g. a 'package' is manged by the admin of the customer. + +Whoever has the admin-role assigned, do everything with the related business-object, including deleting (or deactivating) it. + +In most cases, the permissions to the 'view' operation is granted through the 'tenant' role. +By this, all roles ob sub-objects, which are assigned to the 'tenent' role, are also granted to the 'admin'. + + +#### tenant + +The tenant-role is granted to everybody who needs to be able to view the business-object. +Usually all owners, admins and tenants of sub-objects get this role granted. + +Some business-objects only have very limited data directly in the main business-object and store more sensitive data in special sub-objects (e.g. 'customer-details') to which tenants of sub-objects of the main-object (e.g. package admins) do not get view permission. + + +## Example Users, Roles, Permissions and Business-Objects + +The following diagram shows how users, roles and permissions could be granted access to operations on business objects. + +```plantuml +@startuml +' left to right direction +top to bottom direction + +' hide the ugly E in a circle left to the entity name +hide circle + +' use right-angled line routing +' skinparam linetype ortho + +package RbacUsers { + object UserMike + object UserSuse + object UserPaul +} + +package RbacRoles { + object RoleAdministrators + object RoleCustXyz_Owner + object RoleCustXyz_Admin + object RolePackXyz00_Owner +} +RbacUsers -[hidden]> RbacRoles + +package RbacPermissions { + object PermCustXyz_View + object PermCustXyz_Edit + object PermCustXyz_Delete + object PermCustXyz_AddPackage + object PermPackXyz00_View + object PermPackXyz00_Edit + object PermPackXyz00_Delete + object PermPackXyz00_AddUser +} +RbacRoles -[hidden]> RbacPermissions + +package BusinessObjects { + object CustXyz + object PackXyz00 +} +RbacPermissions -[hidden]> BusinessObjects + +UserMike o---> RoleAdministrators +UserSuse o--> RoleCustXyz_Admin +UserPaul o--> RolePackXyz00_Owner + +RoleAdministrators o..> RoleCustXyz_Owner +RoleCustXyz_Owner o-> RoleCustXyz_Admin +RoleCustXyz_Admin o-> RolePackXyz00_Owner + +RoleCustXyz_Owner o--> PermCustXyz_Edit +RoleCustXyz_Owner o--> PermCustXyz_Delete +RoleCustXyz_Admin o--> PermCustXyz_View +RoleCustXyz_Admin o--> PermCustXyz_AddPackage +RolePackXyz00_Owner o--> PermPackXyz00_View +RolePackXyz00_Owner o--> PermPackXyz00_Edit +RolePackXyz00_Owner o--> PermPackXyz00_Delete +RolePackXyz00_Owner o--> PermPackXyz00_AddUser + +PermCustXyz_View o--> CustXyz +PermCustXyz_Edit o--> CustXyz +PermCustXyz_Delete o--> CustXyz +PermCustXyz_AddPackage o--> CustXyz +PermPackXyz00_View o--> PackXyz00 +PermPackXyz00_Edit o--> PackXyz00 +PermPackXyz00_Delete o--> PackXyz00 +PermPackXyz00_AddUser o--> PackXyz00 + +@enduml +``` + +## Business-Object-Tables, Triggers and Views + +To support the RBAC system, for each business-object-table, some more artifacts are created in the database: + +- a `BEFORE INSERT TRIGGER` which creates the related *RbacObject* instance, +- an `AFTER INSERT TRIGGER` which creates the related *RbacRole*s, *RbacPermission*s together with their related *RbacReference*s as well as *RbacGrant*s, +- a restricted view (e.g. *customer_rv*) through which restricted users can access the underlying data. + +Not yet implemented, but planned are these actions: + +- an `ON DELETE ... DO INSTEAD` rule to allow `SQL DELETE` if applicable for the business-object-table and the user has 'delete' permission, +- an `ON UPDATE ... DO INSTEAD` rule to allow `SQL UPDATE` if the user has 'edit' right, +- an `ON INSERT ... DO INSTEAD` rule to allow `SQL INSERT` if the user has 'add-..' right to the parent-business-object. + +The restricted view takes the current user from a session property and applies the hierarchy of its roles all the way down to the permissions related to the respective business-object-table. +This way, each user can only view the data they have 'view'-permission for, only create those they have 'add-...'-permission, only update those they have 'edit'- and only delete those they have 'delete'-permission to. + +### Current User + +The current use is taken from the session variable `hsadminng.currentUser` which contains the name of the user as stored in the +*RbacUser*s table. Example: + + SET LOCAL hsadminng.currentUser = 'mike@hostsharing.net'; + +That user is also used for historicization and audit log, but which is a different topic. + +### Assuming Roles + +If the session variable `hsadminng.assumedRoles` is set to a non-empty value, its content is interpreted as a list of semicolon-separated role names. +Example: + + SET LOCAL hsadminng.assumedRoles = 'customer#aab.admin;customer#aac.admin'; + +In this case, not the current user but the assumed roles are used as a starting point for any further queries. +Roles which are not granted to the current user, directly or indirectly, cannot be assumed. + + +### Example + +A full example is shown here: + + BEGIN TRANSACTION; + SET SESSION SESSION AUTHORIZATION restricted; + SET LOCAL hsadminng.currentUser = 'mike@hostsharing.net'; + SET LOCAL hsadminng.assumedRoles = 'customer#aab.admin;customer#aac.admin'; + + SELECT c.prefix, p.name as "package", ema.localPart || '@' || dom.name as "email-address" + FROM emailaddress_rv ema + JOIN domain_rv dom ON dom.uuid = ema.domainuuid + JOIN unixuser_rv uu ON uu.uuid = dom.unixuseruuid + JOIN package_rv p ON p.uuid = uu.packageuuid + JOIN customer_rv c ON c.uuid = p.customeruuid; + END TRANSACTION; + + + +## Roles and Their Assignments for Certain Business Objects + +To give you an overview of the business-object-types for the following role-examples, +check this diagram: + +```plantuml +@startuml +left to right direction +' top to bottom direction + +' hide the ugly E in a circle left to the entity name +hide circle + +' use right-angled line routing +' skinparam linetype ortho + +entity EMailAddress + +entity Domain +Domain o-- "*" EMailAddress + +entity UnixUser +UnixUser o-- "*" Domain + +entity Package +Package o.. "*" UnixUser + +entity Customer +Customer o-- "*" Package + +@enduml +``` + +It's mostly an example hierarchy of business-object-types, but resembles a part of Hostsharing's actual hosting infrastructure. + +The following diagrams show which roles are created for each business-object-type +and how they relate to roles from other business-object-types. + +### Customer Roles + +The highest level of the business-object-type-hierarchy is the *Customer*. + +```plantuml +@startuml +' left to right direction +top to bottom direction + +' hide the ugly E in a circle left to the entity name +hide circle + +' use right-angled line routing +' skinparam linetype ortho + +' needs PlantUML 1.2021.14 as Markdown plugin +allow_mixing + +entity "BObj customer#xyz" as boCustXyz + +together { + entity "Perm customer#xyz *" as permCustomerXyzAll + permCustomerXyzAll --> boCustXyz + + entity "Perm customer#xyz add-package" as permCustomerXyzAddPack + permCustomerXyzAddPack --> boCustXyz + + entity "Perm customer#xyz view" as permCustomerXyzView + permCustomerXyzView --> boCustXyz +} + +entity "Role customer#xyz.tenant" as roleCustXyzTenant +roleCustXyzTenant --> permCustomerXyzView + +entity "Role customer#xyz.admin" as roleCustXyzAdmin +roleCustXyzAdmin --> roleCustXyzTenant +roleCustXyzAdmin --> permCustomerXyzAddPack + +entity "Role customer#xyz.owner" as roleCustXyzOwner +roleCustXyzOwner ..> roleCustXyzAdmin +roleCustXyzOwner --> permCustomerXyzAll + +actor "Customer XYZ Admin" as actorCustXyzAdmin +actorCustXyzAdmin --> roleCustXyzAdmin + +entity "Role administrators" as roleAdmins +roleAdmins --> roleCustXyzOwner + +actor "Any Hostmaster" as actorHostmaster +actorHostmaster --> roleAdmins + + +@enduml +``` + +As you can see, there something special: +From the 'Role customer#xyz.owner' to the 'Role customer#xyz.admin' there is a dashed line, whereas all other lines are solid lines. +Solid lines means, that one role is granted to another and followed in all queries to the restricted views. +The dashed line means that one role is granted to another but not automatically followed in queries to the restricted views. + +The reason here is that otherwise simply too many objects would be accessible to those with the 'administrators' role and all queries would be slowed down vastly. + +Grants which are not followed are still valid grants for `hsadminng.assumedRoles`. +Thus, if you want to access anything below a customer, assume its role first. + +There is actually another speciality in the customer roles: +For all others, a user defined by the customer gets the owner role assigned, just for the customer, the owner's role is assigned to the 'administrators' role. + + +### Package Roles + +One example of the business-object-type-level right below is the *Package*. + +```plantuml +@startuml +' left to right direction +top to bottom direction + +' hide the ugly E in a circle left to the entity name +hide circle + +' use right-angled line routing +' skinparam linetype ortho + +' needs PlantUML 1.2021.14 as Markdown plugin +allow_mixing + +entity "BObj package#xyz00" as boPacXyz00 + +together { + entity "Perm package#xyz00 *" as permPackageXyzAll + permPackageXyzAll --> boPacXyz00 + + entity "Perm package#xyz00 add-unixuser" as permPacXyz00AddUser + permPacXyz00AddUser --> boPacXyz00 + + entity "Perm package#xyz00 edit" as permPacXyz00Edit + permPacXyz00Edit --> boPacXyz00 + + entity "Perm package#xyz00 view" as permPacXyz00View + permPacXyz00View --> boPacXyz00 +} + +package { + entity "Role customer#xyz.tenant" as roleCustXyzTenant + entity "Role customer#xyz.admin" as roleCustXyzAdmin + entity "Role customer#xyz.owner" as roleCustXyzOwner +} + +package { + entity "Role package#xyz00.owner" as rolePacXyz00Owner + entity "Role package#xyz00.admin" as rolePacXyz00Admin + entity "Role package#xyz00.tenant" as rolePacXyz00Tenant +} + +rolePacXyz00Tenant --> permPacXyz00View +rolePacXyz00Tenant --> roleCustXyzTenant + +rolePacXyz00Owner --> rolePacXyz00Admin +rolePacXyz00Owner --> permPackageXyzAll + +roleCustXyzAdmin --> rolePacXyz00Owner +roleCustXyzAdmin --> roleCustXyzTenant + +roleCustXyzOwner ..> roleCustXyzAdmin + +rolePacXyz00Admin --> rolePacXyz00Tenant +rolePacXyz00Admin --> permPacXyz00AddUser +rolePacXyz00Admin --> permPacXyz00Edit + +actor "Package XYZ00 Admin" as actorPacXyzAdmin +actorPacXyzAdmin -l-> rolePacXyz00Admin + +actor "Customer XYZ Admin" as actorCustXyzAdmin +actorCustXyzAdmin --> roleCustXyzAdmin + +entity "Role administrators" as roleAdmins +roleAdmins --> roleCustXyzOwner + +actor "Any Hostmaster" as actorHostmaster +actorHostmaster --> roleAdmins + +@enduml +``` + +Initially, the customer's admin role is assigned to the package owner role. +They can use the package's admin role to hand over most management functionality to a third party. +The 'administrators' can get access through an assumed customer's admin role or directly by assuming the package's owner or admin role. + +## Performance + +We did not define maximum response time in our requirements, +but set a target of 7.000 customers, 15.000 packages, 150.000 Unix users, 100.000 domains and 500.000 email-addresses. + +For such a dataset the response time for typical queries from a UI should be acceptable. +Also, when adding data beyond these quantities, increase in response time should be roughly linear or below. +For this, we increased the dataset by 14% and then by another 25%, ending up with 10.000 customers, almost 25.000 packages, over 174.000 unix users, over 120.000 domains and almost 750.000 email-addresses. + +The performance test suite comprised 8 SELECT queries issued by an administrator, mostly with two assumed customer owner roles. +The tests started with finding a specific customer and ended with listing all accessible email-addresses joined with their domains, unix-users, packages and customers. + +Find the SQL script here: `28-hs-tests.sql`. + +### Two View Query Variants + +We have tested two variants of the query for the restricted view, +both utilizing a PostgreSQL function like this: + + FUNCTION queryAccessibleObjectUuidsOfSubjectIds( + requiredOp RbacOp, + forObjectTable varchar, + subjectIds uuid[], + maxObjects integer = 16000) + RETURNS SETOF uuid + +The function returns all object uuids for which the given subjectIds (user o assumed roles) have a permission or required operation. + +Let's have a look at the two view queries: + +#### Using WHERE ... IN + + CREATE OR REPLACE VIEW customer_rv AS + SELECT DISTINCT target.* + FROM customer AS target + WHERE target.uuid IN ( + SELECT uuid + FROM queryAccessibleObjectUuidsOfSubjectIds( + 'view', 'customer', currentSubjectIds())); + +This view should be automatically updatable. +Where, for updates, we actually have to check for 'edit' instead of 'view' operation, which makes it a bit more complicated. + +With the larger dataset, the test suite initially needed over 7 seconds with this view query. +At this point the second variant was tried. + +But after the initial query, the execution time was drastically reduced, +even with different query values. +Looks like the query optimizer needed some statistics to find the best path. + +#### Using A JOIN + + CREATE OR REPLACE VIEW customer_rv AS + SELECT DISTINCT target.* + FROM customer AS target + JOIN queryAccessibleObjectUuidsOfSubjectIds( + 'view', 'customer', currentSubjectIds()) AS allowedObjId + ON target.uuid = allowedObjId; + +This view cannot is not updatable automatically, +but it was quite fast from the beginning. + +### Performance Results + +The following table shows the average between the second and the third repeat of the test-suite: + +| Dataset | using JOIN | using WHERE IN | +|----------------:|-----------:|---------------:| +| 7000 customers | 670ms | 1040ms | +| 10000 customers | 1050ms | 1125ms | +| +43% | +57% | +8% | + +The JOIN-variant is still faster, but the growth in execution time exceeded the growth of the dataset. + +The WHERE-IN-variant is about 50% slower on the smaller dataset, but almost keeps its performance on the larger dataset. + +Both variants a viable option, depending on other needs, e.g. updatable views. + + + diff --git a/doc/test-concept.md b/doc/test-concept.md new file mode 100644 index 00000000..95feb30f --- /dev/null +++ b/doc/test-concept.md @@ -0,0 +1,100 @@ +## Test-Concept + + +- [Unit-Tests](#unit-tests) +- [REST-Tests](#rest-tests) +- [Integration-Tests](#integration-tests) +- [Acceptance-Tests](#acceptance-tests) +- [Performance-Tests](#performance-tests) +- [System-Integration-Tests](#system-integration-tests) + + +### General Issues + +The following test concept uses terms like "double" and "mock" (maybe in inflected form like "mocking" or "mocked"), "whitebox-test" and "blackbox-tests" and "test-fixture". +Please look up their definition in the [glossary](glossary.md) + +Where our APIs should be designed in a way that it's possible, using a mocking library like *Mockito* often leads to shorter test code. + + +### Kinds of Tests + +Depending on the concrete aspects which we want to test, we are using different kinds of tests as described as follows. + +#### Unit-Tests + +In this project a *Unit* for *UnitTests* can be a single method (function), a class or even a group of classes which express a common concept. + +The unit are technically whitebox-tests and count into test-code-coverage. +But the whitebox-knowledge should only be used for the text-fixture. + +Unit-Test in this project are implemented with *JUnit Jupiter*, *Mockito* and *AssertJ*. + +Unit-Tests do not use any external systems, not even a database. +They just test the unit, not any dependencies or proper integration with dependencies. + +Such tests usually run very fast and should test all branches. + +These Tests are always named `...UnitTest` and can automatically run in the build-process. + + +#### REST-Tests + +At the level of REST-Controllers, *Spring's* `WebMvcTest`, a special kind of Unit-Test, are utilized. +Such tests issue REST-requests through a mocked REST-Layer and therefore use the controllers similar to a real client. +Otherwise, the implementation technologies are like those of Unit-Tests. + +Being unit-tests, also REST-tests are whitebox-tests and count into test-code-coverage. + +Like other Unit-Tests, REST-Test do not use any external systems, not even a database. +They just test the REST-related parts of the unit, e.g. URL-Mappings, HTTP-Headers and proper JSON encoding of request and response data. +Other dependencies and integrations with such are not tested on this level. + +Such tests usually run very fast, but should focus on REST-specific issues, leaving branch-testing to pure Unit-Tests. + +These Tests are always named `...RestTest` and can automatically run in the build-process. + + +#### Integration-Tests + +Integration-Tests in this context mean integration with support systems like databases or messaging-systems, but not integration with external systems. + +Integration-tests, are blackbox-tests and do not count into test-code-coverage. + +Such tests are implemented with *JUnit Jupiter* through some sort of `@SpringBootTest`, e.g. `DataJpaTest` and usually utilize *Testcontainers* and *Docker* to wrap the supporting system, e.g. the *PostgreSQL* database. +*Mockito* can also be used for this kind of tests, to separate multiple integrations. + +Integration-Tests are relatively slow and therefore should focus on the integration. +Internal issues should be tested through Unit-Tests. + +These Tests are always named `...IntegrationTest` and can automatically run in the build-process. + + +#### Acceptance-Tests + +We define Acceptance-Tests as test which describe user-stories, respectively high-level business requirements. +Acceptance-Tests run on a fully integrated and deployed system with deployed doubles for external systems. + +Acceptance-tests, are blackbox-tests and do not count into test-code-coverage. + +TODO: Complete the Acceptance-Tests test concept. + + +#### Performance-Tests + +Performance-critical scenarios have to be identified and a special performance-test has to be implemented. + +The implementation-technologie depends on the scenario. + +Performance-tests, are blackbox-tests and do not count into test-code-coverage. + +Such tests usually are very slow and should not be automatically run in the build-pipeline but manually, after critical areas have been changed. + + +#### System-Integration-Tests + +We define System-Integration-Tests as test in which this system is deployed in a production-like environment to test integration with external systems. + +System-Integration-tests, are blackbox-tests and do not count into test-code-coverage. + +TODO: Complete the System-Integration-Tests test concept. diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index 7aaae4ac..00000000 --- a/gradle.properties +++ /dev/null @@ -1,53 +0,0 @@ -rootProject.name=hsadmin-ng -profile=dev - -# Build properties -node_version=10.15.3 -npm_version=6.4.1 -yarn_version=1.13.0 - -# Dependency versions -jhipster_dependencies_version=2.1.1 -# The spring-boot version should match the one managed by -# https://mvnrepository.com/artifact/io.github.jhipster/jhipster-dependencies/${jhipster_dependencies_version} -spring_boot_version=2.0.8.RELEASE -# The hibernate version should match the one managed by -# https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/${spring-boot.version} --> -hibernate_version=5.2.17.Final -mapstruct_version=1.2.0.Final - -liquibase_hibernate5_version=3.6 -liquibaseTaskPrefix=liquibase - -# jhipster-needle-gradle-property - JHipster will add additional properties here - -## below are some of the gradle performance improvement settings that can be used as required, these are not enabled by default - -## The Gradle daemon aims to improve the startup and execution time of Gradle. -## The daemon is enabled by default in Gradle 3+ setting this to false will disable this. -## TODO: disable daemon on CI, since builds should be clean and reliable on servers -## https://docs.gradle.org/current/userguide/gradle_daemon.html#sec:ways_to_disable_gradle_daemon -## un comment the below line to disable the daemon - -#org.gradle.daemon=false - -## Specifies the JVM arguments used for the daemon process. -## The setting is particularly useful for tweaking memory settings. -## Default value: -Xmx1024m -XX:MaxPermSize=256m -## un comment the below line to override the daemon defaults - -#org.gradle.jvmargs=-Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 - -## When configured, Gradle will run in incubating parallel mode. -## This option should only be used with decoupled projects. More details, visit -## http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -## un comment the below line to enable parallel mode - -#org.gradle.parallel=true - -## Enables new incubating mode that makes Gradle selective when configuring projects. -## Only relevant projects are configured which results in faster builds for large multi-projects. -## http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:configuration_on_demand -## un comment the below line to enable the selective mode - -#org.gradle.configureondemand=true diff --git a/gradle/docker.gradle b/gradle/docker.gradle deleted file mode 100644 index a9d40315..00000000 --- a/gradle/docker.gradle +++ /dev/null @@ -1,35 +0,0 @@ -buildscript { - repositories { - gradlePluginPortal() - } - dependencies { - classpath "gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:0.9.11" - } -} - -apply plugin: com.google.cloud.tools.jib.gradle.JibPlugin - -jib { - from { - image = 'openjdk:8-jre-alpine' - } - to { - image = 'hsadminng:latest' - } - container { - entrypoint = ['sh', '-c', 'chmod +x /entrypoint.sh && sync && /entrypoint.sh'] - ports = ['8080'] - environment = [ - SPRING_OUTPUT_ANSI_ENABLED: 'ALWAYS', - JHIPSTER_SLEEP: '0' - ] - useCurrentTimestamp = true - } -} - -task copyWwwIntoStatic (type: Copy) { - from 'build/www/' - into 'build/resources/main/static' -} - -jibDockerBuild.dependsOn copyWwwIntoStatic diff --git a/gradle/profile_dev.gradle b/gradle/profile_dev.gradle deleted file mode 100644 index d19d8f37..00000000 --- a/gradle/profile_dev.gradle +++ /dev/null @@ -1,72 +0,0 @@ -import org.gradle.internal.os.OperatingSystem - -apply plugin: 'org.springframework.boot' -apply plugin: 'com.moowork.node' - -dependencies { - compile "org.springframework.boot:spring-boot-devtools" - compile "com.h2database:h2" -} - -def profiles = ""; -if (project.hasProperty('pgsql')) { - profiles += 'pgsql' -} else if (project.hasProperty('h2file')) { - profiles += 'h2file' -} else { - profiles += 'h2mem' -} -if (project.hasProperty('no-liquibase')) { - profiles += ',no-liquibase' -} -if (project.hasProperty('tls')) { - profiles += ',tls' -} - -println 'activating profiles: ' + profiles - -springBoot { - buildInfo { - properties { - time = null - } - } -} - -bootRun { - args = [] -} - -task webpackBuildDev(type: NpmTask) { - inputs.files(fileTree('src/main/webapp/')) - - def webpackDevFiles = fileTree('webpack//') - webpackDevFiles.exclude('webpack.prod.js') - inputs.files(webpackDevFiles) - - outputs.files(fileTree("build/www/")) - - dependsOn npmInstall - - args = ["run", "webpack:build"] -} - -task copyIntoStatic (type: Copy) { - from 'build/www/' - into 'build/resources/main/static' -} - -processResources { - filesMatching('**/application.yml') { - filter { - it.replace('#project.version#', version) - } - filter { - it.replace('#spring.profiles.active#', profiles) - } - } -} - -processResources.dependsOn webpackBuildDev -copyIntoStatic.dependsOn processResources -bootJar.dependsOn copyIntoStatic diff --git a/gradle/profile_prod.gradle b/gradle/profile_prod.gradle deleted file mode 100644 index edf46392..00000000 --- a/gradle/profile_prod.gradle +++ /dev/null @@ -1,63 +0,0 @@ -apply plugin: 'org.springframework.boot' -apply plugin: 'com.gorylenko.gradle-git-properties' -apply plugin: 'com.moowork.node' - -dependencies { - testCompile "com.h2database:h2" -} - -def profiles = 'prod' -if (project.hasProperty('no-liquibase')) { - profiles += ',no-liquibase' -} - -if (project.hasProperty('swagger')) { - profiles += ',swagger' -} - -springBoot { - buildInfo() -} - -bootRun { - args = [] -} - -task webpack_test(type: NpmTask, dependsOn: 'npm_install') { - args = ["run", "webpack:test"] -} - -task webpack(type: NpmTask, dependsOn: 'npm_install') { - args = ["run", "webpack:prod"] -} - -task copyIntoStatic (type: Copy) { - from 'build/www/' - into 'build/resources/main/static' -} - -processResources { - filesMatching('**/application.yml') { - filter { - it.replace('#project.version#', version) - } - filter { - it.replace('#spring.profiles.active#', profiles) - } - } -} - -generateGitProperties { - onlyIf { - !source.isEmpty() - } -} - -gitProperties { - keys = ['git.branch', 'git.commit.id.abbrev', 'git.commit.id.describe'] -} - -test.dependsOn webpack_test -processResources.dependsOn webpack -copyIntoStatic.dependsOn processResources -bootJar.dependsOn copyIntoStatic diff --git a/gradle/sonar.gradle b/gradle/sonar.gradle deleted file mode 100644 index 27a11c6f..00000000 --- a/gradle/sonar.gradle +++ /dev/null @@ -1,47 +0,0 @@ -apply plugin: "org.sonarqube" -apply plugin: 'jacoco' - -jacoco { - toolVersion = '0.8.2' -} - -jacocoTestReport { - reports { - xml.enabled true - } -} - -sonarqube { - properties { - property "sonar.host.url", "http://localhost:9001" - property "sonar.exclusions", "src/main/webapp/content/**/*.*,src/main/webapp/i18n/*.js, build/www/**/*.*" - - property "sonar.issue.ignore.multicriteria", "S3437,S4502,S4684,UndocumentedApi,BoldAndItalicTagsCheck" - - // Rule https://sonarcloud.io/coding_rules?open=Web%3ABoldAndItalicTagsCheck&rule_key=Web%3ABoldAndItalicTagsCheck is ignored. Even if we agree that using the "i" tag is an awful practice, this is what is recommended by http://fontawesome.io/examples/ - property "sonar.issue.ignore.multicriteria.BoldAndItalicTagsCheck.resourceKey", ">src/main/webapp/app/**/*.*" - property "sonar.issue.ignore.multicriteria.BoldAndItalicTagsCheck.ruleKey", "Web:BoldAndItalicTagsCheck" - - // Rule https://sonarcloud.io/coding_rules?open=squid%3AS3437&rule_key=squid%3AS3437 is ignored, as a JPA-managed field cannot be transient - property "sonar.issue.ignore.multicriteria.S3437.resourceKey", "src/main/java/**/*" - property "sonar.issue.ignore.multicriteria.S3437.ruleKey", "squid:S3437" - - // Rule https://sonarcloud.io/coding_rules?open=squid%3AUndocumentedApi&rule_key=squid%3AUndocumentedApi is ignored, as we want to follow "clean code" guidelines and classes, methods and arguments names should be self-explanatory - property "sonar.issue.ignore.multicriteria.UndocumentedApi.resourceKey", "src/main/java/**/*" - property "sonar.issue.ignore.multicriteria.UndocumentedApi.ruleKey", "squid:UndocumentedApi" - // Rule https://sonarcloud.io/coding_rules?open=squid%3AS4502&rule_key=squid%3AS4502 is ignored, as for JWT tokens we are not subject to CSRF attack - property "sonar.issue.ignore.multicriteria.S4502.resourceKey", "src/main/java/**/*" - property "sonar.issue.ignore.multicriteria.S4502.ruleKey", "squid:S4502" - - // Rule https://sonarcloud.io/coding_rules?open=squid%3AS4684&rule_key=squid%3AS4684 - property "sonar.issue.ignore.multicriteria.S4684.resourceKey", "src/main/java/**/*" - property "sonar.issue.ignore.multicriteria.S4684.ruleKey", "squid:S4684" - - property "sonar.jacoco.reportPaths", "${project.buildDir}/jacoco/test.exec" - property "sonar.java.codeCoveragePlugin", "jacoco" - property "sonar.typescript.lcov.reportPaths", "${project.buildDir}/test-results/lcov.info" - property "sonar.junit.reportPaths", "${project.buildDir}/test-results" - property "sonar.sources", "${project.projectDir}/src/main/" - property "sonar.tests", "${project.projectDir}/src/test/" - } -} diff --git a/gradle/swagger.gradle b/gradle/swagger.gradle deleted file mode 100644 index fbb0c593..00000000 --- a/gradle/swagger.gradle +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Plugin that provides API-first development using OpenAPI-generator to - * generate Spring-MVC endpoint stubs at compile time from an OpenAPI definition file - */ -apply plugin: 'org.openapi.generator' - -openApiGenerate { - generatorName = "spring" - inputSpec = "$rootDir/src/main/resources/swagger/api.yml".toString() - outputDir = "$buildDir/openapi".toString() - apiPackage = "org.hostsharing.hsadminng.web.api" - modelPackage = "org.hostsharing.hsadminng.web.api.model" - apiFilesConstrainedTo = [""] - modelFilesConstrainedTo = [""] - supportingFilesConstrainedTo = ["ApiUtil.java"] - configOptions = [delegatePattern: "true"] - validateSpec = true -} - -sourceSets { - main { - java { - srcDir file("${project.buildDir.path}/openapi/src/main/java") - } - } -} - -compileJava.dependsOn("openApiGenerate") diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 0d4a9516..00000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 10affbb8..00000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Sun Apr 28 06:46:48 CEST 2019 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/gradle/zipkin.gradle b/gradle/zipkin.gradle deleted file mode 100644 index 21d1b293..00000000 --- a/gradle/zipkin.gradle +++ /dev/null @@ -1,3 +0,0 @@ -dependencies { - compile "org.springframework.cloud:spring-cloud-starter-zipkin" -} diff --git a/gradlew b/gradlew index cccdd3d5..a69d9cb6 100755 --- a/gradlew +++ b/gradlew @@ -1,78 +1,129 @@ -#!/usr/bin/env sh +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -81,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -89,84 +140,101 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done fi +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index f9553162..f127cfd4 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,4 +1,20 @@ -@if "%DEBUG%" == "" @echo off +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -9,19 +25,22 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -35,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -45,38 +64,26 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index b13a9116..00000000 --- a/package-lock.json +++ /dev/null @@ -1,18180 +0,0 @@ -{ - "name": "hsadmin-ng", - "version": "0.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@angular-devkit/architect": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.13.1.tgz", - "integrity": "sha512-QDmIbqde75ZZSEFbw6Q6kQWq4cY6C7D67yujXw6XTyubDNAs1tyXJyxTIB8vjSlEKwRizTTDd/B0ZXVcke3Mvw==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.3.1", - "rxjs": "6.3.3" - }, - "dependencies": { - "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - } - } - }, - "@angular-devkit/core": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-7.3.1.tgz", - "integrity": "sha512-56XDWWfIzOAkEk69lBLgmCYybPUA4yjunhmMlCk7vVdb7gbQUyzNjFD04Uj0GjlejatAQ5F76tRwygD9C+3RXQ==", - "dev": true, - "requires": { - "ajv": "6.7.0", - "chokidar": "2.0.4", - "fast-json-stable-stringify": "2.0.0", - "rxjs": "6.3.3", - "source-map": "0.7.3" - }, - "dependencies": { - "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - } - } - }, - "@angular-devkit/schematics": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-7.3.1.tgz", - "integrity": "sha512-cd7usiasfSgw75INz72/VssrLr9tiVRYfo1TEdvr9ww0GuQbuQpB33xbV8W135eAV8+wzQ3Ce8ohaDHibvj6Yg==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.3.1", - "rxjs": "6.3.3" - }, - "dependencies": { - "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - } - } - }, - "@angular/cli": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-7.3.1.tgz", - "integrity": "sha512-8EvXYRhTqTaTk5PKv7VZxIWJiyG51R9RC9gtpRFx4bbnurqBHdEUxGMmaRsGT8QDbfvVsWnuakE0eeW1CrfZAQ==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.13.1", - "@angular-devkit/core": "7.3.1", - "@angular-devkit/schematics": "7.3.1", - "@schematics/angular": "7.3.1", - "@schematics/update": "0.13.1", - "@yarnpkg/lockfile": "1.1.0", - "ini": "1.3.5", - "inquirer": "6.2.1", - "npm-package-arg": "6.1.0", - "opn": "5.4.0", - "pacote": "9.4.0", - "semver": "5.6.0", - "symbol-observable": "1.2.0" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, - "inquirer": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.1.tgz", - "integrity": "sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.0", - "figures": "^2.0.0", - "lodash": "^4.17.10", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.1.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.0.0", - "through": "^2.3.6" - } - }, - "opn": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.4.0.tgz", - "integrity": "sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@angular/common": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-7.2.4.tgz", - "integrity": "sha512-3/i8RtnLTx/90gJHk5maE8zwsSiHgHvLItaa0qVfNlWiU0eCId/PL6TgDkut5vN9SQYL0oxhxFaVd35HmwsmuQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/compiler": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-7.2.4.tgz", - "integrity": "sha512-+zyMzPCL45ePEV9nrnYJvhAVgp2Y19bDaq0f0YdZAqAjgDqHzXGGR6wX8GueyJWmUYWx5vwK6Apla4HwDrYA1w==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/compiler-cli": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-7.2.4.tgz", - "integrity": "sha512-UhLosSeuwFIfaGqGcYOh9WSOuzEpeuhIRAOt81MeqOQEqkoreUjfxrQq8XWNkdqsPZHtiptF5ZwXlMBxlj9jJg==", - "dev": true, - "requires": { - "canonical-path": "1.0.0", - "chokidar": "^1.4.2", - "convert-source-map": "^1.5.1", - "dependency-graph": "^0.7.2", - "magic-string": "^0.25.0", - "minimist": "^1.2.0", - "reflect-metadata": "^0.1.2", - "shelljs": "^0.8.1", - "source-map": "^0.6.1", - "tslib": "^1.9.0", - "yargs": "9.0.1" - }, - "dependencies": { - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "@angular/core": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-7.2.4.tgz", - "integrity": "sha512-kfAxhIxl89PmB7y81FR/RAv0yWRFcEYxEnTwV+o8jKGfemAXtQ0g/Vh+lJR0SD/TBgFilMxotN1mhwH4A8GShw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/forms": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-7.2.4.tgz", - "integrity": "sha512-DAtOrdlTRsgvmZrsvczCAkY8dhTwZb5DXBmPuSXh0UR9lvEiCgNHGbwEiIiIkAHpw1wSeXZrq0qyy/oJRvf18g==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/platform-browser": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-7.2.4.tgz", - "integrity": "sha512-Klt8aKR5SP9bqfMfpSY5vQOY7AQEs8JGuZOk5Bfc2dUtYT2IEIvK2IqO8v2rcFRVO13HOPUxl328efyHqLgI7g==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/platform-browser-dynamic": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-7.2.4.tgz", - "integrity": "sha512-J/xWlmaYOPUoCHZ5TiIRiyYa4uRMtCz3aGdBfY8k/NWtNo8SCYaS3aut7Sk4RS5rK8aAVi+aYFlY5YOrlW+Hbg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@angular/router": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-7.2.4.tgz", - "integrity": "sha512-T8Uqf2H1SV1MQI38WwYJ4aa+4NNnvlp2Tp/rkfg6tKcp/cLkKqE6OOfiy9lmW+i/624v8tMgYoBMOUNBjAG23g==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/core": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.2.2.tgz", - "integrity": "sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.2.2", - "@babel/helpers": "^7.2.0", - "@babel/parser": "^7.2.2", - "@babel/template": "^7.2.2", - "@babel/traverse": "^7.2.2", - "@babel/types": "^7.2.2", - "convert-source-map": "^1.1.0", - "debug": "^4.1.0", - "json5": "^2.1.0", - "lodash": "^4.17.10", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/generator": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.2.2.tgz", - "integrity": "sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg==", - "dev": true, - "requires": { - "@babel/types": "^7.2.2", - "jsesc": "^2.5.1", - "lodash": "^4.17.10", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", - "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", - "dev": true - }, - "@babel/helper-split-export-declaration": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz", - "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helpers": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.2.0.tgz", - "integrity": "sha512-Fr07N+ea0dMcMN8nFpuK6dUIT7/ivt9yKQdEEnjVS83tG2pHwPi03gYmk/tyuwONnZ+sY+GFFPlWGgCtW1hF9A==", - "dev": true, - "requires": { - "@babel/template": "^7.1.2", - "@babel/traverse": "^7.1.5", - "@babel/types": "^7.2.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.2.2.tgz", - "integrity": "sha512-UNTmQ5cSLDeBGBl+s7JeowkqIHgmFAGBnLDdIzFmUNSuS5JF0XBcN59jsh/vJO/YjfsBqMxhMjoFGmNExmf0FA==", - "dev": true - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", - "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/runtime": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0.tgz", - "integrity": "sha512-7hGhzlcmg01CvH1EHdSPVXYX1aJ8KCEyz6I9xYIi/asDtzBPMyMhVibhM/K6g/5qnKBwjZtp10bNZIEFTRW1MA==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.12.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", - "integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==", - "dev": true - } - } - }, - "@babel/template": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", - "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.2.2", - "@babel/types": "^7.2.2" - } - }, - "@babel/traverse": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.2.tgz", - "integrity": "sha512-E5Bn9FSwHpSkUhthw/XEuvFZxIgrqb9M8cX8j5EUQtrUG5DQUy6bFyl7G7iQ1D1Czudor+xkmp81JbLVVM0Sjg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.2.2", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.2.2", - "@babel/types": "^7.2.2", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.10" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", - "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.11", - "to-fast-properties": "^2.0.0" - } - }, - "@cnakazawa/watch": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.3.tgz", - "integrity": "sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA==", - "dev": true, - "requires": { - "exec-sh": "^0.3.2", - "minimist": "^1.2.0" - } - }, - "@fortawesome/angular-fontawesome": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@fortawesome/angular-fontawesome/-/angular-fontawesome-0.3.0.tgz", - "integrity": "sha512-wXvyPI7GidoNiqeMz2re9iemUMFH4zBmuv94CfXlaanQ8+kMP/fYs/k69PLVN1KsebQY4kRA9GHmc1U1ndBkJg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@fortawesome/fontawesome-common-types": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.17.tgz", - "integrity": "sha512-DEYsEb/iiGVoMPQGjhG2uOylLVuMzTxOxysClkabZ5n80Q3oFDWGnshCLKvOvKoeClsgmKhWVrnnqvsMI1cAbw==" - }, - "@fortawesome/fontawesome-svg-core": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.14.tgz", - "integrity": "sha512-T1qCqkwm9PuvK53J64D1ovfrOTa1kG+SrHNj5cFst/rrskhCnbxpRdbqFIdc/thmXC0ebBX8nOUyja2/mrxe4g==", - "requires": { - "@fortawesome/fontawesome-common-types": "^0.2.14" - } - }, - "@fortawesome/free-solid-svg-icons": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.7.1.tgz", - "integrity": "sha512-5V/Q+JoPzuiIHW2JwmZGvE9bHguvNJKa7611DPo51uIvYv9LweX/SnDF+HC23X2W5T3myHhnGi+EZJTmidAmyg==", - "requires": { - "@fortawesome/fontawesome-common-types": "^0.2.14" - } - }, - "@iamstarkov/listr-update-renderer": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@iamstarkov/listr-update-renderer/-/listr-update-renderer-0.4.1.tgz", - "integrity": "sha512-IJyxQWsYDEkf8C8QthBn5N8tIUR9V9je6j3sMIpAkonaadjbvxmRC6RAhpa3RKxndhNnU2M6iNbtJwd7usQYIA==", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^2.3.0", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "dev": true, - "requires": { - "chalk": "^1.0.0" - } - } - } - }, - "@jest/console": { - "version": "24.3.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.3.0.tgz", - "integrity": "sha512-NaCty/OOei6rSDcbPdMiCbYCI0KGFGPgGO6B09lwWt5QTxnkuhKYET9El5u5z1GAcSxkQmSMtM63e24YabCWqA==", - "dev": true, - "requires": { - "@jest/source-map": "^24.3.0", - "@types/node": "*", - "chalk": "^2.0.1", - "slash": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@jest/core": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-24.5.0.tgz", - "integrity": "sha512-RDZArRzAs51YS7dXG1pbXbWGxK53rvUu8mCDYsgqqqQ6uSOaTjcVyBl2Jce0exT2rSLk38ca7az7t2f3b0/oYQ==", - "dev": true, - "requires": { - "@jest/console": "^24.3.0", - "@jest/reporters": "^24.5.0", - "@jest/test-result": "^24.5.0", - "@jest/transform": "^24.5.0", - "@jest/types": "^24.5.0", - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "graceful-fs": "^4.1.15", - "jest-changed-files": "^24.5.0", - "jest-config": "^24.5.0", - "jest-haste-map": "^24.5.0", - "jest-message-util": "^24.5.0", - "jest-regex-util": "^24.3.0", - "jest-resolve-dependencies": "^24.5.0", - "jest-runner": "^24.5.0", - "jest-runtime": "^24.5.0", - "jest-snapshot": "^24.5.0", - "jest-util": "^24.5.0", - "jest-validate": "^24.5.0", - "jest-watcher": "^24.5.0", - "micromatch": "^3.1.10", - "p-each-series": "^1.0.0", - "pirates": "^4.0.1", - "realpath-native": "^1.1.0", - "rimraf": "^2.5.4", - "strip-ansi": "^5.0.0" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@jest/environment": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.5.0.tgz", - "integrity": "sha512-tzUHR9SHjMXwM8QmfHb/EJNbF0fjbH4ieefJBvtwO8YErLTrecc1ROj0uo2VnIT6SlpEGZnvdCK6VgKYBo8LsA==", - "dev": true, - "requires": { - "@jest/fake-timers": "^24.5.0", - "@jest/transform": "^24.5.0", - "@jest/types": "^24.5.0", - "@types/node": "*", - "jest-mock": "^24.5.0" - } - }, - "@jest/fake-timers": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.5.0.tgz", - "integrity": "sha512-i59KVt3QBz9d+4Qr4QxsKgsIg+NjfuCjSOWj3RQhjF5JNy+eVJDhANQ4WzulzNCHd72srMAykwtRn5NYDGVraw==", - "dev": true, - "requires": { - "@jest/types": "^24.5.0", - "@types/node": "*", - "jest-message-util": "^24.5.0", - "jest-mock": "^24.5.0" - } - }, - "@jest/reporters": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.5.0.tgz", - "integrity": "sha512-vfpceiaKtGgnuC3ss5czWOihKOUSyjJA4M4udm6nH8xgqsuQYcyDCi4nMMcBKsHXWgz9/V5G7iisnZGfOh1w6Q==", - "dev": true, - "requires": { - "@jest/environment": "^24.5.0", - "@jest/test-result": "^24.5.0", - "@jest/transform": "^24.5.0", - "@jest/types": "^24.5.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "glob": "^7.1.2", - "istanbul-api": "^2.1.1", - "istanbul-lib-coverage": "^2.0.2", - "istanbul-lib-instrument": "^3.0.1", - "istanbul-lib-source-maps": "^3.0.1", - "jest-haste-map": "^24.5.0", - "jest-resolve": "^24.5.0", - "jest-runtime": "^24.5.0", - "jest-util": "^24.5.0", - "jest-worker": "^24.4.0", - "node-notifier": "^5.2.1", - "slash": "^2.0.0", - "source-map": "^0.6.0", - "string-length": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@jest/source-map": { - "version": "24.3.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.3.0.tgz", - "integrity": "sha512-zALZt1t2ou8le/crCeeiRYzvdnTzaIlpOWaet45lNSqNJUnXbppUUFR4ZUAlzgDmKee4Q5P/tKXypI1RiHwgag==", - "dev": true, - "requires": { - "callsites": "^3.0.0", - "graceful-fs": "^4.1.15", - "source-map": "^0.6.0" - }, - "dependencies": { - "callsites": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", - "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "@jest/test-result": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.5.0.tgz", - "integrity": "sha512-u66j2vBfa8Bli1+o3rCaVnVYa9O8CAFZeqiqLVhnarXtreSXG33YQ6vNYBogT7+nYiFNOohTU21BKiHlgmxD5A==", - "dev": true, - "requires": { - "@jest/console": "^24.3.0", - "@jest/types": "^24.5.0", - "@types/istanbul-lib-coverage": "^1.1.0" - } - }, - "@jest/transform": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.5.0.tgz", - "integrity": "sha512-XSsDz1gdR/QMmB8UCKlweAReQsZrD/DK7FuDlNo/pE8EcKMrfi2kqLRk8h8Gy/PDzgqJj64jNEzOce9pR8oj1w==", - "dev": true, - "requires": { - "@babel/core": "^7.1.0", - "@jest/types": "^24.5.0", - "babel-plugin-istanbul": "^5.1.0", - "chalk": "^2.0.1", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.1.15", - "jest-haste-map": "^24.5.0", - "jest-regex-util": "^24.3.0", - "jest-util": "^24.5.0", - "micromatch": "^3.1.10", - "realpath-native": "^1.1.0", - "slash": "^2.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "2.4.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "write-file-atomic": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.1.tgz", - "integrity": "sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - } - } - }, - "@jest/types": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.5.0.tgz", - "integrity": "sha512-kN7RFzNMf2R8UDadPOl6ReyI+MT8xfqRuAnuVL+i4gwjv/zubdDK+EDeLHYwq1j0CSSR2W/MmgaRlMZJzXdmVA==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^1.1.0", - "@types/yargs": "^12.0.9" - } - }, - "@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", - "dev": true, - "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" - } - }, - "@ng-bootstrap/ng-bootstrap": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-4.0.2.tgz", - "integrity": "sha512-SBsN8ORvj/WXpZGSyR2+CRkg6GCtax5+fsLKt9ImHKUVWwePVqRxiGlnxXqwNPHQ46vOdd7nDN9cwE7dfbGaAQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@ngtools/webpack": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-7.3.1.tgz", - "integrity": "sha512-EGQRjgDf5XP+Fm1MdZNRFiPd9e1vhl11BhjkwqkAsewic4eoz6fqXfj/Osz1hQy8xU+2dPPf/byQ/+nY3E02Zg==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.3.1", - "enhanced-resolve": "4.1.0", - "rxjs": "6.3.3", - "tree-kill": "1.2.1", - "webpack-sources": "1.3.0" - }, - "dependencies": { - "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - } - } - }, - "@ngx-translate/core": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-11.0.1.tgz", - "integrity": "sha512-nBCa1ZD9fAUY/3eskP3Lql2fNg8OMrYIej1/5GRsfcutx9tG/5fZLCv9m6UCw1aS+u4uK/vXjv1ctG/FdMvaWg==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@ngx-translate/http-loader": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@ngx-translate/http-loader/-/http-loader-4.0.0.tgz", - "integrity": "sha512-x8LumqydWD7eX9yQTAVeoCM9gFUIGVTUjZqbxdAUavAA3qVnk9wCQux7iHLPXpydl8vyQmLoPQR+fFU+DUDOMA==", - "requires": { - "tslib": "^1.9.0" - } - }, - "@nodelib/fs.stat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", - "dev": true - }, - "@samverschueren/stream-to-observable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz", - "integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==", - "dev": true, - "requires": { - "any-observable": "^0.3.0" - } - }, - "@schematics/angular": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-7.3.1.tgz", - "integrity": "sha512-0Ne8APPlTAjKg5CSZqluwCuW/5yPjr3ALCWzqwPxN0suE745usThtasBmqrjw0RMIt8nRqRgtg54Z7lCPO9ZFg==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.3.1", - "@angular-devkit/schematics": "7.3.1", - "typescript": "3.2.4" - } - }, - "@schematics/update": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.13.1.tgz", - "integrity": "sha512-EHOqolT/d/jRGuVTCUESLpk8JNpuaPlsVHfeK7Kdp/t0wSEnmtOelZX4+leS25lGXDaDUF3138ntjrZR4n6bGw==", - "dev": true, - "requires": { - "@angular-devkit/core": "7.3.1", - "@angular-devkit/schematics": "7.3.1", - "@yarnpkg/lockfile": "1.1.0", - "ini": "1.3.5", - "pacote": "9.4.0", - "rxjs": "6.3.3", - "semver": "5.6.0", - "semver-intersect": "1.4.0" - }, - "dependencies": { - "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - } - } - }, - "@types/babel__core": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.0.tgz", - "integrity": "sha512-wJTeJRt7BToFx3USrCDs2BhEi4ijBInTQjOIukj6a/5tEkwpFMVZ+1ppgmE+Q/FQyc5P/VWUbx7I9NELrKruHA==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "@types/babel__generator": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.0.2.tgz", - "integrity": "sha512-NHcOfab3Zw4q5sEE2COkpfXjoE7o+PmqD9DQW4koUT3roNxwziUdXGnRndMat/LJNUtePwn1TlP4do3uoe3KZQ==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@types/babel__template": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.0.2.tgz", - "integrity": "sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@types/babel__traverse": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.6.tgz", - "integrity": "sha512-XYVgHF2sQ0YblLRMLNPB3CkFMewzFmlDsH/TneZFHUXDlABQgh88uOxuez7ZcXxayLFrqLwtDH1t+FmlFwNZxw==", - "dev": true, - "requires": { - "@babel/types": "^7.3.0" - } - }, - "@types/istanbul-lib-coverage": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.0.tgz", - "integrity": "sha512-ohkhb9LehJy+PA40rDtGAji61NCgdtKLAlFoYp4cnuuQEswwdK3vz9SOIkkyc3wrk8dzjphQApNs56yyXLStaQ==", - "dev": true - }, - "@types/jest": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.0.0.tgz", - "integrity": "sha512-kOafJnUTnMd7/OfEO/x3I47EHswNjn+dbz9qk3mtonr1RvKT+1FGVxnxAx08I9K8Tl7j9hpoJRE7OCf+t10fng==", - "dev": true - }, - "@types/node": { - "version": "10.12.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.24.tgz", - "integrity": "sha512-GWWbvt+z9G5otRBW8rssOFgRY87J9N/qbhqfjMZ+gUuL6zoL+Hm6gP/8qQBG4jjimqdaNLCehcVapZ/Fs2WjCQ==", - "dev": true - }, - "@types/q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.1.tgz", - "integrity": "sha512-eqz8c/0kwNi/OEHQfvIuJVLTst3in0e7uTKeuY+WL/zfKn0xVujOTp42bS/vUUokhK5P2BppLd9JXMOMHcgbjA==", - "dev": true - }, - "@types/stack-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", - "integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==", - "dev": true - }, - "@types/yargs": { - "version": "12.0.10", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-12.0.10.tgz", - "integrity": "sha512-WsVzTPshvCSbHThUduGGxbmnwcpkgSctHGHTqzWyFg4lYAuV5qXlyFPOsP3OWqCINfmg/8VXP+zJaa4OxEsBQQ==", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.11.tgz", - "integrity": "sha512-ZEzy4vjvTzScC+SH8RBssQUawpaInUdMTYwYYLh54/s8TuT0gBLuyUnppKsVyZEi876VmmStKsUs28UxPgdvrA==", - "dev": true, - "requires": { - "@webassemblyjs/helper-module-context": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/wast-parser": "1.7.11" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.11.tgz", - "integrity": "sha512-zY8dSNyYcgzNRNT666/zOoAyImshm3ycKdoLsyDw/Bwo6+/uktb7p4xyApuef1dwEBo/U/SYQzbGBvV+nru2Xg==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.11.tgz", - "integrity": "sha512-7r1qXLmiglC+wPNkGuXCvkmalyEstKVwcueZRP2GNC2PAvxbLYwLLPr14rcdJaE4UtHxQKfFkuDFuv91ipqvXg==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.11.tgz", - "integrity": "sha512-MynuervdylPPh3ix+mKZloTcL06P8tenNH3sx6s0qE8SLR6DdwnfgA7Hc9NSYeob2jrW5Vql6GVlsQzKQCa13w==", - "dev": true - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.11.tgz", - "integrity": "sha512-T8ESC9KMXFTXA5urJcyor5cn6qWeZ4/zLPyWeEXZ03hj/x9weSokGNkVCdnhSabKGYWxElSdgJ+sFa9G/RdHNw==", - "dev": true, - "requires": { - "@webassemblyjs/wast-printer": "1.7.11" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.11.tgz", - "integrity": "sha512-nsAQWNP1+8Z6tkzdYlXT0kxfa2Z1tRTARd8wYnc/e3Zv3VydVVnaeePgqUzFrpkGUyhUUxOl5ML7f1NuT+gC0A==", - "dev": true - }, - "@webassemblyjs/helper-module-context": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.11.tgz", - "integrity": "sha512-JxfD5DX8Ygq4PvXDucq0M+sbUFA7BJAv/GGl9ITovqE+idGX+J3QSzJYz+LwQmL7fC3Rs+utvWoJxDb6pmC0qg==", - "dev": true - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.11.tgz", - "integrity": "sha512-cMXeVS9rhoXsI9LLL4tJxBgVD/KMOKXuFqYb5oCJ/opScWpkCMEz9EJtkonaNcnLv2R3K5jIeS4TRj/drde1JQ==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.11.tgz", - "integrity": "sha512-8ZRY5iZbZdtNFE5UFunB8mmBEAbSI3guwbrsCl4fWdfRiAcvqQpeqd5KHhSWLL5wuxo53zcaGZDBU64qgn4I4Q==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.7.11.tgz", - "integrity": "sha512-Mmqx/cS68K1tSrvRLtaV/Lp3NZWzXtOHUW2IvDvl2sihAwJh4ACE0eL6A8FvMyDG9abes3saB6dMimLOs+HMoQ==", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.7.11.tgz", - "integrity": "sha512-vuGmgZjjp3zjcerQg+JA+tGOncOnJLWVkt8Aze5eWQLwTQGNgVLcyOTqgSCxWTR4J42ijHbBxnuRaL1Rv7XMdw==", - "dev": true, - "requires": { - "@xtuc/long": "4.2.1" - } - }, - "@webassemblyjs/utf8": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.7.11.tgz", - "integrity": "sha512-C6GFkc7aErQIAH+BMrIdVSmW+6HSe20wg57HEC1uqJP8E/xpMjXqQUxkQw07MhNDSDcGpxI9G5JSNOQCqJk4sA==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.11.tgz", - "integrity": "sha512-FUd97guNGsCZQgeTPKdgxJhBXkUbMTY6hFPf2Y4OedXd48H97J+sOY2Ltaq6WGVpIH8o/TGOVNiVz/SbpEMJGg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/helper-wasm-section": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11", - "@webassemblyjs/wasm-opt": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11", - "@webassemblyjs/wast-printer": "1.7.11" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.11.tgz", - "integrity": "sha512-U/KDYp7fgAZX5KPfq4NOupK/BmhDc5Kjy2GIqstMhvvdJRcER/kUsMThpWeRP8BMn4LXaKhSTggIJPOeYHwISA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/ieee754": "1.7.11", - "@webassemblyjs/leb128": "1.7.11", - "@webassemblyjs/utf8": "1.7.11" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.11.tgz", - "integrity": "sha512-XynkOwQyiRidh0GLua7SkeHvAPXQV/RxsUeERILmAInZegApOUAIJfRuPYe2F7RcjOC9tW3Cb9juPvAC/sCqvg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.11.tgz", - "integrity": "sha512-6lmXRTrrZjYD8Ng8xRyvyXQJYUQKYSXhJqXOBLw24rdiXsHAOlvw5PhesjdcaMadU/pyPQOJ5dHreMjBxwnQKg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-api-error": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/ieee754": "1.7.11", - "@webassemblyjs/leb128": "1.7.11", - "@webassemblyjs/utf8": "1.7.11" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.7.11.tgz", - "integrity": "sha512-lEyVCg2np15tS+dm7+JJTNhNWq9yTZvi3qEhAIIOaofcYlUp0UR5/tVqOwa/gXYr3gjwSZqw+/lS9dscyLelbQ==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/floating-point-hex-parser": "1.7.11", - "@webassemblyjs/helper-api-error": "1.7.11", - "@webassemblyjs/helper-code-frame": "1.7.11", - "@webassemblyjs/helper-fsm": "1.7.11", - "@xtuc/long": "4.2.1" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.7.11.tgz", - "integrity": "sha512-m5vkAsuJ32QpkdkDOUPGSltrg8Cuk3KBx4YrmAGQwCZPRdUHXxG4phIOuuycLemHFr74sWL9Wthqss4fzdzSwg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/wast-parser": "1.7.11", - "@xtuc/long": "4.2.1" - } - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.1.tgz", - "integrity": "sha512-FZdkNBDqBRHKQ2MEbSC17xnPFOhZxeJ2YGSfr2BKf3sujG49Qe3bB+rGCwQfIaA7WHnGeGkSijX4FuBCdrzW/g==", - "dev": true - }, - "@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true - }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dev": true, - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - } - }, - "abab": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", - "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", - "dev": true - }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "dev": true, - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", - "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", - "dev": true - }, - "acorn-globals": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.0.tgz", - "integrity": "sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw==", - "dev": true, - "requires": { - "acorn": "^6.0.1", - "acorn-walk": "^6.0.1" - }, - "dependencies": { - "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", - "dev": true - } - } - }, - "acorn-walk": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", - "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==", - "dev": true - }, - "after": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", - "dev": true - }, - "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", - "dev": true, - "requires": { - "es6-promisify": "^5.0.0" - } - }, - "agentkeepalive": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", - "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", - "dev": true, - "requires": { - "humanize-ms": "^1.2.1" - } - }, - "ajv": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.7.0.tgz", - "integrity": "sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true - }, - "ajv-keywords": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", - "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", - "dev": true - }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", - "dev": true - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "angular-router-loader": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/angular-router-loader/-/angular-router-loader-0.8.5.tgz", - "integrity": "sha512-8wggCTKGgzB1o8co3Wvj+p9pKN7T7q3C477lEz3NLjvPVzUti8rv9i45Di+4aO/k+HvzGh3s8QdNlXU2Bl4avQ==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2" - } - }, - "angular2-template-loader": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/angular2-template-loader/-/angular2-template-loader-0.6.2.tgz", - "integrity": "sha1-wNROkP/w+sleiyPwQ6zaf9HFHXw=", - "dev": true, - "requires": { - "loader-utils": "^0.2.15" - }, - "dependencies": { - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - } - } - }, - "ansi": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", - "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=", - "dev": true - }, - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true - }, - "ansi-cyan": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", - "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-red": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", - "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", - "dev": true - }, - "any-observable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz", - "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==", - "dev": true - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "app-root-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.1.0.tgz", - "integrity": "sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo=", - "dev": true - }, - "append-transform": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", - "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", - "dev": true, - "requires": { - "default-require-extensions": "^2.0.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - }, - "dependencies": { - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - } - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, - "array-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", - "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", - "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", - "dev": true - }, - "array-slice": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", - "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "arraybuffer.slice": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", - "dev": true - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "ast-types": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz", - "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=", - "dev": true - }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "async-each-series": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/async-each-series/-/async-each-series-0.1.1.tgz", - "integrity": "sha1-dhfBkXQB/Yykooqtzj266Yr+tDI=", - "dev": true - }, - "async-limiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "autoprefixer": { - "version": "9.4.7", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.4.7.tgz", - "integrity": "sha512-qS5wW6aXHkm53Y4z73tFGsUhmZu4aMPV9iHXYlF0c/wxjknXNHuj/1cIQb+6YH692DbJGGWcckAXX+VxKvahMA==", - "dev": true, - "requires": { - "browserslist": "^4.4.1", - "caniuse-lite": "^1.0.30000932", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.14", - "postcss-value-parser": "^3.3.1" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, - "axios": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.17.1.tgz", - "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=", - "dev": true, - "requires": { - "follow-redirects": "^1.2.5", - "is-buffer": "^1.1.5" - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - } - }, - "babel-extract-comments": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/babel-extract-comments/-/babel-extract-comments-1.0.0.tgz", - "integrity": "sha512-qWWzi4TlddohA91bFwgt6zO/J0X+io7Qp184Fw0m2JYRSTZnJbFR8+07KmzudHCZgOiKRCrjhylwv9Xd8gfhVQ==", - "dev": true, - "requires": { - "babylon": "^6.18.0" - } - }, - "babel-jest": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.5.0.tgz", - "integrity": "sha512-0fKCXyRwxFTJL0UXDJiT2xYxO9Lu2vBd9n+cC+eDjESzcVG3s2DRGAxbzJX21fceB1WYoBjAh8pQ83dKcl003g==", - "dev": true, - "requires": { - "@jest/transform": "^24.5.0", - "@jest/types": "^24.5.0", - "@types/babel__core": "^7.1.0", - "babel-plugin-istanbul": "^5.1.0", - "babel-preset-jest": "^24.3.0", - "chalk": "^2.4.2", - "slash": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "babel-plugin-istanbul": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.1.tgz", - "integrity": "sha512-RNNVv2lsHAXJQsEJ5jonQwrJVWK8AcZpG1oxhnjCUaAjL7xahYLANhPUZbzEQHjKy1NMYUwn+0NPKQc8iSY4xQ==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "istanbul-lib-instrument": "^3.0.0", - "test-exclude": "^5.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - } - } - }, - "babel-plugin-jest-hoist": { - "version": "24.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.3.0.tgz", - "integrity": "sha512-nWh4N1mVH55Tzhx2isvUN5ebM5CDUvIpXPZYMRazQughie/EqGnbR+czzoQlhUmJG9pPJmYDRhvocotb2THl1w==", - "dev": true, - "requires": { - "@types/babel__traverse": "^7.0.6" - } - }, - "babel-plugin-syntax-object-rest-spread": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", - "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", - "dev": true - }, - "babel-plugin-transform-object-rest-spread": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", - "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", - "dev": true, - "requires": { - "babel-plugin-syntax-object-rest-spread": "^6.8.0", - "babel-runtime": "^6.26.0" - } - }, - "babel-polyfill": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz", - "integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=", - "requires": { - "babel-runtime": "^6.22.0", - "core-js": "^2.4.0", - "regenerator-runtime": "^0.10.0" - } - }, - "babel-preset-jest": { - "version": "24.3.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.3.0.tgz", - "integrity": "sha512-VGTV2QYBa/Kn3WCOKdfS31j9qomaXSgJqi65B6o05/1GsJyj9LVhSljM9ro4S+IBGj/ENhNBuH9bpqzztKAQSw==", - "dev": true, - "requires": { - "@babel/plugin-syntax-object-rest-spread": "^7.0.0", - "babel-plugin-jest-hoist": "^24.3.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" - } - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "base62": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/base62/-/base62-1.2.8.tgz", - "integrity": "sha512-V6YHUbjLxN1ymqNLb1DPHoU1CpfdL7d2YTIp5W3U4hhoG4hhxNmsFDs66M9EXxBiSEke5Bt5dwdfMwwZF70iLA==", - "dev": true - }, - "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", - "dev": true - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "base64id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", - "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", - "dev": true - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "better-assert": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", - "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", - "dev": true, - "requires": { - "callsite": "1.0.0" - } - }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, - "binary-extensions": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz", - "integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==", - "dev": true - }, - "binaryextensions": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.1.2.tgz", - "integrity": "sha512-xVNN69YGDghOqCCtA6FI7avYrr02mTJjOgB0/f1VPD3pJC8QEvjTKWc4epDx8AqxxA75NI0QpVM2gPJXUbE4Tg==", - "dev": true - }, - "blob": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", - "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", - "dev": true - }, - "bluebird": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", - "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", - "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - } - } - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "bootstrap": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.2.1.tgz", - "integrity": "sha512-tt/7vIv3Gm2mnd/WeDx36nfGGHleil0Wg8IeB7eMrVkY0fZ5iTaBisSh8oNANc2IBsCc6vCgCNTIM/IEN0+50Q==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-process-hrtime": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz", - "integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==", - "dev": true - }, - "browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", - "dev": true, - "requires": { - "resolve": "1.1.7" - }, - "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - } - } - }, - "browser-sync": { - "version": "2.26.3", - "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.26.3.tgz", - "integrity": "sha512-VLzpjCA4uXqfzkwqWtMM6hvPm2PNHp2RcmzBXcbi6C9WpkUhhFb8SVAr4CFrCsFxDg+oY6HalOjn8F+egyvhag==", - "dev": true, - "requires": { - "browser-sync-client": "^2.26.2", - "browser-sync-ui": "^2.26.2", - "bs-recipes": "1.3.4", - "bs-snippet-injector": "^2.0.1", - "chokidar": "^2.0.4", - "connect": "3.6.6", - "connect-history-api-fallback": "^1", - "dev-ip": "^1.0.1", - "easy-extender": "^2.3.4", - "eazy-logger": "^3", - "etag": "^1.8.1", - "fresh": "^0.5.2", - "fs-extra": "3.0.1", - "http-proxy": "1.15.2", - "immutable": "^3", - "localtunnel": "1.9.1", - "micromatch": "2.3.11", - "opn": "5.3.0", - "portscanner": "2.1.1", - "qs": "6.2.3", - "raw-body": "^2.3.2", - "resp-modifier": "6.0.2", - "rx": "4.1.0", - "send": "0.16.2", - "serve-index": "1.9.1", - "serve-static": "1.13.2", - "server-destroy": "1.0.1", - "socket.io": "2.1.1", - "ua-parser-js": "0.7.17", - "yargs": "6.4.0" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "opn": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", - "integrity": "sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.4.0.tgz", - "integrity": "sha1-gW4ahm1VmMzzTlWW3c4i2S2kkNQ=", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "window-size": "^0.2.0", - "y18n": "^3.2.1", - "yargs-parser": "^4.1.0" - } - }, - "yargs-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", - "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", - "dev": true, - "requires": { - "camelcase": "^3.0.0" - } - } - } - }, - "browser-sync-client": { - "version": "2.26.2", - "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.26.2.tgz", - "integrity": "sha512-FEuVJD41fI24HJ30XOT2RyF5WcnEtdJhhTqeyDlnMk/8Ox9MZw109rvk9pdfRWye4soZLe+xcAo9tHSMxvgAdw==", - "dev": true, - "requires": { - "etag": "1.8.1", - "fresh": "0.5.2", - "mitt": "^1.1.3", - "rxjs": "^5.5.6" - }, - "dependencies": { - "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - } - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - } - } - }, - "browser-sync-ui": { - "version": "2.26.2", - "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.26.2.tgz", - "integrity": "sha512-LF7GMWo8ELOE0eAlxuRCfnGQT1ZxKP9flCfGgZdXFc6BwmoqaJHlYe7MmVvykKkXjolRXTz8ztXAKGVqNwJ3EQ==", - "dev": true, - "requires": { - "async-each-series": "0.1.1", - "connect-history-api-fallback": "^1", - "immutable": "^3", - "server-destroy": "1.0.1", - "socket.io-client": "^2.0.4", - "stream-throttle": "^0.1.3" - } - }, - "browser-sync-webpack-plugin": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/browser-sync-webpack-plugin/-/browser-sync-webpack-plugin-2.2.2.tgz", - "integrity": "sha512-x92kl8LdBi4dp6YVXYqrSoDkOCOLCeBOrYSY0h9Sk1VcCDSoZC1Vc62eae6TfC2ljN4/L+aYlkzE46kirHzbgA==", - "dev": true, - "requires": { - "lodash": "^4" - } - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.2.tgz", - "integrity": "sha512-ISS/AIAiHERJ3d45Fz0AVYKkgcy+F/eJHzKEvv1j0wwKGKD9T3BrwKr/5g45L+Y4XIK5PlTqefHciRFcfE1Jxg==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000939", - "electron-to-chromium": "^1.3.113", - "node-releases": "^1.1.8" - } - }, - "bs-recipes": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/bs-recipes/-/bs-recipes-1.3.4.tgz", - "integrity": "sha1-DS1NSKcYyMBEdp/cT4lZLci2lYU=", - "dev": true - }, - "bs-snippet-injector": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/bs-snippet-injector/-/bs-snippet-injector-2.0.1.tgz", - "integrity": "sha1-YbU5PxH1JVntEgaTEANDtu2wTdU=", - "dev": true - }, - "bser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", - "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", - "dev": true, - "requires": { - "node-int64": "^0.4.0" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", - "dev": true - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "cacache": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", - "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", - "dev": true, - "requires": { - "bluebird": "^3.5.3", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.3", - "graceful-fs": "^4.1.15", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "cache-loader": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-2.0.1.tgz", - "integrity": "sha512-V99T3FOynmGx26Zom+JrVBytLBsmUCzVG2/4NnUKgvXN4bEV42R1ERl1IyiH/cvFIDA1Ytq2lPZ9tXDSahcQpQ==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "mkdirp": "^0.5.1", - "neo-async": "^2.6.0", - "normalize-path": "^3.0.0", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - } - } - }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true - }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "camelcase-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", - "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", - "dev": true, - "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" - } - }, - "caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", - "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, - "caniuse-lite": { - "version": "1.0.30000955", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000955.tgz", - "integrity": "sha512-6AwmIKgqCYfDWWadRkAuZSHMQP4Mmy96xAXEdRBlN/luQhlRYOKgwOlZ9plpCOsVbBuqbTmGqDK3JUM/nlr8CA==", - "dev": true - }, - "canonical-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/canonical-path/-/canonical-path-1.0.0.tgz", - "integrity": "sha512-feylzsbDxi1gPZ1IjystzIQZagYYLvfKrSuygUCgf7z6x790VEzze5QEkdSV1U58RA7Hi0+v6fv4K54atOzATg==", - "dev": true - }, - "capture-exit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", - "integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", - "dev": true, - "requires": { - "rsvp": "^4.8.4" - } - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" - }, - "chevrotain": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-4.2.0.tgz", - "integrity": "sha512-uiwhNpkudwrk3rHxKKfrvsWNe4SBDjnswbF2FDqDfrqsfYr4gY0Yl1k2m9yPKR0fqfbiIP67EbgOv4e+JP+GGg==", - "dev": true, - "requires": { - "regexp-to-ast": "0.3.5" - } - }, - "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" - } - }, - "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", - "dev": true - }, - "chrome-trace-event": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", - "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-css": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", - "dev": true, - "requires": { - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-table": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", - "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", - "dev": true, - "requires": { - "colors": "1.0.3" - }, - "dependencies": { - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", - "dev": true - } - } - }, - "cli-truncate": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", - "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", - "dev": true, - "requires": { - "slice-ansi": "0.0.4", - "string-width": "^1.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", - "dev": true - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", - "dev": true - }, - "cloneable-readable": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", - "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" - } - }, - "closest-file-data": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/closest-file-data/-/closest-file-data-0.1.4.tgz", - "integrity": "sha1-l1+HwTLymdJKA3W59jyj+4j3Kzo=", - "dev": true - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "coa": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", - "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", - "dev": true, - "requires": { - "@types/q": "^1.5.1", - "chalk": "^2.4.1", - "q": "^1.1.2" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "codelyzer": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.5.0.tgz", - "integrity": "sha512-oO6vCkjqsVrEsmh58oNlnJkRXuA30hF8cdNAQV9DytEalDwyOFRvHMnlKFzmOStNerOmPGZU9GAHnBo4tGvtiQ==", - "dev": true, - "requires": { - "app-root-path": "^2.1.0", - "css-selector-tokenizer": "^0.7.0", - "cssauron": "^1.4.0", - "semver-dsl": "^1.0.1", - "source-map": "^0.5.7", - "sprintf-js": "^1.1.1" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", - "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", - "dev": true, - "requires": { - "color-convert": "^1.9.1", - "color-string": "^1.5.2" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", - "dev": true, - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "colornames": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/colornames/-/colornames-1.1.1.tgz", - "integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y=", - "dev": true - }, - "colors": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", - "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", - "dev": true - }, - "colorspace": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.1.tgz", - "integrity": "sha512-pI3btWyiuz7Ken0BWh9Elzsmv2bM9AhA7psXib4anUXy/orfZ/E0MbQwhSOG/9L8hLlalqrU0UhOuqxW1YjmVw==", - "dev": true, - "requires": { - "color": "3.0.x", - "text-hex": "1.0.x" - } - }, - "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, - "common-tags": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz", - "integrity": "sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "commoner": { - "version": "0.10.8", - "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz", - "integrity": "sha1-NPw2cs0kOT6LtH5wyqApOBH08sU=", - "dev": true, - "requires": { - "commander": "^2.5.0", - "detective": "^4.3.1", - "glob": "^5.0.15", - "graceful-fs": "^4.1.2", - "iconv-lite": "^0.4.5", - "mkdirp": "^0.5.0", - "private": "^0.1.6", - "q": "^1.1.2", - "recast": "^0.11.17" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "compare-versions": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.4.0.tgz", - "integrity": "sha512-tK69D7oNXXqUW3ZNo/z7NXTEz22TCF0pTE+YF9cxvaAM9XnkLo1fV621xCLrRR6aevJlKxExkss0vWqUCUpqdg==", - "dev": true - }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", - "dev": true - }, - "compressible": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.16.tgz", - "integrity": "sha512-JQfEOdnI7dASwCuSPWIeVYwc/zMsu/+tRhoUvEfXz2gxOA2DNjmG5vhtFdBlhWPPGo+RdT9S3tgc/uH5qgDiiA==", - "dev": true, - "requires": { - "mime-db": ">= 1.38.0 < 2" - } - }, - "compression": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", - "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.14", - "debug": "2.6.9", - "on-headers": "~1.0.1", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "conf": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/conf/-/conf-2.0.0.tgz", - "integrity": "sha512-iCLzBsGFi8S73EANsEJZz0JnJ/e5VZef/kSaxydYZLAvw0rFNAUx5R7K5leC/CXXR2mZfXWhUvcZOO/dM2D5xg==", - "dev": true, - "requires": { - "dot-prop": "^4.1.0", - "env-paths": "^1.0.0", - "make-dir": "^1.0.0", - "pkg-up": "^2.0.0", - "write-file-atomic": "^2.3.0" - } - }, - "connect": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", - "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", - "dev": true, - "requires": { - "debug": "2.6.9", - "finalhandler": "1.1.0", - "parseurl": "~1.3.2", - "utils-merge": "1.0.1" - } - }, - "connect-history-api-fallback": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", - "dev": true - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "dev": true - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-webpack-plugin": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.6.0.tgz", - "integrity": "sha512-Y+SQCF+0NoWQryez2zXn5J5knmr9z/9qSQt7fbL78u83rxmigOy8X5+BFn8CFSuX+nKT8gpYwJX68ekqtQt6ZA==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "globby": "^7.1.1", - "is-glob": "^4.0.0", - "loader-utils": "^1.1.0", - "minimatch": "^3.0.4", - "p-limit": "^1.0.0", - "serialize-javascript": "^1.4.0" - }, - "dependencies": { - "cacache": { - "version": "10.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", - "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", - "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", - "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "core-js": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.4.tgz", - "integrity": "sha512-05qQ5hXShcqGkPZpXEFLIpxayZscVD2kuMBZewxiIPPEagukO4mqgPA9CWhUvFBJfy3ODdK2p9xyHh7FTU9/7A==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cosmiconfig": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.0.7.tgz", - "integrity": "sha512-PcLqxTKiDmNT6pSpy4N6KtuPwb53W+2tzNvwOZw0WH9N6O0vLIBq0x8aj8Oj75ere4YcGi48bDFCL+3fRJdlNA==", - "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^4.0.0" - }, - "dependencies": { - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - } - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", - "dev": true - }, - "css-declaration-sorter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz", - "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", - "dev": true, - "requires": { - "postcss": "^7.0.1", - "timsort": "^0.3.0" - } - }, - "css-loader": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-2.1.0.tgz", - "integrity": "sha512-MoOu+CStsGrSt5K2OeZ89q3Snf+IkxRfAIt9aAKg4piioTrhtP1iEFPu+OVn3Ohz24FO6L+rw9UJxBILiSBw5Q==", - "dev": true, - "requires": { - "icss-utils": "^4.0.0", - "loader-utils": "^1.2.1", - "lodash": "^4.17.11", - "postcss": "^7.0.6", - "postcss-modules-extract-imports": "^2.0.0", - "postcss-modules-local-by-default": "^2.0.3", - "postcss-modules-scope": "^2.0.0", - "postcss-modules-values": "^2.0.0", - "postcss-value-parser": "^3.3.0", - "schema-utils": "^1.0.0" - } - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "css-select-base-adapter": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", - "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", - "dev": true - }, - "css-selector-tokenizer": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz", - "integrity": "sha512-xYL0AMZJ4gFzJQsHUKa5jiWWi2vH77WVNg7JYRyewwj6oPh4yb/y6Y9ZCw9dsj/9UauMhtuxR+ogQd//EdEVNA==", - "dev": true, - "requires": { - "cssesc": "^0.1.0", - "fastparse": "^1.1.1", - "regexpu-core": "^1.0.0" - } - }, - "css-tree": { - "version": "1.0.0-alpha.28", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.28.tgz", - "integrity": "sha512-joNNW1gCp3qFFzj4St6zk+Wh/NBv0vM5YbEreZk0SD4S23S+1xBKb6cLDg2uj4P4k/GUMlIm6cKIDqIG+vdt0w==", - "dev": true, - "requires": { - "mdn-data": "~1.1.0", - "source-map": "^0.5.3" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "css-unit-converter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.1.tgz", - "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=", - "dev": true - }, - "css-url-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/css-url-regex/-/css-url-regex-1.1.0.tgz", - "integrity": "sha1-g4NCMMyfdMRX3lnuvRVD/uuDt+w=", - "dev": true - }, - "css-what": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.2.tgz", - "integrity": "sha512-wan8dMWQ0GUeF7DGEPVjhHemVW/vy6xUYmFzRY8RYqgA0JtXC9rJmbScBjqSu6dg9q0lwPQy6ZAmJVr3PPTvqQ==", - "dev": true - }, - "cssauron": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", - "integrity": "sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg=", - "dev": true, - "requires": { - "through": "X.X.X" - } - }, - "cssesc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", - "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", - "dev": true - }, - "cssnano": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz", - "integrity": "sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ==", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.7", - "is-resolvable": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "cssnano-preset-default": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz", - "integrity": "sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA==", - "dev": true, - "requires": { - "css-declaration-sorter": "^4.0.1", - "cssnano-util-raw-cache": "^4.0.1", - "postcss": "^7.0.0", - "postcss-calc": "^7.0.1", - "postcss-colormin": "^4.0.3", - "postcss-convert-values": "^4.0.1", - "postcss-discard-comments": "^4.0.2", - "postcss-discard-duplicates": "^4.0.2", - "postcss-discard-empty": "^4.0.1", - "postcss-discard-overridden": "^4.0.1", - "postcss-merge-longhand": "^4.0.11", - "postcss-merge-rules": "^4.0.3", - "postcss-minify-font-values": "^4.0.2", - "postcss-minify-gradients": "^4.0.2", - "postcss-minify-params": "^4.0.2", - "postcss-minify-selectors": "^4.0.2", - "postcss-normalize-charset": "^4.0.1", - "postcss-normalize-display-values": "^4.0.2", - "postcss-normalize-positions": "^4.0.2", - "postcss-normalize-repeat-style": "^4.0.2", - "postcss-normalize-string": "^4.0.2", - "postcss-normalize-timing-functions": "^4.0.2", - "postcss-normalize-unicode": "^4.0.1", - "postcss-normalize-url": "^4.0.1", - "postcss-normalize-whitespace": "^4.0.2", - "postcss-ordered-values": "^4.1.2", - "postcss-reduce-initial": "^4.0.3", - "postcss-reduce-transforms": "^4.0.2", - "postcss-svgo": "^4.0.2", - "postcss-unique-selectors": "^4.0.1" - } - }, - "cssnano-util-get-arguments": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz", - "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", - "dev": true - }, - "cssnano-util-get-match": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz", - "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", - "dev": true - }, - "cssnano-util-raw-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz", - "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "cssnano-util-same-parent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz", - "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==", - "dev": true - }, - "csso": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/csso/-/csso-3.5.1.tgz", - "integrity": "sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg==", - "dev": true, - "requires": { - "css-tree": "1.0.0-alpha.29" - }, - "dependencies": { - "css-tree": { - "version": "1.0.0-alpha.29", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz", - "integrity": "sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==", - "dev": true, - "requires": { - "mdn-data": "~1.1.0", - "source-map": "^0.5.3" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "cssom": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.6.tgz", - "integrity": "sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A==", - "dev": true - }, - "cssstyle": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.2.tgz", - "integrity": "sha512-43wY3kl1CVQSvL7wUY1qXkxVGkStjpkDmVjiIKX8R97uhajy8Bybay78uOtqvh7Q5GK75dNPfW0geWjE6qQQow==", - "dev": true, - "requires": { - "cssom": "0.3.x" - } - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", - "dev": true - }, - "d3": { - "version": "3.5.17", - "resolved": "https://registry.npmjs.org/d3/-/d3-3.5.17.tgz", - "integrity": "sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g=", - "dev": true - }, - "dargs": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-6.0.0.tgz", - "integrity": "sha512-6lJauzNaI7MiM8EHQWmGj+s3rP5/i1nYs8GAvKrLAx/9dpc9xS/4seFb1ioR39A+kcfu4v3jnEa/EE5qWYnitQ==", - "dev": true - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "data-urls": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz", - "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==", - "dev": true, - "requires": { - "abab": "^2.0.0", - "whatwg-mimetype": "^2.2.0", - "whatwg-url": "^7.0.0" - }, - "dependencies": { - "whatwg-url": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", - "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - } - } - }, - "date-fns": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", - "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==", - "dev": true - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "dateformat": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "dev": true, - "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - } - } - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", - "dev": true - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "default-gateway": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-2.7.2.tgz", - "integrity": "sha512-lAc4i9QJR0YHSDFdzeBQKfZ1SRDG3hsJNEkrpcZa8QhBfidLAilT60BDEIVUUGqosFp425KOgB3uYqcnQrWafQ==", - "dev": true, - "requires": { - "execa": "^0.10.0", - "ip-regex": "^2.1.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", - "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - } - } - }, - "default-require-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", - "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", - "dev": true, - "requires": { - "strip-bom": "^3.0.0" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "dev": true, - "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "dependency-graph": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.7.2.tgz", - "integrity": "sha512-KqtH4/EZdtdfWX0p6MGP9jljvxSY6msy/pRUD4jgNwVpv3v1QmNLlsB3LDSSUg79BRVSn7jI1QPRtArGABovAQ==", - "dev": true - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-conflict": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/detect-conflict/-/detect-conflict-1.0.1.tgz", - "integrity": "sha1-CIZXpmqWHAUBnbfEIwiDsca0F24=", - "dev": true - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", - "dev": true - }, - "detect-newline": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", - "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", - "dev": true - }, - "detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", - "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", - "dev": true - }, - "detective": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", - "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", - "dev": true, - "requires": { - "acorn": "^5.2.1", - "defined": "^1.0.0" - } - }, - "dev-ip": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dev-ip/-/dev-ip-1.0.1.tgz", - "integrity": "sha1-p2o+0YVb56ASu4rBbLgPPADcKPA=", - "dev": true - }, - "diagnostics": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz", - "integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==", - "dev": true, - "requires": { - "colorspace": "1.1.x", - "enabled": "1.0.x", - "kuler": "1.0.x" - } - }, - "didyoumean": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.1.tgz", - "integrity": "sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=", - "dev": true - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "diff-sequences": { - "version": "24.3.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.3.0.tgz", - "integrity": "sha512-xLqpez+Zj9GKSnPWS0WZw1igGocZ+uua8+y+5dDNTT934N3QuY1sp2LkHzwiaYQGz60hMq0pjAshdeXm5VUOEw==", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dir-glob": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", - "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", - "dev": true, - "requires": { - "path-type": "^3.0.0" - }, - "dependencies": { - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", - "dev": true, - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "dom-converter": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", - "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", - "dev": true, - "requires": { - "utila": "~0.4" - } - }, - "dom-serializer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", - "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", - "dev": true, - "requires": { - "domelementtype": "~1.1.1", - "entities": "~1.1.1" - }, - "dependencies": { - "domelementtype": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", - "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", - "dev": true - } - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "domexception": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", - "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", - "dev": true, - "requires": { - "webidl-conversions": "^4.0.2" - } - }, - "domhandler": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", - "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, - "drange": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/drange/-/drange-1.1.1.tgz", - "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", - "dev": true - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "easy-extender": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/easy-extender/-/easy-extender-2.3.4.tgz", - "integrity": "sha512-8cAwm6md1YTiPpOvDULYJL4ZS6WfM5/cTeVVh4JsvyYZAoqlRVUpHL9Gr5Fy7HA6xcSZicUia3DeAgO3Us8E+Q==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - }, - "eazy-logger": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/eazy-logger/-/eazy-logger-3.0.2.tgz", - "integrity": "sha1-oyWqXlPROiIliJsqxBE7K5Y29Pw=", - "dev": true, - "requires": { - "tfunk": "^3.0.1" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "editions": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/editions/-/editions-2.1.3.tgz", - "integrity": "sha512-xDZyVm0A4nLgMNWVVLJvcwMjI80ShiH/27RyLiCnW1L273TcJIA25C4pwJ33AWV01OX6UriP35Xu+lH4S7HWQw==", - "dev": true, - "requires": { - "errlop": "^1.1.1", - "semver": "^5.6.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "ejs": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", - "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.113", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.113.tgz", - "integrity": "sha512-De+lPAxEcpxvqPTyZAXELNpRZXABRxf+uL/rSykstQhzj/B0l1150G/ExIIxKc16lI89Hgz81J0BHAcbTqK49g==", - "dev": true - }, - "elegant-spinner": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", - "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", - "dev": true - }, - "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "enabled": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz", - "integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=", - "dev": true, - "requires": { - "env-variable": "0.0.x" - } - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "requires": { - "iconv-lite": "~0.4.13" - } - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "engine.io": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz", - "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "base64id": "1.0.0", - "cookie": "0.3.1", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.0", - "ws": "~3.3.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } - } - } - }, - "engine.io-client": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.3.2.tgz", - "integrity": "sha512-y0CPINnhMvPuwtqXfsGuWE8BB66+B6wTtCofQDRecMQPYX3MYUZXFNKDhdrSe3EVjgOu4V3rxdeqN/Tr91IgbQ==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~6.1.0", - "xmlhttprequest-ssl": "~1.5.4", - "yeast": "0.1.2" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "engine.io-parser": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", - "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", - "dev": true, - "requires": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.5", - "has-binary2": "~1.0.2" - } - }, - "enhanced-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", - "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" - } - }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - }, - "env-paths": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz", - "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=", - "dev": true - }, - "env-variable": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.5.tgz", - "integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA==", - "dev": true - }, - "envify": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/envify/-/envify-3.4.1.tgz", - "integrity": "sha1-1xIjKejfFoi6dxsSUBkXyc5cvOg=", - "dev": true, - "requires": { - "jstransform": "^11.0.3", - "through": "~2.3.4" - } - }, - "err-code": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", - "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", - "dev": true - }, - "errlop": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/errlop/-/errlop-1.1.1.tgz", - "integrity": "sha512-WX7QjiPHhsny7/PQvrhS5VMizXXKoKCS3udaBp8gjlARdbn+XmK300eKBAAN0hGyRaTCtRpOaxK+xFVPUJ3zkw==", - "dev": true, - "requires": { - "editions": "^2.1.2" - } - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/error/-/error-7.0.2.tgz", - "integrity": "sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI=", - "dev": true, - "requires": { - "string-template": "~0.2.1", - "xtend": "~4.0.0" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "error-stack-parser": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.2.tgz", - "integrity": "sha512-E1fPutRDdIj/hohG0UpT5mayXNCxXP9d+snxFsPU9X0XgccOumKraa3juDMwTUyi7+Bu5+mCGagjg4IYeNbOdw==", - "dev": true, - "requires": { - "stackframe": "^1.0.4" - } - }, - "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" - } - }, - "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es6-promise": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz", - "integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==", - "dev": true - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "http://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "dev": true, - "requires": { - "es6-promise": "^4.0.3" - } - }, - "es6-templates": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/es6-templates/-/es6-templates-0.2.3.tgz", - "integrity": "sha1-XLmsn7He1usSOTQrgdeSu7QHjuQ=", - "dev": true, - "requires": { - "recast": "~0.11.12", - "through": "~2.3.6" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "escodegen": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", - "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", - "dev": true, - "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, - "eslint-scope": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.2.tgz", - "integrity": "sha512-5q1+B/ogmHl8+paxtOKx38Z8LtWkVGuNt3+GQNErqwLl6ViNp/gdJGMCjZNxZ8j/VYjDNZ2Fo+eQc1TAVPIzbg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "eventemitter3": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", - "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=", - "dev": true - }, - "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", - "dev": true - }, - "eventsource": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz", - "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==", - "dev": true, - "requires": { - "original": "^1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "exec-sh": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.2.tgz", - "integrity": "sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg==", - "dev": true - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - } - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", - "dev": true - }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", - "dev": true - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - }, - "dependencies": { - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "expect": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-24.5.0.tgz", - "integrity": "sha512-p2Gmc0CLxOgkyA93ySWmHFYHUPFIHG6XZ06l7WArWAsrqYVaVEkOU5NtT5i68KUyGKbkQgDCkiT65bWmdoL6Bw==", - "dev": true, - "requires": { - "@jest/types": "^24.5.0", - "ansi-styles": "^3.2.0", - "jest-get-type": "^24.3.0", - "jest-matcher-utils": "^24.5.0", - "jest-message-util": "^24.5.0", - "jest-regex-util": "^24.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - } - } - }, - "express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - } - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-glob": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.6.tgz", - "integrity": "sha512-0BvMaZc1k9F+MeWWMe8pL6YltFzZYcJsYU7D4JyDA6PAczaXvxqQQ/z+mDF7/4Mw01DeUc+i3CTKajnkANkV4w==", - "dev": true, - "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.1.2", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.3", - "micromatch": "^3.1.10" - } - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fast-safe-stringify": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz", - "integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg==", - "dev": true - }, - "fastparse": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", - "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", - "dev": true - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "fb-watchman": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", - "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", - "dev": true, - "requires": { - "bser": "^2.0.0" - } - }, - "fbjs": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.6.1.tgz", - "integrity": "sha1-lja3cF9bqWhNRLcveDISVK/IYPc=", - "dev": true, - "requires": { - "core-js": "^1.0.0", - "loose-envify": "^1.0.0", - "promise": "^7.0.3", - "ua-parser-js": "^0.7.9", - "whatwg-fetch": "^0.9.0" - }, - "dependencies": { - "core-js": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", - "dev": true - } - } - }, - "fecha": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz", - "integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==", - "dev": true - }, - "figgy-pudding": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-3.0.1.tgz", - "integrity": "sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^1.0.0" - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fileset": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", - "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", - "dev": true, - "requires": { - "glob": "^7.0.3", - "minimatch": "^3.0.3" - } - }, - "filesize": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", - "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", - "dev": true - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.1", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.3.1", - "unpipe": "~1.0.0" - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" - } - }, - "find-parent-dir": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", - "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", - "dev": true - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "first-chunk-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", - "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, - "fn-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fn-name/-/fn-name-2.0.1.tgz", - "integrity": "sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc=", - "dev": true - }, - "follow-redirects": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", - "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", - "dev": true, - "requires": { - "debug": "^3.2.6" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "fork-ts-checker-webpack-plugin": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-0.5.2.tgz", - "integrity": "sha512-a5IG+xXyKnpruI0CP/anyRLAoxWtp3lzdG6flxicANnoSzz64b12dJ7ASAVRrI2OaWwZR2JyBaMHFQqInhWhIw==", - "dev": true, - "requires": { - "babel-code-frame": "^6.22.0", - "chalk": "^2.4.1", - "chokidar": "^2.0.4", - "micromatch": "^3.1.10", - "minimatch": "^3.0.4", - "tapable": "^1.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "friendly-errors-webpack-plugin": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.7.0.tgz", - "integrity": "sha512-K27M3VK30wVoOarP651zDmb93R9zF28usW4ocaK3mfQeIEI5BPht/EzZs5E8QLLwbLRJQMwscAjDxYPb1FuNiw==", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "error-stack-parser": "^2.0.0", - "string-width": "^2.0.0" - } - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-extra": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", - "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^3.0.0", - "universalify": "^0.1.0" - } - }, - "fs-minipass": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", - "dev": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", - "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "g-status": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/g-status/-/g-status-2.0.2.tgz", - "integrity": "sha512-kQoE9qH+T1AHKgSSD0Hkv98bobE90ILQcXAF4wvGgsr7uFqNvwmh8j+Lq3l0RVt3E3HjSbv2B9biEGcEtpHLCA==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "matcher": "^1.0.0", - "simple-git": "^1.85.0" - } - }, - "gauge": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz", - "integrity": "sha1-6c7FSD09TuDvRLYKfZnkk14TbZM=", - "dev": true, - "requires": { - "ansi": "^0.3.0", - "has-unicode": "^2.0.0", - "lodash.pad": "^4.1.0", - "lodash.padend": "^4.1.0", - "lodash.padstart": "^4.1.0" - } - }, - "generator-jhipster": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/generator-jhipster/-/generator-jhipster-5.8.2.tgz", - "integrity": "sha512-GW33cKnIf0wWuK411U9GDiNKwKVLbL4BpAqyR4b9JD6ClhwHsQg3HRlItN8pV0iTHJtyFnSfcV/9nJIHFWwvKA==", - "dev": true, - "requires": { - "axios": "0.18.0", - "chalk": "2.4.1", - "commander": "2.16.0", - "conf": "2.0.0", - "didyoumean": "1.2.1", - "ejs": "2.6.1", - "glob": "7.1.2", - "gulp-filter": "5.1.0", - "insight": "0.10.1", - "jhipster-core": "3.6.11", - "js-object-pretty-print": "0.3.0", - "js-yaml": "3.12.0", - "lodash": "4.17.10", - "meow": "5.0.0", - "mkdirp": "0.5.1", - "os-locale": "2.1.0", - "parse-gitignore": "1.0.1", - "pluralize": "7.0.0", - "prettier": "1.13.7", - "randexp": "0.4.9", - "semver": "5.5.0", - "shelljs": "0.8.2", - "tabtab": "2.2.2", - "through2": "2.0.3", - "uuid": "3.3.2", - "yeoman-environment": "2.3.0", - "yeoman-generator": "3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "axios": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", - "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", - "dev": true, - "requires": { - "follow-redirects": "^1.3.0", - "is-buffer": "^1.1.5" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "commander": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz", - "integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==", - "dev": true - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", - "dev": true - }, - "prettier": { - "version": "1.13.7", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.7.tgz", - "integrity": "sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w==", - "dev": true - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "shelljs": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.2.tgz", - "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true, - "requires": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - } - } - }, - "genfun": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz", - "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==", - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-own-enumerable-property-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz", - "integrity": "sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg==", - "dev": true - }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "gh-got": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gh-got/-/gh-got-6.0.0.tgz", - "integrity": "sha512-F/mS+fsWQMo1zfgG9MD8KWvTWPPzzhuVwY++fhQ5Ggd+0P+CAMHtzMZhNxG+TqGfHDChJKsbh6otfMGqO2AKBw==", - "dev": true, - "requires": { - "got": "^7.0.0", - "is-plain-obj": "^1.1.0" - } - }, - "github-username": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/github-username/-/github-username-4.1.0.tgz", - "integrity": "sha1-y+KABBiDIG2kISrp5LXxacML9Bc=", - "dev": true, - "requires": { - "gh-got": "^6.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, - "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", - "dev": true - }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "dev": true, - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - }, - "dependencies": { - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - } - } - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "grouped-queue": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/grouped-queue/-/grouped-queue-0.3.3.tgz", - "integrity": "sha1-wWfSpTGcWg4JZO9qJbfC34mWyFw=", - "dev": true, - "requires": { - "lodash": "^4.17.2" - } - }, - "growly": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", - "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", - "dev": true - }, - "gulp-filter": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.1.0.tgz", - "integrity": "sha1-oF4Rr/sHz33PQafeHLe2OsN4PnM=", - "dev": true, - "requires": { - "multimatch": "^2.0.0", - "plugin-error": "^0.1.2", - "streamfilter": "^1.0.5" - } - }, - "handle-thing": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", - "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==", - "dev": true - }, - "handlebars": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.1.tgz", - "integrity": "sha512-3Zhi6C0euYZL5sM0Zcy7lInLXKQ+YLcF/olbN010mzGQ4XVm50JeyBnMqofHh696GrciGruC7kCcApPDJvVgwA==", - "dev": true, - "requires": { - "neo-async": "^2.6.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "dev": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-binary2": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", - "dev": true, - "requires": { - "isarray": "2.0.1" - }, - "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "dev": true, - "requires": { - "has-symbol-support-x": "^1.4.1" - } - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hex-color-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", - "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hoek": { - "version": "4.2.1", - "resolved": "http://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", - "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==", - "dev": true - }, - "homedir-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "hsl-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz", - "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", - "dev": true - }, - "hsla-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz", - "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", - "dev": true - }, - "html-comment-regex": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", - "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==", - "dev": true - }, - "html-encoding-sniffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", - "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", - "dev": true, - "requires": { - "whatwg-encoding": "^1.0.1" - } - }, - "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", - "dev": true - }, - "html-loader": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/html-loader/-/html-loader-0.5.5.tgz", - "integrity": "sha512-7hIW7YinOYUpo//kSYcPB6dCKoceKLmOwjEMmhIobHuWGDVl0Nwe4l68mdG/Ru0wcUxQjVMEoZpkalZ/SE7zog==", - "dev": true, - "requires": { - "es6-templates": "^0.2.3", - "fastparse": "^1.1.1", - "html-minifier": "^3.5.8", - "loader-utils": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "html-minifier": { - "version": "3.5.21", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", - "integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==", - "dev": true, - "requires": { - "camel-case": "3.0.x", - "clean-css": "4.2.x", - "commander": "2.17.x", - "he": "1.2.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.4.x" - }, - "dependencies": { - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true - } - } - }, - "html-webpack-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", - "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", - "dev": true, - "requires": { - "html-minifier": "^3.2.3", - "loader-utils": "^0.2.16", - "lodash": "^4.17.3", - "pretty-error": "^2.0.2", - "tapable": "^1.0.0", - "toposort": "^1.0.0", - "util.promisify": "1.0.0" - }, - "dependencies": { - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - } - } - }, - "htmlparser2": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", - "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", - "dev": true, - "requires": { - "domelementtype": "1", - "domhandler": "2.1", - "domutils": "1.1", - "readable-stream": "1.0" - }, - "dependencies": { - "domutils": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", - "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "http-cache-semantics": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", - "dev": true - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - }, - "dependencies": { - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true - } - } - }, - "http-parser-js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.0.tgz", - "integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==", - "dev": true - }, - "http-proxy": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.15.2.tgz", - "integrity": "sha1-ZC/cr/5S00SNK9o7AHnpQJBk2jE=", - "dev": true, - "requires": { - "eventemitter3": "1.x.x", - "requires-port": "1.x.x" - } - }, - "http-proxy-agent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", - "dev": true, - "requires": { - "agent-base": "4", - "debug": "3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "http-proxy-middleware": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", - "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", - "dev": true, - "requires": { - "http-proxy": "^1.16.2", - "is-glob": "^4.0.0", - "lodash": "^4.17.5", - "micromatch": "^3.1.9" - }, - "dependencies": { - "eventemitter3": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", - "dev": true - }, - "http-proxy": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", - "dev": true, - "requires": { - "eventemitter3": "^3.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - } - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "https-proxy-agent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", - "dev": true, - "requires": { - "agent-base": "^4.1.0", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", - "dev": true, - "requires": { - "ms": "^2.0.0" - } - }, - "husky": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-1.3.1.tgz", - "integrity": "sha512-86U6sVVVf4b5NYSZ0yvv88dRgBSSXXmHaiq5pP4KDj5JVzdwKgBjEtUPOm8hcoytezFwbU+7gotXNhpHdystlg==", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.7", - "execa": "^1.0.0", - "find-up": "^3.0.0", - "get-stdin": "^6.0.0", - "is-ci": "^2.0.0", - "pkg-dir": "^3.0.0", - "please-upgrade-node": "^3.1.1", - "read-pkg": "^4.0.1", - "run-node": "^1.0.0", - "slash": "^2.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "read-pkg": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", - "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=", - "dev": true, - "requires": { - "normalize-package-data": "^2.3.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0" - } - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - } - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "icss-replace-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", - "dev": true - }, - "icss-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-4.0.0.tgz", - "integrity": "sha512-bA/xGiwWM17qjllIs9X/y0EjsB7e0AV08F3OL8UPsoNkNRibIuu8f1eKTnQ8QO1DteKKTxTUAn+IEWUToIwGOA==", - "dev": true, - "requires": { - "postcss": "^7.0.5" - } - }, - "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", - "dev": true - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "dev": true - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, - "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", - "dev": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "immutable": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", - "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=", - "dev": true - }, - "import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", - "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", - "dev": true, - "requires": { - "import-from": "^2.1.0" - } - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "import-from": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", - "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", - "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", - "dev": true, - "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - } - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", - "dev": true - }, - "indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "inquirer": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.0.6.tgz", - "integrity": "sha1-4EqqnQW3o8ubD0B9BDdfBEcZA0c=", - "requires": { - "ansi-escapes": "^1.1.0", - "chalk": "^1.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.1", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx": "^4.1.0", - "string-width": "^2.0.0", - "strip-ansi": "^3.0.0", - "through": "^2.3.6" - } - }, - "insight": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/insight/-/insight-0.10.1.tgz", - "integrity": "sha512-kLGeYQkh18f8KuC68QKdi0iwUcIaayJVB/STpX7x452/7pAUm1yfG4giJwcxbrTh0zNYtc8kBR+6maLMOzglOQ==", - "dev": true, - "requires": { - "async": "^2.1.4", - "chalk": "^2.3.0", - "conf": "^1.3.1", - "inquirer": "^5.0.0", - "lodash.debounce": "^4.0.8", - "os-name": "^2.0.1", - "request": "^2.74.0", - "tough-cookie": "^2.0.0", - "uuid": "^3.0.0" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "conf": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/conf/-/conf-1.4.0.tgz", - "integrity": "sha512-bzlVWS2THbMetHqXKB8ypsXN4DQ/1qopGwNJi1eYbpwesJcd86FBjFciCQX/YwAhp9bM7NVnPFqZ5LpV7gP0Dg==", - "dev": true, - "requires": { - "dot-prop": "^4.1.0", - "env-paths": "^1.0.0", - "make-dir": "^1.0.0", - "pkg-up": "^2.0.0", - "write-file-atomic": "^2.3.0" - } - }, - "inquirer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - } - }, - "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - } - } - }, - "internal-ip": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-3.0.1.tgz", - "integrity": "sha512-NXXgESC2nNVtU+pqmC9e6R8B1GpKxzsAQhffvh5AL79qKnodd+L7tnEQmTiUAVngqLalPbSqRA7XGIEL5nCd0Q==", - "dev": true, - "requires": { - "default-gateway": "^2.6.0", - "ipaddr.js": "^1.5.2" - } - }, - "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", - "dev": true - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", - "dev": true - }, - "ipaddr.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", - "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", - "dev": true - }, - "is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "requires": { - "ci-info": "^2.0.0" - } - }, - "is-color-stop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", - "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", - "dev": true, - "requires": { - "css-color-names": "^0.0.4", - "hex-color-regex": "^1.1.0", - "hsl-regex": "^1.0.0", - "hsla-regex": "^1.0.0", - "rgb-regex": "^1.0.1", - "rgba-regex": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "is-generator-fn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.0.0.tgz", - "integrity": "sha512-elzyIdM7iKoFHzcrndIqjYomImhxrFRnGP3galODoII4TB9gI7mZ+FnlLQmmjf27SxHS2gKEeyhX5/+YRS6H9g==", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-number-like": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/is-number-like/-/is-number-like-1.0.8.tgz", - "integrity": "sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==", - "dev": true, - "requires": { - "lodash.isfinite": "^3.3.2" - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", - "dev": true - }, - "is-observable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", - "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", - "dev": true, - "requires": { - "symbol-observable": "^1.1.0" - } - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", - "dev": true - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", - "dev": true - }, - "is-scoped": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-scoped/-/is-scoped-1.0.0.tgz", - "integrity": "sha1-RJypgpnnEwOCViieyytUDcQ3yzA=", - "dev": true, - "requires": { - "scoped-regex": "^1.0.0" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-svg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", - "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==", - "dev": true, - "requires": { - "html-comment-regex": "^1.1.0" - } - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.0" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isbinaryfile": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", - "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", - "dev": true, - "requires": { - "buffer-alloc": "^1.2.0" - } - }, - "isemail": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.2.0.tgz", - "integrity": "sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg==", - "dev": true, - "requires": { - "punycode": "2.x.x" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "istanbul-api": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.1.tgz", - "integrity": "sha512-kVmYrehiwyeBAk/wE71tW6emzLiHGjYIiDrc8sfyty4F8M02/lrgXSm+R1kXysmF20zArvmZXjlE/mg24TVPJw==", - "dev": true, - "requires": { - "async": "^2.6.1", - "compare-versions": "^3.2.1", - "fileset": "^2.0.3", - "istanbul-lib-coverage": "^2.0.3", - "istanbul-lib-hook": "^2.0.3", - "istanbul-lib-instrument": "^3.1.0", - "istanbul-lib-report": "^2.0.4", - "istanbul-lib-source-maps": "^3.0.2", - "istanbul-reports": "^2.1.1", - "js-yaml": "^3.12.0", - "make-dir": "^1.3.0", - "minimatch": "^3.0.4", - "once": "^1.4.0" - }, - "dependencies": { - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - } - } - }, - "istanbul-lib-coverage": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", - "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.3.tgz", - "integrity": "sha512-CLmEqwEhuCYtGcpNVJjLV1DQyVnIqavMLFHV/DP+np/g3qvdxu3gsPqYoJMXm15sN84xOlckFB3VNvRbf5yEgA==", - "dev": true, - "requires": { - "append-transform": "^1.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz", - "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==", - "dev": true, - "requires": { - "@babel/generator": "^7.0.0", - "@babel/parser": "^7.0.0", - "@babel/template": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@babel/types": "^7.0.0", - "istanbul-lib-coverage": "^2.0.3", - "semver": "^5.5.0" - } - }, - "istanbul-lib-report": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.4.tgz", - "integrity": "sha512-sOiLZLAWpA0+3b5w5/dq0cjm2rrNdAfHWaGhmn7XEFW6X++IV9Ohn+pnELAl9K3rfpaeBfbmH9JU5sejacdLeA==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^2.0.3", - "make-dir": "^1.3.0", - "supports-color": "^6.0.0" - }, - "dependencies": { - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.2.tgz", - "integrity": "sha512-JX4v0CiKTGp9fZPmoxpu9YEkPbEqCqBbO3403VabKjH+NRXo72HafD5UgnjTEqHL2SAjaZK1XDuDOkn6I5QVfQ==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.3", - "make-dir": "^1.3.0", - "rimraf": "^2.6.2", - "source-map": "^0.6.1" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "istanbul-reports": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.1.tgz", - "integrity": "sha512-FzNahnidyEPBCI0HcufJoSEoKykesRlFcSzQqjH9x0+LC8tnnE/p/90PBLu8iZTxr8yYZNyTtiAujUqyN+CIxw==", - "dev": true, - "requires": { - "handlebars": "^4.1.0" - } - }, - "istextorbinary": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.5.1.tgz", - "integrity": "sha512-pv/JNPWnfpwGjPx7JrtWTwsWsxkrK3fNzcEVnt92YKEIErps4Fsk49+qzCe9iQF2hjqK8Naqf8P9kzoeCuQI1g==", - "dev": true, - "requires": { - "binaryextensions": "^2.1.2", - "editions": "^2.1.3", - "textextensions": "^2.4.0" - } - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "dev": true, - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, - "jest": { - "version": "24.1.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-24.1.0.tgz", - "integrity": "sha512-+q91L65kypqklvlRFfXfdzUKyngQLOcwGhXQaLmVHv+d09LkNXuBuGxlofTFW42XMzu3giIcChchTsCNUjQ78A==", - "dev": true, - "requires": { - "import-local": "^2.0.0", - "jest-cli": "^24.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "camelcase": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.0.tgz", - "integrity": "sha512-Y05ICatFYPAfykDIB7VdwSJ0LUl1yq/BwO2OpyGGLjiRe1fgzTwVypPiWnzkGFOVFHXrCXUNBl86bpjBhZWSJg==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "jest-cli": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.5.0.tgz", - "integrity": "sha512-P+Jp0SLO4KWN0cGlNtC7JV0dW1eSFR7eRpoOucP2UM0sqlzp/bVHeo71Omonvigrj9AvCKy7NtQANtqJ7FXz8g==", - "dev": true, - "requires": { - "@jest/core": "^24.5.0", - "@jest/test-result": "^24.5.0", - "@jest/types": "^24.5.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "import-local": "^2.0.0", - "is-ci": "^2.0.0", - "jest-config": "^24.5.0", - "jest-util": "^24.5.0", - "jest-validate": "^24.5.0", - "prompts": "^2.0.1", - "realpath-native": "^1.1.0", - "yargs": "^12.0.2" - } - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "jest-changed-files": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.5.0.tgz", - "integrity": "sha512-Ikl29dosYnTsH9pYa1Tv9POkILBhN/TLZ37xbzgNsZ1D2+2n+8oEZS2yP1BrHn/T4Rs4Ggwwbp/x8CKOS5YJOg==", - "dev": true, - "requires": { - "@jest/types": "^24.5.0", - "execa": "^1.0.0", - "throat": "^4.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - } - } - }, - "jest-config": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.5.0.tgz", - "integrity": "sha512-t2UTh0Z2uZhGBNVseF8wA2DS2SuBiLOL6qpLq18+OZGfFUxTM7BzUVKyHFN/vuN+s/aslY1COW95j1Rw81huOQ==", - "dev": true, - "requires": { - "@babel/core": "^7.1.0", - "@jest/types": "^24.5.0", - "babel-jest": "^24.5.0", - "chalk": "^2.0.1", - "glob": "^7.1.1", - "jest-environment-jsdom": "^24.5.0", - "jest-environment-node": "^24.5.0", - "jest-get-type": "^24.3.0", - "jest-jasmine2": "^24.5.0", - "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.5.0", - "jest-util": "^24.5.0", - "jest-validate": "^24.5.0", - "micromatch": "^3.1.10", - "pretty-format": "^24.5.0", - "realpath-native": "^1.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-diff": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.5.0.tgz", - "integrity": "sha512-mCILZd9r7zqL9Uh6yNoXjwGQx0/J43OD2vvWVKwOEOLZliQOsojXwqboubAQ+Tszrb6DHGmNU7m4whGeB9YOqw==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "diff-sequences": "^24.3.0", - "jest-get-type": "^24.3.0", - "pretty-format": "^24.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-docblock": { - "version": "24.3.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.3.0.tgz", - "integrity": "sha512-nlANmF9Yq1dufhFlKG9rasfQlrY7wINJbo3q01tu56Jv5eBU5jirylhF2O5ZBnLxzOVBGRDz/9NAwNyBtG4Nyg==", - "dev": true, - "requires": { - "detect-newline": "^2.1.0" - } - }, - "jest-each": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.5.0.tgz", - "integrity": "sha512-6gy3Kh37PwIT5sNvNY2VchtIFOOBh8UCYnBlxXMb5sr5wpJUDPTUATX2Axq1Vfk+HWTMpsYPeVYp4TXx5uqUBw==", - "dev": true, - "requires": { - "@jest/types": "^24.5.0", - "chalk": "^2.0.1", - "jest-get-type": "^24.3.0", - "jest-util": "^24.5.0", - "pretty-format": "^24.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-environment-jsdom": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.5.0.tgz", - "integrity": "sha512-62Ih5HbdAWcsqBx2ktUnor/mABBo1U111AvZWcLKeWN/n/gc5ZvDBKe4Og44fQdHKiXClrNGC6G0mBo6wrPeGQ==", - "dev": true, - "requires": { - "@jest/environment": "^24.5.0", - "@jest/fake-timers": "^24.5.0", - "@jest/types": "^24.5.0", - "jest-mock": "^24.5.0", - "jest-util": "^24.5.0", - "jsdom": "^11.5.1" - } - }, - "jest-environment-node": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.5.0.tgz", - "integrity": "sha512-du6FuyWr/GbKLsmAbzNF9mpr2Iu2zWSaq/BNHzX+vgOcts9f2ayXBweS7RAhr+6bLp6qRpMB6utAMF5Ygktxnw==", - "dev": true, - "requires": { - "@jest/environment": "^24.5.0", - "@jest/fake-timers": "^24.5.0", - "@jest/types": "^24.5.0", - "jest-mock": "^24.5.0", - "jest-util": "^24.5.0" - } - }, - "jest-get-type": { - "version": "24.3.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.3.0.tgz", - "integrity": "sha512-HYF6pry72YUlVcvUx3sEpMRwXEWGEPlJ0bSPVnB3b3n++j4phUEoSPcS6GC0pPJ9rpyPSe4cb5muFo6D39cXow==", - "dev": true - }, - "jest-haste-map": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.5.0.tgz", - "integrity": "sha512-mb4Yrcjw9vBgSvobDwH8QUovxApdimGcOkp+V1ucGGw4Uvr3VzZQBJhNm1UY3dXYm4XXyTW2G7IBEZ9pM2ggRQ==", - "dev": true, - "requires": { - "@jest/types": "^24.5.0", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.1.15", - "invariant": "^2.2.4", - "jest-serializer": "^24.4.0", - "jest-util": "^24.5.0", - "jest-worker": "^24.4.0", - "micromatch": "^3.1.10", - "sane": "^4.0.3" - } - }, - "jest-jasmine2": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.5.0.tgz", - "integrity": "sha512-sfVrxVcx1rNUbBeyIyhkqZ4q+seNKyAG6iM0S2TYBdQsXjoFDdqWFfsUxb6uXSsbimbXX/NMkJIwUZ1uT9+/Aw==", - "dev": true, - "requires": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^24.5.0", - "@jest/test-result": "^24.5.0", - "@jest/types": "^24.5.0", - "chalk": "^2.0.1", - "co": "^4.6.0", - "expect": "^24.5.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^24.5.0", - "jest-matcher-utils": "^24.5.0", - "jest-message-util": "^24.5.0", - "jest-runtime": "^24.5.0", - "jest-snapshot": "^24.5.0", - "jest-util": "^24.5.0", - "pretty-format": "^24.5.0", - "throat": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-junit": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-6.2.1.tgz", - "integrity": "sha512-zMbwKzZGo9TQOjdBUNQdTEf81QvOrwiQtLIUSEyCwPXYx/G/DJGXEJcqs8viXxn6poJ4Xh4pYGDLD0DKDwtfVA==", - "dev": true, - "requires": { - "jest-validate": "^24.0.0", - "mkdirp": "^0.5.1", - "strip-ansi": "^4.0.0", - "xml": "^1.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "jest-leak-detector": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.5.0.tgz", - "integrity": "sha512-LZKBjGovFRx3cRBkqmIg+BZnxbrLqhQl09IziMk3oeh1OV81Hg30RUIx885mq8qBv1PA0comB9bjKcuyNO1bCQ==", - "dev": true, - "requires": { - "pretty-format": "^24.5.0" - } - }, - "jest-matcher-utils": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.5.0.tgz", - "integrity": "sha512-QM1nmLROjLj8GMGzg5VBra3I9hLpjMPtF1YqzQS3rvWn2ltGZLrGAO1KQ9zUCVi5aCvrkbS5Ndm2evIP9yZg1Q==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "jest-diff": "^24.5.0", - "jest-get-type": "^24.3.0", - "pretty-format": "^24.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-message-util": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.5.0.tgz", - "integrity": "sha512-6ZYgdOojowCGiV0D8WdgctZEAe+EcFU+KrVds+0ZjvpZurUW2/oKJGltJ6FWY2joZwYXN5VL36GPV6pNVRqRnQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@jest/test-result": "^24.5.0", - "@jest/types": "^24.5.0", - "@types/stack-utils": "^1.0.1", - "chalk": "^2.0.1", - "micromatch": "^3.1.10", - "slash": "^2.0.0", - "stack-utils": "^1.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-mock": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.5.0.tgz", - "integrity": "sha512-ZnAtkWrKf48eERgAOiUxVoFavVBziO2pAi2MfZ1+bGXVkDfxWLxU0//oJBkgwbsv6OAmuLBz4XFFqvCFMqnGUw==", - "dev": true, - "requires": { - "@jest/types": "^24.5.0" - } - }, - "jest-pnp-resolver": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz", - "integrity": "sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ==", - "dev": true - }, - "jest-preset-angular": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/jest-preset-angular/-/jest-preset-angular-6.0.2.tgz", - "integrity": "sha512-uhrllY41tUvkeR41aX9bU5w3/EvvmwZiJ3UitDhRSEJL2Jvq2N/xKlmw7qvlZoGZnciFjOUJ2WDKv5fmCrvnQA==", - "dev": true, - "requires": { - "@types/jest": "^23.3.1", - "jest-zone-patch": ">=0.0.9 <1.0.0", - "ts-jest": "~23.1.3" - }, - "dependencies": { - "@types/jest": { - "version": "23.3.14", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-23.3.14.tgz", - "integrity": "sha512-Q5hTcfdudEL2yOmluA1zaSyPbzWPmJ3XfSWeP3RyoYvS9hnje1ZyagrZOuQ6+1nQC1Gw+7gap3pLNL3xL6UBug==", - "dev": true - } - } - }, - "jest-regex-util": { - "version": "24.3.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.3.0.tgz", - "integrity": "sha512-tXQR1NEOyGlfylyEjg1ImtScwMq8Oh3iJbGTjN7p0J23EuVX1MA8rwU69K4sLbCmwzgCUbVkm0FkSF9TdzOhtg==", - "dev": true - }, - "jest-resolve": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.5.0.tgz", - "integrity": "sha512-ZIfGqLX1Rg8xJpQqNjdoO8MuxHV1q/i2OO1hLXjgCWFWs5bsedS8UrOdgjUqqNae6DXA+pCyRmdcB7lQEEbXew==", - "dev": true, - "requires": { - "@jest/types": "^24.5.0", - "browser-resolve": "^1.11.3", - "chalk": "^2.0.1", - "jest-pnp-resolver": "^1.2.1", - "realpath-native": "^1.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-resolve-dependencies": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.5.0.tgz", - "integrity": "sha512-dRVM1D+gWrFfrq2vlL5P9P/i8kB4BOYqYf3S7xczZ+A6PC3SgXYSErX/ScW/469pWMboM1uAhgLF+39nXlirCQ==", - "dev": true, - "requires": { - "@jest/types": "^24.5.0", - "jest-regex-util": "^24.3.0", - "jest-snapshot": "^24.5.0" - } - }, - "jest-runner": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.5.0.tgz", - "integrity": "sha512-oqsiS9TkIZV5dVkD+GmbNfWBRPIvxqmlTQ+AQUJUQ07n+4xTSDc40r+aKBynHw9/tLzafC00DIbJjB2cOZdvMA==", - "dev": true, - "requires": { - "@jest/console": "^24.3.0", - "@jest/environment": "^24.5.0", - "@jest/test-result": "^24.5.0", - "@jest/types": "^24.5.0", - "chalk": "^2.4.2", - "exit": "^0.1.2", - "graceful-fs": "^4.1.15", - "jest-config": "^24.5.0", - "jest-docblock": "^24.3.0", - "jest-haste-map": "^24.5.0", - "jest-jasmine2": "^24.5.0", - "jest-leak-detector": "^24.5.0", - "jest-message-util": "^24.5.0", - "jest-resolve": "^24.5.0", - "jest-runtime": "^24.5.0", - "jest-util": "^24.5.0", - "jest-worker": "^24.4.0", - "source-map-support": "^0.5.6", - "throat": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-runtime": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.5.0.tgz", - "integrity": "sha512-GTFHzfLdwpaeoDPilNpBrorlPoNZuZrwKKzKJs09vWwHo+9TOsIIuszK8cWOuKC7ss07aN1922Ge8fsGdsqCuw==", - "dev": true, - "requires": { - "@jest/console": "^24.3.0", - "@jest/environment": "^24.5.0", - "@jest/source-map": "^24.3.0", - "@jest/transform": "^24.5.0", - "@jest/types": "^24.5.0", - "@types/yargs": "^12.0.2", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.1.15", - "jest-config": "^24.5.0", - "jest-haste-map": "^24.5.0", - "jest-message-util": "^24.5.0", - "jest-mock": "^24.5.0", - "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.5.0", - "jest-snapshot": "^24.5.0", - "jest-util": "^24.5.0", - "jest-validate": "^24.5.0", - "realpath-native": "^1.1.0", - "slash": "^2.0.0", - "strip-bom": "^3.0.0", - "yargs": "^12.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "camelcase": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.0.tgz", - "integrity": "sha512-Y05ICatFYPAfykDIB7VdwSJ0LUl1yq/BwO2OpyGGLjiRe1fgzTwVypPiWnzkGFOVFHXrCXUNBl86bpjBhZWSJg==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "jest-serializer": { - "version": "24.4.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.4.0.tgz", - "integrity": "sha512-k//0DtglVstc1fv+GY/VHDIjrtNjdYvYjMlbLUed4kxrE92sIUewOi5Hj3vrpB8CXfkJntRPDRjCrCvUhBdL8Q==", - "dev": true - }, - "jest-snapshot": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.5.0.tgz", - "integrity": "sha512-eBEeJb5ROk0NcpodmSKnCVgMOo+Qsu5z9EDl3tGffwPzK1yV37mjGWF2YeIz1NkntgTzP+fUL4s09a0+0dpVWA==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0", - "@jest/types": "^24.5.0", - "chalk": "^2.0.1", - "expect": "^24.5.0", - "jest-diff": "^24.5.0", - "jest-matcher-utils": "^24.5.0", - "jest-message-util": "^24.5.0", - "jest-resolve": "^24.5.0", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "pretty-format": "^24.5.0", - "semver": "^5.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-sonar-reporter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jest-sonar-reporter/-/jest-sonar-reporter-2.0.0.tgz", - "integrity": "sha512-ZervDCgEX5gdUbdtWsjdipLN3bKJwpxbvhkYNXTAYvAckCihobSLr9OT/IuyNIRT1EZMDDwR6DroWtrq+IL64w==", - "dev": true, - "requires": { - "xml": "^1.0.1" - } - }, - "jest-util": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.5.0.tgz", - "integrity": "sha512-Xy8JsD0jvBz85K7VsTIQDuY44s+hYJyppAhcsHsOsGisVtdhar6fajf2UOf2mEVEgh15ZSdA0zkCuheN8cbr1Q==", - "dev": true, - "requires": { - "@jest/console": "^24.3.0", - "@jest/fake-timers": "^24.5.0", - "@jest/source-map": "^24.3.0", - "@jest/test-result": "^24.5.0", - "@jest/types": "^24.5.0", - "@types/node": "*", - "callsites": "^3.0.0", - "chalk": "^2.0.1", - "graceful-fs": "^4.1.15", - "is-ci": "^2.0.0", - "mkdirp": "^0.5.1", - "slash": "^2.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "callsites": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", - "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-validate": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.5.0.tgz", - "integrity": "sha512-gg0dYszxjgK2o11unSIJhkOFZqNRQbWOAB2/LOUdsd2LfD9oXiMeuee8XsT0iRy5EvSccBgB4h/9HRbIo3MHgQ==", - "dev": true, - "requires": { - "@jest/types": "^24.5.0", - "camelcase": "^5.0.0", - "chalk": "^2.0.1", - "jest-get-type": "^24.3.0", - "leven": "^2.1.0", - "pretty-format": "^24.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "camelcase": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.0.tgz", - "integrity": "sha512-Y05ICatFYPAfykDIB7VdwSJ0LUl1yq/BwO2OpyGGLjiRe1fgzTwVypPiWnzkGFOVFHXrCXUNBl86bpjBhZWSJg==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-watcher": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.5.0.tgz", - "integrity": "sha512-/hCpgR6bg0nKvD3nv4KasdTxuhwfViVMHUATJlnGCD0r1QrmIssimPbmc5KfAQblAVxkD8xrzuij9vfPUk1/rA==", - "dev": true, - "requires": { - "@jest/test-result": "^24.5.0", - "@jest/types": "^24.5.0", - "@types/node": "*", - "@types/yargs": "^12.0.9", - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.1", - "jest-util": "^24.5.0", - "string-length": "^2.0.0" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-worker": { - "version": "24.4.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.4.0.tgz", - "integrity": "sha512-BH9X/klG9vxwoO99ZBUbZFfV8qO0XNZ5SIiCyYK2zOuJBl6YJVAeNIQjcoOVNu4HGEHeYEKsUWws8kSlSbZ9YQ==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^1.0.1", - "supports-color": "^6.1.0" - }, - "dependencies": { - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "jest-zone-patch": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/jest-zone-patch/-/jest-zone-patch-0.0.10.tgz", - "integrity": "sha512-K5uHLHgMgi2Eyj74gbY+xSeGGekb5U48bXsgDwgipRbFdaekyZK+TAcp8auamqU4UjrAt5S4sIUZz/2bBNyTTA==", - "dev": true - }, - "jhipster-core": { - "version": "3.6.11", - "resolved": "https://registry.npmjs.org/jhipster-core/-/jhipster-core-3.6.11.tgz", - "integrity": "sha512-OibJay1+nwKk+mfRfuTrt2rW2h7BmGNfKWR7TQO4oYqG+I096EvJxZkIMCcjA9KuKLOZvnzfEi4UbtKyRTmHkg==", - "dev": true, - "requires": { - "chevrotain": "4.2.0", - "fs-extra": "7.0.1", - "lodash": "4.17.11", - "winston": "3.2.1" - }, - "dependencies": { - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - } - } - }, - "joi": { - "version": "11.4.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-11.4.0.tgz", - "integrity": "sha512-O7Uw+w/zEWgbL6OcHbyACKSj0PkQeUgmehdoXVSxt92QFCq4+1390Rwh5moI2K/OgC7D8RHRZqHZxT2husMJHA==", - "dev": true, - "requires": { - "hoek": "4.x.x", - "isemail": "3.x.x", - "topo": "2.x.x" - } - }, - "js-object-pretty-print": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/js-object-pretty-print/-/js-object-pretty-print-0.3.0.tgz", - "integrity": "sha1-RnDkUAZu4ezPNRdMfRl/WqOLz3Q=", - "dev": true - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "jsdom": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", - "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", - "dev": true, - "requires": { - "abab": "^2.0.0", - "acorn": "^5.5.3", - "acorn-globals": "^4.1.0", - "array-equal": "^1.0.0", - "cssom": ">= 0.3.2 < 0.4.0", - "cssstyle": "^1.0.0", - "data-urls": "^1.0.0", - "domexception": "^1.0.1", - "escodegen": "^1.9.1", - "html-encoding-sniffer": "^1.0.2", - "left-pad": "^1.3.0", - "nwsapi": "^2.0.7", - "parse5": "4.0.0", - "pn": "^1.1.0", - "request": "^2.87.0", - "request-promise-native": "^1.0.5", - "sax": "^1.2.4", - "symbol-tree": "^3.2.2", - "tough-cookie": "^2.3.4", - "w3c-hr-time": "^1.0.1", - "webidl-conversions": "^4.0.2", - "whatwg-encoding": "^1.0.3", - "whatwg-mimetype": "^2.1.0", - "whatwg-url": "^6.4.1", - "ws": "^5.2.0", - "xml-name-validator": "^3.0.0" - }, - "dependencies": { - "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - } - } - }, - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", - "dev": true - }, - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "jsonfile": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", - "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "jstransform": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-11.0.3.tgz", - "integrity": "sha1-CaeJk+CuTU70SH9hVakfYZDLQiM=", - "dev": true, - "requires": { - "base62": "^1.1.0", - "commoner": "^0.10.1", - "esprima-fb": "^15001.1.0-dev-harmony-fb", - "object-assign": "^2.0.0", - "source-map": "^0.4.2" - }, - "dependencies": { - "esprima-fb": { - "version": "15001.1.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz", - "integrity": "sha1-MKlHMDxrjV6VW+4rmbHSMyBqaQE=", - "dev": true - }, - "object-assign": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", - "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=", - "dev": true - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "killable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", - "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "kleur": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.2.tgz", - "integrity": "sha512-3h7B2WRT5LNXOtQiAaWonilegHcPSf9nLVXlSTci8lu1dZUuui61+EsPEZqSVxY7rXYmB2DVKMQILxaO5WL61Q==", - "dev": true - }, - "kuler": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-1.0.1.tgz", - "integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==", - "dev": true, - "requires": { - "colornames": "^1.1.1" - } - }, - "last-call-webpack-plugin": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz", - "integrity": "sha512-7KI2l2GIZa9p2spzPIVZBYyNKkN+e/SQPpnjlTiPhdbDW3F86tdKKELxKpzJ5sgU19wQWsACULZmpTPYHeWO5w==", - "dev": true, - "requires": { - "lodash": "^4.17.5", - "webpack-sources": "^1.1.0" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "left-pad": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", - "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", - "dev": true - }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "limiter": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.4.tgz", - "integrity": "sha512-XCpr5bElgDI65vVgstP8TWjv6/QKWm9GU5UG0Pr5sLQ3QLo8NVKsioe+Jed5/3vFOe3IQuqE7DKwTvKQkjTHvg==", - "dev": true - }, - "lint-staged": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-8.1.3.tgz", - "integrity": "sha512-6TGkikL1B+6mIOuSNq2TV6oP21IhPMnV8q0cf9oYZ296ArTVNcbFh1l1pfVOHHbBIYLlziWNsQ2q45/ffmJ4AA==", - "dev": true, - "requires": { - "@iamstarkov/listr-update-renderer": "0.4.1", - "chalk": "^2.3.1", - "commander": "^2.14.1", - "cosmiconfig": "^5.0.2", - "debug": "^3.1.0", - "dedent": "^0.7.0", - "del": "^3.0.0", - "execa": "^1.0.0", - "find-parent-dir": "^0.3.0", - "g-status": "^2.0.2", - "is-glob": "^4.0.0", - "is-windows": "^1.0.2", - "listr": "^0.14.2", - "lodash": "^4.17.5", - "log-symbols": "^2.2.0", - "micromatch": "^3.1.8", - "npm-which": "^3.0.1", - "p-map": "^1.1.1", - "path-is-inside": "^1.0.2", - "pify": "^3.0.0", - "please-upgrade-node": "^3.0.2", - "staged-git-files": "1.1.2", - "string-argv": "^0.0.2", - "stringify-object": "^3.2.2", - "yup": "^0.26.10" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "listr": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/listr/-/listr-0.14.3.tgz", - "integrity": "sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA==", - "dev": true, - "requires": { - "@samverschueren/stream-to-observable": "^0.3.0", - "is-observable": "^1.1.0", - "is-promise": "^2.1.0", - "is-stream": "^1.1.0", - "listr-silent-renderer": "^1.1.1", - "listr-update-renderer": "^0.5.0", - "listr-verbose-renderer": "^0.5.0", - "p-map": "^2.0.0", - "rxjs": "^6.3.3" - }, - "dependencies": { - "p-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.0.0.tgz", - "integrity": "sha512-GO107XdrSUmtHxVoi60qc9tUl/KkNKm+X2CF4P9amalpGxv5YqVPJNfSb0wcA+syCopkZvYYIzW8OVTQW59x/w==", - "dev": true - } - } - }, - "listr-silent-renderer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", - "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", - "dev": true - }, - "listr-update-renderer": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz", - "integrity": "sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA==", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^2.3.0", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "dev": true, - "requires": { - "chalk": "^1.0.0" - } - } - } - }, - "listr-verbose-renderer": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz", - "integrity": "sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "cli-cursor": "^2.1.0", - "date-fns": "^1.27.2", - "figures": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, - "loader-runner": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", - "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", - "dev": true - }, - "loader-utils": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", - "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^2.0.0", - "json5": "^1.0.1" - } - }, - "localtunnel": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-1.9.1.tgz", - "integrity": "sha512-HWrhOslklDvxgOGFLxi6fQVnvpl6XdX4sPscfqMZkzi3gtt9V7LKBWYvNUcpHSVvjwCQ6xzXacVvICNbNcyPnQ==", - "dev": true, - "requires": { - "axios": "0.17.1", - "debug": "2.6.9", - "openurl": "1.1.1", - "yargs": "6.6.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", - "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^4.2.0" - } - }, - "yargs-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", - "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", - "dev": true, - "requires": { - "camelcase": "^3.0.0" - } - } - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "lodash.difference": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", - "dev": true - }, - "lodash.isfinite": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz", - "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=", - "dev": true - }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "lodash.pad": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz", - "integrity": "sha1-QzCUmoM6fI2iLMIPaibE1Z3runA=", - "dev": true - }, - "lodash.padend": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", - "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=", - "dev": true - }, - "lodash.padstart": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", - "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=", - "dev": true - }, - "lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", - "dev": true - }, - "lodash.template": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", - "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", - "dev": true, - "requires": { - "lodash._reinterpolate": "~3.0.0", - "lodash.templatesettings": "^4.0.0" - } - }, - "lodash.templatesettings": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", - "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", - "dev": true, - "requires": { - "lodash._reinterpolate": "~3.0.0" - } - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "log-update": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-2.3.0.tgz", - "integrity": "sha1-iDKP19HOeTiykoN0bwsbwSayRwg=", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "cli-cursor": "^2.0.0", - "wrap-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "wrap-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz", - "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0" - } - } - } - }, - "logform": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.1.2.tgz", - "integrity": "sha512-+lZh4OpERDBLqjiwDLpAWNQu6KMjnlXH2ByZwCuSqVPJletw0kTWJf5CgSNAUKn1KUkv3m2cUz/LK8zyEy7wzQ==", - "dev": true, - "requires": { - "colors": "^1.2.1", - "fast-safe-stringify": "^2.0.4", - "fecha": "^2.3.3", - "ms": "^2.1.1", - "triple-beam": "^1.3.0" - }, - "dependencies": { - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "loglevel": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", - "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "macos-release": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-1.1.0.tgz", - "integrity": "sha512-mmLbumEYMi5nXReB9js3WGsB8UE6cDBWyIO62Z4DNx6GbRhDxHNjA1MlzSpJ2S2KM1wyiPRA0d19uHWYYvMHjA==", - "dev": true - }, - "magic-string": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.1.tgz", - "integrity": "sha512-sCuTz6pYom8Rlt4ISPFn6wuFodbKMIHUMv4Qko9P17dpxb7s52KJTmRuZZqHdGmLCK9AOcDare039nRIcfdkEg==", - "dev": true, - "requires": { - "sourcemap-codec": "^1.4.1" - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "make-fetch-happen": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz", - "integrity": "sha512-7R5ivfy9ilRJ1EMKIOziwrns9fGeAD4bAha8EB7BIiBBLHm2KeTUGCrICFt2rbHfzheTLynv50GnNTK1zDTrcQ==", - "dev": true, - "requires": { - "agentkeepalive": "^3.4.1", - "cacache": "^11.0.1", - "http-cache-semantics": "^3.8.1", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.1", - "lru-cache": "^4.1.2", - "mississippi": "^3.0.0", - "node-fetch-npm": "^2.0.2", - "promise-retry": "^1.1.1", - "socks-proxy-agent": "^4.0.0", - "ssri": "^6.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "makeerror": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", - "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", - "dev": true, - "requires": { - "tmpl": "1.0.x" - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "matcher": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-1.1.1.tgz", - "integrity": "sha512-+BmqxWIubKTRKNWx/ahnCkk3mG8m7OturVlqq6HiojGJTd5hVYbgZm6WzcYPCoB+KBT4Vd6R7WSRG2OADNaCjg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.4" - } - }, - "math-random": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", - "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", - "dev": true - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mdn-data": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz", - "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==", - "dev": true - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "mem-fs": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/mem-fs/-/mem-fs-1.1.3.tgz", - "integrity": "sha1-uK6NLj/Lb10/kWXBLUVRoGXZicw=", - "dev": true, - "requires": { - "through2": "^2.0.0", - "vinyl": "^1.1.0", - "vinyl-file": "^2.0.0" - } - }, - "mem-fs-editor": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-5.1.0.tgz", - "integrity": "sha512-2Yt2GCYEbcotYbIJagmow4gEtHDqzpq5XN94+yAx/NT5+bGqIjkXnm3KCUQfE6kRfScGp9IZknScoGRKu8L78w==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "deep-extend": "^0.6.0", - "ejs": "^2.5.9", - "glob": "^7.0.3", - "globby": "^8.0.1", - "isbinaryfile": "^3.0.2", - "mkdirp": "^0.5.0", - "multimatch": "^2.0.0", - "rimraf": "^2.2.8", - "through2": "^2.0.0", - "vinyl": "^2.0.1" - }, - "dependencies": { - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "dev": true - }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - } - }, - "globby": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", - "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", - "dev": true - }, - "vinyl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", - "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", - "dev": true, - "requires": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - } - } - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "meow": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", - "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", - "dev": true, - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0", - "yargs-parser": "^10.0.0" - }, - "dependencies": { - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge-jsons-webpack-plugin": { - "version": "1.0.18", - "resolved": "https://registry.npmjs.org/merge-jsons-webpack-plugin/-/merge-jsons-webpack-plugin-1.0.18.tgz", - "integrity": "sha512-wUcK5k9XzsquOcV6TtO7ZA/kWx+LVGuOk/+YjzWgVINWh8CAjANShtgTwEE87ewN3bcZ4PMyWQbEGDpIQh30xg==", - "dev": true, - "requires": { - "es6-promise": "4.0.5", - "glob": "7.1.1" - }, - "dependencies": { - "es6-promise": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.0.5.tgz", - "integrity": "sha1-eILzCt3lskDM+n99eMVIMwlRrkI=", - "dev": true - }, - "glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", - "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.2", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "merge-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", - "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "merge2": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.3.tgz", - "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true - }, - "mime-db": { - "version": "1.38.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", - "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", - "dev": true - }, - "mime-types": { - "version": "2.1.22", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", - "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", - "dev": true, - "requires": { - "mime-db": "~1.38.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true - }, - "mini-css-extract-plugin": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.5.0.tgz", - "integrity": "sha512-IuaLjruM0vMKhUUT51fQdQzBYTX49dLj8w68ALEAe2A4iYNpIC4eMac67mt3NzycvjOlf07/kYxJDc0RTl1Wqw==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^1.0.0", - "webpack-sources": "^1.1.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "minimist-options": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" - } - }, - "minipass": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", - "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", - "dev": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mitt": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/mitt/-/mitt-1.1.3.tgz", - "integrity": "sha512-mUDCnVNsAi+eD6qA0HkRkwYczbLHJ49z17BGe2PYRhZL4wpZUFZGJHU7/5tmvohoma+Hdn0Vh/oJTiPEmgSruA==", - "dev": true - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "moment": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", - "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" - }, - "moment-locales-webpack-plugin": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/moment-locales-webpack-plugin/-/moment-locales-webpack-plugin-1.0.7.tgz", - "integrity": "sha512-KjYpaAhmuzGFZl6534FlZoK7QtW3vqlxd+A17W9DlgHJ5yhXANy7AZJl7iYtZpWjAfMTAWiVrQ7YDZdkFO6uRw==", - "dev": true, - "requires": { - "lodash.difference": "^4.5.0" - } - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", - "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", - "dev": true, - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "multimatch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", - "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", - "dev": true, - "requires": { - "array-differ": "^1.0.0", - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "minimatch": "^3.0.0" - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, - "nan": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", - "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", - "dev": true - }, - "neo-async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", - "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", - "dev": true - }, - "ng-jhipster": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/ng-jhipster/-/ng-jhipster-0.9.1.tgz", - "integrity": "sha512-/ViJ6bNtc/4w6valKNvHKyvXF1cn1OBnSEh3Q8aEUHtmoyr9owReTGHT7ylNclthUsxztRMUS4GrMMEQ5kM09Q==", - "requires": { - "tslib": "^1.9.0" - } - }, - "ngx-cookie": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ngx-cookie/-/ngx-cookie-2.0.1.tgz", - "integrity": "sha512-3+agXZkoPxRP3IyELf7Eiuhk6TX+EAX974kkCR6Xjm+N7boEA+Fin2Q90AAE4XZzY48skkVzLH96TOikb5yU3g==" - }, - "ngx-infinite-scroll": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ngx-infinite-scroll/-/ngx-infinite-scroll-7.0.1.tgz", - "integrity": "sha512-be9DAAuabV7VGI06/JUnS6pXC6mcBOzA4+SBCwOcP9WwJ2r5GjdZyOa34ls9hi1MnCOj3zrXLvPKQ/UDp6csIw==", - "requires": { - "opencollective": "^1.0.3" - } - }, - "ngx-webstorage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ngx-webstorage/-/ngx-webstorage-2.0.1.tgz", - "integrity": "sha512-AhBkl1v5sBLYiGC1DuHxM90B8OewqyhYhm+KGtJIFxMh5dj3tlNgPokmWCtKcUZF26m8MgxDDuP5e6NeDCpYQw==" - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, - "node-fetch": { - "version": "1.6.3", - "resolved": "http://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz", - "integrity": "sha1-3CNO3WSJmC1Y6PDbT2lQKavNjAQ=", - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "node-fetch-npm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", - "integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==", - "dev": true, - "requires": { - "encoding": "^0.1.11", - "json-parse-better-errors": "^1.0.0", - "safe-buffer": "^5.1.1" - } - }, - "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", - "dev": true - }, - "node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", - "dev": true - }, - "node-libs-browser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", - "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, - "node-modules-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", - "dev": true - }, - "node-notifier": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.0.tgz", - "integrity": "sha512-SUDEb+o71XR5lXSTyivXd9J7fCloE3SyP4lSgt3lU2oSANiox+SxlNRGPjDKrwU1YN3ix2KN/VGGCg0t01rttQ==", - "dev": true, - "requires": { - "growly": "^1.3.0", - "is-wsl": "^1.1.0", - "semver": "^5.5.0", - "shellwords": "^0.1.1", - "which": "^1.3.0" - } - }, - "node-releases": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.12.tgz", - "integrity": "sha512-Y+AQ1xdjcgaEzpL65PBEF3fnl1FNKnDh9Zm+AUQLIlyyqtSc4u93jyMN4zrjMzdwKQ10RTr3tgY1x7qpsfF/xg==", - "dev": true, - "requires": { - "semver": "^5.3.0" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", - "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", - "dev": true - }, - "npm-bundled": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", - "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", - "dev": true - }, - "npm-package-arg": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", - "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.6.0", - "osenv": "^0.1.5", - "semver": "^5.5.0", - "validate-npm-package-name": "^3.0.0" - } - }, - "npm-packlist": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", - "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", - "dev": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npm-path": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-2.0.4.tgz", - "integrity": "sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw==", - "dev": true, - "requires": { - "which": "^1.2.10" - } - }, - "npm-pick-manifest": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz", - "integrity": "sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1", - "npm-package-arg": "^6.0.0", - "semver": "^5.4.1" - } - }, - "npm-registry-fetch": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.8.0.tgz", - "integrity": "sha512-hrw8UMD+Nob3Kl3h8Z/YjmKamb1gf7D1ZZch2otrIXM3uFLB5vjEY6DhMlq80z/zZet6eETLbOXcuQudCB3Zpw==", - "dev": true, - "requires": { - "JSONStream": "^1.3.4", - "bluebird": "^3.5.1", - "figgy-pudding": "^3.4.1", - "lru-cache": "^4.1.3", - "make-fetch-happen": "^4.0.1", - "npm-package-arg": "^6.1.0" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "npm-which": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/npm-which/-/npm-which-3.0.1.tgz", - "integrity": "sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo=", - "dev": true, - "requires": { - "commander": "^2.9.0", - "npm-path": "^2.0.2", - "which": "^1.2.10" - } - }, - "npmlog": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz", - "integrity": "sha1-mLUlMPJRTKkNCexbIsiEZyI3VpI=", - "dev": true, - "requires": { - "ansi": "~0.3.1", - "are-we-there-yet": "~1.1.2", - "gauge": "~1.2.5" - } - }, - "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "nwsapi": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.3.tgz", - "integrity": "sha512-RowAaJGEgYXEZfQ7tvvdtAQUKPyTR6T6wNu0fwlNsGQYr/h3yQc6oI8WnVZh3Y/Sylwc+dtAlvPqfFZjhTyk3A==", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz", - "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==", - "dev": true - }, - "object-path": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.9.2.tgz", - "integrity": "sha1-D9mnT8X60a45aLWGvaXGMr1sBaU=", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "object.values": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", - "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", - "function-bind": "^1.1.1", - "has": "^1.0.3" - } - }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "one-time": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz", - "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=", - "dev": true - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "opencollective": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/opencollective/-/opencollective-1.0.3.tgz", - "integrity": "sha1-ruY3K8KBRFg2kMPKja7PwSDdDvE=", - "requires": { - "babel-polyfill": "6.23.0", - "chalk": "1.1.3", - "inquirer": "3.0.6", - "minimist": "1.2.0", - "node-fetch": "1.6.3", - "opn": "4.0.2" - } - }, - "openurl": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz", - "integrity": "sha1-OHW0sO96UsFW8NtB1GCduw+Us4c=", - "dev": true - }, - "opn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", - "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", - "requires": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - } - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - } - } - }, - "optimize-css-assets-webpack-plugin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.1.tgz", - "integrity": "sha512-Rqm6sSjWtx9FchdP0uzTQDc7GXDKnwVEGoSxjezPkzMewx7gEWE9IMUYKmigTRC4U3RaNSwYVnUDLuIdtTpm0A==", - "dev": true, - "requires": { - "cssnano": "^4.1.0", - "last-call-webpack-plugin": "^3.0.0" - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - }, - "dependencies": { - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - } - } - }, - "original": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", - "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", - "dev": true, - "requires": { - "url-parse": "^1.4.3" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "os-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/os-name/-/os-name-2.0.1.tgz", - "integrity": "sha1-uaOGNhwXrjohc27wWZQFyajF3F4=", - "dev": true, - "requires": { - "macos-release": "^1.0.0", - "win-release": "^1.0.0" - } - }, - "os-shim": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", - "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=", - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", - "dev": true - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-each-series": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", - "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", - "dev": true, - "requires": { - "p-reduce": "^1.0.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", - "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true - }, - "p-reduce": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", - "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", - "dev": true - }, - "p-timeout": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", - "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pacote": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.4.0.tgz", - "integrity": "sha512-WQ1KL/phGMkedYEQx9ODsjj7xvwLSpdFJJdEXrLyw5SILMxcTNt5DTxT2Z93fXuLFYJBlZJdnwdalrQdB/rX5w==", - "dev": true, - "requires": { - "bluebird": "^3.5.3", - "cacache": "^11.3.2", - "figgy-pudding": "^3.5.1", - "get-stream": "^4.1.0", - "glob": "^7.1.3", - "lru-cache": "^5.1.1", - "make-fetch-happen": "^4.0.1", - "minimatch": "^3.0.4", - "minipass": "^2.3.5", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "normalize-package-data": "^2.4.0", - "npm-package-arg": "^6.1.0", - "npm-packlist": "^1.1.12", - "npm-pick-manifest": "^2.2.3", - "npm-registry-fetch": "^3.8.0", - "osenv": "^0.1.5", - "promise-inflight": "^1.0.1", - "promise-retry": "^1.1.1", - "protoduck": "^5.0.1", - "rimraf": "^2.6.2", - "safe-buffer": "^5.1.2", - "semver": "^5.6.0", - "ssri": "^6.0.1", - "tar": "^4.4.8", - "unique-filename": "^1.1.1", - "which": "^1.3.1" - } - }, - "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", - "dev": true - }, - "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", - "dev": true, - "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "parse-asn1": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", - "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "parse-gitignore": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-gitignore/-/parse-gitignore-1.0.1.tgz", - "integrity": "sha512-UGyowyjtx26n65kdAMWhm6/3uy5uSrpcuH7tt+QEVudiBoVS+eqHxD5kbi9oWVRwj7sCzXqwuM+rUGw7earl6A==", - "dev": true - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - }, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - } - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", - "dev": true - }, - "parseqs": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", - "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseuri": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", - "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "^2.0.0" - } - }, - "pirates": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", - "dev": true, - "requires": { - "node-modules-regexp": "^1.0.0" - } - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "please-upgrade-node": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz", - "integrity": "sha512-KY1uHnQ2NlQHqIJQpnh/i54rKkuxCEBx+voJIS/Mvb+L2iYd2NMotwduhKTMjfC1uKoX3VXOxLjIYG66dfJTVQ==", - "dev": true, - "requires": { - "semver-compare": "^1.0.0" - } - }, - "plugin-error": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", - "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", - "dev": true, - "requires": { - "ansi-cyan": "^0.1.1", - "ansi-red": "^0.1.1", - "arr-diff": "^1.0.1", - "arr-union": "^2.0.1", - "extend-shallow": "^1.1.2" - }, - "dependencies": { - "arr-diff": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", - "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1", - "array-slice": "^0.2.3" - } - }, - "arr-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", - "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", - "dev": true - }, - "extend-shallow": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", - "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", - "dev": true, - "requires": { - "kind-of": "^1.1.0" - } - }, - "kind-of": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", - "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", - "dev": true - } - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true - }, - "pn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", - "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", - "dev": true - }, - "portfinder": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz", - "integrity": "sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==", - "dev": true, - "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" - } - }, - "portscanner": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.1.1.tgz", - "integrity": "sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y=", - "dev": true, - "requires": { - "async": "1.5.2", - "is-number-like": "^1.0.3" - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", - "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-calc": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.1.tgz", - "integrity": "sha512-oXqx0m6tb4N3JGdmeMSc/i91KppbYsFZKdH0xMOqK8V1rJlzrKlTdokz8ozUXLVejydRN6u2IddxpcijRj2FqQ==", - "dev": true, - "requires": { - "css-unit-converter": "^1.1.1", - "postcss": "^7.0.5", - "postcss-selector-parser": "^5.0.0-rc.4", - "postcss-value-parser": "^3.3.1" - }, - "dependencies": { - "cssesc": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz", - "integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==", - "dev": true - }, - "postcss-selector-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz", - "integrity": "sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ==", - "dev": true, - "requires": { - "cssesc": "^2.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-colormin": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz", - "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "color": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-convert-values": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz", - "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-discard-comments": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz", - "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-duplicates": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz", - "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-empty": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz", - "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-overridden": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz", - "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-load-config": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.0.0.tgz", - "integrity": "sha512-V5JBLzw406BB8UIfsAWSK2KSwIJ5yoEIVFb4gVkXci0QdKgA24jLmHZ/ghe/GgX0lJ0/D1uUK1ejhzEY94MChQ==", - "dev": true, - "requires": { - "cosmiconfig": "^4.0.0", - "import-cwd": "^2.0.0" - }, - "dependencies": { - "cosmiconfig": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-4.0.0.tgz", - "integrity": "sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ==", - "dev": true, - "requires": { - "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^4.0.0", - "require-from-string": "^2.0.1" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - } - } - }, - "postcss-loader": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-3.0.0.tgz", - "integrity": "sha512-cLWoDEY5OwHcAjDnkyRQzAXfs2jrKjXpO/HQFcc5b5u/r7aa471wdmChmwfnv7x2u840iat/wi0lQ5nbRgSkUA==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "postcss": "^7.0.0", - "postcss-load-config": "^2.0.0", - "schema-utils": "^1.0.0" - } - }, - "postcss-merge-longhand": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz", - "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==", - "dev": true, - "requires": { - "css-color-names": "0.0.4", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "stylehacks": "^4.0.0" - } - }, - "postcss-merge-rules": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz", - "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "cssnano-util-same-parent": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0", - "vendors": "^1.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "dev": true, - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-minify-font-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz", - "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-minify-gradients": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz", - "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "is-color-stop": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-minify-params": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz", - "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "browserslist": "^4.0.0", - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "uniqs": "^2.0.0" - } - }, - "postcss-minify-selectors": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz", - "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "dev": true, - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-modules-extract-imports": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz", - "integrity": "sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==", - "dev": true, - "requires": { - "postcss": "^7.0.5" - } - }, - "postcss-modules-local-by-default": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.6.tgz", - "integrity": "sha512-oLUV5YNkeIBa0yQl7EYnxMgy4N6noxmiwZStaEJUSe2xPMcdNc8WmBQuQCx18H5psYbVxz8zoHk0RAAYZXP9gA==", - "dev": true, - "requires": { - "postcss": "^7.0.6", - "postcss-selector-parser": "^6.0.0", - "postcss-value-parser": "^3.3.1" - } - }, - "postcss-modules-scope": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.1.0.tgz", - "integrity": "sha512-91Rjps0JnmtUB0cujlc8KIKCsJXWjzuxGeT/+Q2i2HXKZ7nBUeF9YQTZZTNvHVoNYj1AthsjnGLtqDUE0Op79A==", - "dev": true, - "requires": { - "postcss": "^7.0.6", - "postcss-selector-parser": "^6.0.0" - } - }, - "postcss-modules-values": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-2.0.0.tgz", - "integrity": "sha512-Ki7JZa7ff1N3EIMlPnGTZfUMe69FFwiQPnVSXC9mnn3jozCRBYIxiZd44yJOV2AmabOo4qFf8s0dC/+lweG7+w==", - "dev": true, - "requires": { - "icss-replace-symbols": "^1.1.0", - "postcss": "^7.0.6" - } - }, - "postcss-normalize-charset": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz", - "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-normalize-display-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz", - "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-positions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz", - "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-repeat-style": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz", - "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-string": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz", - "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==", - "dev": true, - "requires": { - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-timing-functions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz", - "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-unicode": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", - "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-url": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz", - "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==", - "dev": true, - "requires": { - "is-absolute-url": "^2.0.0", - "normalize-url": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-whitespace": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz", - "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-ordered-values": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz", - "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-reduce-initial": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz", - "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "postcss-reduce-transforms": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz", - "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-selector-parser": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", - "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", - "dev": true, - "requires": { - "cssesc": "^3.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - }, - "dependencies": { - "cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true - } - } - }, - "postcss-svgo": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.2.tgz", - "integrity": "sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==", - "dev": true, - "requires": { - "is-svg": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "svgo": "^1.0.0" - } - }, - "postcss-unique-selectors": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz", - "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "postcss": "^7.0.0", - "uniqs": "^2.0.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "prettier": { - "version": "1.16.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.4.tgz", - "integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==", - "dev": true - }, - "pretty-bytes": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.1.0.tgz", - "integrity": "sha512-wa5+qGVg9Yt7PB6rYm3kXlKzgzgivYTLRandezh43jjRqgyDyP+9YxfJpJiLs9yKD1WeU8/OvtToWpW7255FtA==", - "dev": true - }, - "pretty-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", - "dev": true, - "requires": { - "renderkid": "^2.0.1", - "utila": "~0.4" - } - }, - "pretty-format": { - "version": "24.5.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.5.0.tgz", - "integrity": "sha512-/3RuSghukCf8Riu5Ncve0iI+BzVkbRU5EeUoArKARZobREycuH5O4waxvaNIloEXdb0qwgmEAed5vTpX1HNROQ==", - "dev": true, - "requires": { - "@jest/types": "^24.5.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - } - } - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "dev": true, - "requires": { - "asap": "~2.0.3" - } - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true - }, - "promise-retry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz", - "integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=", - "dev": true, - "requires": { - "err-code": "^1.0.0", - "retry": "^0.10.0" - } - }, - "prompts": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.0.4.tgz", - "integrity": "sha512-HTzM3UWp/99A0gk51gAegwo1QRYA7xjcZufMNe33rCclFszUYAuHe1fIN/3ZmiHeGPkUsNaRyQm1hHOfM0PKxA==", - "dev": true, - "requires": { - "kleur": "^3.0.2", - "sisteransi": "^1.0.0" - } - }, - "property-expr": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-1.5.1.tgz", - "integrity": "sha512-CGuc0VUTGthpJXL36ydB6jnbyOf/rAHFvmVrJlH+Rg0DqqLFQGAP6hIaxD/G0OAmBJPhXDHuEJigrp0e0wFV6g==", - "dev": true - }, - "protoduck": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz", - "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", - "dev": true, - "requires": { - "genfun": "^5.0.0" - } - }, - "proxy-addr": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", - "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.8.0" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.1.31", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", - "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, - "qs": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", - "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "querystringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.0.tgz", - "integrity": "sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg==", - "dev": true - }, - "quick-lru": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", - "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", - "dev": true - }, - "randexp": { - "version": "0.4.9", - "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.9.tgz", - "integrity": "sha512-maAX1cnBkzIZ89O4tSQUOF098xjGMC8N+9vuY/WfHwg87THw6odD2Br35donlj5e6KnB1SB0QBHhTQhhDHuTPQ==", - "dev": true, - "requires": { - "drange": "^1.0.0", - "ret": "^0.2.0" - }, - "dependencies": { - "ret": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", - "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", - "dev": true - } - } - }, - "randomatic": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", - "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", - "dev": true - }, - "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", - "unpipe": "1.0.0" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } - } - }, - "react": { - "version": "0.14.9", - "resolved": "https://registry.npmjs.org/react/-/react-0.14.9.tgz", - "integrity": "sha1-kRCmSXxJ1EuhwO3TF67CnC4NkdE=", - "dev": true, - "requires": { - "envify": "^3.0.0", - "fbjs": "^0.6.1" - } - }, - "react-dom": { - "version": "0.14.9", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.14.9.tgz", - "integrity": "sha1-BQZKPc8PsYgKOyv8nVjFXY2fYpM=", - "dev": true - }, - "react-is": { - "version": "16.8.6", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz", - "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==", - "dev": true - }, - "read-chunk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-2.1.0.tgz", - "integrity": "sha1-agTAkoAF7Z1C4aasVgDhnLx/9lU=", - "dev": true, - "requires": { - "pify": "^3.0.0", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "realpath-native": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.1.0.tgz", - "integrity": "sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA==", - "dev": true, - "requires": { - "util.promisify": "^1.0.0" - } - }, - "recast": { - "version": "0.11.23", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz", - "integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=", - "dev": true, - "requires": { - "ast-types": "0.9.6", - "esprima": "~3.1.0", - "private": "~0.1.5", - "source-map": "~0.5.0" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "redent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", - "dev": true, - "requires": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" - } - }, - "reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", - "dev": true - }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexp-to-ast": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.3.5.tgz", - "integrity": "sha512-1CJygtdvsfNFwiyjaMLBWtg2tfEqx/jSZ8S6TV+GlNL8kiH8rb4cm5Pb7A/C2BpyM/fA8ZJEudlCwi/jvAY+Ow==", - "dev": true - }, - "regexpu-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", - "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - } - }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "renderkid": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.2.tgz", - "integrity": "sha512-FsygIxevi1jSiPY9h7vZmBFUbAOcbYm9UwyiLNdVsLRs/5We9Ob5NMPbGYUTWiLq5L+ezlVdE0A8bbME5CWTpg==", - "dev": true, - "requires": { - "css-select": "^1.1.0", - "dom-converter": "~0.2", - "htmlparser2": "~3.3.0", - "strip-ansi": "^3.0.0", - "utila": "^0.4.0" - } - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - } - } - } - }, - "request-promise-core": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", - "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, - "request-promise-native": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", - "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", - "dev": true, - "requires": { - "request-promise-core": "1.1.2", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - } - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "resp-modifier": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/resp-modifier/-/resp-modifier-6.0.2.tgz", - "integrity": "sha1-sSTeXE+6/LpUH0j/pzlw9KpFa08=", - "dev": true, - "requires": { - "debug": "^2.2.0", - "minimatch": "^3.0.2" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "retry": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", - "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", - "dev": true - }, - "rgb-regex": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", - "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", - "dev": true - }, - "rgba-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz", - "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", - "dev": true - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rsvp": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.4.tgz", - "integrity": "sha512-6FomvYPfs+Jy9TfXmBpBuMWNH94SgCsZmJKcanySzgNNP6LjWxBvyLTa9KaMfDDM5oxRfrKDB0r/qeRsLwnBfA==", - "dev": true - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "requires": { - "is-promise": "^2.1.0" - } - }, - "run-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz", - "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==", - "dev": true - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } - }, - "rx": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", - "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" - }, - "rxjs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", - "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "sane": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", - "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", - "dev": true, - "requires": { - "@cnakazawa/watch": "^1.0.3", - "anymatch": "^2.0.0", - "capture-exit": "^2.0.0", - "exec-sh": "^0.3.2", - "execa": "^1.0.0", - "fb-watchman": "^2.0.0", - "micromatch": "^3.1.4", - "minimist": "^1.1.1", - "walker": "~1.0.5" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - } - } - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "scoped-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/scoped-regex/-/scoped-regex-1.0.0.tgz", - "integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=", - "dev": true - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selfsigned": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.4.tgz", - "integrity": "sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw==", - "dev": true, - "requires": { - "node-forge": "0.7.5" - } - }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true - }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true - }, - "semver-dsl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", - "integrity": "sha1-02eN5VVeimH2Ke7QJTZq5fJzQKA=", - "dev": true, - "requires": { - "semver": "^5.3.0" - } - }, - "semver-intersect": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.4.0.tgz", - "integrity": "sha512-d8fvGg5ycKAq0+I6nfWeCx6ffaWJCsBYU0H2Rq56+/zFePYfT8mXkB3tWBSjR5BerkHNZ5eTPIk1/LBYas35xQ==", - "dev": true, - "requires": { - "semver": "^5.0.0" - } - }, - "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - }, - "dependencies": { - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", - "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", - "dev": true - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - } - }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - }, - "server-destroy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", - "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shelljs": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", - "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "shellwords": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", - "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "simple-git": { - "version": "1.110.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-1.110.0.tgz", - "integrity": "sha512-UYY0rQkknk0P5eb+KW+03F4TevZ9ou0H+LoGaj7iiVgpnZH4wdj/HTViy/1tNNkmIPcmtxuBqXWiYt2YwlRKOQ==", - "dev": true, - "requires": { - "debug": "^4.0.1" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "simple-progress-webpack-plugin": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/simple-progress-webpack-plugin/-/simple-progress-webpack-plugin-1.1.2.tgz", - "integrity": "sha512-bNQfb3qSqbtsfxg6d0dGechUUJH2lZqKG5+bj2aoJmEA0rSzcm+2JVfC2YgkDABfuGItZ/O5ttt6BssWZW4SNg==", - "dev": true, - "requires": { - "chalk": "2.3.x", - "figures": "2.0.x", - "log-update": "2.3.x" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "dev": true, - "requires": { - "is-arrayish": "^0.3.1" - }, - "dependencies": { - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "dev": true - } - } - }, - "sisteransi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.0.tgz", - "integrity": "sha512-N+z4pHB4AmUv0SjveWRd6q1Nj5w62m5jodv+GD8lvmbY/83T/rpbJGZOnK5T149OldDj4Db07BSv9xY4K6NTPQ==", - "dev": true - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", - "dev": true - }, - "smart-buffer": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.2.tgz", - "integrity": "sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw==", - "dev": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "socket.io": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz", - "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", - "dev": true, - "requires": { - "debug": "~3.1.0", - "engine.io": "~3.2.0", - "has-binary2": "~1.0.2", - "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.1.1", - "socket.io-parser": "~3.2.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "engine.io-client": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", - "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~3.3.1", - "xmlhttprequest-ssl": "~1.5.4", - "yeast": "0.1.2" - } - }, - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - }, - "socket.io-client": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz", - "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", - "dev": true, - "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "engine.io-client": "~3.2.0", - "has-binary2": "~1.0.2", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "~3.2.0", - "to-array": "0.1.4" - } - }, - "socket.io-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", - "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "isarray": "2.0.1" - } - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } - } - } - }, - "socket.io-adapter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", - "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", - "dev": true - }, - "socket.io-client": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.2.0.tgz", - "integrity": "sha512-56ZrkTDbdTLmBIyfFYesgOxsjcLnwAKoN4CiPyTVkMQj3zTUh0QAx3GbvIvLpFEOvQWu92yyWICxB0u7wkVbYA==", - "dev": true, - "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "engine.io-client": "~3.3.1", - "has-binary2": "~1.0.2", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "~3.3.0", - "to-array": "0.1.4" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "socket.io-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz", - "integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "isarray": "2.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", - "dev": true, - "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" - } - }, - "sockjs-client": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.3.0.tgz", - "integrity": "sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg==", - "dev": true, - "requires": { - "debug": "^3.2.5", - "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "faye-websocket": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", - "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "socks": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.2.3.tgz", - "integrity": "sha512-+2r83WaRT3PXYoO/1z+RDEBE7Z2f9YcdQnJ0K/ncXXbV5gJ6wYfNAebYFYiiUjM6E4JyXnPY8cimwyvFYHVUUA==", - "dev": true, - "requires": { - "ip": "^1.1.5", - "smart-buffer": "4.0.2" - } - }, - "socks-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz", - "integrity": "sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==", - "dev": true, - "requires": { - "agent-base": "~4.2.0", - "socks": "~2.2.0" - } - }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", - "dev": true - }, - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", - "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "sourcemap-codec": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", - "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==", - "dev": true - }, - "spawn-sync": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz", - "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", - "dev": true, - "requires": { - "concat-stream": "^1.4.7", - "os-shim": "^0.1.2" - } - }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", - "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", - "dev": true - }, - "spdy": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.0.tgz", - "integrity": "sha512-ot0oEGT/PGUpzf/6uk4AWLqkq+irlqHXkrdbk51oWONh3bxQmBuljxPNl66zlRRcIJStWq0QkLUCPOPjgjvU0Q==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", - "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "readable-stream": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", - "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "stable": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", - "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", - "dev": true - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "dev": true - }, - "stack-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz", - "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==", - "dev": true - }, - "stackframe": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.0.4.tgz", - "integrity": "sha512-to7oADIniaYwS3MhtCa/sQhrxidCCQiF/qp4/m5iN3ipf0Y7Xlri0f6eG29r08aL7JYl8n32AF3Q5GYBZ7K8vw==", - "dev": true - }, - "staged-git-files": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/staged-git-files/-/staged-git-files-1.1.2.tgz", - "integrity": "sha512-0Eyrk6uXW6tg9PYkhi/V/J4zHp33aNyi2hOCmhFLqLTIhbgqWn5jlSzI+IU0VqrZq6+DbHcabQl/WP6P3BG0QA==", - "dev": true - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "statuses": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", - "dev": true - }, - "stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", - "dev": true - }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "stream-throttle": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/stream-throttle/-/stream-throttle-0.1.3.tgz", - "integrity": "sha1-rdV8jXzHOoFjDTHNVdOWHPr7qcM=", - "dev": true, - "requires": { - "commander": "^2.2.0", - "limiter": "^1.0.5" - } - }, - "streamfilter": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.7.tgz", - "integrity": "sha512-Gk6KZM+yNA1JpW0KzlZIhjo3EaBJDkYfXtYSbOwNIQ7Zd6006E6+sCFlW1NDvFG/vnXhKmw6TJJgiEQg/8lXfQ==", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, - "string-argv": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.0.2.tgz", - "integrity": "sha1-2sMECGkMIfPDYwo/86BYd73L1zY=", - "dev": true - }, - "string-length": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", - "integrity": "sha1-1A27aGo6zpYMHP/KVivyxF+DY+0=", - "dev": true, - "requires": { - "astral-regex": "^1.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "string-template": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", - "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "stringify-object": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", - "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", - "dev": true, - "requires": { - "get-own-enumerable-property-symbols": "^3.0.0", - "is-obj": "^1.0.1", - "is-regexp": "^1.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-bom-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", - "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", - "dev": true, - "requires": { - "first-chunk-stream": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - } - } - }, - "strip-comments": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/strip-comments/-/strip-comments-1.0.2.tgz", - "integrity": "sha512-kL97alc47hoyIQSV165tTt9rG5dn4w1dNnBhOQ3bOU1Nc1hel09jnXANaHJ7vzHLd4Ju8kseDGzlev96pghLFw==", - "dev": true, - "requires": { - "babel-extract-comments": "^1.0.0", - "babel-plugin-transform-object-rest-spread": "^6.26.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", - "dev": true - }, - "style-loader": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz", - "integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^1.0.0" - } - }, - "stylehacks": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", - "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "dev": true, - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "svgo": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.2.0.tgz", - "integrity": "sha512-xBfxJxfk4UeVN8asec9jNxHiv3UAMv/ujwBWGYvQhhMb2u3YTGKkiybPcLFDLq7GLLWE9wa73e0/m8L5nTzQbw==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "coa": "^2.0.2", - "css-select": "^2.0.0", - "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.28", - "css-url-regex": "^1.1.0", - "csso": "^3.5.1", - "js-yaml": "^3.12.0", - "mkdirp": "~0.5.1", - "object.values": "^1.1.0", - "sax": "~1.2.4", - "stable": "^0.1.8", - "unquote": "~1.1.1", - "util.promisify": "~1.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "css-select": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz", - "integrity": "sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^2.1.2", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "swagger-ui": { - "version": "2.2.10", - "resolved": "https://registry.npmjs.org/swagger-ui/-/swagger-ui-2.2.10.tgz", - "integrity": "sha1-sl56IWZOXZC/OR2zDbCN5B6FLXs=" - }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true - }, - "symbol-tree": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", - "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", - "dev": true - }, - "synchronous-promise": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/synchronous-promise/-/synchronous-promise-2.0.7.tgz", - "integrity": "sha512-16GbgwTmFMYFyQMLvtQjvNWh30dsFe1cAW5Fg1wm5+dg84L9Pe36mftsIRU95/W2YsISxsz/xq4VB23sqpgb/A==", - "dev": true - }, - "tabtab": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tabtab/-/tabtab-2.2.2.tgz", - "integrity": "sha1-egR/FDsBC0y9MfhX6ClhUSy/ThQ=", - "dev": true, - "requires": { - "debug": "^2.2.0", - "inquirer": "^1.0.2", - "lodash.difference": "^4.5.0", - "lodash.uniq": "^4.5.0", - "minimist": "^1.2.0", - "mkdirp": "^0.5.1", - "npmlog": "^2.0.3", - "object-assign": "^4.1.0" - }, - "dependencies": { - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true, - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "external-editor": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-1.1.1.tgz", - "integrity": "sha1-Etew24UPf/fnCBuvQAVwAGDEYAs=", - "dev": true, - "requires": { - "extend": "^3.0.0", - "spawn-sync": "^1.0.15", - "tmp": "^0.0.29" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "inquirer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-1.2.3.tgz", - "integrity": "sha1-TexvMvN+97sLLtPx0aXD9UUHSRg=", - "dev": true, - "requires": { - "ansi-escapes": "^1.1.0", - "chalk": "^1.0.0", - "cli-cursor": "^1.0.1", - "cli-width": "^2.0.0", - "external-editor": "^1.1.0", - "figures": "^1.3.5", - "lodash": "^4.3.0", - "mute-stream": "0.0.6", - "pinkie-promise": "^2.0.0", - "run-async": "^2.2.0", - "rx": "^4.1.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.0", - "through": "^2.3.6" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "mute-stream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.6.tgz", - "integrity": "sha1-SJYrGeFp/R38JAs/HnMXYnu8R9s=", - "dev": true - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "tmp": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", - "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.1" - } - } - } - }, - "tapable": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz", - "integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA==", - "dev": true - }, - "tar": { - "version": "4.4.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", - "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", - "dev": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "terser": { - "version": "3.16.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.16.1.tgz", - "integrity": "sha512-JDJjgleBROeek2iBcSNzOHLKsB/MdDf+E/BOAJ0Tk9r7p9/fVobfv7LMJ/g/k3v9SXdmjZnIlFd5nfn/Rt0Xow==", - "dev": true, - "requires": { - "commander": "~2.17.1", - "source-map": "~0.6.1", - "source-map-support": "~0.5.9" - }, - "dependencies": { - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "terser-webpack-plugin": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.2.tgz", - "integrity": "sha512-1DMkTk286BzmfylAvLXwpJrI7dWa5BnFmscV/2dCr8+c56egFcbaeFAl7+sujAjdmpLam21XRdhA4oifLyiWWg==", - "dev": true, - "requires": { - "cacache": "^11.0.2", - "find-cache-dir": "^2.0.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "terser": "^3.16.1", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "find-cache-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz", - "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "test-exclude": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.1.0.tgz", - "integrity": "sha512-gwf0S2fFsANC55fSeSqpb8BYk6w3FDvwZxfNjeF6FRgvFa43r+7wRiA/Q0IxoRU37wB/LE8IQ4221BsNucTaCA==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^1.0.1" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", - "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - } - } - } - }, - "text-hex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", - "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", - "dev": true - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "textextensions": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.4.0.tgz", - "integrity": "sha512-qftQXnX1DzpSV8EddtHIT0eDDEiBF8ywhFYR2lI9xrGtxqKN+CvLXhACeCIGbCpQfxxERbrkZEFb8cZcDKbVZA==", - "dev": true - }, - "tfunk": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/tfunk/-/tfunk-3.1.0.tgz", - "integrity": "sha1-OORBT8ZJd9h6/apy+sttKfgve1s=", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "object-path": "^0.9.0" - } - }, - "thread-loader": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thread-loader/-/thread-loader-2.1.2.tgz", - "integrity": "sha512-7xpuc9Ifg6WU+QYw/8uUqNdRwMD+N5gjwHKMqETrs96Qn+7BHwECpt2Brzr4HFlf4IAkZsayNhmGdbkBsTJ//w==", - "dev": true, - "requires": { - "loader-runner": "^2.3.1", - "loader-utils": "^1.1.0", - "neo-async": "^2.6.0" - } - }, - "throat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", - "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "thunky": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz", - "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==", - "dev": true - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true - }, - "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "timsort": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", - "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "tmpl": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", - "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", - "dev": true - }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", - "dev": true - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "to-string-loader": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/to-string-loader/-/to-string-loader-1.1.5.tgz", - "integrity": "sha1-e3qheJG3u0lHp6Eb+wO1/enG5pU=", - "dev": true, - "requires": { - "loader-utils": "^0.2.16" - }, - "dependencies": { - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - } - } - }, - "topo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/topo/-/topo-2.0.2.tgz", - "integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=", - "dev": true, - "requires": { - "hoek": "4.x.x" - } - }, - "toposort": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", - "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", - "dev": true - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "tree-kill": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.1.tgz", - "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", - "dev": true - }, - "trim-newlines": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", - "dev": true - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "triple-beam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", - "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", - "dev": true - }, - "ts-jest": { - "version": "23.1.4", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-23.1.4.tgz", - "integrity": "sha512-9rCSxbWfoZxxeXnSoEIzRNr9hDIQ8iEJAWmSRsWhDHDT8OeuGfURhJQUE8jtJlkyEygs6rngH8RYtHz9cfjmEA==", - "dev": true, - "requires": { - "closest-file-data": "^0.1.4", - "fs-extra": "6.0.1", - "json5": "^0.5.0", - "lodash": "^4.17.10" - }, - "dependencies": { - "fs-extra": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", - "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - } - } - }, - "ts-loader": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-5.3.3.tgz", - "integrity": "sha512-KwF1SplmOJepnoZ4eRIloH/zXL195F51skt7reEsS6jvDqzgc/YSbz9b8E07GxIUwLXdcD4ssrJu6v8CwaTafA==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "enhanced-resolve": "^4.0.0", - "loader-utils": "^1.0.2", - "micromatch": "^3.1.4", - "semver": "^5.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" - }, - "tslint": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.12.1.tgz", - "integrity": "sha512-sfodBHOucFg6egff8d1BvuofoOQ/nOeYNfbp7LDlKBcLNrL3lmS5zoiDGyOMdT7YsEXAwWpTdAHwOGOc8eRZAw==", - "dev": true, - "requires": { - "babel-code-frame": "^6.22.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.7.0", - "minimatch": "^3.0.4", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.27.2" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "tslint-config-prettier": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz", - "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==", - "dev": true - }, - "tslint-loader": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/tslint-loader/-/tslint-loader-3.6.0.tgz", - "integrity": "sha512-Me9Qf/87BOfCY8uJJw+J7VMF4U8WiMXKLhKKKugMydF0xMhMOt9wo2mjYTNhwbF9H7SHh8PAIwRG8roisTNekQ==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "mkdirp": "^0.5.1", - "object-assign": "^4.1.1", - "rimraf": "^2.4.4", - "semver": "^5.3.0" - } - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "typescript": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz", - "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==", - "dev": true - }, - "ua-parser-js": { - "version": "0.7.17", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz", - "integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g==", - "dev": true - }, - "uglify-js": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", - "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", - "dev": true, - "requires": { - "commander": "~2.17.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, - "uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", - "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unquote": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", - "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "untildify": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz", - "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==", - "dev": true - }, - "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", - "dev": true - }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-parse": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.4.tgz", - "integrity": "sha512-/92DTTorg4JjktLNLe6GPS2/RvAd/RGr6LuktmWSMLEOa6rjnlrFXNgSbSmkNvCoL2T028A0a1JaJLzRMlFoHg==", - "dev": true, - "requires": { - "querystringify": "^2.0.0", - "requires-port": "^1.0.0" - } - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } - }, - "url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", - "dev": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "v8-compile-cache": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz", - "integrity": "sha512-1wFuMUIM16MDJRCrpbpuEPTUGmM5QMUg0cr3KFwra2XgOgFcPGDQHDh3CszSCD2Zewc/dh/pamNEW8CbfDebUw==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "validate-npm-package-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", - "dev": true, - "requires": { - "builtins": "^1.0.3" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "vendors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz", - "integrity": "sha512-w/hry/368nO21AN9QljsaIhb9ZiZtZARoVH5f3CsFbawdLdayCgKRPup7CggujvySMxx0I91NOyxdVENohprLQ==", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - }, - "vinyl-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-2.0.0.tgz", - "integrity": "sha1-p+v1/779obfRjRQPyweyI++2dRo=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.3.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0", - "strip-bom-stream": "^2.0.0", - "vinyl": "^1.1.0" - }, - "dependencies": { - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - } - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "w3c-hr-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", - "integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=", - "dev": true, - "requires": { - "browser-process-hrtime": "^0.1.2" - } - }, - "walker": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", - "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", - "dev": true, - "requires": { - "makeerror": "1.0.x" - } - }, - "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", - "dev": true, - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true - }, - "webpack": { - "version": "4.29.3", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.3.tgz", - "integrity": "sha512-xPJvFeB+8tUflXFq+OgdpiSnsCD5EANyv56co5q8q8+YtEasn5Sj3kzY44mta+csCIEB0vneSxnuaHkOL2h94A==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-module-context": "1.7.11", - "@webassemblyjs/wasm-edit": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11", - "acorn": "^6.0.5", - "acorn-dynamic-import": "^4.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.0", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^1.0.0", - "tapable": "^1.1.0", - "terser-webpack-plugin": "^1.1.0", - "watchpack": "^1.5.0", - "webpack-sources": "^1.3.0" - }, - "dependencies": { - "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", - "dev": true - } - } - }, - "webpack-cli": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.2.3.tgz", - "integrity": "sha512-Ik3SjV6uJtWIAN5jp5ZuBMWEAaP5E4V78XJ2nI+paFPh8v4HPSwo/myN0r29Xc/6ZKnd2IdrAlpSgNOu2CDQ6Q==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "cross-spawn": "^6.0.5", - "enhanced-resolve": "^4.1.0", - "findup-sync": "^2.0.0", - "global-modules": "^1.0.0", - "import-local": "^2.0.0", - "interpret": "^1.1.0", - "loader-utils": "^1.1.0", - "supports-color": "^5.5.0", - "v8-compile-cache": "^2.0.2", - "yargs": "^12.0.4" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "camelcase": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.0.tgz", - "integrity": "sha512-Y05ICatFYPAfykDIB7VdwSJ0LUl1yq/BwO2OpyGGLjiRe1fgzTwVypPiWnzkGFOVFHXrCXUNBl86bpjBhZWSJg==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "webpack-dev-middleware": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz", - "integrity": "sha512-Q9Iyc0X9dP9bAsYskAVJ/hmIZZQwf/3Sy4xCAZgL5cUkjZmUZLt4l5HpbST/Pdgjn3u6pE7u5OdGd1apgzRujA==", - "dev": true, - "requires": { - "memory-fs": "~0.4.1", - "mime": "^2.3.1", - "range-parser": "^1.0.3", - "webpack-log": "^2.0.0" - }, - "dependencies": { - "mime": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", - "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==", - "dev": true - } - } - }, - "webpack-dev-server": { - "version": "3.1.14", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.14.tgz", - "integrity": "sha512-mGXDgz5SlTxcF3hUpfC8hrQ11yhAttuUQWf1Wmb+6zo3x6rb7b9mIfuQvAPLdfDRCGRGvakBWHdHOa0I9p/EVQ==", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.0.0", - "compression": "^1.5.2", - "connect-history-api-fallback": "^1.3.0", - "debug": "^3.1.0", - "del": "^3.0.0", - "express": "^4.16.2", - "html-entities": "^1.2.0", - "http-proxy-middleware": "~0.18.0", - "import-local": "^2.0.0", - "internal-ip": "^3.0.1", - "ip": "^1.1.5", - "killable": "^1.0.0", - "loglevel": "^1.4.1", - "opn": "^5.1.0", - "portfinder": "^1.0.9", - "schema-utils": "^1.0.0", - "selfsigned": "^1.9.1", - "semver": "^5.6.0", - "serve-index": "^1.7.2", - "sockjs": "0.3.19", - "sockjs-client": "1.3.0", - "spdy": "^4.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^5.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "3.4.0", - "webpack-log": "^2.0.0", - "yargs": "12.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", - "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", - "dev": true, - "requires": { - "xregexp": "4.0.0" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "opn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", - "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "yargs": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz", - "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^2.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^10.1.0" - } - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, - "webpack-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", - "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", - "dev": true, - "requires": { - "ansi-colors": "^3.0.0", - "uuid": "^3.3.2" - } - }, - "webpack-merge": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.1.tgz", - "integrity": "sha512-4p8WQyS98bUJcCvFMbdGZyZmsKuWjWVnVHnAS3FFg0HDaRVrPbkivx2RYCre8UiemD67RsiFFLfn4JhLAin8Vw==", - "dev": true, - "requires": { - "lodash": "^4.17.5" - } - }, - "webpack-notifier": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/webpack-notifier/-/webpack-notifier-1.7.0.tgz", - "integrity": "sha512-L3UKrl500xk0VDYKkwQxy5/BPhBWsZ2xHsAx2Qe3dVKYUEk9+y690RcNTMIUcVOK2fRgK7KK3PA4ccOq1h+fTg==", - "dev": true, - "requires": { - "node-notifier": "^5.1.2", - "object-assign": "^4.1.0", - "strip-ansi": "^3.0.1" - } - }, - "webpack-sources": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", - "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "webpack-visualizer-plugin": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/webpack-visualizer-plugin/-/webpack-visualizer-plugin-0.1.11.tgz", - "integrity": "sha1-uHcK2GtPZSYSxosbeCJT+vn4o04=", - "dev": true, - "requires": { - "d3": "^3.5.6", - "mkdirp": "^0.5.1", - "react": "^0.14.0", - "react-dom": "^0.14.0" - } - }, - "websocket-driver": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", - "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", - "dev": true, - "requires": { - "http-parser-js": ">=0.4.0", - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", - "dev": true - }, - "whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", - "dev": true, - "requires": { - "iconv-lite": "0.4.24" - } - }, - "whatwg-fetch": { - "version": "0.9.0", - "resolved": "http://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-0.9.0.tgz", - "integrity": "sha1-DjaExsuZlbQ+/J3wPkw2XZX9nMA=", - "dev": true - }, - "whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true - }, - "whatwg-url": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", - "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "win-release": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/win-release/-/win-release-1.1.1.tgz", - "integrity": "sha1-X6VeAr58qTTt/BJmVjLoSbcuUgk=", - "dev": true, - "requires": { - "semver": "^5.0.1" - } - }, - "window-size": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", - "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", - "dev": true - }, - "winston": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.2.1.tgz", - "integrity": "sha512-zU6vgnS9dAWCEKg/QYigd6cgMVVNwyTzKs81XZtTFuRwJOcDdBg7AU0mXVyNbs7O5RH2zdv+BdNZUlx7mXPuOw==", - "dev": true, - "requires": { - "async": "^2.6.1", - "diagnostics": "^1.1.1", - "is-stream": "^1.1.0", - "logform": "^2.1.1", - "one-time": "0.0.4", - "readable-stream": "^3.1.1", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.3.0" - }, - "dependencies": { - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, - "readable-stream": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", - "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "winston-transport": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.3.0.tgz", - "integrity": "sha512-B2wPuwUi3vhzn/51Uukcao4dIduEiPOcOt9HJ3QeaXgkJ5Z7UwpBzxS4ZGNHtrxrUvTwemsQiSys0ihOf8Mp1A==", - "dev": true, - "requires": { - "readable-stream": "^2.3.6", - "triple-beam": "^1.2.0" - } - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - }, - "workbox-background-sync": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-3.6.3.tgz", - "integrity": "sha512-ypLo0B6dces4gSpaslmDg5wuoUWrHHVJfFWwl1udvSylLdXvnrfhFfriCS42SNEe5lsZtcNZF27W/SMzBlva7Q==", - "dev": true, - "requires": { - "workbox-core": "^3.6.3" - } - }, - "workbox-broadcast-cache-update": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-broadcast-cache-update/-/workbox-broadcast-cache-update-3.6.3.tgz", - "integrity": "sha512-pJl4lbClQcvp0SyTiEw0zLSsVYE1RDlCPtpKnpMjxFtu8lCFTAEuVyzxp9w7GF4/b3P4h5nyQ+q7V9mIR7YzGg==", - "dev": true, - "requires": { - "workbox-core": "^3.6.3" - } - }, - "workbox-build": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-3.6.3.tgz", - "integrity": "sha512-w0clZ/pVjL8VXy6GfthefxpEXs0T8uiRuopZSFVQ8ovfbH6c6kUpEh6DcYwm/Y6dyWPiCucdyAZotgjz+nRz8g==", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "common-tags": "^1.4.0", - "fs-extra": "^4.0.2", - "glob": "^7.1.2", - "joi": "^11.1.1", - "lodash.template": "^4.4.0", - "pretty-bytes": "^4.0.2", - "stringify-object": "^3.2.2", - "strip-comments": "^1.0.2", - "workbox-background-sync": "^3.6.3", - "workbox-broadcast-cache-update": "^3.6.3", - "workbox-cache-expiration": "^3.6.3", - "workbox-cacheable-response": "^3.6.3", - "workbox-core": "^3.6.3", - "workbox-google-analytics": "^3.6.3", - "workbox-navigation-preload": "^3.6.3", - "workbox-precaching": "^3.6.3", - "workbox-range-requests": "^3.6.3", - "workbox-routing": "^3.6.3", - "workbox-strategies": "^3.6.3", - "workbox-streams": "^3.6.3", - "workbox-sw": "^3.6.3" - }, - "dependencies": { - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "pretty-bytes": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", - "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=", - "dev": true - } - } - }, - "workbox-cache-expiration": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-cache-expiration/-/workbox-cache-expiration-3.6.3.tgz", - "integrity": "sha512-+ECNph/6doYx89oopO/UolYdDmQtGUgo8KCgluwBF/RieyA1ZOFKfrSiNjztxOrGJoyBB7raTIOlEEwZ1LaHoA==", - "dev": true, - "requires": { - "workbox-core": "^3.6.3" - } - }, - "workbox-cacheable-response": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-3.6.3.tgz", - "integrity": "sha512-QpmbGA9SLcA7fklBLm06C4zFg577Dt8u3QgLM0eMnnbaVv3rhm4vbmDpBkyTqvgK/Ly8MBDQzlXDtUCswQwqqg==", - "dev": true, - "requires": { - "workbox-core": "^3.6.3" - } - }, - "workbox-core": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-3.6.3.tgz", - "integrity": "sha512-cx9cx0nscPkIWs8Pt98HGrS9/aORuUcSkWjG25GqNWdvD/pSe7/5Oh3BKs0fC+rUshCiyLbxW54q0hA+GqZeSQ==", - "dev": true - }, - "workbox-google-analytics": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-3.6.3.tgz", - "integrity": "sha512-RQBUo/6SXtIaQTRFj4RQZ9e1gAl7D8oS5S+Hi173Kk70/BgJjzPwXpC5A249Jv5YfkCOLMQCeF9A27BiD0b0ig==", - "dev": true, - "requires": { - "workbox-background-sync": "^3.6.3", - "workbox-core": "^3.6.3", - "workbox-routing": "^3.6.3", - "workbox-strategies": "^3.6.3" - } - }, - "workbox-navigation-preload": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-3.6.3.tgz", - "integrity": "sha512-dd26xTX16DUu0i+MhqZK/jQXgfIitu0yATM4jhRXEmpMqQ4MxEeNvl2CgjDMOHBnCVMax+CFZQWwxMx/X/PqCw==", - "dev": true, - "requires": { - "workbox-core": "^3.6.3" - } - }, - "workbox-precaching": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-3.6.3.tgz", - "integrity": "sha512-aBqT66BuMFviPTW6IpccZZHzpA8xzvZU2OM1AdhmSlYDXOJyb1+Z6blVD7z2Q8VNtV1UVwQIdImIX+hH3C3PIw==", - "dev": true, - "requires": { - "workbox-core": "^3.6.3" - } - }, - "workbox-range-requests": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-3.6.3.tgz", - "integrity": "sha512-R+yLWQy7D9aRF9yJ3QzwYnGFnGDhMUij4jVBUVtkl67oaVoP1ymZ81AfCmfZro2kpPRI+vmNMfxxW531cqdx8A==", - "dev": true, - "requires": { - "workbox-core": "^3.6.3" - } - }, - "workbox-routing": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-3.6.3.tgz", - "integrity": "sha512-bX20i95OKXXQovXhFOViOK63HYmXvsIwZXKWbSpVeKToxMrp0G/6LZXnhg82ijj/S5yhKNRf9LeGDzaqxzAwMQ==", - "dev": true, - "requires": { - "workbox-core": "^3.6.3" - } - }, - "workbox-strategies": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-3.6.3.tgz", - "integrity": "sha512-Pg5eulqeKet2y8j73Yw6xTgLdElktcWExGkzDVCGqfV9JCvnGuEpz5eVsCIK70+k4oJcBCin9qEg3g3CwEIH3g==", - "dev": true, - "requires": { - "workbox-core": "^3.6.3" - } - }, - "workbox-streams": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-3.6.3.tgz", - "integrity": "sha512-rqDuS4duj+3aZUYI1LsrD2t9hHOjwPqnUIfrXSOxSVjVn83W2MisDF2Bj+dFUZv4GalL9xqErcFW++9gH+Z27w==", - "dev": true, - "requires": { - "workbox-core": "^3.6.3" - } - }, - "workbox-sw": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-3.6.3.tgz", - "integrity": "sha512-IQOUi+RLhvYCiv80RP23KBW/NTtIvzvjex28B8NW1jOm+iV4VIu3VXKXTA6er5/wjjuhmtB28qEAUqADLAyOSg==", - "dev": true - }, - "workbox-webpack-plugin": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-3.6.3.tgz", - "integrity": "sha512-RwmKjc7HFHUFHoOlKoZUq9349u0QN3F8W5tZZU0vc1qsBZDINWXRiIBCAKvo/Njgay5sWz7z4I2adnyTo97qIQ==", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "json-stable-stringify": "^1.0.1", - "workbox-build": "^3.6.3" - } - }, - "worker-farm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", - "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write-file-atomic": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz", - "integrity": "sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "write-file-webpack-plugin": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/write-file-webpack-plugin/-/write-file-webpack-plugin-4.5.0.tgz", - "integrity": "sha512-k46VeERtaezbmjpDcMWATjKUWBrVe/ZEEm0cyvUm8FFP8A/r+dw5x3psRvkUOhqh9bqBLUlGYYbtr6luI+HeAg==", - "dev": true, - "requires": { - "chalk": "^2.4.0", - "debug": "^3.1.0", - "filesize": "^3.6.1", - "lodash": "^4.17.5", - "mkdirp": "^0.5.1", - "moment": "^2.22.1", - "write-file-atomic": "^2.3.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "ws": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.3.tgz", - "integrity": "sha512-tbSxiT+qJI223AP4iLfQbkbxkwdFcneYinM2+x46Gx2wgvbaOMO36czfdfVUBRTHvzAMRhDd98sA5d/BuWbQdg==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - }, - "xml": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", - "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=", - "dev": true - }, - "xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true - }, - "xmlhttprequest-ssl": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", - "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", - "dev": true - }, - "xregexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", - "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true - }, - "yargs": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-9.0.1.tgz", - "integrity": "sha1-UqzCP+7Kw0BCB47njAwAf1CF20w=", - "dev": true, - "requires": { - "camelcase": "^4.1.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "read-pkg-up": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^7.0.0" - }, - "dependencies": { - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - } - } - }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - }, - "yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", - "dev": true - }, - "yeoman-environment": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-2.3.0.tgz", - "integrity": "sha512-PHSAkVOqYdcR+C+Uht1SGC4eVD/9OhygYFkYaI66xF8vKIeS1RNYay+umj2ZrQeJ50tF5Q/RSO6qGDz9y3Ifug==", - "dev": true, - "requires": { - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^3.1.0", - "diff": "^3.3.1", - "escape-string-regexp": "^1.0.2", - "globby": "^8.0.1", - "grouped-queue": "^0.3.3", - "inquirer": "^5.2.0", - "is-scoped": "^1.0.0", - "lodash": "^4.17.10", - "log-symbols": "^2.1.0", - "mem-fs": "^1.1.0", - "strip-ansi": "^4.0.0", - "text-table": "^0.2.0", - "untildify": "^3.0.2" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - } - }, - "globby": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", - "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "inquirer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - } - } - }, - "yeoman-generator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-3.0.0.tgz", - "integrity": "sha512-aHsNXzkdgAoakZTZsDX7T56wYWYd1O5E/GBIFAVMJLH7TKRr+1MiEJszZQbbCSA+J+lpT743/8L88j35yNdTLQ==", - "dev": true, - "requires": { - "async": "^2.6.0", - "chalk": "^2.3.0", - "cli-table": "^0.3.1", - "cross-spawn": "^6.0.5", - "dargs": "^6.0.0", - "dateformat": "^3.0.3", - "debug": "^3.1.0", - "detect-conflict": "^1.0.0", - "error": "^7.0.2", - "find-up": "^3.0.0", - "github-username": "^4.0.0", - "istextorbinary": "^2.2.1", - "lodash": "^4.17.10", - "make-dir": "^1.1.0", - "mem-fs-editor": "^5.0.0", - "minimist": "^1.2.0", - "pretty-bytes": "^5.1.0", - "read-chunk": "^2.1.0", - "read-pkg-up": "^4.0.0", - "rimraf": "^2.6.2", - "run-async": "^2.0.0", - "shelljs": "^0.8.0", - "text-table": "^0.2.0", - "through2": "^2.0.0", - "yeoman-environment": "^2.0.5" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", - "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "yup": { - "version": "0.26.10", - "resolved": "https://registry.npmjs.org/yup/-/yup-0.26.10.tgz", - "integrity": "sha512-keuNEbNSnsOTOuGCt3UJW69jDE3O4P+UHAakO7vSeFMnjaitcmlbij/a3oNb9g1Y1KvSKH/7O1R2PQ4m4TRylw==", - "dev": true, - "requires": { - "@babel/runtime": "7.0.0", - "fn-name": "~2.0.1", - "lodash": "^4.17.10", - "property-expr": "^1.5.0", - "synchronous-promise": "^2.0.5", - "toposort": "^2.0.2" - }, - "dependencies": { - "toposort": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", - "integrity": "sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=", - "dev": true - } - } - }, - "zone.js": { - "version": "0.8.29", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.29.tgz", - "integrity": "sha512-mla2acNCMkWXBD+c+yeUrBUrzOxYMNFdQ6FGfigGGtEVBPJx07BQeJekjt9DmH1FtZek4E9rE1eRR9qQpxACOQ==" - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 63f594d6..00000000 --- a/package.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "name": "hsadmin-ng", - "version": "0.0.0", - "description": "Description for hsadminNg", - "private": true, - "license": "UNLICENSED", - "cacheDirectories": [ - "node_modules" - ], - "dependencies": { - "@angular/common": "7.2.4", - "@angular/compiler": "7.2.4", - "@angular/core": "7.2.4", - "@angular/forms": "7.2.4", - "@angular/platform-browser": "7.2.4", - "@angular/platform-browser-dynamic": "7.2.4", - "@angular/router": "7.2.4", - "@fortawesome/angular-fontawesome": "0.3.0", - "@fortawesome/fontawesome-svg-core": "1.2.14", - "@fortawesome/free-solid-svg-icons": "5.7.1", - "@ng-bootstrap/ng-bootstrap": "4.0.2", - "@ngx-translate/core": "11.0.1", - "@ngx-translate/http-loader": "4.0.0", - "bootstrap": "4.2.1", - "core-js": "2.6.4", - "moment": "2.24.0", - "ng-jhipster": "0.9.1", - "ngx-cookie": "2.0.1", - "ngx-infinite-scroll": "7.0.1", - "ngx-webstorage": "2.0.1", - "rxjs": "6.4.0", - "swagger-ui": "2.2.10", - "tslib": "1.9.3", - "zone.js": "0.8.29" - }, - "devDependencies": { - "@angular/cli": "7.3.1", - "@angular/compiler-cli": "7.2.4", - "@ngtools/webpack": "7.3.1", - "@types/jest": "24.0.0", - "@types/node": "10.12.24", - "angular-router-loader": "0.8.5", - "angular2-template-loader": "0.6.2", - "autoprefixer": "9.4.7", - "browser-sync": "2.26.3", - "browser-sync-webpack-plugin": "2.2.2", - "cache-loader": "2.0.1", - "codelyzer": "4.5.0", - "copy-webpack-plugin": "4.6.0", - "css-loader": "2.1.0", - "file-loader": "3.0.1", - "fork-ts-checker-webpack-plugin": "0.5.2", - "friendly-errors-webpack-plugin": "1.7.0", - "generator-jhipster": "5.8.2", - "html-loader": "0.5.5", - "html-webpack-plugin": "3.2.0", - "husky": "1.3.1", - "jest": "24.1.0", - "jest-junit": "6.2.1", - "jest-preset-angular": "6.0.2", - "jest-sonar-reporter": "2.0.0", - "lint-staged": "8.1.3", - "merge-jsons-webpack-plugin": "1.0.18", - "mini-css-extract-plugin": "0.5.0", - "moment-locales-webpack-plugin": "1.0.7", - "optimize-css-assets-webpack-plugin": "5.0.1", - "prettier": "1.16.4", - "reflect-metadata": "0.1.13", - "rimraf": "2.6.3", - "simple-progress-webpack-plugin": "1.1.2", - "style-loader": "0.23.1", - "terser-webpack-plugin": "1.2.2", - "thread-loader": "2.1.2", - "to-string-loader": "1.1.5", - "ts-loader": "5.3.3", - "tslint": "5.12.1", - "tslint-config-prettier": "1.18.0", - "tslint-loader": "3.6.0", - "typescript": "3.2.4", - "postcss-loader": "3.0.0", - "webpack": "4.29.3", - "webpack-cli": "3.2.3", - "webpack-dev-server": "3.1.14", - "webpack-merge": "4.2.1", - "webpack-notifier": "1.7.0", - "webpack-visualizer-plugin": "0.1.11", - "workbox-webpack-plugin": "3.6.3", - "write-file-webpack-plugin": "4.5.0" - }, - "engines": { - "node": ">=8.9.0" - }, - "lint-staged": { - "{,src/**/}*.{md,json,ts,css,scss}": [ - "prettier --write", - "git add" - ] - }, - "scripts": { - "prettier:format": "prettier --write \"{,src/**/}*.{md,json,ts,css,scss}\"", - "lint": "tslint --project tsconfig.json -e 'node_modules/**'", - "lint:fix": "npm run lint -- --fix", - "ngc": "ngc -p tsconfig-aot.json", - "cleanup": "rimraf build/{aot,www}", - "clean-www": "rimraf build//www/app/{src,build/}", - "start": "npm run webpack:dev", - "start-tls": "npm run webpack:dev -- --env.tls", - "serve": "npm run start", - "build": "npm run webpack:prod", - "test": "npm run lint && jest --coverage --logHeapUsage -w=2 --config src/test/javascript/jest.conf.js", - "test:watch": "npm run test -- --watch", - "webpack:dev": "npm run webpack-dev-server -- --config webpack/webpack.dev.js --inline --hot --port=9060 --watch-content-base --env.stats=minimal", - "webpack:dev-verbose": "npm run webpack-dev-server -- --config webpack/webpack.dev.js --inline --hot --port=9060 --watch-content-base --profile --progress --env.stats=normal", - "webpack:build:main": "npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal", - "webpack:build": "npm run cleanup && npm run webpack:build:main", - "webpack:prod:main": "npm run webpack -- --config webpack/webpack.prod.js --profile", - "webpack:prod": "npm run cleanup && npm run webpack:prod:main && npm run clean-www", - "webpack:test": "npm run test", - "webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js", - "webpack": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js" - }, - "jestSonar": { - "reportPath": "build/test-results/jest", - "reportFile": "TESTS-results-sonar.xml" - } -} diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index a26de7e9..00000000 --- a/postcss.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - plugins: [ - require('autoprefixer') - ] -} diff --git a/proxy.conf.json b/proxy.conf.json deleted file mode 100644 index 8b41fdf7..00000000 --- a/proxy.conf.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "*": { - "target": "http://localhost:8080", - "secure": false, - "loglevel": "debug" - } -} diff --git a/sql/28-hs-tests.sql b/sql/28-hs-tests.sql new file mode 100644 index 00000000..c7593ab3 --- /dev/null +++ b/sql/28-hs-tests.sql @@ -0,0 +1,134 @@ +ABORT; +SET SESSION SESSION AUTHORIZATION DEFAULT; + +-- there are some random ractors in test data generation, thus a range has to be accepted +CREATE OR REPLACE PROCEDURE expectBetween(actualCount integer, expectedFrom integer, expectedTo integer) + LANGUAGE plpgsql AS $$ +BEGIN + IF NOT actualCount BETWEEN expectedFrom AND expectedTo THEN + RAISE EXCEPTION 'count expected to be between % and %, but got %', expectedFrom, expectedTo, actualCount; +END IF; +END; $$; + +DO LANGUAGE plpgsql $$ +DECLARE + resultCount integer; +BEGIN + + -- hostmaster accessing a single customer + SET SESSION SESSION AUTHORIZATION restricted; + SET LOCAL hsadminng.currentUser = 'mike@hostsharing.net'; + SET LOCAL hsadminng.assumedRoles = ''; + -- SELECT * + SELECT count(*) INTO resultCount + from customer_rv c + where c.prefix='aab'; + call expectBetween(resultCount, 1, 1); + + -- hostmaster listing all customers + SET SESSION SESSION AUTHORIZATION restricted; + SET LOCAL hsadminng.currentUser = 'mike@hostsharing.net'; + SET LOCAL hsadminng.assumedRoles = ''; + -- SELECT * + SELECT count(*) INTO resultCount + FROM customer_rv; + call expectBetween(resultCount, 10, 20000); + + -- customer admin listing all their packages + SET SESSION SESSION AUTHORIZATION restricted; + SET LOCAL hsadminng.currentUser = 'admin@aae.example.com'; + SET LOCAL hsadminng.assumedRoles = ''; + -- SELECT * + SELECT count(*) INTO resultCount + FROM package_rv; + call expectBetween(resultCount, 2, 10); + + -- cutomer admin listing all their unix users + SET SESSION SESSION AUTHORIZATION restricted; + SET LOCAL hsadminng.currentUser = 'admin@aae.example.com'; + SET LOCAL hsadminng.assumedRoles = ''; + -- SELECT * + SELECT count(*) INTO resultCount + FROM unixuser_rv; + call expectBetween(resultCount, 20, 50); + + -- hostsharing admin assuming customer role and listing all accessible packages + SET SESSION SESSION AUTHORIZATION restricted; + SET LOCAL hsadminng.currentUser = 'mike@hostsharing.net'; + SET LOCAL hsadminng.assumedRoles = 'customer#aaa.admin;customer#aab.admin'; + -- SELECT * + SELECT count(*) INTO resultCount + FROM package_rv p; + call expectBetween(resultCount, 2, 10); + + -- hostsharing admin assuming two customer admin roles and listing all accessible unixusers + SET SESSION SESSION AUTHORIZATION restricted; + SET LOCAL hsadminng.currentUser = 'mike@hostsharing.net'; + SET LOCAL hsadminng.assumedRoles = 'customer#aab.admin;customer#aac.admin'; + -- SELECT c.prefix, c.reference, uu.* + SELECT count(*) INTO resultCount + FROM unixuser_rv uu + JOIN package_rv p ON p.uuid = uu.packageuuid + JOIN customer_rv c ON c.uuid = p.customeruuid; + call expectBetween(resultCount, 40, 60); + + -- hostsharing admin assuming two customer admin roles and listing all accessible domains + -- ABORT; START TRANSACTION; + SET SESSION SESSION AUTHORIZATION restricted; + SET LOCAL hsadminng.currentUser = 'mike@hostsharing.net'; + SET LOCAL hsadminng.assumedRoles = 'customer#aac.admin;customer#aad.admin'; + -- SELECT p.name, uu.name, dom.name + SELECT count(*) INTO resultCount + FROM domain_rv dom + JOIN unixuser_rv uu ON uu.uuid = dom.unixuseruuid + JOIN package_rv p ON p.uuid = uu.packageuuid + JOIN customer_rv c ON c.uuid = p.customeruuid; + call expectBetween(resultCount, 20, 40); + + -- hostsharing admin assuming two customer admin roles and listing all accessible email addresses + -- ABORT; START TRANSACTION; + SET SESSION SESSION AUTHORIZATION restricted; + SET LOCAL hsadminng.currentUser = 'mike@hostsharing.net'; + SET LOCAL hsadminng.assumedRoles = 'customer#aae.admin;customer#aaf.admin'; + -- SELECT c.prefix, p.name as "package", ema.localPart || '@' || dom.name as "email-address" + SELECT count(*) INTO resultCount + FROM emailaddress_rv ema + JOIN domain_rv dom ON dom.uuid = ema.domainuuid + JOIN unixuser_rv uu ON uu.uuid = dom.unixuseruuid + JOIN package_rv p ON p.uuid = uu.packageuuid + JOIN customer_rv c ON c.uuid = p.customeruuid; + call expectBetween(resultCount, 100, 300); + + -- ~170ms +END; $$; + +/* +=== with 7000 customers === + +1. 7105 vs 801 ms +2. 960 vs. 649 ms +3. 970 vs. 670 ms + +no count required factor table +1 7 000 7 000 1.000 customers +2 17 436 15 000 1.162 packages +3 174 360 150 000 1.162 unixuser +4 105 206 100 000 1.052 domain +5 526 030 500 000 1.052 emailaddress + +=== with 10000 customers (+43%) === + +1. 7491 vs. 1189 ms (-1%) +2. 1049 ms (+31%) +3. 1028 ms (+53%) +in average +9,33% + +no count required factor table +1 10 000 7 000 1.429 customers +2 24 904 15 000 1.660 packages +3 249 040 150 000 1.660 unixuser +4 149 946 100 000 1.499 domain +5 749 730 500 000 1.499 emailaddress + + + */ diff --git a/sql/examples.sql b/sql/examples.sql new file mode 100644 index 00000000..13219654 --- /dev/null +++ b/sql/examples.sql @@ -0,0 +1,53 @@ +-- ======================================================== +-- First Example Entity with History +-- -------------------------------------------------------- + +CREATE TABLE IF NOT EXISTS customer ( + "id" SERIAL PRIMARY KEY, + "reference" int not null unique, -- 10000-99999 + "prefix" character(3) unique + ); + +CALL create_historicization('customer'); + + +-- ======================================================== +-- Second Example Entity with History +-- -------------------------------------------------------- + +CREATE TABLE IF NOT EXISTS package_type ( + "id" serial PRIMARY KEY, + "name" character varying(8) + ); + +CALL create_historicization('package_type'); + +-- ======================================================== +-- Third Example Entity with History +-- -------------------------------------------------------- + +CREATE TABLE IF NOT EXISTS package ( + "id" serial PRIMARY KEY, + "name" character varying(5), + "customer_id" INTEGER REFERENCES customer(id) + ); + +CALL create_historicization('package'); + + +-- ======================================================== +-- query historical data +-- -------------------------------------------------------- + + +ABORT; +BEGIN TRANSACTION; +SET LOCAL hsadminng.currentUser TO 'mih42_customer_aaa'; +SET LOCAL hsadminng.currentTask TO 'adding customer_aaa'; +INSERT INTO package (customer_id, name) VALUES (10000, 'aaa00'); +COMMIT; +-- Usage: + +SET hsadminng.timestamp TO '2022-07-12 08:53:27.723315'; +SET hsadminng.timestamp TO '2022-07-12 11:38:27.723315'; +SELECT * FROM customer_hv p WHERE prefix = 'aaa'; diff --git a/sql/historization.sql b/sql/historization.sql new file mode 100644 index 00000000..3c038522 --- /dev/null +++ b/sql/historization.sql @@ -0,0 +1,166 @@ + +-- ======================================================== +-- Historization +-- -------------------------------------------------------- + +CREATE TABLE "tx_history" ( + "tx_id" BIGINT NOT NULL UNIQUE, + "tx_timestamp" TIMESTAMP NOT NULL, + "user" VARCHAR(64) NOT NULL, -- references postgres user + "task" VARCHAR NOT NULL +); + +CREATE TYPE "operation" AS ENUM ('INSERT', 'UPDATE', 'DELETE', 'TRUNCATE'); + +-- see https://www.postgresql.org/docs/current/plpgsql-trigger.html + +CREATE OR REPLACE FUNCTION historicize() + RETURNS trigger + LANGUAGE plpgsql STRICT AS $$ +DECLARE +currentUser VARCHAR(64); + currentTask varchar; + "row" RECORD; + "alive" BOOLEAN; + "sql" varchar; +BEGIN + -- determine user_id +BEGIN + currentUser := current_setting('hsadminng.currentUser'); +EXCEPTION WHEN OTHERS THEN + currentUser := NULL; +END; + IF (currentUser IS NULL OR currentUser = '') THEN + RAISE EXCEPTION 'hsadminng.currentUser must be defined, please use "SET LOCAL ...;"'; +END IF; + RAISE NOTICE 'currentUser: %', currentUser; + + -- determine task + currentTask = current_setting('hsadminng.currentTask'); + IF (currentTask IS NULL OR length(currentTask) < 12) THEN + RAISE EXCEPTION 'hsadminng.currentTask (%) must be defined and min 12 characters long, please use "SET LOCAL ...;"', currentTask; +END IF; + RAISE NOTICE 'currentTask: %', currentTask; + + IF (TG_OP = 'INSERT') OR (TG_OP = 'UPDATE') THEN + "row" := NEW; + "alive" := TRUE; +ELSE -- DELETE or TRUNCATE + "row" := OLD; + "alive" := FALSE; +END IF; + +sql := format('INSERT INTO tx_history VALUES (txid_current(), now(), %1L, %2L) ON CONFLICT DO NOTHING', currentUser, currentTask); + RAISE NOTICE 'sql: %', sql; +EXECUTE sql; +sql := format('INSERT INTO %3$I_versions VALUES (DEFAULT, txid_current(), %1$L, %2$L, $1.*)', TG_OP, alive, TG_TABLE_NAME); + RAISE NOTICE 'sql: %', sql; +EXECUTE sql USING "row"; + +RETURN "row"; +END; $$; + +CREATE OR REPLACE PROCEDURE create_historical_view(baseTable varchar) + LANGUAGE plpgsql AS $$ +DECLARE +createTriggerSQL varchar; + viewName varchar; + versionsTable varchar; + createViewSQL varchar; + baseCols varchar; +BEGIN + + viewName = quote_ident(format('%s_hv', baseTable)); + versionsTable = quote_ident(format('%s_versions', baseTable)); + baseCols = (SELECT string_agg(quote_ident(column_name), ', ') + FROM information_schema.columns + WHERE table_schema = 'public' AND table_name = baseTable); + + createViewSQL = format( + 'CREATE OR REPLACE VIEW %1$s AS' || + '(' || + ' SELECT %2$s' || + ' FROM %3$s' || + ' WHERE alive = TRUE' || + ' AND version_id IN' || + ' (' || + ' SELECT max(vt.version_id) AS history_id' || + ' FROM %3$s AS vt' || + ' JOIN tx_history as txh ON vt.tx_id = txh.tx_id' || + ' WHERE txh.tx_timestamp <= current_setting(''hsadminng.timestamp'')::timestamp' || + ' GROUP BY id' || + ' )' || + ')', + viewName, baseCols, versionsTable + ); + RAISE NOTICE 'sql: %', createViewSQL; +EXECUTE createViewSQL; + +createTriggerSQL = 'CREATE TRIGGER ' || baseTable || '_historicize' || + ' AFTER INSERT OR DELETE OR UPDATE ON ' || baseTable || + ' FOR EACH ROW EXECUTE PROCEDURE historicize()'; + RAISE NOTICE 'sql: %', createTriggerSQL; +EXECUTE createTriggerSQL; + +END; $$; + +CREATE OR REPLACE PROCEDURE create_historicization(baseTable varchar) + LANGUAGE plpgsql AS $$ +DECLARE +createHistTableSql varchar; + createTriggerSQL varchar; + viewName varchar; + versionsTable varchar; + createViewSQL varchar; + baseCols varchar; +BEGIN + + -- create the history table + createHistTableSql = '' || + 'CREATE TABLE ' || baseTable || '_versions (' || + ' version_id serial PRIMARY KEY,' || + ' tx_id bigint NOT NULL REFERENCES tx_history(tx_id),' || + ' trigger_op operation NOT NULL,' || + ' alive boolean not null,' || + + ' LIKE ' || baseTable || + ' EXCLUDING CONSTRAINTS' || + ' EXCLUDING STATISTICS' || + ')'; + RAISE NOTICE 'sql: %', createHistTableSql; + EXECUTE createHistTableSql; + + -- create the historical view + viewName = quote_ident(format('%s_hv', baseTable)); + versionsTable = quote_ident(format('%s_versions', baseTable)); + baseCols = (SELECT string_agg(quote_ident(column_name), ', ') + FROM information_schema.columns + WHERE table_schema = 'public' AND table_name = baseTable); + + createViewSQL = format( + 'CREATE OR REPLACE VIEW %1$s AS' || + '(' || + ' SELECT %2$s' || + ' FROM %3$s' || + ' WHERE alive = TRUE' || + ' AND version_id IN' || + ' (' || + ' SELECT max(vt.version_id) AS history_id' || + ' FROM %3$s AS vt' || + ' JOIN tx_history as txh ON vt.tx_id = txh.tx_id' || + ' WHERE txh.tx_timestamp <= current_setting(''hsadminng.timestamp'')::timestamp' || + ' GROUP BY id' || + ' )' || + ')', + viewName, baseCols, versionsTable + ); + RAISE NOTICE 'sql: %', createViewSQL; + EXECUTE createViewSQL; + + createTriggerSQL = 'CREATE TRIGGER ' || baseTable || '_historicize' || + ' AFTER INSERT OR DELETE OR UPDATE ON ' || baseTable || + ' FOR EACH ROW EXECUTE PROCEDURE historicize()'; + RAISE NOTICE 'sql: %', createTriggerSQL; + EXECUTE createTriggerSQL; + +END; $$; diff --git a/sql/history-demo.sql b/sql/history-demo.sql deleted file mode 100644 index df6493a7..00000000 --- a/sql/history-demo.sql +++ /dev/null @@ -1,105 +0,0 @@ --- --- Historization --- - -CREATE TABLE history ( - history_id serial PRIMARY KEY, - history_transaction bigint NOT NULL UNIQUE, - history_timestamp timestamp NOT NULL -); - -CREATE FUNCTION historicize() RETURNS trigger -AS $$ -BEGIN - IF (TG_OP = 'INSERT') OR (TG_OP = 'UPDATE') THEN - EXECUTE 'INSERT INTO history VALUES (DEFAULT, txid_current(), now()) ON CONFLICT DO NOTHING'; - EXECUTE format('INSERT INTO %I_history VALUES (DEFAULT, txid_current(), False, $1.*)', TG_TABLE_NAME) USING NEW; - RETURN NEW; - ELSE - EXECUTE 'INSERT INTO history VALUES (DEFAULT, txid_current(), now()) ON CONFLICT DO NOTHING'; - EXECUTE format('INSERT INTO %I_history VALUES (DEFAULT, txid_current(), True, $1.*)', TG_TABLE_NAME) USING OLD; - RETURN OLD; - END IF; -END; -$$ -LANGUAGE plpgsql; - --- --- Entity with History --- - -CREATE TABLE person ( - id serial PRIMARY KEY, - name character varying(50) NOT NULL UNIQUE, - email character varying(50) NOT NULL UNIQUE -); - -CREATE TABLE person_history ( - history_id serial PRIMARY KEY, - history_transaction bigint NOT NULL REFERENCES history(history_transaction), - history_tombstone boolean NOT NULL, - id integer NOT NULL, - name character varying(50) NOT NULL, - email character varying(50) NOT NULL -); - -CREATE TRIGGER person_historicize AFTER INSERT OR DELETE OR UPDATE ON person FOR EACH ROW EXECUTE PROCEDURE historicize(); - --- --- Sample data --- - -INSERT INTO person (name, email) VALUES ('michael', 'michael@hierweck.de'); -INSERT INTO person (name, email) VALUES ('annika', 'annika@hierweck.de'); - -UPDATE person SET email='mh@hierweck.de' WHERE name='michael'; -UPDATE person SET email='ah@hierweck.de' WHERE name='annika'; - -DELETE FROM person WHERE name='michael'; -DELETE FROM person WHERE name='annika'; - -INSERT INTO person (name, email) VALUES ('michael', 'michael@hierweck.de'); -INSERT INTO person (name, email) VALUES ('annika', 'annika@hierweck.de'); - -BEGIN; -INSERT INTO person (name, email) VALUES ('mx', 'mx@hierweck.de'); -INSERT INTO person (name, email) VALUES ('ax', 'ax@hierweck.de'); -UPDATE person SET email='mxx@hierweck.de' WHERE name='mx'; -UPDATE person SET email='axx@hierweck.de' WHERE name='ax'; -COMMIT; - --- --- Approach 1: Function --- --- --- Usage: --- --- SELECT * FROM person_history(12345, 'name'); --- - -CREATE OR REPLACE FUNCTION person_history(transaction bigint, VARIADIC groupby text[]) RETURNS TABLE ( - history_id integer, - history_transaction bigint, - history_tombstone boolean, - id integer, - name character varying(50), - email character varying(50) -) -AS $$ -BEGIN - RETURN QUERY EXECUTE format('SELECT * FROM person_history WHERE history_id IN (SELECT max(history_id) AS history_id FROM person_history WHERE history_transaction <= $1 GROUP BY %s)', array_to_string(groupby, ', ')) USING transaction; -END; -$$ -LANGUAGE plpgsql; - --- --- Approach 2: View --- --- Usage: --- --- SET history_transaction = 12345; --- SELECT * FROM person_history_view; --- - -CREATE VIEW person_history_view -AS (SELECT * FROM person_history WHERE history_id IN (SELECT max(history_id) AS history_id FROM person_history WHERE history_transaction <= current_setting('history.transaction')::bigint GROUP BY name)); diff --git a/sql/rbac-tests.sql b/sql/rbac-tests.sql new file mode 100644 index 00000000..4cf65b9f --- /dev/null +++ b/sql/rbac-tests.sql @@ -0,0 +1,50 @@ +-- ======================================================== +-- Some Tests +-- -------------------------------------------------------- + + +select isGranted(findRoleId('administrators'), findRoleId('package#aaa00.owner')); +select isGranted(findRoleId('package#aaa00.owner'), findRoleId('administrators')); +-- call grantRoleToRole(findRoleId('package#aaa00.owner'), findRoleId('administrators')); +-- call grantRoleToRole(findRoleId('administrators'), findRoleId('package#aaa00.owner')); + +select count(*) +FROM queryAllPermissionsOfSubjectIdForObjectUuids(findRbacUser('sven@hostsharing.net'), + ARRAY(select uuid from customer where reference < 1100000)); +select count(*) +FROM queryAllPermissionsOfSubjectId(findRbacUser('sven@hostsharing.net')); +select * +FROM queryAllPermissionsOfSubjectId(findRbacUser('alex@example.com')); +select * +FROM queryAllPermissionsOfSubjectId(findRbacUser('rosa@example.com')); + +select * +FROM queryAllRbacUsersWithPermissionsFor(findPermissionId('customer', + (SELECT uuid FROM RbacObject WHERE objectTable = 'customer' LIMIT 1), + 'add-package')); +select * +FROM queryAllRbacUsersWithPermissionsFor(findPermissionId('package', + (SELECT uuid FROM RbacObject WHERE objectTable = 'package' LIMIT 1), + 'delete')); + +DO LANGUAGE plpgsql +$$ + DECLARE + userId uuid; + result bool; + BEGIN + userId = findRbacUser('mike@hostsharing.net'); + result = (SELECT * FROM isPermissionGrantedToSubject(findPermissionId('package', 94928, 'add-package'), userId)); + IF (result) THEN + RAISE EXCEPTION 'expected permission NOT to be granted, but it is'; + end if; + + result = (SELECT * FROM isPermissionGrantedToSubject(findPermissionId('package', 94928, 'view'), userId)); + IF (NOT result) THEN + RAISE EXCEPTION 'expected permission to be granted, but it is NOT'; + end if; + + RAISE LOG 'isPermissionGrantedToSubjectId test passed'; + END; +$$; + diff --git a/sql/rbac-view-option-experiments.sql b/sql/rbac-view-option-experiments.sql new file mode 100644 index 00000000..0324f47e --- /dev/null +++ b/sql/rbac-view-option-experiments.sql @@ -0,0 +1,89 @@ + +-- ======================================================== +-- Options for SELECT under RBAC rules +-- -------------------------------------------------------- + +-- access control via view policy and isPermissionGrantedToSubject - way too slow (33 s 617ms for 1 million rows) +SET SESSION AUTHORIZATION DEFAULT; +CREATE ROLE admin; +GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO admin; +CREATE ROLE restricted; +GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO restricted; + +SET SESSION AUTHORIZATION DEFAULT; +ALTER TABLE customer DISABLE ROW LEVEL SECURITY; +ALTER TABLE customer ENABLE ROW LEVEL SECURITY; +ALTER TABLE customer FORCE ROW LEVEL SECURITY; +DROP POLICY IF EXISTS customer_policy ON customer; +CREATE POLICY customer_policy ON customer + FOR SELECT + TO restricted + USING ( + -- id=1000 + isPermissionGrantedToSubject(findPermissionId('customer', id, 'view'), currentUserId()) + ); + +SET SESSION AUTHORIZATION restricted; +SET hsadminng.currentUser TO 'alex@example.com'; +SELECT * from customer; + +-- access control via view-rule and isPermissionGrantedToSubject - way too slow (35 s 580 ms for 1 million rows) +SET SESSION SESSION AUTHORIZATION DEFAULT; +DROP VIEW cust_view; +CREATE VIEW cust_view AS +SELECT * FROM customer; +CREATE OR REPLACE RULE "_RETURN" AS + ON SELECT TO cust_view + DO INSTEAD + SELECT * FROM customer WHERE isPermissionGrantedToSubject(findPermissionId('customer', id, 'view'), currentUserId()); +SELECT * from cust_view LIMIT 10; + +select queryAllPermissionsOfSubjectId(findRbacUser('mike@hostsharing.net')); + +-- access control via view-rule with join to recursive permissions - really fast (38ms for 1 million rows) +SET SESSION SESSION AUTHORIZATION DEFAULT; +ALTER TABLE customer ENABLE ROW LEVEL SECURITY; +DROP VIEW IF EXISTS cust_view; +CREATE OR REPLACE VIEW cust_view AS +SELECT * +FROM customer; +CREATE OR REPLACE RULE "_RETURN" AS + ON SELECT TO cust_view + DO INSTEAD + SELECT c.uuid, c.reference, c.prefix FROM customer AS c + JOIN queryAllPermissionsOfSubjectId(currentUserId()) AS p + ON p.objectTable='customer' AND p.objectUuid=c.uuid AND p.op in ('*', 'view'); +GRANT ALL PRIVILEGES ON cust_view TO restricted; + +SET SESSION SESSION AUTHORIZATION restricted; +SET hsadminng.currentUser TO 'alex@example.com'; +SELECT * from cust_view; + + +-- access control via view with join to recursive permissions - really fast (38ms for 1 million rows) +SET SESSION SESSION AUTHORIZATION DEFAULT; +ALTER TABLE customer ENABLE ROW LEVEL SECURITY; +DROP VIEW IF EXISTS cust_view; +CREATE OR REPLACE VIEW cust_view AS + SELECT c.uuid, c.reference, c.prefix + FROM customer AS c + JOIN queryAllPermissionsOfSubjectId(currentUserId()) AS p + ON p.objectUuid=c.uuid AND p.op in ('*', 'view'); +GRANT ALL PRIVILEGES ON cust_view TO restricted; + +SET SESSION SESSION AUTHORIZATION restricted; +-- SET hsadminng.currentUser TO 'alex@example.com'; +SET hsadminng.currentUser TO 'mike@hostsharing.net'; +-- SET hsadminng.currentUser TO 'aaaaouq@example.com'; +SELECT * from cust_view where reference=1144150; + +select rr.uuid, rr.type from RbacGrants g + join RbacReference RR on g.ascendantUuid = RR.uuid + where g.descendantUuid in ( + select uuid from queryAllPermissionsOfSubjectId(findRbacUser('alex@example.com')) + where objectTable='customer' and op in ('*', 'view')); + +call grantRoleToUser(findRoleId('customer#aaa.admin'), findRbacUser('aaaaouq@example.com')); + +select queryAllPermissionsOfSubjectId(findRbacUser('aaaaouq@example.com')); + diff --git a/sql/rbac.sql b/sql/rbac.sql new file mode 100644 index 00000000..139597f9 --- /dev/null +++ b/sql/rbac.sql @@ -0,0 +1,2 @@ + + diff --git a/src/main/docker/.dockerignore b/src/main/docker/.dockerignore deleted file mode 100644 index b03bdc71..00000000 --- a/src/main/docker/.dockerignore +++ /dev/null @@ -1,14 +0,0 @@ -# https://docs.docker.com/engine/reference/builder/#dockerignore-file -classes/ -generated-sources/ -generated-test-sources/ -h2db/ -maven-archiver/ -maven-status/ -reports/ -surefire-reports/ -test-classes/ -test-results/ -www/ -!*.jar -!*.war diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile deleted file mode 100644 index 43fadcb6..00000000 --- a/src/main/docker/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM openjdk:8-jre-alpine - -ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \ - JHIPSTER_SLEEP=0 \ - JAVA_OPTS="" - -# Add a jhipster user to run our application so that it doesn't need to run as root -RUN adduser -D -s /bin/sh jhipster -WORKDIR /home/jhipster - -ADD entrypoint.sh entrypoint.sh -RUN chmod 755 entrypoint.sh && chown jhipster:jhipster entrypoint.sh -USER jhipster - -ENTRYPOINT ["./entrypoint.sh"] - -EXPOSE 8080 - -ADD *.war app.war - diff --git a/src/main/docker/app.yml b/src/main/docker/app.yml deleted file mode 100644 index 09f053d1..00000000 --- a/src/main/docker/app.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: '2' -services: - hsadminng-app: - image: hsadminng - environment: - - _JAVA_OPTIONS=-Xmx512m -Xms256m - - SPRING_PROFILES_ACTIVE=prod,swagger - - SPRING_DATASOURCE_URL=jdbc:postgresql://hsadminng-postgresql:5432/hsadminNg - - JHIPSTER_SLEEP=10 # gives time for the database to boot before the application - ports: - - 8080:8080 - hsadminng-postgresql: - extends: - file: postgresql.yml - service: hsadminng-postgresql diff --git a/src/main/docker/entrypoint.sh b/src/main/docker/entrypoint.sh deleted file mode 100644 index ccffafb5..00000000 --- a/src/main/docker/entrypoint.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo "The application will start in ${JHIPSTER_SLEEP}s..." && sleep ${JHIPSTER_SLEEP} -exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar "${HOME}/app.war" "$@" diff --git a/src/main/docker/jenkins.yml b/src/main/docker/jenkins.yml deleted file mode 100644 index f0670603..00000000 --- a/src/main/docker/jenkins.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: '2' -services: - jenkins: - image: jenkins:latest - ports: - - 49001:8080 - - 50000:50000 - # uncomment for docker in docker - #privileged: true - #volumes: - # enable persistent volume (warning: make sure that the local jenkins_home folder is created) - #- ~/volumes/jenkins_home:/var/jenkins_home - # mount docker sock and binary for docker in docker (only works on linux) - #- /var/run/docker.sock:/var/run/docker.sock - #- /usr/bin/docker:/usr/bin/docker diff --git a/src/main/docker/postgresql.yml b/src/main/docker/postgresql.yml deleted file mode 100644 index 3a872cee..00000000 --- a/src/main/docker/postgresql.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: '2' -services: - hsadminng-postgresql: - image: postgres:10.4 - # volumes: - # - ~/volumes/jhipster/hsadminNg/postgresql/:/var/lib/postgresql/data/ - environment: - - POSTGRES_USER=hsadminNg - - POSTGRES_PASSWORD= - ports: - - 5432:5432 diff --git a/src/main/docker/sonar.yml b/src/main/docker/sonar.yml deleted file mode 100644 index 678facb0..00000000 --- a/src/main/docker/sonar.yml +++ /dev/null @@ -1,7 +0,0 @@ -version: '2' -services: - hsadminng-sonar: - image: sonarqube:7.1 - ports: - - 9001:9000 - - 9092:9092 diff --git a/src/main/docker/swagger-editor.yml b/src/main/docker/swagger-editor.yml deleted file mode 100644 index d2b27f6b..00000000 --- a/src/main/docker/swagger-editor.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: '2' -services: - swagger-editor: - image: swaggerapi/swagger-editor:latest - ports: - - 7742:8080 diff --git a/src/main/java/net/hostsharing/hsadminng/HsadminNgApplication.java b/src/main/java/net/hostsharing/hsadminng/HsadminNgApplication.java new file mode 100644 index 00000000..20764d4e --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/HsadminNgApplication.java @@ -0,0 +1,13 @@ +package net.hostsharing.hsadminng; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class HsadminNgApplication { + + public static void main(String[] args) { + SpringApplication.run(HsadminNgApplication.class, args); + } + +} diff --git a/src/main/java/net/hostsharing/hsadminng/TestController.java b/src/main/java/net/hostsharing/hsadminng/TestController.java new file mode 100644 index 00000000..c90dee65 --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/TestController.java @@ -0,0 +1,16 @@ +package net.hostsharing.hsadminng; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +@Controller +public class TestController { + + @ResponseBody + @RequestMapping(value = "/api/ping", method = RequestMethod.GET) + public String ping() { + return "pong\n"; + } +} diff --git a/src/main/java/net/hostsharing/hsadminng/config/PostgreSQL95CustomDialect.java b/src/main/java/net/hostsharing/hsadminng/config/PostgreSQL95CustomDialect.java new file mode 100644 index 00000000..5b86aba9 --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/config/PostgreSQL95CustomDialect.java @@ -0,0 +1,14 @@ +package net.hostsharing.hsadminng.config; + +import com.vladmihalcea.hibernate.type.array.StringArrayType; +import org.hibernate.dialect.PostgreSQL95Dialect; + +@SuppressWarnings("unused") // configured in application.yml +public class PostgreSQL95CustomDialect extends PostgreSQL95Dialect { + + public PostgreSQL95CustomDialect() { + this.registerHibernateType(2003, StringArrayType.class.getName()); + this.registerHibernateType(1111, "pg-uuid"); + } + +} diff --git a/src/main/java/net/hostsharing/hsadminng/context/Context.java b/src/main/java/net/hostsharing/hsadminng/context/Context.java new file mode 100644 index 00000000..82693667 --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/context/Context.java @@ -0,0 +1,51 @@ +package net.hostsharing.hsadminng.context; + +import org.springframework.stereotype.Service; + +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; +import javax.transaction.Transactional; + +@Service +public class Context { + + @PersistenceContext + private EntityManager em; + + @Transactional(Transactional.TxType.MANDATORY) + public void setCurrentUser(final String userName) { + em.createNativeQuery( + String.format( + "set local hsadminng.currentUser = '%s';", + userName + ) + ).executeUpdate(); + assumeNoSpecialRole(); + } + + public String getCurrentUser() { + return String.valueOf(em.createNativeQuery("select currentUser()").getSingleResult()); + } + + @Transactional(Transactional.TxType.MANDATORY) + public void assumeRoles(final String roles) { + em.createNativeQuery( + String.format( + "set local hsadminng.assumedRoles = '%s';", + roles + ) + ).executeUpdate(); + } + + @Transactional(Transactional.TxType.MANDATORY) + public void assumeNoSpecialRole() { + em.createNativeQuery( + "set local hsadminng.assumedRoles = '';" + ).executeUpdate(); + } + + public String[] getAssumedRoles() { + return (String[]) em.createNativeQuery("select assumedRoles()").getSingleResult(); + } + +} diff --git a/src/main/java/net/hostsharing/hsadminng/errors/RestResponseEntityExceptionHandler.java b/src/main/java/net/hostsharing/hsadminng/errors/RestResponseEntityExceptionHandler.java new file mode 100644 index 00000000..f5e38ba7 --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/errors/RestResponseEntityExceptionHandler.java @@ -0,0 +1,63 @@ +package net.hostsharing.hsadminng.errors; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Getter; +import org.springframework.core.NestedExceptionUtils; +import org.springframework.dao.DataIntegrityViolationException; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.orm.jpa.JpaSystemException; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.context.request.WebRequest; +import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; + +import java.time.LocalDateTime; + +@ControllerAdvice +public class RestResponseEntityExceptionHandler + extends ResponseEntityExceptionHandler { + + @ExceptionHandler(DataIntegrityViolationException.class) + protected ResponseEntity handleConflict( + final RuntimeException exc, final WebRequest request) { + + return new ResponseEntity<>( + new CustomErrorResponse(request.getContextPath(), exc, HttpStatus.CONFLICT), HttpStatus.CONFLICT); + } + + @ExceptionHandler(JpaSystemException.class) + protected ResponseEntity handleJpaExceptions( + final RuntimeException exc, final WebRequest request) { + + return new ResponseEntity<>( + new CustomErrorResponse(request.getContextPath(), exc, HttpStatus.FORBIDDEN), HttpStatus.FORBIDDEN); + } +} + +@Getter +class CustomErrorResponse { + + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd hh:mm:ss") + private final LocalDateTime timestamp; + + private final String path; + + private final int status; + + private final String error; + + private final String message; + + public CustomErrorResponse(final String path, final RuntimeException exc, final HttpStatus status) { + this.timestamp = LocalDateTime.now(); + this.path = path; + this.status = status.value(); + this.error = status.getReasonPhrase(); + this.message = firstLine(NestedExceptionUtils.getMostSpecificCause(exc).getMessage()); + } + + private String firstLine(final String message) { + return message.split("\\r|\\n|\\r\\n", 0)[0]; + } +} diff --git a/src/main/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerController.java b/src/main/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerController.java new file mode 100644 index 00000000..6088f82d --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerController.java @@ -0,0 +1,51 @@ +package net.hostsharing.hsadminng.hs.hscustomer; + +import net.hostsharing.hsadminng.context.Context; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.transaction.Transactional; +import java.util.List; +import java.util.UUID; + +@RestController + +public class CustomerController { + + @Autowired + private Context context; + + @Autowired + private CustomerRepository customerRepository; + + @GetMapping(value = "/api/customers") + @Transactional + public List listCustomers( + @RequestHeader(value = "current-user") String userName, + @RequestHeader(value = "assumed-roles", required = false) String assumedRoles, + @RequestParam(required = false) String prefix + ) { + context.setCurrentUser(userName); + if (assumedRoles != null && !assumedRoles.isBlank()) { + context.assumeRoles(assumedRoles); + } + return customerRepository.findCustomerByOptionalPrefixLike(prefix); + } + + @PostMapping(value = "/api/customers") + @Transactional + public CustomerEntity addCustomer( + @RequestHeader(value = "current-user") String userName, + @RequestHeader(value = "assumed-roles", required = false) String assumedRoles, + @RequestBody CustomerEntity customer + ) { + context.setCurrentUser(userName); + if (assumedRoles != null && !assumedRoles.isBlank()) { + context.assumeRoles(assumedRoles); + } + if (customer.getUuid() == null) { + customer.setUuid(UUID.randomUUID()); + } + return customerRepository.save(customer); + } +} diff --git a/src/main/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerEntity.java b/src/main/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerEntity.java new file mode 100644 index 00000000..174d2d83 --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerEntity.java @@ -0,0 +1,22 @@ +package net.hostsharing.hsadminng.hs.hscustomer; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import javax.persistence.*; +import java.util.UUID; + +@Entity +@Table(name = "customer_rv") +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +public class CustomerEntity { + private @Id UUID uuid; + private String prefix; + private int reference; + private @Column(name="adminusername")String adminUserName; +} diff --git a/src/main/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerRepository.java b/src/main/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerRepository.java new file mode 100644 index 00000000..b28dc8cf --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerRepository.java @@ -0,0 +1,21 @@ +package net.hostsharing.hsadminng.hs.hscustomer; + +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.Repository; +import org.springframework.data.repository.query.Param; + +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +public interface CustomerRepository extends Repository { + + + Optional findByUuid(UUID id); + + @Query("SELECT c FROM CustomerEntity c WHERE :prefix is null or c.prefix like concat(:prefix, '%')") + List findCustomerByOptionalPrefixLike(@Param("prefix") String prefix); + + CustomerEntity save(final CustomerEntity entity); + +} diff --git a/src/main/java/net/hostsharing/hsadminng/hs/hspackage/PackageController.java b/src/main/java/net/hostsharing/hsadminng/hs/hspackage/PackageController.java new file mode 100644 index 00000000..9d29f53c --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/hs/hspackage/PackageController.java @@ -0,0 +1,33 @@ +package net.hostsharing.hsadminng.hs.hspackage; + +import net.hostsharing.hsadminng.context.Context; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.transaction.Transactional; +import java.util.List; + +@RestController +public class PackageController { + + @Autowired + private Context context; + + @Autowired + private PackageRepository packageRepository; + + @RequestMapping(value = "/api/packages", method = RequestMethod.GET) + @Transactional + public List listPackages( + @RequestHeader(value = "current-user") String userName, + @RequestHeader(value = "assumed-roles", required = false) String assumedRoles, + @RequestParam(required = false) String name + ) { + context.setCurrentUser(userName); + if (assumedRoles != null && !assumedRoles.isBlank()) { + context.assumeRoles(assumedRoles); + } + return packageRepository.findAllByOptionalNameLike(name); + } + +} diff --git a/src/main/java/net/hostsharing/hsadminng/hs/hspackage/PackageEntity.java b/src/main/java/net/hostsharing/hsadminng/hs/hspackage/PackageEntity.java new file mode 100644 index 00000000..18117473 --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/hs/hspackage/PackageEntity.java @@ -0,0 +1,25 @@ +package net.hostsharing.hsadminng.hs.hspackage; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import net.hostsharing.hsadminng.hs.hscustomer.CustomerEntity; + +import javax.persistence.*; +import java.util.UUID; + +@Entity +@Table(name = "package_rv") +@Getter +@NoArgsConstructor +@AllArgsConstructor +public class PackageEntity { + + private @Id UUID uuid; + + private String name; + + @ManyToOne(optional = false) + @JoinColumn(name = "customeruuid") + private CustomerEntity customer; +} diff --git a/src/main/java/net/hostsharing/hsadminng/hs/hspackage/PackageRepository.java b/src/main/java/net/hostsharing/hsadminng/hs/hspackage/PackageRepository.java new file mode 100644 index 00000000..bafe0882 --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/hs/hspackage/PackageRepository.java @@ -0,0 +1,13 @@ +package net.hostsharing.hsadminng.hs.hspackage; + +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.Repository; + +import java.util.List; +import java.util.UUID; + +public interface PackageRepository extends Repository { + + @Query("SELECT p FROM PackageEntity p WHERE :name is null or p.name like concat(:name, '%')") + List findAllByOptionalNameLike(final String name); +} diff --git a/src/main/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleController.java b/src/main/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleController.java new file mode 100644 index 00000000..7a0c3864 --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleController.java @@ -0,0 +1,34 @@ +package net.hostsharing.hsadminng.rbac.rbacrole; + +import net.hostsharing.hsadminng.context.Context; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RestController; + +import javax.transaction.Transactional; + +@RestController + +public class RbacRoleController { + + @Autowired + private Context context; + + @Autowired + private RbacRoleRepository rbacRoleRepository; + + @GetMapping(value = "/api/rbacroles") + @Transactional + public Iterable listCustomers( + @RequestHeader(value = "current-user") String userName, + @RequestHeader(value = "assumed-roles", required = false) String assumedRoles + ) { + context.setCurrentUser(userName); + if (assumedRoles != null && !assumedRoles.isBlank()) { + context.assumeRoles(assumedRoles); + } + return rbacRoleRepository.findAll(); + } + +} diff --git a/src/main/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleEntity.java b/src/main/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleEntity.java new file mode 100644 index 00000000..d0dc4d93 --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleEntity.java @@ -0,0 +1,38 @@ +package net.hostsharing.hsadminng.rbac.rbacrole; + +import lombok.*; +import org.hibernate.annotations.Formula; +import org.springframework.data.annotation.Immutable; + +import javax.persistence.*; +import java.util.UUID; + +@Entity +@Table(name = "rbacrole_rv") +@Getter +@Setter +@ToString +@Immutable +@NoArgsConstructor +@AllArgsConstructor +public class RbacRoleEntity { + + @Id + private UUID uuid; + + @Column(name="objectuuid") + private UUID objectUuid; + + @Column(name="objecttable") + private String objectTable; + + @Column(name="objectidname") + private String objectIdName; + + @Column(name="roletype") + @Enumerated(EnumType.STRING) + private RbacRoleType roleType; + + @Formula("objectTable||'#'||objectIdName||'.'||roleType") + private String roleName; +} diff --git a/src/main/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleRepository.java b/src/main/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleRepository.java new file mode 100644 index 00000000..abe6738c --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleRepository.java @@ -0,0 +1,16 @@ +package net.hostsharing.hsadminng.rbac.rbacrole; + +import org.springframework.data.repository.Repository; + +import java.util.List; +import java.util.UUID; + +public interface RbacRoleRepository extends Repository { + + /** + * Returns all instances of the type. + * + * @return all entities + */ + List findAll(); +} diff --git a/src/main/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleType.java b/src/main/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleType.java new file mode 100644 index 00000000..51d58bc6 --- /dev/null +++ b/src/main/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleType.java @@ -0,0 +1,5 @@ +package net.hostsharing.hsadminng.rbac.rbacrole; + +public enum RbacRoleType { + owner, admin, tenant +} diff --git a/src/main/java/org/hostsharing/hsadminng/ApplicationWebXml.java b/src/main/java/org/hostsharing/hsadminng/ApplicationWebXml.java deleted file mode 100644 index d6b76fff..00000000 --- a/src/main/java/org/hostsharing/hsadminng/ApplicationWebXml.java +++ /dev/null @@ -1,23 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng; - -import org.hostsharing.hsadminng.config.DefaultProfileUtil; - -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; - -/** - * This is a helper Java class that provides an alternative to creating a web.xml. - * This will be invoked only when the application is deployed to a Servlet container like Tomcat, JBoss etc. - */ -public class ApplicationWebXml extends SpringBootServletInitializer { - - @Override - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - /** - * set a default to use when no profile is configured. - */ - DefaultProfileUtil.addDefaultProfile(application.application()); - return application.sources(HsadminNgApp.class); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/HsadminNgApp.java b/src/main/java/org/hostsharing/hsadminng/HsadminNgApp.java deleted file mode 100644 index fcb5e760..00000000 --- a/src/main/java/org/hostsharing/hsadminng/HsadminNgApp.java +++ /dev/null @@ -1,111 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng; - -import org.hostsharing.hsadminng.config.ApplicationProperties; -import org.hostsharing.hsadminng.config.DefaultProfileUtil; -import org.hostsharing.hsadminng.service.accessfilter.Role; - -import io.github.jhipster.config.JHipsterConstants; - -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.core.env.Environment; - -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.Arrays; -import java.util.Collection; - -import javax.annotation.PostConstruct; - -@SpringBootApplication -@EnableConfigurationProperties({ LiquibaseProperties.class, ApplicationProperties.class }) -public class HsadminNgApp { - - private static final Logger log = LoggerFactory.getLogger(HsadminNgApp.class); - - private final Environment env; - - public HsadminNgApp(Environment env) { - this.env = env; - - // TODO mhoennig rather use @PostConstruct or something more decentral - Role.init(); - } - - /** - * Initializes hsadminNg. - *

- * Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile - *

- * You can find more information on how profiles work with JHipster on - * https://www.jhipster.tech/profiles/. - */ - @PostConstruct - public void initApplication() { - - Collection activeProfiles = Arrays.asList(env.getActiveProfiles()); - if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) - && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { - log.error( - "You have misconfigured your application! It should not run " + - "with both the 'dev' and 'prod' profiles at the same time."); - } - if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) - && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)) { - log.error( - "You have misconfigured your application! It should not " + - "run with both the 'dev' and 'cloud' profiles at the same time."); - } - } - - /** - * Main method, used to run the application. - * - * @param args the command line arguments - */ - public static void main(String[] args) { - SpringApplication app = new SpringApplication(HsadminNgApp.class); - DefaultProfileUtil.addDefaultProfile(app); - Environment env = app.run(args).getEnvironment(); - logApplicationStartup(env); - } - - private static void logApplicationStartup(Environment env) { - String protocol = "http"; - if (env.getProperty("server.ssl.key-store") != null) { - protocol = "https"; - } - String serverPort = env.getProperty("server.port"); - String contextPath = env.getProperty("server.servlet.context-path"); - if (StringUtils.isBlank(contextPath)) { - contextPath = "/"; - } - String hostAddress = "localhost"; - try { - hostAddress = InetAddress.getLocalHost().getHostAddress(); - } catch (UnknownHostException e) { - log.warn("The host name could not be determined, using `localhost` as fallback"); - } - log.info( - "\n----------------------------------------------------------\n\t" + - "Application '{}' is running! Access URLs:\n\t" + - "Local: \t\t{}://localhost:{}{}\n\t" + - "External: \t{}://{}:{}{}\n\t" + - "Profile(s): \t{}\n----------------------------------------------------------", - env.getProperty("spring.application.name"), - protocol, - serverPort, - contextPath, - protocol, - hostAddress, - serverPort, - contextPath, - env.getActiveProfiles()); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/aop/logging/LoggingAspect.java b/src/main/java/org/hostsharing/hsadminng/aop/logging/LoggingAspect.java deleted file mode 100644 index f6574ef4..00000000 --- a/src/main/java/org/hostsharing/hsadminng/aop/logging/LoggingAspect.java +++ /dev/null @@ -1,116 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.aop.logging; - -import io.github.jhipster.config.JHipsterConstants; - -import org.aspectj.lang.JoinPoint; -import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.lang.annotation.AfterThrowing; -import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Pointcut; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.core.env.Environment; - -import java.util.Arrays; - -/** - * Aspect for logging execution of service and repository Spring components. - * - * By default, it only runs with the "dev" profile. - */ -@Aspect -public class LoggingAspect { - - private final Logger log = LoggerFactory.getLogger(this.getClass()); - - private final Environment env; - - public LoggingAspect(Environment env) { - this.env = env; - } - - /** - * Pointcut that matches all repositories, services and Web REST endpoints. - */ - @Pointcut("within(@org.springframework.stereotype.Repository *)" + - " || within(@org.springframework.stereotype.Service *)" + - " || within(@org.springframework.web.bind.annotation.RestController *)") - public void springBeanPointcut() { - // Method is empty as this is just a Pointcut, the implementations are in the advices. - } - - /** - * Pointcut that matches all Spring beans in the application's main packages. - */ - @Pointcut("within(org.hostsharing.hsadminng.repository..*)" + - " || within(org.hostsharing.hsadminng.service..*)" + - " || within(org.hostsharing.hsadminng.web.rest..*)") - public void applicationPackagePointcut() { - // Method is empty as this is just a Pointcut, the implementations are in the advices. - } - - /** - * Advice that logs methods throwing exceptions. - * - * @param joinPoint join point for advice - * @param e exception - */ - @AfterThrowing(pointcut = "applicationPackagePointcut() && springBeanPointcut()", throwing = "e") - public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { - if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { - log.error( - "Exception in {}.{}() with cause = \'{}\' and exception = \'{}\'", - joinPoint.getSignature().getDeclaringTypeName(), - joinPoint.getSignature().getName(), - e.getCause() != null ? e.getCause() : "NULL", - e.getMessage(), - e); - - } else { - log.error( - "Exception in {}.{}() with cause = {}", - joinPoint.getSignature().getDeclaringTypeName(), - joinPoint.getSignature().getName(), - e.getCause() != null ? e.getCause() : "NULL"); - } - } - - /** - * Advice that logs when a method is entered and exited. - * - * @param joinPoint join point for advice - * @return result - * @throws Throwable throws IllegalArgumentException - */ - @Around("applicationPackagePointcut() && springBeanPointcut()") - public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable { - if (log.isDebugEnabled()) { - log.debug( - "Enter: {}.{}() with argument[s] = {}", - joinPoint.getSignature().getDeclaringTypeName(), - joinPoint.getSignature().getName(), - Arrays.toString(joinPoint.getArgs())); - } - try { - Object result = joinPoint.proceed(); - if (log.isDebugEnabled()) { - log.debug( - "Exit: {}.{}() with result = {}", - joinPoint.getSignature().getDeclaringTypeName(), - joinPoint.getSignature().getName(), - result); - } - return result; - } catch (IllegalArgumentException e) { - log.error( - "Illegal argument: {} in {}.{}()", - Arrays.toString(joinPoint.getArgs()), - joinPoint.getSignature().getDeclaringTypeName(), - joinPoint.getSignature().getName()); - - throw e; - } - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/ApplicationProperties.java b/src/main/java/org/hostsharing/hsadminng/config/ApplicationProperties.java deleted file mode 100644 index 19bc4cdb..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/ApplicationProperties.java +++ /dev/null @@ -1,15 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * Properties specific to Hsadmin Ng. - *

- * Properties are configured in the application.yml file. - * See {@link io.github.jhipster.config.JHipsterProperties} for a good example. - */ -@ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) -public class ApplicationProperties { - -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/AsyncConfiguration.java b/src/main/java/org/hostsharing/hsadminng/config/AsyncConfiguration.java deleted file mode 100644 index c87c3b44..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/AsyncConfiguration.java +++ /dev/null @@ -1,60 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor; -import io.github.jhipster.config.JHipsterProperties; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; -import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.annotation.*; -import org.springframework.scheduling.annotation.SchedulingConfigurer; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; -import org.springframework.scheduling.config.ScheduledTaskRegistrar; - -import java.util.concurrent.Executor; -import java.util.concurrent.Executors; - -@Configuration -@EnableAsync -@EnableScheduling -public class AsyncConfiguration implements AsyncConfigurer, SchedulingConfigurer { - - private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class); - - private final JHipsterProperties jHipsterProperties; - - public AsyncConfiguration(JHipsterProperties jHipsterProperties) { - this.jHipsterProperties = jHipsterProperties; - } - - @Override - @Bean(name = "taskExecutor") - public Executor getAsyncExecutor() { - log.debug("Creating Async Task Executor"); - ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); - executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize()); - executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize()); - executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity()); - executor.setThreadNamePrefix("hsadmin-ng-Executor-"); - return new ExceptionHandlingAsyncTaskExecutor(executor); - } - - @Override - public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { - return new SimpleAsyncUncaughtExceptionHandler(); - } - - @Override - public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { - taskRegistrar.setScheduler(scheduledTaskExecutor()); - } - - @Bean - public Executor scheduledTaskExecutor() { - return Executors.newScheduledThreadPool(jHipsterProperties.getAsync().getCorePoolSize()); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/CacheConfiguration.java b/src/main/java/org/hostsharing/hsadminng/config/CacheConfiguration.java deleted file mode 100644 index 02c5479a..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/CacheConfiguration.java +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import io.github.jhipster.config.JHipsterProperties; - -import org.ehcache.config.builders.*; -import org.ehcache.jsr107.Eh107Configuration; -import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer; -import org.springframework.cache.annotation.EnableCaching; -import org.springframework.context.annotation.*; - -import java.time.Duration; - -@Configuration -@EnableCaching -public class CacheConfiguration { - - private final javax.cache.configuration.Configuration jcacheConfiguration; - - public CacheConfiguration(JHipsterProperties jHipsterProperties) { - JHipsterProperties.Cache.Ehcache ehcache = jHipsterProperties.getCache().getEhcache(); - - jcacheConfiguration = Eh107Configuration.fromEhcacheCacheConfiguration( - CacheConfigurationBuilder.newCacheConfigurationBuilder( - Object.class, - Object.class, - ResourcePoolsBuilder.heap(ehcache.getMaxEntries())) - .withExpiry( - ExpiryPolicyBuilder.timeToLiveExpiration(Duration.ofSeconds(ehcache.getTimeToLiveSeconds()))) - .build()); - } - - @Bean - public JCacheManagerCustomizer cacheManagerCustomizer() { - return cm -> { - cm.createCache(org.hostsharing.hsadminng.repository.UserRepository.USERS_BY_LOGIN_CACHE, jcacheConfiguration); - cm.createCache(org.hostsharing.hsadminng.repository.UserRepository.USERS_BY_EMAIL_CACHE, jcacheConfiguration); - // jhipster-needle-ehcache-add-entry - - cm.createCache( - org.hostsharing.hsadminng.repository.UserRoleAssignmentRepository.CURRENT_USER_ROLE_ASSIGNMENTS_CACHE, - jcacheConfiguration); - }; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/CloudDatabaseConfiguration.java b/src/main/java/org/hostsharing/hsadminng/config/CloudDatabaseConfiguration.java deleted file mode 100644 index f28cc4b4..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/CloudDatabaseConfiguration.java +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import io.github.jhipster.config.JHipsterConstants; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.cloud.config.java.AbstractCloudConfig; -import org.springframework.context.annotation.*; - -import javax.sql.DataSource; - -@Configuration -@Profile(JHipsterConstants.SPRING_PROFILE_CLOUD) -public class CloudDatabaseConfiguration extends AbstractCloudConfig { - - private final Logger log = LoggerFactory.getLogger(CloudDatabaseConfiguration.class); - - private static final String CLOUD_CONFIGURATION_HIKARI_PREFIX = "spring.datasource.hikari"; - - @Bean - @ConfigurationProperties(CLOUD_CONFIGURATION_HIKARI_PREFIX) - public DataSource dataSource() { - log.info("Configuring JDBC datasource from a cloud provider"); - return connectionFactory().dataSource(); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/Constants.java b/src/main/java/org/hostsharing/hsadminng/config/Constants.java deleted file mode 100644 index 82186df3..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/Constants.java +++ /dev/null @@ -1,18 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -/** - * Application constants. - */ -public final class Constants { - - // Regex for acceptable logins - public static final String LOGIN_REGEX = "^[_.@A-Za-z0-9-]*$"; - - public static final String SYSTEM_ACCOUNT = "system"; - public static final String ANONYMOUS_USER = "anonymoususer"; - public static final String DEFAULT_LANGUAGE = "de"; - - private Constants() { - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/DatabaseConfiguration.java b/src/main/java/org/hostsharing/hsadminng/config/DatabaseConfiguration.java deleted file mode 100644 index e9a2b893..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/DatabaseConfiguration.java +++ /dev/null @@ -1,60 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import io.github.jhipster.config.JHipsterConstants; -import io.github.jhipster.config.h2.H2ConfigurationHelper; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Profile; -import org.springframework.core.env.Environment; -import org.springframework.data.jpa.repository.config.EnableJpaAuditing; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -import java.sql.SQLException; - -@Configuration -@EnableJpaRepositories("org.hostsharing.hsadminng.repository") -@EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware") -@EnableTransactionManagement -public class DatabaseConfiguration { - - private final Logger log = LoggerFactory.getLogger(DatabaseConfiguration.class); - - private final Environment env; - - public DatabaseConfiguration(Environment env) { - this.env = env; - } - - /** - * Open the TCP port for the H2 database, so it is available remotely. - * - * @return the H2 database TCP server - * @throws SQLException if the server failed to start - */ - @Bean(initMethod = "start", destroyMethod = "stop") - @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) - public Object h2TCPServer() throws SQLException { - String port = getValidPortForH2(); - log.debug("H2 database is available on port {}", port); - return H2ConfigurationHelper.createServer(port); - } - - private String getValidPortForH2() { - int port = Integer.parseInt(env.getProperty("server.port")); - if (port < 10000) { - port = 10000 + port; - } else { - if (port < 63536) { - port = port + 2000; - } else { - port = port - 2000; - } - } - return String.valueOf(port); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/DateTimeFormatConfiguration.java b/src/main/java/org/hostsharing/hsadminng/config/DateTimeFormatConfiguration.java deleted file mode 100644 index fb50c23d..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/DateTimeFormatConfiguration.java +++ /dev/null @@ -1,21 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import org.springframework.context.annotation.Configuration; -import org.springframework.format.FormatterRegistry; -import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; - -/** - * Configure the converters to use the ISO format for dates by default. - */ -@Configuration -public class DateTimeFormatConfiguration implements WebMvcConfigurer { - - @Override - public void addFormatters(FormatterRegistry registry) { - DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); - registrar.setUseIsoFormat(true); - registrar.registerFormatters(registry); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/DefaultProfileUtil.java b/src/main/java/org/hostsharing/hsadminng/config/DefaultProfileUtil.java deleted file mode 100644 index 234b69cb..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/DefaultProfileUtil.java +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import io.github.jhipster.config.JHipsterConstants; - -import org.springframework.boot.SpringApplication; -import org.springframework.core.env.Environment; - -import java.util.*; - -/** - * Utility class to load a Spring profile to be used as default - * when there is no spring.profiles.active set in the environment or as command line argument. - * If the value is not available in application.yml then dev profile will be used as default. - */ -public final class DefaultProfileUtil { - - private static final String SPRING_PROFILE_DEFAULT = "spring.profiles.default"; - - private DefaultProfileUtil() { - } - - /** - * Set a default to use when no profile is configured. - * - * @param app the Spring application - */ - public static void addDefaultProfile(SpringApplication app) { - Map defProperties = new HashMap<>(); - /* - * The default profile to use when no other profiles are defined - * This cannot be set in the application.yml file. - * See https://github.com/spring-projects/spring-boot/issues/1219 - */ - defProperties.put(SPRING_PROFILE_DEFAULT, JHipsterConstants.SPRING_PROFILE_DEVELOPMENT); - app.setDefaultProperties(defProperties); - } - - /** - * Get the profiles that are applied else get default profiles. - * - * @param env spring environment - * @return profiles - */ - public static String[] getActiveProfiles(Environment env) { - String[] profiles = env.getActiveProfiles(); - if (profiles.length == 0) { - return env.getDefaultProfiles(); - } - return profiles; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/JacksonConfiguration.java b/src/main/java/org/hostsharing/hsadminng/config/JacksonConfiguration.java deleted file mode 100644 index 0105111b..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/JacksonConfiguration.java +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module; -import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import com.fasterxml.jackson.module.afterburner.AfterburnerModule; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.zalando.problem.ProblemModule; -import org.zalando.problem.violations.ConstraintViolationProblemModule; - -@Configuration -public class JacksonConfiguration { - - /** - * Support for Java date and time API. - * - * @return the corresponding Jackson module. - */ - @Bean - public JavaTimeModule javaTimeModule() { - return new JavaTimeModule(); - } - - @Bean - public Jdk8Module jdk8TimeModule() { - return new Jdk8Module(); - } - - /* - * Support for Hibernate types in Jackson. - */ - @Bean - public Hibernate5Module hibernate5Module() { - return new Hibernate5Module(); - } - - /* - * Jackson Afterburner module to speed up serialization/deserialization. - */ - @Bean - public AfterburnerModule afterburnerModule() { - return new AfterburnerModule(); - } - - /* - * Module for serialization/deserialization of RFC7807 Problem. - */ - @Bean - ProblemModule problemModule() { - return new ProblemModule(); - } - - /* - * Module for serialization/deserialization of ConstraintViolationProblem. - */ - @Bean - ConstraintViolationProblemModule constraintViolationProblemModule() { - return new ConstraintViolationProblemModule(); - } - -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/LiquibaseConfiguration.java b/src/main/java/org/hostsharing/hsadminng/config/LiquibaseConfiguration.java deleted file mode 100644 index 196d907e..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/LiquibaseConfiguration.java +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import io.github.jhipster.config.JHipsterConstants; -import io.github.jhipster.config.liquibase.AsyncSpringLiquibase; -import liquibase.integration.spring.SpringLiquibase; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.env.Environment; -import org.springframework.core.task.TaskExecutor; - -import javax.sql.DataSource; - -@Configuration -public class LiquibaseConfiguration { - - private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class); - - private final Environment env; - - public LiquibaseConfiguration(Environment env) { - this.env = env; - } - - @Bean - public SpringLiquibase liquibase( - @Qualifier("taskExecutor") TaskExecutor taskExecutor, - DataSource dataSource, - LiquibaseProperties liquibaseProperties) { - - // Use liquibase.integration.spring.SpringLiquibase if you don't want Liquibase to start asynchronously - SpringLiquibase liquibase = new AsyncSpringLiquibase(taskExecutor, env); - liquibase.setDataSource(dataSource); - liquibase.setChangeLog("classpath:config/liquibase/master.xml"); - liquibase.setContexts(liquibaseProperties.getContexts()); - liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); - liquibase.setDropFirst(liquibaseProperties.isDropFirst()); - liquibase.setChangeLogParameters(liquibaseProperties.getParameters()); - if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE)) { - liquibase.setShouldRun(false); - } else { - liquibase.setShouldRun(liquibaseProperties.isEnabled()); - log.debug("Configuring Liquibase"); - } - return liquibase; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/LocaleConfiguration.java b/src/main/java/org/hostsharing/hsadminng/config/LocaleConfiguration.java deleted file mode 100644 index 99386585..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/LocaleConfiguration.java +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import io.github.jhipster.config.locale.AngularCookieLocaleResolver; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.LocaleResolver; -import org.springframework.web.servlet.config.annotation.*; -import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; - -@Configuration -public class LocaleConfiguration implements WebMvcConfigurer { - - @Bean(name = "localeResolver") - public LocaleResolver localeResolver() { - AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver(); - cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY"); - return cookieLocaleResolver; - } - - @Override - public void addInterceptors(InterceptorRegistry registry) { - LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); - localeChangeInterceptor.setParamName("language"); - registry.addInterceptor(localeChangeInterceptor); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/LoggingAspectConfiguration.java b/src/main/java/org/hostsharing/hsadminng/config/LoggingAspectConfiguration.java deleted file mode 100644 index 149ea1fa..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/LoggingAspectConfiguration.java +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import org.hostsharing.hsadminng.aop.logging.LoggingAspect; - -import io.github.jhipster.config.JHipsterConstants; - -import org.springframework.context.annotation.*; -import org.springframework.core.env.Environment; - -@Configuration -@EnableAspectJAutoProxy -public class LoggingAspectConfiguration { - - @Bean - @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) - public LoggingAspect loggingAspect(Environment env) { - return new LoggingAspect(env); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/LoggingConfiguration.java b/src/main/java/org/hostsharing/hsadminng/config/LoggingConfiguration.java deleted file mode 100644 index 83ecbb1a..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/LoggingConfiguration.java +++ /dev/null @@ -1,160 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import ch.qos.logback.classic.AsyncAppender; -import ch.qos.logback.classic.Level; -import ch.qos.logback.classic.LoggerContext; -import ch.qos.logback.classic.boolex.OnMarkerEvaluator; -import ch.qos.logback.classic.spi.ILoggingEvent; -import ch.qos.logback.classic.spi.LoggerContextListener; -import ch.qos.logback.core.Appender; -import ch.qos.logback.core.filter.EvaluatorFilter; -import ch.qos.logback.core.spi.ContextAwareBase; -import ch.qos.logback.core.spi.FilterReply; -import io.github.jhipster.config.JHipsterProperties; -import net.logstash.logback.appender.LogstashTcpSocketAppender; -import net.logstash.logback.encoder.LogstashEncoder; -import net.logstash.logback.stacktrace.ShortenedThrowableConverter; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Configuration; - -import java.net.InetSocketAddress; -import java.util.Iterator; - -@Configuration -public class LoggingConfiguration { - - private static final String LOGSTASH_APPENDER_NAME = "LOGSTASH"; - - private static final String ASYNC_LOGSTASH_APPENDER_NAME = "ASYNC_LOGSTASH"; - - private final Logger log = LoggerFactory.getLogger(LoggingConfiguration.class); - - private LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); - - private final String appName; - - private final String serverPort; - - private final JHipsterProperties jHipsterProperties; - - public LoggingConfiguration( - @Value("${spring.application.name}") String appName, - @Value("${server.port}") String serverPort, - JHipsterProperties jHipsterProperties) { - this.appName = appName; - this.serverPort = serverPort; - this.jHipsterProperties = jHipsterProperties; - if (jHipsterProperties.getLogging().getLogstash().isEnabled()) { - addLogstashAppender(context); - addContextListener(context); - } - if (jHipsterProperties.getMetrics().getLogs().isEnabled()) { - setMetricsMarkerLogbackFilter(context); - } - } - - private void addContextListener(LoggerContext context) { - LogbackLoggerContextListener loggerContextListener = new LogbackLoggerContextListener(); - loggerContextListener.setContext(context); - context.addListener(loggerContextListener); - } - - private void addLogstashAppender(LoggerContext context) { - log.info("Initializing Logstash logging"); - - LogstashTcpSocketAppender logstashAppender = new LogstashTcpSocketAppender(); - logstashAppender.setName(LOGSTASH_APPENDER_NAME); - logstashAppender.setContext(context); - String customFields = "{\"app_name\":\"" + appName + "\",\"app_port\":\"" + serverPort + "\"}"; - - // More documentation is available at: https://github.com/logstash/logstash-logback-encoder - LogstashEncoder logstashEncoder = new LogstashEncoder(); - // Set the Logstash appender config from JHipster properties - logstashAppender.addDestinations( - new InetSocketAddress( - jHipsterProperties.getLogging().getLogstash().getHost(), - jHipsterProperties.getLogging().getLogstash().getPort())); - - ShortenedThrowableConverter throwableConverter = new ShortenedThrowableConverter(); - throwableConverter.setRootCauseFirst(true); - logstashEncoder.setThrowableConverter(throwableConverter); - logstashEncoder.setCustomFields(customFields); - - logstashAppender.setEncoder(logstashEncoder); - logstashAppender.start(); - - // Wrap the appender in an Async appender for performance - AsyncAppender asyncLogstashAppender = new AsyncAppender(); - asyncLogstashAppender.setContext(context); - asyncLogstashAppender.setName(ASYNC_LOGSTASH_APPENDER_NAME); - asyncLogstashAppender.setQueueSize(jHipsterProperties.getLogging().getLogstash().getQueueSize()); - asyncLogstashAppender.addAppender(logstashAppender); - asyncLogstashAppender.start(); - - context.getLogger("ROOT").addAppender(asyncLogstashAppender); - } - - // Configure a log filter to remove "metrics" logs from all appenders except the "LOGSTASH" appender - private void setMetricsMarkerLogbackFilter(LoggerContext context) { - log.info("Filtering metrics logs from all appenders except the {} appender", LOGSTASH_APPENDER_NAME); - OnMarkerEvaluator onMarkerMetricsEvaluator = new OnMarkerEvaluator(); - onMarkerMetricsEvaluator.setContext(context); - onMarkerMetricsEvaluator.addMarker("metrics"); - onMarkerMetricsEvaluator.start(); - EvaluatorFilter metricsFilter = new EvaluatorFilter<>(); - metricsFilter.setContext(context); - metricsFilter.setEvaluator(onMarkerMetricsEvaluator); - metricsFilter.setOnMatch(FilterReply.DENY); - metricsFilter.start(); - - for (ch.qos.logback.classic.Logger logger : context.getLoggerList()) { - for (Iterator> it = logger.iteratorForAppenders(); it.hasNext();) { - Appender appender = it.next(); - if (!appender.getName().equals(ASYNC_LOGSTASH_APPENDER_NAME)) { - log.debug("Filter metrics logs from the {} appender", appender.getName()); - appender.setContext(context); - appender.addFilter(metricsFilter); - appender.start(); - } - } - } - } - - /** - * Logback configuration is achieved by configuration file and API. - * When configuration file change is detected, the configuration is reset. - * This listener ensures that the programmatic configuration is also re-applied after reset. - */ - class LogbackLoggerContextListener extends ContextAwareBase implements LoggerContextListener { - - @Override - public boolean isResetResistant() { - return true; - } - - @Override - public void onStart(LoggerContext context) { - addLogstashAppender(context); - } - - @Override - public void onReset(LoggerContext context) { - addLogstashAppender(context); - } - - @Override - public void onStop(LoggerContext context) { - // Nothing to do. - } - - @Override - public void onLevelChange(ch.qos.logback.classic.Logger logger, Level level) { - // Nothing to do. - } - } - -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/SecurityConfiguration.java b/src/main/java/org/hostsharing/hsadminng/config/SecurityConfiguration.java deleted file mode 100644 index db8a5482..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/SecurityConfiguration.java +++ /dev/null @@ -1,128 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import org.hostsharing.hsadminng.security.*; -import org.hostsharing.hsadminng.security.jwt.*; - -import org.springframework.beans.factory.BeanInitializationException; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Import; -import org.springframework.http.HttpMethod; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; -import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.builders.WebSecurity; -import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; -import org.springframework.security.config.http.SessionCreationPolicy; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.security.crypto.password.PasswordEncoder; -import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; -import org.springframework.web.filter.CorsFilter; -import org.zalando.problem.spring.web.advice.security.SecurityProblemSupport; - -import javax.annotation.PostConstruct; - -@Configuration -@EnableWebSecurity -@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) -@Import(SecurityProblemSupport.class) -public class SecurityConfiguration extends WebSecurityConfigurerAdapter { - - private final AuthenticationManagerBuilder authenticationManagerBuilder; - - private final UserDetailsService userDetailsService; - - private final TokenProvider tokenProvider; - - private final CorsFilter corsFilter; - - private final SecurityProblemSupport problemSupport; - - public SecurityConfiguration( - AuthenticationManagerBuilder authenticationManagerBuilder, - UserDetailsService userDetailsService, - TokenProvider tokenProvider, - CorsFilter corsFilter, - SecurityProblemSupport problemSupport) { - this.authenticationManagerBuilder = authenticationManagerBuilder; - this.userDetailsService = userDetailsService; - this.tokenProvider = tokenProvider; - this.corsFilter = corsFilter; - this.problemSupport = problemSupport; - } - - @PostConstruct - public void init() { - try { - authenticationManagerBuilder - .userDetailsService(userDetailsService) - .passwordEncoder(passwordEncoder()); - } catch (Exception e) { - throw new BeanInitializationException("Security configuration failed", e); - } - } - - @Override - @Bean - public AuthenticationManager authenticationManagerBean() throws Exception { - return super.authenticationManagerBean(); - } - - @Bean - public PasswordEncoder passwordEncoder() { - return new BCryptPasswordEncoder(); - } - - @Override - public void configure(WebSecurity web) throws Exception { - web.ignoring() - .antMatchers(HttpMethod.OPTIONS, "/**") - .antMatchers("/app/**/*.{js,html}") - .antMatchers("/i18n/**") - .antMatchers("/content/**") - .antMatchers("/h2-console/**") - .antMatchers("/swagger-ui/index.html") - .antMatchers("/test/**"); - } - - @Override - public void configure(HttpSecurity http) throws Exception { - // @formatter:off - http - .csrf() - .disable() - .addFilterBefore(corsFilter, UsernamePasswordAuthenticationFilter.class) - .exceptionHandling() - .authenticationEntryPoint(problemSupport) - .accessDeniedHandler(problemSupport) - .and() - .headers() - .frameOptions() - .disable() - .and() - .sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and() - .authorizeRequests() - .antMatchers("/api/register").permitAll() - .antMatchers("/api/activate").permitAll() - .antMatchers("/api/authenticate").permitAll() - .antMatchers("/api/account/reset-password/init").permitAll() - .antMatchers("/api/account/reset-password/finish").permitAll() - .antMatchers("/api/**").authenticated() - .antMatchers("/management/health").permitAll() - .antMatchers("/management/info").permitAll() - .antMatchers("/management/**").hasAuthority(AuthoritiesConstants.ADMIN) - .and() - .apply(securityConfigurerAdapter()); - // @formatter:on - } - - private JWTConfigurer securityConfigurerAdapter() { - return new JWTConfigurer(tokenProvider); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/WebConfigurer.java b/src/main/java/org/hostsharing/hsadminng/config/WebConfigurer.java deleted file mode 100644 index e0265aff..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/WebConfigurer.java +++ /dev/null @@ -1,172 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import static java.net.URLDecoder.decode; - -import io.github.jhipster.config.JHipsterConstants; -import io.github.jhipster.config.JHipsterProperties; -import io.github.jhipster.config.h2.H2ConfigurationHelper; -import io.github.jhipster.web.filter.CachingHttpHeadersFilter; -import io.undertow.UndertowOptions; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; -import org.springframework.boot.web.server.*; -import org.springframework.boot.web.servlet.ServletContextInitializer; -import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.env.Environment; -import org.springframework.http.MediaType; -import org.springframework.web.cors.CorsConfiguration; -import org.springframework.web.cors.UrlBasedCorsConfigurationSource; -import org.springframework.web.filter.CorsFilter; - -import java.io.File; -import java.io.UnsupportedEncodingException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Paths; -import java.util.*; - -import javax.servlet.*; - -/** - * Configuration of web application with Servlet 3.0 APIs. - */ -@Configuration -public class WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer { - - private final Logger log = LoggerFactory.getLogger(WebConfigurer.class); - - private final Environment env; - - private final JHipsterProperties jHipsterProperties; - - public WebConfigurer(Environment env, JHipsterProperties jHipsterProperties) { - - this.env = env; - this.jHipsterProperties = jHipsterProperties; - } - - @Override - public void onStartup(ServletContext servletContext) throws ServletException { - if (env.getActiveProfiles().length != 0) { - log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles()); - } - EnumSet disps = EnumSet.of(DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.ASYNC); - if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { - initCachingHttpHeadersFilter(servletContext, disps); - } - if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) { - initH2Console(servletContext); - } - log.info("Web application fully configured"); - } - - /** - * Customize the Servlet engine: Mime types, the document root, the cache. - */ - @Override - public void customize(WebServerFactory server) { - setMimeMappings(server); - // When running in an IDE or with ./gradlew bootRun, set location of the static web assets. - setLocationForStaticAssets(server); - - /* - * Enable HTTP/2 for Undertow - https://twitter.com/ankinson/status/829256167700492288 - * HTTP/2 requires HTTPS, so HTTP requests will fallback to HTTP/1.1. - * See the JHipsterProperties class and your application-*.yml configuration files - * for more information. - */ - if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) && - server instanceof UndertowServletWebServerFactory) { - - ((UndertowServletWebServerFactory) server) - .addBuilderCustomizers(builder -> builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true)); - } - } - - private void setMimeMappings(WebServerFactory server) { - if (server instanceof ConfigurableServletWebServerFactory) { - MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT); - // IE issue, see https://github.com/jhipster/generator-jhipster/pull/711 - mappings.add("html", MediaType.TEXT_HTML_VALUE + ";charset=" + StandardCharsets.UTF_8.name().toLowerCase()); - // CloudFoundry issue, see https://github.com/cloudfoundry/gorouter/issues/64 - mappings.add("json", MediaType.TEXT_HTML_VALUE + ";charset=" + StandardCharsets.UTF_8.name().toLowerCase()); - ConfigurableServletWebServerFactory servletWebServer = (ConfigurableServletWebServerFactory) server; - servletWebServer.setMimeMappings(mappings); - } - } - - private void setLocationForStaticAssets(WebServerFactory server) { - if (server instanceof ConfigurableServletWebServerFactory) { - ConfigurableServletWebServerFactory servletWebServer = (ConfigurableServletWebServerFactory) server; - File root; - String prefixPath = resolvePathPrefix(); - root = new File(prefixPath + "build/www/"); - if (root.exists() && root.isDirectory()) { - servletWebServer.setDocumentRoot(root); - } - } - } - - /** - * Resolve path prefix to static resources. - */ - private String resolvePathPrefix() { - String fullExecutablePath; - try { - fullExecutablePath = decode(this.getClass().getResource("").getPath(), StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - /* try without decoding if this ever happens */ - fullExecutablePath = this.getClass().getResource("").getPath(); - } - String rootPath = Paths.get(".").toUri().normalize().getPath(); - String extractedPath = fullExecutablePath.replace(rootPath, ""); - int extractionEndIndex = extractedPath.indexOf("build/"); - if (extractionEndIndex <= 0) { - return ""; - } - return extractedPath.substring(0, extractionEndIndex); - } - - /** - * Initializes the caching HTTP Headers Filter. - */ - private void initCachingHttpHeadersFilter( - ServletContext servletContext, - EnumSet disps) { - log.debug("Registering Caching HTTP Headers Filter"); - FilterRegistration.Dynamic cachingHttpHeadersFilter = servletContext.addFilter( - "cachingHttpHeadersFilter", - new CachingHttpHeadersFilter(jHipsterProperties)); - - cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/i18n/*"); - cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/content/*"); - cachingHttpHeadersFilter.addMappingForUrlPatterns(disps, true, "/app/*"); - cachingHttpHeadersFilter.setAsyncSupported(true); - } - - @Bean - public CorsFilter corsFilter() { - UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); - CorsConfiguration config = jHipsterProperties.getCors(); - if (config.getAllowedOrigins() != null && !config.getAllowedOrigins().isEmpty()) { - log.debug("Registering CORS filter"); - source.registerCorsConfiguration("/api/**", config); - source.registerCorsConfiguration("/management/**", config); - source.registerCorsConfiguration("/v2/api-docs", config); - } - return new CorsFilter(source); - } - - /** - * Initializes H2 console. - */ - private void initH2Console(ServletContext servletContext) { - log.debug("Initialize H2 console"); - H2ConfigurationHelper.initH2Console(servletContext); - } - -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/audit/AuditEventConverter.java b/src/main/java/org/hostsharing/hsadminng/config/audit/AuditEventConverter.java deleted file mode 100644 index 9a591c96..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/audit/AuditEventConverter.java +++ /dev/null @@ -1,90 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config.audit; - -import org.hostsharing.hsadminng.domain.PersistentAuditEvent; - -import org.springframework.boot.actuate.audit.AuditEvent; -import org.springframework.security.web.authentication.WebAuthenticationDetails; -import org.springframework.stereotype.Component; - -import java.util.*; - -@Component -public class AuditEventConverter { - - /** - * Convert a list of PersistentAuditEvent to a list of AuditEvent - * - * @param persistentAuditEvents the list to convert - * @return the converted list. - */ - public List convertToAuditEvent(Iterable persistentAuditEvents) { - if (persistentAuditEvents == null) { - return Collections.emptyList(); - } - List auditEvents = new ArrayList<>(); - for (PersistentAuditEvent persistentAuditEvent : persistentAuditEvents) { - auditEvents.add(convertToAuditEvent(persistentAuditEvent)); - } - return auditEvents; - } - - /** - * Convert a PersistentAuditEvent to an AuditEvent - * - * @param persistentAuditEvent the event to convert - * @return the converted list. - */ - public AuditEvent convertToAuditEvent(PersistentAuditEvent persistentAuditEvent) { - if (persistentAuditEvent == null) { - return null; - } - return new AuditEvent( - persistentAuditEvent.getAuditEventDate(), - persistentAuditEvent.getPrincipal(), - persistentAuditEvent.getAuditEventType(), - convertDataToObjects(persistentAuditEvent.getData())); - } - - /** - * Internal conversion. This is needed to support the current SpringBoot actuator AuditEventRepository interface - * - * @param data the data to convert - * @return a map of String, Object - */ - public Map convertDataToObjects(Map data) { - Map results = new HashMap<>(); - - if (data != null) { - for (Map.Entry entry : data.entrySet()) { - results.put(entry.getKey(), entry.getValue()); - } - } - return results; - } - - /** - * Internal conversion. This method will allow to save additional data. - * By default, it will save the object as string - * - * @param data the data to convert - * @return a map of String, String - */ - public Map convertDataToStrings(Map data) { - Map results = new HashMap<>(); - - if (data != null) { - for (Map.Entry entry : data.entrySet()) { - // Extract the data that will be saved. - if (entry.getValue() instanceof WebAuthenticationDetails) { - WebAuthenticationDetails authenticationDetails = (WebAuthenticationDetails) entry.getValue(); - results.put("remoteAddress", authenticationDetails.getRemoteAddress()); - results.put("sessionId", authenticationDetails.getSessionId()); - } else { - results.put(entry.getKey(), Objects.toString(entry.getValue())); - } - } - } - return results; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/config/audit/package-info.java b/src/main/java/org/hostsharing/hsadminng/config/audit/package-info.java deleted file mode 100644 index aa7e7d25..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/audit/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Audit specific code. - */ -package org.hostsharing.hsadminng.config.audit; diff --git a/src/main/java/org/hostsharing/hsadminng/config/package-info.java b/src/main/java/org/hostsharing/hsadminng/config/package-info.java deleted file mode 100644 index aaeaef0a..00000000 --- a/src/main/java/org/hostsharing/hsadminng/config/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Spring Framework configuration files. - */ -package org.hostsharing.hsadminng.config; diff --git a/src/main/java/org/hostsharing/hsadminng/domain/AbstractAuditingEntity.java b/src/main/java/org/hostsharing/hsadminng/domain/AbstractAuditingEntity.java deleted file mode 100644 index d1f27399..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/AbstractAuditingEntity.java +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain; - -import com.fasterxml.jackson.annotation.JsonIgnore; - -import org.hibernate.envers.Audited; -import org.springframework.data.annotation.CreatedBy; -import org.springframework.data.annotation.CreatedDate; -import org.springframework.data.annotation.LastModifiedBy; -import org.springframework.data.annotation.LastModifiedDate; -import org.springframework.data.jpa.domain.support.AuditingEntityListener; - -import java.io.Serializable; -import java.time.Instant; - -import javax.persistence.Column; -import javax.persistence.EntityListeners; -import javax.persistence.MappedSuperclass; - -/** - * Base abstract class for entities which will hold definitions for created, last modified by and created, - * last modified by date. - */ -@MappedSuperclass -@Audited -@EntityListeners(AuditingEntityListener.class) -public abstract class AbstractAuditingEntity implements Serializable { - - private static final long serialVersionUID = 1L; - - @CreatedBy - @Column(name = "created_by", nullable = false, length = 50, updatable = false) - @JsonIgnore - private String createdBy; - - @CreatedDate - @Column(name = "created_date", updatable = false) - @JsonIgnore - private Instant createdDate = Instant.now(); - - @LastModifiedBy - @Column(name = "last_modified_by", length = 50) - @JsonIgnore - private String lastModifiedBy; - - @LastModifiedDate - @Column(name = "last_modified_date") - @JsonIgnore - private Instant lastModifiedDate = Instant.now(); - - public String getCreatedBy() { - return createdBy; - } - - public void setCreatedBy(String createdBy) { - this.createdBy = createdBy; - } - - public Instant getCreatedDate() { - return createdDate; - } - - public void setCreatedDate(Instant createdDate) { - this.createdDate = createdDate; - } - - public String getLastModifiedBy() { - return lastModifiedBy; - } - - public void setLastModifiedBy(String lastModifiedBy) { - this.lastModifiedBy = lastModifiedBy; - } - - public Instant getLastModifiedDate() { - return lastModifiedDate; - } - - public void setLastModifiedDate(Instant lastModifiedDate) { - this.lastModifiedDate = lastModifiedDate; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/Asset.java b/src/main/java/org/hostsharing/hsadminng/domain/Asset.java deleted file mode 100644 index db985858..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/Asset.java +++ /dev/null @@ -1,184 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain; - -import org.hostsharing.hsadminng.domain.enumeration.AssetAction; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.util.Objects; - -import javax.persistence.*; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -/** - * A Asset. - */ -@Entity -@Table(name = "asset") -public class Asset implements Serializable { - - private static final long serialVersionUID = 1L; - - public static final String ENTITY_NAME = "asset"; - public static final String ENTITY_TYPE_ID = "customer.asset"; - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") - @SequenceGenerator(name = "sequenceGenerator") - private Long id; - - @NotNull - @Column(name = "document_date", nullable = false) - private LocalDate documentDate; - - @NotNull - @Column(name = "value_date", nullable = false) - private LocalDate valueDate; - - @NotNull - @Enumerated(EnumType.STRING) - @Column(name = "action", nullable = false) - private AssetAction action; - - @NotNull - @Column(name = "amount", precision = 10, scale = 2, nullable = false) - private BigDecimal amount; - - @Size(max = 160) - @Column(name = "remark", length = 160) - private String remark; - - @ManyToOne(optional = false) - @NotNull - @JsonIgnoreProperties("assets") - private Membership membership; - - // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove - public Long getId() { - return id; - } - - public Asset id(Long id) { - this.id = id; - return this; - } - - public void setId(Long id) { - this.id = id; - } - - public LocalDate getDocumentDate() { - return documentDate; - } - - public Asset documentDate(LocalDate documentDate) { - this.documentDate = documentDate; - return this; - } - - public void setDocumentDate(LocalDate documentDate) { - this.documentDate = documentDate; - } - - public LocalDate getValueDate() { - return valueDate; - } - - public Asset valueDate(LocalDate valueDate) { - this.valueDate = valueDate; - return this; - } - - public void setValueDate(LocalDate valueDate) { - this.valueDate = valueDate; - } - - public AssetAction getAction() { - return action; - } - - public Asset action(AssetAction action) { - this.action = action; - return this; - } - - public void setAction(AssetAction action) { - this.action = action; - } - - public BigDecimal getAmount() { - return amount; - } - - public Asset amount(BigDecimal amount) { - this.amount = amount; - return this; - } - - public void setAmount(BigDecimal amount) { - this.amount = amount; - } - - public String getRemark() { - return remark; - } - - public Asset remark(String remark) { - this.remark = remark; - return this; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public Membership getMembership() { - return membership; - } - - public Asset membership(Membership membership) { - this.membership = membership; - return this; - } - - public void setMembership(Membership membership) { - this.membership = membership; - } - // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Asset asset = (Asset) o; - if (asset.getId() == null || getId() == null) { - return false; - } - return Objects.equals(getId(), asset.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "Asset{" + - "id=" + getId() + - ", documentDate='" + getDocumentDate() + "'" + - ", valueDate='" + getValueDate() + "'" + - ", action='" + getAction() + "'" + - ", amount=" + getAmount() + - ", remark='" + getRemark() + "'" + - "}"; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/Authority.java b/src/main/java/org/hostsharing/hsadminng/domain/Authority.java deleted file mode 100644 index 422347c7..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/Authority.java +++ /dev/null @@ -1,61 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -/** - * An authority (a security role) used by Spring Security. - */ -@Entity -@Table(name = "jhi_authority") -public class Authority implements Serializable { - - private static final long serialVersionUID = 1L; - - @NotNull - @Size(max = 50) - @Id - @Column(length = 50) - private String name; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - Authority authority = (Authority) o; - - return !(name != null ? !name.equals(authority.name) : authority.name != null); - } - - @Override - public int hashCode() { - return name != null ? name.hashCode() : 0; - } - - @Override - public String toString() { - return "Authority{" + - "name='" + name + '\'' + - "}"; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/Customer.java b/src/main/java/org/hostsharing/hsadminng/domain/Customer.java deleted file mode 100644 index aefb1fcf..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/Customer.java +++ /dev/null @@ -1,408 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain; - -import org.hostsharing.hsadminng.domain.enumeration.CustomerKind; -import org.hostsharing.hsadminng.domain.enumeration.VatRegion; - -import java.io.Serializable; -import java.time.LocalDate; -import java.util.HashSet; -import java.util.Objects; -import java.util.Set; - -import javax.persistence.*; -import javax.validation.constraints.*; - -/** - * A Customer. - */ -@Entity -@Table(name = "customer") -public class Customer implements Serializable { - - private static final long serialVersionUID = 1L; - - public static final String ENTITY_TYPE_ID = "customer.Customer"; - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") - @SequenceGenerator(name = "sequenceGenerator") - private Long id; - - @NotNull - @Min(value = 10000) - @Max(value = 99999) - @Column(name = "reference", nullable = false, unique = true) - private Integer reference; - - @NotNull - @Size(max = 3) - @Pattern(regexp = "[a-z][a-z0-9]+") - @Column(name = "prefix", length = 3, nullable = false, unique = true) - private String prefix; - - @NotNull - @Size(max = 80) - @Column(name = "name", length = 80, nullable = false) - private String name; - - @NotNull - @Enumerated(EnumType.STRING) - @Column(name = "kind", nullable = false) - private CustomerKind kind; - - @Column(name = "birth_date") - private LocalDate birthDate; - - @Size(max = 80) - @Column(name = "birth_place", length = 80) - private String birthPlace; - - @Size(max = 80) - @Column(name = "registration_court", length = 80) - private String registrationCourt; - - @Size(max = 80) - @Column(name = "registration_number", length = 80) - private String registrationNumber; - - @NotNull - @Enumerated(EnumType.STRING) - @Column(name = "vat_region", nullable = false) - private VatRegion vatRegion; - - @Size(max = 40) - @Column(name = "vat_number", length = 40) - private String vatNumber; - - @Size(max = 80) - @Column(name = "contractual_salutation", length = 80) - private String contractualSalutation; - - @NotNull - @Size(max = 400) - @Column(name = "contractual_address", length = 400, nullable = false) - private String contractualAddress; - - @Size(max = 80) - @Column(name = "billing_salutation", length = 80) - private String billingSalutation; - - @Size(max = 400) - @Column(name = "billing_address", length = 400) - private String billingAddress; - - @Size(max = 160) - @Column(name = "remark", length = 160) - private String remark; - - @OneToMany(mappedBy = "customer") - private Set memberships = new HashSet<>(); - - @OneToMany(mappedBy = "customer") - private Set sepamandates = new HashSet<>(); - - // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove - - public Long getId() { - return id; - } - - public Customer id(long id) { - this.id = id; - return this; - } - - public void setId(Long id) { - this.id = id; - } - - public Integer getReference() { - return reference; - } - - public Customer reference(Integer reference) { - this.reference = reference; - return this; - } - - public void setReference(Integer reference) { - this.reference = reference; - } - - public String getPrefix() { - return prefix; - } - - public Customer prefix(String prefix) { - this.prefix = prefix; - return this; - } - - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - public String getName() { - return name; - } - - public Customer name(String name) { - this.name = name; - return this; - } - - public void setName(String name) { - this.name = name; - } - - public CustomerKind getKind() { - return kind; - } - - public Customer kind(CustomerKind kind) { - this.kind = kind; - return this; - } - - public void setKind(CustomerKind kind) { - this.kind = kind; - } - - public LocalDate getBirthDate() { - return birthDate; - } - - public Customer birthDate(LocalDate birthDate) { - this.birthDate = birthDate; - return this; - } - - public void setBirthDate(LocalDate birthDate) { - this.birthDate = birthDate; - } - - public String getBirthPlace() { - return birthPlace; - } - - public Customer birthPlace(String birthPlace) { - this.birthPlace = birthPlace; - return this; - } - - public void setBirthPlace(String birthPlace) { - this.birthPlace = birthPlace; - } - - public String getRegistrationCourt() { - return registrationCourt; - } - - public Customer registrationCourt(String registrationCourt) { - this.registrationCourt = registrationCourt; - return this; - } - - public void setRegistrationCourt(String registrationCourt) { - this.registrationCourt = registrationCourt; - } - - public String getRegistrationNumber() { - return registrationNumber; - } - - public Customer registrationNumber(String registrationNumber) { - this.registrationNumber = registrationNumber; - return this; - } - - public void setRegistrationNumber(String registrationNumber) { - this.registrationNumber = registrationNumber; - } - - public VatRegion getVatRegion() { - return vatRegion; - } - - public Customer vatRegion(VatRegion vatRegion) { - this.vatRegion = vatRegion; - return this; - } - - public void setVatRegion(VatRegion vatRegion) { - this.vatRegion = vatRegion; - } - - public String getVatNumber() { - return vatNumber; - } - - public Customer vatNumber(String vatNumber) { - this.vatNumber = vatNumber; - return this; - } - - public void setVatNumber(String vatNumber) { - this.vatNumber = vatNumber; - } - - public String getContractualSalutation() { - return contractualSalutation; - } - - public Customer contractualSalutation(String contractualSalutation) { - this.contractualSalutation = contractualSalutation; - return this; - } - - public void setContractualSalutation(String contractualSalutation) { - this.contractualSalutation = contractualSalutation; - } - - public String getContractualAddress() { - return contractualAddress; - } - - public Customer contractualAddress(String contractualAddress) { - this.contractualAddress = contractualAddress; - return this; - } - - public void setContractualAddress(String contractualAddress) { - this.contractualAddress = contractualAddress; - } - - public String getBillingSalutation() { - return billingSalutation; - } - - public Customer billingSalutation(String billingSalutation) { - this.billingSalutation = billingSalutation; - return this; - } - - public void setBillingSalutation(String billingSalutation) { - this.billingSalutation = billingSalutation; - } - - public String getBillingAddress() { - return billingAddress; - } - - public Customer billingAddress(String billingAddress) { - this.billingAddress = billingAddress; - return this; - } - - public void setBillingAddress(String billingAddress) { - this.billingAddress = billingAddress; - } - - public String getRemark() { - return remark; - } - - public Customer remark(String remark) { - this.remark = remark; - return this; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public Set getMemberships() { - return memberships; - } - - public Customer memberships(Set memberships) { - this.memberships = memberships; - return this; - } - - public Customer addMembership(Membership membership) { - this.memberships.add(membership); - membership.setCustomer(this); - return this; - } - - public Customer removeMembership(Membership membership) { - this.memberships.remove(membership); - membership.setCustomer(null); - return this; - } - - public void setMemberships(Set memberships) { - this.memberships = memberships; - } - - public Set getSepamandates() { - return sepamandates; - } - - public Customer sepamandates(Set sepaMandates) { - this.sepamandates = sepaMandates; - return this; - } - - public Customer addSepamandate(SepaMandate sepaMandate) { - this.sepamandates.add(sepaMandate); - sepaMandate.setCustomer(this); - return this; - } - - public Customer removeSepamandate(SepaMandate sepaMandate) { - this.sepamandates.remove(sepaMandate); - sepaMandate.setCustomer(null); - return this; - } - - public void setSepamandates(Set sepaMandates) { - this.sepamandates = sepaMandates; - } - - // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Customer customer = (Customer) o; - if (customer.getId() == null || getId() == null) { - return false; - } - return Objects.equals(getId(), customer.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "Customer{" + - "id=" + getId() + - ", reference=" + getReference() + - ", prefix='" + getPrefix() + "'" + - ", name='" + getName() + "'" + - ", kind='" + getKind() + "'" + - ", birthDate='" + getBirthDate() + "'" + - ", birthPlace='" + getBirthPlace() + "'" + - ", registrationCourt='" + getRegistrationCourt() + "'" + - ", registrationNumber='" + getRegistrationNumber() + "'" + - ", vatRegion='" + getVatRegion() + "'" + - ", vatNumber='" + getVatNumber() + "'" + - ", contractualSalutation='" + getContractualSalutation() + "'" + - ", contractualAddress='" + getContractualAddress() + "'" + - ", billingSalutation='" + getBillingSalutation() + "'" + - ", billingAddress='" + getBillingAddress() + "'" + - ", remark='" + getRemark() + "'" + - "}"; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/Membership.java b/src/main/java/org/hostsharing/hsadminng/domain/Membership.java deleted file mode 100644 index 36cbdc00..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/Membership.java +++ /dev/null @@ -1,238 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.io.Serializable; -import java.time.LocalDate; -import java.util.HashSet; -import java.util.Objects; -import java.util.Set; - -import javax.persistence.*; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -/** - * A Membership. - */ -@Entity -@Table(name = "membership") -public class Membership implements Serializable { - - private static final long serialVersionUID = 1L; - - public static final String ENTITY_NAME = "membership"; - public static final String ENTITY_TYPE_ID = "customer.Membership"; - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") - @SequenceGenerator(name = "sequenceGenerator") - private Long id; - - @NotNull - @Column(name = "admission_document_date", nullable = false) - private LocalDate admissionDocumentDate; - - @Column(name = "cancellation_document_date") - private LocalDate cancellationDocumentDate; - - @NotNull - @Column(name = "member_from_date", nullable = false) - private LocalDate memberFromDate; - - @Column(name = "member_until_date") - private LocalDate memberUntilDate; - - @Size(max = 160) - @Column(name = "remark", length = 160) - private String remark; - - @OneToMany(mappedBy = "membership") - private Set shares = new HashSet<>(); - - @OneToMany(mappedBy = "membership") - private Set assets = new HashSet<>(); - - @ManyToOne(optional = false) - @NotNull - @JsonIgnoreProperties("memberships") - private Customer customer; - - // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove - - public Long getId() { - return id; - } - - public Membership id(Long id) { - this.id = id; - return this; - } - - public void setId(Long id) { - this.id = id; - } - - public LocalDate getAdmissionDocumentDate() { - return admissionDocumentDate; - } - - public Membership admissionDocumentDate(LocalDate admissionDocumentDate) { - this.admissionDocumentDate = admissionDocumentDate; - return this; - } - - public void setAdmissionDocumentDate(LocalDate admissionDocumentDate) { - this.admissionDocumentDate = admissionDocumentDate; - } - - public LocalDate getCancellationDocumentDate() { - return cancellationDocumentDate; - } - - public Membership cancellationDocumentDate(LocalDate cancellationDocumentDate) { - this.cancellationDocumentDate = cancellationDocumentDate; - return this; - } - - public void setCancellationDocumentDate(LocalDate cancellationDocumentDate) { - this.cancellationDocumentDate = cancellationDocumentDate; - } - - public LocalDate getMemberFromDate() { - return memberFromDate; - } - - public Membership memberFromDate(LocalDate memberFromDate) { - this.memberFromDate = memberFromDate; - return this; - } - - public void setMemberFromDate(LocalDate memberFromDate) { - this.memberFromDate = memberFromDate; - } - - public LocalDate getMemberUntilDate() { - return memberUntilDate; - } - - public Membership memberUntilDate(LocalDate memberUntilDate) { - this.memberUntilDate = memberUntilDate; - return this; - } - - public void setMemberUntilDate(LocalDate memberUntilDate) { - this.memberUntilDate = memberUntilDate; - } - - public String getRemark() { - return remark; - } - - public Membership remark(String remark) { - this.remark = remark; - return this; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public Set getShares() { - return shares; - } - - public Membership shares(Set shares) { - this.shares = shares; - return this; - } - - public Membership addShare(Share share) { - this.shares.add(share); - share.setMembership(this); - return this; - } - - public Membership removeShare(Share share) { - this.shares.remove(share); - share.setMembership(null); - return this; - } - - public void setShares(Set shares) { - this.shares = shares; - } - - public Set getAssets() { - return assets; - } - - public Membership assets(Set assets) { - this.assets = assets; - return this; - } - - public Membership addAsset(Asset asset) { - this.assets.add(asset); - asset.setMembership(this); - return this; - } - - public Membership removeAsset(Asset asset) { - this.assets.remove(asset); - asset.setMembership(null); - return this; - } - - public void setAssets(Set assets) { - this.assets = assets; - } - - public Customer getCustomer() { - return customer; - } - - public Membership customer(Customer customer) { - this.customer = customer; - return this; - } - - public void setCustomer(Customer customer) { - this.customer = customer; - } - - // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Membership membership = (Membership) o; - if (membership.getId() == null || getId() == null) { - return false; - } - return Objects.equals(getId(), membership.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "Membership{" + - "id=" + getId() + - ", admissionDocumentDate='" + getAdmissionDocumentDate() + "'" + - ", cancellationDocumentDate='" + getCancellationDocumentDate() + "'" + - ", memberFromDate='" + getMemberFromDate() + "'" + - ", memberUntilDate='" + getMemberUntilDate() + "'" + - ", remark='" + getRemark() + "'" + - "}"; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/PersistentAuditEvent.java b/src/main/java/org/hostsharing/hsadminng/domain/PersistentAuditEvent.java deleted file mode 100644 index d59463c2..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/PersistentAuditEvent.java +++ /dev/null @@ -1,113 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain; - -import java.io.Serializable; -import java.time.Instant; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -import javax.persistence.*; -import javax.validation.constraints.NotNull; - -/** - * Persist AuditEvent managed by the Spring Boot actuator. - * - * @see org.springframework.boot.actuate.audit.AuditEvent - */ -@Entity -@Table(name = "jhi_persistent_audit_event") -public class PersistentAuditEvent implements Serializable { - - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") - @SequenceGenerator(name = "sequenceGenerator") - @Column(name = "event_id") - private Long id; - - @NotNull - @Column(nullable = false) - private String principal; - - @Column(name = "event_date") - private Instant auditEventDate; - - @Column(name = "event_type") - private String auditEventType; - - @ElementCollection - @MapKeyColumn(name = "name") - @Column(name = "value") - @CollectionTable(name = "jhi_persistent_audit_evt_data", joinColumns = @JoinColumn(name = "event_id")) - private Map data = new HashMap<>(); - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getPrincipal() { - return principal; - } - - public void setPrincipal(String principal) { - this.principal = principal; - } - - public Instant getAuditEventDate() { - return auditEventDate; - } - - public void setAuditEventDate(Instant auditEventDate) { - this.auditEventDate = auditEventDate; - } - - public String getAuditEventType() { - return auditEventType; - } - - public void setAuditEventType(String auditEventType) { - this.auditEventType = auditEventType; - } - - public Map getData() { - return data; - } - - public void setData(Map data) { - this.data = data; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - PersistentAuditEvent persistentAuditEvent = (PersistentAuditEvent) o; - return !(persistentAuditEvent.getId() == null || getId() == null) - && Objects.equals(getId(), persistentAuditEvent.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "PersistentAuditEvent{" + - "principal='" + principal + '\'' + - ", auditEventDate=" + auditEventDate + - ", auditEventType='" + auditEventType + '\'' + - '}'; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/SepaMandate.java b/src/main/java/org/hostsharing/hsadminng/domain/SepaMandate.java deleted file mode 100644 index 16b849d9..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/SepaMandate.java +++ /dev/null @@ -1,250 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.io.Serializable; -import java.time.LocalDate; -import java.util.Objects; - -import javax.persistence.*; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -/** - * A SepaMandate. - */ -@Entity -@Table(name = "sepa_mandate") -public class SepaMandate implements Serializable { - - private static final long serialVersionUID = 1L; - - public static final String ENTITY_TYPE_ID = "customer.SepaMandate"; - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") - @SequenceGenerator(name = "sequenceGenerator") - private Long id; - - @NotNull - @Size(max = 40) - @Column(name = "reference", length = 40, nullable = false, unique = true) - private String reference; - - @Size(max = 34) - @Column(name = "iban", length = 34) - private String iban; - - @Size(max = 11) - @Column(name = "bic", length = 11) - private String bic; - - @NotNull - @Column(name = "granting_document_date", nullable = false) - private LocalDate grantingDocumentDate; - - @Column(name = "revokation_document_date") - private LocalDate revokationDocumentDate; - - @NotNull - @Column(name = "valid_from_date", nullable = false) - private LocalDate validFromDate; - - @Column(name = "valid_until_date") - private LocalDate validUntilDate; - - @Column(name = "last_used_date") - private LocalDate lastUsedDate; - - @Size(max = 160) - @Column(name = "remark", length = 160) - private String remark; - - @ManyToOne(optional = false) - @NotNull - @JsonIgnoreProperties("sepamandates") - private Customer customer; - - // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove - - public Long getId() { - return id; - } - - public SepaMandate id(final Long id) { - this.id = id; - return this; - } - - public void setId(Long id) { - this.id = id; - } - - public String getReference() { - return reference; - } - - public SepaMandate reference(String reference) { - this.reference = reference; - return this; - } - - public void setReference(String reference) { - this.reference = reference; - } - - public String getIban() { - return iban; - } - - public SepaMandate iban(String iban) { - this.iban = iban; - return this; - } - - public void setIban(String iban) { - this.iban = iban; - } - - public String getBic() { - return bic; - } - - public SepaMandate bic(String bic) { - this.bic = bic; - return this; - } - - public void setBic(String bic) { - this.bic = bic; - } - - public LocalDate getGrantingDocumentDate() { - return grantingDocumentDate; - } - - public SepaMandate grantingDocumentDate(LocalDate grantingDocumentDate) { - this.grantingDocumentDate = grantingDocumentDate; - return this; - } - - public void setGrantingDocumentDate(LocalDate grantingDocumentDate) { - this.grantingDocumentDate = grantingDocumentDate; - } - - public LocalDate getRevokationDocumentDate() { - return revokationDocumentDate; - } - - public SepaMandate revokationDocumentDate(LocalDate revokationDocumentDate) { - this.revokationDocumentDate = revokationDocumentDate; - return this; - } - - public void setRevokationDocumentDate(LocalDate revokationDocumentDate) { - this.revokationDocumentDate = revokationDocumentDate; - } - - public LocalDate getValidFromDate() { - return validFromDate; - } - - public SepaMandate validFromDate(LocalDate validFromDate) { - this.validFromDate = validFromDate; - return this; - } - - public void setValidFromDate(LocalDate validFromDate) { - this.validFromDate = validFromDate; - } - - public LocalDate getValidUntilDate() { - return validUntilDate; - } - - public SepaMandate validUntilDate(LocalDate validUntilDate) { - this.validUntilDate = validUntilDate; - return this; - } - - public void setValidUntilDate(LocalDate validUntilDate) { - this.validUntilDate = validUntilDate; - } - - public LocalDate getLastUsedDate() { - return lastUsedDate; - } - - public SepaMandate lastUsedDate(LocalDate lastUsedDate) { - this.lastUsedDate = lastUsedDate; - return this; - } - - public void setLastUsedDate(LocalDate lastUsedDate) { - this.lastUsedDate = lastUsedDate; - } - - public String getRemark() { - return remark; - } - - public SepaMandate remark(String remark) { - this.remark = remark; - return this; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public Customer getCustomer() { - return customer; - } - - public SepaMandate customer(Customer customer) { - this.customer = customer; - return this; - } - - public void setCustomer(Customer customer) { - this.customer = customer; - } - // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SepaMandate sepaMandate = (SepaMandate) o; - if (sepaMandate.getId() == null || getId() == null) { - return false; - } - return Objects.equals(getId(), sepaMandate.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "SepaMandate{" + - "id=" + getId() + - ", reference='" + getReference() + "'" + - ", iban='" + getIban() + "'" + - ", bic='" + getBic() + "'" + - ", grantingDocumentDate='" + getGrantingDocumentDate() + "'" + - ", revokationDocumentDate='" + getRevokationDocumentDate() + "'" + - ", validFromDate='" + getValidFromDate() + "'" + - ", validUntilDate='" + getValidUntilDate() + "'" + - ", lastUsedDate='" + getLastUsedDate() + "'" + - ", remark='" + getRemark() + "'" + - "}"; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/Share.java b/src/main/java/org/hostsharing/hsadminng/domain/Share.java deleted file mode 100644 index 3aa6e10c..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/Share.java +++ /dev/null @@ -1,183 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain; - -import org.hostsharing.hsadminng.domain.enumeration.ShareAction; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - -import java.io.Serializable; -import java.time.LocalDate; -import java.util.Objects; - -import javax.persistence.*; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -/** - * A Share. - */ -@Entity -@Table(name = "share") -public class Share implements Serializable { - - private static final long serialVersionUID = 1L; - - public static final String ENTITY_NAME = "share"; - public static final String ENTITY_TYPE_ID = "customer.share"; - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") - @SequenceGenerator(name = "sequenceGenerator") - private Long id; - - @NotNull - @Column(name = "document_date", nullable = false) - private LocalDate documentDate; - - @NotNull - @Column(name = "value_date", nullable = false) - private LocalDate valueDate; - - @NotNull - @Enumerated(EnumType.STRING) - @Column(name = "action", nullable = false) - private ShareAction action; - - @NotNull - @Column(name = "quantity", nullable = false) - private Integer quantity; - - @Size(max = 160) - @Column(name = "remark", length = 160) - private String remark; - - @ManyToOne(optional = false) - @NotNull - @JsonIgnoreProperties("shares") - private Membership membership; - - // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove - public Long getId() { - return id; - } - - public Share id(final Long id) { - this.id = id; - return this; - } - - public void setId(Long id) { - this.id = id; - } - - public LocalDate getDocumentDate() { - return documentDate; - } - - public Share documentDate(LocalDate documentDate) { - this.documentDate = documentDate; - return this; - } - - public void setDocumentDate(LocalDate documentDate) { - this.documentDate = documentDate; - } - - public LocalDate getValueDate() { - return valueDate; - } - - public Share valueDate(LocalDate valueDate) { - this.valueDate = valueDate; - return this; - } - - public void setValueDate(LocalDate valueDate) { - this.valueDate = valueDate; - } - - public ShareAction getAction() { - return action; - } - - public Share action(ShareAction action) { - this.action = action; - return this; - } - - public void setAction(ShareAction action) { - this.action = action; - } - - public Integer getQuantity() { - return quantity; - } - - public Share quantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - public String getRemark() { - return remark; - } - - public Share remark(String remark) { - this.remark = remark; - return this; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public Membership getMembership() { - return membership; - } - - public Share membership(Membership membership) { - this.membership = membership; - return this; - } - - public void setMembership(Membership membership) { - this.membership = membership; - } - // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Share share = (Share) o; - if (share.getId() == null || getId() == null) { - return false; - } - return Objects.equals(getId(), share.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "Share{" + - "id=" + getId() + - ", documentDate='" + getDocumentDate() + "'" + - ", valueDate='" + getValueDate() + "'" + - ", action='" + getAction() + "'" + - ", quantity=" + getQuantity() + - ", remark='" + getRemark() + "'" + - "}"; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/User.java b/src/main/java/org/hostsharing/hsadminng/domain/User.java deleted file mode 100644 index d16b9f5b..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/User.java +++ /dev/null @@ -1,240 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain; - -import org.hostsharing.hsadminng.config.Constants; -import org.hostsharing.hsadminng.service.dto.FluentBuilder; - -import com.fasterxml.jackson.annotation.JsonIgnore; - -import org.apache.commons.lang3.StringUtils; -import org.hibernate.annotations.BatchSize; - -import java.io.Serializable; -import java.time.Instant; -import java.util.HashSet; -import java.util.Locale; -import java.util.Objects; -import java.util.Set; - -import javax.persistence.*; -import javax.validation.constraints.Email; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - -/** - * A user. - */ -@Entity -@Table(name = "jhi_user") - -public class User extends AbstractAuditingEntity implements FluentBuilder, Serializable { - - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") - @SequenceGenerator(name = "sequenceGenerator") - private Long id; - - @NotNull - @Pattern(regexp = Constants.LOGIN_REGEX) - @Size(min = 1, max = 50) - @Column(length = 50, unique = true, nullable = false) - private String login; - - @JsonIgnore - @NotNull - @Size(min = 60, max = 60) - @Column(name = "password_hash", length = 60, nullable = false) - private String password; - - @Size(max = 50) - @Column(name = "first_name", length = 50) - private String firstName; - - @Size(max = 50) - @Column(name = "last_name", length = 50) - private String lastName; - - @Email - @Size(min = 5, max = 254) - @Column(length = 254, unique = true) - private String email; - - @NotNull - @Column(nullable = false) - private boolean activated = false; - - @Size(min = 2, max = 6) - @Column(name = "lang_key", length = 6) - private String langKey; - - @Size(max = 256) - @Column(name = "image_url", length = 256) - private String imageUrl; - - @Size(max = 20) - @Column(name = "activation_key", length = 20) - @JsonIgnore - private String activationKey; - - @Size(max = 20) - @Column(name = "reset_key", length = 20) - @JsonIgnore - private String resetKey; - - @Column(name = "reset_date") - private Instant resetDate = null; - - @JsonIgnore - @ManyToMany - @JoinTable( - name = "jhi_user_authority", - joinColumns = { @JoinColumn(name = "user_id", referencedColumnName = "id") }, - inverseJoinColumns = { @JoinColumn(name = "authority_name", referencedColumnName = "name") }) - @BatchSize(size = 20) - private Set authorities = new HashSet<>(); - - public Long getId() { - return id; - } - - public User id(final long id) { - this.id = id; - return this; - } - - public void setId(Long id) { - this.id = id; - } - - public String getLogin() { - return login; - } - - // Lowercase the login before saving it in database - public void setLogin(String login) { - this.login = StringUtils.lowerCase(login, Locale.ENGLISH); - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getImageUrl() { - return imageUrl; - } - - public void setImageUrl(String imageUrl) { - this.imageUrl = imageUrl; - } - - public boolean getActivated() { - return activated; - } - - public void setActivated(boolean activated) { - this.activated = activated; - } - - public String getActivationKey() { - return activationKey; - } - - public void setActivationKey(String activationKey) { - this.activationKey = activationKey; - } - - public String getResetKey() { - return resetKey; - } - - public void setResetKey(String resetKey) { - this.resetKey = resetKey; - } - - public Instant getResetDate() { - return resetDate; - } - - public void setResetDate(Instant resetDate) { - this.resetDate = resetDate; - } - - public String getLangKey() { - return langKey; - } - - public void setLangKey(String langKey) { - this.langKey = langKey; - } - - public Set getAuthorities() { - return authorities; - } - - public void setAuthorities(Set authorities) { - this.authorities = authorities; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - User user = (User) o; - return !(user.getId() == null || getId() == null) && Objects.equals(getId(), user.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "User{" + - "login='" + login + '\'' + - ", firstName='" + firstName + '\'' + - ", lastName='" + lastName + '\'' + - ", email='" + email + '\'' + - ", imageUrl='" + imageUrl + '\'' + - ", activated='" + activated + '\'' + - ", langKey='" + langKey + '\'' + - ", activationKey='" + activationKey + '\'' + - "}"; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/UserRoleAssignment.java b/src/main/java/org/hostsharing/hsadminng/domain/UserRoleAssignment.java deleted file mode 100644 index 536feb26..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/UserRoleAssignment.java +++ /dev/null @@ -1,214 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain; - -import static org.hostsharing.hsadminng.service.util.ReflectionUtil.of; - -import org.hostsharing.hsadminng.repository.UserRepository; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.*; -import org.hostsharing.hsadminng.service.accessfilter.Role.Admin; -import org.hostsharing.hsadminng.service.accessfilter.Role.Supporter; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.TreeNode; - -import org.springframework.boot.jackson.JsonComponent; -import org.springframework.context.ApplicationContext; - -import java.lang.reflect.Field; -import java.util.Objects; - -import javax.persistence.*; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -/** - * A UserRoleAssignment. - */ -@Entity -@Table(name = "user_role_assignment") -@EntityTypeId(UserRoleAssignment.ENTITY_TYPE_ID) -@JsonAutoDetect( - fieldVisibility = JsonAutoDetect.Visibility.ANY, - getterVisibility = JsonAutoDetect.Visibility.NONE, - setterVisibility = JsonAutoDetect.Visibility.NONE) -public class UserRoleAssignment implements AccessMappings { - - private static final long serialVersionUID = 1L; - - private static final String USER_FIELD_NAME = "user"; - - public static final String ENTITY_TYPE_ID = "rights.UserRoleAssignment"; - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") - @SequenceGenerator(name = "sequenceGenerator") - @SelfId(resolver = UserRoleAssignmentService.class) - @AccessFor(read = Supporter.class) - private Long id; - - @NotNull - @Size(max = 32) - @Column(name = "entity_type_id", length = 32, nullable = false) - @AccessFor(init = Admin.class, update = Admin.class, read = Supporter.class) - private String entityTypeId; - - @NotNull - @Column(name = "entity_object_id", nullable = false) - @AccessFor(init = Admin.class, update = Admin.class, read = Supporter.class) - private Long entityObjectId; - - @NotNull - @Column(name = "assigned_role", nullable = false) - @AccessFor(init = Admin.class, update = Admin.class, read = Supporter.class) - private String assignedRole; - - @ManyToOne - @JsonIgnoreProperties("requireds") - @AccessFor(init = Admin.class, update = Admin.class, read = Supporter.class) - private User user; - - // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove - - public Long getId() { - return id; - } - - public UserRoleAssignment id(final long id) { - this.id = id; - return this; - } - - public void setId(Long id) { - this.id = id; - } - - public String getEntityTypeId() { - return entityTypeId; - } - - public UserRoleAssignment entityTypeId(String entityTypeId) { - this.entityTypeId = entityTypeId; - return this; - } - - public void setEntityTypeId(String entityTypeId) { - this.entityTypeId = entityTypeId; - } - - public Long getEntityObjectId() { - return entityObjectId; - } - - public UserRoleAssignment entityObjectId(Long entityObjectId) { - this.entityObjectId = entityObjectId; - return this; - } - - public void setEntityObjectId(Long entityObjectId) { - this.entityObjectId = entityObjectId; - } - - public Role getAssignedRole() { - return assignedRole != null ? Role.of(assignedRole) : null; - } - - public UserRoleAssignment assignedRole(Role assignedRole) { - this.assignedRole = of(assignedRole, Role::name); - return this; - } - - public void setAssignedRole(Role assignedRole) { - this.assignedRole = of(assignedRole, Role::name); - } - - public User getUser() { - return user; - } - - public UserRoleAssignment user(User user) { - this.user = user; - return this; - } - - public void setUser(User user) { - this.user = user; - } - - // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserRoleAssignment userRoleAssignment = (UserRoleAssignment) o; - if (userRoleAssignment.getId() == null || getId() == null) { - return false; - } - return Objects.equals(getId(), userRoleAssignment.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "UserRoleAssignment{" + - "id=" + getId() + - ", entityTypeId='" + entityTypeId + "'" + - ", entityObjectId=" + entityObjectId + - ", assignedRole='" + assignedRole + "'" + - "}"; - } - - @JsonComponent - public static class UserRoleAssignmentJsonSerializer extends JsonSerializerWithAccessFilter { - - public UserRoleAssignmentJsonSerializer( - final ApplicationContext ctx, - final UserRoleAssignmentService userRoleAssignmentService) { - super(ctx, userRoleAssignmentService); - } - - @Override - protected JSonFieldWriter jsonFieldWriter(final Field field) { - if (USER_FIELD_NAME.equals(field.getName())) { - return (final UserRoleAssignment dto, final JsonGenerator jsonGenerator) -> jsonGenerator - .writeNumberField(USER_FIELD_NAME, dto.getUser().getId()); - } - return super.jsonFieldWriter(field); - } - } - - @JsonComponent - public static class UserRoleAssignmentJsonDeserializer extends JsonDeserializerWithAccessFilter { - - private final UserRepository userRepository; - - public UserRoleAssignmentJsonDeserializer( - final UserRepository userRepository, - final ApplicationContext ctx, - final UserRoleAssignmentService userRoleAssignmentService) { - super(ctx, userRoleAssignmentService); - this.userRepository = userRepository; - } - - @Override - protected JSonFieldReader jsonFieldReader(final TreeNode treeNode, final Field field) { - if ("user".equals(field.getName())) { - return (final UserRoleAssignment target) -> target - .setUser(userRepository.getOne(getSubNode(treeNode, "id").asLong())); - } - - return super.jsonFieldReader(treeNode, field); - } - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/enumeration/AssetAction.java b/src/main/java/org/hostsharing/hsadminng/domain/enumeration/AssetAction.java deleted file mode 100644 index c60ee96a..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/enumeration/AssetAction.java +++ /dev/null @@ -1,14 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain.enumeration; - -/** - * The AssetAction enumeration. - */ -public enum AssetAction { - PAYMENT, - HANDOVER, - ADOPTION, - LOSS, - CLEARING, - PAYBACK -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/enumeration/CustomerKind.java b/src/main/java/org/hostsharing/hsadminng/domain/enumeration/CustomerKind.java deleted file mode 100644 index 7e301271..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/enumeration/CustomerKind.java +++ /dev/null @@ -1,10 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain.enumeration; - -/** - * The CustomerKind enumeration. - */ -public enum CustomerKind { - NATURAL, - LEGAL -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/enumeration/ShareAction.java b/src/main/java/org/hostsharing/hsadminng/domain/enumeration/ShareAction.java deleted file mode 100644 index c8ce2108..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/enumeration/ShareAction.java +++ /dev/null @@ -1,10 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain.enumeration; - -/** - * The ShareAction enumeration. - */ -public enum ShareAction { - SUBSCRIPTION, - CANCELLATION -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/enumeration/VatRegion.java b/src/main/java/org/hostsharing/hsadminng/domain/enumeration/VatRegion.java deleted file mode 100644 index 067cd04e..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/enumeration/VatRegion.java +++ /dev/null @@ -1,11 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.domain.enumeration; - -/** - * The VatRegion enumeration. - */ -public enum VatRegion { - DOMESTIC, - EU, - OTHER -} diff --git a/src/main/java/org/hostsharing/hsadminng/domain/package-info.java b/src/main/java/org/hostsharing/hsadminng/domain/package-info.java deleted file mode 100644 index d4d3e75f..00000000 --- a/src/main/java/org/hostsharing/hsadminng/domain/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * JPA domain objects. - */ -package org.hostsharing.hsadminng.domain; diff --git a/src/main/java/org/hostsharing/hsadminng/liquibase/ReplaceCustomChange.java b/src/main/java/org/hostsharing/hsadminng/liquibase/ReplaceCustomChange.java deleted file mode 100644 index f358d125..00000000 --- a/src/main/java/org/hostsharing/hsadminng/liquibase/ReplaceCustomChange.java +++ /dev/null @@ -1,98 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.liquibase; - -import static com.google.common.base.Verify.verify; - -import liquibase.change.custom.CustomTaskChange; -import liquibase.database.Database; -import liquibase.database.jvm.JdbcConnection; -import liquibase.exception.CustomChangeException; -import liquibase.exception.DatabaseException; -import liquibase.exception.SetupException; -import liquibase.exception.ValidationErrors; -import liquibase.resource.ResourceAccessor; - -import java.sql.SQLException; -import java.sql.Statement; - -/** - * Used in Liquibase for database-independent search and replace with special characters. - */ -public class ReplaceCustomChange implements CustomTaskChange { - - private String tableName; - private String columnNames; - private String searchFor; - private String replaceWith; - - @Override - public void execute(final Database database) throws CustomChangeException { - final JdbcConnection conn = (JdbcConnection) database.getConnection(); - final boolean isH2 = "H2".equals(database.getDatabaseProductName()); - try { - verify(!conn.getAutoCommit(), "assuming auto commit to be off in Liquibase changeset"); - final Statement statement = conn.createStatement(); - for (String columnName : columnNames.split(",")) { - final String sql = "UPDATE " + tableName + " SET " + columnName + "= replace(" + columnName + ", '" + searchFor - + "', " + - (isH2 ? "STRINGDECODE('" + replaceWith + "')" : "E'" + replaceWith + "'") + ")"; - statement.executeUpdate(sql); - } - } catch (DatabaseException | SQLException e) { - throw new CustomChangeException("cannot perform search&replace", e); - } - } - - @Override - public String getConfirmationMessage() { - return "in table " + tableName + " / columns " + columnNames + ": replaced all '" + searchFor + "' to '" + replaceWith - + "'"; - } - - @Override - public void setUp() throws SetupException { - - } - - @Override - public void setFileOpener(final ResourceAccessor resourceAccessor) { - - } - - @Override - public ValidationErrors validate(final Database database) { - return null; - } - - // public String getTableName() { - // return tableName; - // } - - public void setTableName(final String tableName) { - this.tableName = tableName; - } - - // public String getColumnNames() { - // return columnNames; - // } - - public void setColumnNames(final String columns) { - this.columnNames = columns; - } - - // public String getSearchFor() { - // return searchFor; - // } - - public void setSearchFor(final String searchFor) { - this.searchFor = searchFor; - } - - // public String getReplaceWith() { - // return replaceWith; - // } - - public void setReplaceWith(final String replaceWith) { - this.replaceWith = replaceWith; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/repository/AssetRepository.java b/src/main/java/org/hostsharing/hsadminng/repository/AssetRepository.java deleted file mode 100644 index cb8f92c8..00000000 --- a/src/main/java/org/hostsharing/hsadminng/repository/AssetRepository.java +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import org.hostsharing.hsadminng.domain.Asset; - -import org.springframework.data.jpa.repository.*; -import org.springframework.stereotype.Repository; - -/** - * Spring Data repository for the Asset entity. - */ -@SuppressWarnings("unused") -@Repository -public interface AssetRepository extends JpaRepository, JpaSpecificationExecutor { - -} diff --git a/src/main/java/org/hostsharing/hsadminng/repository/AuthorityRepository.java b/src/main/java/org/hostsharing/hsadminng/repository/AuthorityRepository.java deleted file mode 100644 index 2d7a8c20..00000000 --- a/src/main/java/org/hostsharing/hsadminng/repository/AuthorityRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import org.hostsharing.hsadminng.domain.Authority; - -import org.springframework.data.jpa.repository.JpaRepository; - -/** - * Spring Data JPA repository for the Authority entity. - */ -public interface AuthorityRepository extends JpaRepository { -} diff --git a/src/main/java/org/hostsharing/hsadminng/repository/CustomAuditEventRepository.java b/src/main/java/org/hostsharing/hsadminng/repository/CustomAuditEventRepository.java deleted file mode 100644 index 54eb2165..00000000 --- a/src/main/java/org/hostsharing/hsadminng/repository/CustomAuditEventRepository.java +++ /dev/null @@ -1,94 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import org.hostsharing.hsadminng.config.Constants; -import org.hostsharing.hsadminng.config.audit.AuditEventConverter; -import org.hostsharing.hsadminng.domain.PersistentAuditEvent; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.boot.actuate.audit.AuditEvent; -import org.springframework.boot.actuate.audit.AuditEventRepository; -import org.springframework.stereotype.Repository; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; - -import java.time.Instant; -import java.util.*; - -/** - * An implementation of Spring Boot's AuditEventRepository. - */ -@Repository -public class CustomAuditEventRepository implements AuditEventRepository { - - private static final String AUTHORIZATION_FAILURE = "AUTHORIZATION_FAILURE"; - - /** - * Should be the same as in Liquibase migration. - */ - protected static final int EVENT_DATA_COLUMN_MAX_LENGTH = 255; - - private final PersistenceAuditEventRepository persistenceAuditEventRepository; - - private final AuditEventConverter auditEventConverter; - - private final Logger log = LoggerFactory.getLogger(getClass()); - - public CustomAuditEventRepository( - PersistenceAuditEventRepository persistenceAuditEventRepository, - AuditEventConverter auditEventConverter) { - - this.persistenceAuditEventRepository = persistenceAuditEventRepository; - this.auditEventConverter = auditEventConverter; - } - - @Override - public List find(String principal, Instant after, String type) { - Iterable persistentAuditEvents = persistenceAuditEventRepository - .findByPrincipalAndAuditEventDateAfterAndAuditEventType(principal, after, type); - return auditEventConverter.convertToAuditEvent(persistentAuditEvents); - } - - @Override - @Transactional(propagation = Propagation.REQUIRES_NEW) - public void add(AuditEvent event) { - if (!AUTHORIZATION_FAILURE.equals(event.getType()) && - !Constants.ANONYMOUS_USER.equals(event.getPrincipal())) { - - PersistentAuditEvent persistentAuditEvent = new PersistentAuditEvent(); - persistentAuditEvent.setPrincipal(event.getPrincipal()); - persistentAuditEvent.setAuditEventType(event.getType()); - persistentAuditEvent.setAuditEventDate(event.getTimestamp()); - Map eventData = auditEventConverter.convertDataToStrings(event.getData()); - persistentAuditEvent.setData(truncate(eventData)); - persistenceAuditEventRepository.save(persistentAuditEvent); - } - } - - /** - * Truncate event data that might exceed column length. - */ - private Map truncate(Map data) { - Map results = new HashMap<>(); - - if (data != null) { - for (Map.Entry entry : data.entrySet()) { - String value = entry.getValue(); - if (value != null) { - int length = value.length(); - if (length > EVENT_DATA_COLUMN_MAX_LENGTH) { - value = value.substring(0, EVENT_DATA_COLUMN_MAX_LENGTH); - log.warn( - "Event data for {} too long ({}) has been truncated to {}. Consider increasing column width.", - entry.getKey(), - length, - EVENT_DATA_COLUMN_MAX_LENGTH); - } - } - results.put(entry.getKey(), value); - } - } - return results; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/repository/CustomerRepository.java b/src/main/java/org/hostsharing/hsadminng/repository/CustomerRepository.java deleted file mode 100644 index 9c434cb2..00000000 --- a/src/main/java/org/hostsharing/hsadminng/repository/CustomerRepository.java +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import org.hostsharing.hsadminng.domain.Customer; - -import org.springframework.data.jpa.repository.*; -import org.springframework.stereotype.Repository; - -/** - * Spring Data repository for the Customer entity. - */ -@SuppressWarnings("unused") -@Repository -public interface CustomerRepository extends JpaRepository, JpaSpecificationExecutor { - -} diff --git a/src/main/java/org/hostsharing/hsadminng/repository/MembershipRepository.java b/src/main/java/org/hostsharing/hsadminng/repository/MembershipRepository.java deleted file mode 100644 index 291deca7..00000000 --- a/src/main/java/org/hostsharing/hsadminng/repository/MembershipRepository.java +++ /dev/null @@ -1,22 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import org.hostsharing.hsadminng.domain.Membership; - -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Query; -import org.springframework.data.repository.query.Param; -import org.springframework.stereotype.Repository; - -/** - * Spring Data repository for the Membership entity. - */ -@SuppressWarnings("unused") -@Repository -public interface MembershipRepository extends JpaRepository, JpaSpecificationExecutor { - - @Query("SELECT CASE WHEN COUNT(m)> 0 THEN TRUE ELSE FALSE END " + - " FROM Membership m WHERE m.customer.id=:customerId AND m.memberUntilDate IS NULL") - boolean hasUncancelledMembershipForCustomer(@Param("customerId") final long customerId); -} diff --git a/src/main/java/org/hostsharing/hsadminng/repository/PersistenceAuditEventRepository.java b/src/main/java/org/hostsharing/hsadminng/repository/PersistenceAuditEventRepository.java deleted file mode 100644 index 18e367cc..00000000 --- a/src/main/java/org/hostsharing/hsadminng/repository/PersistenceAuditEventRepository.java +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import org.hostsharing.hsadminng.domain.PersistentAuditEvent; - -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.repository.JpaRepository; - -import java.time.Instant; -import java.util.List; - -/** - * Spring Data JPA repository for the PersistentAuditEvent entity. - */ -public interface PersistenceAuditEventRepository extends JpaRepository { - - List findByPrincipal(String principal); - - List findByAuditEventDateAfter(Instant after); - - List findByPrincipalAndAuditEventDateAfter(String principal, Instant after); - - List findByPrincipalAndAuditEventDateAfterAndAuditEventType( - String principal, - Instant after, - String type); - - Page findAllByAuditEventDateBetween(Instant fromDate, Instant toDate, Pageable pageable); -} diff --git a/src/main/java/org/hostsharing/hsadminng/repository/SepaMandateRepository.java b/src/main/java/org/hostsharing/hsadminng/repository/SepaMandateRepository.java deleted file mode 100644 index d1ad0459..00000000 --- a/src/main/java/org/hostsharing/hsadminng/repository/SepaMandateRepository.java +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import org.hostsharing.hsadminng.domain.SepaMandate; - -import org.springframework.data.jpa.repository.*; -import org.springframework.stereotype.Repository; - -/** - * Spring Data repository for the SepaMandate entity. - */ -@SuppressWarnings("unused") -@Repository -public interface SepaMandateRepository extends JpaRepository, JpaSpecificationExecutor { - -} diff --git a/src/main/java/org/hostsharing/hsadminng/repository/ShareRepository.java b/src/main/java/org/hostsharing/hsadminng/repository/ShareRepository.java deleted file mode 100644 index 12cd086e..00000000 --- a/src/main/java/org/hostsharing/hsadminng/repository/ShareRepository.java +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import org.hostsharing.hsadminng.domain.Share; - -import org.springframework.data.jpa.repository.*; -import org.springframework.stereotype.Repository; - -/** - * Spring Data repository for the Share entity. - */ -@SuppressWarnings("unused") -@Repository -public interface ShareRepository extends JpaRepository, JpaSpecificationExecutor { - -} diff --git a/src/main/java/org/hostsharing/hsadminng/repository/UserRepository.java b/src/main/java/org/hostsharing/hsadminng/repository/UserRepository.java deleted file mode 100644 index f91ff561..00000000 --- a/src/main/java/org/hostsharing/hsadminng/repository/UserRepository.java +++ /dev/null @@ -1,49 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import org.hostsharing.hsadminng.domain.User; - -import org.springframework.cache.annotation.Cacheable; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.repository.EntityGraph; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -import java.time.Instant; -import java.util.List; -import java.util.Optional; - -/** - * Spring Data JPA repository for the User entity. - */ -@Repository -public interface UserRepository extends JpaRepository { - - String USERS_BY_LOGIN_CACHE = "usersByLogin"; - - String USERS_BY_EMAIL_CACHE = "usersByEmail"; - - Optional findOneByActivationKey(String activationKey); - - List findAllByActivatedIsFalseAndCreatedDateBefore(Instant dateTime); - - Optional findOneByResetKey(String resetKey); - - Optional findOneByEmailIgnoreCase(String email); - - Optional findOneByLogin(String login); - - @EntityGraph(attributePaths = "authorities") - Optional findOneWithAuthoritiesById(Long id); - - @EntityGraph(attributePaths = "authorities") - @Cacheable(cacheNames = USERS_BY_LOGIN_CACHE) - Optional findOneWithAuthoritiesByLogin(String login); - - @EntityGraph(attributePaths = "authorities") - @Cacheable(cacheNames = USERS_BY_EMAIL_CACHE) - Optional findOneWithAuthoritiesByEmail(String email); - - Page findAllByLoginNot(Pageable pageable, String login); -} diff --git a/src/main/java/org/hostsharing/hsadminng/repository/UserRoleAssignmentRepository.java b/src/main/java/org/hostsharing/hsadminng/repository/UserRoleAssignmentRepository.java deleted file mode 100644 index 0fdf64c9..00000000 --- a/src/main/java/org/hostsharing/hsadminng/repository/UserRoleAssignmentRepository.java +++ /dev/null @@ -1,32 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import org.hostsharing.hsadminng.domain.UserRoleAssignment; - -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.data.jpa.repository.*; -import org.springframework.data.repository.query.Param; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * Spring Data repository for the UserRoleAssignment entity. - */ -@SuppressWarnings("unused") -@Repository -public interface UserRoleAssignmentRepository - extends JpaRepository, JpaSpecificationExecutor { - - String CURRENT_USER_ROLE_ASSIGNMENTS_CACHE = "currentUserRoleAssignments"; - - // TODO mhoennig: optimize with query by id - @Cacheable(CURRENT_USER_ROLE_ASSIGNMENTS_CACHE) - @Query("select user_role_assignment from UserRoleAssignment user_role_assignment where user_role_assignment.user.login = :login") - List findByLogin(@Param("login") final String login); - - @CacheEvict(value = CURRENT_USER_ROLE_ASSIGNMENTS_CACHE, allEntries = true) - default void evictCache() { - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/repository/package-info.java b/src/main/java/org/hostsharing/hsadminng/repository/package-info.java deleted file mode 100644 index 12710c57..00000000 --- a/src/main/java/org/hostsharing/hsadminng/repository/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Spring Data JPA repositories. - */ -package org.hostsharing.hsadminng.repository; diff --git a/src/main/java/org/hostsharing/hsadminng/security/AuthoritiesConstants.java b/src/main/java/org/hostsharing/hsadminng/security/AuthoritiesConstants.java deleted file mode 100644 index 6df501ec..00000000 --- a/src/main/java/org/hostsharing/hsadminng/security/AuthoritiesConstants.java +++ /dev/null @@ -1,21 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.security; - -/** - * Constants for Spring Security authorities. - */ -public final class AuthoritiesConstants { - - public static final String HOSTMASTER = "ROLE_HOSTMASTER"; - - public static final String ADMIN = "ROLE_ADMIN"; - - public static final String SUPPORTER = "ROLE_SUPPORTER"; - - public static final String USER = "ROLE_USER"; - - public static final String ANONYMOUS = "ROLE_ANONYMOUS"; - - private AuthoritiesConstants() { - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/security/DomainUserDetailsService.java b/src/main/java/org/hostsharing/hsadminng/security/DomainUserDetailsService.java deleted file mode 100644 index 570f0449..00000000 --- a/src/main/java/org/hostsharing/hsadminng/security/DomainUserDetailsService.java +++ /dev/null @@ -1,67 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.security; - -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.repository.UserRepository; - -import org.hibernate.validator.internal.constraintvalidators.hv.EmailValidator; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.SimpleGrantedAuthority; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; - -import java.util.*; -import java.util.stream.Collectors; - -/** - * Authenticate a user from the database. - */ -@Component("userDetailsService") -public class DomainUserDetailsService implements UserDetailsService { - - private final Logger log = LoggerFactory.getLogger(DomainUserDetailsService.class); - - private final UserRepository userRepository; - - public DomainUserDetailsService(UserRepository userRepository) { - this.userRepository = userRepository; - } - - @Override - @Transactional - public UserDetails loadUserByUsername(final String login) { - log.debug("Authenticating {}", login); - - if (new EmailValidator().isValid(login, null)) { - return userRepository.findOneWithAuthoritiesByEmail(login) - .map(user -> createSpringSecurityUser(login, user)) - .orElseThrow( - () -> new UsernameNotFoundException("User with email " + login + " was not found in the database")); - } - - String lowercaseLogin = login.toLowerCase(Locale.ENGLISH); - return userRepository.findOneWithAuthoritiesByLogin(lowercaseLogin) - .map(user -> createSpringSecurityUser(lowercaseLogin, user)) - .orElseThrow(() -> new UsernameNotFoundException("User " + lowercaseLogin + " was not found in the database")); - - } - - private org.springframework.security.core.userdetails.User createSpringSecurityUser(String lowercaseLogin, User user) { - if (!user.getActivated()) { - throw new UserNotActivatedException("User " + lowercaseLogin + " was not activated"); - } - List grantedAuthorities = user.getAuthorities() - .stream() - .map(authority -> new SimpleGrantedAuthority(authority.getName())) - .collect(Collectors.toList()); - return new org.springframework.security.core.userdetails.User( - user.getLogin(), - user.getPassword(), - grantedAuthorities); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/security/SecurityUtils.java b/src/main/java/org/hostsharing/hsadminng/security/SecurityUtils.java deleted file mode 100644 index 1096009e..00000000 --- a/src/main/java/org/hostsharing/hsadminng/security/SecurityUtils.java +++ /dev/null @@ -1,88 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.security; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.core.context.SecurityContext; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.core.userdetails.UserDetails; - -import java.util.Optional; - -/** - * Utility class for Spring Security. - */ -public final class SecurityUtils { - - private static final Logger log = LoggerFactory.getLogger(SecurityUtils.class); - - private SecurityUtils() { - } - - /** - * Get the login of the current user. - * - * @return the login of the current user - */ - public static Optional getCurrentUserLogin() { - SecurityContext securityContext = SecurityContextHolder.getContext(); - return Optional.ofNullable(securityContext.getAuthentication()) - .map(authentication -> { - if (authentication.getPrincipal() instanceof UserDetails) { - UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal(); - return springSecurityUser.getUsername(); - } else if (authentication.getPrincipal() instanceof String) { - return (String) authentication.getPrincipal(); - } - return null; - }); - } - - /** - * Get the JWT of the current user. - * - * @return the JWT of the current user - */ - public static Optional getCurrentUserJWT() { - SecurityContext securityContext = SecurityContextHolder.getContext(); - return Optional.ofNullable(securityContext.getAuthentication()) - .filter(authentication -> authentication.getCredentials() instanceof String) - .map(authentication -> (String) authentication.getCredentials()); - } - - /** - * Check if a user is authenticated. - * - * @return true if the user is authenticated, false otherwise - */ - public static boolean isAuthenticated() { - SecurityContext securityContext = SecurityContextHolder.getContext(); - return Optional.ofNullable(securityContext.getAuthentication()) - .map( - authentication -> authentication.getAuthorities() - .stream() - .noneMatch( - grantedAuthority -> grantedAuthority.getAuthority() - .equals(AuthoritiesConstants.ANONYMOUS))) - .orElse(false); - } - - /** - * If the current user has a specific authority (security role). - *

- * The name of this method comes from the isUserInRole() method in the Servlet API - * - * @param authority the authority to check - * @return true if the current user has the authority, false otherwise - */ - public static boolean isCurrentUserInRole(String authority) { - SecurityContext securityContext = SecurityContextHolder.getContext(); - final Boolean isCurrentUserInRole = Optional.ofNullable(securityContext.getAuthentication()) - .map( - authentication -> authentication.getAuthorities() - .stream() - .anyMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(authority))) - .orElse(false); - return isCurrentUserInRole; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/security/SpringSecurityAuditorAware.java b/src/main/java/org/hostsharing/hsadminng/security/SpringSecurityAuditorAware.java deleted file mode 100644 index f187f01e..00000000 --- a/src/main/java/org/hostsharing/hsadminng/security/SpringSecurityAuditorAware.java +++ /dev/null @@ -1,21 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.security; - -import org.hostsharing.hsadminng.config.Constants; - -import org.springframework.data.domain.AuditorAware; -import org.springframework.stereotype.Component; - -import java.util.Optional; - -/** - * Implementation of AuditorAware based on Spring Security. - */ -@Component -public class SpringSecurityAuditorAware implements AuditorAware { - - @Override - public Optional getCurrentAuditor() { - return Optional.of(SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT)); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/security/UserNotActivatedException.java b/src/main/java/org/hostsharing/hsadminng/security/UserNotActivatedException.java deleted file mode 100644 index 0a94d4e3..00000000 --- a/src/main/java/org/hostsharing/hsadminng/security/UserNotActivatedException.java +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.security; - -import org.springframework.security.core.AuthenticationException; - -/** - * This exception is thrown in case of a not activated user trying to authenticate. - */ -public class UserNotActivatedException extends AuthenticationException { - - private static final long serialVersionUID = 1L; - - public UserNotActivatedException(String message) { - super(message); - } - - public UserNotActivatedException(String message, Throwable t) { - super(message, t); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/security/jwt/JWTConfigurer.java b/src/main/java/org/hostsharing/hsadminng/security/jwt/JWTConfigurer.java deleted file mode 100644 index 5e4af8c8..00000000 --- a/src/main/java/org/hostsharing/hsadminng/security/jwt/JWTConfigurer.java +++ /dev/null @@ -1,22 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.security.jwt; - -import org.springframework.security.config.annotation.SecurityConfigurerAdapter; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.web.DefaultSecurityFilterChain; -import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; - -public class JWTConfigurer extends SecurityConfigurerAdapter { - - private TokenProvider tokenProvider; - - public JWTConfigurer(TokenProvider tokenProvider) { - this.tokenProvider = tokenProvider; - } - - @Override - public void configure(HttpSecurity http) throws Exception { - JWTFilter customFilter = new JWTFilter(tokenProvider); - http.addFilterBefore(customFilter, UsernamePasswordAuthenticationFilter.class); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/security/jwt/JWTFilter.java b/src/main/java/org/hostsharing/hsadminng/security/jwt/JWTFilter.java deleted file mode 100644 index 1eed81b8..00000000 --- a/src/main/java/org/hostsharing/hsadminng/security/jwt/JWTFilter.java +++ /dev/null @@ -1,50 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.security.jwt; - -import org.springframework.security.core.Authentication; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.util.StringUtils; -import org.springframework.web.filter.GenericFilterBean; - -import java.io.IOException; - -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; - -/** - * Filters incoming requests and installs a Spring Security principal if a header corresponding to a valid user is - * found. - */ -public class JWTFilter extends GenericFilterBean { - - public static final String AUTHORIZATION_HEADER = "Authorization"; - - private TokenProvider tokenProvider; - - public JWTFilter(TokenProvider tokenProvider) { - this.tokenProvider = tokenProvider; - } - - @Override - public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) - throws IOException, ServletException { - HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest; - String jwt = resolveToken(httpServletRequest); - if (StringUtils.hasText(jwt) && this.tokenProvider.validateToken(jwt)) { - Authentication authentication = this.tokenProvider.getAuthentication(jwt); - SecurityContextHolder.getContext().setAuthentication(authentication); - } - filterChain.doFilter(servletRequest, servletResponse); - } - - private String resolveToken(HttpServletRequest request) { - String bearerToken = request.getHeader(AUTHORIZATION_HEADER); - if (StringUtils.hasText(bearerToken) && bearerToken.startsWith("Bearer ")) { - return bearerToken.substring(7); - } - return null; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/security/jwt/TokenProvider.java b/src/main/java/org/hostsharing/hsadminng/security/jwt/TokenProvider.java deleted file mode 100644 index ff315141..00000000 --- a/src/main/java/org/hostsharing/hsadminng/security/jwt/TokenProvider.java +++ /dev/null @@ -1,123 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.security.jwt; - -import io.github.jhipster.config.JHipsterProperties; -import io.jsonwebtoken.*; -import io.jsonwebtoken.io.Decoders; -import io.jsonwebtoken.security.Keys; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.SimpleGrantedAuthority; -import org.springframework.security.core.userdetails.User; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; - -import java.nio.charset.StandardCharsets; -import java.security.Key; -import java.util.*; -import java.util.stream.Collectors; - -import javax.annotation.PostConstruct; - -@Component -public class TokenProvider { - - private final Logger log = LoggerFactory.getLogger(TokenProvider.class); - - private static final String AUTHORITIES_KEY = "auth"; - - private Key key; - - private long tokenValidityInMilliseconds; - - private long tokenValidityInMillisecondsForRememberMe; - - private final JHipsterProperties jHipsterProperties; - - public TokenProvider(JHipsterProperties jHipsterProperties) { - this.jHipsterProperties = jHipsterProperties; - } - - @PostConstruct - public void init() { - byte[] keyBytes; - String secret = jHipsterProperties.getSecurity().getAuthentication().getJwt().getSecret(); - if (!StringUtils.isEmpty(secret)) { - log.warn( - "Warning: the JWT key used is not Base64-encoded. " + - "We recommend using the `jhipster.security.authentication.jwt.base64-secret` key for optimum security."); - keyBytes = secret.getBytes(StandardCharsets.UTF_8); - } else { - log.debug("Using a Base64-encoded JWT secret key"); - keyBytes = Decoders.BASE64.decode(jHipsterProperties.getSecurity().getAuthentication().getJwt().getBase64Secret()); - } - this.key = Keys.hmacShaKeyFor(keyBytes); - this.tokenValidityInMilliseconds = 1000 - * jHipsterProperties.getSecurity().getAuthentication().getJwt().getTokenValidityInSeconds(); - this.tokenValidityInMillisecondsForRememberMe = 1000 * jHipsterProperties.getSecurity() - .getAuthentication() - .getJwt() - .getTokenValidityInSecondsForRememberMe(); - } - - public String createToken(Authentication authentication, boolean rememberMe) { - String authorities = authentication.getAuthorities() - .stream() - .map(GrantedAuthority::getAuthority) - .collect(Collectors.joining(",")); - - long now = (new Date()).getTime(); - Date validity; - if (rememberMe) { - validity = new Date(now + this.tokenValidityInMillisecondsForRememberMe); - } else { - validity = new Date(now + this.tokenValidityInMilliseconds); - } - - return Jwts.builder() - .setSubject(authentication.getName()) - .claim(AUTHORITIES_KEY, authorities) - .signWith(key, SignatureAlgorithm.HS512) - .setExpiration(validity) - .compact(); - } - - public Authentication getAuthentication(String token) { - Claims claims = Jwts.parser() - .setSigningKey(key) - .parseClaimsJws(token) - .getBody(); - - Collection authorities = Arrays.stream(claims.get(AUTHORITIES_KEY).toString().split(",")) - .map(SimpleGrantedAuthority::new) - .collect(Collectors.toList()); - - User principal = new User(claims.getSubject(), "", authorities); - - return new UsernamePasswordAuthenticationToken(principal, token, authorities); - } - - public boolean validateToken(String authToken) { - try { - Jwts.parser().setSigningKey(key).parseClaimsJws(authToken); - return true; - } catch (io.jsonwebtoken.security.SecurityException | MalformedJwtException e) { - log.info("Invalid JWT signature."); - log.trace("Invalid JWT signature trace: {}", e); - } catch (ExpiredJwtException e) { - log.info("Expired JWT token."); - log.trace("Expired JWT token trace: {}", e); - } catch (UnsupportedJwtException e) { - log.info("Unsupported JWT token."); - log.trace("Unsupported JWT token trace: {}", e); - } catch (IllegalArgumentException e) { - log.info("JWT token compact of handler are invalid."); - log.trace("JWT token compact of handler are invalid trace: {}", e); - } - return false; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/security/package-info.java b/src/main/java/org/hostsharing/hsadminng/security/package-info.java deleted file mode 100644 index 9df55cbb..00000000 --- a/src/main/java/org/hostsharing/hsadminng/security/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Spring Security configuration. - */ -package org.hostsharing.hsadminng.security; diff --git a/src/main/java/org/hostsharing/hsadminng/service/AssetQueryService.java b/src/main/java/org/hostsharing/hsadminng/service/AssetQueryService.java deleted file mode 100644 index 3e869f24..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/AssetQueryService.java +++ /dev/null @@ -1,120 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.*; -import org.hostsharing.hsadminng.domain.Asset; -import org.hostsharing.hsadminng.repository.AssetRepository; -import org.hostsharing.hsadminng.service.dto.AssetCriteria; -import org.hostsharing.hsadminng.service.dto.AssetDTO; -import org.hostsharing.hsadminng.service.mapper.AssetMapper; - -import io.github.jhipster.service.QueryService; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.domain.Specification; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -import javax.persistence.criteria.JoinType; - -/** - * Service for executing complex queries for Asset entities in the database. - * The main input is a {@link AssetCriteria} which gets converted to {@link Specification}, - * in a way that all the filters must apply. - * It returns a {@link List} of {@link AssetDTO} or a {@link Page} of {@link AssetDTO} which fulfills the criteria. - */ -@Service -@Transactional(readOnly = true) -public class AssetQueryService extends QueryService { - - private final Logger log = LoggerFactory.getLogger(AssetQueryService.class); - - private final AssetRepository assetRepository; - - private final AssetMapper assetMapper; - - public AssetQueryService(AssetRepository assetRepository, AssetMapper assetMapper) { - this.assetRepository = assetRepository; - this.assetMapper = assetMapper; - } - - /** - * Return a {@link List} of {@link AssetDTO} which matches the criteria from the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @return the matching entities. - */ - @Transactional(readOnly = true) - public List findByCriteria(AssetCriteria criteria) { - log.debug("find by criteria : {}", criteria); - final Specification specification = createSpecification(criteria); - return assetMapper.toDto(assetRepository.findAll(specification)); - } - - /** - * Return a {@link Page} of {@link AssetDTO} which matches the criteria from the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @param page The page, which should be returned. - * @return the matching entities. - */ - @Transactional(readOnly = true) - public Page findByCriteria(AssetCriteria criteria, Pageable page) { - log.debug("find by criteria : {}, page: {}", criteria, page); - final Specification specification = createSpecification(criteria); - return assetRepository.findAll(specification, page) - .map(assetMapper::toDto); - } - - /** - * Return the number of matching entities in the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @return the number of matching entities. - */ - @Transactional(readOnly = true) - public long countByCriteria(AssetCriteria criteria) { - log.debug("count by criteria : {}", criteria); - final Specification specification = createSpecification(criteria); - return assetRepository.count(specification); - } - - /** - * Function to convert AssetCriteria to a {@link Specification} - */ - private Specification createSpecification(AssetCriteria criteria) { - Specification specification = Specification.where(null); - if (criteria != null) { - if (criteria.getId() != null) { - specification = specification.and(buildSpecification(criteria.getId(), Asset_.id)); - } - if (criteria.getDocumentDate() != null) { - specification = specification.and(buildRangeSpecification(criteria.getDocumentDate(), Asset_.documentDate)); - } - if (criteria.getValueDate() != null) { - specification = specification.and(buildRangeSpecification(criteria.getValueDate(), Asset_.valueDate)); - } - if (criteria.getAction() != null) { - specification = specification.and(buildSpecification(criteria.getAction(), Asset_.action)); - } - if (criteria.getAmount() != null) { - specification = specification.and(buildRangeSpecification(criteria.getAmount(), Asset_.amount)); - } - if (criteria.getRemark() != null) { - specification = specification.and(buildStringSpecification(criteria.getRemark(), Asset_.remark)); - } - if (criteria.getMembershipId() != null) { - specification = specification.and( - buildSpecification( - criteria.getMembershipId(), - root -> root.join(Asset_.membership, JoinType.LEFT).get(Membership_.id))); - } - } - return specification; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/AssetService.java b/src/main/java/org/hostsharing/hsadminng/service/AssetService.java deleted file mode 100644 index f7b71120..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/AssetService.java +++ /dev/null @@ -1,100 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.Asset; -import org.hostsharing.hsadminng.repository.AssetRepository; -import org.hostsharing.hsadminng.service.dto.AssetDTO; -import org.hostsharing.hsadminng.service.mapper.AssetMapper; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Optional; - -import javax.persistence.EntityManager; - -/** - * Service Implementation for managing Asset. - */ -@Service -@Transactional -public class AssetService implements IdToDtoResolver { - - private final Logger log = LoggerFactory.getLogger(AssetService.class); - - private final EntityManager em; - - private final AssetRepository assetRepository; - - private final AssetMapper assetMapper; - private final AssetValidator assetValidator; - - public AssetService( - final EntityManager em, - final AssetRepository assetRepository, - final AssetMapper assetMapper, - final AssetValidator assetValidator) { - this.em = em; - this.assetRepository = assetRepository; - this.assetMapper = assetMapper; - this.assetValidator = assetValidator; - } - - /** - * Save a asset. - * - * @param assetDTO the entity to save - * @return the persisted entity - */ - public AssetDTO save(AssetDTO assetDTO) { - log.debug("Request to save Asset : {}", assetDTO); - assetValidator.validate(assetDTO); - Asset asset = assetMapper.toEntity(assetDTO); - asset = assetRepository.save(asset); - em.flush(); - em.refresh(asset); - return assetMapper.toDto(asset); - } - - /** - * Get all the assets. - * - * @param pageable the pagination information - * @return the list of entities - */ - @Transactional(readOnly = true) - public Page findAll(Pageable pageable) { - log.debug("Request to get all Assets"); - return assetRepository.findAll(pageable) - .map(assetMapper::toDto); - } - - /** - * Get one asset by id. - * - * @param id the id of the entity - * @return the entity - */ - @Transactional(readOnly = true) - public Optional findOne(Long id) { - log.debug("Request to get Asset : {}", id); - return assetRepository.findById(id) - .map(assetMapper::toDto); - } - - /** - * Delete the asset by id. - * - * @param id the id of the entity - */ - public void delete(Long id) { - log.debug("Request to delete Asset : {}", id); - - throw new BadRequestAlertException("Asset transactions are immutable", Asset.ENTITY_NAME, "assetTransactionImmutable"); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/AssetValidator.java b/src/main/java/org/hostsharing/hsadminng/service/AssetValidator.java deleted file mode 100644 index 1d0f9620..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/AssetValidator.java +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.Asset; -import org.hostsharing.hsadminng.domain.enumeration.AssetAction; -import org.hostsharing.hsadminng.service.dto.AssetDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.springframework.stereotype.Service; - -import java.math.BigDecimal; - -@Service -public class AssetValidator { - - public void validate(final AssetDTO assetDTO) { - if (assetDTO.getId() != null) { - throw new BadRequestAlertException( - "Asset transactions are immutable", - Asset.ENTITY_NAME, - "assetTransactionImmutable"); - } - - if (assetDTO.getDocumentDate().isAfter(assetDTO.getValueDate())) { - throw new BadRequestAlertException( - "Document date may not be after value date", - Asset.ENTITY_NAME, - "documentDateMayNotBeAfterValueDate"); - } - - if ((assetDTO.getAction() == AssetAction.PAYMENT) && (assetDTO.getAmount().compareTo(BigDecimal.valueOf(0)) <= 0)) { - throw new BadRequestAlertException( - "Asset payments require a positive amount", - Asset.ENTITY_NAME, - "assetPaymentsPositiveAmount"); - } - if ((assetDTO.getAction() == AssetAction.ADOPTION) && (assetDTO.getAmount().compareTo(BigDecimal.valueOf(0)) <= 0)) { - throw new BadRequestAlertException( - "Asset adoptions require a positive amount", - Asset.ENTITY_NAME, - "assetAdoptionsPositiveAmount"); - } - - if ((assetDTO.getAction() == AssetAction.PAYBACK) && (assetDTO.getAmount().compareTo(BigDecimal.valueOf(0)) >= 0)) { - throw new BadRequestAlertException( - "Asset paybacks require a negative amount", - Asset.ENTITY_NAME, - "assetPaybacksNegativeAmount"); - } - if ((assetDTO.getAction() == AssetAction.HANDOVER) && (assetDTO.getAmount().compareTo(BigDecimal.valueOf(0)) >= 0)) { - throw new BadRequestAlertException( - "Asset handovers require a negative amount", - Asset.ENTITY_NAME, - "assetHandoversNegativeAmount"); - } - if ((assetDTO.getAction() == AssetAction.LOSS) && (assetDTO.getAmount().compareTo(BigDecimal.valueOf(0)) >= 0)) { - throw new BadRequestAlertException( - "Asset losses require a negative amount", - Asset.ENTITY_NAME, - "assetLossesNegativeAmount"); - } - if ((assetDTO.getAction() == AssetAction.CLEARING) && (assetDTO.getAmount().compareTo(BigDecimal.valueOf(0)) >= 0)) { - throw new BadRequestAlertException( - "Asset clearings require a negative amount", - Asset.ENTITY_NAME, - "assetClearingsNegativeAmount"); - } - - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/AuditEventService.java b/src/main/java/org/hostsharing/hsadminng/service/AuditEventService.java deleted file mode 100644 index b41fb9c2..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/AuditEventService.java +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.config.audit.AuditEventConverter; -import org.hostsharing.hsadminng.repository.PersistenceAuditEventRepository; - -import org.springframework.boot.actuate.audit.AuditEvent; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.time.Instant; -import java.util.Optional; - -/** - * Service for managing audit events. - *

- * This is the default implementation to support SpringBoot Actuator AuditEventRepository - */ -@Service -@Transactional -public class AuditEventService { - - private final PersistenceAuditEventRepository persistenceAuditEventRepository; - - private final AuditEventConverter auditEventConverter; - - public AuditEventService( - PersistenceAuditEventRepository persistenceAuditEventRepository, - AuditEventConverter auditEventConverter) { - - this.persistenceAuditEventRepository = persistenceAuditEventRepository; - this.auditEventConverter = auditEventConverter; - } - - public Page findAll(Pageable pageable) { - return persistenceAuditEventRepository.findAll(pageable) - .map(auditEventConverter::convertToAuditEvent); - } - - public Page findByDates(Instant fromDate, Instant toDate, Pageable pageable) { - return persistenceAuditEventRepository.findAllByAuditEventDateBetween(fromDate, toDate, pageable) - .map(auditEventConverter::convertToAuditEvent); - } - - public Optional find(Long id) { - return Optional.ofNullable(persistenceAuditEventRepository.findById(id)) - .filter(Optional::isPresent) - .map(Optional::get) - .map(auditEventConverter::convertToAuditEvent); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/CustomerQueryService.java b/src/main/java/org/hostsharing/hsadminng/service/CustomerQueryService.java deleted file mode 100644 index b3352819..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/CustomerQueryService.java +++ /dev/null @@ -1,164 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.Customer_; -import org.hostsharing.hsadminng.domain.Membership_; -import org.hostsharing.hsadminng.domain.SepaMandate_; -import org.hostsharing.hsadminng.repository.CustomerRepository; -import org.hostsharing.hsadminng.service.dto.CustomerCriteria; -import org.hostsharing.hsadminng.service.dto.CustomerDTO; -import org.hostsharing.hsadminng.service.mapper.CustomerMapper; - -import io.github.jhipster.service.QueryService; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.domain.Specification; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -import javax.persistence.criteria.JoinType; - -/** - * Service for executing complex queries for Customer entities in the database. - * The main input is a {@link CustomerCriteria} which gets converted to {@link Specification}, - * in a way that all the filters must apply. - * It returns a {@link List} of {@link CustomerDTO} or a {@link Page} of {@link CustomerDTO} which fulfills the criteria. - */ -@Service -@Transactional(readOnly = true) -public class CustomerQueryService extends QueryService { - - private final Logger log = LoggerFactory.getLogger(CustomerQueryService.class); - - private final CustomerRepository customerRepository; - - private final CustomerMapper customerMapper; - - public CustomerQueryService(CustomerRepository customerRepository, CustomerMapper customerMapper) { - this.customerRepository = customerRepository; - this.customerMapper = customerMapper; - } - - /** - * Return a {@link List} of {@link CustomerDTO} which matches the criteria from the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @return the matching entities. - */ - @Transactional(readOnly = true) - public List findByCriteria(CustomerCriteria criteria) { - log.debug("find by criteria : {}", criteria); - final Specification specification = createSpecification(criteria); - return customerMapper.toDto(customerRepository.findAll(specification)); - } - - /** - * Return a {@link Page} of {@link CustomerDTO} which matches the criteria from the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @param page The page, which should be returned. - * @return the matching entities. - */ - @Transactional(readOnly = true) - public Page findByCriteria(CustomerCriteria criteria, Pageable page) { - log.debug("find by criteria : {}, page: {}", criteria, page); - final Specification specification = createSpecification(criteria); - return customerRepository.findAll(specification, page) - .map(customerMapper::toDto); - } - - /** - * Return the number of matching entities in the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @return the number of matching entities. - */ - @Transactional(readOnly = true) - public long countByCriteria(CustomerCriteria criteria) { - log.debug("count by criteria : {}", criteria); - final Specification specification = createSpecification(criteria); - return customerRepository.count(specification); - } - - /** - * Function to convert CustomerCriteria to a {@link Specification} - */ - private Specification createSpecification(CustomerCriteria criteria) { - Specification specification = Specification.where(null); - if (criteria != null) { - if (criteria.getId() != null) { - specification = specification.and(buildSpecification(criteria.getId(), Customer_.id)); - } - if (criteria.getReference() != null) { - specification = specification.and(buildRangeSpecification(criteria.getReference(), Customer_.reference)); - } - if (criteria.getPrefix() != null) { - specification = specification.and(buildStringSpecification(criteria.getPrefix(), Customer_.prefix)); - } - if (criteria.getName() != null) { - specification = specification.and(buildStringSpecification(criteria.getName(), Customer_.name)); - } - if (criteria.getKind() != null) { - specification = specification.and(buildSpecification(criteria.getKind(), Customer_.kind)); - } - if (criteria.getBirthDate() != null) { - specification = specification.and(buildRangeSpecification(criteria.getBirthDate(), Customer_.birthDate)); - } - if (criteria.getBirthPlace() != null) { - specification = specification.and(buildStringSpecification(criteria.getBirthPlace(), Customer_.birthPlace)); - } - if (criteria.getRegistrationCourt() != null) { - specification = specification - .and(buildStringSpecification(criteria.getRegistrationCourt(), Customer_.registrationCourt)); - } - if (criteria.getRegistrationNumber() != null) { - specification = specification - .and(buildStringSpecification(criteria.getRegistrationNumber(), Customer_.registrationNumber)); - } - if (criteria.getVatRegion() != null) { - specification = specification.and(buildSpecification(criteria.getVatRegion(), Customer_.vatRegion)); - } - if (criteria.getVatNumber() != null) { - specification = specification.and(buildStringSpecification(criteria.getVatNumber(), Customer_.vatNumber)); - } - if (criteria.getContractualSalutation() != null) { - specification = specification - .and(buildStringSpecification(criteria.getContractualSalutation(), Customer_.contractualSalutation)); - } - if (criteria.getContractualAddress() != null) { - specification = specification - .and(buildStringSpecification(criteria.getContractualAddress(), Customer_.contractualAddress)); - } - if (criteria.getBillingSalutation() != null) { - specification = specification - .and(buildStringSpecification(criteria.getBillingSalutation(), Customer_.billingSalutation)); - } - if (criteria.getBillingAddress() != null) { - specification = specification - .and(buildStringSpecification(criteria.getBillingAddress(), Customer_.billingAddress)); - } - if (criteria.getRemark() != null) { - specification = specification.and(buildStringSpecification(criteria.getRemark(), Customer_.remark)); - } - if (criteria.getMembershipId() != null) { - specification = specification.and( - buildSpecification( - criteria.getMembershipId(), - root -> root.join(Customer_.memberships, JoinType.LEFT).get(Membership_.id))); - } - if (criteria.getSepamandateId() != null) { - specification = specification.and( - buildSpecification( - criteria.getSepamandateId(), - root -> root.join(Customer_.sepamandates, JoinType.LEFT).get(SepaMandate_.id))); - } - } - return specification; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/CustomerService.java b/src/main/java/org/hostsharing/hsadminng/service/CustomerService.java deleted file mode 100644 index 48ffbc79..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/CustomerService.java +++ /dev/null @@ -1,84 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.repository.CustomerRepository; -import org.hostsharing.hsadminng.service.dto.CustomerDTO; -import org.hostsharing.hsadminng.service.mapper.CustomerMapper; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Optional; - -/** - * Service Implementation for managing Customer. - */ -@Service -@Transactional -public class CustomerService implements IdToDtoResolver { - - private final Logger log = LoggerFactory.getLogger(CustomerService.class); - - private final CustomerRepository customerRepository; - - private final CustomerMapper customerMapper; - - public CustomerService(CustomerRepository customerRepository, CustomerMapper customerMapper) { - this.customerRepository = customerRepository; - this.customerMapper = customerMapper; - } - - /** - * Save a customer. - * - * @param customerDTO the entity to save - * @return the persisted entity - */ - public CustomerDTO save(CustomerDTO customerDTO) { - log.debug("Request to save Customer : {}", customerDTO); - Customer customer = customerMapper.toEntity(customerDTO); - customer = customerRepository.save(customer); - return customerMapper.toDto(customer); - } - - /** - * Get all the customers. - * - * @param pageable the pagination information - * @return the list of entities - */ - @Transactional(readOnly = true) - public Page findAll(Pageable pageable) { - log.debug("Request to get all Customers"); - return customerRepository.findAll(pageable) - .map(customerMapper::toDto); - } - - /** - * Get one customer by id. - * - * @param id the id of the entity - * @return the entity - */ - @Transactional(readOnly = true) - public Optional findOne(Long id) { - log.debug("Request to get Customer : {}", id); - return customerRepository.findById(id) - .map(customerMapper::toDto); - } - - /** - * Delete the customer by id. - * - * @param id the id of the entity - */ - public void delete(Long id) { - log.debug("Request to delete Customer : {}", id); - customerRepository.deleteById(id); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/IdToDtoResolver.java b/src/main/java/org/hostsharing/hsadminng/service/IdToDtoResolver.java deleted file mode 100644 index 3b19c2ef..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/IdToDtoResolver.java +++ /dev/null @@ -1,9 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import java.util.Optional; - -public interface IdToDtoResolver { - - Optional findOne(Long id); -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/MailService.java b/src/main/java/org/hostsharing/hsadminng/service/MailService.java deleted file mode 100644 index 14575309..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/MailService.java +++ /dev/null @@ -1,115 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.User; - -import io.github.jhipster.config.JHipsterProperties; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.context.MessageSource; -import org.springframework.mail.javamail.JavaMailSender; -import org.springframework.mail.javamail.MimeMessageHelper; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Service; -import org.thymeleaf.context.Context; -import org.thymeleaf.spring5.SpringTemplateEngine; - -import java.nio.charset.StandardCharsets; -import java.util.Locale; - -import javax.mail.internet.MimeMessage; - -/** - * Service for sending emails. - *

- * We use the @Async annotation to send emails asynchronously. - */ -@Service -public class MailService { - - private final Logger log = LoggerFactory.getLogger(MailService.class); - - private static final String USER = "user"; - - private static final String BASE_URL = "baseUrl"; - - private final JHipsterProperties jHipsterProperties; - - private final JavaMailSender javaMailSender; - - private final MessageSource messageSource; - - private final SpringTemplateEngine templateEngine; - - public MailService( - JHipsterProperties jHipsterProperties, - JavaMailSender javaMailSender, - MessageSource messageSource, - SpringTemplateEngine templateEngine) { - - this.jHipsterProperties = jHipsterProperties; - this.javaMailSender = javaMailSender; - this.messageSource = messageSource; - this.templateEngine = templateEngine; - } - - @Async - public void sendEmail(String to, String subject, String content, boolean isMultipart, boolean isHtml) { - log.debug( - "Send email[multipart '{}' and html '{}'] to '{}' with subject '{}' and content={}", - isMultipart, - isHtml, - to, - subject, - content); - - // Prepare message using a Spring helper - MimeMessage mimeMessage = javaMailSender.createMimeMessage(); - try { - MimeMessageHelper message = new MimeMessageHelper(mimeMessage, isMultipart, StandardCharsets.UTF_8.name()); - message.setTo(to); - message.setFrom(jHipsterProperties.getMail().getFrom()); - message.setSubject(subject); - message.setText(content, isHtml); - javaMailSender.send(mimeMessage); - log.debug("Sent email to User '{}'", to); - } catch (Exception e) { - if (log.isDebugEnabled()) { - log.warn("Email could not be sent to user '{}'", to, e); - } else { - log.warn("Email could not be sent to user '{}': {}", to, e.getMessage()); - } - } - } - - @Async - public void sendEmailFromTemplate(User user, String templateName, String titleKey) { - Locale locale = Locale.forLanguageTag(user.getLangKey()); - Context context = new Context(locale); - context.setVariable(USER, user); - context.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl()); - String content = templateEngine.process(templateName, context); - String subject = messageSource.getMessage(titleKey, null, locale); - sendEmail(user.getEmail(), subject, content, false, true); - - } - - @Async - public void sendActivationEmail(User user) { - log.debug("Sending activation email to '{}'", user.getEmail()); - sendEmailFromTemplate(user, "mail/activationEmail", "email.activation.title"); - } - - @Async - public void sendCreationEmail(User user) { - log.debug("Sending creation email to '{}'", user.getEmail()); - sendEmailFromTemplate(user, "mail/creationEmail", "email.activation.title"); - } - - @Async - public void sendPasswordResetMail(User user) { - log.debug("Sending password reset email to '{}'", user.getEmail()); - sendEmailFromTemplate(user, "mail/passwordResetEmail", "email.reset.title"); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/MembershipQueryService.java b/src/main/java/org/hostsharing/hsadminng/service/MembershipQueryService.java deleted file mode 100644 index 0c42ffd2..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/MembershipQueryService.java +++ /dev/null @@ -1,135 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.*; -import org.hostsharing.hsadminng.repository.MembershipRepository; -import org.hostsharing.hsadminng.service.dto.MembershipCriteria; -import org.hostsharing.hsadminng.service.dto.MembershipDTO; -import org.hostsharing.hsadminng.service.mapper.MembershipMapper; - -import io.github.jhipster.service.QueryService; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.domain.Specification; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -import javax.persistence.criteria.JoinType; - -/** - * Service for executing complex queries for Membership entities in the database. - * The main input is a {@link MembershipCriteria} which gets converted to {@link Specification}, - * in a way that all the filters must apply. - * It returns a {@link List} of {@link MembershipDTO} or a {@link Page} of {@link MembershipDTO} which fulfills the criteria. - */ -@Service -@Transactional(readOnly = true) -public class MembershipQueryService extends QueryService { - - private final Logger log = LoggerFactory.getLogger(MembershipQueryService.class); - - private final MembershipRepository membershipRepository; - - private final MembershipMapper membershipMapper; - - public MembershipQueryService(MembershipRepository membershipRepository, MembershipMapper membershipMapper) { - this.membershipRepository = membershipRepository; - this.membershipMapper = membershipMapper; - } - - /** - * Return a {@link List} of {@link MembershipDTO} which matches the criteria from the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @return the matching entities. - */ - @Transactional(readOnly = true) - public List findByCriteria(MembershipCriteria criteria) { - log.debug("find by criteria : {}", criteria); - final Specification specification = createSpecification(criteria); - return membershipMapper.toDto(membershipRepository.findAll(specification)); - } - - /** - * Return a {@link Page} of {@link MembershipDTO} which matches the criteria from the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @param page The page, which should be returned. - * @return the matching entities. - */ - @Transactional(readOnly = true) - public Page findByCriteria(MembershipCriteria criteria, Pageable page) { - log.debug("find by criteria : {}, page: {}", criteria, page); - final Specification specification = createSpecification(criteria); - return membershipRepository.findAll(specification, page) - .map(membershipMapper::toDto); - } - - /** - * Return the number of matching entities in the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @return the number of matching entities. - */ - @Transactional(readOnly = true) - public long countByCriteria(MembershipCriteria criteria) { - log.debug("count by criteria : {}", criteria); - final Specification specification = createSpecification(criteria); - return membershipRepository.count(specification); - } - - /** - * Function to convert MembershipCriteria to a {@link Specification} - */ - private Specification createSpecification(MembershipCriteria criteria) { - Specification specification = Specification.where(null); - if (criteria != null) { - if (criteria.getId() != null) { - specification = specification.and(buildSpecification(criteria.getId(), Membership_.id)); - } - if (criteria.getAdmissionDocumentDate() != null) { - specification = specification - .and(buildRangeSpecification(criteria.getAdmissionDocumentDate(), Membership_.admissionDocumentDate)); - } - if (criteria.getCancellationDocumentDate() != null) { - specification = specification.and( - buildRangeSpecification(criteria.getCancellationDocumentDate(), Membership_.cancellationDocumentDate)); - } - if (criteria.getMemberFromDate() != null) { - specification = specification - .and(buildRangeSpecification(criteria.getMemberFromDate(), Membership_.memberFromDate)); - } - if (criteria.getMemberUntilDate() != null) { - specification = specification - .and(buildRangeSpecification(criteria.getMemberUntilDate(), Membership_.memberUntilDate)); - } - if (criteria.getRemark() != null) { - specification = specification.and(buildStringSpecification(criteria.getRemark(), Membership_.remark)); - } - if (criteria.getShareId() != null) { - specification = specification.and( - buildSpecification( - criteria.getShareId(), - root -> root.join(Membership_.shares, JoinType.LEFT).get(Share_.id))); - } - if (criteria.getAssetId() != null) { - specification = specification.and( - buildSpecification( - criteria.getAssetId(), - root -> root.join(Membership_.assets, JoinType.LEFT).get(Asset_.id))); - } - if (criteria.getCustomerId() != null) { - specification = specification.and( - buildSpecification( - criteria.getCustomerId(), - root -> root.join(Membership_.customer, JoinType.LEFT).get(Customer_.id))); - } - } - return specification; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/MembershipService.java b/src/main/java/org/hostsharing/hsadminng/service/MembershipService.java deleted file mode 100644 index 53f7a923..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/MembershipService.java +++ /dev/null @@ -1,103 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.repository.MembershipRepository; -import org.hostsharing.hsadminng.service.dto.MembershipDTO; -import org.hostsharing.hsadminng.service.mapper.MembershipMapper; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Optional; - -import javax.persistence.EntityManager; - -/** - * Service Implementation for managing Membership. - */ -@Service -@Transactional -public class MembershipService implements IdToDtoResolver { - - private final Logger log = LoggerFactory.getLogger(MembershipService.class); - - private final EntityManager em; - - private final MembershipValidator membershipValidator; - - private final MembershipRepository membershipRepository; - - private final MembershipMapper membershipMapper; - - public MembershipService( - final EntityManager em, - final MembershipValidator membershipValidator, - final MembershipRepository membershipRepository, - final MembershipMapper membershipMapper) { - this.em = em; - this.membershipValidator = membershipValidator; - this.membershipRepository = membershipRepository; - this.membershipMapper = membershipMapper; - } - - /** - * Save a membership. - * - * @param membershipDTO the entity to save - * @return the persisted entity - */ - public MembershipDTO save(MembershipDTO membershipDTO) { - log.debug("Request to save Membership : {}", membershipDTO); - - membershipValidator.validate(membershipDTO); - - Membership membership = membershipMapper.toEntity(membershipDTO); - membership = membershipRepository.save(membership); - em.flush(); - em.refresh(membership); - return membershipMapper.toDto(membership); - } - - /** - * Get all the memberships. - * - * @param pageable the pagination information - * @return the list of entities - */ - @Transactional(readOnly = true) - public Page findAll(Pageable pageable) { - log.debug("Request to get all Memberships"); - return membershipRepository.findAll(pageable) - .map(membershipMapper::toDto); - } - - /** - * Get one membership by id. - * - * @param id the id of the entity - * @return the entity - */ - @Override - @Transactional(readOnly = true) - public Optional findOne(Long id) { - log.debug("Request to get Membership : {}", id); - return membershipRepository.findById(id) - .map(membershipMapper::toDto); - } - - /** - * Prevent deleting a membership by id via service call. - * - * @param id the id of the entity - */ - public void delete(Long id) { - log.debug("Request to delete Membership : {}", id); - throw new BadRequestAlertException("Membership cannot be deleted", Membership.ENTITY_NAME, "membershipNotDeletable"); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/MembershipValidator.java b/src/main/java/org/hostsharing/hsadminng/service/MembershipValidator.java deleted file mode 100644 index 9d8a33ad..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/MembershipValidator.java +++ /dev/null @@ -1,33 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.repository.MembershipRepository; -import org.hostsharing.hsadminng.service.dto.MembershipDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class MembershipValidator { - - @Autowired - private MembershipRepository membershipRepository; - - public void validate(final MembershipDTO membershipDTO) { - if (membershipDTO.getMemberUntilDate() != null - && !membershipDTO.getMemberUntilDate().isAfter(membershipDTO.getMemberFromDate())) { - throw new BadRequestAlertException("Invalid untilDate", Membership.ENTITY_NAME, "untilDateMustBeAfterSinceDate"); - } - - // It's known that this validation can cause a race condition if two memberships of the same customer are saved at - // same time (overlapping transactions). This is ignored in this case because it's too unlikely to be worth the effort. - if (membershipRepository.hasUncancelledMembershipForCustomer(membershipDTO.getCustomerId())) { - throw new BadRequestAlertException( - "Another uncancelled membership exists", - Membership.ENTITY_NAME, - "anotherUncancelledMembershipExists"); - } - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/SepaMandateQueryService.java b/src/main/java/org/hostsharing/hsadminng/service/SepaMandateQueryService.java deleted file mode 100644 index ba0e34b6..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/SepaMandateQueryService.java +++ /dev/null @@ -1,138 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.Customer_; -import org.hostsharing.hsadminng.domain.SepaMandate; -import org.hostsharing.hsadminng.domain.SepaMandate_; -import org.hostsharing.hsadminng.repository.SepaMandateRepository; -import org.hostsharing.hsadminng.service.dto.SepaMandateCriteria; -import org.hostsharing.hsadminng.service.dto.SepaMandateDTO; -import org.hostsharing.hsadminng.service.mapper.SepaMandateMapper; - -import io.github.jhipster.service.QueryService; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.domain.Specification; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -import javax.persistence.criteria.JoinType; - -/** - * Service for executing complex queries for SepaMandate entities in the database. - * The main input is a {@link SepaMandateCriteria} which gets converted to {@link Specification}, - * in a way that all the filters must apply. - * It returns a {@link List} of {@link SepaMandateDTO} or a {@link Page} of {@link SepaMandateDTO} which fulfills the criteria. - */ -@Service -@Transactional(readOnly = true) -public class SepaMandateQueryService extends QueryService { - - private final Logger log = LoggerFactory.getLogger(SepaMandateQueryService.class); - - private final SepaMandateRepository sepaMandateRepository; - - private final SepaMandateMapper sepaMandateMapper; - - public SepaMandateQueryService(SepaMandateRepository sepaMandateRepository, SepaMandateMapper sepaMandateMapper) { - this.sepaMandateRepository = sepaMandateRepository; - this.sepaMandateMapper = sepaMandateMapper; - } - - /** - * Return a {@link List} of {@link SepaMandateDTO} which matches the criteria from the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @return the matching entities. - */ - @Transactional(readOnly = true) - public List findByCriteria(SepaMandateCriteria criteria) { - log.debug("find by criteria : {}", criteria); - final Specification specification = createSpecification(criteria); - return sepaMandateMapper.toDto(sepaMandateRepository.findAll(specification)); - } - - /** - * Return a {@link Page} of {@link SepaMandateDTO} which matches the criteria from the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @param page The page, which should be returned. - * @return the matching entities. - */ - @Transactional(readOnly = true) - public Page findByCriteria(SepaMandateCriteria criteria, Pageable page) { - log.debug("find by criteria : {}, page: {}", criteria, page); - final Specification specification = createSpecification(criteria); - return sepaMandateRepository.findAll(specification, page) - .map(sepaMandateMapper::toDto); - } - - /** - * Return the number of matching entities in the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @return the number of matching entities. - */ - @Transactional(readOnly = true) - public long countByCriteria(SepaMandateCriteria criteria) { - log.debug("count by criteria : {}", criteria); - final Specification specification = createSpecification(criteria); - return sepaMandateRepository.count(specification); - } - - /** - * Function to convert SepaMandateCriteria to a {@link Specification} - */ - private Specification createSpecification(SepaMandateCriteria criteria) { - Specification specification = Specification.where(null); - if (criteria != null) { - if (criteria.getId() != null) { - specification = specification.and(buildSpecification(criteria.getId(), SepaMandate_.id)); - } - if (criteria.getReference() != null) { - specification = specification.and(buildStringSpecification(criteria.getReference(), SepaMandate_.reference)); - } - if (criteria.getIban() != null) { - specification = specification.and(buildStringSpecification(criteria.getIban(), SepaMandate_.iban)); - } - if (criteria.getBic() != null) { - specification = specification.and(buildStringSpecification(criteria.getBic(), SepaMandate_.bic)); - } - if (criteria.getGrantingDocumentDate() != null) { - specification = specification - .and(buildRangeSpecification(criteria.getGrantingDocumentDate(), SepaMandate_.grantingDocumentDate)); - } - if (criteria.getRevokationDocumentDate() != null) { - specification = specification.and( - buildRangeSpecification(criteria.getRevokationDocumentDate(), SepaMandate_.revokationDocumentDate)); - } - if (criteria.getValidFromDate() != null) { - specification = specification - .and(buildRangeSpecification(criteria.getValidFromDate(), SepaMandate_.validFromDate)); - } - if (criteria.getValidUntilDate() != null) { - specification = specification - .and(buildRangeSpecification(criteria.getValidUntilDate(), SepaMandate_.validUntilDate)); - } - if (criteria.getLastUsedDate() != null) { - specification = specification - .and(buildRangeSpecification(criteria.getLastUsedDate(), SepaMandate_.lastUsedDate)); - } - if (criteria.getRemark() != null) { - specification = specification.and(buildStringSpecification(criteria.getRemark(), SepaMandate_.remark)); - } - if (criteria.getCustomerId() != null) { - specification = specification.and( - buildSpecification( - criteria.getCustomerId(), - root -> root.join(SepaMandate_.customer, JoinType.LEFT).get(Customer_.id))); - } - } - return specification; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/SepaMandateService.java b/src/main/java/org/hostsharing/hsadminng/service/SepaMandateService.java deleted file mode 100644 index 41900658..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/SepaMandateService.java +++ /dev/null @@ -1,94 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.SepaMandate; -import org.hostsharing.hsadminng.repository.SepaMandateRepository; -import org.hostsharing.hsadminng.service.dto.SepaMandateDTO; -import org.hostsharing.hsadminng.service.mapper.SepaMandateMapper; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Optional; - -import javax.persistence.EntityManager; - -/** - * Service Implementation for managing SepaMandate. - */ -@Service -@Transactional -public class SepaMandateService implements IdToDtoResolver { - - private final Logger log = LoggerFactory.getLogger(SepaMandateService.class); - - private final EntityManager em; - - private final SepaMandateRepository sepaMandateRepository; - - private final SepaMandateMapper sepaMandateMapper; - - public SepaMandateService( - final EntityManager em, - final SepaMandateRepository sepaMandateRepository, - final SepaMandateMapper sepaMandateMapper) { - this.em = em; - this.sepaMandateRepository = sepaMandateRepository; - this.sepaMandateMapper = sepaMandateMapper; - } - - /** - * Save a sepaMandate. - * - * @param sepaMandateDTO the entity to save - * @return the persisted entity - */ - public SepaMandateDTO save(SepaMandateDTO sepaMandateDTO) { - log.debug("Request to save SepaMandate : {}", sepaMandateDTO); - SepaMandate sepaMandate = sepaMandateMapper.toEntity(sepaMandateDTO); - sepaMandate = sepaMandateRepository.save(sepaMandate); - em.flush(); - em.refresh(sepaMandate); - return sepaMandateMapper.toDto(sepaMandate); - } - - /** - * Get all the sepaMandates. - * - * @param pageable the pagination information - * @return the list of entities - */ - @Transactional(readOnly = true) - public Page findAll(Pageable pageable) { - log.debug("Request to get all SepaMandates"); - return sepaMandateRepository.findAll(pageable) - .map(sepaMandateMapper::toDto); - } - - /** - * Get one sepaMandate by id. - * - * @param id the id of the entity - * @return the entity - */ - @Transactional(readOnly = true) - public Optional findOne(Long id) { - log.debug("Request to get SepaMandate : {}", id); - return sepaMandateRepository.findById(id) - .map(sepaMandateMapper::toDto); - } - - /** - * Delete the sepaMandate by id. - * - * @param id the id of the entity - */ - public void delete(Long id) { - log.debug("Request to delete SepaMandate : {}", id); - sepaMandateRepository.deleteById(id); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/ShareQueryService.java b/src/main/java/org/hostsharing/hsadminng/service/ShareQueryService.java deleted file mode 100644 index 55f851e4..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/ShareQueryService.java +++ /dev/null @@ -1,120 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.*; -import org.hostsharing.hsadminng.domain.Share; -import org.hostsharing.hsadminng.repository.ShareRepository; -import org.hostsharing.hsadminng.service.dto.ShareCriteria; -import org.hostsharing.hsadminng.service.dto.ShareDTO; -import org.hostsharing.hsadminng.service.mapper.ShareMapper; - -import io.github.jhipster.service.QueryService; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.domain.Specification; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -import javax.persistence.criteria.JoinType; - -/** - * Service for executing complex queries for Share entities in the database. - * The main input is a {@link ShareCriteria} which gets converted to {@link Specification}, - * in a way that all the filters must apply. - * It returns a {@link List} of {@link ShareDTO} or a {@link Page} of {@link ShareDTO} which fulfills the criteria. - */ -@Service -@Transactional(readOnly = true) -public class ShareQueryService extends QueryService { - - private final Logger log = LoggerFactory.getLogger(ShareQueryService.class); - - private final ShareRepository shareRepository; - - private final ShareMapper shareMapper; - - public ShareQueryService(ShareRepository shareRepository, ShareMapper shareMapper) { - this.shareRepository = shareRepository; - this.shareMapper = shareMapper; - } - - /** - * Return a {@link List} of {@link ShareDTO} which matches the criteria from the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @return the matching entities. - */ - @Transactional(readOnly = true) - public List findByCriteria(ShareCriteria criteria) { - log.debug("find by criteria : {}", criteria); - final Specification specification = createSpecification(criteria); - return shareMapper.toDto(shareRepository.findAll(specification)); - } - - /** - * Return a {@link Page} of {@link ShareDTO} which matches the criteria from the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @param page The page, which should be returned. - * @return the matching entities. - */ - @Transactional(readOnly = true) - public Page findByCriteria(ShareCriteria criteria, Pageable page) { - log.debug("find by criteria : {}, page: {}", criteria, page); - final Specification specification = createSpecification(criteria); - return shareRepository.findAll(specification, page) - .map(shareMapper::toDto); - } - - /** - * Return the number of matching entities in the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @return the number of matching entities. - */ - @Transactional(readOnly = true) - public long countByCriteria(ShareCriteria criteria) { - log.debug("count by criteria : {}", criteria); - final Specification specification = createSpecification(criteria); - return shareRepository.count(specification); - } - - /** - * Function to convert ShareCriteria to a {@link Specification} - */ - private Specification createSpecification(ShareCriteria criteria) { - Specification specification = Specification.where(null); - if (criteria != null) { - if (criteria.getId() != null) { - specification = specification.and(buildSpecification(criteria.getId(), Share_.id)); - } - if (criteria.getDocumentDate() != null) { - specification = specification.and(buildRangeSpecification(criteria.getDocumentDate(), Share_.documentDate)); - } - if (criteria.getValueDate() != null) { - specification = specification.and(buildRangeSpecification(criteria.getValueDate(), Share_.valueDate)); - } - if (criteria.getAction() != null) { - specification = specification.and(buildSpecification(criteria.getAction(), Share_.action)); - } - if (criteria.getQuantity() != null) { - specification = specification.and(buildRangeSpecification(criteria.getQuantity(), Share_.quantity)); - } - if (criteria.getRemark() != null) { - specification = specification.and(buildStringSpecification(criteria.getRemark(), Share_.remark)); - } - if (criteria.getMembershipId() != null) { - specification = specification.and( - buildSpecification( - criteria.getMembershipId(), - root -> root.join(Share_.membership, JoinType.LEFT).get(Membership_.id))); - } - } - return specification; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/ShareService.java b/src/main/java/org/hostsharing/hsadminng/service/ShareService.java deleted file mode 100644 index d7aa137d..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/ShareService.java +++ /dev/null @@ -1,103 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.Share; -import org.hostsharing.hsadminng.repository.ShareRepository; -import org.hostsharing.hsadminng.service.dto.ShareDTO; -import org.hostsharing.hsadminng.service.mapper.ShareMapper; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Optional; - -import javax.persistence.EntityManager; - -/** - * Service Implementation for managing Share. - */ -@Service -@Transactional -public class ShareService implements IdToDtoResolver { - - private final Logger log = LoggerFactory.getLogger(ShareService.class); - - private final EntityManager em; - - private final ShareRepository shareRepository; - - private final ShareMapper shareMapper; - - private final ShareValidator shareValidator; - - public ShareService( - final EntityManager em, - final ShareRepository shareRepository, - final ShareMapper shareMapper, - final ShareValidator shareValidator) { - this.em = em; - this.shareRepository = shareRepository; - this.shareMapper = shareMapper; - this.shareValidator = shareValidator; - } - - /** - * Save a share. - * - * @param shareDTO the entity to save - * @return the persisted entity - */ - public ShareDTO save(ShareDTO shareDTO) { - log.debug("Request to save Share : {}", shareDTO); - - shareValidator.validate(shareDTO); - - Share share = shareMapper.toEntity(shareDTO); - share = shareRepository.save(share); - em.flush(); - em.refresh(share); - return shareMapper.toDto(share); - } - - /** - * Get all the shares. - * - * @param pageable the pagination information - * @return the list of entities - */ - @Transactional(readOnly = true) - public Page findAll(Pageable pageable) { - log.debug("Request to get all Shares"); - return shareRepository.findAll(pageable) - .map(shareMapper::toDto); - } - - /** - * Get one share by id. - * - * @param id the id of the entity - * @return the entity - */ - @Transactional(readOnly = true) - public Optional findOne(Long id) { - log.debug("Request to get Share : {}", id); - return shareRepository.findById(id) - .map(shareMapper::toDto); - } - - /** - * Prevent deleting a share transaction by id via service call - * - * @param id the id of the entity - */ - public void delete(Long id) { - log.debug("Request to delete Share : {}", id); - - throw new BadRequestAlertException("Share transactions are immutable", Share.ENTITY_NAME, "shareTransactionImmutable"); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/ShareValidator.java b/src/main/java/org/hostsharing/hsadminng/service/ShareValidator.java deleted file mode 100644 index 022ba196..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/ShareValidator.java +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.Share; -import org.hostsharing.hsadminng.domain.enumeration.ShareAction; -import org.hostsharing.hsadminng.service.dto.ShareDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.springframework.stereotype.Service; - -@Service -public class ShareValidator { - - public void validate(final ShareDTO shareDTO) { - if (shareDTO.getId() != null) { - throw new BadRequestAlertException( - "Share transactions are immutable", - Share.ENTITY_NAME, - "shareTransactionImmutable"); - } - - if (shareDTO.getDocumentDate().isAfter(shareDTO.getValueDate())) { - throw new BadRequestAlertException( - "Document date may not be after value date", - Share.ENTITY_NAME, - "documentDateMayNotBeAfterValueDate"); - } - - if ((shareDTO.getAction() == ShareAction.SUBSCRIPTION) && (shareDTO.getQuantity() <= 0)) { - throw new BadRequestAlertException( - "Share subscriptions require a positive quantity", - Share.ENTITY_NAME, - "shareSubscriptionPositiveQuantity"); - } - - if ((shareDTO.getAction() == ShareAction.CANCELLATION) && (shareDTO.getQuantity() >= 0)) { - throw new BadRequestAlertException( - "Share cancellations require a negative quantity", - Share.ENTITY_NAME, - "shareCancellationNegativeQuantity"); - } - - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/UserRoleAssignmentQueryService.java b/src/main/java/org/hostsharing/hsadminng/service/UserRoleAssignmentQueryService.java deleted file mode 100644 index 19d7d780..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/UserRoleAssignmentQueryService.java +++ /dev/null @@ -1,112 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.domain.*; -import org.hostsharing.hsadminng.domain.UserRoleAssignment; -import org.hostsharing.hsadminng.repository.UserRoleAssignmentRepository; -import org.hostsharing.hsadminng.service.dto.UserRoleAssignmentCriteria; - -import io.github.jhipster.service.QueryService; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.domain.Specification; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -import javax.persistence.criteria.JoinType; - -/** - * Service for executing complex queries for UserRoleAssignment entities in the database. - * The main input is a {@link UserRoleAssignmentCriteria} which gets converted to {@link Specification}, - * in a way that all the filters must apply. - * It returns a {@link List} of {@link UserRoleAssignment} or a {@link Page} of {@link UserRoleAssignment} which fulfills the - * criteria. - */ -@Service -@Transactional(readOnly = true) -public class UserRoleAssignmentQueryService extends QueryService { - - private final Logger log = LoggerFactory.getLogger(UserRoleAssignmentQueryService.class); - - private final UserRoleAssignmentRepository userRoleAssignmentRepository; - - public UserRoleAssignmentQueryService(UserRoleAssignmentRepository userRoleAssignmentRepository) { - this.userRoleAssignmentRepository = userRoleAssignmentRepository; - } - - /** - * Return a {@link List} of {@link UserRoleAssignment} which matches the criteria from the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @return the matching entities. - */ - @Transactional(readOnly = true) - public List findByCriteria(UserRoleAssignmentCriteria criteria) { - log.debug("find by criteria : {}", criteria); - final Specification specification = createSpecification(criteria); - return userRoleAssignmentRepository.findAll(specification); - } - - /** - * Return a {@link Page} of {@link UserRoleAssignment} which matches the criteria from the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @param page The page, which should be returned. - * @return the matching entities. - */ - @Transactional(readOnly = true) - public Page findByCriteria(UserRoleAssignmentCriteria criteria, Pageable page) { - log.debug("find by criteria : {}, page: {}", criteria, page); - final Specification specification = createSpecification(criteria); - return userRoleAssignmentRepository.findAll(specification, page); - } - - /** - * Return the number of matching entities in the database - * - * @param criteria The object which holds all the filters, which the entities should match. - * @return the number of matching entities. - */ - @Transactional(readOnly = true) - public long countByCriteria(UserRoleAssignmentCriteria criteria) { - log.debug("count by criteria : {}", criteria); - final Specification specification = createSpecification(criteria); - return userRoleAssignmentRepository.count(specification); - } - - /** - * Function to convert UserRoleAssignmentCriteria to a {@link Specification} - */ - private Specification createSpecification(UserRoleAssignmentCriteria criteria) { - Specification specification = Specification.where(null); - if (criteria != null) { - if (criteria.getId() != null) { - specification = specification.and(buildSpecification(criteria.getId(), UserRoleAssignment_.id)); - } - if (criteria.getEntityTypeId() != null) { - specification = specification - .and(buildStringSpecification(criteria.getEntityTypeId(), UserRoleAssignment_.entityTypeId)); - } - if (criteria.getEntityObjectId() != null) { - specification = specification - .and(buildRangeSpecification(criteria.getEntityObjectId(), UserRoleAssignment_.entityObjectId)); - } - if (criteria.getAssignedRole() != null) { - specification = specification - .and(buildSpecification(criteria.getAssignedRole(), UserRoleAssignment_.assignedRole)); - } - if (criteria.getUserId() != null) { - specification = specification.and( - buildSpecification( - criteria.getUserId(), - root -> root.join(UserRoleAssignment_.user, JoinType.LEFT).get(User_.id))); - } - } - return specification; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/UserRoleAssignmentService.java b/src/main/java/org/hostsharing/hsadminng/service/UserRoleAssignmentService.java deleted file mode 100644 index 6f2d7664..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/UserRoleAssignmentService.java +++ /dev/null @@ -1,111 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import static com.google.common.base.Verify.verify; - -import org.hostsharing.hsadminng.domain.UserRoleAssignment; -import org.hostsharing.hsadminng.repository.UserRepository; -import org.hostsharing.hsadminng.repository.UserRoleAssignmentRepository; -import org.hostsharing.hsadminng.security.SecurityUtils; -import org.hostsharing.hsadminng.service.accessfilter.Role; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Collections; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; - -/** - * Service Implementation for managing UserRoleAssignment. - */ -@Service -@Transactional -public class UserRoleAssignmentService implements IdToDtoResolver { - - private final Logger log = LoggerFactory.getLogger(UserRoleAssignmentService.class); - - private final UserRoleAssignmentRepository userRoleAssignmentRepository; - - public UserRoleAssignmentService( - final UserRepository userRepository, - final UserRoleAssignmentRepository userRoleAssignmentRepository) { - this.userRoleAssignmentRepository = userRoleAssignmentRepository; - } - - /** - * Save a userRoleAssignment. - * - * @param userRoleAssignment the entity to save - * @return the persisted entity - */ - public UserRoleAssignment save(UserRoleAssignment userRoleAssignment) { - log.debug("Request to save UserRoleAssignment : {}", userRoleAssignment); - return userRoleAssignmentRepository.save(userRoleAssignment); - } - - /** - * Get all the userRoleAssignments. - * - * @param pageable the pagination information - * @return the list of entities - */ - @Transactional(readOnly = true) - public Page findAll(Pageable pageable) { - log.debug("Request to get all UserRoleAssignments"); - return userRoleAssignmentRepository.findAll(pageable); - } - - /** - * Get one userRoleAssignment by id. - * - * @param id the id of the entity - * @return the entity - */ - @Transactional(readOnly = true) - public Optional findOne(Long id) { - log.debug("Request to get UserRoleAssignment : {}", id); - return userRoleAssignmentRepository.findById(id); - } - - /** - * Delete the userRoleAssignment by id. - * - * @param id the id of the entity - */ - public void delete(Long id) { - log.debug("Request to delete UserRoleAssignment : {}", id); - userRoleAssignmentRepository.deleteById(id); - } - - /** - * Collects all roles assigned to the current login user for the specified entity. - * - * @param entityTypeId the type id of the entity, e.g. "customer.Customer", not null - * @param entityObjectId id of entity instance in given entity type - * @return a set of all roles assigned to the current login user - */ - public Set getEffectiveRoleOfCurrentUser(final String entityTypeId, final long entityObjectId) { - verify(entityTypeId != null); - - // findByLogin is cached, thus I presume this is faster more specific query which would result in many DB roundtrips - final Set roles = SecurityUtils.getCurrentUserLogin() - .map( - login -> userRoleAssignmentRepository.findByLogin(login) - .stream() - .filter(ura -> matches(entityTypeId, entityObjectId, ura)) - .map(UserRoleAssignment::getAssignedRole) - .collect(Collectors.toSet())) - .orElse(Collections.emptySet()); - return roles; - } - - private static boolean matches(final String entityTypeId, final long entityObjectId, final UserRoleAssignment ura) { - return ura.getEntityTypeId().equals(entityTypeId) && ura.getEntityObjectId().equals(entityObjectId); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/UserService.java b/src/main/java/org/hostsharing/hsadminng/service/UserService.java deleted file mode 100644 index aab6278a..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/UserService.java +++ /dev/null @@ -1,302 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import org.hostsharing.hsadminng.config.Constants; -import org.hostsharing.hsadminng.domain.Authority; -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.repository.AuthorityRepository; -import org.hostsharing.hsadminng.repository.UserRepository; -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.security.SecurityUtils; -import org.hostsharing.hsadminng.service.dto.UserDTO; -import org.hostsharing.hsadminng.service.util.RandomUtil; -import org.hostsharing.hsadminng.web.rest.errors.*; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.cache.CacheManager; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.security.crypto.password.PasswordEncoder; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.time.Instant; -import java.time.temporal.ChronoUnit; -import java.util.*; -import java.util.stream.Collectors; - -/** - * Service class for managing users. - */ -@Service -@Transactional -public class UserService { - - private final Logger log = LoggerFactory.getLogger(UserService.class); - - private final UserRepository userRepository; - - private final PasswordEncoder passwordEncoder; - - private final AuthorityRepository authorityRepository; - - private final CacheManager cacheManager; - - public UserService( - UserRepository userRepository, - PasswordEncoder passwordEncoder, - AuthorityRepository authorityRepository, - CacheManager cacheManager) { - this.userRepository = userRepository; - this.passwordEncoder = passwordEncoder; - this.authorityRepository = authorityRepository; - this.cacheManager = cacheManager; - } - - public Optional activateRegistration(String key) { - log.debug("Activating user for activation key {}", key); - return userRepository.findOneByActivationKey(key) - .map(user -> { - // activate given user for the registration key. - user.setActivated(true); - user.setActivationKey(null); - this.clearUserCaches(user); - log.debug("Activated user: {}", user); - return user; - }); - } - - public Optional completePasswordReset(String newPassword, String key) { - log.debug("Reset user password for reset key {}", key); - return userRepository.findOneByResetKey(key) - .filter(user -> user.getResetDate().isAfter(Instant.now().minusSeconds(86400))) - .map(user -> { - user.setPassword(passwordEncoder.encode(newPassword)); - user.setResetKey(null); - user.setResetDate(null); - this.clearUserCaches(user); - return user; - }); - } - - public Optional requestPasswordReset(String mail) { - return userRepository.findOneByEmailIgnoreCase(mail) - .filter(User::getActivated) - .map(user -> { - user.setResetKey(RandomUtil.generateResetKey()); - user.setResetDate(Instant.now()); - this.clearUserCaches(user); - return user; - }); - } - - public User registerUser(UserDTO userDTO, String password) { - userRepository.findOneByLogin(userDTO.getLogin().toLowerCase()).ifPresent(existingUser -> { - boolean removed = removeNonActivatedUser(existingUser); - if (!removed) { - throw new LoginAlreadyUsedException(); - } - }); - userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()).ifPresent(existingUser -> { - boolean removed = removeNonActivatedUser(existingUser); - if (!removed) { - throw new EmailAlreadyUsedException(); - } - }); - User newUser = new User(); - String encryptedPassword = passwordEncoder.encode(password); - newUser.setLogin(userDTO.getLogin().toLowerCase()); - // new user gets initially a generated password - newUser.setPassword(encryptedPassword); - newUser.setFirstName(userDTO.getFirstName()); - newUser.setLastName(userDTO.getLastName()); - newUser.setEmail(userDTO.getEmail().toLowerCase()); - newUser.setImageUrl(userDTO.getImageUrl()); - newUser.setLangKey(userDTO.getLangKey()); - // new user is not active - newUser.setActivated(false); - // new user gets registration key - newUser.setActivationKey(RandomUtil.generateActivationKey()); - Set authorities = new HashSet<>(); - authorityRepository.findById(AuthoritiesConstants.USER).ifPresent(authorities::add); - newUser.setAuthorities(authorities); - userRepository.save(newUser); - this.clearUserCaches(newUser); - log.debug("Created Information for User: {}", newUser); - return newUser; - } - - private boolean removeNonActivatedUser(User existingUser) { - if (existingUser.getActivated()) { - return false; - } - userRepository.delete(existingUser); - userRepository.flush(); - this.clearUserCaches(existingUser); - return true; - } - - public User createUser(UserDTO userDTO) { - User user = new User(); - user.setLogin(userDTO.getLogin().toLowerCase()); - user.setFirstName(userDTO.getFirstName()); - user.setLastName(userDTO.getLastName()); - user.setEmail(userDTO.getEmail().toLowerCase()); - user.setImageUrl(userDTO.getImageUrl()); - if (userDTO.getLangKey() == null) { - user.setLangKey(Constants.DEFAULT_LANGUAGE); // default language - } else { - user.setLangKey(userDTO.getLangKey()); - } - String encryptedPassword = passwordEncoder.encode(RandomUtil.generatePassword()); - user.setPassword(encryptedPassword); - user.setResetKey(RandomUtil.generateResetKey()); - user.setResetDate(Instant.now()); - user.setActivated(true); - if (userDTO.getAuthorities() != null) { - Set authorities = userDTO.getAuthorities() - .stream() - .map(authorityRepository::findById) - .filter(Optional::isPresent) - .map(Optional::get) - .collect(Collectors.toSet()); - user.setAuthorities(authorities); - } - userRepository.save(user); - this.clearUserCaches(user); - log.debug("Created Information for User: {}", user); - return user; - } - - /** - * Update basic information (first name, last name, email, language) for the current user. - * - * @param firstName first name of user - * @param lastName last name of user - * @param email email id of user - * @param langKey language key - * @param imageUrl image URL of user - */ - public void updateUser(String firstName, String lastName, String email, String langKey, String imageUrl) { - SecurityUtils.getCurrentUserLogin() - .flatMap(userRepository::findOneByLogin) - .ifPresent(user -> { - user.setFirstName(firstName); - user.setLastName(lastName); - user.setEmail(email.toLowerCase()); - user.setLangKey(langKey); - user.setImageUrl(imageUrl); - this.clearUserCaches(user); - log.debug("Changed Information for User: {}", user); - }); - } - - /** - * Update all information for a specific user, and return the modified user. - * - * @param userDTO user to update - * @return updated user - */ - public Optional updateUser(UserDTO userDTO) { - return Optional.of( - userRepository - .findById(userDTO.getId())) - .filter(Optional::isPresent) - .map(Optional::get) - .map(user -> { - this.clearUserCaches(user); - user.setLogin(userDTO.getLogin().toLowerCase()); - user.setFirstName(userDTO.getFirstName()); - user.setLastName(userDTO.getLastName()); - user.setEmail(userDTO.getEmail().toLowerCase()); - user.setImageUrl(userDTO.getImageUrl()); - user.setActivated(userDTO.isActivated()); - user.setLangKey(userDTO.getLangKey()); - Set managedAuthorities = user.getAuthorities(); - managedAuthorities.clear(); - userDTO.getAuthorities() - .stream() - .map(authorityRepository::findById) - .filter(Optional::isPresent) - .map(Optional::get) - .forEach(managedAuthorities::add); - this.clearUserCaches(user); - log.debug("Changed Information for User: {}", user); - return user; - }) - .map(UserDTO::new); - } - - public void deleteUser(String login) { - userRepository.findOneByLogin(login).ifPresent(user -> { - userRepository.delete(user); - this.clearUserCaches(user); - log.debug("Deleted User: {}", user); - }); - } - - public void changePassword(String currentClearTextPassword, String newPassword) { - SecurityUtils.getCurrentUserLogin() - .flatMap(userRepository::findOneByLogin) - .ifPresent(user -> { - String currentEncryptedPassword = user.getPassword(); - if (!passwordEncoder.matches(currentClearTextPassword, currentEncryptedPassword)) { - throw new InvalidPasswordException(); - } - String encryptedPassword = passwordEncoder.encode(newPassword); - user.setPassword(encryptedPassword); - this.clearUserCaches(user); - log.debug("Changed password for User: {}", user); - }); - } - - @Transactional(readOnly = true) - public Page getAllManagedUsers(Pageable pageable) { - return userRepository.findAllByLoginNot(pageable, Constants.ANONYMOUS_USER).map(UserDTO::new); - } - - @Transactional(readOnly = true) - public Optional getUserWithAuthoritiesByLogin(String login) { - return userRepository.findOneWithAuthoritiesByLogin(login); - } - - @Transactional(readOnly = true) - public Optional getUserWithAuthorities(Long id) { - return userRepository.findOneWithAuthoritiesById(id); - } - - @Transactional(readOnly = true) - public Optional getUserWithAuthorities() { - return SecurityUtils.getCurrentUserLogin().flatMap(userRepository::findOneWithAuthoritiesByLogin); - } - - /** - * Not activated users should be automatically deleted after 3 days. - *

- * This is scheduled to get fired everyday, at 01:00 (am). - */ - @Scheduled(cron = "0 0 1 * * ?") - public void removeNotActivatedUsers() { - userRepository - .findAllByActivatedIsFalseAndCreatedDateBefore(Instant.now().minus(3, ChronoUnit.DAYS)) - .forEach(user -> { - log.debug("Deleting not activated user {}", user.getLogin()); - userRepository.delete(user); - this.clearUserCaches(user); - }); - } - - /** - * @return a list of all the authorities - */ - public List getAuthorities() { - return authorityRepository.findAll().stream().map(Authority::getName).collect(Collectors.toList()); - } - - private void clearUserCaches(User user) { - Objects.requireNonNull(cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE)).evict(user.getLogin()); - Objects.requireNonNull(cacheManager.getCache(UserRepository.USERS_BY_EMAIL_CACHE)).evict(user.getEmail()); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/AccessFor.java b/src/main/java/org/hostsharing/hsadminng/service/accessfilter/AccessFor.java deleted file mode 100644 index 0d0a1a52..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/AccessFor.java +++ /dev/null @@ -1,18 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import org.hostsharing.hsadminng.service.accessfilter.Role.Nobody; - -import java.lang.annotation.*; - -@Documented -@Target({ ElementType.FIELD, ElementType.TYPE_USE }) -@Retention(RetentionPolicy.RUNTIME) -public @interface AccessFor { - - Class[] init() default Nobody.class; - - Class[] update() default Nobody.class; - - Class[] read() default Nobody.class; -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/AccessMappings.java b/src/main/java/org/hostsharing/hsadminng/service/accessfilter/AccessMappings.java deleted file mode 100644 index af8f2c74..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/AccessMappings.java +++ /dev/null @@ -1,13 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import java.io.Serializable; - -/** - * A marker interface for DTO classes which can be used by {@link JsonSerializerWithAccessFilter} and - * {@link JsonDeserializerWithAccessFilter}. - */ -public interface AccessMappings extends Serializable { - - Long getId(); -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/EntityTypeId.java b/src/main/java/org/hostsharing/hsadminng/service/accessfilter/EntityTypeId.java deleted file mode 100644 index 3ba2792d..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/EntityTypeId.java +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import java.lang.annotation.*; - -/** - * Specifies the entityTypeId to be used in UserRoleAssignment. - */ -@Documented -@Target({ ElementType.FIELD, ElementType.TYPE_USE }) -@Retention(RetentionPolicy.RUNTIME) -public @interface EntityTypeId { - - /** - * The ID of the entity type, max length: 32. - * - * Pattern: "module.Entity", e.g. "customer.Membership" - */ - String value(); -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JSonAccessFilter.java b/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JSonAccessFilter.java deleted file mode 100644 index a765138d..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JSonAccessFilter.java +++ /dev/null @@ -1,149 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import static com.google.common.base.Verify.verify; -import static com.google.common.collect.Sets.union; -import static java.util.Collections.EMPTY_SET; -import static java.util.Collections.emptySet; - -import org.hostsharing.hsadminng.security.SecurityUtils; -import org.hostsharing.hsadminng.service.IdToDtoResolver; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.dto.MembershipDTO; -import org.hostsharing.hsadminng.service.util.ReflectionUtil; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.springframework.beans.factory.config.AutowireCapableBeanFactory; -import org.springframework.context.ApplicationContext; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.context.SecurityContextHolder; - -import java.lang.annotation.Annotation; -import java.lang.reflect.Field; -import java.util.Set; -import java.util.stream.Collectors; - -abstract class JSonAccessFilter { - - private final ApplicationContext ctx; - private final UserRoleAssignmentService userRoleAssignmentService; - - final T dto; - final Field selfIdField; - final Field parentIdField; - - JSonAccessFilter(final ApplicationContext ctx, final UserRoleAssignmentService userRoleAssignmentService, final T dto) { - this.ctx = ctx; - this.userRoleAssignmentService = userRoleAssignmentService; - this.dto = dto; - this.selfIdField = determineFieldWithAnnotation(dto.getClass(), SelfId.class); - this.parentIdField = determineFieldWithAnnotation(dto.getClass(), ParentId.class); - } - - Long getId() { - if (selfIdField == null) { - return null; - } - return (Long) ReflectionUtil.getValue(dto, selfIdField); - } - - /** - * @param field to get a display representation for - * @return a simplified, decently user readable, display representation of the given field - */ - String toDisplay(final Field field) { - return field.getDeclaringClass().getSimpleName() + "." + field.getName(); - } - - /** - * @return all roles of the login user in relation to the dto, for which this filter is created. - */ - Set getLoginUserRoles() { - final Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); - if (authentication == null) { - return emptySet(); - } - final Set independentRoles = authentication - .getAuthorities() - .stream() - .map(GrantedAuthority::getAuthority) - .map(Role::of) - .collect(Collectors.toSet()); - - final Set rolesOnThis = getId() != null ? getLoginUserDirectRolesFor(dto.getClass(), getId()) : EMPTY_SET; - return union(independentRoles, union(rolesOnThis, getLoginUserRoleOnAncestorIfHigher(dto))); - } - - private Set getLoginUserRoleOnAncestorIfHigher(final Object dto) { - final Field parentIdField = determineFieldWithAnnotation(dto.getClass(), ParentId.class); - - if (parentIdField == null) { - return emptySet(); - } - - final ParentId parentIdAnnot = parentIdField.getAnnotation(ParentId.class); - final Class parentDtoLoader = parentIdAnnot.resolver(); - final Class rawType = IdToDtoResolver.class; - - final Class parentDtoClass = ReflectionUtil. determineGenericInterfaceParameter(parentDtoLoader, rawType, 0); - final Object parent = ReflectionUtil.getValue(dto, parentIdField); - if (parent == null) { - return emptySet(); - } - final Long parentId = parent instanceof AccessMappings ? (((AccessMappings) parent).getId()) : (Long) parent; - final Set rolesOnParent = getLoginUserDirectRolesFor(parentDtoClass, parentId); - - final Object parentEntity = loadDto(parentDtoLoader, parentId); - return union(rolesOnParent, getLoginUserRoleOnAncestorIfHigher(parentEntity)); - } - - private Set getLoginUserDirectRolesFor(final Class dtoClass, final long id) { - verify(SecurityUtils.isAuthenticated()); - - final EntityTypeId entityTypeId = dtoClass.getAnnotation(EntityTypeId.class); - verify(entityTypeId != null, "@" + EntityTypeId.class.getSimpleName() + " missing on " + dtoClass.getName()); - - return userRoleAssignmentService.getEffectiveRoleOfCurrentUser(entityTypeId.value(), id); - } - - @SuppressWarnings("unchecked") - protected Object loadDto(final Class resolverClass, final Long id) { - verify(id != null, "id must not be null for " + resolverClass.getSimpleName()); - - final AutowireCapableBeanFactory beanFactory = ctx.getAutowireCapableBeanFactory(); - verify( - beanFactory != null, - "no bean factory found, probably missing mock configuration for ApplicationContext, e.g. given(...)"); - - final IdToDtoResolver resolverBean = beanFactory.createBean(resolverClass); - verify( - resolverBean != null, - "no " + resolverClass.getSimpleName() - + " bean created, probably missing mock configuration for AutowireCapableBeanFactory, e.g. given(...)"); - - return resolverBean.findOne(id) - .orElseThrow( - () -> new BadRequestAlertException( - "Can't resolve entity ID " + id + " via " + resolverClass, - resolverClass.getSimpleName(), - "isNotFound")); - } - - private static Field determineFieldWithAnnotation( - final Class dtoClass, - final Class idAnnotationClass) { - Field parentIdField = null; - for (Field field : dtoClass.getDeclaredFields()) { - if (field.isAnnotationPresent(idAnnotationClass)) { - if (parentIdField != null) { - throw new AssertionError( - "multiple @" + idAnnotationClass.getSimpleName() + " detected in " - + field.getDeclaringClass().getSimpleName()); - } - parentIdField = field; - } - } - return parentIdField; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JSonFieldReader.java b/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JSonFieldReader.java deleted file mode 100644 index 51d1d063..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JSonFieldReader.java +++ /dev/null @@ -1,19 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -/** - * Reads a JSON node value. - * - * @param - */ -@FunctionalInterface -public interface JSonFieldReader { - - /** - * Reads a JSON node value. - * - * @param target your target entity or DTO type - * - */ - void readInto(T target); -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JSonFieldWriter.java b/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JSonFieldWriter.java deleted file mode 100644 index 6f93a04b..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JSonFieldWriter.java +++ /dev/null @@ -1,23 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import com.fasterxml.jackson.core.JsonGenerator; - -import java.io.IOException; - -/** - * Similar to a BiConsumer, but declaring IOException as needed by JsonGenerator. - * - * @param - */ -@FunctionalInterface -public interface JSonFieldWriter { - - /** - * Writes a JSON field and value. - * - * @param object your entity or DTO type - * @param jsonGenerator provides low level methods for writing JSON fields - */ - void write(T object, JsonGenerator jsonGenerator) throws IOException; -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JsonDeserializerWithAccessFilter.java b/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JsonDeserializerWithAccessFilter.java deleted file mode 100644 index afe7dc32..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JsonDeserializerWithAccessFilter.java +++ /dev/null @@ -1,288 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import static com.google.common.base.Verify.verify; -import static org.hostsharing.hsadminng.service.util.ReflectionUtil.unchecked; - -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.util.ReflectionUtil; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.TreeNode; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.*; -import com.google.common.base.Joiner; - -import org.apache.commons.lang3.NotImplementedException; -import org.apache.commons.lang3.ObjectUtils; -import org.springframework.context.ApplicationContext; - -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.util.HashSet; -import java.util.Set; - -public abstract class JsonDeserializerWithAccessFilter extends JsonDeserializer { - - private final ApplicationContext ctx; - private final UserRoleAssignmentService userRoleAssignmentService; - - public JsonDeserializerWithAccessFilter( - final ApplicationContext ctx, - final UserRoleAssignmentService userRoleAssignmentService) { - this.ctx = ctx; - this.userRoleAssignmentService = userRoleAssignmentService; - } - - @Override - public T deserialize( - final JsonParser jsonParser, - final DeserializationContext deserializationContext) { - - final Class dtoClass = ReflectionUtil - .determineGenericClassParameter(this.getClass(), JsonDeserializerWithAccessFilter.class, 0); - // @formatter:off - return new JSonDeserializationWithAccessFilter( - this, ctx, userRoleAssignmentService, jsonParser, deserializationContext, dtoClass) - .deserialize(); - // @formatter:on - } - - protected JSonFieldReader jsonFieldReader(final TreeNode treeNode, final Field field) { - return (final T object) -> { - final Object newValue = readValueFromJSon(treeNode, field); - writeValueToDto(object, field, newValue); - }; - } - - /** - * Returns the named subnode of the given node. - *

- * If entities are used instead of DTOs, JHipster will generate code which sends - * complete entity trees to the REST endpoint. In most cases, we only need the "id", - * though. - *

- * - * @param node the JSON node of which a subnode is to be returned - * @param name the name of the subnode within 'node' - * @return the subnode of 'node' with the given 'name' - */ - protected final JsonNode getSubNode(final TreeNode node, final String name) { - verify(node.isObject(), node + " is not a JSON object"); - final ObjectNode objectNode = (ObjectNode) node; - final JsonNode subNode = objectNode.get(name); - verify(subNode.isNumber(), node + "." + name + " is not a number"); - return subNode; - } - - private Object readValueFromJSon(final TreeNode treeNode, final Field field) { - return readValueFromJSon(treeNode, field.getName(), field.getType()); - } - - private Object readValueFromJSon(final TreeNode treeNode, final String fieldName, final Class fieldClass) { - // FIXME can be removed? final TreeNode fieldNode = treeNode.get(fieldName); - if (treeNode instanceof NullNode) { - return null; - } - if (treeNode instanceof TextNode) { - return ((TextNode) treeNode).asText(); - } - if (treeNode instanceof IntNode) { - return ((IntNode) treeNode).asInt(); - } - if (treeNode instanceof LongNode) { - return ((LongNode) treeNode).asLong(); - } - if (treeNode instanceof DoubleNode) { - // TODO: we need to figure out, why DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS does not work - return ((DoubleNode) treeNode).asDouble(); - } - if (treeNode instanceof ArrayNode && LocalDate.class.isAssignableFrom(fieldClass)) { - return LocalDate.of( - ((ArrayNode) treeNode).get(0).asInt(), - ((ArrayNode) treeNode).get(1).asInt(), - ((ArrayNode) treeNode).get(2).asInt()); - } - throw new NotImplementedException( - "JSon node type not implemented: " + treeNode.getClass() + " -> " + fieldName + ": " + fieldClass); - } - - private void writeValueToDto(final T dto, final Field field, final Object value) { - if (value == null) { - ReflectionUtil.setValue(dto, field, null); - } else if (field.getType().isAssignableFrom(value.getClass())) { - ReflectionUtil.setValue(dto, field, value); - } else if (int.class.isAssignableFrom(field.getType())) { - ReflectionUtil.setValue(dto, field, ((Number) value).intValue()); - } else if (Long.class.isAssignableFrom(field.getType()) || long.class.isAssignableFrom(field.getType())) { - ReflectionUtil.setValue(dto, field, ((Number) value).longValue()); - } else if (BigDecimal.class.isAssignableFrom(field.getType())) { - ReflectionUtil.setValue(dto, field, new BigDecimal(value.toString())); - } else if (Boolean.class.isAssignableFrom(field.getType()) || boolean.class.isAssignableFrom(field.getType())) { - ReflectionUtil.setValue(dto, field, Boolean.valueOf(value.toString())); - } else if (field.getType().isEnum()) { - ReflectionUtil.setValue(dto, field, ReflectionUtil.asEnumValue(field.getType(), value)); - } else if (LocalDate.class.isAssignableFrom(field.getType())) { - ReflectionUtil.setValue(dto, field, LocalDate.parse(value.toString())); - } else { - throw new NotImplementedException("property type not yet implemented: " + field); - } - } - - /** - * Internal implementation of JSON deserialization, where {@link JsonDeserializerWithAccessFilter} - * is a stateless bean, this inner class exists only during the actual deserialization and contains - * the deserialization state. - */ - private class JSonDeserializationWithAccessFilter extends JSonAccessFilter { - - private final TreeNode treeNode; - private final Set updatingFields = new HashSet<>(); - - public JSonDeserializationWithAccessFilter( - final JsonDeserializerWithAccessFilter deserializer, - final ApplicationContext ctx, - final UserRoleAssignmentService userRoleAssignmentService, - final JsonParser jsonParser, - final DeserializationContext deserializationContext, - Class dtoClass) { - super(ctx, userRoleAssignmentService, unchecked(dtoClass::newInstance)); - this.treeNode = unchecked(() -> jsonParser.getCodec().readTree(jsonParser)); - } - - // Jackson deserializes from the JsonParser, thus no input parameter needed. - public T deserialize() { - deserializeValues(); - final T currentDto = loadCurrentDto(getId()); - overwriteUnmodifiedFieldsWithCurrentValues(currentDto); - checkAccessToWrittenFields(currentDto); - return dto; - } - - private void deserializeValues() { - treeNode.fieldNames().forEachRemaining(fieldName -> { - try { - final Field field = dto.getClass().getDeclaredField(fieldName); - final TreeNode node = treeNode.get(fieldName); - jsonFieldReader(node, field).readInto(dto); - updatingFields.add(field); - } catch (NoSuchFieldException e) { - throw new BadRequestAlertException("Unknown property", fieldName, "unknownProperty"); - } - }); - } - - @SuppressWarnings("unchecked") - private T loadCurrentDto(final Long id) { - if (id != null) { - return (T) loadDto(selfIdField.getAnnotation(SelfId.class).resolver(), id); - } - return null; - } - - private void overwriteUnmodifiedFieldsWithCurrentValues(final T currentDto) { - if (currentDto == null) { - return; - } - for (Field field : currentDto.getClass().getDeclaredFields()) { - if (field.isAnnotationPresent(AccessFor.class)) { - boolean updatingField = updatingFields.contains(field); - if (updatingField && !isActuallyUpdated(field, dto, currentDto)) { - updatingFields.remove(field); - updatingField = false; - } - if (!updatingField) { - final Object value = ReflectionUtil.getValue(currentDto, field); - ReflectionUtil.setValue(dto, field, value); - } - } - - } - } - - private void checkAccessToWrittenFields(final T currentDto) { - updatingFields.forEach( - field -> { - final Set roles = getLoginUserRoles(); - if (isInitAccess()) { - validateInitAccess(field, roles); - } else { - validateUpdateAccess(field, roles); - } - }); - } - - private void validateInitAccess(Field field, Set roles) { - if (!Role.toBeIgnoredForUpdates(field) && !isAllowedToInit(roles, field)) { - if (!field.equals(parentIdField)) { - throw new BadRequestAlertException( - "Initialization of field " + toDisplay(field) - + " prohibited for current user role(s): " - + asString(roles), - toDisplay(field), - "initializationProhibited"); - } else { - throw new BadRequestAlertException( - "Referencing field " + toDisplay(field) - + " prohibited for current user role(s): " - + asString(roles), - toDisplay(field), - "referencingProhibited"); - } - } - } - - private String asString(Set roles) { - return Joiner.on("+").join(roles.stream().map(Role::name).toArray()); - } - - private void validateUpdateAccess(Field field, Set roles) { - if (!Role.toBeIgnoredForUpdates(field) && !isAllowedToUpdate(getLoginUserRoles(), field)) { - throw new BadRequestAlertException( - "Update of field " + toDisplay(field) + " prohibited for current user role(s): " - + asString(roles), - toDisplay(field), - "updateProhibited"); - } - } - - private boolean isAllowedToInit(final Set roles, final Field field) { - for (Role role : roles) { - if (role.isAllowedToInit(field)) { - return true; - } - } - return false; - } - - private boolean isAllowedToUpdate(final Set roles, final Field field) { - for (Role role : roles) { - if (role.isAllowedToUpdate(field)) { - return true; - } - } - return false; - } - - private boolean isInitAccess() { - return getId() == null; - } - - private boolean isActuallyUpdated(final Field field, final T dto, T currentDto) { - final Object o1 = ReflectionUtil.getValue(dto, field); - final Object o2 = ReflectionUtil.getValue(currentDto, field); - - if (o1 instanceof Comparable && o2 instanceof Comparable) { - verify( - o2 instanceof Comparable, - "either neither or both objects must implement Comparable"); // $COVERAGE-IGNORE$ - return 0 != ((Comparable) o1).compareTo(o2); - } - return ObjectUtils.notEqual(o1, o2); - } - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JsonSerializerWithAccessFilter.java b/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JsonSerializerWithAccessFilter.java deleted file mode 100644 index b8849182..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/JsonSerializerWithAccessFilter.java +++ /dev/null @@ -1,138 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.util.ReflectionUtil; - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; - -import org.apache.commons.lang3.NotImplementedException; -import org.springframework.context.ApplicationContext; - -import java.io.IOException; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.util.Set; - -/** - * A base class for a Spring bean for JSON serialization with field-based access filters. - * Where {@link JSonSerializationWithAccessFilter} is the actual stateful implementation and - * it's instances only exist during the process of serialization, this class is a stateless just - * used for service and context injection. - * - * @param DTO class to serialize - */ -public abstract class JsonSerializerWithAccessFilter extends JsonSerializer { - - protected final ApplicationContext ctx; - protected final UserRoleAssignmentService userRoleAssignmentService; - - public JsonSerializerWithAccessFilter( - final ApplicationContext ctx, - final UserRoleAssignmentService userRoleAssignmentService) { - this.ctx = ctx; - this.userRoleAssignmentService = userRoleAssignmentService; - } - - @Override - public void serialize( - final T dto, - final JsonGenerator jsonGenerator, - final SerializerProvider serializerProvider) throws IOException { - - new JSonSerializationWithAccessFilter(this, ctx, userRoleAssignmentService, jsonGenerator, serializerProvider, dto) - .serialize(); - } - - protected JSonFieldWriter jsonFieldWriter(final Field field) { - - return (final T dto, final JsonGenerator jsonGenerator) -> { - final String fieldName = field.getName(); - final Object fieldValue = ReflectionUtil.getValue(dto, field); - // TODO mhoennig turn this into a dispatch table? - // TODO mhoennig: or maybe replace by serializerProvider.defaultSerialize...()? - // But the latter makes it difficult for parallel structure with the deserializer (clumsy API). - // Alternatively extract the supported types to subclasses of some abstract class and - // here as well as in the deserializer just access the matching implementation through a map. - // Or even completely switch from Jackson to GSON? - - if (fieldValue == null) { - jsonGenerator.writeNullField(fieldName); - } else if (String.class.isAssignableFrom(field.getType())) { - jsonGenerator.writeStringField(fieldName, (String) fieldValue); - } else if (Integer.class.isAssignableFrom(field.getType()) || int.class.isAssignableFrom(field.getType())) { - jsonGenerator.writeNumberField(fieldName, (int) fieldValue); - } else if (Long.class.isAssignableFrom(field.getType()) || long.class.isAssignableFrom(field.getType())) { - jsonGenerator.writeNumberField(fieldName, (long) fieldValue); - } else if (LocalDate.class.isAssignableFrom(field.getType())) { - jsonGenerator.writeStringField(fieldName, fieldValue.toString()); - } else if (Enum.class.isAssignableFrom(field.getType())) { - jsonGenerator.writeStringField(fieldName, ((Enum) fieldValue).name()); - } else if (Boolean.class.isAssignableFrom(field.getType()) || boolean.class.isAssignableFrom(field.getType())) { - jsonGenerator.writeBooleanField(fieldName, (Boolean) fieldValue); - } else if (BigDecimal.class.isAssignableFrom(field.getType())) { - jsonGenerator.writeNumberField(fieldName, (BigDecimal) fieldValue); - } else { - throw new NotImplementedException("property type not yet implemented: " + field); - } - }; - } - - /** - * INTERNAL implementation of JSON serialization, where {@link JsonSerializerWithAccessFilter} - * is a stateless bean, this inner class exists only during the actual serialization and - * contains a serialization state. - */ - private class JSonSerializationWithAccessFilter extends JSonAccessFilter { - - private final JsonSerializerWithAccessFilter serializer; - private final JsonGenerator jsonGenerator; - private final SerializerProvider serializerProvider; - - public JSonSerializationWithAccessFilter( - final JsonSerializerWithAccessFilter serializer, - final ApplicationContext ctx, - final UserRoleAssignmentService userRoleAssignmentService, - final JsonGenerator jsonGenerator, - final SerializerProvider serializerProvider, - final T dto) { - super(ctx, userRoleAssignmentService, dto); - this.serializer = serializer; - this.jsonGenerator = jsonGenerator; - this.serializerProvider = serializerProvider; - } - - // Jackson serializes into the JsonGenerator, thus no return value needed. - public void serialize() throws IOException { - - jsonGenerator.writeStartObject(); - for (Field field : dto.getClass().getDeclaredFields()) { - toJSon(dto, jsonGenerator, field); - } - jsonGenerator.writeEndObject(); - } - - protected void writeJSonField(final T dto, final Field field, final JsonGenerator jsonGenerator) throws IOException { - serializer.jsonFieldWriter(field).write(dto, jsonGenerator); - } - - private void toJSon(final T dto, final JsonGenerator jsonGenerator, final Field field) throws IOException { - if (isAllowedToRead(getLoginUserRoles(), field)) { - writeJSonField(dto, field, jsonGenerator); - } - } - - private boolean isAllowedToRead(final Set roles, final Field field) { - for (Role role : roles) { - if (role.isAllowedToRead(field)) { - return true; - } - } - return ReflectionUtil.newInstance(Role.Anybody.class).isAllowedToRead(field); // TODO - } - } - -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/ParentId.java b/src/main/java/org/hostsharing/hsadminng/service/accessfilter/ParentId.java deleted file mode 100644 index 9dd46a0a..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/ParentId.java +++ /dev/null @@ -1,21 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import org.hostsharing.hsadminng.service.IdToDtoResolver; - -import java.lang.annotation.*; - -/** - * Used to mark a field within a DTO as containing the id of a referenced entity, - * it's needed to determine access rights for entity creation. - * - * @see AccessFor - */ -@Documented -@Target({ ElementType.FIELD }) -@Retention(RetentionPolicy.RUNTIME) -public @interface ParentId { - - /// The service which can load the referenced DTO. - Class> resolver(); -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/Role.java b/src/main/java/org/hostsharing/hsadminng/service/accessfilter/Role.java deleted file mode 100644 index c14cb531..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/Role.java +++ /dev/null @@ -1,437 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import static com.google.common.base.Verify.verify; -import static org.hostsharing.hsadminng.service.util.ReflectionUtil.initialize; - -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.domain.UserRoleAssignment; -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.util.ReflectionUtil; - -import org.apache.commons.lang3.ArrayUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.Map; - -/** - * These enum values are used to specify the minimum role required to grant access to resources, - * see usages of {@link AccessFor}. - * Also they can be assigned to users via {@link UserRoleAssignment}. - * Some of the concrete values make only sense in one of these contexts. - *

- * There are two kinds of roles: independent and dependent. - * Independent roles like {@link Hostmaster} are absolute roles which means unrelated to any concrete entity. - * Dependent roles like {@link CustomerContractualContact} are relative to a specific entity, - * in this case to a specific {@link Customer}. - *

- *

- * Separate classes are used to make it possible to use roles in Java annotations - * and also make it possible to have roles spread over multiple modules. - *

- */ -public abstract class Role { - - private static final Logger log = LoggerFactory.getLogger(Role.class); - - // TODO mhoennig: We need to make sure that the classes are loaded - // and thus the static initializers were called - // before these maps are used in production code. - private static Map, Role> rolesByClass = new HashMap<>(); - private static Map rolesByName = new HashMap<>(); - - private final String authority; - private final LazyRoles comprises; - - Role() { - this.authority = AuthoritiesConstants.USER; - // noinspection unchecked - this.comprises = new LazyRoles(); - } - - @SafeVarargs - Role(final Class... comprisedRoleClasses) { - this.authority = AuthoritiesConstants.USER; - // noinspection unchecked - this.comprises = new LazyRoles(comprisedRoleClasses); - } - - @SafeVarargs - Role(final String authority, final Class... comprisedRoleClasses) { - this.authority = authority; - // noinspection unchecked - this.comprises = new LazyRoles(comprisedRoleClasses); - } - - public static Role of(final String authority) { - final Role role = rolesByName.get(authority); - verify( - role != null, - "unknown authority: %s, available authorities: ", - authority, - ArrayUtils.toString(rolesByName.keySet())); - return role; - } - - public static T of(final Class roleClass) { - // prevent initialization and thus recursive call to `Role.of(...)` within `newInstance(...)` - final Class initializedRoleClass = initialize(roleClass); - { - final T role = (T) rolesByClass.get(initializedRoleClass); - if (role != null) { - return role; - } - } - { - T newRole = (T) ReflectionUtil.newInstance(initializedRoleClass); - rolesByClass.put(initializedRoleClass, newRole); - rolesByName.put(newRole.name(), newRole); - log.info("Role registered: {} as {}", initializedRoleClass, newRole.name()); - return newRole; - } - } - - public static void init() { - Role.of(Anybody.class); - Role.of(Hostmaster.class); - Role.of(Admin.class); - Role.of(Supporter.class); - Role.of(AnyCustomerContact.class); - Role.of(CustomerContractualContact.class); - Role.of(CustomerTechnicalContact.class); - Role.of(CustomerFinancialContact.class); - Role.of(AnyCustomerUser.class); - Role.of(ActualCustomerUser.class); - Role.of(Ignored.class); - Role.of(Nobody.class); - } - - @Override - public String toString() { - return getClass().getName() + "(" + name() + ")"; - } - - public abstract String name(); - - public static class IndependentRole extends Role { - - @SafeVarargs - IndependentRole(final String authority, final Class... comprisedRoleClasses) { - super(authority, comprisedRoleClasses); - } - - public String name() { - return authority(); - } - } - - public static class DependentRole extends Role { - - DependentRole() { - } - - @SafeVarargs - DependentRole(final Class... comprisedRoleClasses) { - super(AuthoritiesConstants.USER, comprisedRoleClasses); - } - - public String name() { - return getClass().getSimpleName(); // TODO: decide if it's ok for use in the DB table - } - } - - /** - * Default for access rights requirement. You can read it as: 'Nobody is allowed to ...'. - * This is usually used for fields which are managed by hsadminNg itself. - *

- * This role cannot be assigned to a user. - *

- */ - public static class Nobody extends DependentRole { - - public static final Nobody ROLE = Role.of(Nobody.class); - } - - /** - * Hostmasters are initialize/update/read and field which, except where NOBODY is allowed to. - */ - public static class Hostmaster extends IndependentRole { - - /** - * Hostmasters role to be assigned to users via via {@link User#setAuthorities}. - */ - public static final Hostmaster ROLE = Role.of(Hostmaster.class); - - Hostmaster() { - super(AuthoritiesConstants.HOSTMASTER, Admin.class); - } - } - - public static class Admin extends IndependentRole { - - public static final Admin ROLE = Role.of(Admin.class); - - Admin() { - super(AuthoritiesConstants.ADMIN, Supporter.class); - } - } - - public static class Supporter extends IndependentRole { - - public static final Supporter ROLE = Role.of(Supporter.class); - - Supporter() { - super(AuthoritiesConstants.SUPPORTER, CustomerContractualContact.class); - } - } - - /** - * This role is for contractual contacts of a customer, like a director of the company. - *

- * Who has this role, has the broadest access to all resources which belong to this customer. - * Everything which relates to the contract with the customer, needs this role. - *

- * This role can be assigned to a user via {@link UserRoleAssignment}. - *

- */ - public static class CustomerContractualContact extends DependentRole { - - public static final CustomerContractualContact ROLE = Role.of(CustomerContractualContact.class); - - CustomerContractualContact() { - super(CustomerFinancialContact.class, CustomerTechnicalContact.class); - } - } - - public static class CustomerFinancialContact extends DependentRole { - - public static final CustomerFinancialContact ROLE = Role.of(CustomerFinancialContact.class); - - CustomerFinancialContact() { - super(AnyCustomerContact.class); - } - } - - public static class CustomerTechnicalContact extends DependentRole { - - public static final CustomerTechnicalContact ROLE = Role.of(CustomerTechnicalContact.class); - - CustomerTechnicalContact() { - super( - AnyCustomerContact.class, - AnyCustomerUser.class); // TODO mhoennig: how to add roles of other modules? - } - } - - public static class AnyCustomerContact extends DependentRole { - - public static final AnyCustomerContact ROLE = Role.of(AnyCustomerContact.class); - - AnyCustomerContact() { - super(Anybody.class); - } - } - - public static class ActualCustomerUser extends DependentRole { - - public static final ActualCustomerUser ROLE = Role.of(ActualCustomerUser.class); - - ActualCustomerUser() { - super(AnyCustomerUser.class); - } - } - - public static class AnyCustomerUser extends IndependentRole { - - public static final Role ROLE = Role.of(AnyCustomerUser.class); - - AnyCustomerUser() { - super(AuthoritiesConstants.USER, Anybody.class); - } - } - - /** - * This role is meant to specify that a resources can be accessed by anybody, even without login. - *

- * It can be used to specify to grant rights to any use, even if unauthorized. - *

- */ - public static class Anybody extends IndependentRole { - - public static final Role ROLE = Role.of(Anybody.class); - - Anybody() { - super(AuthoritiesConstants.ANONYMOUS); - } - } - - /** - * Pseudo-role to mark init/update access as ignored because the field is display-only. - *

- * This allows REST clients to send the whole response back as a new update request. - * This role is not covered by any and covers itself no role. - *

- * It's only used to ignore the field. - *

- */ - public static class Ignored extends DependentRole { - - public static final Role ROLE = Role.of(Ignored.class); - } - - /** - * @param field a field of a DTO with AccessMappings - * @return true if update access can be ignored because the field is just for display anyway - */ - public static boolean toBeIgnoredForUpdates(final Field field) { - final AccessFor accessForAnnot = field.getAnnotation(AccessFor.class); - if (accessForAnnot == null) { - return true; - } - final Class[] updateAccessFor = field.getAnnotation(AccessFor.class).update(); - return updateAccessFor.length == 1 && updateAccessFor[0] == Ignored.class; - } - - /** - * @return the independent authority related 1:1 to this Role or empty if no independent authority is related 1:1 - * @see AuthoritiesConstants - */ - public String authority() { - return authority; - } - - /** - * @return the role with the broadest access rights - */ - public static Role broadest(final Role role, final Role... roles) { - Role broadests = role; - for (Role r : roles) { - if (r.covers(broadests.getClass())) { - broadests = r; - } - } - return broadests; - } - - /** - * Determines if 'this' actual role covered the given required role. - *

- * Where 'this' means the Java instance itself as a role of a system user. - *

- * {@code - * AssignedHostmaster.ROLE.covers(AssignedRole.ANY_CUSTOMER_USER) == true - * } - * - * @param roleClass The required role for a resource. - * @return whether this role comprises the given role - */ - public boolean covers(final Class roleClass) { - if (getClass() == Ignored.class || roleClass == Ignored.class) { - return false; - } - if (getClass() == roleClass) { - return true; - } - for (Role role : comprises.get()) { - if (role.covers(roleClass)) { - return true; - } - } - return false; - } - - /** - * Determines if 'this' actual role covers any of the given required roles. - *

- * Where 'this' means the Java instance itself as a role of a system user. - *

- * {@code - * AssignedHostmaster.ROLE.coversAny(AssignedRole.CUSTOMER_CONTRACTUAL_CONTACT, AssignedRole.CUSTOMER_FINANCIAL_CONTACT) == true - * } - * - * @param roleClasses The alternatively required roles for a resource. Must be at least one. - * @return whether this role comprises any of the given roles - */ - public boolean coversAny(final Class... roleClasses) { - verify(roleClasses != null && roleClasses.length > 0, "role classes expected"); - - for (Class roleClass : roleClasses) { - if (this.covers(roleClass)) { - return true; - } - } - return false; - } - - /** - * Checks if this role of a user allows to initialize the given field when creating the resource. - * - * @param field a field of the DTO of a resource - * @return true if allowed - */ - public boolean isAllowedToInit(final Field field) { - - final AccessFor accessFor = field.getAnnotation(AccessFor.class); - if (accessFor == null) { - return false; - } - - return coversAny(accessFor.init()); - } - - /** - * Checks if this role of a user allows to update the given field. - * - * @param field a field of the DTO of a resource - * @return true if allowed - */ - public boolean isAllowedToUpdate(final Field field) { - - final AccessFor accessFor = field.getAnnotation(AccessFor.class); - if (accessFor == null) { - return false; - } - - return coversAny(accessFor.update()); - } - - /** - * Checks if this role of a user allows to read the given field. - * - * @param field a field of the DTO of a resource - * @return true if allowed - */ - public boolean isAllowedToRead(final Field field) { - - final AccessFor accessFor = field.getAnnotation(AccessFor.class); - if (accessFor == null) { - return false; - } - - return coversAny(accessFor.read()); - } -} - -class LazyRoles { - - private final Class[] comprisedRoleClasses; - private Role[] comprisedRoles = null; - - LazyRoles(Class... comprisedRoleClasses) { - this.comprisedRoleClasses = comprisedRoleClasses; - } - - Role[] get() { - if (comprisedRoles == null) { - comprisedRoles = new Role[comprisedRoleClasses.length]; - for (int n = 0; n < comprisedRoleClasses.length; ++n) { - comprisedRoles[n] = Role.of(comprisedRoleClasses[n]); - } - } - return comprisedRoles; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/SelfId.java b/src/main/java/org/hostsharing/hsadminng/service/accessfilter/SelfId.java deleted file mode 100644 index 35725a9b..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/accessfilter/SelfId.java +++ /dev/null @@ -1,23 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import org.hostsharing.hsadminng.service.IdToDtoResolver; - -import java.lang.annotation.*; - -/** - * Used to mark a field within a DTO as containing the own id, - * it's needed to identify an existing entity for update functions. - * Initialization and update rights have no meaning for such fields, - * its initialized automatically and never updated. - * - * @see AccessFor - */ -@Documented -@Target({ ElementType.FIELD }) -@Retention(RetentionPolicy.RUNTIME) -public @interface SelfId { - - /// The service which can load the referenced DTO. - Class> resolver(); -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/AssetCriteria.java b/src/main/java/org/hostsharing/hsadminng/service/dto/AssetCriteria.java deleted file mode 100644 index 0fe2ed74..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/AssetCriteria.java +++ /dev/null @@ -1,146 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import org.hostsharing.hsadminng.domain.enumeration.AssetAction; - -import io.github.jhipster.service.filter.BigDecimalFilter; -import io.github.jhipster.service.filter.Filter; -import io.github.jhipster.service.filter.LocalDateFilter; -import io.github.jhipster.service.filter.LongFilter; -import io.github.jhipster.service.filter.StringFilter; - -import java.io.Serializable; -import java.util.Objects; - -/** - * Criteria class for the Asset entity. This class is used in AssetResource to - * receive all the possible filtering options from the Http GET request parameters. - * For example the following could be a valid requests: - * /assets?id.greaterThan=5&attr1.contains=something&attr2.specified=false - * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use - * fix type specific filters. - */ -public class AssetCriteria implements Serializable { - - /** - * Class for filtering AssetAction - */ - public static class AssetActionFilter extends Filter { - } - - private static final long serialVersionUID = 1L; - - private LongFilter id; - - private LocalDateFilter documentDate; - - private LocalDateFilter valueDate; - - private AssetActionFilter action; - - private BigDecimalFilter amount; - - private StringFilter remark; - - private LongFilter membershipId; - - public LongFilter getId() { - return id; - } - - public void setId(LongFilter id) { - this.id = id; - } - - public LocalDateFilter getDocumentDate() { - return documentDate; - } - - public void setDocumentDate(LocalDateFilter documentDate) { - this.documentDate = documentDate; - } - - public LocalDateFilter getValueDate() { - return valueDate; - } - - public void setValueDate(LocalDateFilter valueDate) { - this.valueDate = valueDate; - } - - public AssetActionFilter getAction() { - return action; - } - - public void setAction(AssetActionFilter action) { - this.action = action; - } - - public BigDecimalFilter getAmount() { - return amount; - } - - public void setAmount(BigDecimalFilter amount) { - this.amount = amount; - } - - public StringFilter getRemark() { - return remark; - } - - public void setRemark(StringFilter remark) { - this.remark = remark; - } - - public LongFilter getMembershipId() { - return membershipId; - } - - public void setMembershipId(LongFilter membershipId) { - this.membershipId = membershipId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final AssetCriteria that = (AssetCriteria) o; - return Objects.equals(id, that.id) && - Objects.equals(documentDate, that.documentDate) && - Objects.equals(valueDate, that.valueDate) && - Objects.equals(action, that.action) && - Objects.equals(amount, that.amount) && - Objects.equals(remark, that.remark) && - Objects.equals(membershipId, that.membershipId); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - documentDate, - valueDate, - action, - amount, - remark, - membershipId); - } - - @Override - public String toString() { - return "AssetCriteria{" + - (id != null ? "id=" + id + ", " : "") + - (documentDate != null ? "documentDate=" + documentDate + ", " : "") + - (valueDate != null ? "valueDate=" + valueDate + ", " : "") + - (action != null ? "action=" + action + ", " : "") + - (amount != null ? "amount=" + amount + ", " : "") + - (remark != null ? "remark=" + remark + ", " : "") + - (membershipId != null ? "membershipId=" + membershipId + ", " : "") + - "}"; - } - -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/AssetDTO.java b/src/main/java/org/hostsharing/hsadminng/service/dto/AssetDTO.java deleted file mode 100644 index bf88980d..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/AssetDTO.java +++ /dev/null @@ -1,174 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import org.hostsharing.hsadminng.domain.Asset; -import org.hostsharing.hsadminng.domain.enumeration.AssetAction; -import org.hostsharing.hsadminng.service.AssetService; -import org.hostsharing.hsadminng.service.MembershipService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.*; -import org.hostsharing.hsadminng.service.accessfilter.Role.*; - -import org.springframework.boot.jackson.JsonComponent; -import org.springframework.context.ApplicationContext; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.util.Objects; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -/** - * A DTO for the Asset entity. - */ -@EntityTypeId(Asset.ENTITY_TYPE_ID) -public class AssetDTO implements Serializable, AccessMappings { - - @SelfId(resolver = AssetService.class) - @AccessFor(read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private Long id; - - @NotNull - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate documentDate; - - @NotNull - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate valueDate; - - @NotNull - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private AssetAction action; - - @NotNull - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private BigDecimal amount; - - @Size(max = 160) - @AccessFor(init = Admin.class, update = Admin.class, read = Supporter.class) - private String remark; - - @ParentId(resolver = MembershipService.class) - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private Long membershipId; - - @AccessFor(update = Ignored.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private String membershipDisplayLabel; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public LocalDate getDocumentDate() { - return documentDate; - } - - public void setDocumentDate(LocalDate documentDate) { - this.documentDate = documentDate; - } - - public LocalDate getValueDate() { - return valueDate; - } - - public void setValueDate(LocalDate valueDate) { - this.valueDate = valueDate; - } - - public AssetAction getAction() { - return action; - } - - public void setAction(AssetAction action) { - this.action = action; - } - - public BigDecimal getAmount() { - return amount; - } - - public void setAmount(BigDecimal amount) { - this.amount = amount; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public Long getMembershipId() { - return membershipId; - } - - public void setMembershipId(Long membershipId) { - this.membershipId = membershipId; - } - - public String getMembershipDisplayLabel() { - return membershipDisplayLabel; - } - - public void setMembershipDisplayLabel(String membershipDisplayLabel) { - this.membershipDisplayLabel = membershipDisplayLabel; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - AssetDTO assetDTO = (AssetDTO) o; - if (assetDTO.getId() == null || getId() == null) { - return false; - } - return Objects.equals(getId(), assetDTO.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "AssetDTO{" + - "id=" + getId() + - ", documentDate='" + getDocumentDate() + "'" + - ", valueDate='" + getValueDate() + "'" + - ", action='" + getAction() + "'" + - ", amount=" + getAmount() + - ", remark='" + getRemark() + "'" + - ", membership=" + getMembershipId() + - ", membershipDisplayLabel='" + getMembershipDisplayLabel() + "'" + - "}"; - } - - @JsonComponent - public static class JsonSerializer extends JsonSerializerWithAccessFilter { - - public JsonSerializer(final ApplicationContext ctx, final UserRoleAssignmentService userRoleAssignmentService) { - super(ctx, userRoleAssignmentService); - } - } - - @JsonComponent - public static class JsonDeserializer extends JsonDeserializerWithAccessFilter { - - public JsonDeserializer(final ApplicationContext ctx, final UserRoleAssignmentService userRoleAssignmentService) { - super(ctx, userRoleAssignmentService); - } - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/CustomerCriteria.java b/src/main/java/org/hostsharing/hsadminng/service/dto/CustomerCriteria.java deleted file mode 100644 index 4638eaa8..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/CustomerCriteria.java +++ /dev/null @@ -1,292 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import org.hostsharing.hsadminng.domain.enumeration.CustomerKind; -import org.hostsharing.hsadminng.domain.enumeration.VatRegion; - -import io.github.jhipster.service.filter.*; - -import java.io.Serializable; -import java.util.Objects; - -/** - * Criteria class for the Customer entity. This class is used in CustomerResource to - * receive all the possible filtering options from the Http GET request parameters. - * For example the following could be a valid requests: - * /customers?id.greaterThan=5&attr1.contains=something&attr2.specified=false - * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use - * fix type specific filters. - */ -public class CustomerCriteria implements Serializable { - - /** - * Class for filtering CustomerKind - */ - public static class CustomerKindFilter extends Filter { - } - - /** - * Class for filtering VatRegion - */ - public static class VatRegionFilter extends Filter { - } - - private static final long serialVersionUID = 1L; - - private LongFilter id; - - private IntegerFilter reference; - - private StringFilter prefix; - - private StringFilter name; - - private CustomerKindFilter kind; - - private LocalDateFilter birthDate; - - private StringFilter birthPlace; - - private StringFilter registrationCourt; - - private StringFilter registrationNumber; - - private VatRegionFilter vatRegion; - - private StringFilter vatNumber; - - private StringFilter contractualSalutation; - - private StringFilter contractualAddress; - - private StringFilter billingSalutation; - - private StringFilter billingAddress; - - private StringFilter remark; - - private LongFilter membershipId; - - private LongFilter sepamandateId; - - public LongFilter getId() { - return id; - } - - public void setId(LongFilter id) { - this.id = id; - } - - public IntegerFilter getReference() { - return reference; - } - - public void setReference(IntegerFilter reference) { - this.reference = reference; - } - - public StringFilter getPrefix() { - return prefix; - } - - public void setPrefix(StringFilter prefix) { - this.prefix = prefix; - } - - public StringFilter getName() { - return name; - } - - public void setName(StringFilter name) { - this.name = name; - } - - public CustomerKindFilter getKind() { - return kind; - } - - public void setKind(CustomerKindFilter kind) { - this.kind = kind; - } - - public LocalDateFilter getBirthDate() { - return birthDate; - } - - public void setBirthDate(LocalDateFilter birthDate) { - this.birthDate = birthDate; - } - - public StringFilter getBirthPlace() { - return birthPlace; - } - - public void setBirthPlace(StringFilter birthPlace) { - this.birthPlace = birthPlace; - } - - public StringFilter getRegistrationCourt() { - return registrationCourt; - } - - public void setRegistrationCourt(StringFilter registrationCourt) { - this.registrationCourt = registrationCourt; - } - - public StringFilter getRegistrationNumber() { - return registrationNumber; - } - - public void setRegistrationNumber(StringFilter registrationNumber) { - this.registrationNumber = registrationNumber; - } - - public VatRegionFilter getVatRegion() { - return vatRegion; - } - - public void setVatRegion(VatRegionFilter vatRegion) { - this.vatRegion = vatRegion; - } - - public StringFilter getVatNumber() { - return vatNumber; - } - - public void setVatNumber(StringFilter vatNumber) { - this.vatNumber = vatNumber; - } - - public StringFilter getContractualSalutation() { - return contractualSalutation; - } - - public void setContractualSalutation(StringFilter contractualSalutation) { - this.contractualSalutation = contractualSalutation; - } - - public StringFilter getContractualAddress() { - return contractualAddress; - } - - public void setContractualAddress(StringFilter contractualAddress) { - this.contractualAddress = contractualAddress; - } - - public StringFilter getBillingSalutation() { - return billingSalutation; - } - - public void setBillingSalutation(StringFilter billingSalutation) { - this.billingSalutation = billingSalutation; - } - - public StringFilter getBillingAddress() { - return billingAddress; - } - - public void setBillingAddress(StringFilter billingAddress) { - this.billingAddress = billingAddress; - } - - public StringFilter getRemark() { - return remark; - } - - public void setRemark(StringFilter remark) { - this.remark = remark; - } - - public LongFilter getMembershipId() { - return membershipId; - } - - public void setMembershipId(LongFilter membershipId) { - this.membershipId = membershipId; - } - - public LongFilter getSepamandateId() { - return sepamandateId; - } - - public void setSepamandateId(LongFilter sepamandateId) { - this.sepamandateId = sepamandateId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final CustomerCriteria that = (CustomerCriteria) o; - return Objects.equals(id, that.id) && - Objects.equals(reference, that.reference) && - Objects.equals(prefix, that.prefix) && - Objects.equals(name, that.name) && - Objects.equals(kind, that.kind) && - Objects.equals(birthDate, that.birthDate) && - Objects.equals(birthPlace, that.birthPlace) && - Objects.equals(registrationCourt, that.registrationCourt) && - Objects.equals(registrationNumber, that.registrationNumber) && - Objects.equals(vatRegion, that.vatRegion) && - Objects.equals(vatNumber, that.vatNumber) && - Objects.equals(contractualSalutation, that.contractualSalutation) && - Objects.equals(contractualAddress, that.contractualAddress) && - Objects.equals(billingSalutation, that.billingSalutation) && - Objects.equals(billingAddress, that.billingAddress) && - Objects.equals(remark, that.remark) && - Objects.equals(membershipId, that.membershipId) && - Objects.equals(sepamandateId, that.sepamandateId); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - reference, - prefix, - name, - kind, - birthDate, - birthPlace, - registrationCourt, - registrationNumber, - vatRegion, - vatNumber, - contractualSalutation, - contractualAddress, - billingSalutation, - billingAddress, - remark, - membershipId, - sepamandateId); - } - - @Override - public String toString() { - return "CustomerCriteria{" + - (id != null ? "id=" + id + ", " : "") + - (reference != null ? "reference=" + reference + ", " : "") + - (prefix != null ? "prefix=" + prefix + ", " : "") + - (name != null ? "name=" + name + ", " : "") + - (kind != null ? "kind=" + kind + ", " : "") + - (birthDate != null ? "birthDate=" + birthDate + ", " : "") + - (birthPlace != null ? "birthPlace=" + birthPlace + ", " : "") + - (registrationCourt != null ? "registrationCourt=" + registrationCourt + ", " : "") + - (registrationNumber != null ? "registrationNumber=" + registrationNumber + ", " : "") + - (vatRegion != null ? "vatRegion=" + vatRegion + ", " : "") + - (vatNumber != null ? "vatNumber=" + vatNumber + ", " : "") + - (contractualSalutation != null ? "contractualSalutation=" + contractualSalutation + ", " : "") + - (contractualAddress != null ? "contractualAddress=" + contractualAddress + ", " : "") + - (billingSalutation != null ? "billingSalutation=" + billingSalutation + ", " : "") + - (billingAddress != null ? "billingAddress=" + billingAddress + ", " : "") + - (remark != null ? "remark=" + remark + ", " : "") + - (membershipId != null ? "membershipId=" + membershipId + ", " : "") + - (sepamandateId != null ? "sepamandateId=" + sepamandateId + ", " : "") + - "}"; - } - -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/CustomerDTO.java b/src/main/java/org/hostsharing/hsadminng/service/dto/CustomerDTO.java deleted file mode 100644 index e4874407..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/CustomerDTO.java +++ /dev/null @@ -1,319 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import static org.hostsharing.hsadminng.service.accessfilter.Role.*; - -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.enumeration.CustomerKind; -import org.hostsharing.hsadminng.domain.enumeration.VatRegion; -import org.hostsharing.hsadminng.service.CustomerService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.*; - -import org.springframework.boot.jackson.JsonComponent; -import org.springframework.context.ApplicationContext; - -import java.time.LocalDate; -import java.util.Objects; - -import javax.validation.constraints.*; - -/** - * A DTO for the Customer entity. - */ -@EntityTypeId(Customer.ENTITY_TYPE_ID) -public class CustomerDTO implements AccessMappings, FluentBuilder { - - @SelfId(resolver = CustomerService.class) - @AccessFor(read = AnyCustomerUser.class) - private Long id; - - @NotNull - @Min(value = 10000) - @Max(value = 99999) - @AccessFor(init = Admin.class, read = AnyCustomerUser.class) - private Integer reference; - - @NotNull - @Size(max = 3) - @Pattern(regexp = "[a-z][a-z0-9]+") - @AccessFor(init = Admin.class, read = AnyCustomerUser.class) - private String prefix; - - @NotNull - @Size(max = 80) - @AccessFor(init = Admin.class, update = Admin.class, read = AnyCustomerUser.class) - private String name; - - @NotNull - @AccessFor(init = Admin.class, update = Admin.class, read = CustomerContractualContact.class) - private CustomerKind kind; - - @AccessFor( - init = Admin.class, - update = Admin.class, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate birthDate; - - @Size(max = 80) - @AccessFor( - init = Admin.class, - update = Admin.class, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private String birthPlace; - - @Size(max = 80) - @AccessFor( - init = Admin.class, - update = Admin.class, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private String registrationCourt; - - @Size(max = 80) - @AccessFor( - init = Admin.class, - update = Admin.class, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private String registrationNumber; - - @NotNull - @AccessFor( - init = Admin.class, - update = Admin.class, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private VatRegion vatRegion; - - @Size(max = 40) - @AccessFor( - init = Admin.class, - update = Admin.class, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private String vatNumber; - - @Size(max = 80) - @AccessFor(init = Admin.class, update = CustomerContractualContact.class, read = CustomerContractualContact.class) - private String contractualSalutation; - - @NotNull - @Size(max = 400) - @AccessFor(init = Admin.class, update = Admin.class, read = CustomerContractualContact.class) - private String contractualAddress; - - @Size(max = 80) - @AccessFor( - init = Admin.class, - update = { CustomerContractualContact.class, CustomerFinancialContact.class }, - read = CustomerContractualContact.class) - private String billingSalutation; - - @Size(max = 400) - @AccessFor( - init = Admin.class, - update = Admin.class, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private String billingAddress; - - @Size(max = 160) - @AccessFor(init = Admin.class, update = Supporter.class, read = Supporter.class) - private String remark; - - @AccessFor(init = Anybody.class, update = Anybody.class, read = AnyCustomerUser.class) - private String displayLabel; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Integer getReference() { - return reference; - } - - public void setReference(Integer reference) { - this.reference = reference; - } - - public String getPrefix() { - return prefix; - } - - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public CustomerKind getKind() { - return kind; - } - - public void setKind(CustomerKind kind) { - this.kind = kind; - } - - public LocalDate getBirthDate() { - return birthDate; - } - - public void setBirthDate(LocalDate birthDate) { - this.birthDate = birthDate; - } - - public String getBirthPlace() { - return birthPlace; - } - - public void setBirthPlace(String birthPlace) { - this.birthPlace = birthPlace; - } - - public String getRegistrationCourt() { - return registrationCourt; - } - - public void setRegistrationCourt(String registrationCourt) { - this.registrationCourt = registrationCourt; - } - - public String getRegistrationNumber() { - return registrationNumber; - } - - public void setRegistrationNumber(String registrationNumber) { - this.registrationNumber = registrationNumber; - } - - public VatRegion getVatRegion() { - return vatRegion; - } - - public void setVatRegion(VatRegion vatRegion) { - this.vatRegion = vatRegion; - } - - public String getVatNumber() { - return vatNumber; - } - - public void setVatNumber(String vatNumber) { - this.vatNumber = vatNumber; - } - - public String getContractualSalutation() { - return contractualSalutation; - } - - public void setContractualSalutation(String contractualSalutation) { - this.contractualSalutation = contractualSalutation; - } - - public String getContractualAddress() { - return contractualAddress; - } - - public void setContractualAddress(String contractualAddress) { - this.contractualAddress = contractualAddress; - } - - public String getBillingSalutation() { - return billingSalutation; - } - - public void setBillingSalutation(String billingSalutation) { - this.billingSalutation = billingSalutation; - } - - public String getBillingAddress() { - return billingAddress; - } - - public void setBillingAddress(String billingAddress) { - this.billingAddress = billingAddress; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public String getDisplayLabel() { - return displayLabel; - } - - public void setDisplayLabel(final String displayLabel) { - this.displayLabel = displayLabel; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - CustomerDTO customerDTO = (CustomerDTO) o; - if (customerDTO.getId() == null || getId() == null) { - return false; - } - return Objects.equals(getId(), customerDTO.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "CustomerDTO{" + - "id=" + getId() + - ", reference=" + getReference() + - ", prefix='" + getPrefix() + "'" + - ", name='" + getName() + "'" + - ", kind='" + getKind() + "'" + - ", birthDate='" + getBirthDate() + "'" + - ", birthPlace='" + getBirthPlace() + "'" + - ", registrationCourt='" + getRegistrationCourt() + "'" + - ", registrationNumber='" + getRegistrationNumber() + "'" + - ", vatRegion='" + getVatRegion() + "'" + - ", vatNumber='" + getVatNumber() + "'" + - ", contractualSalutation='" + getContractualSalutation() + "'" + - ", contractualAddress='" + getContractualAddress() + "'" + - ", billingSalutation='" + getBillingSalutation() + "'" + - ", billingAddress='" + getBillingAddress() + "'" + - ", remark='" + getRemark() + "'" + - "}"; - } - - @JsonComponent - public static class CustomerJsonSerializer extends JsonSerializerWithAccessFilter { - - public CustomerJsonSerializer(final ApplicationContext ctx, final UserRoleAssignmentService userRoleAssignmentService) { - super(ctx, userRoleAssignmentService); - } - } - - @JsonComponent - public static class CustomerJsonDeserializer extends JsonDeserializerWithAccessFilter { - - public CustomerJsonDeserializer( - final ApplicationContext ctx, - final UserRoleAssignmentService userRoleAssignmentService) { - super(ctx, userRoleAssignmentService); - } - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/FluentBuilder.java b/src/main/java/org/hostsharing/hsadminng/service/dto/FluentBuilder.java deleted file mode 100644 index 55b6e87e..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/FluentBuilder.java +++ /dev/null @@ -1,46 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import java.util.function.Consumer; - -/** - * Just 'implement' this interface in your class to get a pseudo fluent builder, no more code needed. - * - * @param class to be build (same as to which the interface was added) - */ -public interface FluentBuilder { - - /** - * Allows statements on the target instance possible as expression. - * - * This allows creating nested object structures, e.g. for test data - * in a much more readable way. - * - *

Example

- * {code - * // adding a fluent builder to your class - * class YourClass implements FluentBuilder { - * public int someField; - * public String anotherField; - * // ... - * } - * - * // using the fluent builder somewhere else - * someMethod( new YourClass().with( it -> { - * it.someField = 5; - * it.anotherField = "Hello"; - * })); - * } - * - * @param builderFunction statements to apply to 'this' - * - * @return the instance on which 'with(...)' was executed. - */ - @SuppressWarnings("unchecked") - default T with( - Consumer builderFunction) { - builderFunction.accept((T) this); - return (T) this; - } - -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/MembershipCriteria.java b/src/main/java/org/hostsharing/hsadminng/service/dto/MembershipCriteria.java deleted file mode 100644 index c8ec2bf8..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/MembershipCriteria.java +++ /dev/null @@ -1,163 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import io.github.jhipster.service.filter.Filter; -import io.github.jhipster.service.filter.LocalDateFilter; -import io.github.jhipster.service.filter.LongFilter; -import io.github.jhipster.service.filter.StringFilter; - -import java.io.Serializable; -import java.util.Objects; - -/** - * Criteria class for the Membership entity. This class is used in MembershipResource to - * receive all the possible filtering options from the Http GET request parameters. - * For example the following could be a valid requests: - * /memberships?id.greaterThan=5&attr1.contains=something&attr2.specified=false - * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use - * fix type specific filters. - */ -public class MembershipCriteria implements Serializable { - - private static final long serialVersionUID = 1L; - - private LongFilter id; - - private LocalDateFilter admissionDocumentDate; - - private LocalDateFilter cancellationDocumentDate; - - private LocalDateFilter memberFromDate; - - private LocalDateFilter memberUntilDate; - - private StringFilter remark; - - private LongFilter shareId; - - private LongFilter assetId; - - private LongFilter customerId; - - public LongFilter getId() { - return id; - } - - public void setId(LongFilter id) { - this.id = id; - } - - public LocalDateFilter getAdmissionDocumentDate() { - return admissionDocumentDate; - } - - public void setAdmissionDocumentDate(LocalDateFilter admissionDocumentDate) { - this.admissionDocumentDate = admissionDocumentDate; - } - - public LocalDateFilter getCancellationDocumentDate() { - return cancellationDocumentDate; - } - - public void setCancellationDocumentDate(LocalDateFilter cancellationDocumentDate) { - this.cancellationDocumentDate = cancellationDocumentDate; - } - - public LocalDateFilter getMemberFromDate() { - return memberFromDate; - } - - public void setMemberFromDate(LocalDateFilter memberFromDate) { - this.memberFromDate = memberFromDate; - } - - public LocalDateFilter getMemberUntilDate() { - return memberUntilDate; - } - - public void setMemberUntilDate(LocalDateFilter memberUntilDate) { - this.memberUntilDate = memberUntilDate; - } - - public StringFilter getRemark() { - return remark; - } - - public void setRemark(StringFilter remark) { - this.remark = remark; - } - - public LongFilter getShareId() { - return shareId; - } - - public void setShareId(LongFilter shareId) { - this.shareId = shareId; - } - - public LongFilter getAssetId() { - return assetId; - } - - public void setAssetId(LongFilter assetId) { - this.assetId = assetId; - } - - public LongFilter getCustomerId() { - return customerId; - } - - public void setCustomerId(LongFilter customerId) { - this.customerId = customerId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final MembershipCriteria that = (MembershipCriteria) o; - return Objects.equals(id, that.id) && - Objects.equals(admissionDocumentDate, that.admissionDocumentDate) && - Objects.equals(cancellationDocumentDate, that.cancellationDocumentDate) && - Objects.equals(memberFromDate, that.memberFromDate) && - Objects.equals(memberUntilDate, that.memberUntilDate) && - Objects.equals(remark, that.remark) && - Objects.equals(shareId, that.shareId) && - Objects.equals(assetId, that.assetId) && - Objects.equals(customerId, that.customerId); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - admissionDocumentDate, - cancellationDocumentDate, - memberFromDate, - memberUntilDate, - remark, - shareId, - assetId, - customerId); - } - - @Override - public String toString() { - return "MembershipCriteria{" + - (id != null ? "id=" + id + ", " : "") + - (admissionDocumentDate != null ? "admissionDocumentDate=" + admissionDocumentDate + ", " : "") + - (cancellationDocumentDate != null ? "cancellationDocumentDate=" + cancellationDocumentDate + ", " : "") + - (memberFromDate != null ? "memberFromDate=" + memberFromDate + ", " : "") + - (memberUntilDate != null ? "memberUntilDate=" + memberUntilDate + ", " : "") + - (remark != null ? "remark=" + remark + ", " : "") + - (shareId != null ? "shareId=" + shareId + ", " : "") + - (assetId != null ? "assetId=" + assetId + ", " : "") + - (customerId != null ? "customerId=" + customerId + ", " : "") + - "}"; - } - -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/MembershipDTO.java b/src/main/java/org/hostsharing/hsadminng/service/dto/MembershipDTO.java deleted file mode 100644 index cbe93fc5..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/MembershipDTO.java +++ /dev/null @@ -1,203 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.service.CustomerService; -import org.hostsharing.hsadminng.service.MembershipService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.*; -import org.hostsharing.hsadminng.service.accessfilter.Role.*; - -import org.springframework.boot.jackson.JsonComponent; -import org.springframework.context.ApplicationContext; - -import java.time.LocalDate; -import java.util.Objects; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -/** - * A DTO for the Membership entity. - */ -@EntityTypeId(Membership.ENTITY_TYPE_ID) -public class MembershipDTO implements AccessMappings, FluentBuilder { - - @SelfId(resolver = MembershipService.class) - @AccessFor(read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private Long id; - - @NotNull - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate admissionDocumentDate; - - @AccessFor( - init = Admin.class, - update = Admin.class, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate cancellationDocumentDate; - - @NotNull - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate memberFromDate; - - @AccessFor( - init = Admin.class, - update = Admin.class, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate memberUntilDate; - - @Size(max = 160) - @AccessFor(init = Admin.class, update = Admin.class, read = Supporter.class) - private String remark; - - @ParentId(resolver = CustomerService.class) - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private Long customerId; - - @AccessFor(update = Ignored.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private String customerPrefix; - - @AccessFor(update = Ignored.class, read = CustomerFinancialContact.class) - private String customerDisplayLabel; - - @AccessFor(update = Ignored.class, read = CustomerFinancialContact.class) - private String displayLabel; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public LocalDate getAdmissionDocumentDate() { - return admissionDocumentDate; - } - - public void setAdmissionDocumentDate(LocalDate admissionDocumentDate) { - this.admissionDocumentDate = admissionDocumentDate; - } - - public LocalDate getCancellationDocumentDate() { - return cancellationDocumentDate; - } - - public void setCancellationDocumentDate(LocalDate cancellationDocumentDate) { - this.cancellationDocumentDate = cancellationDocumentDate; - } - - public LocalDate getMemberFromDate() { - return memberFromDate; - } - - public void setMemberFromDate(LocalDate memberFromDate) { - this.memberFromDate = memberFromDate; - } - - public LocalDate getMemberUntilDate() { - return memberUntilDate; - } - - public void setMemberUntilDate(LocalDate memberUntilDate) { - this.memberUntilDate = memberUntilDate; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public Long getCustomerId() { - return customerId; - } - - public void setCustomerId(Long customerId) { - this.customerId = customerId; - } - - public String getCustomerPrefix() { - return customerPrefix; - } - - public void setCustomerPrefix(String customerPrefix) { - this.customerPrefix = customerPrefix; - } - - public String getCustomerDisplayLabel() { - return customerDisplayLabel; - } - - public void setCustomerDisplayLabel(final String customerDisplayLabel) { - this.customerDisplayLabel = customerDisplayLabel; - } - - public String getDisplayLabel() { - return displayLabel; - } - - public void setDisplayLabel(final String displayLabel) { - this.displayLabel = displayLabel; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - MembershipDTO membershipDTO = (MembershipDTO) o; - if (membershipDTO.getId() == null || getId() == null) { - return false; - } - return Objects.equals(getId(), membershipDTO.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "MembershipDTO{" + - "id=" + getId() + - ", admissionDocumentDate='" + getAdmissionDocumentDate() + "'" + - ", cancellationDocumentDate='" + getCancellationDocumentDate() + "'" + - ", memberFromDate='" + getMemberFromDate() + "'" + - ", memberUntilDate='" + getMemberUntilDate() + "'" + - ", remark='" + getRemark() + "'" + - ", customer=" + getCustomerId() + - ", customerPrefix='" + getCustomerPrefix() + "'" + - ", customerDisplayLabel='" + getCustomerDisplayLabel() + "'" + - ", displayLabel='" + getDisplayLabel() + "'" + - "}"; - } - - @JsonComponent - public static class JsonSerializer extends JsonSerializerWithAccessFilter { - - public JsonSerializer( - final ApplicationContext ctx, - final UserRoleAssignmentService userRoleAssignmentService) { - super(ctx, userRoleAssignmentService); - } - } - - @JsonComponent - public static class JsonDeserializer extends JsonDeserializerWithAccessFilter { - - public JsonDeserializer( - final ApplicationContext ctx, - final UserRoleAssignmentService userRoleAssignmentService) { - super(ctx, userRoleAssignmentService); - } - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/PasswordChangeDTO.java b/src/main/java/org/hostsharing/hsadminng/service/dto/PasswordChangeDTO.java deleted file mode 100644 index 356c1a1b..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/PasswordChangeDTO.java +++ /dev/null @@ -1,37 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -/** - * A DTO representing a password change required data - current and new password. - */ -public class PasswordChangeDTO { - - private String currentPassword; - private String newPassword; - - public PasswordChangeDTO() { - // Empty constructor needed for Jackson. - } - - public PasswordChangeDTO(String currentPassword, String newPassword) { - this.currentPassword = currentPassword; - this.newPassword = newPassword; - } - - public String getCurrentPassword() { - - return currentPassword; - } - - public void setCurrentPassword(String currentPassword) { - this.currentPassword = currentPassword; - } - - public String getNewPassword() { - return newPassword; - } - - public void setNewPassword(String newPassword) { - this.newPassword = newPassword; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/SepaMandateCriteria.java b/src/main/java/org/hostsharing/hsadminng/service/dto/SepaMandateCriteria.java deleted file mode 100644 index 39488003..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/SepaMandateCriteria.java +++ /dev/null @@ -1,189 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import io.github.jhipster.service.filter.Filter; -import io.github.jhipster.service.filter.LocalDateFilter; -import io.github.jhipster.service.filter.LongFilter; -import io.github.jhipster.service.filter.StringFilter; - -import java.io.Serializable; -import java.util.Objects; - -/** - * Criteria class for the SepaMandate entity. This class is used in SepaMandateResource to - * receive all the possible filtering options from the Http GET request parameters. - * For example the following could be a valid requests: - * /sepa-mandates?id.greaterThan=5&attr1.contains=something&attr2.specified=false - * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use - * fix type specific filters. - */ -public class SepaMandateCriteria implements Serializable { - - private static final long serialVersionUID = 1L; - - private LongFilter id; - - private StringFilter reference; - - private StringFilter iban; - - private StringFilter bic; - - private LocalDateFilter grantingDocumentDate; - - private LocalDateFilter revokationDocumentDate; - - private LocalDateFilter validFromDate; - - private LocalDateFilter validUntilDate; - - private LocalDateFilter lastUsedDate; - - private StringFilter remark; - - private LongFilter customerId; - - public LongFilter getId() { - return id; - } - - public void setId(LongFilter id) { - this.id = id; - } - - public StringFilter getReference() { - return reference; - } - - public void setReference(StringFilter reference) { - this.reference = reference; - } - - public StringFilter getIban() { - return iban; - } - - public void setIban(StringFilter iban) { - this.iban = iban; - } - - public StringFilter getBic() { - return bic; - } - - public void setBic(StringFilter bic) { - this.bic = bic; - } - - public LocalDateFilter getGrantingDocumentDate() { - return grantingDocumentDate; - } - - public void setGrantingDocumentDate(LocalDateFilter grantingDocumentDate) { - this.grantingDocumentDate = grantingDocumentDate; - } - - public LocalDateFilter getRevokationDocumentDate() { - return revokationDocumentDate; - } - - public void setRevokationDocumentDate(LocalDateFilter revokationDocumentDate) { - this.revokationDocumentDate = revokationDocumentDate; - } - - public LocalDateFilter getValidFromDate() { - return validFromDate; - } - - public void setValidFromDate(LocalDateFilter validFromDate) { - this.validFromDate = validFromDate; - } - - public LocalDateFilter getValidUntilDate() { - return validUntilDate; - } - - public void setValidUntilDate(LocalDateFilter validUntilDate) { - this.validUntilDate = validUntilDate; - } - - public LocalDateFilter getLastUsedDate() { - return lastUsedDate; - } - - public void setLastUsedDate(LocalDateFilter lastUsedDate) { - this.lastUsedDate = lastUsedDate; - } - - public StringFilter getRemark() { - return remark; - } - - public void setRemark(StringFilter remark) { - this.remark = remark; - } - - public LongFilter getCustomerId() { - return customerId; - } - - public void setCustomerId(LongFilter customerId) { - this.customerId = customerId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final SepaMandateCriteria that = (SepaMandateCriteria) o; - return Objects.equals(id, that.id) && - Objects.equals(reference, that.reference) && - Objects.equals(iban, that.iban) && - Objects.equals(bic, that.bic) && - Objects.equals(grantingDocumentDate, that.grantingDocumentDate) && - Objects.equals(revokationDocumentDate, that.revokationDocumentDate) && - Objects.equals(validFromDate, that.validFromDate) && - Objects.equals(validUntilDate, that.validUntilDate) && - Objects.equals(lastUsedDate, that.lastUsedDate) && - Objects.equals(remark, that.remark) && - Objects.equals(customerId, that.customerId); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - reference, - iban, - bic, - grantingDocumentDate, - revokationDocumentDate, - validFromDate, - validUntilDate, - lastUsedDate, - remark, - customerId); - } - - @Override - public String toString() { - return "SepaMandateCriteria{" + - (id != null ? "id=" + id + ", " : "") + - (reference != null ? "reference=" + reference + ", " : "") + - (iban != null ? "iban=" + iban + ", " : "") + - (bic != null ? "bic=" + bic + ", " : "") + - (grantingDocumentDate != null ? "grantingDocumentDate=" + grantingDocumentDate + ", " : "") + - (revokationDocumentDate != null ? "revokationDocumentDate=" + revokationDocumentDate + ", " : "") + - (validFromDate != null ? "validFromDate=" + validFromDate + ", " : "") + - (validUntilDate != null ? "validUntilDate=" + validUntilDate + ", " : "") + - (lastUsedDate != null ? "lastUsedDate=" + lastUsedDate + ", " : "") + - (remark != null ? "remark=" + remark + ", " : "") + - (customerId != null ? "customerId=" + customerId + ", " : "") + - "}"; - } - -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/SepaMandateDTO.java b/src/main/java/org/hostsharing/hsadminng/service/dto/SepaMandateDTO.java deleted file mode 100644 index 1250b4d8..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/SepaMandateDTO.java +++ /dev/null @@ -1,242 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import org.hostsharing.hsadminng.domain.SepaMandate; -import org.hostsharing.hsadminng.service.CustomerService; -import org.hostsharing.hsadminng.service.SepaMandateService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.*; -import org.hostsharing.hsadminng.service.accessfilter.Role.*; - -import org.springframework.boot.jackson.JsonComponent; -import org.springframework.context.ApplicationContext; - -import java.time.LocalDate; -import java.util.Objects; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -/** - * A DTO for the SepaMandate entity. - */ -@EntityTypeId(SepaMandate.ENTITY_TYPE_ID) -public class SepaMandateDTO implements AccessMappings, FluentBuilder { - - @SelfId(resolver = SepaMandateService.class) - @AccessFor(read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private Long id; - - @NotNull - @Size(max = 40) - @AccessFor( - init = { CustomerContractualContact.class, CustomerFinancialContact.class }, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private String reference; - - @Size(max = 34) - @AccessFor( - init = { CustomerContractualContact.class, CustomerFinancialContact.class }, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private String iban; - - @Size(max = 11) - @AccessFor( - init = { CustomerContractualContact.class, CustomerFinancialContact.class }, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private String bic; - - @NotNull - @AccessFor( - init = { CustomerContractualContact.class, CustomerFinancialContact.class }, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate grantingDocumentDate; - - @AccessFor( - init = Admin.class, - update = { CustomerContractualContact.class, CustomerFinancialContact.class }, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate revokationDocumentDate; - - @NotNull - @AccessFor( - init = { CustomerContractualContact.class, CustomerFinancialContact.class }, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate validFromDate; - - @AccessFor( - init = { CustomerContractualContact.class, CustomerFinancialContact.class }, - update = { CustomerContractualContact.class, CustomerFinancialContact.class }, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate validUntilDate; - - @AccessFor( - init = Admin.class, - update = Admin.class, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate lastUsedDate; - - @Size(max = 160) - @AccessFor(init = Admin.class, update = Supporter.class, read = Supporter.class) - private String remark; - - @ParentId(resolver = CustomerService.class) - @AccessFor( - init = { CustomerContractualContact.class, CustomerFinancialContact.class }, - read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private Long customerId; - - @AccessFor(update = Ignored.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private String customerDisplayLabel; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getReference() { - return reference; - } - - public void setReference(String reference) { - this.reference = reference; - } - - public String getIban() { - return iban; - } - - public void setIban(String iban) { - this.iban = iban; - } - - public String getBic() { - return bic; - } - - public void setBic(String bic) { - this.bic = bic; - } - - public LocalDate getGrantingDocumentDate() { - return grantingDocumentDate; - } - - public void setGrantingDocumentDate(LocalDate grantingDocumentDate) { - this.grantingDocumentDate = grantingDocumentDate; - } - - public LocalDate getRevokationDocumentDate() { - return revokationDocumentDate; - } - - public void setRevokationDocumentDate(LocalDate revokationDocumentDate) { - this.revokationDocumentDate = revokationDocumentDate; - } - - public LocalDate getValidFromDate() { - return validFromDate; - } - - public void setValidFromDate(LocalDate validFromDate) { - this.validFromDate = validFromDate; - } - - public LocalDate getValidUntilDate() { - return validUntilDate; - } - - public void setValidUntilDate(LocalDate validUntilDate) { - this.validUntilDate = validUntilDate; - } - - public LocalDate getLastUsedDate() { - return lastUsedDate; - } - - public void setLastUsedDate(LocalDate lastUsedDate) { - this.lastUsedDate = lastUsedDate; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public Long getCustomerId() { - return customerId; - } - - public void setCustomerId(Long customerId) { - this.customerId = customerId; - } - - public String getCustomerDisplayLabel() { - return customerDisplayLabel; - } - - public void setCustomerDisplayLabel(String customerDisplayLabel) { - this.customerDisplayLabel = customerDisplayLabel; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - SepaMandateDTO sepaMandateDTO = (SepaMandateDTO) o; - if (sepaMandateDTO.getId() == null || getId() == null) { - return false; - } - return Objects.equals(getId(), sepaMandateDTO.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "SepaMandateDTO{" + - "id=" + getId() + - ", reference='" + getReference() + "'" + - ", iban='" + getIban() + "'" + - ", bic='" + getBic() + "'" + - ", grantingDocumentDate='" + getGrantingDocumentDate() + "'" + - ", revokationDocumentDate='" + getRevokationDocumentDate() + "'" + - ", validFromDate='" + getValidFromDate() + "'" + - ", validUntilDate='" + getValidUntilDate() + "'" + - ", lastUsedDate='" + getLastUsedDate() + "'" + - ", remark='" + getRemark() + "'" + - ", customer=" + getCustomerId() + - ", customerDisplayLabel='" + getCustomerDisplayLabel() + "'" + - "}"; - } - - @JsonComponent - public static class JsonSerializer extends JsonSerializerWithAccessFilter { - - public JsonSerializer(final ApplicationContext ctx, final UserRoleAssignmentService userRoleAssignmentService) { - super(ctx, userRoleAssignmentService); - } - } - - @JsonComponent - public static class JsonDeserializer extends JsonDeserializerWithAccessFilter { - - public JsonDeserializer(final ApplicationContext ctx, final UserRoleAssignmentService userRoleAssignmentService) { - super(ctx, userRoleAssignmentService); - } - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/ShareCriteria.java b/src/main/java/org/hostsharing/hsadminng/service/dto/ShareCriteria.java deleted file mode 100644 index e2fd56af..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/ShareCriteria.java +++ /dev/null @@ -1,146 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import org.hostsharing.hsadminng.domain.enumeration.ShareAction; - -import io.github.jhipster.service.filter.Filter; -import io.github.jhipster.service.filter.IntegerFilter; -import io.github.jhipster.service.filter.LocalDateFilter; -import io.github.jhipster.service.filter.LongFilter; -import io.github.jhipster.service.filter.StringFilter; - -import java.io.Serializable; -import java.util.Objects; - -/** - * Criteria class for the Share entity. This class is used in ShareResource to - * receive all the possible filtering options from the Http GET request parameters. - * For example the following could be a valid requests: - * /shares?id.greaterThan=5&attr1.contains=something&attr2.specified=false - * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use - * fix type specific filters. - */ -public class ShareCriteria implements Serializable { - - /** - * Class for filtering ShareAction - */ - public static class ShareActionFilter extends Filter { - } - - private static final long serialVersionUID = 1L; - - private LongFilter id; - - private LocalDateFilter documentDate; - - private LocalDateFilter valueDate; - - private ShareActionFilter action; - - private IntegerFilter quantity; - - private StringFilter remark; - - private LongFilter membershipId; - - public LongFilter getId() { - return id; - } - - public void setId(LongFilter id) { - this.id = id; - } - - public LocalDateFilter getDocumentDate() { - return documentDate; - } - - public void setDocumentDate(LocalDateFilter documentDate) { - this.documentDate = documentDate; - } - - public LocalDateFilter getValueDate() { - return valueDate; - } - - public void setValueDate(LocalDateFilter valueDate) { - this.valueDate = valueDate; - } - - public ShareActionFilter getAction() { - return action; - } - - public void setAction(ShareActionFilter action) { - this.action = action; - } - - public IntegerFilter getQuantity() { - return quantity; - } - - public void setQuantity(IntegerFilter quantity) { - this.quantity = quantity; - } - - public StringFilter getRemark() { - return remark; - } - - public void setRemark(StringFilter remark) { - this.remark = remark; - } - - public LongFilter getMembershipId() { - return membershipId; - } - - public void setMembershipId(LongFilter membershipId) { - this.membershipId = membershipId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final ShareCriteria that = (ShareCriteria) o; - return Objects.equals(id, that.id) && - Objects.equals(documentDate, that.documentDate) && - Objects.equals(valueDate, that.valueDate) && - Objects.equals(action, that.action) && - Objects.equals(quantity, that.quantity) && - Objects.equals(remark, that.remark) && - Objects.equals(membershipId, that.membershipId); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - documentDate, - valueDate, - action, - quantity, - remark, - membershipId); - } - - @Override - public String toString() { - return "ShareCriteria{" + - (id != null ? "id=" + id + ", " : "") + - (documentDate != null ? "documentDate=" + documentDate + ", " : "") + - (valueDate != null ? "valueDate=" + valueDate + ", " : "") + - (action != null ? "action=" + action + ", " : "") + - (quantity != null ? "quantity=" + quantity + ", " : "") + - (remark != null ? "remark=" + remark + ", " : "") + - (membershipId != null ? "membershipId=" + membershipId + ", " : "") + - "}"; - } - -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/ShareDTO.java b/src/main/java/org/hostsharing/hsadminng/service/dto/ShareDTO.java deleted file mode 100644 index 39193e90..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/ShareDTO.java +++ /dev/null @@ -1,173 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import org.hostsharing.hsadminng.domain.Share; -import org.hostsharing.hsadminng.domain.enumeration.ShareAction; -import org.hostsharing.hsadminng.service.MembershipService; -import org.hostsharing.hsadminng.service.ShareService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.*; -import org.hostsharing.hsadminng.service.accessfilter.Role.*; - -import org.springframework.boot.jackson.JsonComponent; -import org.springframework.context.ApplicationContext; - -import java.io.Serializable; -import java.time.LocalDate; -import java.util.Objects; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -/** - * A DTO for the Share entity. - */ -@EntityTypeId(Share.ENTITY_TYPE_ID) -public class ShareDTO implements Serializable, AccessMappings { - - @SelfId(resolver = ShareService.class) - @AccessFor(read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private Long id; - - @NotNull - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate documentDate; - - @NotNull - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private LocalDate valueDate; - - @NotNull - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private ShareAction action; - - @NotNull - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private Integer quantity; - - @Size(max = 160) - @AccessFor(init = Admin.class, update = Admin.class, read = Supporter.class) - private String remark; - - @ParentId(resolver = MembershipService.class) - @AccessFor(init = Admin.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private Long membershipId; - - @AccessFor(update = Ignored.class, read = { CustomerContractualContact.class, CustomerFinancialContact.class }) - private String membershipDisplayLabel; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public LocalDate getDocumentDate() { - return documentDate; - } - - public void setDocumentDate(LocalDate documentDate) { - this.documentDate = documentDate; - } - - public LocalDate getValueDate() { - return valueDate; - } - - public void setValueDate(LocalDate valueDate) { - this.valueDate = valueDate; - } - - public ShareAction getAction() { - return action; - } - - public void setAction(ShareAction action) { - this.action = action; - } - - public Integer getQuantity() { - return quantity; - } - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public Long getMembershipId() { - return membershipId; - } - - public void setMembershipId(Long membershipId) { - this.membershipId = membershipId; - } - - public String getMembershipDisplayLabel() { - return membershipDisplayLabel; - } - - public void setMembershipDisplayLabel(String membershipDisplayLabel) { - this.membershipDisplayLabel = membershipDisplayLabel; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - ShareDTO shareDTO = (ShareDTO) o; - if (shareDTO.getId() == null || getId() == null) { - return false; - } - return Objects.equals(getId(), shareDTO.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "ShareDTO{" + - "id=" + getId() + - ", documentDate='" + getDocumentDate() + "'" + - ", valueDate='" + getValueDate() + "'" + - ", action='" + getAction() + "'" + - ", quantity=" + getQuantity() + - ", remark='" + getRemark() + "'" + - ", membership=" + getMembershipId() + - ", membershipDisplayLabel='" + getMembershipDisplayLabel() + "'" + - "}"; - } - - @JsonComponent - public static class JsonSerializer extends JsonSerializerWithAccessFilter { - - public JsonSerializer(final ApplicationContext ctx, final UserRoleAssignmentService userRoleAssignmentService) { - super(ctx, userRoleAssignmentService); - } - } - - @JsonComponent - public static class JsonDeserializer extends JsonDeserializerWithAccessFilter { - - public JsonDeserializer(final ApplicationContext ctx, final UserRoleAssignmentService userRoleAssignmentService) { - super(ctx, userRoleAssignmentService); - } - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/UserDTO.java b/src/main/java/org/hostsharing/hsadminng/service/dto/UserDTO.java deleted file mode 100644 index fc9db9e0..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/UserDTO.java +++ /dev/null @@ -1,200 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import org.hostsharing.hsadminng.config.Constants; -import org.hostsharing.hsadminng.domain.Authority; -import org.hostsharing.hsadminng.domain.User; - -import java.time.Instant; -import java.util.Set; -import java.util.stream.Collectors; - -import javax.validation.constraints.*; -import javax.validation.constraints.Email; -import javax.validation.constraints.NotBlank; - -/** - * A DTO representing a user, with his authorities. - */ -public class UserDTO { - - private Long id; - - @NotBlank - @Pattern(regexp = Constants.LOGIN_REGEX) - @Size(min = 1, max = 50) - private String login; - - @Size(max = 50) - private String firstName; - - @Size(max = 50) - private String lastName; - - @Email - @Size(min = 5, max = 254) - private String email; - - @Size(max = 256) - private String imageUrl; - - private boolean activated = false; - - @Size(min = 2, max = 6) - private String langKey; - - private String createdBy; - - private Instant createdDate; - - private String lastModifiedBy; - - private Instant lastModifiedDate; - - private Set authorities; - - public UserDTO() { - // Empty constructor needed for Jackson. - } - - public UserDTO(User user) { - this.id = user.getId(); - this.login = user.getLogin(); - this.firstName = user.getFirstName(); - this.lastName = user.getLastName(); - this.email = user.getEmail(); - this.activated = user.getActivated(); - this.imageUrl = user.getImageUrl(); - this.langKey = user.getLangKey(); - this.createdBy = user.getCreatedBy(); - this.createdDate = user.getCreatedDate(); - this.lastModifiedBy = user.getLastModifiedBy(); - this.lastModifiedDate = user.getLastModifiedDate(); - this.authorities = user.getAuthorities() - .stream() - .map(Authority::getName) - .collect(Collectors.toSet()); - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getLogin() { - return login; - } - - public void setLogin(String login) { - this.login = login; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getImageUrl() { - return imageUrl; - } - - public void setImageUrl(String imageUrl) { - this.imageUrl = imageUrl; - } - - public boolean isActivated() { - return activated; - } - - public void setActivated(boolean activated) { - this.activated = activated; - } - - public String getLangKey() { - return langKey; - } - - public void setLangKey(String langKey) { - this.langKey = langKey; - } - - public String getCreatedBy() { - return createdBy; - } - - public void setCreatedBy(String createdBy) { - this.createdBy = createdBy; - } - - public Instant getCreatedDate() { - return createdDate; - } - - public void setCreatedDate(Instant createdDate) { - this.createdDate = createdDate; - } - - public String getLastModifiedBy() { - return lastModifiedBy; - } - - public void setLastModifiedBy(String lastModifiedBy) { - this.lastModifiedBy = lastModifiedBy; - } - - public Instant getLastModifiedDate() { - return lastModifiedDate; - } - - public void setLastModifiedDate(Instant lastModifiedDate) { - this.lastModifiedDate = lastModifiedDate; - } - - public Set getAuthorities() { - return authorities; - } - - public void setAuthorities(Set authorities) { - this.authorities = authorities; - } - - @Override - public String toString() { - return "UserDTO{" + - "login='" + login + '\'' + - ", firstName='" + firstName + '\'' + - ", lastName='" + lastName + '\'' + - ", email='" + email + '\'' + - ", imageUrl='" + imageUrl + '\'' + - ", activated=" + activated + - ", langKey='" + langKey + '\'' + - ", createdBy=" + createdBy + - ", createdDate=" + createdDate + - ", lastModifiedBy='" + lastModifiedBy + '\'' + - ", lastModifiedDate=" + lastModifiedDate + - ", authorities=" + authorities + - "}"; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/UserRoleAssignmentCriteria.java b/src/main/java/org/hostsharing/hsadminng/service/dto/UserRoleAssignmentCriteria.java deleted file mode 100644 index e1d7f98e..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/UserRoleAssignmentCriteria.java +++ /dev/null @@ -1,110 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import io.github.jhipster.service.filter.Filter; -import io.github.jhipster.service.filter.LongFilter; -import io.github.jhipster.service.filter.StringFilter; - -import java.io.Serializable; -import java.util.Objects; - -/** - * Criteria class for the UserRoleAssignment entity. This class is used in UserRoleAssignmentResource to - * receive all the possible filtering options from the Http GET request parameters. - * For example the following could be a valid requests: - * /user-role-assignments?id.greaterThan=5&attr1.contains=something&attr2.specified=false - * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use - * fix type specific filters. - */ -public class UserRoleAssignmentCriteria implements Serializable { - - private static final long serialVersionUID = 1L; - - private LongFilter id; - - private StringFilter entityTypeId; - - private LongFilter entityObjectId; - - private StringFilter assignedRole; - - private LongFilter userId; - - public LongFilter getId() { - return id; - } - - public void setId(LongFilter id) { - this.id = id; - } - - public StringFilter getEntityTypeId() { - return entityTypeId; - } - - public void setEntityTypeId(StringFilter entityTypeId) { - this.entityTypeId = entityTypeId; - } - - public LongFilter getEntityObjectId() { - return entityObjectId; - } - - public void setEntityObjectId(LongFilter entityObjectId) { - this.entityObjectId = entityObjectId; - } - - public StringFilter getAssignedRole() { - return assignedRole; - } - - public void setAssignedRole(StringFilter assignedRole) { - this.assignedRole = assignedRole; - } - - public LongFilter getUserId() { - return userId; - } - - public void setUserId(LongFilter userId) { - this.userId = userId; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - final UserRoleAssignmentCriteria that = (UserRoleAssignmentCriteria) o; - return Objects.equals(id, that.id) && - Objects.equals(entityTypeId, that.entityTypeId) && - Objects.equals(entityObjectId, that.entityObjectId) && - Objects.equals(assignedRole, that.assignedRole) && - Objects.equals(userId, that.userId); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - entityTypeId, - entityObjectId, - assignedRole, - userId); - } - - @Override - public String toString() { - return "UserRoleAssignmentCriteria{" + - (id != null ? "id=" + id + ", " : "") + - (entityTypeId != null ? "entityTypeId=" + entityTypeId + ", " : "") + - (entityObjectId != null ? "entityObjectId=" + entityObjectId + ", " : "") + - (assignedRole != null ? "assignedRole=" + assignedRole + ", " : "") + - (userId != null ? "userId=" + userId + ", " : "") + - "}"; - } - -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/dto/package-info.java b/src/main/java/org/hostsharing/hsadminng/service/dto/package-info.java deleted file mode 100644 index c680295c..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/dto/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Data Transfer Objects. - */ -package org.hostsharing.hsadminng.service.dto; diff --git a/src/main/java/org/hostsharing/hsadminng/service/mapper/AssetMapper.java b/src/main/java/org/hostsharing/hsadminng/service/mapper/AssetMapper.java deleted file mode 100644 index 846405b5..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/mapper/AssetMapper.java +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.mapper; - -import org.hostsharing.hsadminng.domain.Asset; -import org.hostsharing.hsadminng.service.dto.AssetDTO; - -import org.mapstruct.AfterMapping; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.MappingTarget; - -/** - * Mapper for the entity Asset and its DTO AssetDTO. - */ -@Mapper(componentModel = "spring", uses = { MembershipMapper.class }) -public interface AssetMapper extends EntityMapper { - - @Mapping(source = "membership.id", target = "membershipId") - @Mapping(target = "membershipDisplayLabel", ignore = true) - AssetDTO toDto(Asset asset); - - @AfterMapping - default void setMembershipDisplayLabel(final @MappingTarget AssetDTO dto, final Asset entity) { - dto.setMembershipDisplayLabel(MembershipMapper.displayLabel(entity.getMembership())); - } - - @Mapping(source = "membershipId", target = "membership") - Asset toEntity(AssetDTO assetDTO); - - default Asset fromId(Long id) { - if (id == null) { - return null; - } - Asset asset = new Asset(); - asset.setId(id); - return asset; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/mapper/CustomerMapper.java b/src/main/java/org/hostsharing/hsadminng/service/mapper/CustomerMapper.java deleted file mode 100644 index 8664992c..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/mapper/CustomerMapper.java +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.mapper; - -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.service.dto.CustomerDTO; - -import org.mapstruct.AfterMapping; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.MappingTarget; - -/** - * Mapper for the entity Customer and its DTO CustomerDTO. - */ -@Mapper(componentModel = "spring", uses = {}) -public interface CustomerMapper extends EntityMapper { - - static String displayLabel(Customer customer) { - return customer.getName() - + " [" + customer.getReference() + ":" + customer.getPrefix() + "]"; - } - - @Mapping(target = "displayLabel", ignore = true) - CustomerDTO toDto(Customer customer); - - @AfterMapping - default void setDisplayLabel(final @MappingTarget CustomerDTO dto, final Customer entity) { - dto.setDisplayLabel(displayLabel(entity)); - } - - @Mapping(target = "memberships", ignore = true) - @Mapping(target = "sepamandates", ignore = true) - Customer toEntity(CustomerDTO customerDTO); - - default Customer fromId(Long id) { - if (id == null) { - return null; - } - Customer customer = new Customer(); - customer.setId(id); - return customer; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/mapper/EntityMapper.java b/src/main/java/org/hostsharing/hsadminng/service/mapper/EntityMapper.java deleted file mode 100644 index 323e6639..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/mapper/EntityMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.mapper; - -import java.util.List; - -/** - * Contract for a generic dto to entity mapper. - * - * @param - DTO type parameter. - * @param - Entity type parameter. - */ - -public interface EntityMapper { - - E toEntity(D dto); - - D toDto(E entity); - - List toEntity(List dtoList); - - List toDto(List entityList); -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/mapper/MembershipMapper.java b/src/main/java/org/hostsharing/hsadminng/service/mapper/MembershipMapper.java deleted file mode 100644 index 36f731f7..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/mapper/MembershipMapper.java +++ /dev/null @@ -1,55 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.mapper; - -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.service.dto.MembershipDTO; - -import org.mapstruct.AfterMapping; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.MappingTarget; - -import java.util.Objects; - -/** - * Mapper for the entity Membership and its DTO MembershipDTO. - */ -@Mapper(componentModel = "spring", uses = { CustomerMapper.class }) -public interface MembershipMapper extends EntityMapper { - - static String displayLabel(final Membership entity) { - final Customer customer = entity.getCustomer(); - return CustomerMapper.displayLabel(customer) + " " - + Objects.toString(entity.getMemberFromDate(), "") + " - " - + Objects.toString(entity.getMemberUntilDate(), "..."); - } - - @Mapping(source = "customer.id", target = "customerId") - @Mapping(source = "customer.prefix", target = "customerPrefix") - @Mapping(target = "displayLabel", ignore = true) - @Mapping(target = "customerDisplayLabel", ignore = true) - MembershipDTO toDto(Membership membership); - - // TODO BLOG HOWTO: multi-field display reference for selection lists - // also change the filed in the option list in *-update.html - @AfterMapping - default void setMembershipDisplayLabel(final @MappingTarget MembershipDTO dto, final Membership entity) { - dto.setDisplayLabel(displayLabel(entity)); - dto.setCustomerDisplayLabel(CustomerMapper.displayLabel(entity.getCustomer())); - } - - @Mapping(target = "shares", ignore = true) - @Mapping(target = "assets", ignore = true) - @Mapping(source = "customerId", target = "customer") - Membership toEntity(MembershipDTO membershipDTO); - - default Membership fromId(Long id) { - if (id == null) { - return null; - } - Membership membership = new Membership(); - membership.setId(id); - return membership; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/mapper/SepaMandateMapper.java b/src/main/java/org/hostsharing/hsadminng/service/mapper/SepaMandateMapper.java deleted file mode 100644 index d770d619..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/mapper/SepaMandateMapper.java +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.mapper; - -import org.hostsharing.hsadminng.domain.SepaMandate; -import org.hostsharing.hsadminng.service.dto.SepaMandateDTO; - -import org.mapstruct.AfterMapping; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.MappingTarget; - -/** - * Mapper for the entity SepaMandate and its DTO SepaMandateDTO. - */ -@Mapper(componentModel = "spring", uses = { CustomerMapper.class }) -public interface SepaMandateMapper extends EntityMapper { - - @Mapping(source = "customer.id", target = "customerId") - @Mapping(target = "customerDisplayLabel", ignore = true) - SepaMandateDTO toDto(SepaMandate sepaMandate); - - @AfterMapping - default void setDisplayLabels(final @MappingTarget SepaMandateDTO dto, final SepaMandate entity) { - dto.setCustomerDisplayLabel(CustomerMapper.displayLabel(entity.getCustomer())); - } - - @Mapping(source = "customerId", target = "customer") - SepaMandate toEntity(SepaMandateDTO sepaMandateDTO); - - default SepaMandate fromId(Long id) { - if (id == null) { - return null; - } - SepaMandate sepaMandate = new SepaMandate(); - sepaMandate.setId(id); - return sepaMandate; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/mapper/ShareMapper.java b/src/main/java/org/hostsharing/hsadminng/service/mapper/ShareMapper.java deleted file mode 100644 index 7ec02dca..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/mapper/ShareMapper.java +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.mapper; - -import org.hostsharing.hsadminng.domain.Share; -import org.hostsharing.hsadminng.service.dto.ShareDTO; - -import org.mapstruct.AfterMapping; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.MappingTarget; - -/** - * Mapper for the entity Share and its DTO ShareDTO. - */ -@Mapper(componentModel = "spring", uses = { MembershipMapper.class }) -public interface ShareMapper extends EntityMapper { - - @Mapping(source = "membership.id", target = "membershipId") - @Mapping(target = "membershipDisplayLabel", ignore = true) - ShareDTO toDto(Share share); - - @AfterMapping - default void setMembershipDisplayLabel(final @MappingTarget ShareDTO dto, final Share entity) { - dto.setMembershipDisplayLabel(MembershipMapper.displayLabel(entity.getMembership())); - } - - @Mapping(source = "membershipId", target = "membership") - Share toEntity(ShareDTO shareDTO); - - default Share fromId(Long id) { - if (id == null) { - return null; - } - Share share = new Share(); - share.setId(id); - return share; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/mapper/UserMapper.java b/src/main/java/org/hostsharing/hsadminng/service/mapper/UserMapper.java deleted file mode 100644 index 5165f884..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/mapper/UserMapper.java +++ /dev/null @@ -1,81 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.mapper; - -import org.hostsharing.hsadminng.domain.Authority; -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.service.dto.UserDTO; - -import org.springframework.stereotype.Service; - -import java.util.*; -import java.util.stream.Collectors; - -/** - * Mapper for the entity User and its DTO called UserDTO. - * - * Normal mappers are generated using MapStruct, this one is hand-coded as MapStruct - * support is still in beta, and requires a manual step with an IDE. - */ -@Service -public class UserMapper { - - public List usersToUserDTOs(List users) { - return users.stream() - .filter(Objects::nonNull) - .map(this::userToUserDTO) - .collect(Collectors.toList()); - } - - public UserDTO userToUserDTO(User user) { - return new UserDTO(user); - } - - public List userDTOsToUsers(List userDTOs) { - return userDTOs.stream() - .filter(Objects::nonNull) - .map(this::userDTOToUser) - .collect(Collectors.toList()); - } - - public User userDTOToUser(UserDTO userDTO) { - if (userDTO == null) { - return null; - } else { - User user = new User(); - user.setId(userDTO.getId()); - user.setLogin(userDTO.getLogin()); - user.setFirstName(userDTO.getFirstName()); - user.setLastName(userDTO.getLastName()); - user.setEmail(userDTO.getEmail()); - user.setImageUrl(userDTO.getImageUrl()); - user.setActivated(userDTO.isActivated()); - user.setLangKey(userDTO.getLangKey()); - Set authorities = this.authoritiesFromStrings(userDTO.getAuthorities()); - user.setAuthorities(authorities); - return user; - } - } - - private Set authoritiesFromStrings(Set authoritiesAsString) { - Set authorities = new HashSet<>(); - - if (authoritiesAsString != null) { - authorities = authoritiesAsString.stream().map(string -> { - Authority auth = new Authority(); - auth.setName(string); - return auth; - }).collect(Collectors.toSet()); - } - - return authorities; - } - - public User userFromId(Long id) { - if (id == null) { - return null; - } - User user = new User(); - user.setId(id); - return user; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/mapper/package-info.java b/src/main/java/org/hostsharing/hsadminng/service/mapper/package-info.java deleted file mode 100644 index 6231e7fe..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/mapper/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * MapStruct mappers for mapping domain objects and Data Transfer Objects. - */ -package org.hostsharing.hsadminng.service.mapper; diff --git a/src/main/java/org/hostsharing/hsadminng/service/package-info.java b/src/main/java/org/hostsharing/hsadminng/service/package-info.java deleted file mode 100644 index 1b8b3efb..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Service layer beans. - */ -package org.hostsharing.hsadminng.service; diff --git a/src/main/java/org/hostsharing/hsadminng/service/util/RandomUtil.java b/src/main/java/org/hostsharing/hsadminng/service/util/RandomUtil.java deleted file mode 100644 index c1f914a4..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/util/RandomUtil.java +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.util; - -import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.RandomUtils; - -/** - * Utility class for generating random Values. - */ -public final class RandomUtil { - - private static final int DEF_COUNT = 20; - - private RandomUtil() { - } - - /** - * Generate a password. - * - * @return the generated password - */ - public static String generatePassword() { - return RandomStringUtils.randomAlphanumeric(DEF_COUNT); - } - - /** - * Generate an activation key. - * - * @return the generated activation key - */ - public static String generateActivationKey() { - return RandomStringUtils.randomNumeric(DEF_COUNT); - } - - /** - * Generate a reset key. - * - * @return the generated reset key - */ - public static String generateResetKey() { - return RandomStringUtils.randomNumeric(DEF_COUNT); - } - - /** - * Generate a random enum value for a given enum type. - * - * @return the generated enum value - */ - public static > E generateEnumValue(final Class enumType) { - final E[] enumValues = enumType.getEnumConstants(); - return enumValues[RandomUtils.nextInt(0, enumValues.length - 1)]; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/service/util/ReflectionUtil.java b/src/main/java/org/hostsharing/hsadminng/service/util/ReflectionUtil.java deleted file mode 100644 index 22e69417..00000000 --- a/src/main/java/org/hostsharing/hsadminng/service/util/ReflectionUtil.java +++ /dev/null @@ -1,218 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.util; - -import org.hostsharing.hsadminng.service.accessfilter.Role; - -import java.lang.reflect.AccessibleObject; -import java.lang.reflect.Field; -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.util.Optional; -import java.util.function.Function; - -public class ReflectionUtil { - - public static Field getField(final Class aClass, final String fieldName) { - try { - return aClass.getDeclaredField(fieldName); - } catch (final NoSuchFieldException e) { - if (aClass.getSuperclass() != Object.class) { - return getField(aClass.getSuperclass(), fieldName); - } - throw new IllegalArgumentException(e); - } - } - - public static void setValue(final T dto, final Field field, final Object value) { - try { - field.setAccessible(true); - field.set(dto, value); - } catch (final IllegalAccessException e) { - throw new RuntimeException(e); - } - } - - @SuppressWarnings("unchecked") - public static R getValue(final T dto, final Field field) { - try { - field.setAccessible(true); - return (R) field.get(dto); - } catch (final IllegalAccessException e) { - throw new RuntimeException(e); - } - } - - /** - * Searches the annotations of 'clazz' for an implemented interface 'rawInterface' and returns the class of the actual - * generics parameter at the specified index. - * - * @param clazz a class which implements the generic interface 'rawInterface' - * @param rawInterface a generic interface - * @param paramIndex the index of the generics parameter within 'rawInterface' - * @param the expected class of the generics parameter at position 'index' in 'rawInterface' - * @return the actual generics parameter - */ - public static Class determineGenericInterfaceParameter( - final Class clazz, - final Class rawInterface, - final int paramIndex) { - final Class found = determineGenericInterfaceParameterImpl(clazz, rawInterface, paramIndex); - if (found == null) { - throw new AssertionError( - clazz.getSimpleName() + " expected to implement " + rawInterface.getSimpleName() + "<...>"); - } - return found; - } - - @SuppressWarnings("unchecked") - private static Class determineGenericInterfaceParameterImpl( - final Class clazz, - final Class rawInterface, - final int paramIndex) { - for (Type genericInterface : clazz.getGenericInterfaces()) { - if (genericInterface instanceof ParameterizedType) { - final ParameterizedType parameterizedType = (ParameterizedType) genericInterface; - if (parameterizedType.getRawType() == rawInterface) { - return (Class) parameterizedType.getActualTypeArguments()[paramIndex]; - } - } - } - if (clazz.getSuperclass() != null) { - final Class found = determineGenericInterfaceParameterImpl(clazz.getSuperclass(), rawInterface, paramIndex); - if (found != null) { - return found; - } - } - for (Class implementedInterface : clazz.getInterfaces()) { - final Class found = determineGenericInterfaceParameterImpl(implementedInterface, rawInterface, paramIndex); - if (found != null) { - return found; - } - } - return null; - } - - /** - * Searches the annotations of 'clazz' for an extended class 'rawClass' and returns the class of the actual generics - * parameter at the specified index. - * - * @param clazz a class which implements the generic interface 'rawClass' - * @param rawClass a generic class - * @param paramIndex the index of the generics parameter within 'rawClass' - * @param the expected class of the generics parameter at position 'index' in 'rawClass' - * @return the actual generics parameter - */ - public static Class determineGenericClassParameter( - final Class clazz, - final Class rawClass, - final int paramIndex) { - final Class found = determineGenericClassParameterImpl(clazz, rawClass, paramIndex); - if (found == null) { - throw new AssertionError(clazz.getSimpleName() + " expected to extend " + rawClass.getSimpleName() + "<...>"); - } - return found; - } - - @SuppressWarnings("unchecked") - private static Class determineGenericClassParameterImpl( - final Class clazz, - final Class rawClass, - final int paramIndex) { - final Type genericClass = clazz.getGenericSuperclass(); - if (genericClass instanceof ParameterizedType) { - final ParameterizedType parameterizedType = (ParameterizedType) genericClass; - if (parameterizedType.getRawType() == rawClass) { - return (Class) parameterizedType.getActualTypeArguments()[paramIndex]; - } - } - if (clazz.getSuperclass() != Object.class) { - return determineGenericClassParameter(clazz.getSuperclass(), rawClass, paramIndex); - } - return null; - } - - @SuppressWarnings("unchecked") - public static > Enum asEnumValue(final Class type, final Object value) { - return Enum.valueOf((Class) type, value.toString()); - } - - public static Role newInstance(final Class clazz) { - return unchecked(() -> accessible(clazz.getDeclaredConstructor()).newInstance()); - } - - @FunctionalInterface - public interface ThrowingSupplier { - - T get() throws Exception; - } - - /** - * Makes the given object accessible as if it were public. - * - * @param accessible field or method - * @param type of accessible - * @return the given object - */ - private static T accessible(final T accessible) { - try { - accessible.setAccessible(true); - return accessible; - } catch (final Exception e) { - throw new RuntimeException(e); - } - } - - /** - * Catches checked exceptions and wraps these into an unchecked RuntimeException. - *

- * Rationale: Checked exceptions are a controversial Java feature to begin with. - * They often mix error handling code into the normal flow of domain rules - * or other technical aspects which is not only hard to read but also violates - * the Single Responsibility Principle. Often this is even worse for expressions - * than it is for statements. - *

- * - * @param expression an expresion which returns a T and may throw a checked exception - * @param the result type of the expression - * @return the result of the expression - * @throws RuntimeException which wraps a checked exception thrown by the expression - */ - public static T unchecked(final ThrowingSupplier expression) { - try { - return expression.get(); - } catch (final Exception e) { - throw new RuntimeException(e); - } - } - - /** - * Calling a method on a potentially null object. Similar to the ?: operator in Kotlin. - * - * @param source some object of type T - * @param f some function mapping T to R - * @param the source type - * @param the result type - * @return the result of f if source is not null, null otherwise - */ - public static R of(T source, Function f) { - return Optional.ofNullable(source).map(f).orElse(null); - } - - /** - * Forces the initialization of the given class, this means, static initialization takes place. - * - * If the class is already initialized, this methods does nothing. - * - * @param clazz the class to be initialized - * @return the initialized class - * - */ - public static Class initialize(Class clazz) { - try { - Class.forName(clazz.getName(), true, clazz.getClassLoader()); - } catch (ClassNotFoundException e) { - throw new AssertionError(e); // Can't happen - } - return clazz; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/AccountResource.java b/src/main/java/org/hostsharing/hsadminng/web/rest/AccountResource.java deleted file mode 100644 index 4c0924d2..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/AccountResource.java +++ /dev/null @@ -1,183 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.repository.UserRepository; -import org.hostsharing.hsadminng.security.SecurityUtils; -import org.hostsharing.hsadminng.service.MailService; -import org.hostsharing.hsadminng.service.UserService; -import org.hostsharing.hsadminng.service.dto.PasswordChangeDTO; -import org.hostsharing.hsadminng.service.dto.UserDTO; -import org.hostsharing.hsadminng.web.rest.errors.*; -import org.hostsharing.hsadminng.web.rest.vm.KeyAndPasswordVM; -import org.hostsharing.hsadminng.web.rest.vm.ManagedUserVM; - -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.*; - -import java.util.*; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; - -/** - * REST controller for managing the current user's account. - */ -@RestController -@RequestMapping("/api") -public class AccountResource { - - private final Logger log = LoggerFactory.getLogger(AccountResource.class); - - private final UserRepository userRepository; - - private final UserService userService; - - private final MailService mailService; - - public AccountResource(UserRepository userRepository, UserService userService, MailService mailService) { - - this.userRepository = userRepository; - this.userService = userService; - this.mailService = mailService; - } - - /** - * POST /register : register the user. - * - * @param managedUserVM the managed user View Model - * @throws InvalidPasswordException 400 (Bad Request) if the password is incorrect - * @throws EmailAlreadyUsedException 400 (Bad Request) if the email is already used - * @throws LoginAlreadyUsedException 400 (Bad Request) if the login is already used - */ - @PostMapping("/register") - @ResponseStatus(HttpStatus.CREATED) - public void registerAccount(@Valid @RequestBody ManagedUserVM managedUserVM) { - if (!checkPasswordLength(managedUserVM.getPassword())) { - throw new InvalidPasswordException(); - } - User user = userService.registerUser(managedUserVM, managedUserVM.getPassword()); - mailService.sendActivationEmail(user); - } - - /** - * GET /activate : activate the registered user. - * - * @param key the activation key - * @throws RuntimeException 500 (Internal Server Error) if the user couldn't be activated - */ - @GetMapping("/activate") - public void activateAccount(@RequestParam(value = "key") String key) { - Optional user = userService.activateRegistration(key); - if (!user.isPresent()) { - throw new InternalServerErrorException("No user was found for this activation key"); - } - } - - /** - * GET /authenticate : check if the user is authenticated, and return its login. - * - * @param request the HTTP request - * @return the login if the user is authenticated - */ - @GetMapping("/authenticate") - public String isAuthenticated(HttpServletRequest request) { - log.debug("REST request to check if the current user is authenticated"); - return request.getRemoteUser(); - } - - /** - * GET /account : get the current user. - * - * @return the current user - * @throws RuntimeException 500 (Internal Server Error) if the user couldn't be returned - */ - @GetMapping("/account") - public UserDTO getAccount() { - return userService.getUserWithAuthorities() - .map(UserDTO::new) - .orElseThrow(() -> new InternalServerErrorException("User could not be found")); - } - - /** - * POST /account : update the current user information. - * - * @param userDTO the current user information - * @throws EmailAlreadyUsedException 400 (Bad Request) if the email is already used - * @throws RuntimeException 500 (Internal Server Error) if the user login wasn't found - */ - @PostMapping("/account") - public void saveAccount(@Valid @RequestBody UserDTO userDTO) { - String userLogin = SecurityUtils.getCurrentUserLogin() - .orElseThrow(() -> new InternalServerErrorException("Current user login not found")); - Optional existingUser = userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()); - if (existingUser.isPresent() && (!existingUser.get().getLogin().equalsIgnoreCase(userLogin))) { - throw new EmailAlreadyUsedException(); - } - Optional user = userRepository.findOneByLogin(userLogin); - if (!user.isPresent()) { - throw new InternalServerErrorException("User could not be found"); - } - userService.updateUser( - userDTO.getFirstName(), - userDTO.getLastName(), - userDTO.getEmail(), - userDTO.getLangKey(), - userDTO.getImageUrl()); - } - - /** - * POST /account/change-password : changes the current user's password - * - * @param passwordChangeDto current and new password - * @throws InvalidPasswordException 400 (Bad Request) if the new password is incorrect - */ - @PostMapping(path = "/account/change-password") - public void changePassword(@RequestBody PasswordChangeDTO passwordChangeDto) { - if (!checkPasswordLength(passwordChangeDto.getNewPassword())) { - throw new InvalidPasswordException(); - } - userService.changePassword(passwordChangeDto.getCurrentPassword(), passwordChangeDto.getNewPassword()); - } - - /** - * POST /account/reset-password/init : Send an email to reset the password of the user - * - * @param mail the mail of the user - * @throws EmailNotFoundException 400 (Bad Request) if the email address is not registered - */ - @PostMapping(path = "/account/reset-password/init") - public void requestPasswordReset(@RequestBody String mail) { - mailService.sendPasswordResetMail( - userService.requestPasswordReset(mail) - .orElseThrow(EmailNotFoundException::new)); - } - - /** - * POST /account/reset-password/finish : Finish to reset the password of the user - * - * @param keyAndPassword the generated key and the new password - * @throws InvalidPasswordException 400 (Bad Request) if the password is incorrect - * @throws RuntimeException 500 (Internal Server Error) if the password could not be reset - */ - @PostMapping(path = "/account/reset-password/finish") - public void finishPasswordReset(@RequestBody KeyAndPasswordVM keyAndPassword) { - if (!checkPasswordLength(keyAndPassword.getNewPassword())) { - throw new InvalidPasswordException(); - } - Optional user = userService.completePasswordReset(keyAndPassword.getNewPassword(), keyAndPassword.getKey()); - - if (!user.isPresent()) { - throw new InternalServerErrorException("No user was found for this reset key"); - } - } - - private static boolean checkPasswordLength(String password) { - return !StringUtils.isEmpty(password) && - password.length() >= ManagedUserVM.PASSWORD_MIN_LENGTH && - password.length() <= ManagedUserVM.PASSWORD_MAX_LENGTH; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/AssetResource.java b/src/main/java/org/hostsharing/hsadminng/web/rest/AssetResource.java deleted file mode 100644 index ef5ebb17..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/AssetResource.java +++ /dev/null @@ -1,137 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import org.hostsharing.hsadminng.service.AssetQueryService; -import org.hostsharing.hsadminng.service.AssetService; -import org.hostsharing.hsadminng.service.dto.AssetCriteria; -import org.hostsharing.hsadminng.service.dto.AssetDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; -import org.hostsharing.hsadminng.web.rest.util.HeaderUtil; -import org.hostsharing.hsadminng.web.rest.util.PaginationUtil; - -import io.github.jhipster.web.util.ResponseUtil; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.http.HttpHeaders; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.List; -import java.util.Optional; - -import javax.validation.Valid; - -/** - * REST controller for managing Asset. - */ -@RestController -@RequestMapping("/api") -public class AssetResource { - - private final Logger log = LoggerFactory.getLogger(AssetResource.class); - - private static final String ENTITY_NAME = "asset"; - - private final AssetService assetService; - - private final AssetQueryService assetQueryService; - - public AssetResource(AssetService assetService, AssetQueryService assetQueryService) { - this.assetService = assetService; - this.assetQueryService = assetQueryService; - } - - /** - * POST /assets : Create a new asset. - * - * @param assetDTO the assetDTO to create - * @return the ResponseEntity with status 201 (Created) and with body the new assetDTO, or with status 400 (Bad Request) if - * the asset has already an ID - * @throws URISyntaxException if the Location URI syntax is incorrect - */ - @PostMapping("/assets") - public ResponseEntity createAsset(@Valid @RequestBody AssetDTO assetDTO) throws URISyntaxException { - log.debug("REST request to save Asset : {}", assetDTO); - if (assetDTO.getId() != null) { - throw new BadRequestAlertException("A new asset cannot already have an ID", ENTITY_NAME, "idexists"); - } - AssetDTO result = assetService.save(assetDTO); - return ResponseEntity.created(new URI("/api/assets/" + result.getId())) - .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) - .body(result); - } - - /** - * PUT /assets : Updates an existing asset. - * - * @param assetDTO the assetDTO to update - * @return the ResponseEntity with status 200 (OK) and with body the updated assetDTO, - * or with status 400 (Bad Request) if the assetDTO is not valid, - * or with status 500 (Internal Server Error) if the assetDTO couldn't be updated - * @throws URISyntaxException if the Location URI syntax is incorrect - */ - @PutMapping("/assets") - public ResponseEntity updateAsset(@Valid @RequestBody AssetDTO assetDTO) throws URISyntaxException { - log.debug("REST request to update Asset : {}", assetDTO); - // TODO mhoennig: Rather completely remove the endpoint? - throw new BadRequestAlertException("Assets are immutable", ENTITY_NAME, "assetTransactionImmutable"); - } - - /** - * GET /assets : get all the assets. - * - * @param pageable the pagination information - * @param criteria the criterias which the requested entities should match - * @return the ResponseEntity with status 200 (OK) and the list of assets in body - */ - @GetMapping("/assets") - public ResponseEntity> getAllAssets(AssetCriteria criteria, Pageable pageable) { - log.debug("REST request to get Assets by criteria: {}", criteria); - Page page = assetQueryService.findByCriteria(criteria, pageable); - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/assets"); - return ResponseEntity.ok().headers(headers).body(page.getContent()); - } - - /** - * GET /assets/count : count all the assets. - * - * @param criteria the criterias which the requested entities should match - * @return the ResponseEntity with status 200 (OK) and the count in body - */ - @GetMapping("/assets/count") - public ResponseEntity countAssets(AssetCriteria criteria) { - log.debug("REST request to count Assets by criteria: {}", criteria); - return ResponseEntity.ok().body(assetQueryService.countByCriteria(criteria)); - } - - /** - * GET /assets/:id : get the "id" asset. - * - * @param id the id of the assetDTO to retrieve - * @return the ResponseEntity with status 200 (OK) and with body the assetDTO, or with status 404 (Not Found) - */ - @GetMapping("/assets/{id}") - public ResponseEntity getAsset(@PathVariable Long id) { - log.debug("REST request to get Asset : {}", id); - Optional assetDTO = assetService.findOne(id); - return ResponseUtil.wrapOrNotFound(assetDTO); - } - - /** - * DELETE /assets/:id : delete the "id" asset. - * - * @param id the id of the assetDTO to delete - * @return the ResponseEntity with status 200 (OK) - */ - @DeleteMapping("/assets/{id}") - public ResponseEntity deleteAsset(@PathVariable Long id) { - log.debug("REST request to delete Asset : {}", id); - // TODO mhoennig: Rather completely remove the endpoint? - throw new BadRequestAlertException("Asset are immutable", ENTITY_NAME, "assetTransactionImmutable"); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/AuditResource.java b/src/main/java/org/hostsharing/hsadminng/web/rest/AuditResource.java deleted file mode 100644 index e723bf88..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/AuditResource.java +++ /dev/null @@ -1,79 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import org.hostsharing.hsadminng.service.AuditEventService; -import org.hostsharing.hsadminng.web.rest.util.PaginationUtil; - -import io.github.jhipster.web.util.ResponseUtil; - -import org.springframework.boot.actuate.audit.AuditEvent; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -import java.time.LocalDate; -import java.time.ZoneId; -import java.util.List; - -/** - * REST controller for getting the audit events. - */ -@RestController -@RequestMapping("/management/audits") -public class AuditResource { - - private final AuditEventService auditEventService; - - public AuditResource(AuditEventService auditEventService) { - this.auditEventService = auditEventService; - } - - /** - * GET /audits : get a page of AuditEvents. - * - * @param pageable the pagination information - * @return the ResponseEntity with status 200 (OK) and the list of AuditEvents in body - */ - @GetMapping - public ResponseEntity> getAll(Pageable pageable) { - Page page = auditEventService.findAll(pageable); - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/management/audits"); - return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK); - } - - /** - * GET /audits : get a page of AuditEvents between the fromDate and toDate. - * - * @param fromDate the start of the time period of AuditEvents to get - * @param toDate the end of the time period of AuditEvents to get - * @param pageable the pagination information - * @return the ResponseEntity with status 200 (OK) and the list of AuditEvents in body - */ - @GetMapping(params = { "fromDate", "toDate" }) - public ResponseEntity> getByDates( - @RequestParam(value = "fromDate") LocalDate fromDate, - @RequestParam(value = "toDate") LocalDate toDate, - Pageable pageable) { - - Page page = auditEventService.findByDates( - fromDate.atStartOfDay(ZoneId.systemDefault()).toInstant(), - toDate.atStartOfDay(ZoneId.systemDefault()).plusDays(1).toInstant(), - pageable); - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/management/audits"); - return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK); - } - - /** - * GET /audits/:id : get an AuditEvent by id. - * - * @param id the id of the entity to get - * @return the ResponseEntity with status 200 (OK) and the AuditEvent in body, or status 404 (Not Found) - */ - @GetMapping("/{id:.+}") - public ResponseEntity get(@PathVariable Long id) { - return ResponseUtil.wrapOrNotFound(auditEventService.find(id)); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/CustomerResource.java b/src/main/java/org/hostsharing/hsadminng/web/rest/CustomerResource.java deleted file mode 100644 index fe7ee8d7..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/CustomerResource.java +++ /dev/null @@ -1,142 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import org.hostsharing.hsadminng.service.CustomerQueryService; -import org.hostsharing.hsadminng.service.CustomerService; -import org.hostsharing.hsadminng.service.dto.CustomerCriteria; -import org.hostsharing.hsadminng.service.dto.CustomerDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; -import org.hostsharing.hsadminng.web.rest.util.HeaderUtil; -import org.hostsharing.hsadminng.web.rest.util.PaginationUtil; - -import io.github.jhipster.web.util.ResponseUtil; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.http.HttpHeaders; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.List; -import java.util.Optional; - -import javax.validation.Valid; - -/** - * REST controller for managing Customer. - */ -@RestController -@RequestMapping("/api") -public class CustomerResource { - - private final Logger log = LoggerFactory.getLogger(CustomerResource.class); - - private static final String ENTITY_NAME = "customer"; - - private final CustomerService customerService; - - private final CustomerQueryService customerQueryService; - - public CustomerResource(CustomerService customerService, CustomerQueryService customerQueryService) { - this.customerService = customerService; - this.customerQueryService = customerQueryService; - } - - /** - * POST /customers : Create a new customer. - * - * @param customerDTO the customerDTO to create - * @return the ResponseEntity with status 201 (Created) and with body the new customerDTO, or with status 400 (Bad Request) - * if the customer has already an ID - * @throws URISyntaxException if the Location URI syntax is incorrect - */ - @PostMapping("/customers") - public ResponseEntity createCustomer(@Valid @RequestBody CustomerDTO customerDTO) throws URISyntaxException { - log.debug("REST request to save Customer : {}", customerDTO); - if (customerDTO.getId() != null) { - throw new BadRequestAlertException("A new customer cannot already have an ID", ENTITY_NAME, "idexists"); - } - CustomerDTO result = customerService.save(customerDTO); - return ResponseEntity.created(new URI("/api/customers/" + result.getId())) - .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) - .body(result); - } - - /** - * PUT /customers : Updates an existing customer. - * - * @param customerDTO the customerDTO to update - * @return the ResponseEntity with status 200 (OK) and with body the updated customerDTO, - * or with status 400 (Bad Request) if the customerDTO is not valid, - * or with status 500 (Internal Server Error) if the customerDTO couldn't be updated - * @throws URISyntaxException if the Location URI syntax is incorrect - */ - @PutMapping("/customers") - public ResponseEntity updateCustomer(@RequestBody CustomerDTO customerDTO) { - log.debug("REST request to update Customer : {}", customerDTO); - if (customerDTO.getId() == null) { - throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull"); - } - CustomerDTO result = customerService.save(customerDTO); - return ResponseEntity.ok() - .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, customerDTO.getId().toString())) - .body(result); - } - - /** - * GET /customers : get all the customers. - * - * @param pageable the pagination information - * @param criteria the criterias which the requested entities should match - * @return the ResponseEntity with status 200 (OK) and the list of customers in body - */ - @GetMapping("/customers") - public ResponseEntity> getAllCustomers(CustomerCriteria criteria, Pageable pageable) { - log.debug("REST request to get Customers by criteria: {}", criteria); - Page page = customerQueryService.findByCriteria(criteria, pageable); - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/customers"); - return ResponseEntity.ok().headers(headers).body(page.getContent()); - } - - /** - * GET /customers/count : count all the customers. - * - * @param criteria the criterias which the requested entities should match - * @return the ResponseEntity with status 200 (OK) and the count in body - */ - @GetMapping("/customers/count") - public ResponseEntity countCustomers(CustomerCriteria criteria) { - log.debug("REST request to count Customers by criteria: {}", criteria); - return ResponseEntity.ok().body(customerQueryService.countByCriteria(criteria)); - } - - /** - * GET /customers/:id : get the "id" customer. - * - * @param id the id of the customerDTO to retrieve - * @return the ResponseEntity with status 200 (OK) and with body the customerDTO, or with status 404 (Not Found) - */ - @GetMapping("/customers/{id}") - public ResponseEntity getCustomer(@PathVariable Long id) { - log.debug("REST request to get Customer : {}", id); - Optional customerDTO = customerService.findOne(id); - return ResponseUtil.wrapOrNotFound(customerDTO); - } - - /** - * DELETE /customers/:id : delete the "id" customer. - * - * @param id the id of the customerDTO to delete - * @return the ResponseEntity with status 200 (OK) - */ - @DeleteMapping("/customers/{id}") - public ResponseEntity deleteCustomer(@PathVariable Long id) { - log.debug("REST request to delete Customer : {}", id); - // TODO mhoennig: Rather completely remove the endpoint? - throw new BadRequestAlertException("Customres can't be deleted", ENTITY_NAME, "customerNotDeletable"); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/LogsResource.java b/src/main/java/org/hostsharing/hsadminng/web/rest/LogsResource.java deleted file mode 100644 index 08315c87..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/LogsResource.java +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import org.hostsharing.hsadminng.web.rest.vm.LoggerVM; - -import ch.qos.logback.classic.Level; -import ch.qos.logback.classic.LoggerContext; - -import org.slf4j.LoggerFactory; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.*; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * Controller for view and managing Log Level at runtime. - */ -@RestController -@RequestMapping("/management") -public class LogsResource { - - @GetMapping("/logs") - public List getList() { - LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); - return context.getLoggerList() - .stream() - .map(LoggerVM::new) - .collect(Collectors.toList()); - } - - @PutMapping("/logs") - @ResponseStatus(HttpStatus.NO_CONTENT) - public void changeLevel(@RequestBody LoggerVM jsonLogger) { - LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); - context.getLogger(jsonLogger.getName()).setLevel(Level.valueOf(jsonLogger.getLevel())); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/MembershipResource.java b/src/main/java/org/hostsharing/hsadminng/web/rest/MembershipResource.java deleted file mode 100644 index ff7d38c2..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/MembershipResource.java +++ /dev/null @@ -1,144 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import org.hostsharing.hsadminng.service.MembershipQueryService; -import org.hostsharing.hsadminng.service.MembershipService; -import org.hostsharing.hsadminng.service.dto.MembershipCriteria; -import org.hostsharing.hsadminng.service.dto.MembershipDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; -import org.hostsharing.hsadminng.web.rest.util.HeaderUtil; -import org.hostsharing.hsadminng.web.rest.util.PaginationUtil; - -import io.github.jhipster.web.util.ResponseUtil; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.http.HttpHeaders; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.List; -import java.util.Optional; - -import javax.validation.Valid; - -/** - * REST controller for managing Membership. - */ -@RestController -@RequestMapping("/api") -public class MembershipResource { - - private final Logger log = LoggerFactory.getLogger(MembershipResource.class); - - private static final String ENTITY_NAME = "membership"; - - private final MembershipService membershipService; - - private final MembershipQueryService membershipQueryService; - - public MembershipResource(MembershipService membershipService, MembershipQueryService membershipQueryService) { - this.membershipService = membershipService; - this.membershipQueryService = membershipQueryService; - } - - /** - * POST /memberships : Create a new membership. - * - * @param membershipDTO the membershipDTO to create - * @return the ResponseEntity with status 201 (Created) and with body the new membershipDTO, or with status 400 (Bad - * Request) if the membership has already an ID - * @throws URISyntaxException if the Location URI syntax is incorrect - */ - @PostMapping("/memberships") - public ResponseEntity createMembership(@Valid @RequestBody MembershipDTO membershipDTO) - throws URISyntaxException { - log.debug("REST request to save Membership : {}", membershipDTO); - if (membershipDTO.getId() != null) { - throw new BadRequestAlertException("A new membership cannot already have an ID", ENTITY_NAME, "idexists"); - } - MembershipDTO result = membershipService.save(membershipDTO); - return ResponseEntity.created(new URI("/api/memberships/" + result.getId())) - .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) - .body(result); - } - - /** - * PUT /memberships : Updates an existing membership. - * - * @param membershipDTO the membershipDTO to update - * @return the ResponseEntity with status 200 (OK) and with body the updated membershipDTO, - * or with status 400 (Bad Request) if the membershipDTO is not valid, - * or with status 500 (Internal Server Error) if the membershipDTO couldn't be updated - * @throws URISyntaxException if the Location URI syntax is incorrect - */ - @PutMapping("/memberships") - public ResponseEntity updateMembership(@Valid @RequestBody MembershipDTO membershipDTO) - throws URISyntaxException { - log.debug("REST request to update Membership : {}", membershipDTO); - if (membershipDTO.getId() == null) { - throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull"); - } - MembershipDTO result = membershipService.save(membershipDTO); - return ResponseEntity.ok() - .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, membershipDTO.getId().toString())) - .body(result); - } - - /** - * GET /memberships : get all the memberships. - * - * @param pageable the pagination information - * @param criteria the criterias which the requested entities should match - * @return the ResponseEntity with status 200 (OK) and the list of memberships in body - */ - @GetMapping("/memberships") - public ResponseEntity> getAllMemberships(MembershipCriteria criteria, Pageable pageable) { - log.debug("REST request to get Memberships by criteria: {}", criteria); - Page page = membershipQueryService.findByCriteria(criteria, pageable); - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/memberships"); - return ResponseEntity.ok().headers(headers).body(page.getContent()); - } - - /** - * GET /memberships/count : count all the memberships. - * - * @param criteria the criterias which the requested entities should match - * @return the ResponseEntity with status 200 (OK) and the count in body - */ - @GetMapping("/memberships/count") - public ResponseEntity countMemberships(MembershipCriteria criteria) { - log.debug("REST request to count Memberships by criteria: {}", criteria); - return ResponseEntity.ok().body(membershipQueryService.countByCriteria(criteria)); - } - - /** - * GET /memberships/:id : get the "id" membership. - * - * @param id the id of the membershipDTO to retrieve - * @return the ResponseEntity with status 200 (OK) and with body the membershipDTO, or with status 404 (Not Found) - */ - @GetMapping("/memberships/{id}") - public ResponseEntity getMembership(@PathVariable Long id) { - log.debug("REST request to get Membership : {}", id); - Optional membershipDTO = membershipService.findOne(id); - return ResponseUtil.wrapOrNotFound(membershipDTO); - } - - /** - * DELETE /memberships/:id : delete the "id" membership. - * - * @param id the id of the membershipDTO to delete - * @return the ResponseEntity with status 200 (OK) - */ - @DeleteMapping("/memberships/{id}") - public ResponseEntity deleteMembership(@PathVariable Long id) { - log.debug("REST request to delete Membership : {}", id); - // TODO mhoennig: Rather completely remove the endpoint? - throw new BadRequestAlertException("Memberships can't be deleted", ENTITY_NAME, "membershipNotDeletable"); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/SepaMandateResource.java b/src/main/java/org/hostsharing/hsadminng/web/rest/SepaMandateResource.java deleted file mode 100644 index 58a1dd27..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/SepaMandateResource.java +++ /dev/null @@ -1,144 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import org.hostsharing.hsadminng.service.SepaMandateQueryService; -import org.hostsharing.hsadminng.service.SepaMandateService; -import org.hostsharing.hsadminng.service.dto.SepaMandateCriteria; -import org.hostsharing.hsadminng.service.dto.SepaMandateDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; -import org.hostsharing.hsadminng.web.rest.util.HeaderUtil; -import org.hostsharing.hsadminng.web.rest.util.PaginationUtil; - -import io.github.jhipster.web.util.ResponseUtil; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.http.HttpHeaders; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.List; -import java.util.Optional; - -import javax.validation.Valid; - -/** - * REST controller for managing SepaMandate. - */ -@RestController -@RequestMapping("/api") -public class SepaMandateResource { - - private final Logger log = LoggerFactory.getLogger(SepaMandateResource.class); - - private static final String ENTITY_NAME = "sepaMandate"; - - private final SepaMandateService sepaMandateService; - - private final SepaMandateQueryService sepaMandateQueryService; - - public SepaMandateResource(SepaMandateService sepaMandateService, SepaMandateQueryService sepaMandateQueryService) { - this.sepaMandateService = sepaMandateService; - this.sepaMandateQueryService = sepaMandateQueryService; - } - - /** - * POST /sepa-mandates : Create a new sepaMandate. - * - * @param sepaMandateDTO the sepaMandateDTO to create - * @return the ResponseEntity with status 201 (Created) and with body the new sepaMandateDTO, or with status 400 (Bad - * Request) if the sepaMandate has already an ID - * @throws URISyntaxException if the Location URI syntax is incorrect - */ - @PostMapping("/sepa-mandates") - public ResponseEntity createSepaMandate(@Valid @RequestBody SepaMandateDTO sepaMandateDTO) - throws URISyntaxException { - log.debug("REST request to save SepaMandate : {}", sepaMandateDTO); - if (sepaMandateDTO.getId() != null) { - throw new BadRequestAlertException("A new sepaMandate cannot already have an ID", ENTITY_NAME, "idexists"); - } - SepaMandateDTO result = sepaMandateService.save(sepaMandateDTO); - return ResponseEntity.created(new URI("/api/sepa-mandates/" + result.getId())) - .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) - .body(result); - } - - /** - * PUT /sepa-mandates : Updates an existing sepaMandate. - * - * @param sepaMandateDTO the sepaMandateDTO to update - * @return the ResponseEntity with status 200 (OK) and with body the updated sepaMandateDTO, - * or with status 400 (Bad Request) if the sepaMandateDTO is not valid, - * or with status 500 (Internal Server Error) if the sepaMandateDTO couldn't be updated - * @throws URISyntaxException if the Location URI syntax is incorrect - */ - @PutMapping("/sepa-mandates") - public ResponseEntity updateSepaMandate(@Valid @RequestBody SepaMandateDTO sepaMandateDTO) - throws URISyntaxException { - log.debug("REST request to update SepaMandate : {}", sepaMandateDTO); - if (sepaMandateDTO.getId() == null) { - throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull"); - } - SepaMandateDTO result = sepaMandateService.save(sepaMandateDTO); - return ResponseEntity.ok() - .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, sepaMandateDTO.getId().toString())) - .body(result); - } - - /** - * GET /sepa-mandates : get all the sepaMandates. - * - * @param pageable the pagination information - * @param criteria the criterias which the requested entities should match - * @return the ResponseEntity with status 200 (OK) and the list of sepaMandates in body - */ - @GetMapping("/sepa-mandates") - public ResponseEntity> getAllSepaMandates(SepaMandateCriteria criteria, Pageable pageable) { - log.debug("REST request to get SepaMandates by criteria: {}", criteria); - Page page = sepaMandateQueryService.findByCriteria(criteria, pageable); - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/sepa-mandates"); - return ResponseEntity.ok().headers(headers).body(page.getContent()); - } - - /** - * GET /sepa-mandates/count : count all the sepaMandates. - * - * @param criteria the criterias which the requested entities should match - * @return the ResponseEntity with status 200 (OK) and the count in body - */ - @GetMapping("/sepa-mandates/count") - public ResponseEntity countSepaMandates(SepaMandateCriteria criteria) { - log.debug("REST request to count SepaMandates by criteria: {}", criteria); - return ResponseEntity.ok().body(sepaMandateQueryService.countByCriteria(criteria)); - } - - /** - * GET /sepa-mandates/:id : get the "id" sepaMandate. - * - * @param id the id of the sepaMandateDTO to retrieve - * @return the ResponseEntity with status 200 (OK) and with body the sepaMandateDTO, or with status 404 (Not Found) - */ - @GetMapping("/sepa-mandates/{id}") - public ResponseEntity getSepaMandate(@PathVariable Long id) { - log.debug("REST request to get SepaMandate : {}", id); - Optional sepaMandateDTO = sepaMandateService.findOne(id); - return ResponseUtil.wrapOrNotFound(sepaMandateDTO); - } - - /** - * DELETE /sepa-mandates/:id : delete the "id" sepaMandate. - * - * @param id the id of the sepaMandateDTO to delete - * @return the ResponseEntity with status 200 (OK) - */ - @DeleteMapping("/sepa-mandates/{id}") - public ResponseEntity deleteSepaMandate(@PathVariable Long id) { - log.debug("REST request to delete SepaMandate : {}", id); - sepaMandateService.delete(id); - return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build(); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/ShareResource.java b/src/main/java/org/hostsharing/hsadminng/web/rest/ShareResource.java deleted file mode 100644 index f34d0ccb..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/ShareResource.java +++ /dev/null @@ -1,137 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import org.hostsharing.hsadminng.service.ShareQueryService; -import org.hostsharing.hsadminng.service.ShareService; -import org.hostsharing.hsadminng.service.dto.ShareCriteria; -import org.hostsharing.hsadminng.service.dto.ShareDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; -import org.hostsharing.hsadminng.web.rest.util.HeaderUtil; -import org.hostsharing.hsadminng.web.rest.util.PaginationUtil; - -import io.github.jhipster.web.util.ResponseUtil; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.http.HttpHeaders; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.List; -import java.util.Optional; - -import javax.validation.Valid; - -/** - * REST controller for managing Share. - */ -@RestController -@RequestMapping("/api") -public class ShareResource { - - private final Logger log = LoggerFactory.getLogger(ShareResource.class); - - private static final String ENTITY_NAME = "share"; - - private final ShareService shareService; - - private final ShareQueryService shareQueryService; - - public ShareResource(ShareService shareService, ShareQueryService shareQueryService) { - this.shareService = shareService; - this.shareQueryService = shareQueryService; - } - - /** - * POST /shares : Create a new share. - * - * @param shareDTO the shareDTO to create - * @return the ResponseEntity with status 201 (Created) and with body the new shareDTO, or with status 400 (Bad Request) if - * the share has already an ID - * @throws URISyntaxException if the Location URI syntax is incorrect - */ - @PostMapping("/shares") - public ResponseEntity createShare(@Valid @RequestBody ShareDTO shareDTO) throws URISyntaxException { - log.debug("REST request to save Share : {}", shareDTO); - if (shareDTO.getId() != null) { - throw new BadRequestAlertException("A new share cannot already have an ID", ENTITY_NAME, "idexists"); - } - ShareDTO result = shareService.save(shareDTO); - return ResponseEntity.created(new URI("/api/shares/" + result.getId())) - .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) - .body(result); - } - - /** - * PUT /shares : Updates an existing share. - * - * @param shareDTO the shareDTO to update - * @return the ResponseEntity with status 200 (OK) and with body the updated shareDTO, - * or with status 400 (Bad Request) if the shareDTO is not valid, - * or with status 500 (Internal Server Error) if the shareDTO couldn't be updated - * @throws URISyntaxException if the Location URI syntax is incorrect - */ - @PutMapping("/shares") - public ResponseEntity updateShare(@Valid @RequestBody ShareDTO shareDTO) throws URISyntaxException { - log.debug("REST request to update Share : {}", shareDTO); - // TODO mhoennig: Rather completely remove the endpoint? - throw new BadRequestAlertException("Shares are immutable", ENTITY_NAME, "shareTransactionImmutable"); - } - - /** - * GET /shares : get all the shares. - * - * @param pageable the pagination information - * @param criteria the criterias which the requested entities should match - * @return the ResponseEntity with status 200 (OK) and the list of shares in body - */ - @GetMapping("/shares") - public ResponseEntity> getAllShares(ShareCriteria criteria, Pageable pageable) { - log.debug("REST request to get Shares by criteria: {}", criteria); - Page page = shareQueryService.findByCriteria(criteria, pageable); - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/shares"); - return ResponseEntity.ok().headers(headers).body(page.getContent()); - } - - /** - * GET /shares/count : count all the shares. - * - * @param criteria the criterias which the requested entities should match - * @return the ResponseEntity with status 200 (OK) and the count in body - */ - @GetMapping("/shares/count") - public ResponseEntity countShares(ShareCriteria criteria) { - log.debug("REST request to count Shares by criteria: {}", criteria); - return ResponseEntity.ok().body(shareQueryService.countByCriteria(criteria)); - } - - /** - * GET /shares/:id : get the "id" share. - * - * @param id the id of the shareDTO to retrieve - * @return the ResponseEntity with status 200 (OK) and with body the shareDTO, or with status 404 (Not Found) - */ - @GetMapping("/shares/{id}") - public ResponseEntity getShare(@PathVariable Long id) { - log.debug("REST request to get Share : {}", id); - Optional shareDTO = shareService.findOne(id); - return ResponseUtil.wrapOrNotFound(shareDTO); - } - - /** - * DELETE /shares/:id : delete the "id" share. - * - * @param id the id of the shareDTO to delete - * @return the ResponseEntity with status 200 (OK) - */ - @DeleteMapping("/shares/{id}") - public ResponseEntity deleteShare(@PathVariable Long id) { - log.debug("REST request to delete Share : {}", id); - // TODO mhoennig: Rather completely remove the endpoint? - throw new BadRequestAlertException("Shares are immutable", ENTITY_NAME, "shareTransactionImmutable"); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/UserJWTController.java b/src/main/java/org/hostsharing/hsadminng/web/rest/UserJWTController.java deleted file mode 100644 index db3ef0ff..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/UserJWTController.java +++ /dev/null @@ -1,73 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import org.hostsharing.hsadminng.security.jwt.JWTFilter; -import org.hostsharing.hsadminng.security.jwt.TokenProvider; -import org.hostsharing.hsadminng.web.rest.vm.LoginVM; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; - -/** - * Controller to authenticate users. - */ -@RestController -@RequestMapping("/api") -public class UserJWTController { - - private final TokenProvider tokenProvider; - - private final AuthenticationManager authenticationManager; - - public UserJWTController(TokenProvider tokenProvider, AuthenticationManager authenticationManager) { - this.tokenProvider = tokenProvider; - this.authenticationManager = authenticationManager; - } - - @PostMapping("/authenticate") - public ResponseEntity authorize(@Valid @RequestBody LoginVM loginVM) { - - UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken( - loginVM.getUsername(), - loginVM.getPassword()); - - Authentication authentication = this.authenticationManager.authenticate(authenticationToken); - SecurityContextHolder.getContext().setAuthentication(authentication); - boolean rememberMe = (loginVM.isRememberMe() == null) ? false : loginVM.isRememberMe(); - String jwt = tokenProvider.createToken(authentication, rememberMe); - HttpHeaders httpHeaders = new HttpHeaders(); - httpHeaders.add(JWTFilter.AUTHORIZATION_HEADER, "Bearer " + jwt); - return new ResponseEntity<>(new JWTToken(jwt), httpHeaders, HttpStatus.OK); - } - - /** - * Object to return as body in JWT Authentication. - */ - static class JWTToken { - - private String idToken; - - JWTToken(String idToken) { - this.idToken = idToken; - } - - @JsonProperty("id_token") - String getIdToken() { - return idToken; - } - - void setIdToken(String idToken) { - this.idToken = idToken; - } - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/UserResource.java b/src/main/java/org/hostsharing/hsadminng/web/rest/UserResource.java deleted file mode 100644 index eaff107e..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/UserResource.java +++ /dev/null @@ -1,188 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import org.hostsharing.hsadminng.config.Constants; -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.repository.UserRepository; -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.MailService; -import org.hostsharing.hsadminng.service.UserService; -import org.hostsharing.hsadminng.service.dto.UserDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; -import org.hostsharing.hsadminng.web.rest.errors.EmailAlreadyUsedException; -import org.hostsharing.hsadminng.web.rest.errors.LoginAlreadyUsedException; -import org.hostsharing.hsadminng.web.rest.util.HeaderUtil; -import org.hostsharing.hsadminng.web.rest.util.PaginationUtil; - -import io.github.jhipster.web.util.ResponseUtil; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.*; - -import javax.validation.Valid; - -/** - * REST controller for managing users. - *

- * This class accesses the User entity, and needs to fetch its collection of authorities. - *

- * For a normal use-case, it would be better to have an eager relationship between User and Authority, - * and send everything to the client side: there would be no View Model and DTO, a lot less code, and an outer-join - * which would be good for performance. - *

- * We use a View Model and a DTO for 3 reasons: - *

    - *
  • We want to keep a lazy association between the user and the authorities, because people will - * quite often do relationships with the user, and we don't want them to get the authorities all - * the time for nothing (for performance reasons). This is the #1 goal: we should not impact our users' - * application because of this use-case.
  • - *
  • Not having an outer join causes n+1 requests to the database. This is not a real issue as - * we have by default a second-level cache. This means on the first HTTP call we do the n+1 requests, - * but then all authorities come from the cache, so in fact it's much better than doing an outer join - * (which will get lots of data from the database, for each HTTP call).
  • - *
  • As this manages users, for security reasons, we'd rather have a DTO layer.
  • - *
- *

- * Another option would be to have a specific JPA entity graph to handle this case. - */ -@RestController -@RequestMapping("/api") -public class UserResource { - - private final Logger log = LoggerFactory.getLogger(UserResource.class); - - private final UserService userService; - - private final UserRepository userRepository; - - private final MailService mailService; - - public UserResource(UserService userService, UserRepository userRepository, MailService mailService) { - - this.userService = userService; - this.userRepository = userRepository; - this.mailService = mailService; - } - - /** - * POST /users : Creates a new user. - *

- * Creates a new user if the login and email are not already used, and sends an - * mail with an activation link. - * The user needs to be activated on creation. - * - * @param userDTO the user to create - * @return the ResponseEntity with status 201 (Created) and with body the new user, or with status 400 (Bad Request) if the - * login or email is already in use - * @throws URISyntaxException if the Location URI syntax is incorrect - * @throws BadRequestAlertException 400 (Bad Request) if the login or email is already in use - */ - @PostMapping("/users") - @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")") - public ResponseEntity createUser(@Valid @RequestBody UserDTO userDTO) throws URISyntaxException { - log.debug("REST request to save User : {}", userDTO); - - if (userDTO.getId() != null) { - throw new BadRequestAlertException("A new user cannot already have an ID", "userManagement", "idexists"); - // Lowercase the user login before comparing with database - } else if (userRepository.findOneByLogin(userDTO.getLogin().toLowerCase()).isPresent()) { - throw new LoginAlreadyUsedException(); - } else if (userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()).isPresent()) { - throw new EmailAlreadyUsedException(); - } else { - User newUser = userService.createUser(userDTO); - mailService.sendCreationEmail(newUser); - return ResponseEntity.created(new URI("/api/users/" + newUser.getLogin())) - .headers(HeaderUtil.createAlert("userManagement.created", newUser.getLogin())) - .body(newUser); - } - } - - /** - * PUT /users : Updates an existing User. - * - * @param userDTO the user to update - * @return the ResponseEntity with status 200 (OK) and with body the updated user - * @throws EmailAlreadyUsedException 400 (Bad Request) if the email is already in use - * @throws LoginAlreadyUsedException 400 (Bad Request) if the login is already in use - */ - @PutMapping("/users") - @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")") - public ResponseEntity updateUser(@Valid @RequestBody UserDTO userDTO) { - log.debug("REST request to update User : {}", userDTO); - Optional existingUser = userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()); - if (existingUser.isPresent() && (!existingUser.get().getId().equals(userDTO.getId()))) { - throw new EmailAlreadyUsedException(); - } - existingUser = userRepository.findOneByLogin(userDTO.getLogin().toLowerCase()); - if (existingUser.isPresent() && (!existingUser.get().getId().equals(userDTO.getId()))) { - throw new LoginAlreadyUsedException(); - } - Optional updatedUser = userService.updateUser(userDTO); - - return ResponseUtil.wrapOrNotFound( - updatedUser, - HeaderUtil.createAlert("userManagement.updated", userDTO.getLogin())); - } - - /** - * GET /users : get all users. - * - * @param pageable the pagination information - * @return the ResponseEntity with status 200 (OK) and with body all users - */ - @GetMapping("/users") - public ResponseEntity> getAllUsers(Pageable pageable) { - final Page page = userService.getAllManagedUsers(pageable); - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/users"); - return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK); - } - - /** - * @return a string list of the all of the roles - */ - @GetMapping("/users/authorities") - @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")") - public List getAuthorities() { - return userService.getAuthorities(); - } - - /** - * GET /users/:login : get the "login" user. - * - * @param login the login of the user to find - * @return the ResponseEntity with status 200 (OK) and with body the "login" user, or with status 404 (Not Found) - */ - @GetMapping("/users/{login:" + Constants.LOGIN_REGEX + "}") - public ResponseEntity getUser(@PathVariable String login) { - log.debug("REST request to get User : {}", login); - return ResponseUtil.wrapOrNotFound( - userService.getUserWithAuthoritiesByLogin(login) - .map(UserDTO::new)); - } - - /** - * DELETE /users/:login : delete the "login" User. - * - * @param login the login of the user to delete - * @return the ResponseEntity with status 200 (OK) - */ - @DeleteMapping("/users/{login:" + Constants.LOGIN_REGEX + "}") - @PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")") - public ResponseEntity deleteUser(@PathVariable String login) { - log.debug("REST request to delete User: {}", login); - userService.deleteUser(login); - return ResponseEntity.ok().headers(HeaderUtil.createAlert("userManagement.deleted", login)).build(); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/UserRoleAssignmentResource.java b/src/main/java/org/hostsharing/hsadminng/web/rest/UserRoleAssignmentResource.java deleted file mode 100644 index 8417f65c..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/UserRoleAssignmentResource.java +++ /dev/null @@ -1,148 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import org.hostsharing.hsadminng.domain.UserRoleAssignment; -import org.hostsharing.hsadminng.service.UserRoleAssignmentQueryService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.dto.UserRoleAssignmentCriteria; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; -import org.hostsharing.hsadminng.web.rest.util.HeaderUtil; -import org.hostsharing.hsadminng.web.rest.util.PaginationUtil; - -import io.github.jhipster.web.util.ResponseUtil; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.http.HttpHeaders; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.List; -import java.util.Optional; - -import javax.validation.Valid; - -/** - * REST controller for managing UserRoleAssignment. - */ -@RestController -@RequestMapping("/api") -public class UserRoleAssignmentResource { - - private final Logger log = LoggerFactory.getLogger(UserRoleAssignmentResource.class); - - private static final String ENTITY_NAME = "userRoleAssignment"; - - private final UserRoleAssignmentService userRoleAssignmentService; - - private final UserRoleAssignmentQueryService userRoleAssignmentQueryService; - - public UserRoleAssignmentResource( - UserRoleAssignmentService userRoleAssignmentService, - UserRoleAssignmentQueryService userRoleAssignmentQueryService) { - this.userRoleAssignmentService = userRoleAssignmentService; - this.userRoleAssignmentQueryService = userRoleAssignmentQueryService; - } - - /** - * POST /user-role-assignments : Create a new userRoleAssignment. - * - * @param userRoleAssignment the userRoleAssignment to create - * @return the ResponseEntity with status 201 (Created) and with body the new userRoleAssignment, or with status 400 (Bad - * Request) if the userRoleAssignment has already an ID - * @throws URISyntaxException if the Location URI syntax is incorrect - */ - @PostMapping("/user-role-assignments") - public ResponseEntity createUserRoleAssignment( - @Valid @RequestBody UserRoleAssignment userRoleAssignment) throws URISyntaxException { - log.debug("REST request to save UserRoleAssignment : {}", userRoleAssignment); - if (userRoleAssignment.getId() != null) { - throw new BadRequestAlertException("A new userRoleAssignment cannot already have an ID", ENTITY_NAME, "idexists"); - } - UserRoleAssignment result = userRoleAssignmentService.save(userRoleAssignment); - return ResponseEntity.created(new URI("/api/user-role-assignments/" + result.getId())) - .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) - .body(result); - } - - /** - * PUT /user-role-assignments : Updates an existing userRoleAssignment. - * - * @param userRoleAssignment the userRoleAssignment to update - * @return the ResponseEntity with status 200 (OK) and with body the updated userRoleAssignment, - * or with status 400 (Bad Request) if the userRoleAssignment is not valid, - * or with status 500 (Internal Server Error) if the userRoleAssignment couldn't be updated - * @throws URISyntaxException if the Location URI syntax is incorrect - */ - @PutMapping("/user-role-assignments") - public ResponseEntity updateUserRoleAssignment( - @Valid @RequestBody UserRoleAssignment userRoleAssignment) throws URISyntaxException { - log.debug("REST request to update UserRoleAssignment : {}", userRoleAssignment); - if (userRoleAssignment.getId() == null) { - throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull"); - } - UserRoleAssignment result = userRoleAssignmentService.save(userRoleAssignment); - return ResponseEntity.ok() - .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, userRoleAssignment.getId().toString())) - .body(result); - } - - /** - * GET /user-role-assignments : get all the userRoleAssignments. - * - * @param pageable the pagination information - * @param criteria the criterias which the requested entities should match - * @return the ResponseEntity with status 200 (OK) and the list of userRoleAssignments in body - */ - @GetMapping("/user-role-assignments") - public ResponseEntity> getAllUserRoleAssignments( - UserRoleAssignmentCriteria criteria, - Pageable pageable) { - log.debug("REST request to get UserRoleAssignments by criteria: {}", criteria); - Page page = userRoleAssignmentQueryService.findByCriteria(criteria, pageable); - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/user-role-assignments"); - return ResponseEntity.ok().headers(headers).body(page.getContent()); - } - - /** - * GET /user-role-assignments/count : count all the userRoleAssignments. - * - * @param criteria the criterias which the requested entities should match - * @return the ResponseEntity with status 200 (OK) and the count in body - */ - @GetMapping("/user-role-assignments/count") - public ResponseEntity countUserRoleAssignments(UserRoleAssignmentCriteria criteria) { - log.debug("REST request to count UserRoleAssignments by criteria: {}", criteria); - return ResponseEntity.ok().body(userRoleAssignmentQueryService.countByCriteria(criteria)); - } - - /** - * GET /user-role-assignments/:id : get the "id" userRoleAssignment. - * - * @param id the id of the userRoleAssignment to retrieve - * @return the ResponseEntity with status 200 (OK) and with body the userRoleAssignment, or with status 404 (Not Found) - */ - @GetMapping("/user-role-assignments/{id}") - public ResponseEntity getUserRoleAssignment(@PathVariable Long id) { - log.debug("REST request to get UserRoleAssignment : {}", id); - Optional userRoleAssignment = userRoleAssignmentService.findOne(id); - return ResponseUtil.wrapOrNotFound(userRoleAssignment); - } - - /** - * DELETE /user-role-assignments/:id : delete the "id" userRoleAssignment. - * - * @param id the id of the userRoleAssignment to delete - * @return the ResponseEntity with status 200 (OK) - */ - @DeleteMapping("/user-role-assignments/{id}") - public ResponseEntity deleteUserRoleAssignment(@PathVariable Long id) { - log.debug("REST request to delete UserRoleAssignment : {}", id); - userRoleAssignmentService.delete(id); - return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build(); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/BadRequestAlertException.java b/src/main/java/org/hostsharing/hsadminng/web/rest/errors/BadRequestAlertException.java deleted file mode 100644 index eb87b2ef..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/BadRequestAlertException.java +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.errors; - -import org.zalando.problem.AbstractThrowableProblem; -import org.zalando.problem.Status; - -import java.net.URI; -import java.util.HashMap; -import java.util.Map; - -public class BadRequestAlertException extends AbstractThrowableProblem { - - private static final long serialVersionUID = 1L; - - private final String param; - - private final String errorKey; - - public BadRequestAlertException(String defaultMessage, String param, String errorKey) { - this(ErrorConstants.DEFAULT_TYPE, defaultMessage, param, errorKey); - } - - public BadRequestAlertException(URI type, String defaultMessage, String param, String errorKey) { - super(type, defaultMessage, Status.BAD_REQUEST, null, null, null, getAlertParameters(param, errorKey)); - this.param = param; - this.errorKey = errorKey; - } - - public String getParam() { - return param; - } - - public String getErrorKey() { - return errorKey; - } - - private static Map getAlertParameters(String param, String errorKey) { - Map parameters = new HashMap<>(); - parameters.put("message", "error." + errorKey); - parameters.put("params", param); - return parameters; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/CustomParameterizedException.java b/src/main/java/org/hostsharing/hsadminng/web/rest/errors/CustomParameterizedException.java deleted file mode 100644 index 359e1d8b..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/CustomParameterizedException.java +++ /dev/null @@ -1,61 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.errors; - -import static org.zalando.problem.Status.BAD_REQUEST; - -import org.zalando.problem.AbstractThrowableProblem; - -import java.util.HashMap; -import java.util.Map; - -/** - * Custom, parameterized exception, which can be translated on the client side. - * For example: - * - *

- * throw new CustomParameterizedException("myCustomError", "hello", "world");
- * 
- * - * Can be translated with: - * - *
- * "error.myCustomError" :  "The server says {{param0}} to {{param1}}"
- * 
- */ -public class CustomParameterizedException extends AbstractThrowableProblem { - - private static final long serialVersionUID = 1L; - - private static final String PARAM = "param"; - - public CustomParameterizedException(String message, String... params) { - this(message, toParamMap(params)); - } - - public CustomParameterizedException(String message, Map paramMap) { - super(ErrorConstants.PARAMETERIZED_TYPE, - "Parameterized Exception", - BAD_REQUEST, - null, - null, - null, - toProblemParameters(message, paramMap)); - } - - public static Map toParamMap(String... params) { - Map paramMap = new HashMap<>(); - if (params != null && params.length > 0) { - for (int i = 0; i < params.length; i++) { - paramMap.put(PARAM + i, params[i]); - } - } - return paramMap; - } - - public static Map toProblemParameters(String message, Map paramMap) { - Map parameters = new HashMap<>(); - parameters.put("message", message); - parameters.put("params", paramMap); - return parameters; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/EmailAlreadyUsedException.java b/src/main/java/org/hostsharing/hsadminng/web/rest/errors/EmailAlreadyUsedException.java deleted file mode 100644 index 473297c1..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/EmailAlreadyUsedException.java +++ /dev/null @@ -1,11 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.errors; - -public class EmailAlreadyUsedException extends BadRequestAlertException { - - private static final long serialVersionUID = 1L; - - public EmailAlreadyUsedException() { - super(ErrorConstants.EMAIL_ALREADY_USED_TYPE, "Email is already in use!", "userManagement", "emailexists"); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/EmailNotFoundException.java b/src/main/java/org/hostsharing/hsadminng/web/rest/errors/EmailNotFoundException.java deleted file mode 100644 index 31ffcade..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/EmailNotFoundException.java +++ /dev/null @@ -1,14 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.errors; - -import org.zalando.problem.AbstractThrowableProblem; -import org.zalando.problem.Status; - -public class EmailNotFoundException extends AbstractThrowableProblem { - - private static final long serialVersionUID = 1L; - - public EmailNotFoundException() { - super(ErrorConstants.EMAIL_NOT_FOUND_TYPE, "Email address not registered", Status.BAD_REQUEST); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/ErrorConstants.java b/src/main/java/org/hostsharing/hsadminng/web/rest/errors/ErrorConstants.java deleted file mode 100644 index fff79e48..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/ErrorConstants.java +++ /dev/null @@ -1,25 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.errors; - -import java.net.URI; - -public final class ErrorConstants { - - public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure"; - public static final String ERR_VALIDATION = "error.validation"; - public static final String ERR_VALIDATION_DUPLICATE = "entity.validation.duplicate"; - - public static final String PROBLEM_BASE_URL = "https://www.jhipster.tech/problem"; - - public static final URI DEFAULT_TYPE = URI.create(PROBLEM_BASE_URL + "/problem-with-message"); - public static final URI CONSTRAINT_VIOLATION_TYPE = URI.create(PROBLEM_BASE_URL + "/constraint-violation"); - public static final URI PARAMETERIZED_TYPE = URI.create(PROBLEM_BASE_URL + "/parameterized"); - public static final URI ENTITY_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/entity-not-found"); - public static final URI INVALID_PASSWORD_TYPE = URI.create(PROBLEM_BASE_URL + "/invalid-password"); - public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used"); - public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used"); - public static final URI EMAIL_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/email-not-found"); - - private ErrorConstants() { - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/ExceptionTranslator.java b/src/main/java/org/hostsharing/hsadminng/web/rest/errors/ExceptionTranslator.java deleted file mode 100644 index 5aa2a5b9..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/ExceptionTranslator.java +++ /dev/null @@ -1,137 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.errors; - -import static org.hostsharing.hsadminng.web.rest.errors.ErrorConstants.*; - -import org.hostsharing.hsadminng.web.rest.util.HeaderUtil; - -import org.springframework.dao.ConcurrencyFailureException; -import org.springframework.dao.DataIntegrityViolationException; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.BindingResult; -import org.springframework.web.bind.MethodArgumentNotValidException; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.context.request.NativeWebRequest; -import org.zalando.problem.DefaultProblem; -import org.zalando.problem.Problem; -import org.zalando.problem.ProblemBuilder; -import org.zalando.problem.Status; -import org.zalando.problem.spring.web.advice.ProblemHandling; -import org.zalando.problem.violations.ConstraintViolationProblem; - -import java.util.List; -import java.util.NoSuchElementException; -import java.util.stream.Collectors; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import javax.servlet.http.HttpServletRequest; - -/** - * Controller advice to translate the server side exceptions to client-friendly json structures. - * The error response follows RFC7807 - Problem Details for HTTP APIs (https://tools.ietf.org/html/rfc7807) - */ -@ControllerAdvice -public class ExceptionTranslator implements ProblemHandling { - - private static final String FIELD_ERRORS_KEY = "fieldErrors"; - private static final String MESSAGE_KEY = "message"; - private static final String PATH_KEY = "path"; - private static final String VIOLATIONS_KEY = "violations"; - - /** - * Post-process the Problem payload to add the message key for the front-end if needed - */ - @Override - public ResponseEntity process(@Nullable ResponseEntity entity, NativeWebRequest request) { - if (entity == null) { - return entity; - } - Problem problem = entity.getBody(); - if (!(problem instanceof ConstraintViolationProblem || problem instanceof DefaultProblem)) { - return entity; - } - ProblemBuilder builder = Problem.builder() - .withType(Problem.DEFAULT_TYPE.equals(problem.getType()) ? DEFAULT_TYPE : problem.getType()) - .withStatus(problem.getStatus()) - .withTitle(problem.getTitle()) - .with(PATH_KEY, request.getNativeRequest(HttpServletRequest.class).getRequestURI()); - - if (problem instanceof ConstraintViolationProblem) { - builder - .with(VIOLATIONS_KEY, ((ConstraintViolationProblem) problem).getViolations()) - .with(MESSAGE_KEY, ERR_VALIDATION); - } else { - builder - .withCause(((DefaultProblem) problem).getCause()) - .withDetail(problem.getDetail()) - .withInstance(problem.getInstance()); - problem.getParameters().forEach(builder::with); - if (!problem.getParameters().containsKey(MESSAGE_KEY) && problem.getStatus() != null) { - builder.with(MESSAGE_KEY, "error.http." + problem.getStatus().getStatusCode()); - } - } - return new ResponseEntity<>(builder.build(), entity.getHeaders(), entity.getStatusCode()); - } - - @Override - public ResponseEntity handleMethodArgumentNotValid( - MethodArgumentNotValidException ex, - @Nonnull NativeWebRequest request) { - BindingResult result = ex.getBindingResult(); - List fieldErrors = result.getFieldErrors() - .stream() - .map(f -> new FieldErrorVM(f.getObjectName(), f.getField(), f.getCode())) - .collect(Collectors.toList()); - - Problem problem = Problem.builder() - .withType(CONSTRAINT_VIOLATION_TYPE) - .withTitle("Method argument not valid") - .withStatus(defaultConstraintViolationStatus()) - .with(MESSAGE_KEY, ERR_VALIDATION) - .with(FIELD_ERRORS_KEY, fieldErrors) - .build(); - return create(ex, problem, request); - } - - @ExceptionHandler - public ResponseEntity handleNoSuchElementException(NoSuchElementException ex, NativeWebRequest request) { - Problem problem = Problem.builder() - .withStatus(Status.NOT_FOUND) - .with(MESSAGE_KEY, ENTITY_NOT_FOUND_TYPE) - .build(); - return create(ex, problem, request); - } - - @ExceptionHandler - public ResponseEntity handleBadRequestAlertException(BadRequestAlertException ex, NativeWebRequest request) { - return create(ex, request, HeaderUtil.createFailureAlert(ex.getParam(), ex.getErrorKey(), ex.getMessage())); - } - - @ExceptionHandler - public ResponseEntity handleConcurrencyFailure(ConcurrencyFailureException ex, NativeWebRequest request) { - Problem problem = Problem.builder() - .withStatus(Status.CONFLICT) - .with(MESSAGE_KEY, ERR_CONCURRENCY_FAILURE) - .build(); - return create(ex, problem, request); - } - - @ExceptionHandler(DataIntegrityViolationException.class) - @ResponseBody - @ResponseStatus(HttpStatus.CONFLICT) - public ResponseEntity processDataIntegrityViolationException( - DataIntegrityViolationException exception, - NativeWebRequest request) { - // UX_CUSTOMER_JHI_NUMBER_INDEX_5 - Problem problem = Problem.builder() - .withStatus(Status.CONFLICT) - .with(MESSAGE_KEY, ERR_VALIDATION_DUPLICATE) - .build(); - return create(exception, problem, request); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/FieldErrorVM.java b/src/main/java/org/hostsharing/hsadminng/web/rest/errors/FieldErrorVM.java deleted file mode 100644 index 353102ec..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/FieldErrorVM.java +++ /dev/null @@ -1,34 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.errors; - -import java.io.Serializable; - -public class FieldErrorVM implements Serializable { - - private static final long serialVersionUID = 1L; - - private final String objectName; - - private final String field; - - private final String message; - - public FieldErrorVM(String dto, String field, String message) { - this.objectName = dto; - this.field = field; - this.message = message; - } - - public String getObjectName() { - return objectName; - } - - public String getField() { - return field; - } - - public String getMessage() { - return message; - } - -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/InternalServerErrorException.java b/src/main/java/org/hostsharing/hsadminng/web/rest/errors/InternalServerErrorException.java deleted file mode 100644 index 3221fcca..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/InternalServerErrorException.java +++ /dev/null @@ -1,17 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.errors; - -import org.zalando.problem.AbstractThrowableProblem; -import org.zalando.problem.Status; - -/** - * Simple exception with a message, that returns an Internal Server Error code. - */ -public class InternalServerErrorException extends AbstractThrowableProblem { - - private static final long serialVersionUID = 1L; - - public InternalServerErrorException(String message) { - super(ErrorConstants.DEFAULT_TYPE, message, Status.INTERNAL_SERVER_ERROR); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/InvalidPasswordException.java b/src/main/java/org/hostsharing/hsadminng/web/rest/errors/InvalidPasswordException.java deleted file mode 100644 index e04b0b98..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/InvalidPasswordException.java +++ /dev/null @@ -1,14 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.errors; - -import org.zalando.problem.AbstractThrowableProblem; -import org.zalando.problem.Status; - -public class InvalidPasswordException extends AbstractThrowableProblem { - - private static final long serialVersionUID = 1L; - - public InvalidPasswordException() { - super(ErrorConstants.INVALID_PASSWORD_TYPE, "Incorrect password", Status.BAD_REQUEST); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/LoginAlreadyUsedException.java b/src/main/java/org/hostsharing/hsadminng/web/rest/errors/LoginAlreadyUsedException.java deleted file mode 100644 index 44d82faf..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/LoginAlreadyUsedException.java +++ /dev/null @@ -1,11 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.errors; - -public class LoginAlreadyUsedException extends BadRequestAlertException { - - private static final long serialVersionUID = 1L; - - public LoginAlreadyUsedException() { - super(ErrorConstants.LOGIN_ALREADY_USED_TYPE, "Login name already used!", "userManagement", "userexists"); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/package-info.java b/src/main/java/org/hostsharing/hsadminng/web/rest/errors/package-info.java deleted file mode 100644 index a3c8f2dd..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/errors/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Specific errors used with Zalando's "problem-spring-web" library. - * - * More information on https://github.com/zalando/problem-spring-web - */ -package org.hostsharing.hsadminng.web.rest.errors; diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/package-info.java b/src/main/java/org/hostsharing/hsadminng/web/rest/package-info.java deleted file mode 100644 index d08178fd..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Spring MVC REST controllers. - */ -package org.hostsharing.hsadminng.web.rest; diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/util/HeaderUtil.java b/src/main/java/org/hostsharing/hsadminng/web/rest/util/HeaderUtil.java deleted file mode 100644 index 3771468d..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/util/HeaderUtil.java +++ /dev/null @@ -1,46 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.util; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.HttpHeaders; - -/** - * Utility class for HTTP headers creation. - */ -public final class HeaderUtil { - - private static final Logger log = LoggerFactory.getLogger(HeaderUtil.class); - - private static final String APPLICATION_NAME = "hsadminNgApp"; - - private HeaderUtil() { - } - - public static HttpHeaders createAlert(String message, String param) { - HttpHeaders headers = new HttpHeaders(); - headers.add("X-" + APPLICATION_NAME + "-alert", message); - headers.add("X-" + APPLICATION_NAME + "-params", param); - return headers; - } - - public static HttpHeaders createEntityCreationAlert(String entityName, String param) { - return createAlert(APPLICATION_NAME + "." + entityName + ".created", param); - } - - public static HttpHeaders createEntityUpdateAlert(String entityName, String param) { - return createAlert(APPLICATION_NAME + "." + entityName + ".updated", param); - } - - public static HttpHeaders createEntityDeletionAlert(String entityName, String param) { - return createAlert(APPLICATION_NAME + "." + entityName + ".deleted", param); - } - - public static HttpHeaders createFailureAlert(String entityName, String errorKey, String defaultMessage) { - log.error("Entity processing failed, {}", defaultMessage); - HttpHeaders headers = new HttpHeaders(); - headers.add("X-" + APPLICATION_NAME + "-error", "error." + errorKey); - headers.add("X-" + APPLICATION_NAME + "-params", entityName); - return headers; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/util/PaginationUtil.java b/src/main/java/org/hostsharing/hsadminng/web/rest/util/PaginationUtil.java deleted file mode 100644 index bcd04789..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/util/PaginationUtil.java +++ /dev/null @@ -1,46 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.util; - -import org.springframework.data.domain.Page; -import org.springframework.http.HttpHeaders; -import org.springframework.web.util.UriComponentsBuilder; - -/** - * Utility class for handling pagination. - * - *

- * Pagination uses the same principles as the GitHub API, - * and follow RFC 5988 (Link header). - */ -public final class PaginationUtil { - - private PaginationUtil() { - } - - public static HttpHeaders generatePaginationHttpHeaders(Page page, String baseUrl) { - - HttpHeaders headers = new HttpHeaders(); - headers.add("X-Total-Count", Long.toString(page.getTotalElements())); - String link = ""; - if ((page.getNumber() + 1) < page.getTotalPages()) { - link = "<" + generateUri(baseUrl, page.getNumber() + 1, page.getSize()) + ">; rel=\"next\","; - } - // prev link - if ((page.getNumber()) > 0) { - link += "<" + generateUri(baseUrl, page.getNumber() - 1, page.getSize()) + ">; rel=\"prev\","; - } - // last and first link - int lastPage = 0; - if (page.getTotalPages() > 0) { - lastPage = page.getTotalPages() - 1; - } - link += "<" + generateUri(baseUrl, lastPage, page.getSize()) + ">; rel=\"last\","; - link += "<" + generateUri(baseUrl, 0, page.getSize()) + ">; rel=\"first\""; - headers.add(HttpHeaders.LINK, link); - return headers; - } - - private static String generateUri(String baseUrl, int page, int size) { - return UriComponentsBuilder.fromUriString(baseUrl).queryParam("page", page).queryParam("size", size).toUriString(); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/vm/KeyAndPasswordVM.java b/src/main/java/org/hostsharing/hsadminng/web/rest/vm/KeyAndPasswordVM.java deleted file mode 100644 index 8d85d8ef..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/vm/KeyAndPasswordVM.java +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.vm; - -/** - * View Model object for storing the user's key and password. - */ -public class KeyAndPasswordVM { - - private String key; - - private String newPassword; - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getNewPassword() { - return newPassword; - } - - public void setNewPassword(String newPassword) { - this.newPassword = newPassword; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/vm/LoggerVM.java b/src/main/java/org/hostsharing/hsadminng/web/rest/vm/LoggerVM.java deleted file mode 100644 index edc032c2..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/vm/LoggerVM.java +++ /dev/null @@ -1,47 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.vm; - -import ch.qos.logback.classic.Logger; - -/** - * View Model object for storing a Logback logger. - */ -public class LoggerVM { - - private String name; - - private String level; - - public LoggerVM(Logger logger) { - this.name = logger.getName(); - this.level = logger.getEffectiveLevel().toString(); - } - - public LoggerVM() { - // Empty public constructor used by Jackson. - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getLevel() { - return level; - } - - public void setLevel(String level) { - this.level = level; - } - - @Override - public String toString() { - return "LoggerVM{" + - "name='" + name + '\'' + - ", level='" + level + '\'' + - '}'; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/vm/LoginVM.java b/src/main/java/org/hostsharing/hsadminng/web/rest/vm/LoginVM.java deleted file mode 100644 index 951c7d46..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/vm/LoginVM.java +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.vm; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -/** - * View Model object for storing a user's credentials. - */ -public class LoginVM { - - @NotNull - @Size(min = 1, max = 50) - private String username; - - @NotNull - @Size(min = ManagedUserVM.PASSWORD_MIN_LENGTH, max = ManagedUserVM.PASSWORD_MAX_LENGTH) - private String password; - - private Boolean rememberMe; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public Boolean isRememberMe() { - return rememberMe; - } - - public void setRememberMe(Boolean rememberMe) { - this.rememberMe = rememberMe; - } - - @Override - public String toString() { - return "LoginVM{" + - "username='" + username + '\'' + - ", rememberMe=" + rememberMe + - '}'; - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/vm/ManagedUserVM.java b/src/main/java/org/hostsharing/hsadminng/web/rest/vm/ManagedUserVM.java deleted file mode 100644 index 08005ceb..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/vm/ManagedUserVM.java +++ /dev/null @@ -1,37 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.vm; - -import org.hostsharing.hsadminng.service.dto.UserDTO; - -import javax.validation.constraints.Size; - -/** - * View Model extending the UserDTO, which is meant to be used in the user management UI. - */ -public class ManagedUserVM extends UserDTO { - - public static final int PASSWORD_MIN_LENGTH = 4; - - public static final int PASSWORD_MAX_LENGTH = 100; - - @Size(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH) - private String password; - - public ManagedUserVM() { - // Empty constructor needed for Jackson. - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - @Override - public String toString() { - return "ManagedUserVM{" + - "} " + super.toString(); - } -} diff --git a/src/main/java/org/hostsharing/hsadminng/web/rest/vm/package-info.java b/src/main/java/org/hostsharing/hsadminng/web/rest/vm/package-info.java deleted file mode 100644 index 1659f464..00000000 --- a/src/main/java/org/hostsharing/hsadminng/web/rest/vm/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * View Models used by Spring MVC REST controllers. - */ -package org.hostsharing.hsadminng.web.rest.vm; diff --git a/src/main/jdl/accessrights.jdl b/src/main/jdl/accessrights.jdl deleted file mode 100644 index cd640ce1..00000000 --- a/src/main/jdl/accessrights.jdl +++ /dev/null @@ -1,23 +0,0 @@ -filter all -paginate all with infinite-scroll - -enum UserRole { - HOSTMASTER, - ADMIN, - SUPPORTER, - CONTRACTUAL_CONTACT, - FINANCIAL_CONTACT, - TECHNICAL_CONTACT, - CUSTOMER_USER -} - -entity UserRoleAssignment { - entityTypeId String required maxlength(32), - entityObjectId Long required, - assignedRole UserRole required -} - - -relationship ManyToOne { - UserRoleAssignment{user(login)} to User{required}, -} diff --git a/src/main/jdl/customer.jdl b/src/main/jdl/customer.jdl deleted file mode 100644 index 3cb5a6ba..00000000 --- a/src/main/jdl/customer.jdl +++ /dev/null @@ -1,90 +0,0 @@ -filter all -dto all with mapstruct -service all with serviceClass -paginate all with infinite-scroll - -enum CustomerKind { - NATURAL, - LEGAL -} - -enum VatRegion { - DOMESTIC, - EU, - OTHER -} - -entity Customer { - reference Integer required unique min(10000) max(99999), - prefix String required maxlength(3) unique pattern(/[a-z][a-z0-9]+/), - name String required maxlength(80), - kind CustomerKind required, - birthDate LocalDate, - birthPlace String maxlength(80), - registrationCourt String maxlength(80), - registrationNumber String maxlength(80), - vatRegion VatRegion required, - vatNumber String maxlength(40), - contractualSalutation String maxlength(80), - contractualAddress String required maxlength(400), - billingSalutation String maxlength(80), - billingAddress String maxlength(400), - remark String maxlength(160) -} - -entity Membership { - admissionDocumentDate LocalDate required, - cancellationDocumentDate LocalDate, - memberFromDate LocalDate required, - memberUntilDate LocalDate, - remark String maxlength(160) -} - -enum ShareAction { - SUBSCRIPTION, - CANCELLATION -} - -entity Share { - documentDate LocalDate required, - valueDate LocalDate required, - action ShareAction required, - quantity Integer required, - remark String maxlength(160) -} - -enum AssetAction { - PAYMENT, - HANDOVER, - ADOPTION, - LOSS, - CLEARING, - PAYBACK -} - -entity Asset { - documentDate LocalDate required, - valueDate LocalDate required, - action AssetAction required, - amount BigDecimal required, - remark String maxlength(160) -} - -entity SepaMandate { - reference String maxlength(40) unique required, - iban String maxlength(34), - bic String maxlength(11), - grantingDocumentDate LocalDate required, - revokationDocumentDate LocalDate, - validFromDate LocalDate required, - validUntilDate LocalDate, - lastUsedDate LocalDate, - remark String maxlength(160) -} - -relationship OneToMany { - Customer{membership} to Membership{customer(prefix) required}, - Customer{sepamandate} to SepaMandate{customer(prefix) required}, - Membership{share} to Share{membership(admissionDocumentDate) required}, - Membership{asset} to Asset{membership(admissionDocumentDate) required} -} diff --git a/src/main/jib/entrypoint.sh b/src/main/jib/entrypoint.sh deleted file mode 100644 index c395308d..00000000 --- a/src/main/jib/entrypoint.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo "The application will start in ${JHIPSTER_SLEEP}s..." && sleep ${JHIPSTER_SLEEP} -exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -cp /app/resources/:/app/classes/:/app/libs/* "org.hostsharing.hsadminng.HsadminNgApp" "$@" diff --git a/src/main/resources/.h2.server.properties b/src/main/resources/.h2.server.properties deleted file mode 100644 index b775c018..00000000 --- a/src/main/resources/.h2.server.properties +++ /dev/null @@ -1,6 +0,0 @@ -#H2 Server Properties -#Thu Apr 25 12:42:42 CEST 2019 -0=JHipster H2 (Memory)|org.h2.Driver|jdbc\:h2\:mem\:hsadminng|hsadminNg -webAllowOthers=true -webPort=8082 -webSSL=false diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 00000000..7bcbda1b --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,19 @@ +spring: + + datasource: + driver-class-name: org.postgresql.Driver + password: password + url: jdbc:postgresql://localhost:5432/postgres + username: postgres + + sql: + init: + mode: never + + jpa: + properties: + hibernate: + dialect: net.hostsharing.hsadminng.config.PostgreSQL95CustomDialect + +liquibase: + contexts: dev diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt deleted file mode 100644 index e0bc55aa..00000000 --- a/src/main/resources/banner.txt +++ /dev/null @@ -1,10 +0,0 @@ - - ${AnsiColor.GREEN} ██╗${AnsiColor.RED} ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗ - ${AnsiColor.GREEN} ██║${AnsiColor.RED} ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗ - ${AnsiColor.GREEN} ██║${AnsiColor.RED} ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝ - ${AnsiColor.GREEN}██╗ ██║${AnsiColor.RED} ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ - ${AnsiColor.GREEN}╚██████╔╝${AnsiColor.RED} ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ - ${AnsiColor.GREEN} ╚═════╝ ${AnsiColor.RED} ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ - -${AnsiColor.BRIGHT_BLUE}:: JHipster 🤓 :: Running Spring Boot ${spring-boot.version} :: -:: https://www.jhipster.tech ::${AnsiColor.DEFAULT} diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml deleted file mode 100644 index 8a2c6e53..00000000 --- a/src/main/resources/config/application-dev.yml +++ /dev/null @@ -1,117 +0,0 @@ -# =================================================================== -# Spring Boot configuration for the "dev" profile. -# -# This configuration overrides the application.yml file. -# -# More information on profiles: https://www.jhipster.tech/profiles/ -# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ -# =================================================================== - -# =================================================================== -# Standard Spring Boot properties. -# Full reference is available at: -# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html -# =================================================================== - -logging: - level: - ROOT: DEBUG - io.github.jhipster: DEBUG - org.hostsharing.hsadminng: DEBUG - -spring: - profiles: - active: dev - include: - - swagger - # Uncomment to activate TLS for the dev profile - #- tls - devtools: - restart: - enabled: true - additional-exclude: .h2.server.properties - livereload: - enabled: false # we use Webpack dev server + BrowserSync for livereload - jackson: - serialization: - indent-output: true - datasource: - # this is just a common configuration for the dev-profiles h2mem, h2file and pgsql - type: com.zaxxer.hikari.HikariDataSource - hikari: - poolName: Hikari - auto-commit: false - jpa: - show-sql: true - properties: - hibernate.id.new_generator_mappings: true - hibernate.connection.provider_disables_autocommit: true - hibernate.cache.use_second_level_cache: false - hibernate.cache.use_query_cache: false - hibernate.generate_statistics: true - mail: - host: localhost - port: 25 - username: - password: - messages: - cache-duration: PT1S # 1 second, see the ISO 8601 standard - thymeleaf: - cache: false - -server: - port: 8080 - -# =================================================================== -# JHipster specific properties -# -# Full reference is available at: https://www.jhipster.tech/common-application-properties/ -# =================================================================== - -jhipster: - http: - version: V_1_1 # To use HTTP/2 you will need to activate TLS (see application-tls.yml) - cache: # Cache configuration - ehcache: # Ehcache configuration - time-to-live-seconds: 3600 # By default objects stay 1 hour in the cache - max-entries: 100 # Number of objects in each cache entry - # CORS is only enabled by default with the "dev" profile, so BrowserSync can access the API - cors: - allowed-origins: "*" - allowed-methods: "*" - allowed-headers: "*" - exposed-headers: "Authorization,Link,X-Total-Count" - allow-credentials: true - max-age: 1800 - security: - authentication: - jwt: - # This token must be encoded using Base64 and be at least 256 bits long (you can type `openssl rand -base64 64` on your command line to generate a 512 bits one) - base64-secret: ZDFlMDUzODIzMTUzZDEwZjExN2E5ZjAzY2VhZmYzNDE1YjhlYWUxZGRhMGU3ODZiNjRkNjVlNzEwZjExYWY4YzczM2NlYzI5YWE1OTRkNWM0YThlYjZjZjA5Zjc5YWJkOTgzYjdhZjQxZWQyZGUyYjFlYjI5ZDE3NmE4M2UzYjQ= - # Token is valid 24 hours - token-validity-in-seconds: 86400 - token-validity-in-seconds-for-remember-me: 2592000 - mail: # specific JHipster mail property, for standard properties see MailProperties - from: hsadminNg@localhost - base-url: http://127.0.0.1:8080 - metrics: - logs: # Reports metrics in the logs - enabled: false - report-frequency: 60 # in seconds - logging: - logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration - enabled: false - host: localhost - port: 5000 - queue-size: 512 - -# =================================================================== -# Application specific properties -# Add your own application properties here, see the ApplicationProperties class -# to have type-safe configuration, like in the JHipsterProperties above -# -# More documentation is available at: -# https://www.jhipster.tech/common-application-properties/ -# =================================================================== - -# application: diff --git a/src/main/resources/config/application-h2file.yml b/src/main/resources/config/application-h2file.yml deleted file mode 100644 index 6f13aad7..00000000 --- a/src/main/resources/config/application-h2file.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Configuration for the dev-profile using a file-based H2 database. - -spring: - profiles: - active: h2,h2file - include: - - dev - - swagger - # Uncomment to activate TLS for the dev profile - #- tls - datasource: - url: url: jdbc:h2:~/.hsadminng.h2db;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE - username: hsadminNg - password: - h2: - console: - enabled: false - jpa: - database-platform: io.github.jhipster.domain.util.FixedH2Dialect - database: H2 diff --git a/src/main/resources/config/application-h2mem.yml b/src/main/resources/config/application-h2mem.yml deleted file mode 100644 index 8762de24..00000000 --- a/src/main/resources/config/application-h2mem.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Configuration for the dev-profile using an in-memory H2 database. - -spring: - profiles: - active: h2,h2mem - include: - - dev - - swagger - # Uncomment to activate TLS for the dev profile - #- tls - datasource: - url: jdbc:h2:mem:hsadminng;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE - username: hsadminNg - password: - h2: - console: - enabled: false - jpa: - database-platform: io.github.jhipster.domain.util.FixedH2Dialect - database: H2 - liquibase: - contexts: dev,sample-data diff --git a/src/main/resources/config/application-pgsql.yml b/src/main/resources/config/application-pgsql.yml deleted file mode 100644 index b4faca72..00000000 --- a/src/main/resources/config/application-pgsql.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Configuration for the dev-profile using a Postgres database specified via environment. - -spring: - profiles: - active: dev,pgsql - include: - - dev - - swagger - # Uncomment to activate TLS for the dev profile - #- tls - datasource: - url: ${HSADMINNG_DB_URL} - username: ${HSADMINNG_DB_USER} - password: ${HSADMINNG_DB_PASS} - jpa: - database-platform: io.github.jhipster.domain.util.FixedPostgreSQL82Dialect - database: POSTGRESQL diff --git a/src/main/resources/config/application-prod.yml b/src/main/resources/config/application-prod.yml deleted file mode 100644 index 6d39439b..00000000 --- a/src/main/resources/config/application-prod.yml +++ /dev/null @@ -1,132 +0,0 @@ -# =================================================================== -# Spring Boot configuration for the "prod" profile. -# -# This configuration overrides the application.yml file. -# -# More information on profiles: https://www.jhipster.tech/profiles/ -# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ -# =================================================================== - -# =================================================================== -# Standard Spring Boot properties. -# Full reference is available at: -# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html -# =================================================================== - -logging: - level: - ROOT: INFO - org.hostsharing.hsadminng: INFO - io.github.jhipster: INFO - -spring: - devtools: - restart: - enabled: false - livereload: - enabled: false - datasource: - type: com.zaxxer.hikari.HikariDataSource - url: jdbc:postgresql://localhost:5432/hsadminNg - username: hsadminNg - password: - hikari: - poolName: Hikari - auto-commit: false - jpa: - database-platform: io.github.jhipster.domain.util.FixedPostgreSQL82Dialect - database: POSTGRESQL - show-sql: false - properties: - hibernate.id.new_generator_mappings: true - hibernate.connection.provider_disables_autocommit: true - hibernate.cache.use_second_level_cache: false - hibernate.cache.use_query_cache: false - hibernate.generate_statistics: true - liquibase: - contexts: prod - mail: - host: localhost - port: 25 - username: - password: - thymeleaf: - cache: true - -# =================================================================== -# To enable TLS in production, generate a certificate using: -# keytool -genkey -alias hsadminng -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650 -# -# You can also use Let's Encrypt: -# https://maximilian-boehm.com/hp2121/Create-a-Java-Keystore-JKS-from-Let-s-Encrypt-Certificates.htm -# -# Then, modify the server.ssl properties so your "server" configuration looks like: -# -# server: -# port: 443 -# ssl: -# key-store: classpath:config/tls/keystore.p12 -# key-store-password: password -# key-store-type: PKCS12 -# key-alias: hsadminng -# # The ciphers suite enforce the security by deactivating some old and deprecated SSL cipher, this list was tested against SSL Labs (https://www.ssllabs.com/ssltest/) -# ciphers: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 ,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 ,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,TLS_RSA_WITH_CAMELLIA_128_CBC_SHA -# =================================================================== -server: - port: 8080 - compression: - enabled: true - mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json - min-response-size: 1024 - -# =================================================================== -# JHipster specific properties -# -# Full reference is available at: https://www.jhipster.tech/common-application-properties/ -# =================================================================== - -jhipster: - http: - version: V_1_1 # To use HTTP/2 you will need SSL support (see above the "server.ssl" configuration) - cache: # Used by the CachingHttpHeadersFilter - timeToLiveInDays: 1461 - cache: # Cache configuration - ehcache: # Ehcache configuration - time-to-live-seconds: 3600 # By default objects stay 1 hour in the cache - max-entries: 1000 # Number of objects in each cache entry - security: - authentication: - jwt: - # This token must be encoded using Base64 and be at least 256 bits long (you can type `openssl rand -base64 64` on your command line to generate a 512 bits one) - # As this is the PRODUCTION configuration, you MUST change the default key, and store it securely: - # - In the JHipster Registry (which includes a Spring Cloud Config server) - # - In a separate `application-prod.yml` file, in the same folder as your executable WAR file - # - In the `JHIPSTER_SECURITY_AUTHENTICATION_JWT_BASE64_SECRET` environment variable - base64-secret: ZDFlMDUzODIzMTUzZDEwZjExN2E5ZjAzY2VhZmYzNDE1YjhlYWUxZGRhMGU3ODZiNjRkNjVlNzEwZjExYWY4YzczM2NlYzI5YWE1OTRkNWM0YThlYjZjZjA5Zjc5YWJkOTgzYjdhZjQxZWQyZGUyYjFlYjI5ZDE3NmE4M2UzYjQ= - # Token is valid 24 hours - token-validity-in-seconds: 86400 - token-validity-in-seconds-for-remember-me: 2592000 - mail: # specific JHipster mail property, for standard properties see MailProperties - from: hsadminNg@localhost - base-url: http://my-server-url-to-change # Modify according to your server's URL - metrics: - logs: # Reports metrics in the logs - enabled: false - report-frequency: 60 # in seconds - logging: - logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration - enabled: false - host: localhost - port: 5000 - queue-size: 512 - -# =================================================================== -# Application specific properties -# Add your own application properties here, see the ApplicationProperties class -# to have type-safe configuration, like in the JHipsterProperties above -# -# More documentation is available at: -# https://www.jhipster.tech/common-application-properties/ -# =================================================================== - -# application: diff --git a/src/main/resources/config/application-tls.yml b/src/main/resources/config/application-tls.yml deleted file mode 100644 index c4e0565c..00000000 --- a/src/main/resources/config/application-tls.yml +++ /dev/null @@ -1,20 +0,0 @@ -# =================================================================== -# Activate this profile to enable TLS and HTTP/2. -# -# JHipster has generated a self-signed certificate, which will be used to encrypt traffic. -# As your browser will not understand this certificate, you will need to import it. -# -# Another (easiest) solution with Chrome is to enable the "allow-insecure-localhost" flag -# at chrome://flags/#allow-insecure-localhost -# =================================================================== -server: - ssl: - key-store: classpath:config/tls/keystore.p12 - key-store-password: password - key-store-type: PKCS12 - key-alias: selfsigned - ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 - enabled-protocols: TLSv1.2 -jhipster: - http: - version: V_2_0 diff --git a/src/main/resources/config/application.yml b/src/main/resources/config/application.yml deleted file mode 100644 index a1d5ea68..00000000 --- a/src/main/resources/config/application.yml +++ /dev/null @@ -1,143 +0,0 @@ -# =================================================================== -# Spring Boot configuration. -# -# This configuration will be overridden by the Spring profile you use, -# for example application-dev.yml if you use the "dev" profile. -# -# More information on profiles: https://www.jhipster.tech/profiles/ -# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ -# =================================================================== - -# =================================================================== -# Standard Spring Boot properties. -# Full reference is available at: -# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html -# =================================================================== - -management: - endpoints: - web: - base-path: /management - exposure: - include: ["configprops", "env", "health", "info", "threaddump", "logfile", "jhi-metrics", "prometheus" ] - endpoint: - health: - show-details: when-authorized - jhi-metrics: - enabled: true - info: - git: - mode: full - health: - mail: - enabled: false # When using the MailService, configure an SMTP server and set this to true - metrics: - export: - # Prometheus is the default metrics backend - prometheus: - enabled: true - step: 60 - binders: - jvm: - enabled: true - processor: - enabled: true - uptime: - enabled: true - logback: - enabled: true - files: - enabled: true - integration: - enabled: true - distribution: - percentiles-histogram: - all: true - percentiles: - all: 0, 0.5, 0.75, 0.95, 0.99, 1.0 - web: - server: - auto-time-requests: true - -spring: - application: - name: hsadminNg - profiles: - # The commented value for `active` can be replaced with valid Spring profiles to load. - # Otherwise, it will be filled in by gradle when building the WAR file - # Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS` - active: #spring.profiles.active# - jpa: - open-in-view: false - properties: - hibernate.jdbc.time_zone: UTC - hibernate: - ddl-auto: none - naming: - physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy - implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy - messages: - basename: i18n/messages - mvc: - favicon: - enabled: false - thymeleaf: - mode: HTML - jackson: - deserialization: - USE_BIG_DECIMAL_FOR_FLOATS: true - -server: - servlet: - session: - cookie: - http-only: true - -# Properties to be exposed on the /info management endpoint -info: - # Comma separated list of profiles that will trigger the ribbon to show - display-ribbon-on-profiles: "dev" - -# =================================================================== -# JHipster specific properties -# -# Full reference is available at: https://www.jhipster.tech/common-application-properties/ -# =================================================================== - -jhipster: - async: - core-pool-size: 2 - max-pool-size: 50 - queue-capacity: 10000 - # By default CORS is disabled. Uncomment to enable. - #cors: - #allowed-origins: "*" - #allowed-methods: "*" - #allowed-headers: "*" - #exposed-headers: "Authorization,Link,X-Total-Count" - #allow-credentials: true - #max-age: 1800 - mail: - from: hsadminNg@localhost - swagger: - default-include-pattern: /api/.* - title: hsadminNg API - description: hsadminNg API documentation - version: 0.0.1 - terms-of-service-url: - contact-name: - contact-url: - contact-email: - license: - license-url: - -# =================================================================== -# Application specific properties -# Add your own application properties here, see the ApplicationProperties class -# to have type-safe configuration, like in the JHipsterProperties above -# -# More documentation is available at: -# https://www.jhipster.tech/common-application-properties/ -# =================================================================== - -# application: diff --git a/src/main/resources/config/liquibase/authorities.csv b/src/main/resources/config/liquibase/authorities.csv deleted file mode 100644 index f56c3aa4..00000000 --- a/src/main/resources/config/liquibase/authorities.csv +++ /dev/null @@ -1,5 +0,0 @@ -name -ROLE_HOSTMASTER -ROLE_ADMIN -ROLE_SUPPORTER -ROLE_USER diff --git a/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml b/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml deleted file mode 100644 index ee13f6f6..00000000 --- a/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/20190507105332_added_entity_Customer.xml b/src/main/resources/config/liquibase/changelog/20190507105332_added_entity_Customer.xml deleted file mode 100644 index 678deeaa..00000000 --- a/src/main/resources/config/liquibase/changelog/20190507105332_added_entity_Customer.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/20190507105333_added_entity_Membership.xml b/src/main/resources/config/liquibase/changelog/20190507105333_added_entity_Membership.xml deleted file mode 100644 index b3f71ecc..00000000 --- a/src/main/resources/config/liquibase/changelog/20190507105333_added_entity_Membership.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/20190507105333_added_entity_constraints_Membership.xml b/src/main/resources/config/liquibase/changelog/20190507105333_added_entity_constraints_Membership.xml deleted file mode 100644 index aa5bb247..00000000 --- a/src/main/resources/config/liquibase/changelog/20190507105333_added_entity_constraints_Membership.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/20190507105334_added_entity_Share.xml b/src/main/resources/config/liquibase/changelog/20190507105334_added_entity_Share.xml deleted file mode 100644 index bfca511e..00000000 --- a/src/main/resources/config/liquibase/changelog/20190507105334_added_entity_Share.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/20190507105334_added_entity_constraints_Share.xml b/src/main/resources/config/liquibase/changelog/20190507105334_added_entity_constraints_Share.xml deleted file mode 100644 index ccfe0ddc..00000000 --- a/src/main/resources/config/liquibase/changelog/20190507105334_added_entity_constraints_Share.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/20190507105335_added_entity_Asset.xml b/src/main/resources/config/liquibase/changelog/20190507105335_added_entity_Asset.xml deleted file mode 100644 index d991554b..00000000 --- a/src/main/resources/config/liquibase/changelog/20190507105335_added_entity_Asset.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/20190507105335_added_entity_constraints_Asset.xml b/src/main/resources/config/liquibase/changelog/20190507105335_added_entity_constraints_Asset.xml deleted file mode 100644 index 2da4503b..00000000 --- a/src/main/resources/config/liquibase/changelog/20190507105335_added_entity_constraints_Asset.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/20190507105336_added_entity_SepaMandate.xml b/src/main/resources/config/liquibase/changelog/20190507105336_added_entity_SepaMandate.xml deleted file mode 100644 index 3bf94bdc..00000000 --- a/src/main/resources/config/liquibase/changelog/20190507105336_added_entity_SepaMandate.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/20190507105336_added_entity_constraints_SepaMandate.xml b/src/main/resources/config/liquibase/changelog/20190507105336_added_entity_constraints_SepaMandate.xml deleted file mode 100644 index 3975b2bc..00000000 --- a/src/main/resources/config/liquibase/changelog/20190507105336_added_entity_constraints_SepaMandate.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/20190507105342_added_entity_UserRoleAssignment.xml b/src/main/resources/config/liquibase/changelog/20190507105342_added_entity_UserRoleAssignment.xml deleted file mode 100644 index f56261bd..00000000 --- a/src/main/resources/config/liquibase/changelog/20190507105342_added_entity_UserRoleAssignment.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/20190507105342_added_entity_constraints_UserRoleAssignment.xml b/src/main/resources/config/liquibase/changelog/20190507105342_added_entity_constraints_UserRoleAssignment.xml deleted file mode 100644 index 1b8a1d14..00000000 --- a/src/main/resources/config/liquibase/changelog/20190507105342_added_entity_constraints_UserRoleAssignment.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/constraints_Membership.xml b/src/main/resources/config/liquibase/changelog/constraints_Membership.xml deleted file mode 100644 index 9ce63193..00000000 --- a/src/main/resources/config/liquibase/changelog/constraints_Membership.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/src/main/resources/config/liquibase/changelog/constraints_UserRoleAssignment.xml b/src/main/resources/config/liquibase/changelog/constraints_UserRoleAssignment.xml deleted file mode 100644 index 66a7712f..00000000 --- a/src/main/resources/config/liquibase/changelog/constraints_UserRoleAssignment.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/src/main/resources/config/liquibase/historicization/historicization.xml b/src/main/resources/config/liquibase/historicization/historicization.xml deleted file mode 100644 index 9f5f515d..00000000 --- a/src/main/resources/config/liquibase/historicization/historicization.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - CREATE OR REPLACE FUNCTION historicize() - RETURNS trigger - AS $$ - BEGIN - IF (TG_OP = 'INSERT') OR (TG_OP = 'UPDATE') THEN - EXECUTE 'INSERT INTO history VALUES (txid_current(), now()) ON CONFLICT DO NOTHING'; - EXECUTE format('INSERT INTO %I_history VALUES (DEFAULT, txid_current(), False, $1.*)', TG_TABLE_NAME) USING NEW; - RETURN NEW; - ELSE -- assuming TG_OP = 'DELETE' - EXECUTE 'INSERT INTO history VALUES (txid_current(), now()) ON CONFLICT DO NOTHING'; - EXECUTE format('INSERT INTO %I_history VALUES (DEFAULT, txid_current(), True, $1.*)', TG_TABLE_NAME) USING OLD; - RETURN OLD; - END IF; - END; - $$ - LANGUAGE plpgsql; - - - - - diff --git a/src/main/resources/config/liquibase/historicization/historicization_Asset.xml b/src/main/resources/config/liquibase/historicization/historicization_Asset.xml deleted file mode 100644 index 22584e19..00000000 --- a/src/main/resources/config/liquibase/historicization/historicization_Asset.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CREATE TRIGGER asset_historicize - AFTER INSERT OR DELETE OR UPDATE ON asset - FOR EACH ROW EXECUTE PROCEDURE historicize(); - - - DROP TRIGGER asset_historicize - - - - - - SELECT * - FROM asset_history - WHERE history_id IN ( - SELECT max(history_id) AS history_id - FROM asset_history - WHERE history_transaction <= current_setting('history.transaction')::bigint - GROUP BY id) -- assets are not deletable, thus id is enough - - - - - - diff --git a/src/main/resources/config/liquibase/historicization/historicization_Customer.xml b/src/main/resources/config/liquibase/historicization/historicization_Customer.xml deleted file mode 100644 index 6d7245fa..00000000 --- a/src/main/resources/config/liquibase/historicization/historicization_Customer.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CREATE TRIGGER customer_historicize - AFTER INSERT OR DELETE OR UPDATE ON customer - FOR EACH ROW EXECUTE PROCEDURE historicize(); - - - DROP TRIGGER customer_historicize - - - - - - SELECT * - FROM customer_history - WHERE history_id IN ( - SELECT max(history_id) AS history_id - FROM customer_history - WHERE history_transaction <= current_setting('history.transaction')::bigint - GROUP BY name) -- must have a unique constraint - - - - diff --git a/src/main/resources/config/liquibase/historicization/historicization_Membership.xml b/src/main/resources/config/liquibase/historicization/historicization_Membership.xml deleted file mode 100644 index 9759f9d8..00000000 --- a/src/main/resources/config/liquibase/historicization/historicization_Membership.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CREATE TRIGGER membership_historicize - AFTER INSERT OR DELETE OR UPDATE ON membership - FOR EACH ROW EXECUTE PROCEDURE historicize(); - - - DROP TRIGGER membership_historicize - - - - - - SELECT * - FROM membership_history - WHERE history_id IN ( - SELECT max(history_id) AS history_id - FROM membership_history - WHERE history_transaction <= current_setting('history.transaction')::bigint - GROUP BY customer_id, member_from_date) -- must have a unique constraint - - - - diff --git a/src/main/resources/config/liquibase/historicization/historicization_SepaMandate.xml b/src/main/resources/config/liquibase/historicization/historicization_SepaMandate.xml deleted file mode 100644 index 7c15d4bf..00000000 --- a/src/main/resources/config/liquibase/historicization/historicization_SepaMandate.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CREATE TRIGGER sepa_mandate_historicize - AFTER INSERT OR DELETE OR UPDATE ON sepa_mandate - FOR EACH ROW EXECUTE PROCEDURE historicize(); - - - DROP TRIGGER sepa_mandate_historicize - - - - - - SELECT * - FROM sepa_mandate_history - WHERE history_id IN ( - SELECT max(history_id) AS history_id - FROM sepa_mandate_history - WHERE history_transaction <= current_setting('history.transaction')::bigint - GROUP BY reference) -- must have a unique constraint - - - - diff --git a/src/main/resources/config/liquibase/historicization/historicization_Share.xml b/src/main/resources/config/liquibase/historicization/historicization_Share.xml deleted file mode 100644 index 5f2219ff..00000000 --- a/src/main/resources/config/liquibase/historicization/historicization_Share.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CREATE TRIGGER share_historicize - AFTER INSERT OR DELETE OR UPDATE ON share - FOR EACH ROW EXECUTE PROCEDURE historicize(); - - - DROP TRIGGER share_historicize - - - - - - SELECT * - FROM share_history - WHERE history_id IN ( - SELECT max(history_id) AS history_id - FROM share_history - WHERE history_transaction <= current_setting('history.transaction')::bigint - GROUP BY id) -- shares are not deletable, thus id is enough - - - - - - diff --git a/src/main/resources/config/liquibase/historicization/historicization_User.xml b/src/main/resources/config/liquibase/historicization/historicization_User.xml deleted file mode 100644 index 7a8ffb63..00000000 --- a/src/main/resources/config/liquibase/historicization/historicization_User.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CREATE TRIGGER jhi_user_historicize - AFTER INSERT OR DELETE OR UPDATE ON jhi_user - FOR EACH ROW EXECUTE PROCEDURE historicize(); - - - DROP TRIGGER jhi_user_historicize - - - - - - SELECT * - FROM jhi_user_history - WHERE history_id IN ( - SELECT max(history_id) AS history_id - FROM jhi_user_history - WHERE history_transaction <= current_setting('history.transaction')::bigint - GROUP BY login) -- must have a unique constraint - - - - diff --git a/src/main/resources/config/liquibase/historicization/historicization_UserAuthority.xml b/src/main/resources/config/liquibase/historicization/historicization_UserAuthority.xml deleted file mode 100644 index fa896dc5..00000000 --- a/src/main/resources/config/liquibase/historicization/historicization_UserAuthority.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CREATE TRIGGER jhi_user_authority_historicize - AFTER INSERT OR DELETE OR UPDATE ON jhi_user_authority - FOR EACH ROW EXECUTE PROCEDURE historicize(); - - - DROP TRIGGER jhi_user_authority_historicize - - - - - - SELECT * - FROM jhi_user_authority_history - WHERE history_id IN ( - SELECT max(history_id) AS history_id - FROM jhi_user_authority_history - WHERE history_transaction <= current_setting('history.transaction')::bigint - GROUP BY user_id, authority_name) -- must have a unique constraint - - - - diff --git a/src/main/resources/config/liquibase/historicization/historicization_UserRoleAssignment.xml b/src/main/resources/config/liquibase/historicization/historicization_UserRoleAssignment.xml deleted file mode 100644 index 2f688580..00000000 --- a/src/main/resources/config/liquibase/historicization/historicization_UserRoleAssignment.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CREATE TRIGGER user_role_assignment_historicize - AFTER INSERT OR DELETE OR UPDATE ON user_role_assignment - FOR EACH ROW EXECUTE PROCEDURE historicize(); - - - DROP TRIGGER user_role_assignment_historicize - - - - - - SELECT * - FROM user_role_assignment_history - WHERE history_id IN ( - SELECT max(history_id) AS history_id - FROM user_role_assignment_history - WHERE history_transaction <= current_setting('history.transaction')::bigint - GROUP BY entity_type_id, entity_object_id, assigned_role, user_id) -- must have a unique constraint - - - - diff --git a/src/main/resources/config/liquibase/master.xml b/src/main/resources/config/liquibase/master.xml deleted file mode 100644 index 60f9a193..00000000 --- a/src/main/resources/config/liquibase/master.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/config/liquibase/sample-data/assets.csv b/src/main/resources/config/liquibase/sample-data/assets.csv deleted file mode 100644 index ac9d9efd..00000000 --- a/src/main/resources/config/liquibase/sample-data/assets.csv +++ /dev/null @@ -1,58 +0,0 @@ -id;membership_id;document_date;value_date;action;amount;remark -210001;1;2001-05-10;2001-05-11;PAYMENT;64;some|multiline|1. instalment|just to produce some more rows for tests :-) -210002;1;2001-05-10;2001-05-12;PAYMENT;64;some|multiline|2. instalment -210003;1;2001-05-10;2001-05-13;PAYMENT;64;some|multiline|3. instalment -210004;1;2001-05-10;2001-05-14;PAYMENT;64;some|multiline|4. instalment -210005;1;2001-05-10;2001-05-15;PAYMENT;64;some|multiline|5. instalment -210006;1;2001-05-10;2001-05-16;PAYMENT;64;some|multiline|6. instalment -210007;1;2001-05-10;2001-05-17;PAYMENT;64;some|multiline|7. instalment -210008;1;2001-05-10;2001-05-18;PAYMENT;64;some|multiline|8. instalment -210009;1;2001-05-10;2001-05-19;PAYMENT;64;some|multiline|9. instalment -210010;1;2001-05-10;2001-05-20;PAYMENT;64;some|multiline|10. instalment -210011;1;2001-05-10;2001-05-21;PAYMENT;64;some|multiline|11. instalment -210012;1;2001-05-10;2001-05-22;PAYMENT;64;some|multiline|12. instalment -210013;1;2001-05-10;2001-05-23;PAYMENT;64;some|multiline|13. instalment -210014;1;2001-05-10;2001-05-24;PAYMENT;64;some|multiline|14. instalment -210015;1;2001-05-10;2001-05-25;PAYMENT;64;some|multiline|15. instalment -210016;1;2001-05-10;2001-05-26;PAYMENT;64;some|multiline|16. instalment -210017;1;2007-09-09;2008-07-10;PAYBACK;512;1. instalment -210018;1;2007-09-09;2009-07-10;PAYBACK;512;2. instalment -210019;2;2017-02-15;2017-02-15;PAYMENT;512;became a member again -210020;2;2017-02-15;2017-02-15;PAYMENT;64;just writing something -210021;3;2003-06-11;2003-06-11;PAYMENT;256;some comment -210022;3;2003-06-15;2004-07-03;PAYBACK;256;cancelled membership -210023;4;2017-06-15;2017-05-17;PAYMENT;1024; -210024;5;2011-09-18;2011-09-01;PAYMENT;640; -210101;5;2013-01-15;2013-01-01;PAYMENT;64;signed more shares|1. installment -210102;5;2013-01-15;2013-01-02;PAYMENT;64;signed more shares|2. installment -210103;5;2013-01-15;2013-01-03;PAYMENT;64;signed more shares|3. installment -210104;5;2013-01-15;2013-01-04;PAYMENT;64;signed more shares|4. installment -210105;5;2013-01-15;2013-01-05;PAYMENT;64;signed more shares|5. installment -210106;5;2013-01-15;2013-01-06;PAYMENT;64;signed more shares|6. installment -210107;5;2013-01-15;2013-01-07;PAYMENT;64;signed more shares|7. installment -210108;5;2013-01-15;2013-01-08;PAYMENT;64;signed more shares|8. installment -210109;5;2013-01-15;2013-01-09;PAYMENT;64;signed more shares|9. installment -210110;5;2013-01-15;2013-01-10;PAYMENT;64;signed more shares|10. installment -210111;5;2013-01-15;2013-01-11;PAYMENT;64;signed more shares|11. installment -210112;5;2013-01-15;2013-01-12;PAYMENT;64;signed more shares|12. installment -210123;5;2013-01-15;2013-01-13;PAYMENT;64;signed more shares|13. installment -210124;5;2013-01-15;2013-01-14;PAYMENT;64;signed more shares|14. installment -210125;5;2013-01-15;2013-01-15;PAYMENT;64;signed more shares|15. installment -210126;5;2013-01-15;2013-01-16;PAYMENT;64;signed more shares|16. installment -210127;5;2013-01-15;2013-01-17;PAYMENT;64;signed more shares|17. installment -210128;5;2013-01-15;2013-01-18;PAYMENT;64;signed more shares|18. installment -210129;5;2013-01-15;2013-01-19;PAYMENT;64;signed more shares|19. installment -210130;5;2013-01-15;2013-01-20;PAYMENT;64;signed more shares|20. installment -210230;5;2017-12-22;2018-07-01;PAYBACK;160;cancelled most of their shares|1. installment|just to produce more rows for tests :-) -210231;5;2017-12-22;2018-07-02;PAYBACK;160;cancelled most of their shares|2. installment|just to produce more rows for tests :-) -210232;5;2017-12-22;2018-08-03;PAYBACK;160;cancelled most of their shares|3. installment|just to produce more rows for tests :-) -210233;5;2017-12-22;2018-09-04;PAYBACK;160;cancelled most of their shares|4. installment|just to produce more rows for tests :-) -210234;5;2017-12-22;2018-10-05;PAYBACK;160;cancelled most of their shares|5. installment|just to produce more rows for tests :-) -210235;5;2017-12-22;2018-11-06;PAYBACK;160;cancelled most of their shares|6. installment|just to produce more rows for tests :-) -210236;5;2017-12-22;2018-12-07;PAYBACK;160;cancelled most of their shares|7. installment|just to produce more rows for tests :-) -210237;5;2017-12-22;2019-01-08;PAYBACK;160;cancelled most of their shares|8. installment|just to produce more rows for tests :-) -210238;5;2017-12-22;2019-02-09;PAYBACK;160;cancelled most of their shares|9. installment|just to produce more rows for tests :-) -210239;5;2017-12-22;2019-03-10;PAYBACK;160;cancelled most of their shares|10. installment|just to produce more rows for tests :-) - - - diff --git a/src/main/resources/config/liquibase/sample-data/assets.xml b/src/main/resources/config/liquibase/sample-data/assets.xml deleted file mode 100644 index d880a765..00000000 --- a/src/main/resources/config/liquibase/sample-data/assets.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - DELETE FROM asset; - - - diff --git a/src/main/resources/config/liquibase/sample-data/customers.csv b/src/main/resources/config/liquibase/sample-data/customers.csv deleted file mode 100644 index 3db25e17..00000000 --- a/src/main/resources/config/liquibase/sample-data/customers.csv +++ /dev/null @@ -1,7 +0,0 @@ -id;reference;prefix;name;kind;vat_region;contractual_address -1;10001;aaa;AAA Corp.;LEGAL;DOMESTIC;Ballustrade 13|91334 Erlangen -2;10002;bbb;BBB GmbH;LEGAL;DOMESTIC;Irgendwo 0|11111 Berlin -3;10003;ccc;CCC AG;LEGAL;DOMESTIC;Haus 15|26539 Baltrum -4;10004;ddd;DDD eG;LEGAL;DOMESTIC;Industriestraße 98-102|n22999 Hamburg -5;10098;abc;ABC OHG;LEGAL;DOMESTIC;An der Weide 13|30123 Hannover -6;10099;bca;Bert Cäsar Adelbert;NATURAL;DOMESTIC;'Egerstraße 53|44225 Dortmund diff --git a/src/main/resources/config/liquibase/sample-data/customers.xml b/src/main/resources/config/liquibase/sample-data/customers.xml deleted file mode 100644 index 9ada85c7..00000000 --- a/src/main/resources/config/liquibase/sample-data/customers.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - DELETE FROM customer; - - - - diff --git a/src/main/resources/config/liquibase/sample-data/memberships.csv b/src/main/resources/config/liquibase/sample-data/memberships.csv deleted file mode 100644 index 14e43200..00000000 --- a/src/main/resources/config/liquibase/sample-data/memberships.csv +++ /dev/null @@ -1,7 +0,0 @@ -id;customer_id;admission_document_date;cancellation_document_date;member_from_date;member_until_date;remark -1;1;2001-04-10;2007-08-09;2001-04-11;2007-12-31;is now client of another member|see XYZ -2;1;2017-01-15;null;2017-01-15;null;nothing to say here -3;3;2003-05-11;2018-11-30;2003-05-15;2018-12-31;business discontinued -4;4;2017-05-15;null;2017-05-15;null;whatever|is|to|say -5;5;2011-08-18;null;2011-08-18;null;foo bar etc. - diff --git a/src/main/resources/config/liquibase/sample-data/memberships.xml b/src/main/resources/config/liquibase/sample-data/memberships.xml deleted file mode 100644 index 38bb4ca5..00000000 --- a/src/main/resources/config/liquibase/sample-data/memberships.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - DELETE FROM membership; - - - - diff --git a/src/main/resources/config/liquibase/sample-data/sepamandates.csv b/src/main/resources/config/liquibase/sample-data/sepamandates.csv deleted file mode 100644 index 2698cc95..00000000 --- a/src/main/resources/config/liquibase/sample-data/sepamandates.csv +++ /dev/null @@ -1,6 +0,0 @@ -id;customer_id;reference;iban;bic;granting_document_date;revokation_document_date;valid_from_date;valid_until_date;last_used_date;remark -1;1;DKXIDEHAC01;DE94500105172859877827;REF02039402;2018-01-15;null;2018-01-16;null;2019-04-09;a remark|over two lines -2;2;JKUIDEBIS00;DE56500105172321139153;REF2834823W;2017-06-03;2019-01-15;2017-06-04;2019-01-31;2019-01-10;for the old bank account -3;2;JUZTDEVER03;DE56500105172321139153;REF2834823W;2019-01-15;null;2019-02-01;null;2019-04-09;for the new bank account -4;3;CKIZDESiX98;DE24500105175933769123;REF23984928;2016-09-13;2018-11-20;2016-09-13;2018-12-31;2018-12-09;membership cancelled -5;5;ZUIJDEVOR12;DE92500105174781793571;REF23882384;2016-12-03;null;2016-12-03;null;2019-04-09;null diff --git a/src/main/resources/config/liquibase/sample-data/sepamandates.xml b/src/main/resources/config/liquibase/sample-data/sepamandates.xml deleted file mode 100644 index dee524a7..00000000 --- a/src/main/resources/config/liquibase/sample-data/sepamandates.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - DELETE FROM sepa_mandate; - - - - diff --git a/src/main/resources/config/liquibase/sample-data/shares.csv b/src/main/resources/config/liquibase/sample-data/shares.csv deleted file mode 100644 index b3cbe4e4..00000000 --- a/src/main/resources/config/liquibase/sample-data/shares.csv +++ /dev/null @@ -1,13 +0,0 @@ -id;membership_id;document_date;value_date;action;quantity;remark -1;1;2001-04-10;2001-04-11;SUBSCRIPTION;16;some|multiline|remark -2;1;2007-08-09;2007-12-31;CANCELLATION;16;another remark -3;2;2017-01-15;2017-01-17;SUBSCRIPTION;8;became a member again -4;2;2017-01-15;2017-01-17;SUBSCRIPTION;1;just writing something -5;3;2003-05-11;2003-05-18;SUBSCRIPTION;4;some comment -6;3;2003-05-15;2003-05-30;CANCELLATION;4;cancelled membership -7;4;2017-05-15;2017-05-17;SUBSCRIPTION;16; -8;5;2011-08-18;2011-09-01;SUBSCRIPTION;10; -9;5;2012-12-15;2013-01-01;SUBSCRIPTION;20;signed more shares -10;5;2017-11-22;2018-01-01;CANCELLATION;25;cancelled most of their shares - - diff --git a/src/main/resources/config/liquibase/sample-data/shares.xml b/src/main/resources/config/liquibase/sample-data/shares.xml deleted file mode 100644 index e19760b4..00000000 --- a/src/main/resources/config/liquibase/sample-data/shares.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - DELETE FROM share; - - - - diff --git a/src/main/resources/config/liquibase/sample-data/user_role_assignments.csv b/src/main/resources/config/liquibase/sample-data/user_role_assignments.csv deleted file mode 100644 index c601ed14..00000000 --- a/src/main/resources/config/liquibase/sample-data/user_role_assignments.csv +++ /dev/null @@ -1,17 +0,0 @@ -id;user_id;entity_type_id;entity_object_id;assigned_role -1001;111;customer.Customer;1;CONTRACTUAL_CONTACT -1002;112;customer.Customer;2;CONTRACTUAL_CONTACT -1003;113;customer.Customer;3;CONTRACTUAL_CONTACT -1004;114;customer.Customer;4;CONTRACTUAL_CONTACT -1005;115;customer.Customer;5;CONTRACTUAL_CONTACT -1006;116;customer.Customer;6;CONTRACTUAL_CONTACT -1007;120;customer.Customer;1;FINANCIAL_CONTACT -1008;121;customer.Customer;1;TECHNICAL_CONTACT -1009;122;customer.Customer;2;FINANCIAL_CONTACT -1010;123;customer.Customer;2;TECHNICAL_CONTACT -1011;124;customer.Customer;3;FINANCIAL_CONTACT -1012;125;customer.Customer;3;TECHNICAL_CONTACT -1013;126;customer.Customer;4;FINANCIAL_CONTACT -1014;127;customer.Customer;4;TECHNICAL_CONTACT -1015;128;customer.Customer;5;FINANCIAL_CONTACT -1016;129;customer.Customer;5;TECHNICAL_CONTACT diff --git a/src/main/resources/config/liquibase/sample-data/user_role_assignments.xml b/src/main/resources/config/liquibase/sample-data/user_role_assignments.xml deleted file mode 100644 index 79b9d1e0..00000000 --- a/src/main/resources/config/liquibase/sample-data/user_role_assignments.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - DELETE FROM user_role_assignment WHERE id >=100 AND id < 1000000; - - - diff --git a/src/main/resources/config/liquibase/sample-data/users.csv b/src/main/resources/config/liquibase/sample-data/users.csv deleted file mode 100644 index 7fc49fe9..00000000 --- a/src/main/resources/config/liquibase/sample-data/users.csv +++ /dev/null @@ -1,24 +0,0 @@ -id;login;password_hash;first_name;last_name;email;image_url;activated;lang_key;created_by;last_modified_by -101;test-supporter-a;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;A;Test Supporter;ts-a@example.com;;true;de;system;system -102;test-supporter-b;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;B;Test Supporter;ts-b@example.com;;true;de;system;system -103;test-supporter-c;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;C;Test Supporter;ts-c@example.com;;true;de;system;system -104;test-admin-a;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;A;Test Admin;ta-a@example.com;;true;de;system;system -105;test-admin-b;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;B;Test Admin;ta-b@example.com;;true;de;system;system -106;test-hostmaster-a;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;A;Test Hostmaster;th-a@example.com;;true;de;system;system -107;test-hostmaster-b;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;B;Test Hostmaster;th-b@example.com;;true;de;system;system -111;aaa-test;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Anton;AAA Testuser;aaa@example.com;;true;de;system;system -112;bbb-test;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Berta;BBB Testuser;bbb@example.com;;true;de;system;system -113;ccc-test;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Cecilie;CCC Testuser;ccc@example.com;;true;de;system;system -114;ddd-test;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Dieter;DDD Testuser;ddd@example.com;;true;de;system;system -115;abc-test;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Alva;ABC Testuser;abc@example.com;;true;de;system;system -116;bca-test;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Bert Cäsar;Adelbert;bca@example.com;;true;de;system;system -120;test00;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Test-User 00;Test-User;test-user00@localhost;;true;de;system;system -121;test01;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Test-User 01;Test-User;test-user01@localhost;;true;de;system;system -122;test02;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Test-User 02;Test-User;test-user02@localhost;;true;de;system;system -123;test03;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Test-User 03;Test-User;test-user03@localhost;;true;de;system;system -124;test04;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Test-User 04;Test-User;test-user04@localhost;;true;de;system;system -125;test05;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Test-User 05;Test-User;test-user05@localhost;;true;de;system;system -126;test06;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Test-User 06;Test-User;test-user06@localhost;;true;de;system;system -127;test07;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Test-User 07;Test-User;test-user07@localhost;;true;de;system;system -128;test08;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Test-User 08;Test-User;test-user08@localhost;;true;de;system;system -129;test09;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;Test-User 09;Test-User;test-user09@localhost;;true;de;system;system diff --git a/src/main/resources/config/liquibase/sample-data/users.xml b/src/main/resources/config/liquibase/sample-data/users.xml deleted file mode 100644 index f0e88f95..00000000 --- a/src/main/resources/config/liquibase/sample-data/users.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - DELETE FROM user WHERE id >=100 AND id < 1000000; - - - diff --git a/src/main/resources/config/liquibase/sample-data/users_authorities.csv b/src/main/resources/config/liquibase/sample-data/users_authorities.csv deleted file mode 100644 index 9ff0cc57..00000000 --- a/src/main/resources/config/liquibase/sample-data/users_authorities.csv +++ /dev/null @@ -1,33 +0,0 @@ -user_id;authority_name -101;ROLE_SUPPORTER -101;ROLE_USER -102;ROLE_SUPPORTER -102;ROLE_USER -103;ROLE_SUPPORTER -103;ROLE_USER -104;ROLE_ADMIN -104;ROLE_USER -105;ROLE_ADMIN -105;ROLE_USER -106;ROLE_HOSTMASTER -106;ROLE_ADMIN -106;ROLE_USER -107;ROLE_HOSTMASTER -107;ROLE_ADMIN -107;ROLE_USER -111;ROLE_USER -112;ROLE_USER -113;ROLE_USER -114;ROLE_USER -115;ROLE_USER -116;ROLE_USER -120;ROLE_USER -121;ROLE_USER -122;ROLE_USER -123;ROLE_USER -124;ROLE_USER -125;ROLE_USER -126;ROLE_USER -127;ROLE_USER -128;ROLE_USER -129;ROLE_USER diff --git a/src/main/resources/config/liquibase/sample-data/users_authorities.xml b/src/main/resources/config/liquibase/sample-data/users_authorities.xml deleted file mode 100644 index 11ac1f25..00000000 --- a/src/main/resources/config/liquibase/sample-data/users_authorities.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - DELETE FROM JHI_USER_AUTHORITY WHERE id >=100 AND id < 1000000; - - - diff --git a/src/main/resources/config/liquibase/users.csv b/src/main/resources/config/liquibase/users.csv deleted file mode 100644 index 55309a74..00000000 --- a/src/main/resources/config/liquibase/users.csv +++ /dev/null @@ -1,5 +0,0 @@ -id;login;password_hash;first_name;last_name;email;image_url;activated;lang_key;created_by;last_modified_by -1;system;$2a$10$mE.qmcV0mFU5NcKh73TZx.z4ueI/.bDWbj0T1BYyqP481kGGarKLG;System;System;system@localhost;;true;de;system;system -2;anonymoususer;$2a$10$j8S5d7Sr7.8VTOYNviDPOeWX8KcYILUVJBsYV83Y5NtECayypx9lO;Anonymous;User;anonymous@localhost;;true;de;system;system -3;admin;$2a$10$gSAhZrxMllrbgj/kkK9UceBPpChGWJA7SYIb1Mqo.n5aNLq1/oRrC;Administrator;Administrator;admin@localhost;;true;de;system;system -4;user;$2a$10$VEjxo0jq2YG9Rbk2HmX9S.k1uZBGYUHdUcid3g/vfiEl7lwWgOH/K;User;User;user@localhost;;true;de;system;system diff --git a/src/main/resources/config/liquibase/users_authorities.csv b/src/main/resources/config/liquibase/users_authorities.csv deleted file mode 100644 index bb482bfa..00000000 --- a/src/main/resources/config/liquibase/users_authorities.csv +++ /dev/null @@ -1,7 +0,0 @@ -user_id;authority_name -1;ROLE_HOSTMASTER -1;ROLE_ADMIN -1;ROLE_USER -3;ROLE_ADMIN -3;ROLE_USER -4;ROLE_USER diff --git a/src/main/resources/config/tls/keystore.p12 b/src/main/resources/config/tls/keystore.p12 deleted file mode 100644 index afd38f56..00000000 Binary files a/src/main/resources/config/tls/keystore.p12 and /dev/null differ diff --git a/src/main/resources/db/changelog/2022-07-28-000-template.sql b/src/main/resources/db/changelog/2022-07-28-000-template.sql new file mode 100644 index 00000000..1dc12f42 --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-28-000-template.sql @@ -0,0 +1,12 @@ +--liquibase formatted sql + + +-- ============================================================================ +--changeset prefix-TEMPLATE:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +/* + + */ + +--// diff --git a/src/main/resources/db/changelog/2022-07-28-001-last-row-count.sql b/src/main/resources/db/changelog/2022-07-28-001-last-row-count.sql new file mode 100644 index 00000000..c1f3fe05 --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-28-001-last-row-count.sql @@ -0,0 +1,20 @@ +--liquibase formatted sql + +-- ============================================================================ +-- LAST-ROW-COUNT +--changeset last-row-count:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + Returns the row count from the result of the previous query. + Other than the native statement it's usable in an expression. + */ +create or replace function lastRowCount() + returns bigint + language plpgsql as $$ +declare + lastRowCount bigint; +begin + get diagnostics lastrowCount = row_count; + return lastRowCount; +end; $$; +--// diff --git a/src/main/resources/db/changelog/2022-07-28-002-int-to-var.sql b/src/main/resources/db/changelog/2022-07-28-002-int-to-var.sql new file mode 100644 index 00000000..eb3212e3 --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-28-002-int-to-var.sql @@ -0,0 +1,27 @@ +--liquibase formatted sql + +-- ============================================================================ +-- INT-TO-VAR +--changeset int-to-var:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + Returns a textual representation of an integer number to be used as generated test data. + + Examples : + intToVarChar(0, 3) => 'aaa' + intToVarChar(1, 3) => 'aab' + */ +create or replace function intToVarChar(i integer, len integer) + returns varchar + language plpgsql as $$ +declare + partial varchar; +begin + select chr(ascii('a') + i % 26) into partial; + if len > 1 then + return intToVarChar(i / 26, len - 1) || partial; + else + return partial; + end if; +end; $$; +--// diff --git a/src/main/resources/db/changelog/2022-07-28-003-random-in-range.sql b/src/main/resources/db/changelog/2022-07-28-003-random-in-range.sql new file mode 100644 index 00000000..8ed0112d --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-28-003-random-in-range.sql @@ -0,0 +1,26 @@ +--liquibase formatted sql + + +-- ============================================================================ +-- RANDOM-IN-RANGE +--changeset random-in-range:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + Returns a random integer in the given range (both included), + to be used for test data generation. + + Example: + randomInRange(0, 4) might return any of 0, 1, 2, 3, 4 + */ +create or replace function randomInRange(min integer, max integer) + returns integer + returns null on null input + language 'plpgsql' as $$ +begin + return floor(random() * (max - min + 1) + min); +end; $$; +--// + + + + diff --git a/src/main/resources/db/changelog/2022-07-28-004-uuid-ossp-extension.sql b/src/main/resources/db/changelog/2022-07-28-004-uuid-ossp-extension.sql new file mode 100644 index 00000000..f156af69 --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-28-004-uuid-ossp-extension.sql @@ -0,0 +1,12 @@ +--liquibase formatted sql + + +-- ============================================================================ +-- UUID-OSSP-EXTENSION +--changeset uuid-ossp-extension:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + Makes improved uuid generation available. + */ +create extension if not exists "uuid-ossp"; +--// diff --git a/src/main/resources/db/changelog/2022-07-28-005-rbac-base.sql b/src/main/resources/db/changelog/2022-07-28-005-rbac-base.sql new file mode 100644 index 00000000..6b5819fd --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-28-005-rbac-base.sql @@ -0,0 +1,770 @@ +--liquibase formatted sql + +-- ============================================================================ +--changeset rbac-base-REFERENCE:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + + */ +create type ReferenceType as enum ('RbacUser', 'RbacRole', 'RbacPermission'); + +create table RbacReference +( + uuid uuid unique default uuid_generate_v4(), + type ReferenceType not null +); + +create or replace function assertReferenceType(argument varchar, referenceId uuid, expectedType ReferenceType) + returns ReferenceType + language plpgsql as $$ +declare + actualType ReferenceType; +begin + actualType = (select type from RbacReference where uuid = referenceId); + if (actualType <> expectedType) then + raise exception '% must reference a %, but got a %', argument, expectedType, actualType; + end if; + return expectedType; +end; $$; + +--// + +-- ============================================================================ +--changeset rbac-base-USER:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + + */ +create table RbacUser +( + uuid uuid primary key references RbacReference (uuid) on delete cascade, + name varchar(63) not null unique +); + +create or replace function createRbacUser(userName varchar) + returns uuid + returns null on null input + language plpgsql as $$ +declare + objectId uuid; +begin + insert + into RbacReference (type) + values ('RbacUser') + returning uuid into objectId; + insert + into RbacUser (uuid, name) + values (objectid, userName); + return objectId; +end; +$$; + +create or replace function findRbacUserId(userName varchar) + returns uuid + returns null on null input + language sql as $$ +select uuid from RbacUser where name = userName +$$; + +create type RbacWhenNotExists as enum ('fail', 'create'); + +create or replace function getRbacUserId(userName varchar, whenNotExists RbacWhenNotExists) + returns uuid + returns null on null input + language plpgsql as $$ +declare + userUuid uuid; +begin + userUuid = findRbacUserId(userName); + if (userUuid is null) then + if (whenNotExists = 'fail') then + raise exception 'RbacUser with name="%" not found', userName; + end if; + if (whenNotExists = 'create') then + userUuid = createRbacUser(userName); + end if; + end if; + return userUuid; +end; +$$; + +--// + +-- ============================================================================ +--changeset rbac-base-OBJECT:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + + */ +create table RbacObject +( + uuid uuid primary key default uuid_generate_v4(), + objectTable varchar(64) not null, + unique (objectTable, uuid) +); + +create or replace function createRbacObject() + returns trigger + language plpgsql + strict as $$ +declare + objectUuid uuid; +begin + if TG_OP = 'INSERT' then + if NEW.uuid is null then + insert + into RbacObject (objectTable) + values (TG_TABLE_NAME) + returning uuid into objectUuid; + NEW.uuid = objectUuid; + else + insert + into RbacObject (uuid, objectTable) + values (NEW.uuid, TG_TABLE_NAME) + returning uuid into objectUuid; + end if; + return NEW; + else + raise exception 'invalid usage of TRIGGER AFTER INSERT'; + end if; +end; $$; + + +--// + +-- ============================================================================ +--changeset rbac-base-ROLE:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + + */ + +create type RbacRoleType as enum ('owner', 'admin', 'tenant'); + +create table RbacRole +( + uuid uuid primary key references RbacReference (uuid) on delete cascade, + objectUuid uuid references RbacObject (uuid) not null, + roleType RbacRoleType not null, + unique (objectUuid, roleType) +); + +create type RbacRoleDescriptor as +( + objectTable varchar(63), -- TODO: needed? remove? + objectUuid uuid, + roleType RbacRoleType +); + +create or replace function roleDescriptor(objectTable varchar(63), objectUuid uuid, roleType RbacRoleType) + returns RbacRoleDescriptor + returns null on null input + stable leakproof + language sql as $$ +select objectTable, objectUuid, roleType::RbacRoleType; +$$; + +create or replace function createRole(roleDescriptor RbacRoleDescriptor) + returns uuid + returns null on null input + language plpgsql as $$ +declare + referenceId uuid; +begin + insert + into RbacReference (type) + values ('RbacRole') + returning uuid into referenceId; + insert + into RbacRole (uuid, objectUuid, roleType) + values (referenceId, roleDescriptor.objectUuid, roleDescriptor.roleType); + return referenceId; +end; +$$; + + +create or replace procedure deleteRole(roleUUid uuid) + language plpgsql as $$ +begin + delete from RbacRole where uuid = roleUUid; +end; +$$; + +create or replace function findRoleId(roleDescriptor RbacRoleDescriptor) + returns uuid + returns null on null input + language sql as $$ +select uuid from RbacRole where objectUuid = roleDescriptor.objectUuid and roleType = roleDescriptor.roleType; +$$; + +create or replace function getRoleId(roleDescriptor RbacRoleDescriptor, whenNotExists RbacWhenNotExists) + returns uuid + returns null on null input + language plpgsql as $$ +declare + roleUuid uuid; +begin + roleUuid = findRoleId(roleDescriptor); + if (roleUuid is null) then + if (whenNotExists = 'fail') then + raise exception 'RbacRole "%#%.%" not found', roleDescriptor.objectTable, roleDescriptor.objectUuid, roleDescriptor.roleType; + end if; + if (whenNotExists = 'create') then + roleUuid = createRole(roleDescriptor); + end if; + end if; + return roleUuid; +end; +$$; + +-- ============================================================================ +--changeset rbac-base-PERMISSION:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + + */ +create domain RbacOp as varchar(67) + check ( + VALUE = '*' + or VALUE = 'delete' + or VALUE = 'edit' + or VALUE = 'view' + or VALUE = 'assume' + or VALUE ~ '^add-[a-z]+$' + ); + +create table RbacPermission +( + uuid uuid primary key references RbacReference (uuid) on delete cascade, + objectUuid uuid not null references RbacObject, + op RbacOp not null, + unique (objectUuid, op) +); + +create or replace function permissionExists(forObjectUuid uuid, forOp RbacOp) + returns bool + language sql as $$ +select exists( + select op + from RbacPermission p + where p.objectUuid = forObjectUuid + and p.op in ('*', forOp) + ); +$$; + +create or replace function createPermissions(forObjectUuid uuid, permitOps RbacOp[]) + returns uuid[] + language plpgsql as $$ +declare + refId uuid; + permissionIds uuid[] = array []::uuid[]; +begin + raise notice 'createPermission for: % %', forObjectUuid, permitOps; + if (forObjectUuid is null) then + raise exception 'forObjectUuid must not be null'; + end if; + if (array_length(permitOps, 1) > 1 and '*' = any (permitOps)) then + raise exception '"*" operation must not be assigned along with other operations: %', permitOps; + end if; + + for i in array_lower(permitOps, 1)..array_upper(permitOps, 1) + loop + refId = (select uuid from RbacPermission where objectUuid = forObjectUuid and op = permitOps[i]); + if (refId is null) then + raise notice 'createPermission: % %', forObjectUuid, permitOps[i]; + insert + into RbacReference ("type") + values ('RbacPermission') + returning uuid into refId; + insert + into RbacPermission (uuid, objectUuid, op) + values (refId, forObjectUuid, permitOps[i]); + end if; + raise notice 'addPermission: %', refId; + permissionIds = permissionIds || refId; + end loop; + + raise notice 'createPermissions returning: %', permissionIds; + return permissionIds; +end; +$$; + +create or replace function findPermissionId(forObjectUuid uuid, forOp RbacOp) + returns uuid + returns null on null input + stable leakproof + language sql as $$ +select uuid + from RbacPermission p + where p.objectUuid = forObjectUuid + and p.op in ('*', forOp) +$$; + +--// + +-- ============================================================================ +--changeset rbac-base-GRANTS:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + + */ +create table RbacGrants +( + ascendantUuid uuid references RbacReference (uuid) on delete cascade, + descendantUuid uuid references RbacReference (uuid) on delete cascade, + follow boolean not null default true, + primary key (ascendantUuid, descendantUuid) +); +create index on RbacGrants (ascendantUuid); +create index on RbacGrants (descendantUuid); + + +create or replace function findGrantees(grantedId uuid) + returns setof RbacReference + returns null on null input + language sql as $$ +select reference.* + from (with recursive grants as (select descendantUuid, + ascendantUuid + from RbacGrants + where descendantUuid = grantedId + union all + select "grant".descendantUuid, + "grant".ascendantUuid + from RbacGrants "grant" + inner join grants recur on recur.ascendantUuid = "grant".descendantUuid) + select ascendantUuid + from grants) as grantee + join RbacReference reference on reference.uuid = grantee.ascendantUuid; +$$; + +create or replace function isGranted(granteeId uuid, grantedId uuid) + returns bool + returns null on null input + language sql as $$ +select granteeId = grantedId or granteeId in (with recursive grants as (select descendantUuid, ascendantUuid + from RbacGrants + where descendantUuid = grantedId + union all + select "grant".descendantUuid, "grant".ascendantUuid + from RbacGrants "grant" + inner join grants recur on recur.ascendantUuid = "grant".descendantUuid) + select ascendantUuid + from grants); +$$; + +create or replace function isGranted(granteeIds uuid[], grantedId uuid) + returns bool + returns null on null input + language plpgsql as $$ +declare + granteeId uuid; +begin + -- TODO: needs optimization + foreach granteeId in array granteeIds loop + if isGranted(granteeId, grantedId) then + return true; + end if; + end loop; + return false; +end; $$; + +create or replace function isPermissionGrantedToSubject(permissionId uuid, subjectId uuid) + returns BOOL + stable leakproof + language sql as $$ +select exists( + select * + from RbacUser + where uuid in (with recursive grants as (select descendantUuid, + ascendantUuid + from RbacGrants g + where g.descendantUuid = permissionId + union all + select g.descendantUuid, + g.ascendantUuid + from RbacGrants g + inner join grants recur on recur.ascendantUuid = g.descendantUuid) + select ascendantUuid + from grants + where ascendantUuid = subjectId) + ); +$$; + +create or replace procedure grantPermissionsToRole(roleUuid uuid, permissionIds uuid[]) + language plpgsql as $$ +begin + raise notice 'grantPermissionsToRole: % -> %', roleUuid, permissionIds; + if cardinality(permissionIds) = 0 then return; end if; + + for i in array_lower(permissionIds, 1)..array_upper(permissionIds, 1) + loop + perform assertReferenceType('roleId (ascendant)', roleUuid, 'RbacRole'); + perform assertReferenceType('permissionId (descendant)', permissionIds[i], 'RbacPermission'); + + insert + into RbacGrants (ascendantUuid, descendantUuid, follow) + values (roleUuid, permissionIds[i], true) + on conflict do nothing; -- allow granting multiple times + end loop; +end; +$$; + +create or replace procedure grantRoleToRole(subRoleId uuid, superRoleId uuid, doFollow bool = true) + language plpgsql as $$ +begin + perform assertReferenceType('superRoleId (ascendant)', superRoleId, 'RbacRole'); + perform assertReferenceType('subRoleId (descendant)', subRoleId, 'RbacRole'); + + if (isGranted(subRoleId, superRoleId)) then + raise exception 'Cyclic role grant detected between % and %', subRoleId, superRoleId; + end if; + + insert + into RbacGrants (ascendantUuid, descendantUuid, follow) + values (superRoleId, subRoleId, doFollow) + on conflict do nothing; -- allow granting multiple times +end; $$; + +create or replace procedure revokeRoleFromRole(subRoleId uuid, superRoleId uuid) + language plpgsql as $$ +begin + perform assertReferenceType('superRoleId (ascendant)', superRoleId, 'RbacRole'); + perform assertReferenceType('subRoleId (descendant)', subRoleId, 'RbacRole'); + + if (isGranted(subRoleId, superRoleId)) then + delete from RbacGrants where ascendantUuid = superRoleId and descendantUuid = subRoleId; + end if; +end; $$; + +create or replace procedure grantRoleToUser(roleId uuid, userId uuid) + language plpgsql as $$ +begin + perform assertReferenceType('roleId (ascendant)', roleId, 'RbacRole'); + perform assertReferenceType('userId (descendant)', userId, 'RbacUser'); + + insert + into RbacGrants (ascendantUuid, descendantUuid, follow) + values (userId, roleId, true) + on conflict do nothing; -- allow granting multiple times +end; $$; +--// + +-- ============================================================================ +--changeset rbac-base-QUERY-ACCESSIBLE-OBJECT-UUIDS:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + + */ +create or replace function queryAccessibleObjectUuidsOfSubjectIds( + requiredOp RbacOp, + forObjectTable varchar, -- reduces the result set, but is not really faster when used in restricted view + subjectIds uuid[], + maxObjects integer = 8000) + returns setof uuid + returns null on null input + language plpgsql as $$ +declare + foundRows bigint; +begin + return query select distinct perm.objectUuid + from (with recursive grants as (select descendantUuid, ascendantUuid, 1 as level + from RbacGrants + where follow + and ascendantUuid = any (subjectIds) + union + distinct + select "grant".descendantUuid, "grant".ascendantUuid, level + 1 as level + from RbacGrants "grant" + inner join grants recur on recur.descendantUuid = "grant".ascendantUuid + where follow) + select descendantUuid + from grants) as granted + join RbacPermission perm + on granted.descendantUuid = perm.uuid and perm.op in ('*', requiredOp) + join RbacObject obj on obj.uuid = perm.objectUuid and obj.objectTable = forObjectTable + limit maxObjects + 1; + + foundRows = lastRowCount(); + if foundRows > maxObjects then + raise exception 'Too many accessible objects, limit is %, found %.', maxObjects, foundRows + using + errcode = 'P0003', + hint = 'Please assume a sub-role and try again.'; + end if; +end; +$$; + +--// + +-- ============================================================================ +--changeset rbac-base-QUERY-GRANTED-PERMISSIONS:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + + */ +create or replace function queryGrantedPermissionsOfSubjectIds(requiredOp RbacOp, subjectIds uuid[]) + returns setof RbacPermission + strict + language sql as $$ +select distinct * + from RbacPermission + where op = '*' + or op = requiredOp + and uuid in (with recursive grants as (select distinct descendantUuid, + ascendantUuid + from RbacGrants + where ascendantUuid = any (subjectIds) + union all + select "grant".descendantUuid, + "grant".ascendantUuid + from RbacGrants "grant" + inner join grants recur on recur.descendantUuid = "grant".ascendantUuid) + select descendantUuid + from grants); +$$; + +--// + +-- ============================================================================ +--changeset rbac-base-QUERY-USERS-WITH-PERMISSION-FOR-OBJECT:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + + */ + +create or replace function queryAllRbacUsersWithPermissionsFor(objectId uuid) + returns setof RbacUser + returns null on null input + language sql as $$ +select * + from RbacUser + where uuid in (with recursive grants as (select descendantUuid, + ascendantUuid + from RbacGrants + where descendantUuid = objectId + union all + select "grant".descendantUuid, + "grant".ascendantUuid + from RbacGrants "grant" + inner join grants recur on recur.ascendantUuid = "grant".descendantUuid) + select ascendantUuid + from grants); +$$; + +--// + +-- ============================================================================ +--changeset rbac-CURRENT-USER:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + + */ +create or replace function currentUser() + returns varchar(63) + stable leakproof + language plpgsql as $$ +declare + currentUser varchar(63); +begin + begin + currentUser := current_setting('hsadminng.currentUser'); + exception + when others then + currentUser := null; + end; + if (currentUser is null or currentUser = '') then + raise exception 'hsadminng.currentUser must be defined, please use "SET LOCAL ...;"'; + end if; + return currentUser; +end; $$; + +create or replace function currentUserId() + returns uuid + stable leakproof + language plpgsql as $$ +declare + currentUser varchar(63); + currentUserId uuid; +begin + currentUser := currentUser(); + currentUserId = (select uuid from RbacUser where name = currentUser); + if currentUserId is null then + raise exception 'hsadminng.currentUser defined as %, but does not exists', currentUser; + end if; + return currentUserId; +end; $$; +--// + +-- ============================================================================ +--changeset rbac-ASSUMED-ROLES:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + + */ +create or replace function assumedRoles() + returns varchar(63)[] + stable leakproof + language plpgsql as $$ +declare + currentSubject varchar(63); +begin + begin + currentSubject := current_setting('hsadminng.assumedRoles'); + exception + when others then + return array []::varchar[]; + end; + if (currentSubject = '') then + return array []::varchar[]; + end if; + return string_to_array(currentSubject, ';'); +end; $$; + +create or replace function pureIdentifier(rawIdentifier varchar) + returns varchar + returns null on null input + language plpgsql as $$ +begin + return regexp_replace(rawIdentifier, '\W+', ''); +end; $$; + +-- TODO: rename to findObjectUuidByIdName +create or replace function findUuidByIdName(objectTable varchar, objectIdName varchar) + returns uuid + returns null on null input + language plpgsql as $$ +declare + sql varchar; + uuid uuid; +begin + objectTable := pureIdentifier(objectTable); + objectIdName := pureIdentifier(objectIdName); + sql := format('select * from %sUuidByIdName(%L);', objectTable, objectIdName); + begin + raise notice 'sql: %', sql; + execute sql into uuid; + exception + when others then + raise exception 'function %UuidByIdName(...) not found, add identity view support for table %', objectTable, objectTable; + end; + return uuid; +end ; $$; + +create or replace function findIdNameByObjectUuid(objectTable varchar, objectUuid uuid) + returns varchar + returns null on null input + language plpgsql as $$ +declare + sql varchar; + idName varchar; +begin + objectTable := pureIdentifier(objectTable); + sql := format('select * from %sIdNameByUuid(%L::uuid);', objectTable, objectUuid); + begin + raise notice 'sql: %', sql; + execute sql into idName; + exception + when others then + raise exception 'function %IdNameByUuid(...) not found, add identity view support for table %', objectTable, objectTable; + end; + return idName; +end ; $$; + +create or replace function currentSubjects() + returns varchar(63)[] + stable leakproof + language plpgsql as $$ +declare + assumedRoles varchar(63)[]; +begin + assumedRoles := assumedRoles(); + if array_length(assumedRoles(), 1) > 0 then + return assumedRoles(); + else + return array [currentUser()]::varchar(63)[]; + end if; +end; $$; + +create or replace function currentSubjectIds() + returns uuid[] + stable leakproof + language plpgsql as $$ +declare + currentUserId uuid; + roleNames varchar(63)[]; + roleName varchar(63); + objectTableToAssume varchar(63); + objectNameToAssume varchar(63); + objectUuidToAssume uuid; + roleTypeToAssume RbacRoleType; + roleIdsToAssume uuid[]; + roleUuidToAssume uuid; +begin + currentUserId := currentUserId(); + if currentUserId is null then + raise exception 'user % does not exist', currentUser(); + end if; + + roleNames := assumedRoles(); + if cardinality(roleNames) = 0 then + return array [currentUserId]; + end if; + + raise notice 'assuming roles: %', roleNames; + + foreach roleName in array roleNames + loop + roleName = overlay(roleName placing '#' from length(roleName) + 1 - strpos(reverse(roleName), '.')); + objectTableToAssume = split_part(roleName, '#', 1); + objectNameToAssume = split_part(roleName, '#', 2); + roleTypeToAssume = split_part(roleName, '#', 3); + + objectUuidToAssume = findUuidByIdName(objectTableToAssume, objectNameToAssume); + + -- TODO: either the result needs to be cached at least per transaction or we need to get rid of SELCT in a loop + select uuid as roleuuidToAssume + from RbacRole r + where r.objectUuid = objectUuidToAssume + and r.roleType = roleTypeToAssume + into roleUuidToAssume; + if (not isGranted(currentUserId, roleUuidToAssume)) then + raise exception 'user % (%) has no permission to assume role % (%)', currentUser(), currentUserId, roleName, roleUuidToAssume; + end if; + roleIdsToAssume := roleIdsToAssume || roleUuidToAssume; + end loop; + + return roleIdsToAssume; +end; $$; +--// + + +-- ============================================================================ +--changeset rbac-base-PGSQL-ROLES:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +create role admin; +grant all privileges on all tables in schema public to admin; + +create role restricted; +grant all privileges on all tables in schema public to restricted; + +--// + + +-- ============================================================================ +--changeset rbac-base-ROLE-RESTRICTED-VIEW:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + Creates a view to the role table with row-level limitation + based on the grants of the current user or assumed roles. + */ +drop view if exists rbacrole_rv; +create or replace view rbacrole_rv as +select DISTINCT r.*, o.objectTable, + findIdNameByObjectUuid(o.objectTable, o.uuid) as objectIdName + from rbacrole as r + join rbacobject as o on o.uuid=r.objectuuid + where isGranted(currentSubjectIds(), r.uuid); +grant all privileges on rbacrole_rv to restricted; +--// diff --git a/src/main/resources/db/changelog/2022-07-28-020-rbac-role-builder.sql b/src/main/resources/db/changelog/2022-07-28-020-rbac-role-builder.sql new file mode 100644 index 00000000..255b6ccb --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-28-020-rbac-role-builder.sql @@ -0,0 +1,235 @@ +--liquibase formatted sql + +-- ============================================================================ +-- PERMISSIONS +--changeset rbac-role-builder-permissions:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + + */ + +create type RbacPermissions as +( + permissionUuids uuid[] +); + +create or replace function grantingPermissions(forObjectUuid uuid, permitOps RbacOp[]) + returns RbacPermissions + language plpgsql + strict as $$ +begin + return row (createPermissions(forObjectUuid, permitOps))::RbacPermissions; +end; $$; + +create or replace function withoutPermissions() + returns RbacPermissions + language plpgsql + strict as $$ +begin + return row (array[]::uuid[]); +end; $$; + +--// + +--changeset rbac-role-builder-super-roles:1 endDelimiter:--// + +/* + + */ +create type RbacSuperRoles as +( + roleUuids uuid[] +); + +create or replace function beneathRoles(roleDescriptors RbacRoleDescriptor[]) + returns RbacSuperRoles + language plpgsql + strict as $$ +declare + superRoleDescriptor RbacRoleDescriptor; + superRoleUuids uuid[] := array []::uuid[]; +begin + foreach superRoleDescriptor in array roleDescriptors + loop + superRoleUuids := superRoleUuids || getRoleId(superRoleDescriptor, 'fail'); + end loop; + + return row (superRoleUuids)::RbacSuperRoles; +end; $$; + +create or replace function beneathRole(roleDescriptor RbacRoleDescriptor) + returns RbacSuperRoles + language plpgsql + strict as $$ +begin + return beneathRoles(array [roleDescriptor]); +end; $$; + +create or replace function beneathRole(roleUuid uuid) + returns RbacSuperRoles + language plpgsql + strict as $$ +begin + return row (array [roleUuid]::uuid[])::RbacSuperRoles; +end; $$; + +create or replace function asTopLevelRole() + returns RbacSuperRoles + language plpgsql + strict as $$ +begin + return row (array []::uuid[])::RbacSuperRoles; +end; $$; + +--// + +-- ================================================================= +-- SUB ROLES +--changeset rbac-role-builder-sub-roles:1 endDelimiter:--// +-- ----------------------------------------------------------------- + +/* + + */ +create type RbacSubRoles as +( + roleUuids uuid[] +); + +-- drop FUNCTION beingItselfA(roleUuid uuid) +create or replace function beingItselfA(roleUuid uuid) + returns RbacSubRoles + language plpgsql + strict as $$ +begin + return row (array [roleUuid]::uuid[])::RbacSubRoles; +end; $$; + +-- drop FUNCTION beingItselfA(roleDescriptor RbacRoleDescriptor) +create or replace function beingItselfA(roleDescriptor RbacRoleDescriptor) + returns RbacSubRoles + language plpgsql + strict as $$ +begin + return beingItselfA(getRoleId(roleDescriptor, 'fail')); +end; $$; + +--// + +-- ================================================================= +-- USERS +--changeset rbac-role-builder-users:1 endDelimiter:--// +-- ----------------------------------------------------------------- + +/* +*/ +create type RbacUsers as +( + userUuids uuid[] +); + +create or replace function withUsers(userNames varchar[]) + returns RbacUsers + language plpgsql + strict as $$ +declare + userName varchar; + userUuids uuid[] := array []::uuid[]; +begin + foreach userName in array userNames + loop + userUuids := userUuids || getRbacUserId(userName, 'fail'); + end loop; + + return row (userUuids)::RbacUsers; +end; $$; + + +create or replace function withUser(userName varchar, whenNotExists RbacWhenNotExists = 'fail') + returns RbacUsers + returns null on null input + language plpgsql as $$ +begin + return row (array [getRbacUserId(userName, whenNotExists)]); +end; $$; + +--// + +-- ================================================================= +-- CREATE ROLE +--changeset rbac-role-builder-create-role:1 endDelimiter:--// +-- ----------------------------------------------------------------- + +/* +*/ +create or replace function createRole( + roleDescriptor RbacRoleDescriptor, + permissions RbacPermissions, + superRoles RbacSuperRoles, + subRoles RbacSubRoles = null, + users RbacUsers = null +) + returns uuid + called on null input + language plpgsql as $$ +declare + roleUuid uuid; + superRoleUuid uuid; + subRoleUuid uuid; + userUuid uuid; +begin + raise notice 'will createRole for %', roleDescriptor; + roleUuid = createRole(roleDescriptor); + + call grantPermissionsToRole(roleUuid, permissions.permissionUuids); + + if superRoles is not null then + foreach superRoleUuid in array superRoles.roleuUids + loop + call grantRoleToRole(roleUuid, superRoleUuid); + end loop; + end if; + + if subRoles is not null then + foreach subRoleUuid in array subRoles.roleuUids + loop + call grantRoleToRole(subRoleUuid, roleUuid); + end loop; + end if; + + if users is not null then + foreach userUuid in array users.useruUids + loop + call grantRoleToUser(roleUuid, userUuid); + end loop; + end if; + + return roleUuid; +end; $$; + +create or replace function createRole( + roleDescriptor RbacRoleDescriptor, + permissions RbacPermissions, + users RbacUsers = null +) + returns uuid + called on null input + language plpgsql as $$ +begin + return createRole(roleDescriptor, permissions, null, null, users); +end; $$; + +create or replace function createRole( + roleDescriptor RbacRoleDescriptor, + permissions RbacPermissions, + subRoles RbacSubRoles, + users RbacUsers = null +) + returns uuid + called on null input + language plpgsql as $$ +begin + return createRole(roleDescriptor, permissions, null, subRoles, users); +end; $$; + +--// diff --git a/src/main/resources/db/changelog/2022-07-28-030-rbac-statistics.sql b/src/main/resources/db/changelog/2022-07-28-030-rbac-statistics.sql new file mode 100644 index 00000000..1ef6283a --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-28-030-rbac-statistics.sql @@ -0,0 +1,28 @@ +--liquibase formatted sql + +--changeset rbac-statistics:1 endDelimiter:--// + +/* + Creates a view which presents some statistics about the RBAC tables. + */ +create view RbacStatisticsView as +select no, to_char("count", '9 999 999 999') as "count", "table" + from (select 1 as no, count(*) as "count", 'login users' as "table" + from RbacUser + union + select 2 as no, count(*) as "count", 'roles' as "table" + from RbacRole + union + select 3 as no, count(*) as "count", 'permissions' as "table" + from RbacPermission + union + select 4 as no, count(*) as "count", 'references' as "table" + from RbacReference + union + select 5 as no, count(*) as "count", 'grants' as "table" + from RbacGrants + union + select 6 as no, count(*) as "count", 'objects' as "table" + from RbacObject) as totals + order by totals.no; +--// diff --git a/src/main/resources/db/changelog/2022-07-29-050-hs-base.sql b/src/main/resources/db/changelog/2022-07-29-050-hs-base.sql new file mode 100644 index 00000000..82cd5fe4 --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-29-050-hs-base.sql @@ -0,0 +1,138 @@ +--liquibase formatted sql + +-- ============================================================================ +--changeset hs-base-GLOBAL-OBJECT:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + The purpose of this table is to contain a single row + which can be referenced from global roles as an object. + Otherwise these columns needed to be nullable and + many queries would be more complicated. + */ +create table Global +( + uuid uuid primary key references RbacObject (uuid), + name varchar(63) +); +create unique index Global_Singleton on Global ((0)); + +grant select on global to restricted; + +/** + A single row to be referenced as a global object. + */ +insert + into RbacObject (objecttable) values ('global'); +insert + into Global (uuid, name) values ((select uuid from RbacObject where objectTable = 'global'), 'hostsharing'); +--// + + +-- ============================================================================ +--changeset rhs-base-HAS-GLOBAL-PERMISSION:1 endDelimiter:--// +-- ------------------------------------------------------------------ + +create or replace function hasGlobalPermission(op RbacOp) + returns boolean + language sql as +$$ + -- TODO: this could to be optimized +select (select uuid from global) in + (select queryAccessibleObjectUuidsOfSubjectIds( + op, 'global', currentSubjectIds())); +$$; +--// + + +-- ============================================================================ +--changeset hs-base-GLOBAL-IDENTITY-VIEW:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +/* + Creates a view to the global object table which maps the identifying name to the objectUuid. + */ +drop view if exists global_iv; +create or replace view global_iv as +select target.uuid, target.name as idName + from global as target; +grant all privileges on global_iv to restricted; + +/* + Returns the objectUuid for a given identifying name (in this case the idName). + */ +create or replace function globalUuidByIdName(idName varchar) + returns uuid + language sql + strict as $$ +select uuid from global_iv iv where iv.idName = globalUuidByIdName.idName; +$$; + +/* + Returns the identifying name for a given objectUuid (in this case the idName). + */ +create or replace function globalIdNameByUuid(uuid uuid) + returns varchar + language sql + strict as $$ +select idName from global_iv iv where iv.uuid = globalIdNameByUuid.uuid; +$$; +--// + +-- ============================================================================ +--changeset hs-base-ADMIN-ROLE:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + A global administrator role. + */ +create or replace function hostsharingAdmin() + returns RbacRoleDescriptor + returns null on null input + stable leakproof + language sql as $$ +select 'global', (select uuid from RbacObject where objectTable = 'global'), 'admin'::RbacRoleType; +$$; +select createRole(hostsharingAdmin()); + +-- ============================================================================ +--changeset hs-base-ADMIN-USERS:1 context:dev,tc endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + Create two users and assign both to the administrators role. + */ +do language plpgsql $$ + declare + admins uuid ; + begin + admins = findRoleId(hostsharingAdmin()); + call grantRoleToUser(admins, createRbacUser('mike@hostsharing.net')); + call grantRoleToUser(admins, createRbacUser('sven@hostsharing.net')); + end; +$$; +--// + + +-- ============================================================================ +--changeset hs-base-hostsharing-TEST:1 context:dev,tc runAlways:true endDelimiter:--// +-- ---------------------------------------------------------------------------- + +/* + Tests if currentUserId() can fetch the user from the session variable. + */ + +do language plpgsql $$ + declare + userName varchar; + begin + set local hsadminng.currentUser = 'sven@hostsharing.net'; + select userName from RbacUser where uuid = currentUserId() into userName; + if userName <> 'sven@hostsharing.net' then + raise exception 'setting or fetching initial currentUser failed, got: %', userName; + end if; + + set local hsadminng.currentUser = 'mike@hostsharing.net'; + select userName from RbacUser where uuid = currentUserId() into userName; + if userName = 'mike@hostsharing.net' then + raise exception 'currentUser should not change in one transaction, but did change, got: %', userName; + end if; + end; $$; +--// diff --git a/src/main/resources/db/changelog/2022-07-29-060-hs-customer.sql b/src/main/resources/db/changelog/2022-07-29-060-hs-customer.sql new file mode 100644 index 00000000..ace77ea6 --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-29-060-hs-customer.sql @@ -0,0 +1,14 @@ +--liquibase formatted sql + +-- ============================================================================ +--changeset hs-customer-MAIN-TABLE:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +create table if not exists customer +( + uuid uuid unique references RbacObject (uuid), + reference int not null unique check (reference between 10000 and 99999), + prefix character(3) unique, + adminUserName varchar(63) +); +--// diff --git a/src/main/resources/db/changelog/2022-07-29-061-hs-customer-rbac.sql b/src/main/resources/db/changelog/2022-07-29-061-hs-customer-rbac.sql new file mode 100644 index 00000000..5afa8dfb --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-29-061-hs-customer-rbac.sql @@ -0,0 +1,236 @@ +--liquibase formatted sql + +-- ============================================================================ +--changeset hs-customer-rbac-CREATE-OBJECT:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +/* + Creates the related RbacObject through a BEFORE INSERT TRIGGER. + */ +drop trigger if exists createRbacObjectForCustomer_Trigger on customer; +create trigger createRbacObjectForCustomer_Trigger + before insert + on customer + for each row +execute procedure createRbacObject(); +--// + +-- ============================================================================ +--changeset hs-customer-rbac-ROLE-DESCRIPTORS:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +create or replace function customerOwner(customer customer) + returns RbacRoleDescriptor + language plpgsql + strict as $$ +begin + return roleDescriptor('customer', customer.uuid, 'owner'); +end; $$; + +create or replace function customerAdmin(customer customer) + returns RbacRoleDescriptor + language plpgsql + strict as $$ +begin + return roleDescriptor('customer', customer.uuid, 'admin'); +end; $$; + +create or replace function customerTenant(customer customer) + returns RbacRoleDescriptor + language plpgsql + strict as $$ +begin + return roleDescriptor('customer', customer.uuid, 'tenant'); +end; $$; +--// + + +-- ============================================================================ +--changeset hs-customer-rbac-ROLES-CREATION:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +/* + Creates the roles and their assignments for a new customer for the AFTER INSERT TRIGGER. + */ + +create or replace function createRbacRolesForCustomer() + returns trigger + language plpgsql + strict as $$ +declare + customerOwnerUuid uuid; + customerAdminUuid uuid; +begin + if TG_OP <> 'INSERT' then + raise exception 'invalid usage of TRIGGER AFTER INSERT'; + end if; + + -- the owner role with full access for Hostsharing administrators + customerOwnerUuid = createRole( + customerOwner(NEW), + grantingPermissions(forObjectUuid => NEW.uuid, permitOps => array ['*']), + beneathRole(hostsharingAdmin()) + ); + + -- the admin role for the customer's admins, who can view and add products + customerAdminUuid = createRole( + customerAdmin(NEW), + grantingPermissions(forObjectUuid => NEW.uuid, permitOps => array ['view', 'add-package']), + -- NO auto follow for customer owner to avoid exploding permissions for administrators + withUser(NEW.adminUserName, 'create') -- implicitly ignored if null + ); + + -- allow the customer owner role (thus administrators) to assume the customer admin role + call grantRoleToRole(customerAdminUuid, customerOwnerUuid, false); + + -- the tenant role which later can be used by owners+admins of sub-objects + perform createRole( + customerTenant(NEW), + grantingPermissions(forObjectUuid => NEW.uuid, permitOps => array ['view']) + ); + + return NEW; +end; $$; + +/* + An AFTER INSERT TRIGGER which creates the role structure for a new customer. + */ + +drop trigger if exists createRbacRolesForCustomer_Trigger on customer; +create trigger createRbacRolesForCustomer_Trigger + after insert + on customer + for each row +execute procedure createRbacRolesForCustomer(); +--// + + +-- ============================================================================ +--changeset hs-customer-rbac-ROLES-REMOVAL:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +/* + Deletes the roles and their assignments of a deleted customer for the BEFORE DELETE TRIGGER. + */ + +create or replace function deleteRbacRulesForCustomer() + returns trigger + language plpgsql + strict as $$ +begin + if TG_OP = 'DELETE' then + call deleteRole(findRoleId(customerOwner(OLD))); + call deleteRole(findRoleId(customerAdmin(OLD))); + call deleteRole(findRoleId(customerTenant(OLD))); + else + raise exception 'invalid usage of TRIGGER BEFORE DELETE'; + end if; +end; $$; + +/* + An BEFORE DELETE TRIGGER which deletes the role structure of a customer. + */ + +drop trigger if exists deleteRbacRulesForCustomer_Trigger on customer; +create trigger deleteRbacRulesForCustomer_Trigger + before delete + on customer + for each row +execute procedure deleteRbacRulesForCustomer(); +--// + +-- ============================================================================ +--changeset hs-customer-rbac-IDENTITY-VIEW:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +/* + Creates a view to the customer main table which maps the identifying name + (in this case, the prefix) to the objectUuid. + */ +drop view if exists customer_iv; +create or replace view customer_iv as +select target.uuid, target.prefix as idName + from customer as target; +-- TODO: Is it ok that everybody has access to this information? +grant all privileges on customer_iv to restricted; + +/* + Returns the objectUuid for a given identifying name (in this case the prefix). + */ +create or replace function customerUuidByIdName(idName varchar) + returns uuid + language sql + strict as $$ +select uuid from customer_iv iv where iv.idName = customerUuidByIdName.idName; +$$; + +/* + Returns the identifying name for a given objectUuid (in this case the prefix). + */ +create or replace function customerIdNameByUuid(uuid uuid) + returns varchar + language sql + strict as $$ +select idName from customer_iv iv where iv.uuid = customerIdNameByUuid.uuid; +$$; +--// + + +-- ============================================================================ +--changeset hs-customer-rbac-RESTRICTED-VIEW:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + Creates a view to the customer main table with row-level limitation + based on the 'view' permission of the current user or assumed roles. + */ +set session session authorization default; +drop view if exists customer_rv; +create or replace view customer_rv as +select target.* + from customer as target + where target.uuid in (select queryAccessibleObjectUuidsOfSubjectIds('view', 'customer', currentSubjectIds())); +grant all privileges on customer_rv to restricted; +--// + + +-- ============================================================================ +--changeset hs-customer-rbac-ADD-CUSTOMER:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + Creates a global permission for add-customer and assigns it to the hostsharing admins role. + */ +do language plpgsql $$ + declare + addCustomerPermissions uuid[]; + hostsharingObjectUuid uuid; + hsAdminRoleUuid uuid ; + begin + hsAdminRoleUuid := findRoleId(hostsharingAdmin()); + hostsharingObjectUuid := (select uuid from global); + addCustomerPermissions := createPermissions(hostsharingObjectUuid, array ['add-customer']); + call grantPermissionsToRole(hsAdminRoleUuid, addCustomerPermissions); + end; +$$; + +/** + Used by the trigger to prevent the add-customer to current user respectively assumed roles. + */ +create or replace function addCustomerNotAllowedForCurrentSubjects() + returns trigger + language PLPGSQL +as $$ +begin + raise exception 'add-customer not permitted for %', array_to_string(currentSubjects(), ';', 'null'); +end; $$; + +/** + Checks if the user or assumed roles are allowed to add a new customer. + */ +create trigger customer_insert_trigger + before insert + on customer + for each row + when ( currentUser() <> 'mike@hostsharing.net' or not hasGlobalPermission('add-customer') ) +execute procedure addCustomerNotAllowedForCurrentSubjects(); +--// + diff --git a/src/main/resources/db/changelog/2022-07-29-062-hs-customer-test-data.sql b/src/main/resources/db/changelog/2022-07-29-062-hs-customer-test-data.sql new file mode 100644 index 00000000..32789e91 --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-29-062-hs-customer-test-data.sql @@ -0,0 +1,73 @@ +--liquibase formatted sql + + +-- ============================================================================ +--changeset hs-customer-TEST-DATA-GENERATOR:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + Generates a customer reference number for a given test data counter. + */ +create or replace function testCustomerReference(customerCount integer) + returns integer + returns null on null input + language plpgsql as $$ +begin + return 10000 + customerCount; +end; $$; + +/* + Creates test data for the customer main table. + */ +create or replace procedure createCustomerTestData( + startCount integer, -- count of auto generated rows before the run + endCount integer, -- count of auto generated rows after the run + doCommitAfterEach boolean -- only for mass data creation outside of Liquibase +) + language plpgsql as $$ +declare + currentTask varchar; + custReference integer; + custRowId uuid; + custPrefix varchar; + custAdminName varchar; +begin + set hsadminng.currentUser to ''; + + for t in startCount..endCount + loop + currentTask = 'creating RBAC test customer #' || t; + set local hsadminng.currentUser to 'mike@hostsharing.net'; + set local hsadminng.assumedRoles = ''; + set local hsadminng.currentTask to currentTask; + + -- When a new customer is created, + custReference = testCustomerReference(t); + custRowId = uuid_generate_v4(); + custPrefix = intToVarChar(t, 3); + custAdminName = 'admin@' || custPrefix || '.example.com'; + + raise notice 'creating customer %:%', custReference, custPrefix; + insert + into customer (reference, prefix, adminUserName) + values (custReference, custPrefix, custAdminName); + + if doCommitAfterEach then + commit; + end if; + + end loop; + +end; $$; +--// + + +-- ============================================================================ +--changeset hs-customer-TEST-DATA-GENERATION:1 –context=dev,tc endDelimiter:--// +-- ---------------------------------------------------------------------------- + +do language plpgsql $$ + begin + call createCustomerTestData(0, 2, false); + end; +$$; +--// diff --git a/src/main/resources/db/changelog/2022-07-29-070-hs-package-rbac.sql b/src/main/resources/db/changelog/2022-07-29-070-hs-package-rbac.sql new file mode 100644 index 00000000..d7588ec4 --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-29-070-hs-package-rbac.sql @@ -0,0 +1,192 @@ +--liquibase formatted sql + +-- ============================================================================ +--changeset hs-package-rbac-CREATE-OBJECT:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + Creates the related RbacObject through a BEFORE INSERT TRIGGER. + */ +drop trigger if exists createRbacObjectForPackage_Trigger on package; +create trigger createRbacObjectForPackage_Trigger + before insert + on package + for each row +execute procedure createRbacObject(); +--// + + +-- ============================================================================ +--changeset hs-package-rbac-ROLE-DESCRIPTORS:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +create or replace function packageOwner(pac package) + returns RbacRoleDescriptor + returns null on null input + language plpgsql as $$ +begin + return roleDescriptor('package', pac.uuid, 'owner'); +end; $$; + +create or replace function packageAdmin(pac package) + returns RbacRoleDescriptor + returns null on null input + language plpgsql as $$ +begin + return roleDescriptor('package', pac.uuid, 'admin'); +end; $$; + +create or replace function packageTenant(pac package) + returns RbacRoleDescriptor + returns null on null input + language plpgsql as $$ +begin + return roleDescriptor('package', pac.uuid, 'tenant'); +end; $$; +--// + + +-- ============================================================================ +--changeset hs-package-rbac-ROLES-CREATION:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + Creates the roles and their assignments for a new package for the AFTER INSERT TRIGGER. + */ +create or replace function createRbacRolesForPackage() + returns trigger + language plpgsql + strict as $$ +declare + parentCustomer customer; + packageOwnerRoleUuid uuid; + packageAdminRoleUuid uuid; +begin + if TG_OP <> 'INSERT' then + raise exception 'invalid usage of TRIGGER AFTER INSERT'; + end if; + + select * from customer as c where c.uuid = NEW.customerUuid into parentCustomer; + + -- an owner role is created and assigned to the customer's admin role + packageOwnerRoleUuid = createRole( + packageOwner(NEW), + withoutPermissions(), + beneathRole(customerAdmin(parentCustomer)) + ); + + -- an owner role is created and assigned to the package owner role + packageAdminRoleUuid = createRole( + packageAdmin(NEW), + grantingPermissions(forObjectUuid => NEW.uuid, permitOps => array ['add-unixuser', 'add-domain']), + beneathRole(packageOwnerRoleUuid) + ); + + -- and a package tenant role is created and assigned to the package admin as well + perform createRole( + packageTenant(NEW), + grantingPermissions(forObjectUuid => NEW.uuid, permitOps => array ['view']), + beneathRole(packageAdminRoleUuid), + beingItselfA(customerTenant(parentCustomer)) + ); + + return NEW; +end; $$; + +/* + An AFTER INSERT TRIGGER which creates the role structure for a new package. + */ + +drop trigger if exists createRbacRolesForPackage_Trigger on package; +create trigger createRbacRolesForPackage_Trigger + after insert + on package + for each row +execute procedure createRbacRolesForPackage(); +--// + +-- ============================================================================ +--changeset hs-package-rbac-ROLES-REMOVAL:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +/* + Deletes the roles and their assignments of a deleted package for the BEFORE DELETE TRIGGER. + */ + +create or replace function deleteRbacRulesForPackage() + returns trigger + language plpgsql + strict as $$ +begin + if TG_OP = 'DELETE' then + call deleteRole(findRoleId(packageOwner(OLD))); + call deleteRole(findRoleId(packageAdmin(OLD))); + call deleteRole(findRoleId(packageTenant(OLD))); + else + raise exception 'invalid usage of TRIGGER BEFORE DELETE'; + end if; +end; $$; + +/* + An BEFORE DELETE TRIGGER which deletes the role structure of a package. + */ + +drop trigger if exists deleteRbacRulesForPackage_Trigger on package; +create trigger deleteRbacRulesForPackage_Trigger + before delete + on package + for each row +execute procedure deleteRbacRulesForPackage(); +--// + + +-- ============================================================================ +--changeset hs-package-rbac-IDENTITY-VIEW:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +/* + Creates a view to the package main table which maps the identifying name + (in this case, actually the column `name`) to the objectUuid. + */ +drop view if exists package_iv; +create or replace view package_iv as +select distinct target.uuid, target.name as idName + from package as target; +-- TODO: Is it ok that everybody has access to this information? +grant all privileges on package_iv to restricted; + +/* + Returns the objectUuid for a given identifying name (in this case, actually the column `name`). + */ +create or replace function packageUuidByIdName(idName varchar) + returns uuid + language sql + strict as $$ +select uuid from package_iv iv where iv.idName = packageUuidByIdName.idName; +$$; + +/* + Returns the identifying name for a given objectUuid (in this case the name). + */ +create or replace function packageIdNameByUuid(uuid uuid) + returns varchar + language sql + strict as $$ +select idName from package_iv iv where iv.uuid = packageIdNameByUuid.uuid; +$$; +--// + + +-- ============================================================================ +--changeset hs-package-rbac-RESTRICTED-VIEW:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +/* + Creates a view to the customer main table which maps the identifying name + (in this case, the prefix) to the objectUuid. + */ +drop view if exists package_rv; +create or replace view package_rv as +select target.* + from package as target + where target.uuid in (select queryAccessibleObjectUuidsOfSubjectIds('view', 'package', currentSubjectIds())); +grant all privileges on package_rv to restricted; +--// diff --git a/src/main/resources/db/changelog/2022-07-29-070-hs-package-test-data.sql b/src/main/resources/db/changelog/2022-07-29-070-hs-package-test-data.sql new file mode 100644 index 00000000..78274594 --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-29-070-hs-package-test-data.sql @@ -0,0 +1,61 @@ +--liquibase formatted sql + +-- ============================================================================ +--changeset hs-package-TEST-DATA-GENERATOR:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- +/* + Creates test data for the package main table. + */ +create or replace procedure createPackageTestData( + minCustomerReference integer, -- skip customers with reference below this + doCommitAfterEach boolean -- only for mass data creation outside of Liquibase +) + language plpgsql as $$ + declare + cust customer; + pacName varchar; + currentTask varchar; + custAdmin varchar; + begin + set hsadminng.currentUser to ''; + + for cust in (select * from customer) + loop + CONTINUE WHEN cust.reference < minCustomerReference; + + for t in 0..2 + loop + pacName = cust.prefix || to_char(t, 'fm00'); + currentTask = 'creating RBAC test package #' || pacName || ' for customer ' || cust.prefix || ' #' || + cust.uuid; + raise notice 'task: %', currentTask; + + custAdmin = 'admin@' || cust.prefix || '.example.com'; + set local hsadminng.currentUser to custAdmin; + set local hsadminng.assumedRoles = ''; + set local hsadminng.currentTask to currentTask; + + insert + into package (name, customerUuid) + values (pacName, cust.uuid); + end loop; + end loop; + + if doCommitAfterEach then + commit; + end if; + end; +$$; +--// + + +-- ============================================================================ +--changeset hs-package-TEST-DATA-GENERATION:1 –context=dev,tc endDelimiter:--// +-- ---------------------------------------------------------------------------- + +do language plpgsql $$ + begin + call createPackageTestData(0, false); + end; +$$; +--// diff --git a/src/main/resources/db/changelog/2022-07-29-070-hs-package.sql b/src/main/resources/db/changelog/2022-07-29-070-hs-package.sql new file mode 100644 index 00000000..95b925d5 --- /dev/null +++ b/src/main/resources/db/changelog/2022-07-29-070-hs-package.sql @@ -0,0 +1,13 @@ +--liquibase formatted sql + +-- ============================================================================ +--changeset hs-package-MAIN-TABLE:1 endDelimiter:--// +-- ---------------------------------------------------------------------------- + +create table if not exists package +( + uuid uuid unique references RbacObject (uuid), + name character varying(5), + customerUuid uuid references customer (uuid) +); +--// diff --git a/src/main/resources/db/changelog/23-hs-unixuser.sql b/src/main/resources/db/changelog/23-hs-unixuser.sql new file mode 100644 index 00000000..233ef5a8 --- /dev/null +++ b/src/main/resources/db/changelog/23-hs-unixuser.sql @@ -0,0 +1,159 @@ +-- ======================================================== +-- UnixUser example with RBAC +-- -------------------------------------------------------- + +set session session authorization default; + +create table if not exists UnixUser +( + uuid uuid unique references RbacObject (uuid), + name character varying(32), + comment character varying(96), + packageUuid uuid references package (uuid) +); + +create or replace function unixUserOwner(uu UnixUser) + returns RbacRoleDescriptor + returns null on null input + language plpgsql as $$ +begin + return roleDescriptor('unixuser', uu.uuid, 'owner'); +end; $$; + +create or replace function unixUserAdmin(uu UnixUser) + returns RbacRoleDescriptor + returns null on null input + language plpgsql as $$ +begin + return roleDescriptor('unixuser', uu.uuid, 'admin'); +end; $$; + +create or replace function unixUserTenant(uu UnixUser) + returns RbacRoleDescriptor + returns null on null input + language plpgsql as $$ +begin + return roleDescriptor('unixuser', uu.uuid, 'tenant'); +end; $$; + +create or replace function createUnixUserTenantRoleIfNotExists(unixUser UnixUser) + returns uuid + returns null on null input + language plpgsql as $$ +declare + unixUserTenantRoleDesc RbacRoleDescriptor; + unixUserTenantRoleUuid uuid; +begin + unixUserTenantRoleDesc = unixUserTenant(unixUser); + unixUserTenantRoleUuid = findRoleId(unixUserTenantRoleDesc); + if unixUserTenantRoleUuid is not null then + return unixUserTenantRoleUuid; + end if; + + return createRole( + unixUserTenantRoleDesc, + grantingPermissions(forObjectUuid => unixUser.uuid, permitOps => array ['view']), + beneathRole(unixUserAdmin(unixUser)) + ); +end; $$; + + +drop trigger if exists createRbacObjectForUnixUser_Trigger on UnixUser; +create trigger createRbacObjectForUnixUser_Trigger + before insert + on UnixUser + for each row +execute procedure createRbacObject(); + +create or replace function createRbacRulesForUnixUser() + returns trigger + language plpgsql + strict as $$ +declare + parentPackage package; + unixuserOwnerRoleId uuid; + unixuserAdminRoleId uuid; +begin + if TG_OP <> 'INSERT' then + raise exception 'invalid usage of TRIGGER AFTER INSERT'; + end if; + + select * from package where uuid = NEW.packageUuid into parentPackage; + + -- an owner role is created and assigned to the package's admin group + unixuserOwnerRoleId = createRole( + unixUserOwner(NEW), + grantingPermissions(forObjectUuid => NEW.uuid, permitOps => array ['*']), + beneathRole(packageAdmin(parentPackage)) + ); + + -- and a unixuser admin role is created and assigned to the unixuser owner as well + unixuserAdminRoleId = createRole( + unixUserAdmin(NEW), + grantingPermissions(forObjectUuid => NEW.uuid, permitOps => array ['edit']), + beneathRole(unixuserOwnerRoleId), + beingItselfA(packageTenant(parentPackage)) + ); + + -- a tenent role is only created on demand + + return NEW; +end; $$; + +drop trigger if exists createRbacRulesForUnixUser_Trigger on UnixUser; +create trigger createRbacRulesForUnixUser_Trigger + after insert + on UnixUser + for each row +execute procedure createRbacRulesForUnixUser(); + +-- TODO: CREATE OR REPLACE FUNCTION deleteRbacRulesForUnixUser() + + +-- create RBAC-restricted view +set session session authorization default; +-- ALTER TABLE unixuser ENABLE ROW LEVEL SECURITY; +drop view if exists unixuser_rv; +create or replace view unixuser_rv as +select target.* + from unixuser as target + where target.uuid in (select queryAccessibleObjectUuidsOfSubjectIds('view', 'unixuser', currentSubjectIds())); +grant all privileges on unixuser_rv to restricted; + + +-- generate UnixUser test data + +do language plpgsql $$ + declare + pac record; + pacAdmin varchar; + currentTask varchar; + begin + set hsadminng.currentUser to ''; + + for pac in (select p.uuid, p.name + from package p + join customer c on p.customeruuid = c.uuid + -- WHERE c.reference >= 18000 + ) + loop + + for t in 0..9 + loop + currentTask = 'creating RBAC test unixuser #' || t || ' for package ' || pac.name || ' #' || pac.uuid; + raise notice 'task: %', currentTask; + pacAdmin = 'admin@' || pac.name || '.example.com'; + set local hsadminng.currentUser to 'mike@hostsharing.net'; -- TODO: use a package-admin + set local hsadminng.assumedRoles = ''; + set local hsadminng.currentTask to currentTask; + + insert + into unixuser (name, packageUuid) + values (pac.name || '-' || intToVarChar(t, 4), pac.uuid); + + commit; + end loop; + end loop; + + end; +$$; diff --git a/src/main/resources/db/changelog/24-hs-domain.sql b/src/main/resources/db/changelog/24-hs-domain.sql new file mode 100644 index 00000000..ece72c8a --- /dev/null +++ b/src/main/resources/db/changelog/24-hs-domain.sql @@ -0,0 +1,151 @@ +-- ======================================================== +-- Domain example with RBAC +-- -------------------------------------------------------- + +set session session authorization default; + +create table if not exists Domain +( + uuid uuid unique references RbacObject (uuid), + name character varying(32), + unixUserUuid uuid references unixuser (uuid) +); + +drop trigger if exists createRbacObjectForDomain_Trigger on Domain; +create trigger createRbacObjectForDomain_Trigger + before insert + on Domain + for each row +execute procedure createRbacObject(); + +create or replace function domainOwner(dom Domain) + returns RbacRoleDescriptor + returns null on null input + language plpgsql as $$ +begin + return roleDescriptor('domain', dom.uuid, 'owner'); +end; $$; + +create or replace function domainAdmin(dom Domain) + returns RbacRoleDescriptor + returns null on null input + language plpgsql as $$ +begin + return roleDescriptor('domain', dom.uuid, 'admin'); +end; $$; + +create or replace function domainTenant(dom Domain) + returns RbacRoleDescriptor + returns null on null input + language plpgsql as $$ +begin + return roleDescriptor('domain', dom.uuid, 'tenant'); +end; $$; + + +create or replace function createRbacRulesForDomain() + returns trigger + language plpgsql + strict as $$ +declare + parentUser UnixUser; + parentPackage package; + domainOwnerRoleUuid uuid; + domainAdminRoleUuid uuid; +begin + if TG_OP <> 'INSERT' then + raise exception 'invalid usage of TRIGGER AFTER INSERT'; + end if; + + select * from UnixUser where uuid = NEW.unixUserUuid into parentUser; + select * from Package where uuid = parentUser.packageuuid into parentPackage; + + -- a domain owner role is created and assigned to the unixuser's admin role + domainOwnerRoleUuid = createRole( + domainOwner(NEW), + grantingPermissions(forObjectUuid => NEW.uuid, permitOps => array ['*']), + beneathRole(packageAdmin(parentPackage)) + ); + + -- a domain admin role is created and assigned to the domain's owner role + domainAdminRoleUuid = createRole( + domainAdmin(NEW), + grantingPermissions(forObjectUuid => NEW.uuid, permitOps => array ['edit', 'add-emailaddress']), + beneathRole(domainOwnerRoleUuid) + ); + + -- and a domain tenant role is created and assigned to the domain's admiin role + perform createRole( + domainTenant(NEW), + grantingPermissions(forObjectUuid => NEW.uuid, permitOps => array ['*']), + beneathRole(domainAdminRoleUuid), + beingItselfA(createUnixUserTenantRoleIfNotExists(parentUser)) + ); + + return NEW; +end; $$; + +drop trigger if exists createRbacRulesForDomain_Trigger on Domain; +create trigger createRbacRulesForDomain_Trigger + after insert + on Domain + for each row +execute procedure createRbacRulesForDomain(); + +-- TODO: CREATE OR REPLACE FUNCTION deleteRbacRulesForDomain() + + +-- create RBAC-restricted view +set session session authorization default; +-- ALTER TABLE Domain ENABLE ROW LEVEL SECURITY; +drop view if exists domain_rv; +create or replace view domain_rv as +select target.* + from Domain as target + where target.uuid in (select queryAccessibleObjectUuidsOfSubjectIds('view', 'domain', currentSubjectIds())); +grant all privileges on domain_rv to restricted; + + +-- generate Domain test data + +do language plpgsql $$ + declare + uu record; + pac package; + pacAdmin varchar; + currentTask varchar; + begin + set hsadminng.currentUser to ''; + + for uu in (select u.uuid, u.name, u.packageuuid, c.reference + from unixuser u + join package p on u.packageuuid = p.uuid + join customer c on p.customeruuid = c.uuid + -- WHERE c.reference >= 18000 + ) + loop + if (random() < 0.3) then + for t in 0..1 + loop + currentTask = 'creating RBAC test Domain #' || t || ' for UnixUser ' || uu.name || ' #' || uu.uuid; + raise notice 'task: %', currentTask; + + select * from package where uuid = uu.packageUuid into pac; + pacAdmin = 'admin@' || pac.name || '.example.com'; + set local hsadminng.currentUser to pacAdmin; + set local hsadminng.assumedRoles = ''; + set local hsadminng.currentTask to currentTask; + + insert + into Domain (name, unixUserUuid) + values ('dom-' || t || '.' || uu.name || '.example.org', uu.uuid); + + commit; + end loop; + end if; + end loop; + + end; +$$; + + diff --git a/src/main/resources/db/changelog/25-hs-emailaddress.sql b/src/main/resources/db/changelog/25-hs-emailaddress.sql new file mode 100644 index 00000000..9aa82621 --- /dev/null +++ b/src/main/resources/db/changelog/25-hs-emailaddress.sql @@ -0,0 +1,131 @@ +-- ======================================================== +-- EMailAddress example with RBAC +-- -------------------------------------------------------- + +set session session authorization default; + +create table if not exists EMailAddress +( + uuid uuid unique references RbacObject (uuid), + localPart character varying(64), + domainUuid uuid references domain (uuid) +); + +drop trigger if exists createRbacObjectForEMailAddress_Trigger on EMailAddress; +create trigger createRbacObjectForEMailAddress_Trigger + before insert + on EMailAddress + for each row +execute procedure createRbacObject(); + +create or replace function emailAddressOwner(emAddr EMailAddress) + returns RbacRoleDescriptor + returns null on null input + language plpgsql as $$ +begin + return roleDescriptor('emailaddress', emAddr.uuid, 'owner'); +end; $$; + +create or replace function emailAddressAdmin(emAddr EMailAddress) + returns RbacRoleDescriptor + returns null on null input + language plpgsql as $$ +begin + return roleDescriptor('emailaddress', emAddr.uuid, 'admin'); +end; $$; + +create or replace function createRbacRulesForEMailAddress() + returns trigger + language plpgsql + strict as $$ +declare + parentDomain Domain; + eMailAddressOwnerRoleUuid uuid; +begin + if TG_OP <> 'INSERT' then + raise exception 'invalid usage of TRIGGER AFTER INSERT'; + end if; + + select d.* + from domain d + left join unixuser u on u.uuid = d.unixuseruuid + where d.uuid = NEW.domainUuid + into parentDomain; + + -- an owner role is created and assigned to the domains's admin group + eMailAddressOwnerRoleUuid = createRole( + emailAddressOwner(NEW), + grantingPermissions(forObjectUuid => NEW.uuid, permitOps => array ['*']), + beneathRole(domainAdmin(parentDomain)) + ); + + -- and an admin role is created and assigned to the unixuser owner as well + perform createRole( + emailAddressAdmin(NEW), + grantingPermissions(forObjectUuid => NEW.uuid, permitOps => array ['edit']), + beneathRole(eMailAddressOwnerRoleUuid), + beingItselfA(domainTenant(parentDomain)) + ); + + return NEW; +end; $$; + +drop trigger if exists createRbacRulesForEMailAddress_Trigger on EMailAddress; +create trigger createRbacRulesForEMailAddress_Trigger + after insert + on EMailAddress + for each row +execute procedure createRbacRulesForEMailAddress(); + +-- TODO: CREATE OR REPLACE FUNCTION deleteRbacRulesForEMailAddress() + + +-- create RBAC-restricted view +set session session authorization default; +-- ALTER TABLE EMailAddress ENABLE ROW LEVEL SECURITY; +drop view if exists EMailAddress_rv; +create or replace view EMailAddress_rv as +select target.* + from EMailAddress as target + where target.uuid in (select queryAccessibleObjectUuidsOfSubjectIds('view', 'emailaddress', currentSubjectIds())); +grant all privileges on EMailAddress_rv to restricted; + +-- generate EMailAddress test data + +do language plpgsql $$ + declare + dom record; + pacAdmin varchar; + currentTask varchar; + begin + set hsadminng.currentUser to ''; + + for dom in (select d.uuid, d.name, p.name as packageName + from domain d + join unixuser u on u.uuid = d.unixuseruuid + join package p on u.packageuuid = p.uuid + join customer c on p.customeruuid = c.uuid + -- WHERE c.reference >= 18000 + ) + loop + for t in 0..4 + loop + currentTask = 'creating RBAC test EMailAddress #' || t || ' for Domain ' || dom.name; + raise notice 'task: %', currentTask; + + pacAdmin = 'admin@' || dom.packageName || '.example.com'; + set local hsadminng.currentUser to pacAdmin; + set local hsadminng.assumedRoles = ''; + set local hsadminng.currentTask to currentTask; + + insert + into EMailAddress (localPart, domainUuid) + values ('local' || t, dom.uuid); + + commit; + end loop; + end loop; + end; +$$; + + diff --git a/src/main/resources/db/changelog/29-hs-statistics.sql b/src/main/resources/db/changelog/29-hs-statistics.sql new file mode 100644 index 00000000..3dd43b5d --- /dev/null +++ b/src/main/resources/db/changelog/29-hs-statistics.sql @@ -0,0 +1,28 @@ +-- ======================================================== +-- Some Business Table Statistics +-- -------------------------------------------------------- + +drop view if exists "BusinessTableStatisticsV"; +create view "BusinessTableStatisticsV" as +select no, + to_char("count", '999 999 999') as "count", + to_char("required", '999 999 999') as "required", + to_char("count"::float / "required"::float, '990.999') as "factor", + "table" + from (select 1 as no, count(*) as "count", 7000 as "required", 'customers' as "table" + from customer + union + select 2 as no, count(*) as "count", 15000 as "required", 'packages' as "table" + from package + union + select 3 as no, count(*) as "count", 150000 as "required", 'unixuser' as "table" + from unixuser + union + select 4 as no, count(*) as "count", 100000 as "required", 'domain' as "table" + from domain + union + select 5 as no, count(*) as "count", 500000 as "required", 'emailaddress' as "table" + from emailaddress) totals + order by totals.no; + +select * from "BusinessTableStatisticsV"; diff --git a/src/main/resources/db/changelog/db.changelog-master.yaml b/src/main/resources/db/changelog/db.changelog-master.yaml new file mode 100644 index 00000000..ea0e640f --- /dev/null +++ b/src/main/resources/db/changelog/db.changelog-master.yaml @@ -0,0 +1,31 @@ +databaseChangeLog: + - include: + file: db/changelog/2022-07-28-001-last-row-count.sql + - include: + file: db/changelog/2022-07-28-002-int-to-var.sql + - include: + file: db/changelog/2022-07-28-003-random-in-range.sql + - include: + file: db/changelog/2022-07-28-004-uuid-ossp-extension.sql + - include: + file: db/changelog/2022-07-28-005-rbac-base.sql + - include: + file: db/changelog/2022-07-28-020-rbac-role-builder.sql + - include: + file: db/changelog/2022-07-28-030-rbac-statistics.sql + - include: + file: db/changelog/2022-07-29-050-hs-base.sql + - include: + file: db/changelog/2022-07-29-060-hs-customer.sql + - include: + file: db/changelog/2022-07-29-061-hs-customer-rbac.sql + - include: + file: db/changelog/2022-07-29-062-hs-customer-test-data.sql + - include: + file: db/changelog/2022-07-29-070-hs-package.sql + - include: + file: db/changelog/2022-07-29-070-hs-package-rbac.sql + - include: + file: db/changelog/2022-07-29-070-hs-package-test-data.sql + + diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties deleted file mode 100644 index d387d6bc..00000000 --- a/src/main/resources/i18n/messages.properties +++ /dev/null @@ -1,21 +0,0 @@ -# Error page -error.title=Your request cannot be processed -error.subtitle=Sorry, an error has occurred. -error.status=Status: -error.message=Message: - -# Activation email -email.activation.title=hsadminNg account activation -email.activation.greeting=Dear {0} -email.activation.text1=Your hsadminNg account has been created, please click on the URL below to activate it: -email.activation.text2=Regards, -email.signature=hsadminNg Team. - -# Creation email -email.creation.text1=Your hsadminNg account has been created, please click on the URL below to access it: - -# Reset email -email.reset.title=hsadminNg password reset -email.reset.greeting=Dear {0} -email.reset.text1=For your hsadminNg account a password reset was requested, please click on the URL below to reset it: -email.reset.text2=Regards, diff --git a/src/main/resources/i18n/messages_de.properties b/src/main/resources/i18n/messages_de.properties deleted file mode 100644 index ae2a4968..00000000 --- a/src/main/resources/i18n/messages_de.properties +++ /dev/null @@ -1,21 +0,0 @@ -# Error page -error.title=Ihre Anfrage kann nicht bearbeitet werden -error.subtitle=Verzeihung, ein Fehler ist aufgetreten. -error.status=Status: -error.message=Meldung: - -# Activation email -email.activation.title=hsadminNg Aktivierung -email.activation.greeting=Liebe(r) {0} -email.activation.text1=Ihr hsadminNg Zugang wurde angelegt, bitte klicken Sie unten auf den Link, um diesen zu aktivieren: -email.activation.text2=Grüße, -email.signature=hsadminNg. - -# Creation email -email.creation.text1=Ihr hsadminNg Zugang wurde angelegt, bitte klicken Sie auf den Link um sich anzumelden: - -# Reset email -email.reset.title=hsadminNg Passwort zurücksetzen -email.reset.greeting=Liebe(r) {0} -email.reset.text1=Für Ihren hsadminNg Account wurde ein neues Passwort angefordert, bitte klicken Sie unten auf den Link, um das Passwort zurückzusetzen: -email.reset.text2=Grüße, diff --git a/src/main/resources/i18n/messages_en.properties b/src/main/resources/i18n/messages_en.properties deleted file mode 100644 index d387d6bc..00000000 --- a/src/main/resources/i18n/messages_en.properties +++ /dev/null @@ -1,21 +0,0 @@ -# Error page -error.title=Your request cannot be processed -error.subtitle=Sorry, an error has occurred. -error.status=Status: -error.message=Message: - -# Activation email -email.activation.title=hsadminNg account activation -email.activation.greeting=Dear {0} -email.activation.text1=Your hsadminNg account has been created, please click on the URL below to activate it: -email.activation.text2=Regards, -email.signature=hsadminNg Team. - -# Creation email -email.creation.text1=Your hsadminNg account has been created, please click on the URL below to access it: - -# Reset email -email.reset.title=hsadminNg password reset -email.reset.greeting=Dear {0} -email.reset.text1=For your hsadminNg account a password reset was requested, please click on the URL below to reset it: -email.reset.text2=Regards, diff --git a/src/main/resources/idea.gdsl b/src/main/resources/idea.gdsl deleted file mode 100644 index dfe6b536..00000000 --- a/src/main/resources/idea.gdsl +++ /dev/null @@ -1,90 +0,0 @@ -// Jenkinsfile completions for Intellij IDEA - -def ctx = context(scope: scriptScope()) -contributor(ctx) { - method(name: 'build', type: 'Object', params: [job:'java.lang.String'], doc: 'Build a job') - method(name: 'build', type: 'Object', namedParams: [parameter(name: 'job', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'propagate', type: 'boolean'), parameter(name: 'quietPeriod', type: 'java.lang.Integer'), parameter(name: 'wait', type: 'boolean'), ], doc: 'Build a job') - method(name: 'echo', type: 'Object', params: [message:'java.lang.String'], doc: 'Print Message') - method(name: 'emailext', type: 'Object', namedParams: [parameter(name: 'subject', type: 'java.lang.String'), parameter(name: 'body', type: 'java.lang.String'), parameter(name: 'attachLog', type: 'boolean'), parameter(name: 'attachmentsPattern', type: 'java.lang.String'), parameter(name: 'compressLog', type: 'boolean'), parameter(name: 'mimeType', type: 'java.lang.String'), parameter(name: 'recipientProviders', type: 'Map'), parameter(name: 'replyTo', type: 'java.lang.String'), parameter(name: 'to', type: 'java.lang.String'), ], doc: 'Extended Email') - method(name: 'emailextrecipients', type: 'Object', params: [recipientProviders:'Map'], doc: 'Extended Email Recipients') - method(name: 'error', type: 'Object', params: [message:'java.lang.String'], doc: 'Error signal') - method(name: 'input', type: 'Object', params: [message:'java.lang.String'], doc: 'Wait for interactive input') - method(name: 'input', type: 'Object', namedParams: [parameter(name: 'message', type: 'java.lang.String'), parameter(name: 'id', type: 'java.lang.String'), parameter(name: 'ok', type: 'java.lang.String'), parameter(name: 'parameters', type: 'Map'), parameter(name: 'submitter', type: 'java.lang.String'), parameter(name: 'submitterParameter', type: 'java.lang.String'), ], doc: 'Wait for interactive input') - method(name: 'isUnix', type: 'Object', params: [:], doc: 'Checks if running on a Unix-like node') - method(name: 'library', type: 'Object', params: [identifier:'java.lang.String'], doc: 'Load a shared library on the fly') - method(name: 'library', type: 'Object', namedParams: [parameter(name: 'identifier', type: 'java.lang.String'), parameter(name: 'retriever', type: 'Map'), ], doc: 'Load a shared library on the fly') - method(name: 'libraryResource', type: 'Object', params: [resource:'java.lang.String'], doc: 'Load a resource file from a shared library') - method(name: 'mail', type: 'Object', namedParams: [parameter(name: 'subject', type: 'java.lang.String'), parameter(name: 'body', type: 'java.lang.String'), parameter(name: 'bcc', type: 'java.lang.String'), parameter(name: 'cc', type: 'java.lang.String'), parameter(name: 'charset', type: 'java.lang.String'), parameter(name: 'from', type: 'java.lang.String'), parameter(name: 'mimeType', type: 'java.lang.String'), parameter(name: 'replyTo', type: 'java.lang.String'), parameter(name: 'to', type: 'java.lang.String'), ], doc: 'Mail') - method(name: 'milestone', type: 'Object', params: [ordinal:'java.lang.Integer'], doc: 'The milestone step forces all builds to go through in order') - method(name: 'milestone', type: 'Object', namedParams: [parameter(name: 'ordinal', type: 'java.lang.Integer'), parameter(name: 'label', type: 'java.lang.String'), ], doc: 'The milestone step forces all builds to go through in order') - method(name: 'properties', type: 'Object', params: [properties:'Map'], doc: 'Set job properties') - method(name: 'readTrusted', type: 'Object', params: [path:'java.lang.String'], doc: 'Read trusted file from SCM') - method(name: 'resolveScm', type: 'Object', namedParams: [parameter(name: 'source', type: 'Map'), parameter(name: 'targets', type: 'Map'), parameter(name: 'ignoreErrors', type: 'boolean'), ], doc: 'Resolves an SCM from an SCM Source and a list of candidate target branch names') - method(name: 'retry', type: 'Object', params: [count:int, body:'Closure'], doc: 'Retry the body up to N times') - method(name: 'script', type: 'Object', params: [body:'Closure'], doc: 'Run arbitrary Pipeline script') - method(name: 'sleep', type: 'Object', params: [time:'int'], doc: 'Sleep') - method(name: 'sleep', type: 'Object', namedParams: [parameter(name: 'time', type: 'int'), parameter(name: 'unit', type: 'java.util.concurrent.TimeUnit'), ], doc: 'Sleep') - method(name: 'stage', type: 'Object', params: [name:java.lang.String, body:'Closure'], doc: 'Stage') - method(name: 'stage', type: 'Object', params: [body:Closure], namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'concurrency', type: 'java.lang.Integer'), ], doc: 'Stage') - method(name: 'timeout', type: 'Object', params: [time:int, body:'Closure'], doc: 'Enforce time limit') - method(name: 'timeout', type: 'Object', params: [body:Closure], namedParams: [parameter(name: 'time', type: 'int'), parameter(name: 'unit', type: 'java.util.concurrent.TimeUnit'), ], doc: 'Enforce time limit') - method(name: 'timestamps', type: 'Object', params: [body:'Closure'], doc: 'Timestamps') - method(name: 'tool', type: 'Object', params: [name:'java.lang.String'], doc: 'Use a tool from a predefined Tool Installation') - method(name: 'tool', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'type', type: 'java.lang.String'), ], doc: 'Use a tool from a predefined Tool Installation') - method(name: 'waitUntil', type: 'Object', params: [body:'Closure'], doc: 'Wait for condition') - method(name: 'withEnv', type: 'Object', params: [overrides:Map, body:'Closure'], doc: 'Set environment variables') - method(name: 'ws', type: 'Object', params: [dir:java.lang.String, body:'Closure'], doc: 'Allocate workspace') - method(name: 'catchError', type: 'Object', params: [body:'Closure'], doc: 'Advanced/Deprecated Catch error and set build result') - method(name: 'dockerFingerprintRun', type: 'Object', params: [containerId:'java.lang.String'], doc: 'Advanced/Deprecated Record trace of a Docker image run in a container') - method(name: 'dockerFingerprintRun', type: 'Object', namedParams: [parameter(name: 'containerId', type: 'java.lang.String'), parameter(name: 'toolName', type: 'java.lang.String'), ], doc: 'Record trace of a Docker image run in a container') - method(name: 'envVarsForTool', type: 'Object', namedParams: [parameter(name: 'toolId', type: 'java.lang.String'), parameter(name: 'toolVersion', type: 'java.lang.String'), ], doc: 'Fetches the environment variables for a given tool in a list of \'FOO=bar\' strings suitable for the withEnv step.') - method(name: 'getContext', type: 'Object', params: [type:'Map'], doc: 'Advanced/Deprecated Get contextual object from internal APIs') - method(name: 'withContext', type: 'Object', params: [context:java.lang.Object, body:'Closure'], doc: 'Advanced/Deprecated Use contextual object from internal APIs within a block') - property(name: 'docker', type: 'org.jenkinsci.plugins.docker.workflow.DockerDSL') - property(name: 'pipeline', type: 'org.jenkinsci.plugins.pipeline.modeldefinition.ModelStepLoader') - property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder') - property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable') - property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder') - property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar') -} -//Steps that require a node context -def nodeCtx = context(scope: closureScope()) -contributor(nodeCtx) { - def call = enclosingCall('node') - if (call) { - method(name: 'bat', type: 'Object', params: [script:'java.lang.String'], doc: 'Windows Batch Script') - method(name: 'bat', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'), ], doc: 'Windows Batch Script') - method(name: 'checkout', type: 'Object', params: [scm:'Map'], doc: 'General SCM') - method(name: 'checkout', type: 'Object', namedParams: [parameter(name: 'scm', type: 'Map'), parameter(name: 'changelog', type: 'boolean'), parameter(name: 'poll', type: 'boolean'), ], doc: 'General SCM') - method(name: 'deleteDir', type: 'Object', params: [:], doc: 'Recursively delete the current directory from the workspace') - method(name: 'dir', type: 'Object', params: [path:java.lang.String, body:'Closure'], doc: 'Change current directory') - method(name: 'fileExists', type: 'Object', params: [file:'java.lang.String'], doc: 'Verify if file exists in workspace') - method(name: 'git', type: 'Object', params: [url:'java.lang.String'], doc: 'Git') - method(name: 'git', type: 'Object', namedParams: [parameter(name: 'url', type: 'java.lang.String'), parameter(name: 'branch', type: 'java.lang.String'), parameter(name: 'changelog', type: 'boolean'), parameter(name: 'credentialsId', type: 'java.lang.String'), parameter(name: 'poll', type: 'boolean'), ], doc: 'Git') - method(name: 'load', type: 'Object', params: [path:'java.lang.String'], doc: 'Evaluate a Groovy source file into the Pipeline script') - method(name: 'pwd', type: 'Object', params: [:], doc: 'Determine current directory') - method(name: 'pwd', type: 'Object', namedParams: [parameter(name: 'tmp', type: 'boolean'), ], doc: 'Determine current directory') - method(name: 'readFile', type: 'Object', params: [file:'java.lang.String'], doc: 'Read file from workspace') - method(name: 'readFile', type: 'Object', namedParams: [parameter(name: 'file', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), ], doc: 'Read file from workspace') - method(name: 'sh', type: 'Object', params: [script:'java.lang.String'], doc: 'Shell Script') - method(name: 'sh', type: 'Object', namedParams: [parameter(name: 'script', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), parameter(name: 'returnStatus', type: 'boolean'), parameter(name: 'returnStdout', type: 'boolean'), ], doc: 'Shell Script') - method(name: 'stash', type: 'Object', params: [name:'java.lang.String'], doc: 'Stash some files to be used later in the build') - method(name: 'stash', type: 'Object', namedParams: [parameter(name: 'name', type: 'java.lang.String'), parameter(name: 'excludes', type: 'java.lang.String'), parameter(name: 'includes', type: 'java.lang.String'), parameter(name: 'useDefaultExcludes', type: 'boolean'), ], doc: 'Stash some files to be used later in the build') - method(name: 'step', type: 'Object', params: [delegate:'Map'], doc: 'General Build Step') - method(name: 'svn', type: 'Object', params: [url:'java.lang.String'], doc: 'Subversion') - method(name: 'svn', type: 'Object', namedParams: [parameter(name: 'url', type: 'java.lang.String'), parameter(name: 'changelog', type: 'boolean'), parameter(name: 'poll', type: 'boolean'), ], doc: 'Subversion') - method(name: 'unstash', type: 'Object', params: [name:'java.lang.String'], doc: 'Restore files previously stashed') - method(name: 'withCredentials', type: 'Object', params: [bindings:Map, body:'Closure'], doc: 'Bind credentials to variables') - method(name: 'wrap', type: 'Object', params: [delegate:Map, body:'Closure'], doc: 'General Build Wrapper') - method(name: 'writeFile', type: 'Object', namedParams: [parameter(name: 'file', type: 'java.lang.String'), parameter(name: 'text', type: 'java.lang.String'), parameter(name: 'encoding', type: 'java.lang.String'), ], doc: 'Write file to workspace') - method(name: 'archive', type: 'Object', params: [includes:'java.lang.String'], doc: 'Advanced/Deprecated Archive artifacts') - method(name: 'archive', type: 'Object', namedParams: [parameter(name: 'includes', type: 'java.lang.String'), parameter(name: 'excludes', type: 'java.lang.String'), ], doc: 'Archive artifacts') - method(name: 'dockerFingerprintFrom', type: 'Object', namedParams: [parameter(name: 'dockerfile', type: 'java.lang.String'), parameter(name: 'image', type: 'java.lang.String'), parameter(name: 'toolName', type: 'java.lang.String'), ], doc: 'Record trace of a Docker image used in FROM') - method(name: 'unarchive', type: 'Object', params: [:], doc: 'Advanced/Deprecated Copy archived artifacts into the workspace') - method(name: 'unarchive', type: 'Object', namedParams: [parameter(name: 'mapping', type: 'Map'), ], doc: 'Copy archived artifacts into the workspace') - method(name: 'withDockerContainer', type: 'Object', params: [image:java.lang.String, body:'Closure'], doc: 'Advanced/Deprecated Run build steps inside a Docker container') - method(name: 'withDockerContainer', type: 'Object', params: [body:Closure], namedParams: [parameter(name: 'image', type: 'java.lang.String'), parameter(name: 'args', type: 'java.lang.String'), parameter(name: 'toolName', type: 'java.lang.String'), ], doc: 'Run build steps inside a Docker container') - method(name: 'withDockerRegistry', type: 'Object', params: [registry:Map, body:'Closure'], doc: 'Advanced/Deprecated Sets up Docker registry endpoint') - method(name: 'withDockerServer', type: 'Object', params: [server:Map, body:'Closure'], doc: 'Advanced/Deprecated Sets up Docker server endpoint') - } -} diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml deleted file mode 100644 index e82256df..00000000 --- a/src/main/resources/logback-spring.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - diff --git a/src/main/resources/swagger/api.yml b/src/main/resources/swagger/api.yml deleted file mode 100644 index fc271ea0..00000000 --- a/src/main/resources/swagger/api.yml +++ /dev/null @@ -1,7 +0,0 @@ -# API-first development with OpenAPI -# This file will be used at compile time to generate Spring-MVC endpoint stubs using openapi-generator -openapi: "3.0.1" -info: - title: "hsadminNg" - version: 0.0.1 -paths: {} \ No newline at end of file diff --git a/src/main/resources/templates/error.html b/src/main/resources/templates/error.html deleted file mode 100644 index 08616bcf..00000000 --- a/src/main/resources/templates/error.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - Your request cannot be processed - - - -

-

Your request cannot be processed :(

- -

Sorry, an error has occurred.

- - Status:  ()
- - Message: 
-
- - - -
- - diff --git a/src/main/resources/templates/mail/activationEmail.html b/src/main/resources/templates/mail/activationEmail.html deleted file mode 100644 index cb021d8e..00000000 --- a/src/main/resources/templates/mail/activationEmail.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - JHipster activation - - - - -

- Dear -

-

- Your JHipster account has been created, please click on the URL below to activate it: -

-

- Activation link -

-

- Regards, -
- JHipster. -

- - diff --git a/src/main/resources/templates/mail/creationEmail.html b/src/main/resources/templates/mail/creationEmail.html deleted file mode 100644 index dc0cff58..00000000 --- a/src/main/resources/templates/mail/creationEmail.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - JHipster creation - - - - -

- Dear -

-

- Your JHipster account has been created, please click on the URL below to access it: -

-

- Login link -

-

- Regards, -
- JHipster. -

- - diff --git a/src/main/resources/templates/mail/passwordResetEmail.html b/src/main/resources/templates/mail/passwordResetEmail.html deleted file mode 100644 index f4451126..00000000 --- a/src/main/resources/templates/mail/passwordResetEmail.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - JHipster password reset - - - - -

- Dear -

-

- For your JHipster account a password reset was requested, please click on the URL below to reset it: -

-

- Login link -

-

- Regards, -
- JHipster. -

- - diff --git a/src/main/webapp/404.html b/src/main/webapp/404.html deleted file mode 100644 index 086998e1..00000000 --- a/src/main/webapp/404.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Page Not Found - - - - - -

Page Not Found

-

Sorry, but the page you were trying to view does not exist.

- - - diff --git a/src/main/webapp/app/account/account.module.ts b/src/main/webapp/app/account/account.module.ts deleted file mode 100644 index 9731312c..00000000 --- a/src/main/webapp/app/account/account.module.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { HsadminNgSharedModule } from 'app/shared'; - -import { - PasswordStrengthBarComponent, - RegisterComponent, - ActivateComponent, - PasswordComponent, - PasswordResetInitComponent, - PasswordResetFinishComponent, - SettingsComponent, - accountState -} from './'; - -@NgModule({ - imports: [HsadminNgSharedModule, RouterModule.forChild(accountState)], - declarations: [ - ActivateComponent, - RegisterComponent, - PasswordComponent, - PasswordStrengthBarComponent, - PasswordResetInitComponent, - PasswordResetFinishComponent, - SettingsComponent - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class HsadminNgAccountModule {} diff --git a/src/main/webapp/app/account/account.route.ts b/src/main/webapp/app/account/account.route.ts deleted file mode 100644 index f849342e..00000000 --- a/src/main/webapp/app/account/account.route.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Routes } from '@angular/router'; - -import { activateRoute, passwordRoute, passwordResetFinishRoute, passwordResetInitRoute, registerRoute, settingsRoute } from './'; - -const ACCOUNT_ROUTES = [activateRoute, passwordRoute, passwordResetFinishRoute, passwordResetInitRoute, registerRoute, settingsRoute]; - -export const accountState: Routes = [ - { - path: '', - children: ACCOUNT_ROUTES - } -]; diff --git a/src/main/webapp/app/account/activate/activate.component.html b/src/main/webapp/app/account/activate/activate.component.html deleted file mode 100644 index 6a28eef7..00000000 --- a/src/main/webapp/app/account/activate/activate.component.html +++ /dev/null @@ -1,17 +0,0 @@ -
-
-
-

Activation

- -
- Your user account has been activated. Please - sign in. -
- -
- Your user could not be activated. Please use the registration form to sign up. -
- -
-
-
diff --git a/src/main/webapp/app/account/activate/activate.component.ts b/src/main/webapp/app/account/activate/activate.component.ts deleted file mode 100644 index 5c398073..00000000 --- a/src/main/webapp/app/account/activate/activate.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { ActivatedRoute } from '@angular/router'; - -import { LoginModalService } from 'app/core'; -import { ActivateService } from './activate.service'; - -@Component({ - selector: 'jhi-activate', - templateUrl: './activate.component.html' -}) -export class ActivateComponent implements OnInit { - error: string; - success: string; - modalRef: NgbModalRef; - - constructor(private activateService: ActivateService, private loginModalService: LoginModalService, private route: ActivatedRoute) {} - - ngOnInit() { - this.route.queryParams.subscribe(params => { - this.activateService.get(params['key']).subscribe( - () => { - this.error = null; - this.success = 'OK'; - }, - () => { - this.success = null; - this.error = 'ERROR'; - } - ); - }); - } - - login() { - this.modalRef = this.loginModalService.open(); - } -} diff --git a/src/main/webapp/app/account/activate/activate.route.ts b/src/main/webapp/app/account/activate/activate.route.ts deleted file mode 100644 index 524e332d..00000000 --- a/src/main/webapp/app/account/activate/activate.route.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Route } from '@angular/router'; - -import { ActivateComponent } from './activate.component'; - -export const activateRoute: Route = { - path: 'activate', - component: ActivateComponent, - data: { - authorities: [], - pageTitle: 'activate.title' - } -}; diff --git a/src/main/webapp/app/account/activate/activate.service.ts b/src/main/webapp/app/account/activate/activate.service.ts deleted file mode 100644 index adade9ef..00000000 --- a/src/main/webapp/app/account/activate/activate.service.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpParams } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -import { SERVER_API_URL } from 'app/app.constants'; - -@Injectable({ providedIn: 'root' }) -export class ActivateService { - constructor(private http: HttpClient) {} - - get(key: string): Observable { - return this.http.get(SERVER_API_URL + 'api/activate', { - params: new HttpParams().set('key', key) - }); - } -} diff --git a/src/main/webapp/app/account/index.ts b/src/main/webapp/app/account/index.ts deleted file mode 100644 index aeada055..00000000 --- a/src/main/webapp/app/account/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -export * from './activate/activate.component'; -export * from './activate/activate.service'; -export * from './activate/activate.route'; -export * from './password/password.component'; -export * from './password/password-strength-bar.component'; -export * from './password/password.service'; -export * from './password/password.route'; -export * from './password-reset/finish/password-reset-finish.component'; -export * from './password-reset/finish/password-reset-finish.service'; -export * from './password-reset/finish/password-reset-finish.route'; -export * from './password-reset/init/password-reset-init.component'; -export * from './password-reset/init/password-reset-init.service'; -export * from './password-reset/init/password-reset-init.route'; -export * from './register/register.component'; -export * from './register/register.service'; -export * from './register/register.route'; -export * from './settings/settings.component'; -export * from './settings/settings.route'; -export * from './account.route'; diff --git a/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.html b/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.html deleted file mode 100644 index bcbc9111..00000000 --- a/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.html +++ /dev/null @@ -1,77 +0,0 @@ -
-
-
-

Reset password

- -
- The password reset key is missing. -
- -
-

Choose a new password

-
- -
-

Your password couldn't be reset. Remember a password request is only valid for 24 hours.

-
- -

- Your password has been reset. Please - sign in. -

- -
- The password and its confirmation do not match! -
- -
-
-
- - -
- - Your password is required. - - - Your password is required to be at least 4 characters. - - - Your password cannot be longer than 50 characters. - -
- -
- -
- - -
- - Your password confirmation is required. - - - Your password confirmation is required to be at least 4 characters. - - - Your password confirmation cannot be longer than 50 characters. - -
-
- -
-
- -
-
-
diff --git a/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.ts b/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.ts deleted file mode 100644 index 72aac25c..00000000 --- a/src/main/webapp/app/account/password-reset/finish/password-reset-finish.component.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Component, OnInit, AfterViewInit, Renderer, ElementRef } from '@angular/core'; -import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { ActivatedRoute } from '@angular/router'; - -import { LoginModalService } from 'app/core'; -import { PasswordResetFinishService } from './password-reset-finish.service'; - -@Component({ - selector: 'jhi-password-reset-finish', - templateUrl: './password-reset-finish.component.html' -}) -export class PasswordResetFinishComponent implements OnInit, AfterViewInit { - confirmPassword: string; - doNotMatch: string; - error: string; - keyMissing: boolean; - resetAccount: any; - success: string; - modalRef: NgbModalRef; - key: string; - - constructor( - private passwordResetFinishService: PasswordResetFinishService, - private loginModalService: LoginModalService, - private route: ActivatedRoute, - private elementRef: ElementRef, - private renderer: Renderer - ) {} - - ngOnInit() { - this.route.queryParams.subscribe(params => { - this.key = params['key']; - }); - this.resetAccount = {}; - this.keyMissing = !this.key; - } - - ngAfterViewInit() { - if (this.elementRef.nativeElement.querySelector('#password') != null) { - this.renderer.invokeElementMethod(this.elementRef.nativeElement.querySelector('#password'), 'focus', []); - } - } - - finishReset() { - this.doNotMatch = null; - this.error = null; - if (this.resetAccount.password !== this.confirmPassword) { - this.doNotMatch = 'ERROR'; - } else { - this.passwordResetFinishService.save({ key: this.key, newPassword: this.resetAccount.password }).subscribe( - () => { - this.success = 'OK'; - }, - () => { - this.success = null; - this.error = 'ERROR'; - } - ); - } - } - - login() { - this.modalRef = this.loginModalService.open(); - } -} diff --git a/src/main/webapp/app/account/password-reset/finish/password-reset-finish.route.ts b/src/main/webapp/app/account/password-reset/finish/password-reset-finish.route.ts deleted file mode 100644 index 686cb972..00000000 --- a/src/main/webapp/app/account/password-reset/finish/password-reset-finish.route.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Route } from '@angular/router'; - -import { PasswordResetFinishComponent } from './password-reset-finish.component'; - -export const passwordResetFinishRoute: Route = { - path: 'reset/finish', - component: PasswordResetFinishComponent, - data: { - authorities: [], - pageTitle: 'global.menu.account.password' - } -}; diff --git a/src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.ts b/src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.ts deleted file mode 100644 index 706bdaa5..00000000 --- a/src/main/webapp/app/account/password-reset/finish/password-reset-finish.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -import { SERVER_API_URL } from 'app/app.constants'; - -@Injectable({ providedIn: 'root' }) -export class PasswordResetFinishService { - constructor(private http: HttpClient) {} - - save(keyAndPassword: any): Observable { - return this.http.post(SERVER_API_URL + 'api/account/reset-password/finish', keyAndPassword); - } -} diff --git a/src/main/webapp/app/account/password-reset/init/password-reset-init.component.html b/src/main/webapp/app/account/password-reset/init/password-reset-init.component.html deleted file mode 100644 index 8f42e600..00000000 --- a/src/main/webapp/app/account/password-reset/init/password-reset-init.component.html +++ /dev/null @@ -1,46 +0,0 @@ -
-
-
-

Reset your password

- -
- Email address isn't registered! Please check and try again. -
- -
-

Enter the email address you used to register.

-
- -
-

Check your emails for details on how to reset your password.

-
- -
-
- - -
- - Your email is required. - - - Your email is invalid. - - - Your email is required to be at least 5 characters. - - - Your email cannot be longer than 100 characters. - -
-
- -
-
-
-
diff --git a/src/main/webapp/app/account/password-reset/init/password-reset-init.component.ts b/src/main/webapp/app/account/password-reset/init/password-reset-init.component.ts deleted file mode 100644 index e3261734..00000000 --- a/src/main/webapp/app/account/password-reset/init/password-reset-init.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Component, OnInit, AfterViewInit, Renderer, ElementRef } from '@angular/core'; -import { EMAIL_NOT_FOUND_TYPE } from 'app/shared'; -import { PasswordResetInitService } from './password-reset-init.service'; - -@Component({ - selector: 'jhi-password-reset-init', - templateUrl: './password-reset-init.component.html' -}) -export class PasswordResetInitComponent implements OnInit, AfterViewInit { - error: string; - errorEmailNotExists: string; - resetAccount: any; - success: string; - - constructor(private passwordResetInitService: PasswordResetInitService, private elementRef: ElementRef, private renderer: Renderer) {} - - ngOnInit() { - this.resetAccount = {}; - } - - ngAfterViewInit() { - this.renderer.invokeElementMethod(this.elementRef.nativeElement.querySelector('#email'), 'focus', []); - } - - requestReset() { - this.error = null; - this.errorEmailNotExists = null; - - this.passwordResetInitService.save(this.resetAccount.email).subscribe( - () => { - this.success = 'OK'; - }, - response => { - this.success = null; - if (response.status === 400 && response.error.type === EMAIL_NOT_FOUND_TYPE) { - this.errorEmailNotExists = 'ERROR'; - } else { - this.error = 'ERROR'; - } - } - ); - } -} diff --git a/src/main/webapp/app/account/password-reset/init/password-reset-init.route.ts b/src/main/webapp/app/account/password-reset/init/password-reset-init.route.ts deleted file mode 100644 index 6d7da08c..00000000 --- a/src/main/webapp/app/account/password-reset/init/password-reset-init.route.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Route } from '@angular/router'; - -import { PasswordResetInitComponent } from './password-reset-init.component'; - -export const passwordResetInitRoute: Route = { - path: 'reset/request', - component: PasswordResetInitComponent, - data: { - authorities: [], - pageTitle: 'global.menu.account.password' - } -}; diff --git a/src/main/webapp/app/account/password-reset/init/password-reset-init.service.ts b/src/main/webapp/app/account/password-reset/init/password-reset-init.service.ts deleted file mode 100644 index c24ccf94..00000000 --- a/src/main/webapp/app/account/password-reset/init/password-reset-init.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -import { SERVER_API_URL } from 'app/app.constants'; - -@Injectable({ providedIn: 'root' }) -export class PasswordResetInitService { - constructor(private http: HttpClient) {} - - save(mail: string): Observable { - return this.http.post(SERVER_API_URL + 'api/account/reset-password/init', mail); - } -} diff --git a/src/main/webapp/app/account/password/password-strength-bar.component.ts b/src/main/webapp/app/account/password/password-strength-bar.component.ts deleted file mode 100644 index 19f33019..00000000 --- a/src/main/webapp/app/account/password/password-strength-bar.component.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { Component, ElementRef, Input, Renderer } from '@angular/core'; - -@Component({ - selector: 'jhi-password-strength-bar', - template: ` -
- Password strength: -
    -
  • -
  • -
  • -
  • -
  • -
-
- `, - styleUrls: ['password-strength-bar.css'] -}) -export class PasswordStrengthBarComponent { - colors = ['#F00', '#F90', '#FF0', '#9F0', '#0F0']; - - constructor(private renderer: Renderer, private elementRef: ElementRef) {} - - measureStrength(p: string): number { - let force = 0; - const regex = /[$-/:-?{-~!"^_`\[\]]/g; // " - const lowerLetters = /[a-z]+/.test(p); - const upperLetters = /[A-Z]+/.test(p); - const numbers = /[0-9]+/.test(p); - const symbols = regex.test(p); - - const flags = [lowerLetters, upperLetters, numbers, symbols]; - const passedMatches = flags.filter((isMatchedFlag: boolean) => { - return isMatchedFlag === true; - }).length; - - force += 2 * p.length + (p.length >= 10 ? 1 : 0); - force += passedMatches * 10; - - // penalty (short password) - force = p.length <= 6 ? Math.min(force, 10) : force; - - // penalty (poor variety of characters) - force = passedMatches === 1 ? Math.min(force, 10) : force; - force = passedMatches === 2 ? Math.min(force, 20) : force; - force = passedMatches === 3 ? Math.min(force, 40) : force; - - return force; - } - - getColor(s: number): any { - let idx = 0; - if (s <= 10) { - idx = 0; - } else if (s <= 20) { - idx = 1; - } else if (s <= 30) { - idx = 2; - } else if (s <= 40) { - idx = 3; - } else { - idx = 4; - } - return { idx: idx + 1, col: this.colors[idx] }; - } - - @Input() - set passwordToCheck(password: string) { - if (password) { - const c = this.getColor(this.measureStrength(password)); - const element = this.elementRef.nativeElement; - if (element.className) { - this.renderer.setElementClass(element, element.className, false); - } - const lis = element.getElementsByTagName('li'); - for (let i = 0; i < lis.length; i++) { - if (i < c.idx) { - this.renderer.setElementStyle(lis[i], 'backgroundColor', c.col); - } else { - this.renderer.setElementStyle(lis[i], 'backgroundColor', '#DDD'); - } - } - } - } -} diff --git a/src/main/webapp/app/account/password/password-strength-bar.css b/src/main/webapp/app/account/password/password-strength-bar.css deleted file mode 100644 index b6ad1fa6..00000000 --- a/src/main/webapp/app/account/password/password-strength-bar.css +++ /dev/null @@ -1,24 +0,0 @@ -/* ========================================================================== -start Password strength bar style -========================================================================== */ -ul#strengthBar { - display: inline; - list-style: none; - margin: 0; - margin-left: 15px; - padding: 0; - vertical-align: 2px; -} - -.point { - background: #ddd; - border-radius: 2px; - display: inline-block; - height: 5px; - margin-right: 1px; - width: 20px; -} - -.point:last-child { - margin: 0 !important; -} diff --git a/src/main/webapp/app/account/password/password.component.html b/src/main/webapp/app/account/password/password.component.html deleted file mode 100644 index 6120b905..00000000 --- a/src/main/webapp/app/account/password/password.component.html +++ /dev/null @@ -1,77 +0,0 @@ -
-
-
-

Password for [{{account.login}}]

- -
- Password changed! -
-
- An error has occurred! The password could not be changed. -
- -
- The password and its confirmation do not match! -
- -
- -
- - -
- - Your password is required. - -
-
-
- - -
- - Your password is required. - - - Your password is required to be at least 4 characters. - - - Your password cannot be longer than 50 characters. - -
- -
-
- - -
- - Your confirmation password is required. - - - Your confirmation password is required to be at least 4 characters. - - - Your confirmation password cannot be longer than 50 characters. - -
-
- - -
-
-
-
diff --git a/src/main/webapp/app/account/password/password.component.ts b/src/main/webapp/app/account/password/password.component.ts deleted file mode 100644 index 3004effa..00000000 --- a/src/main/webapp/app/account/password/password.component.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -import { AccountService } from 'app/core'; -import { PasswordService } from './password.service'; - -@Component({ - selector: 'jhi-password', - templateUrl: './password.component.html' -}) -export class PasswordComponent implements OnInit { - doNotMatch: string; - error: string; - success: string; - account: any; - currentPassword: string; - newPassword: string; - confirmPassword: string; - - constructor(private passwordService: PasswordService, private accountService: AccountService) {} - - ngOnInit() { - this.accountService.identity().then(account => { - this.account = account; - }); - } - - changePassword() { - if (this.newPassword !== this.confirmPassword) { - this.error = null; - this.success = null; - this.doNotMatch = 'ERROR'; - } else { - this.doNotMatch = null; - this.passwordService.save(this.newPassword, this.currentPassword).subscribe( - () => { - this.error = null; - this.success = 'OK'; - }, - () => { - this.success = null; - this.error = 'ERROR'; - } - ); - } - } -} diff --git a/src/main/webapp/app/account/password/password.route.ts b/src/main/webapp/app/account/password/password.route.ts deleted file mode 100644 index 2a6ec475..00000000 --- a/src/main/webapp/app/account/password/password.route.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Route } from '@angular/router'; - -import { UserRouteAccessService } from 'app/core'; -import { PasswordComponent } from './password.component'; - -export const passwordRoute: Route = { - path: 'password', - component: PasswordComponent, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'global.menu.account.password' - }, - canActivate: [UserRouteAccessService] -}; diff --git a/src/main/webapp/app/account/password/password.service.ts b/src/main/webapp/app/account/password/password.service.ts deleted file mode 100644 index 028df7b0..00000000 --- a/src/main/webapp/app/account/password/password.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -import { SERVER_API_URL } from 'app/app.constants'; - -@Injectable({ providedIn: 'root' }) -export class PasswordService { - constructor(private http: HttpClient) {} - - save(newPassword: string, currentPassword: string): Observable { - return this.http.post(SERVER_API_URL + 'api/account/change-password', { currentPassword, newPassword }); - } -} diff --git a/src/main/webapp/app/account/register/register.component.html b/src/main/webapp/app/account/register/register.component.html deleted file mode 100644 index fd5c89e2..00000000 --- a/src/main/webapp/app/account/register/register.component.html +++ /dev/null @@ -1,124 +0,0 @@ -
-
-
-

Registration

- -
- Registration saved! Please check your email for confirmation. -
- -
- Registration failed! Please try again later. -
- -
- Login name already registered! Please choose another one. -
- -
- Email is already in use! Please choose another one. -
- -
- The password and its confirmation do not match! -
-
-
-
-
-
-
- - -
- - Your username is required. - - - Your username is required to be at least 1 character. - - - Your username cannot be longer than 50 characters. - - - Your username can only contain letters and digits. - -
-
-
- - -
- - Your email is required. - - - Your email is invalid. - - - Your email is required to be at least 5 characters. - - - Your email cannot be longer than 100 characters. - -
-
-
- - -
- - Your password is required. - - - Your password is required to be at least 4 characters. - - - Your password cannot be longer than 50 characters. - -
- -
-
- - -
- - Your confirmation password is required. - - - Your confirmation password is required to be at least 4 characters. - - - Your confirmation password cannot be longer than 50 characters. - -
-
- - -
-

-
- If you want to - sign in, you can try the default accounts:
- Administrator (login="admin" and password="admin")
- User (login="user" and password="user").
-
-
-
-
diff --git a/src/main/webapp/app/account/register/register.component.ts b/src/main/webapp/app/account/register/register.component.ts deleted file mode 100644 index de97a880..00000000 --- a/src/main/webapp/app/account/register/register.component.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Component, OnInit, AfterViewInit, Renderer, ElementRef } from '@angular/core'; -import { HttpErrorResponse } from '@angular/common/http'; -import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { JhiLanguageService } from 'ng-jhipster'; - -import { EMAIL_ALREADY_USED_TYPE, LOGIN_ALREADY_USED_TYPE } from 'app/shared'; -import { LoginModalService } from 'app/core'; -import { Register } from './register.service'; - -@Component({ - selector: 'jhi-register', - templateUrl: './register.component.html' -}) -export class RegisterComponent implements OnInit, AfterViewInit { - confirmPassword: string; - doNotMatch: string; - error: string; - errorEmailExists: string; - errorUserExists: string; - registerAccount: any; - success: boolean; - modalRef: NgbModalRef; - - constructor( - private languageService: JhiLanguageService, - private loginModalService: LoginModalService, - private registerService: Register, - private elementRef: ElementRef, - private renderer: Renderer - ) {} - - ngOnInit() { - this.success = false; - this.registerAccount = {}; - } - - ngAfterViewInit() { - this.renderer.invokeElementMethod(this.elementRef.nativeElement.querySelector('#login'), 'focus', []); - } - - register() { - if (this.registerAccount.password !== this.confirmPassword) { - this.doNotMatch = 'ERROR'; - } else { - this.doNotMatch = null; - this.error = null; - this.errorUserExists = null; - this.errorEmailExists = null; - this.languageService.getCurrent().then(key => { - this.registerAccount.langKey = key; - this.registerService.save(this.registerAccount).subscribe( - () => { - this.success = true; - }, - response => this.processError(response) - ); - }); - } - } - - openLogin() { - this.modalRef = this.loginModalService.open(); - } - - private processError(response: HttpErrorResponse) { - this.success = null; - if (response.status === 400 && response.error.type === LOGIN_ALREADY_USED_TYPE) { - this.errorUserExists = 'ERROR'; - } else if (response.status === 400 && response.error.type === EMAIL_ALREADY_USED_TYPE) { - this.errorEmailExists = 'ERROR'; - } else { - this.error = 'ERROR'; - } - } -} diff --git a/src/main/webapp/app/account/register/register.route.ts b/src/main/webapp/app/account/register/register.route.ts deleted file mode 100644 index ca834d5d..00000000 --- a/src/main/webapp/app/account/register/register.route.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Route } from '@angular/router'; - -import { RegisterComponent } from './register.component'; - -export const registerRoute: Route = { - path: 'register', - component: RegisterComponent, - data: { - authorities: [], - pageTitle: 'register.title' - } -}; diff --git a/src/main/webapp/app/account/register/register.service.ts b/src/main/webapp/app/account/register/register.service.ts deleted file mode 100644 index dfe6f1da..00000000 --- a/src/main/webapp/app/account/register/register.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -import { SERVER_API_URL } from 'app/app.constants'; - -@Injectable({ providedIn: 'root' }) -export class Register { - constructor(private http: HttpClient) {} - - save(account: any): Observable { - return this.http.post(SERVER_API_URL + 'api/register', account); - } -} diff --git a/src/main/webapp/app/account/settings/settings.component.html b/src/main/webapp/app/account/settings/settings.component.html deleted file mode 100644 index e79860b5..00000000 --- a/src/main/webapp/app/account/settings/settings.component.html +++ /dev/null @@ -1,86 +0,0 @@ -
-
-
-

User settings for [{{settingsAccount.login}}]

- -
- Settings saved! -
- - - -
- -
- - -
- - Your first name is required. - - - Your first name is required to be at least 1 character. - - - Your first name cannot be longer than 50 characters. - -
-
-
- - -
- - Your last name is required. - - - Your last name is required to be at least 1 character. - - - Your last name cannot be longer than 50 characters. - -
-
-
- - -
- - Your email is required. - - - Your email is invalid. - - - Your email is required to be at least 5 characters. - - - Your email cannot be longer than 100 characters. - -
-
-
- - -
- -
-
-
- -
diff --git a/src/main/webapp/app/account/settings/settings.component.ts b/src/main/webapp/app/account/settings/settings.component.ts deleted file mode 100644 index 3d5af649..00000000 --- a/src/main/webapp/app/account/settings/settings.component.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { JhiLanguageService } from 'ng-jhipster'; - -import { AccountService, JhiLanguageHelper } from 'app/core'; - -@Component({ - selector: 'jhi-settings', - templateUrl: './settings.component.html' -}) -export class SettingsComponent implements OnInit { - error: string; - success: string; - settingsAccount: any; - languages: any[]; - - constructor( - private accountService: AccountService, - private languageService: JhiLanguageService, - private languageHelper: JhiLanguageHelper - ) {} - - ngOnInit() { - this.accountService.identity().then(account => { - this.settingsAccount = this.copyAccount(account); - }); - this.languageHelper.getAll().then(languages => { - this.languages = languages; - }); - } - - save() { - this.accountService.save(this.settingsAccount).subscribe( - () => { - this.error = null; - this.success = 'OK'; - this.accountService.identity(true).then(account => { - this.settingsAccount = this.copyAccount(account); - }); - this.languageService.getCurrent().then(current => { - if (this.settingsAccount.langKey !== current) { - this.languageService.changeLanguage(this.settingsAccount.langKey); - } - }); - }, - () => { - this.success = null; - this.error = 'ERROR'; - } - ); - } - - copyAccount(account) { - return { - activated: account.activated, - email: account.email, - firstName: account.firstName, - langKey: account.langKey, - lastName: account.lastName, - login: account.login, - imageUrl: account.imageUrl - }; - } -} diff --git a/src/main/webapp/app/account/settings/settings.route.ts b/src/main/webapp/app/account/settings/settings.route.ts deleted file mode 100644 index 95c2de6e..00000000 --- a/src/main/webapp/app/account/settings/settings.route.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Route } from '@angular/router'; - -import { UserRouteAccessService } from 'app/core'; -import { SettingsComponent } from './settings.component'; - -export const settingsRoute: Route = { - path: 'settings', - component: SettingsComponent, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'global.menu.account.settings' - }, - canActivate: [UserRouteAccessService] -}; diff --git a/src/main/webapp/app/admin/admin.module.ts b/src/main/webapp/app/admin/admin.module.ts deleted file mode 100644 index c430a8f5..00000000 --- a/src/main/webapp/app/admin/admin.module.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { JhiLanguageService } from 'ng-jhipster'; -import { JhiLanguageHelper } from 'app/core'; -import { HsadminNgSharedModule } from 'app/shared'; -/* jhipster-needle-add-admin-module-import - JHipster will add admin modules imports here */ - -import { - adminState, - AuditsComponent, - UserMgmtComponent, - UserMgmtDetailComponent, - UserMgmtUpdateComponent, - UserMgmtDeleteDialogComponent, - LogsComponent, - JhiMetricsMonitoringComponent, - JhiHealthModalComponent, - JhiHealthCheckComponent, - JhiConfigurationComponent, - JhiDocsComponent -} from './'; - -@NgModule({ - imports: [ - HsadminNgSharedModule, - RouterModule.forChild(adminState) - /* jhipster-needle-add-admin-module - JHipster will add admin modules here */ - ], - declarations: [ - AuditsComponent, - UserMgmtComponent, - UserMgmtDetailComponent, - UserMgmtUpdateComponent, - UserMgmtDeleteDialogComponent, - LogsComponent, - JhiConfigurationComponent, - JhiHealthCheckComponent, - JhiHealthModalComponent, - JhiDocsComponent, - JhiMetricsMonitoringComponent - ], - providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }], - entryComponents: [UserMgmtDeleteDialogComponent, JhiHealthModalComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class HsadminNgAdminModule { - constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) { - this.languageHelper.language.subscribe((languageKey: string) => { - if (languageKey !== undefined) { - this.languageService.changeLanguage(languageKey); - } - }); - } -} diff --git a/src/main/webapp/app/admin/admin.route.ts b/src/main/webapp/app/admin/admin.route.ts deleted file mode 100644 index 88c7e575..00000000 --- a/src/main/webapp/app/admin/admin.route.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Routes } from '@angular/router'; - -import { auditsRoute, configurationRoute, docsRoute, healthRoute, logsRoute, metricsRoute, userMgmtRoute } from './'; - -import { UserRouteAccessService } from 'app/core'; - -const ADMIN_ROUTES = [auditsRoute, configurationRoute, docsRoute, healthRoute, logsRoute, ...userMgmtRoute, metricsRoute]; - -export const adminState: Routes = [ - { - path: '', - data: { - authorities: ['ROLE_ADMIN'] - }, - canActivate: [UserRouteAccessService], - children: ADMIN_ROUTES - } -]; diff --git a/src/main/webapp/app/admin/audits/audit-data.model.ts b/src/main/webapp/app/admin/audits/audit-data.model.ts deleted file mode 100644 index a2506c40..00000000 --- a/src/main/webapp/app/admin/audits/audit-data.model.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class AuditData { - constructor(public remoteAddress: string, public sessionId: string) {} -} diff --git a/src/main/webapp/app/admin/audits/audit.model.ts b/src/main/webapp/app/admin/audits/audit.model.ts deleted file mode 100644 index 6497fb44..00000000 --- a/src/main/webapp/app/admin/audits/audit.model.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { AuditData } from './audit-data.model'; - -export class Audit { - constructor(public data: AuditData, public principal: string, public timestamp: string, public type: string) {} -} diff --git a/src/main/webapp/app/admin/audits/audits.component.html b/src/main/webapp/app/admin/audits/audits.component.html deleted file mode 100644 index e55799e9..00000000 --- a/src/main/webapp/app/admin/audits/audits.component.html +++ /dev/null @@ -1,52 +0,0 @@ -
-

Audits

- -
-
-

Filter by date

-
-
- from -
- - -
- To -
- -
-
-
- -
- - - - - - - - - - - - - - - - - -
DateUserStateExtra data
{{audit.timestamp| date:'medium'}}{{audit.principal}}{{audit.type}} - {{audit.data.message}} - Remote Address {{audit.data.remoteAddress}} -
-
-
-
- -
-
- -
-
-
diff --git a/src/main/webapp/app/admin/audits/audits.component.ts b/src/main/webapp/app/admin/audits/audits.component.ts deleted file mode 100644 index 21739275..00000000 --- a/src/main/webapp/app/admin/audits/audits.component.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { HttpResponse } from '@angular/common/http'; -import { DatePipe } from '@angular/common'; -import { ActivatedRoute, Router } from '@angular/router'; -import { JhiParseLinks, JhiAlertService } from 'ng-jhipster'; - -import { ITEMS_PER_PAGE } from 'app/shared'; -import { Audit } from './audit.model'; -import { AuditsService } from './audits.service'; - -@Component({ - selector: 'jhi-audit', - templateUrl: './audits.component.html' -}) -export class AuditsComponent implements OnInit, OnDestroy { - audits: Audit[]; - fromDate: string; - itemsPerPage: any; - links: any; - page: number; - routeData: any; - predicate: any; - previousPage: any; - reverse: boolean; - toDate: string; - totalItems: number; - - constructor( - private auditsService: AuditsService, - private alertService: JhiAlertService, - private parseLinks: JhiParseLinks, - private activatedRoute: ActivatedRoute, - private datePipe: DatePipe, - private router: Router - ) { - this.itemsPerPage = ITEMS_PER_PAGE; - this.routeData = this.activatedRoute.data.subscribe(data => { - this.page = data['pagingParams'].page; - this.previousPage = data['pagingParams'].page; - this.reverse = data['pagingParams'].ascending; - this.predicate = data['pagingParams'].predicate; - }); - } - - ngOnInit() { - this.today(); - this.previousMonth(); - this.loadAll(); - } - - ngOnDestroy() { - this.routeData.unsubscribe(); - } - - previousMonth() { - const dateFormat = 'yyyy-MM-dd'; - let fromDate: Date = new Date(); - - if (fromDate.getMonth() === 0) { - fromDate = new Date(fromDate.getFullYear() - 1, 11, fromDate.getDate()); - } else { - fromDate = new Date(fromDate.getFullYear(), fromDate.getMonth() - 1, fromDate.getDate()); - } - - this.fromDate = this.datePipe.transform(fromDate, dateFormat); - } - - today() { - const dateFormat = 'yyyy-MM-dd'; - // Today + 1 day - needed if the current day must be included - const today: Date = new Date(); - today.setDate(today.getDate() + 1); - const date = new Date(today.getFullYear(), today.getMonth(), today.getDate()); - this.toDate = this.datePipe.transform(date, dateFormat); - } - - loadAll() { - this.auditsService - .query({ - page: this.page - 1, - size: this.itemsPerPage, - sort: this.sort(), - fromDate: this.fromDate, - toDate: this.toDate - }) - .subscribe( - (res: HttpResponse) => this.onSuccess(res.body, res.headers), - (res: HttpResponse) => this.onError(res.body) - ); - } - - sort() { - const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')]; - if (this.predicate !== 'id') { - result.push('id'); - } - return result; - } - - loadPage(page: number) { - if (page !== this.previousPage) { - this.previousPage = page; - this.transition(); - } - } - - transition() { - this.router.navigate(['/admin/audits'], { - queryParams: { - page: this.page, - sort: this.predicate + ',' + (this.reverse ? 'asc' : 'desc') - } - }); - this.loadAll(); - } - - private onSuccess(data, headers) { - this.links = this.parseLinks.parse(headers.get('link')); - this.totalItems = headers.get('X-Total-Count'); - this.audits = data; - } - - private onError(error) { - this.alertService.error(error.error, error.message, null); - } -} diff --git a/src/main/webapp/app/admin/audits/audits.route.ts b/src/main/webapp/app/admin/audits/audits.route.ts deleted file mode 100644 index fa049531..00000000 --- a/src/main/webapp/app/admin/audits/audits.route.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Route } from '@angular/router'; -import { JhiPaginationUtil, JhiResolvePagingParams } from 'ng-jhipster'; - -import { AuditsComponent } from './audits.component'; - -export const auditsRoute: Route = { - path: 'audits', - component: AuditsComponent, - resolve: { - pagingParams: JhiResolvePagingParams - }, - data: { - pageTitle: 'audits.title', - defaultSort: 'auditEventDate,desc' - } -}; diff --git a/src/main/webapp/app/admin/audits/audits.service.ts b/src/main/webapp/app/admin/audits/audits.service.ts deleted file mode 100644 index 78e8cca7..00000000 --- a/src/main/webapp/app/admin/audits/audits.service.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -import { createRequestOption } from 'app/shared'; -import { SERVER_API_URL } from 'app/app.constants'; -import { Audit } from './audit.model'; - -@Injectable({ providedIn: 'root' }) -export class AuditsService { - constructor(private http: HttpClient) {} - - query(req: any): Observable> { - const params: HttpParams = createRequestOption(req); - params.set('fromDate', req.fromDate); - params.set('toDate', req.toDate); - - const requestURL = SERVER_API_URL + 'management/audits'; - - return this.http.get(requestURL, { - params, - observe: 'response' - }); - } -} diff --git a/src/main/webapp/app/admin/configuration/configuration.component.html b/src/main/webapp/app/admin/configuration/configuration.component.html deleted file mode 100644 index c95775a0..00000000 --- a/src/main/webapp/app/admin/configuration/configuration.component.html +++ /dev/null @@ -1,46 +0,0 @@ -
-

Configuration

- - Filter (by prefix) -

Spring configuration

- - - - - - - - - - - - - -
PrefixProperties
{{entry.prefix}} -
-
{{key}}
-
- {{entry.properties[key] | json}} -
-
-
-
-

{{key}}

- - - - - - - - - - - - - -
PropertyValue
{{item.key}} - {{item.val}} -
-
-
diff --git a/src/main/webapp/app/admin/configuration/configuration.component.ts b/src/main/webapp/app/admin/configuration/configuration.component.ts deleted file mode 100644 index 6867210c..00000000 --- a/src/main/webapp/app/admin/configuration/configuration.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -import { JhiConfigurationService } from './configuration.service'; - -@Component({ - selector: 'jhi-configuration', - templateUrl: './configuration.component.html' -}) -export class JhiConfigurationComponent implements OnInit { - allConfiguration: any = null; - configuration: any = null; - configKeys: any[]; - filter: string; - orderProp: string; - reverse: boolean; - - constructor(private configurationService: JhiConfigurationService) { - this.configKeys = []; - this.filter = ''; - this.orderProp = 'prefix'; - this.reverse = false; - } - - keys(dict): Array { - return dict === undefined ? [] : Object.keys(dict); - } - - ngOnInit() { - this.configurationService.get().subscribe(configuration => { - this.configuration = configuration; - - for (const config of configuration) { - if (config.properties !== undefined) { - this.configKeys.push(Object.keys(config.properties)); - } - } - }); - - this.configurationService.getEnv().subscribe(configuration => { - this.allConfiguration = configuration; - }); - } -} diff --git a/src/main/webapp/app/admin/configuration/configuration.route.ts b/src/main/webapp/app/admin/configuration/configuration.route.ts deleted file mode 100644 index 1ff61dfa..00000000 --- a/src/main/webapp/app/admin/configuration/configuration.route.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Route } from '@angular/router'; - -import { JhiConfigurationComponent } from './configuration.component'; - -export const configurationRoute: Route = { - path: 'jhi-configuration', - component: JhiConfigurationComponent, - data: { - pageTitle: 'configuration.title' - } -}; diff --git a/src/main/webapp/app/admin/configuration/configuration.service.ts b/src/main/webapp/app/admin/configuration/configuration.service.ts deleted file mode 100644 index d59960dc..00000000 --- a/src/main/webapp/app/admin/configuration/configuration.service.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; - -import { SERVER_API_URL } from 'app/app.constants'; - -@Injectable({ providedIn: 'root' }) -export class JhiConfigurationService { - constructor(private http: HttpClient) {} - - get(): Observable { - return this.http.get(SERVER_API_URL + 'management/configprops', { observe: 'response' }).pipe( - map((res: HttpResponse) => { - const properties: any[] = []; - const propertiesObject = this.getConfigPropertiesObjects(res.body); - for (const key in propertiesObject) { - if (propertiesObject.hasOwnProperty(key)) { - properties.push(propertiesObject[key]); - } - } - - return properties.sort((propertyA, propertyB) => { - return propertyA.prefix === propertyB.prefix ? 0 : propertyA.prefix < propertyB.prefix ? -1 : 1; - }); - }) - ); - } - - getConfigPropertiesObjects(res: Object) { - // This code is for Spring Boot 2 - if (res['contexts'] !== undefined) { - for (const key in res['contexts']) { - // If the key is not bootstrap, it will be the ApplicationContext Id - // For default app, it is baseName - // For microservice, it is baseName-1 - if (!key.startsWith('bootstrap')) { - return res['contexts'][key]['beans']; - } - } - } - // by default, use the default ApplicationContext Id - return res['contexts']['hsadminNg']['beans']; - } - - getEnv(): Observable { - return this.http.get(SERVER_API_URL + 'management/env', { observe: 'response' }).pipe( - map((res: HttpResponse) => { - const properties: any = {}; - const propertySources = res.body['propertySources']; - - for (const propertyObject of propertySources) { - const name = propertyObject['name']; - const detailProperties = propertyObject['properties']; - const vals: any[] = []; - for (const keyDetail in detailProperties) { - if (detailProperties.hasOwnProperty(keyDetail)) { - vals.push({ key: keyDetail, val: detailProperties[keyDetail]['value'] }); - } - } - properties[name] = vals; - } - return properties; - }) - ); - } -} diff --git a/src/main/webapp/app/admin/docs/docs.component.html b/src/main/webapp/app/admin/docs/docs.component.html deleted file mode 100644 index 30efbbb9..00000000 --- a/src/main/webapp/app/admin/docs/docs.component.html +++ /dev/null @@ -1,2 +0,0 @@ - diff --git a/src/main/webapp/app/admin/docs/docs.component.ts b/src/main/webapp/app/admin/docs/docs.component.ts deleted file mode 100644 index b338e7c3..00000000 --- a/src/main/webapp/app/admin/docs/docs.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'jhi-docs', - templateUrl: './docs.component.html' -}) -export class JhiDocsComponent { - constructor() {} -} diff --git a/src/main/webapp/app/admin/docs/docs.route.ts b/src/main/webapp/app/admin/docs/docs.route.ts deleted file mode 100644 index 9a3a3f80..00000000 --- a/src/main/webapp/app/admin/docs/docs.route.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Route } from '@angular/router'; - -import { JhiDocsComponent } from './docs.component'; - -export const docsRoute: Route = { - path: 'docs', - component: JhiDocsComponent, - data: { - pageTitle: 'global.menu.admin.apidocs' - } -}; diff --git a/src/main/webapp/app/admin/health/health-modal.component.html b/src/main/webapp/app/admin/health/health-modal.component.html deleted file mode 100644 index 4f698460..00000000 --- a/src/main/webapp/app/admin/health/health-modal.component.html +++ /dev/null @@ -1,36 +0,0 @@ - - - diff --git a/src/main/webapp/app/admin/health/health-modal.component.ts b/src/main/webapp/app/admin/health/health-modal.component.ts deleted file mode 100644 index 28128bf3..00000000 --- a/src/main/webapp/app/admin/health/health-modal.component.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Component } from '@angular/core'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; - -import { JhiHealthService } from './health.service'; - -@Component({ - selector: 'jhi-health-modal', - templateUrl: './health-modal.component.html' -}) -export class JhiHealthModalComponent { - currentHealth: any; - - constructor(private healthService: JhiHealthService, public activeModal: NgbActiveModal) {} - - baseName(name) { - return this.healthService.getBaseName(name); - } - - subSystemName(name) { - return this.healthService.getSubSystemName(name); - } - - readableValue(value: number) { - if (this.currentHealth.name === 'diskSpace') { - // Should display storage space in an human readable unit - const val = value / 1073741824; - if (val > 1) { - // Value - return val.toFixed(2) + ' GB'; - } else { - return (value / 1048576).toFixed(2) + ' MB'; - } - } - - if (typeof value === 'object') { - return JSON.stringify(value); - } else { - return value.toString(); - } - } -} diff --git a/src/main/webapp/app/admin/health/health.component.html b/src/main/webapp/app/admin/health/health.component.html deleted file mode 100644 index c17bde9a..00000000 --- a/src/main/webapp/app/admin/health/health.component.html +++ /dev/null @@ -1,34 +0,0 @@ -
-

- Health Checks - -

-
- - - - - - - - - - - - - - - -
Service NameStatusDetails
{{'health.indicator.' + baseName(health.name) | translate}} {{subSystemName(health.name)}} - - {{health.status}} - - - - - -
-
-
diff --git a/src/main/webapp/app/admin/health/health.component.ts b/src/main/webapp/app/admin/health/health.component.ts deleted file mode 100644 index ada3ef62..00000000 --- a/src/main/webapp/app/admin/health/health.component.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; - -import { JhiHealthService } from './health.service'; -import { JhiHealthModalComponent } from './health-modal.component'; - -@Component({ - selector: 'jhi-health', - templateUrl: './health.component.html' -}) -export class JhiHealthCheckComponent implements OnInit { - healthData: any; - updatingHealth: boolean; - - constructor(private modalService: NgbModal, private healthService: JhiHealthService) {} - - ngOnInit() { - this.refresh(); - } - - baseName(name: string) { - return this.healthService.getBaseName(name); - } - - getBadgeClass(statusState) { - if (statusState === 'UP') { - return 'badge-success'; - } else { - return 'badge-danger'; - } - } - - refresh() { - this.updatingHealth = true; - - this.healthService.checkHealth().subscribe( - health => { - this.healthData = this.healthService.transformHealthData(health); - this.updatingHealth = false; - }, - error => { - if (error.status === 503) { - this.healthData = this.healthService.transformHealthData(error.error); - this.updatingHealth = false; - } - } - ); - } - - showHealth(health: any) { - const modalRef = this.modalService.open(JhiHealthModalComponent); - modalRef.componentInstance.currentHealth = health; - modalRef.result.then( - result => { - // Left blank intentionally, nothing to do here - }, - reason => { - // Left blank intentionally, nothing to do here - } - ); - } - - subSystemName(name: string) { - return this.healthService.getSubSystemName(name); - } -} diff --git a/src/main/webapp/app/admin/health/health.route.ts b/src/main/webapp/app/admin/health/health.route.ts deleted file mode 100644 index df801e0c..00000000 --- a/src/main/webapp/app/admin/health/health.route.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Route } from '@angular/router'; - -import { JhiHealthCheckComponent } from './health.component'; - -export const healthRoute: Route = { - path: 'jhi-health', - component: JhiHealthCheckComponent, - data: { - pageTitle: 'health.title' - } -}; diff --git a/src/main/webapp/app/admin/health/health.service.ts b/src/main/webapp/app/admin/health/health.service.ts deleted file mode 100644 index 4c1b0e5e..00000000 --- a/src/main/webapp/app/admin/health/health.service.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -import { SERVER_API_URL } from 'app/app.constants'; - -@Injectable({ providedIn: 'root' }) -export class JhiHealthService { - separator: string; - - constructor(private http: HttpClient) { - this.separator = '.'; - } - - checkHealth(): Observable { - return this.http.get(SERVER_API_URL + 'management/health'); - } - - transformHealthData(data): any { - const response = []; - this.flattenHealthData(response, null, data.details); - return response; - } - - getBaseName(name): string { - if (name) { - const split = name.split('.'); - return split[0]; - } - } - - getSubSystemName(name): string { - if (name) { - const split = name.split('.'); - split.splice(0, 1); - const remainder = split.join('.'); - return remainder ? ' - ' + remainder : ''; - } - } - - /* private methods */ - private addHealthObject(result, isLeaf, healthObject, name): any { - const healthData: any = { - name - }; - - const details = {}; - let hasDetails = false; - - for (const key in healthObject) { - if (healthObject.hasOwnProperty(key)) { - const value = healthObject[key]; - if (key === 'status' || key === 'error') { - healthData[key] = value; - } else { - if (!this.isHealthObject(value)) { - details[key] = value; - hasDetails = true; - } - } - } - } - - // Add the details - if (hasDetails) { - healthData.details = details; - } - - // Only add nodes if they provide additional information - if (isLeaf || hasDetails || healthData.error) { - result.push(healthData); - } - return healthData; - } - - private flattenHealthData(result, path, data): any { - for (const key in data) { - if (data.hasOwnProperty(key)) { - const value = data[key]; - if (this.isHealthObject(value)) { - if (this.hasSubSystem(value)) { - this.addHealthObject(result, false, value, this.getModuleName(path, key)); - this.flattenHealthData(result, this.getModuleName(path, key), value); - } else { - this.addHealthObject(result, true, value, this.getModuleName(path, key)); - } - } - } - } - return result; - } - - private getModuleName(path, name): string { - let result; - if (path && name) { - result = path + this.separator + name; - } else if (path) { - result = path; - } else if (name) { - result = name; - } else { - result = ''; - } - return result; - } - - private hasSubSystem(healthObject): boolean { - let result = false; - - for (const key in healthObject) { - if (healthObject.hasOwnProperty(key)) { - const value = healthObject[key]; - if (value && value.status) { - result = true; - } - } - } - return result; - } - - private isHealthObject(healthObject): boolean { - let result = false; - - for (const key in healthObject) { - if (healthObject.hasOwnProperty(key)) { - if (key === 'status') { - result = true; - } - } - } - return result; - } -} diff --git a/src/main/webapp/app/admin/index.ts b/src/main/webapp/app/admin/index.ts deleted file mode 100644 index 7f631ffb..00000000 --- a/src/main/webapp/app/admin/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -export * from './audits/audits.component'; -export * from './audits/audits.service'; -export * from './audits/audits.route'; -export * from './audits/audit.model'; -export * from './audits/audit-data.model'; -export * from './configuration/configuration.component'; -export * from './configuration/configuration.service'; -export * from './configuration/configuration.route'; -export * from './docs/docs.component'; -export * from './docs/docs.route'; -export * from './health/health.component'; -export * from './health/health-modal.component'; -export * from './health/health.service'; -export * from './health/health.route'; -export * from './logs/logs.component'; -export * from './logs/logs.service'; -export * from './logs/logs.route'; -export * from './logs/log.model'; -export * from './metrics/metrics.component'; -export * from './metrics/metrics.service'; -export * from './metrics/metrics.route'; -export * from './user-management/user-management-update.component'; -export * from './user-management/user-management-delete-dialog.component'; -export * from './user-management/user-management-detail.component'; -export * from './user-management/user-management.component'; -export * from './user-management/user-management.route'; -export * from './admin.route'; diff --git a/src/main/webapp/app/admin/logs/log.model.ts b/src/main/webapp/app/admin/logs/log.model.ts deleted file mode 100644 index 3f27b672..00000000 --- a/src/main/webapp/app/admin/logs/log.model.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class Log { - constructor(public name: string, public level: string) {} -} diff --git a/src/main/webapp/app/admin/logs/logs.component.html b/src/main/webapp/app/admin/logs/logs.component.html deleted file mode 100644 index f7d8f363..00000000 --- a/src/main/webapp/app/admin/logs/logs.component.html +++ /dev/null @@ -1,28 +0,0 @@ -
-

Logs

- -

There are {{ loggers.length }} loggers.

- - Filter - - - - - - - - - - - - - -
NameLevel
{{logger.name | slice:0:140}} - - - - - - -
-
diff --git a/src/main/webapp/app/admin/logs/logs.component.ts b/src/main/webapp/app/admin/logs/logs.component.ts deleted file mode 100644 index 28547f9a..00000000 --- a/src/main/webapp/app/admin/logs/logs.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -import { Log } from './log.model'; -import { LogsService } from './logs.service'; - -@Component({ - selector: 'jhi-logs', - templateUrl: './logs.component.html' -}) -export class LogsComponent implements OnInit { - loggers: Log[]; - filter: string; - orderProp: string; - reverse: boolean; - - constructor(private logsService: LogsService) { - this.filter = ''; - this.orderProp = 'name'; - this.reverse = false; - } - - ngOnInit() { - this.logsService.findAll().subscribe(response => (this.loggers = response.body)); - } - - changeLevel(name: string, level: string) { - const log = new Log(name, level); - this.logsService.changeLevel(log).subscribe(() => { - this.logsService.findAll().subscribe(response => (this.loggers = response.body)); - }); - } -} diff --git a/src/main/webapp/app/admin/logs/logs.route.ts b/src/main/webapp/app/admin/logs/logs.route.ts deleted file mode 100644 index 1de755c7..00000000 --- a/src/main/webapp/app/admin/logs/logs.route.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Route } from '@angular/router'; - -import { LogsComponent } from './logs.component'; - -export const logsRoute: Route = { - path: 'logs', - component: LogsComponent, - data: { - pageTitle: 'logs.title' - } -}; diff --git a/src/main/webapp/app/admin/logs/logs.service.ts b/src/main/webapp/app/admin/logs/logs.service.ts deleted file mode 100644 index 71a596b0..00000000 --- a/src/main/webapp/app/admin/logs/logs.service.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -import { SERVER_API_URL } from 'app/app.constants'; -import { Log } from './log.model'; - -@Injectable({ providedIn: 'root' }) -export class LogsService { - constructor(private http: HttpClient) {} - - changeLevel(log: Log): Observable> { - return this.http.put(SERVER_API_URL + 'management/logs', log, { observe: 'response' }); - } - - findAll(): Observable> { - return this.http.get(SERVER_API_URL + 'management/logs', { observe: 'response' }); - } -} diff --git a/src/main/webapp/app/admin/metrics/metrics.component.html b/src/main/webapp/app/admin/metrics/metrics.component.html deleted file mode 100644 index deb1c1b5..00000000 --- a/src/main/webapp/app/admin/metrics/metrics.component.html +++ /dev/null @@ -1,56 +0,0 @@ -
-

- Application Metrics - -

- -

JVM Metrics

-
- - - - - -
- -
-

Garbage collector statistics

- -
- -
Updating...
- - - - -
- - - - - - - - - -
diff --git a/src/main/webapp/app/admin/metrics/metrics.component.ts b/src/main/webapp/app/admin/metrics/metrics.component.ts deleted file mode 100644 index ed508c81..00000000 --- a/src/main/webapp/app/admin/metrics/metrics.component.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; - -import { JhiMetricsService } from './metrics.service'; - -@Component({ - selector: 'jhi-metrics', - templateUrl: './metrics.component.html' -}) -export class JhiMetricsMonitoringComponent implements OnInit { - metrics: any = {}; - threadData: any = {}; - updatingMetrics = true; - JCACHE_KEY: string; - - constructor(private modalService: NgbModal, private metricsService: JhiMetricsService) { - this.JCACHE_KEY = 'jcache.statistics'; - } - - ngOnInit() { - this.refresh(); - } - - refresh() { - this.updatingMetrics = true; - this.metricsService.getMetrics().subscribe(metrics => { - this.metrics = metrics; - this.metricsService.threadDump().subscribe(data => { - this.threadData = data.threads; - this.updatingMetrics = false; - }); - }); - } - - isObjectExisting(metrics: any, key: string) { - return metrics && metrics[key]; - } - - isObjectExistingAndNotEmpty(metrics: any, key: string) { - return this.isObjectExisting(metrics, key) && JSON.stringify(metrics[key]) !== '{}'; - } -} diff --git a/src/main/webapp/app/admin/metrics/metrics.route.ts b/src/main/webapp/app/admin/metrics/metrics.route.ts deleted file mode 100644 index ba8f5936..00000000 --- a/src/main/webapp/app/admin/metrics/metrics.route.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Route } from '@angular/router'; - -import { JhiMetricsMonitoringComponent } from './metrics.component'; - -export const metricsRoute: Route = { - path: 'jhi-metrics', - component: JhiMetricsMonitoringComponent, - data: { - pageTitle: 'metrics.title' - } -}; diff --git a/src/main/webapp/app/admin/metrics/metrics.service.ts b/src/main/webapp/app/admin/metrics/metrics.service.ts deleted file mode 100644 index 15cfe353..00000000 --- a/src/main/webapp/app/admin/metrics/metrics.service.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -import { SERVER_API_URL } from 'app/app.constants'; - -@Injectable({ providedIn: 'root' }) -export class JhiMetricsService { - constructor(private http: HttpClient) {} - - getMetrics(): Observable { - return this.http.get(SERVER_API_URL + 'management/jhi-metrics'); - } - - threadDump(): Observable { - return this.http.get(SERVER_API_URL + 'management/threaddump'); - } -} diff --git a/src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.html b/src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.html deleted file mode 100644 index 7e61bd5f..00000000 --- a/src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.html +++ /dev/null @@ -1,19 +0,0 @@ -
- - - -
diff --git a/src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.ts b/src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.ts deleted file mode 100644 index d7674f6c..00000000 --- a/src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Component } from '@angular/core'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { JhiEventManager } from 'ng-jhipster'; - -import { User, UserService } from 'app/core'; - -@Component({ - selector: 'jhi-user-mgmt-delete-dialog', - templateUrl: './user-management-delete-dialog.component.html' -}) -export class UserMgmtDeleteDialogComponent { - user: User; - - constructor(private userService: UserService, public activeModal: NgbActiveModal, private eventManager: JhiEventManager) {} - - clear() { - this.activeModal.dismiss('cancel'); - } - - confirmDelete(login) { - this.userService.delete(login).subscribe(response => { - this.eventManager.broadcast({ - name: 'userListModification', - content: 'Deleted a user' - }); - this.activeModal.dismiss(true); - }); - } -} diff --git a/src/main/webapp/app/admin/user-management/user-management-detail.component.html b/src/main/webapp/app/admin/user-management/user-management-detail.component.html deleted file mode 100644 index 0fee91b9..00000000 --- a/src/main/webapp/app/admin/user-management/user-management-detail.component.html +++ /dev/null @@ -1,49 +0,0 @@ -
-
-
-

- User [{{user.login}}] -

-
-
Login
-
- {{user.login}} - - -
-
First Name
-
{{user.firstName}}
-
Last Name
-
{{user.lastName}}
-
Email
-
{{user.email}}
-
Lang Key
-
{{user.langKey}}
-
Created By
-
{{user.createdBy}}
-
Created Date
-
{{user.createdDate | date:'dd/MM/yy HH:mm' }}
-
Last Modified By
-
{{user.lastModifiedBy}}
-
Last Modified Date
-
{{user.lastModifiedDate | date:'dd/MM/yy HH:mm'}}
-
Profiles
-
-
    -
  • - {{authority}} -
  • -
-
-
- -
-
-
diff --git a/src/main/webapp/app/admin/user-management/user-management-detail.component.ts b/src/main/webapp/app/admin/user-management/user-management-detail.component.ts deleted file mode 100644 index 0b323d89..00000000 --- a/src/main/webapp/app/admin/user-management/user-management-detail.component.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { User } from 'app/core'; - -@Component({ - selector: 'jhi-user-mgmt-detail', - templateUrl: './user-management-detail.component.html' -}) -export class UserMgmtDetailComponent implements OnInit { - user: User; - - constructor(private route: ActivatedRoute) {} - - ngOnInit() { - this.route.data.subscribe(({ user }) => { - this.user = user.body ? user.body : user; - }); - } -} diff --git a/src/main/webapp/app/admin/user-management/user-management-update.component.html b/src/main/webapp/app/admin/user-management/user-management-update.component.html deleted file mode 100644 index 91596c7c..00000000 --- a/src/main/webapp/app/admin/user-management/user-management-update.component.html +++ /dev/null @@ -1,124 +0,0 @@ -
-
-
-

- Create or edit a User -

-
- -
- - -
- -
- - - -
- - This field is required. - - - - This field cannot be longer than 50 characters. - - - - This field can only contain letters, digits and e-mail addresses. - -
-
-
- - - -
- - This field cannot be longer than 50 characters. - -
-
-
- - - -
- - This field cannot be longer than 50 characters. - -
-
-
- - - -
- - This field is required. - - - - This field cannot be longer than 100 characters. - - - - This field is required to be at least 5 characters. - - - - Your email is invalid. - -
-
-
- -
- -
- - -
-
- - -
-
-
- - -
-
-
-
diff --git a/src/main/webapp/app/admin/user-management/user-management-update.component.ts b/src/main/webapp/app/admin/user-management/user-management-update.component.ts deleted file mode 100644 index 84e06c5b..00000000 --- a/src/main/webapp/app/admin/user-management/user-management-update.component.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; - -import { JhiLanguageHelper, User, UserService } from 'app/core'; - -@Component({ - selector: 'jhi-user-mgmt-update', - templateUrl: './user-management-update.component.html' -}) -export class UserMgmtUpdateComponent implements OnInit { - user: User; - languages: any[]; - authorities: any[]; - isSaving: boolean; - - constructor( - private languageHelper: JhiLanguageHelper, - private userService: UserService, - private route: ActivatedRoute, - private router: Router - ) {} - - ngOnInit() { - this.isSaving = false; - this.route.data.subscribe(({ user }) => { - this.user = user.body ? user.body : user; - }); - this.authorities = []; - this.userService.authorities().subscribe(authorities => { - this.authorities = authorities; - }); - this.languageHelper.getAll().then(languages => { - this.languages = languages; - }); - } - - previousState() { - window.history.back(); - } - - save() { - this.isSaving = true; - if (this.user.id !== null) { - this.userService.update(this.user).subscribe(response => this.onSaveSuccess(response), () => this.onSaveError()); - } else { - this.userService.create(this.user).subscribe(response => this.onSaveSuccess(response), () => this.onSaveError()); - } - } - - private onSaveSuccess(result) { - this.isSaving = false; - this.previousState(); - } - - private onSaveError() { - this.isSaving = false; - } -} diff --git a/src/main/webapp/app/admin/user-management/user-management.component.html b/src/main/webapp/app/admin/user-management/user-management.component.html deleted file mode 100644 index 9f387b0b..00000000 --- a/src/main/webapp/app/admin/user-management/user-management.component.html +++ /dev/null @@ -1,79 +0,0 @@ -
-

- Users - -

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ID Login Email Lang Key ProfilesCreated Date Last Modified By Last Modified Date
{{user.id}}{{user.login}}{{user.email}} - - - {{user.langKey}} -
- {{ authority }} -
-
{{user.createdDate | date:'dd/MM/yy HH:mm'}}{{user.lastModifiedBy}}{{user.lastModifiedDate | date:'dd/MM/yy HH:mm'}} -
- - - -
-
-
-
-
- -
-
- -
-
-
diff --git a/src/main/webapp/app/admin/user-management/user-management.component.ts b/src/main/webapp/app/admin/user-management/user-management.component.ts deleted file mode 100644 index 439442e3..00000000 --- a/src/main/webapp/app/admin/user-management/user-management.component.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { HttpResponse } from '@angular/common/http'; -import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; - -import { ActivatedRoute, Router } from '@angular/router'; -import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster'; - -import { ITEMS_PER_PAGE } from 'app/shared'; -import { AccountService, UserService, User } from 'app/core'; -import { UserMgmtDeleteDialogComponent } from 'app/admin'; - -@Component({ - selector: 'jhi-user-mgmt', - templateUrl: './user-management.component.html' -}) -export class UserMgmtComponent implements OnInit, OnDestroy { - currentAccount: any; - users: User[]; - error: any; - success: any; - routeData: any; - links: any; - totalItems: any; - itemsPerPage: any; - page: any; - predicate: any; - previousPage: any; - reverse: any; - - constructor( - private userService: UserService, - private alertService: JhiAlertService, - private accountService: AccountService, - private parseLinks: JhiParseLinks, - private activatedRoute: ActivatedRoute, - private router: Router, - private eventManager: JhiEventManager, - private modalService: NgbModal - ) { - this.itemsPerPage = ITEMS_PER_PAGE; - this.routeData = this.activatedRoute.data.subscribe(data => { - this.page = data['pagingParams'].page; - this.previousPage = data['pagingParams'].page; - this.reverse = data['pagingParams'].ascending; - this.predicate = data['pagingParams'].predicate; - }); - } - - ngOnInit() { - this.accountService.identity().then(account => { - this.currentAccount = account; - this.loadAll(); - this.registerChangeInUsers(); - }); - } - - ngOnDestroy() { - this.routeData.unsubscribe(); - } - - registerChangeInUsers() { - this.eventManager.subscribe('userListModification', response => this.loadAll()); - } - - setActive(user, isActivated) { - user.activated = isActivated; - - this.userService.update(user).subscribe(response => { - if (response.status === 200) { - this.error = null; - this.success = 'OK'; - this.loadAll(); - } else { - this.success = null; - this.error = 'ERROR'; - } - }); - } - - loadAll() { - this.userService - .query({ - page: this.page - 1, - size: this.itemsPerPage, - sort: this.sort() - }) - .subscribe( - (res: HttpResponse) => this.onSuccess(res.body, res.headers), - (res: HttpResponse) => this.onError(res.body) - ); - } - - trackIdentity(index, item: User) { - return item.id; - } - - sort() { - const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')]; - if (this.predicate !== 'id') { - result.push('id'); - } - return result; - } - - loadPage(page: number) { - if (page !== this.previousPage) { - this.previousPage = page; - this.transition(); - } - } - - transition() { - this.router.navigate(['/admin/user-management'], { - queryParams: { - page: this.page, - sort: this.predicate + ',' + (this.reverse ? 'asc' : 'desc') - } - }); - this.loadAll(); - } - - deleteUser(user: User) { - const modalRef = this.modalService.open(UserMgmtDeleteDialogComponent, { size: 'lg', backdrop: 'static' }); - modalRef.componentInstance.user = user; - modalRef.result.then( - result => { - // Left blank intentionally, nothing to do here - }, - reason => { - // Left blank intentionally, nothing to do here - } - ); - } - - private onSuccess(data, headers) { - this.links = this.parseLinks.parse(headers.get('link')); - this.totalItems = headers.get('X-Total-Count'); - this.users = data; - } - - private onError(error) { - this.alertService.error(error.error, error.message, null); - } -} diff --git a/src/main/webapp/app/admin/user-management/user-management.route.ts b/src/main/webapp/app/admin/user-management/user-management.route.ts deleted file mode 100644 index b02939b7..00000000 --- a/src/main/webapp/app/admin/user-management/user-management.route.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes, CanActivate } from '@angular/router'; -import { JhiPaginationUtil, JhiResolvePagingParams } from 'ng-jhipster'; - -import { AccountService, User, UserService } from 'app/core'; -import { UserMgmtComponent } from './user-management.component'; -import { UserMgmtDetailComponent } from './user-management-detail.component'; -import { UserMgmtUpdateComponent } from './user-management-update.component'; - -@Injectable({ providedIn: 'root' }) -export class UserResolve implements CanActivate { - constructor(private accountService: AccountService) {} - - canActivate() { - return this.accountService.identity().then(account => this.accountService.hasAnyAuthority(['ROLE_ADMIN'])); - } -} - -@Injectable({ providedIn: 'root' }) -export class UserMgmtResolve implements Resolve { - constructor(private service: UserService) {} - - resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { - const id = route.params['login'] ? route.params['login'] : null; - if (id) { - return this.service.find(id); - } - return new User(); - } -} - -export const userMgmtRoute: Routes = [ - { - path: 'user-management', - component: UserMgmtComponent, - resolve: { - pagingParams: JhiResolvePagingParams - }, - data: { - pageTitle: 'userManagement.home.title', - defaultSort: 'id,asc' - } - }, - { - path: 'user-management/:login/view', - component: UserMgmtDetailComponent, - resolve: { - user: UserMgmtResolve - }, - data: { - pageTitle: 'userManagement.home.title' - } - }, - { - path: 'user-management/new', - component: UserMgmtUpdateComponent, - resolve: { - user: UserMgmtResolve - } - }, - { - path: 'user-management/:login/edit', - component: UserMgmtUpdateComponent, - resolve: { - user: UserMgmtResolve - } - } -]; diff --git a/src/main/webapp/app/app-routing.module.ts b/src/main/webapp/app/app-routing.module.ts deleted file mode 100644 index affde551..00000000 --- a/src/main/webapp/app/app-routing.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { errorRoute, navbarRoute } from './layouts'; -import { DEBUG_INFO_ENABLED } from 'app/app.constants'; - -const LAYOUT_ROUTES = [navbarRoute, ...errorRoute]; - -@NgModule({ - imports: [ - RouterModule.forRoot( - [ - { - path: 'admin', - loadChildren: './admin/admin.module#HsadminNgAdminModule' - }, - ...LAYOUT_ROUTES - ], - { useHash: true, enableTracing: DEBUG_INFO_ENABLED } - ) - ], - exports: [RouterModule] -}) -export class HsadminNgAppRoutingModule {} diff --git a/src/main/webapp/app/app.constants.ts b/src/main/webapp/app/app.constants.ts deleted file mode 100644 index 9760a49a..00000000 --- a/src/main/webapp/app/app.constants.ts +++ /dev/null @@ -1,8 +0,0 @@ -// These constants are injected via webpack environment variables. -// You can add more variables in webpack.common.js or in profile specific webpack..js files. -// If you change the values in the webpack config files, you need to re run webpack to update the application - -export const VERSION = process.env.VERSION; -export const DEBUG_INFO_ENABLED: boolean = !!process.env.DEBUG_INFO_ENABLED; -export const SERVER_API_URL = process.env.SERVER_API_URL; -export const BUILD_TIMESTAMP = process.env.BUILD_TIMESTAMP; diff --git a/src/main/webapp/app/app.main.ts b/src/main/webapp/app/app.main.ts deleted file mode 100644 index 77795715..00000000 --- a/src/main/webapp/app/app.main.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { ProdConfig } from './blocks/config/prod.config'; -import { HsadminNgAppModule } from './app.module'; - -ProdConfig(); - -if (module['hot']) { - module['hot'].accept(); -} - -platformBrowserDynamic() - .bootstrapModule(HsadminNgAppModule, { preserveWhitespaces: true }) - .then(success => console.log(`Application started`)) - .catch(err => console.error(err)); diff --git a/src/main/webapp/app/app.module.ts b/src/main/webapp/app/app.module.ts deleted file mode 100644 index d8ed4b4c..00000000 --- a/src/main/webapp/app/app.module.ts +++ /dev/null @@ -1,72 +0,0 @@ -import './vendor.ts'; - -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { HTTP_INTERCEPTORS } from '@angular/common/http'; -import { NgbDatepickerConfig } from '@ng-bootstrap/ng-bootstrap'; -import { Ng2Webstorage } from 'ngx-webstorage'; -import { NgJhipsterModule } from 'ng-jhipster'; - -import { AuthInterceptor } from './blocks/interceptor/auth.interceptor'; -import { AuthExpiredInterceptor } from './blocks/interceptor/auth-expired.interceptor'; -import { ErrorHandlerInterceptor } from './blocks/interceptor/errorhandler.interceptor'; -import { NotificationInterceptor } from './blocks/interceptor/notification.interceptor'; -import { HsadminNgSharedModule } from 'app/shared'; -import { HsadminNgCoreModule } from 'app/core'; -import { HsadminNgAppRoutingModule } from './app-routing.module'; -import { HsadminNgHomeModule } from './home/home.module'; -import { HsadminNgAccountModule } from './account/account.module'; -import { HsadminNgEntityModule } from './entities/entity.module'; -import * as moment from 'moment'; -// jhipster-needle-angular-add-module-import JHipster will add new module here -import { JhiMainComponent, NavbarComponent, FooterComponent, PageRibbonComponent, ActiveMenuDirective, ErrorComponent } from './layouts'; - -@NgModule({ - imports: [ - BrowserModule, - Ng2Webstorage.forRoot({ prefix: 'jhi', separator: '-' }), - NgJhipsterModule.forRoot({ - // set below to true to make alerts look like toast - alertAsToast: false, - alertTimeout: 5000, - i18nEnabled: true, - defaultI18nLang: 'de' - }), - HsadminNgSharedModule.forRoot(), - HsadminNgCoreModule, - HsadminNgHomeModule, - HsadminNgAccountModule, - // jhipster-needle-angular-add-module JHipster will add new module here - HsadminNgEntityModule, - HsadminNgAppRoutingModule - ], - declarations: [JhiMainComponent, NavbarComponent, ErrorComponent, PageRibbonComponent, ActiveMenuDirective, FooterComponent], - providers: [ - { - provide: HTTP_INTERCEPTORS, - useClass: AuthInterceptor, - multi: true - }, - { - provide: HTTP_INTERCEPTORS, - useClass: AuthExpiredInterceptor, - multi: true - }, - { - provide: HTTP_INTERCEPTORS, - useClass: ErrorHandlerInterceptor, - multi: true - }, - { - provide: HTTP_INTERCEPTORS, - useClass: NotificationInterceptor, - multi: true - } - ], - bootstrap: [JhiMainComponent] -}) -export class HsadminNgAppModule { - constructor(private dpConfig: NgbDatepickerConfig) { - this.dpConfig.minDate = { year: moment().year() - 100, month: 1, day: 1 }; - } -} diff --git a/src/main/webapp/app/blocks/config/prod.config.ts b/src/main/webapp/app/blocks/config/prod.config.ts deleted file mode 100644 index c6221c1e..00000000 --- a/src/main/webapp/app/blocks/config/prod.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { enableProdMode } from '@angular/core'; -import { DEBUG_INFO_ENABLED } from 'app/app.constants'; - -export function ProdConfig() { - // disable debug data on prod profile to improve performance - if (!DEBUG_INFO_ENABLED) { - enableProdMode(); - } -} diff --git a/src/main/webapp/app/blocks/config/uib-pagination.config.ts b/src/main/webapp/app/blocks/config/uib-pagination.config.ts deleted file mode 100644 index 0c2ea948..00000000 --- a/src/main/webapp/app/blocks/config/uib-pagination.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Injectable } from '@angular/core'; -import { NgbPaginationConfig } from '@ng-bootstrap/ng-bootstrap'; -import { ITEMS_PER_PAGE } from 'app/shared'; - -@Injectable({ providedIn: 'root' }) -export class PaginationConfig { - // tslint:disable-next-line: no-unused-variable - constructor(private config: NgbPaginationConfig) { - config.boundaryLinks = true; - config.maxSize = 5; - config.pageSize = ITEMS_PER_PAGE; - config.size = 'sm'; - } -} diff --git a/src/main/webapp/app/blocks/interceptor/auth-expired.interceptor.ts b/src/main/webapp/app/blocks/interceptor/auth-expired.interceptor.ts deleted file mode 100644 index bc1b70cf..00000000 --- a/src/main/webapp/app/blocks/interceptor/auth-expired.interceptor.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpErrorResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import { tap } from 'rxjs/operators'; -import { LoginService } from 'app/core/login/login.service'; - -@Injectable() -export class AuthExpiredInterceptor implements HttpInterceptor { - constructor(private loginService: LoginService) {} - - intercept(request: HttpRequest, next: HttpHandler): Observable> { - return next.handle(request).pipe( - tap( - (event: HttpEvent) => {}, - (err: any) => { - if (err instanceof HttpErrorResponse) { - if (err.status === 401) { - this.loginService.logout(); - } - } - } - ) - ); - } -} diff --git a/src/main/webapp/app/blocks/interceptor/auth.interceptor.ts b/src/main/webapp/app/blocks/interceptor/auth.interceptor.ts deleted file mode 100644 index 23cdeaf6..00000000 --- a/src/main/webapp/app/blocks/interceptor/auth.interceptor.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs'; -import { LocalStorageService, SessionStorageService } from 'ngx-webstorage'; -import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http'; - -import { SERVER_API_URL } from 'app/app.constants'; - -@Injectable() -export class AuthInterceptor implements HttpInterceptor { - constructor(private localStorage: LocalStorageService, private sessionStorage: SessionStorageService) {} - - intercept(request: HttpRequest, next: HttpHandler): Observable> { - if (!request || !request.url || (/^http/.test(request.url) && !(SERVER_API_URL && request.url.startsWith(SERVER_API_URL)))) { - return next.handle(request); - } - - const token = this.localStorage.retrieve('authenticationToken') || this.sessionStorage.retrieve('authenticationToken'); - if (!!token) { - request = request.clone({ - setHeaders: { - Authorization: 'Bearer ' + token - } - }); - } - return next.handle(request); - } -} diff --git a/src/main/webapp/app/blocks/interceptor/errorhandler.interceptor.ts b/src/main/webapp/app/blocks/interceptor/errorhandler.interceptor.ts deleted file mode 100644 index 183feddf..00000000 --- a/src/main/webapp/app/blocks/interceptor/errorhandler.interceptor.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Injectable } from '@angular/core'; -import { JhiEventManager } from 'ng-jhipster'; -import { HttpInterceptor, HttpRequest, HttpErrorResponse, HttpHandler, HttpEvent } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import { tap } from 'rxjs/operators'; - -@Injectable() -export class ErrorHandlerInterceptor implements HttpInterceptor { - constructor(private eventManager: JhiEventManager) {} - - intercept(request: HttpRequest, next: HttpHandler): Observable> { - return next.handle(request).pipe( - tap( - (event: HttpEvent) => {}, - (err: any) => { - if (err instanceof HttpErrorResponse) { - if (!(err.status === 401 && (err.message === '' || (err.url && err.url.includes('/api/account'))))) { - this.eventManager.broadcast({ name: 'hsadminNgApp.httpError', content: err }); - } - } - } - ) - ); - } -} diff --git a/src/main/webapp/app/blocks/interceptor/notification.interceptor.ts b/src/main/webapp/app/blocks/interceptor/notification.interceptor.ts deleted file mode 100644 index 55b2b99b..00000000 --- a/src/main/webapp/app/blocks/interceptor/notification.interceptor.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { JhiAlertService } from 'ng-jhipster'; -import { HttpInterceptor, HttpRequest, HttpResponse, HttpHandler, HttpEvent } from '@angular/common/http'; -import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs'; -import { tap } from 'rxjs/operators'; - -@Injectable() -export class NotificationInterceptor implements HttpInterceptor { - constructor(private alertService: JhiAlertService) {} - - intercept(request: HttpRequest, next: HttpHandler): Observable> { - return next.handle(request).pipe( - tap( - (event: HttpEvent) => { - if (event instanceof HttpResponse) { - const arr = event.headers.keys(); - let alert = null; - let alertParams = null; - arr.forEach(entry => { - if (entry.toLowerCase().endsWith('app-alert')) { - alert = event.headers.get(entry); - } else if (entry.toLowerCase().endsWith('app-params')) { - alertParams = event.headers.get(entry); - } - }); - if (alert) { - if (typeof alert === 'string') { - this.alertService.success(alert, { param: alertParams }, null); - } - } - } - }, - (err: any) => {} - ) - ); - } -} diff --git a/src/main/webapp/app/core/auth/account.service.ts b/src/main/webapp/app/core/auth/account.service.ts deleted file mode 100644 index 047bbfc9..00000000 --- a/src/main/webapp/app/core/auth/account.service.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Injectable } from '@angular/core'; -import { JhiLanguageService } from 'ng-jhipster'; -import { SessionStorageService } from 'ngx-webstorage'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { Observable, Subject } from 'rxjs'; - -import { SERVER_API_URL } from 'app/app.constants'; -import { Account } from 'app/core/user/account.model'; - -@Injectable({ providedIn: 'root' }) -export class AccountService { - private userIdentity: any; - private authenticated = false; - private authenticationState = new Subject(); - - constructor(private languageService: JhiLanguageService, private sessionStorage: SessionStorageService, private http: HttpClient) {} - - fetch(): Observable> { - return this.http.get(SERVER_API_URL + 'api/account', { observe: 'response' }); - } - - save(account: any): Observable> { - return this.http.post(SERVER_API_URL + 'api/account', account, { observe: 'response' }); - } - - authenticate(identity) { - this.userIdentity = identity; - this.authenticated = identity !== null; - this.authenticationState.next(this.userIdentity); - } - - hasAnyAuthority(authorities: string[]): boolean { - if (!this.authenticated || !this.userIdentity || !this.userIdentity.authorities) { - return false; - } - - for (let i = 0; i < authorities.length; i++) { - if (this.userIdentity.authorities.includes(authorities[i])) { - return true; - } - } - - return false; - } - - hasAuthority(authority: string): Promise { - if (!this.authenticated) { - return Promise.resolve(false); - } - - return this.identity().then( - id => { - return Promise.resolve(id.authorities && id.authorities.includes(authority)); - }, - () => { - return Promise.resolve(false); - } - ); - } - - identity(force?: boolean): Promise { - if (force) { - this.userIdentity = undefined; - } - - // check and see if we have retrieved the userIdentity data from the server. - // if we have, reuse it by immediately resolving - if (this.userIdentity) { - return Promise.resolve(this.userIdentity); - } - - // retrieve the userIdentity data from the server, update the identity object, and then resolve. - return this.fetch() - .toPromise() - .then(response => { - const account = response.body; - if (account) { - this.userIdentity = account; - this.authenticated = true; - // After retrieve the account info, the language will be changed to - // the user's preferred language configured in the account setting - const langKey = this.sessionStorage.retrieve('locale') || this.userIdentity.langKey; - this.languageService.changeLanguage(langKey); - } else { - this.userIdentity = null; - this.authenticated = false; - } - this.authenticationState.next(this.userIdentity); - return this.userIdentity; - }) - .catch(err => { - this.userIdentity = null; - this.authenticated = false; - this.authenticationState.next(this.userIdentity); - return null; - }); - } - - isAuthenticated(): boolean { - return this.authenticated; - } - - isIdentityResolved(): boolean { - return this.userIdentity !== undefined; - } - - getAuthenticationState(): Observable { - return this.authenticationState.asObservable(); - } - - getImageUrl(): string { - return this.isIdentityResolved() ? this.userIdentity.imageUrl : null; - } -} diff --git a/src/main/webapp/app/core/auth/auth-jwt.service.ts b/src/main/webapp/app/core/auth/auth-jwt.service.ts deleted file mode 100644 index 5ad53e3d..00000000 --- a/src/main/webapp/app/core/auth/auth-jwt.service.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; -import { LocalStorageService, SessionStorageService } from 'ngx-webstorage'; - -import { SERVER_API_URL } from 'app/app.constants'; - -@Injectable({ providedIn: 'root' }) -export class AuthServerProvider { - constructor(private http: HttpClient, private $localStorage: LocalStorageService, private $sessionStorage: SessionStorageService) {} - - getToken() { - return this.$localStorage.retrieve('authenticationToken') || this.$sessionStorage.retrieve('authenticationToken'); - } - - login(credentials): Observable { - const data = { - username: credentials.username, - password: credentials.password, - rememberMe: credentials.rememberMe - }; - return this.http.post(SERVER_API_URL + 'api/authenticate', data, { observe: 'response' }).pipe(map(authenticateSuccess.bind(this))); - - function authenticateSuccess(resp) { - const bearerToken = resp.headers.get('Authorization'); - if (bearerToken && bearerToken.slice(0, 7) === 'Bearer ') { - const jwt = bearerToken.slice(7, bearerToken.length); - this.storeAuthenticationToken(jwt, credentials.rememberMe); - return jwt; - } - } - } - - loginWithToken(jwt, rememberMe) { - if (jwt) { - this.storeAuthenticationToken(jwt, rememberMe); - return Promise.resolve(jwt); - } else { - return Promise.reject('auth-jwt-service Promise reject'); // Put appropriate error message here - } - } - - storeAuthenticationToken(jwt, rememberMe) { - if (rememberMe) { - this.$localStorage.store('authenticationToken', jwt); - } else { - this.$sessionStorage.store('authenticationToken', jwt); - } - } - - logout(): Observable { - return new Observable(observer => { - this.$localStorage.clear('authenticationToken'); - this.$sessionStorage.clear('authenticationToken'); - observer.complete(); - }); - } -} diff --git a/src/main/webapp/app/core/auth/csrf.service.ts b/src/main/webapp/app/core/auth/csrf.service.ts deleted file mode 100644 index 01fdccb0..00000000 --- a/src/main/webapp/app/core/auth/csrf.service.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Injectable } from '@angular/core'; -import { CookieService } from 'ngx-cookie'; - -@Injectable({ providedIn: 'root' }) -export class CSRFService { - constructor(private cookieService: CookieService) {} - - getCSRF(name = 'XSRF-TOKEN') { - return this.cookieService.get(name); - } -} diff --git a/src/main/webapp/app/core/auth/state-storage.service.ts b/src/main/webapp/app/core/auth/state-storage.service.ts deleted file mode 100644 index 0e5befbf..00000000 --- a/src/main/webapp/app/core/auth/state-storage.service.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Injectable } from '@angular/core'; -import { SessionStorageService } from 'ngx-webstorage'; - -@Injectable({ providedIn: 'root' }) -export class StateStorageService { - constructor(private $sessionStorage: SessionStorageService) {} - - getPreviousState() { - return this.$sessionStorage.retrieve('previousState'); - } - - resetPreviousState() { - this.$sessionStorage.clear('previousState'); - } - - storePreviousState(previousStateName, previousStateParams) { - const previousState = { name: previousStateName, params: previousStateParams }; - this.$sessionStorage.store('previousState', previousState); - } - - getDestinationState() { - return this.$sessionStorage.retrieve('destinationState'); - } - - storeUrl(url: string) { - this.$sessionStorage.store('previousUrl', url); - } - - getUrl() { - return this.$sessionStorage.retrieve('previousUrl'); - } - - storeDestinationState(destinationState, destinationStateParams, fromState) { - const destinationInfo = { - destination: { - name: destinationState.name, - data: destinationState.data - }, - params: destinationStateParams, - from: { - name: fromState.name - } - }; - this.$sessionStorage.store('destinationState', destinationInfo); - } -} diff --git a/src/main/webapp/app/core/auth/user-route-access-service.ts b/src/main/webapp/app/core/auth/user-route-access-service.ts deleted file mode 100644 index a55b0bc0..00000000 --- a/src/main/webapp/app/core/auth/user-route-access-service.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Injectable, isDevMode } from '@angular/core'; -import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router'; - -import { AccountService } from '../'; -import { LoginModalService } from '../login/login-modal.service'; -import { StateStorageService } from './state-storage.service'; - -@Injectable({ providedIn: 'root' }) -export class UserRouteAccessService implements CanActivate { - constructor( - private router: Router, - private loginModalService: LoginModalService, - private accountService: AccountService, - private stateStorageService: StateStorageService - ) {} - - canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean | Promise { - const authorities = route.data['authorities']; - // We need to call the checkLogin / and so the accountService.identity() function, to ensure, - // that the client has a principal too, if they already logged in by the server. - // This could happen on a page refresh. - return this.checkLogin(authorities, state.url); - } - - checkLogin(authorities: string[], url: string): Promise { - return this.accountService.identity().then(account => { - if (!authorities || authorities.length === 0) { - return true; - } - - if (account) { - const hasAnyAuthority = this.accountService.hasAnyAuthority(authorities); - if (hasAnyAuthority) { - return true; - } - if (isDevMode()) { - console.error('User has not any of required authorities: ', authorities); - } - return false; - } - - this.stateStorageService.storeUrl(url); - this.router.navigate(['accessdenied']).then(() => { - // only show the login dialog, if the user hasn't logged in yet - if (!account) { - this.loginModalService.open(); - } - }); - return false; - }); - } -} diff --git a/src/main/webapp/app/core/core.module.ts b/src/main/webapp/app/core/core.module.ts deleted file mode 100644 index d9a1d0fb..00000000 --- a/src/main/webapp/app/core/core.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule, LOCALE_ID } from '@angular/core'; -import { DatePipe, registerLocaleData } from '@angular/common'; -import { HttpClientModule } from '@angular/common/http'; -import { Title } from '@angular/platform-browser'; -import locale from '@angular/common/locales/de'; - -@NgModule({ - imports: [HttpClientModule], - exports: [], - declarations: [], - providers: [ - Title, - { - provide: LOCALE_ID, - useValue: 'de' - }, - DatePipe - ] -}) -export class HsadminNgCoreModule { - constructor() { - registerLocaleData(locale); - } -} diff --git a/src/main/webapp/app/core/index.ts b/src/main/webapp/app/core/index.ts deleted file mode 100644 index fbfcfd35..00000000 --- a/src/main/webapp/app/core/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -export * from './auth/csrf.service'; -export * from './auth/state-storage.service'; -export * from './auth/account.service'; -export * from './auth/auth-jwt.service'; -export * from './language/language.helper'; -export * from './language/language.constants'; -export * from './user/account.model'; -export * from './user/user.model'; -export * from './auth/user-route-access-service'; -export * from './login/login-modal.service'; -export * from './login/login.service'; -export * from './user/user.service'; -export * from './core.module'; diff --git a/src/main/webapp/app/core/language/language.constants.ts b/src/main/webapp/app/core/language/language.constants.ts deleted file mode 100644 index 15bcff4c..00000000 --- a/src/main/webapp/app/core/language/language.constants.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - Languages codes are ISO_639-1 codes, see http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes - They are written in English to avoid character encoding issues (not a perfect solution) -*/ -export const LANGUAGES: string[] = [ - 'de', - 'en' - // jhipster-needle-i18n-language-constant - JHipster will add/remove languages in this array -]; diff --git a/src/main/webapp/app/core/language/language.helper.ts b/src/main/webapp/app/core/language/language.helper.ts deleted file mode 100644 index 4c0072b1..00000000 --- a/src/main/webapp/app/core/language/language.helper.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Injectable, RendererFactory2, Renderer2 } from '@angular/core'; -import { Title } from '@angular/platform-browser'; -import { Router, ActivatedRouteSnapshot } from '@angular/router'; -import { TranslateService, LangChangeEvent } from '@ngx-translate/core'; -import { BehaviorSubject, Observable } from 'rxjs'; - -import { LANGUAGES } from 'app/core/language/language.constants'; - -@Injectable({ providedIn: 'root' }) -export class JhiLanguageHelper { - renderer: Renderer2 = null; - private _language: BehaviorSubject; - - constructor( - private translateService: TranslateService, - private titleService: Title, - private router: Router, - rootRenderer: RendererFactory2 - ) { - this._language = new BehaviorSubject(this.translateService.currentLang); - this.renderer = rootRenderer.createRenderer(document.querySelector('html'), null); - this.init(); - } - - getAll(): Promise { - return Promise.resolve(LANGUAGES); - } - - get language(): Observable { - return this._language.asObservable(); - } - - /** - * Update the window title using params in the following - * order: - * 1. titleKey parameter - * 2. $state.$current.data.pageTitle (current state page title) - * 3. 'global.title' - */ - updateTitle(titleKey?: string) { - if (!titleKey) { - titleKey = this.getPageTitle(this.router.routerState.snapshot.root); - } - - this.translateService.get(titleKey).subscribe(title => { - this.titleService.setTitle(title); - }); - } - - private init() { - this.translateService.onLangChange.subscribe((event: LangChangeEvent) => { - this._language.next(this.translateService.currentLang); - this.renderer.setAttribute(document.querySelector('html'), 'lang', this.translateService.currentLang); - this.updateTitle(); - }); - } - - private getPageTitle(routeSnapshot: ActivatedRouteSnapshot) { - let title: string = routeSnapshot.data && routeSnapshot.data['pageTitle'] ? routeSnapshot.data['pageTitle'] : 'hsadminNgApp'; - if (routeSnapshot.firstChild) { - title = this.getPageTitle(routeSnapshot.firstChild) || title; - } - return title; - } -} diff --git a/src/main/webapp/app/core/login/login-modal.service.ts b/src/main/webapp/app/core/login/login-modal.service.ts deleted file mode 100644 index a0002aa5..00000000 --- a/src/main/webapp/app/core/login/login-modal.service.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Injectable } from '@angular/core'; -import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; - -import { JhiLoginModalComponent } from 'app/shared/login/login.component'; - -@Injectable({ providedIn: 'root' }) -export class LoginModalService { - private isOpen = false; - constructor(private modalService: NgbModal) {} - - open(): NgbModalRef { - if (this.isOpen) { - return; - } - this.isOpen = true; - const modalRef = this.modalService.open(JhiLoginModalComponent); - modalRef.result.then( - result => { - this.isOpen = false; - }, - reason => { - this.isOpen = false; - } - ); - return modalRef; - } -} diff --git a/src/main/webapp/app/core/login/login.service.ts b/src/main/webapp/app/core/login/login.service.ts deleted file mode 100644 index e91508ff..00000000 --- a/src/main/webapp/app/core/login/login.service.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { AccountService } from 'app/core/auth/account.service'; -import { AuthServerProvider } from 'app/core/auth/auth-jwt.service'; - -@Injectable({ providedIn: 'root' }) -export class LoginService { - constructor(private accountService: AccountService, private authServerProvider: AuthServerProvider) {} - - login(credentials, callback?) { - const cb = callback || function() {}; - - return new Promise((resolve, reject) => { - this.authServerProvider.login(credentials).subscribe( - data => { - this.accountService.identity(true).then(account => { - resolve(data); - }); - return cb(); - }, - err => { - this.logout(); - reject(err); - return cb(err); - } - ); - }); - } - - loginWithToken(jwt, rememberMe) { - return this.authServerProvider.loginWithToken(jwt, rememberMe); - } - - logout() { - this.authServerProvider.logout().subscribe(); - this.accountService.authenticate(null); - } -} diff --git a/src/main/webapp/app/core/user/account.model.ts b/src/main/webapp/app/core/user/account.model.ts deleted file mode 100644 index 35679657..00000000 --- a/src/main/webapp/app/core/user/account.model.ts +++ /dev/null @@ -1,12 +0,0 @@ -export class Account { - constructor( - public activated: boolean, - public authorities: string[], - public email: string, - public firstName: string, - public langKey: string, - public lastName: string, - public login: string, - public imageUrl: string - ) {} -} diff --git a/src/main/webapp/app/core/user/user.model.ts b/src/main/webapp/app/core/user/user.model.ts deleted file mode 100644 index e82da11a..00000000 --- a/src/main/webapp/app/core/user/user.model.ts +++ /dev/null @@ -1,47 +0,0 @@ -export interface IUser { - id?: any; - login?: string; - firstName?: string; - lastName?: string; - email?: string; - activated?: boolean; - langKey?: string; - authorities?: any[]; - createdBy?: string; - createdDate?: Date; - lastModifiedBy?: string; - lastModifiedDate?: Date; - password?: string; -} - -export class User implements IUser { - constructor( - public id?: any, - public login?: string, - public firstName?: string, - public lastName?: string, - public email?: string, - public activated?: boolean, - public langKey?: string, - public authorities?: any[], - public createdBy?: string, - public createdDate?: Date, - public lastModifiedBy?: string, - public lastModifiedDate?: Date, - public password?: string - ) { - this.id = id ? id : null; - this.login = login ? login : null; - this.firstName = firstName ? firstName : null; - this.lastName = lastName ? lastName : null; - this.email = email ? email : null; - this.activated = activated ? activated : false; - this.langKey = langKey ? langKey : null; - this.authorities = authorities ? authorities : null; - this.createdBy = createdBy ? createdBy : null; - this.createdDate = createdDate ? createdDate : null; - this.lastModifiedBy = lastModifiedBy ? lastModifiedBy : null; - this.lastModifiedDate = lastModifiedDate ? lastModifiedDate : null; - this.password = password ? password : null; - } -} diff --git a/src/main/webapp/app/core/user/user.service.ts b/src/main/webapp/app/core/user/user.service.ts deleted file mode 100644 index 5c8065be..00000000 --- a/src/main/webapp/app/core/user/user.service.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -import { SERVER_API_URL } from 'app/app.constants'; -import { createRequestOption } from 'app/shared/util/request-util'; -import { IUser } from './user.model'; - -@Injectable({ providedIn: 'root' }) -export class UserService { - public resourceUrl = SERVER_API_URL + 'api/users'; - - constructor(private http: HttpClient) {} - - create(user: IUser): Observable> { - return this.http.post(this.resourceUrl, user, { observe: 'response' }); - } - - update(user: IUser): Observable> { - return this.http.put(this.resourceUrl, user, { observe: 'response' }); - } - - find(login: string): Observable> { - return this.http.get(`${this.resourceUrl}/${login}`, { observe: 'response' }); - } - - query(req?: any): Observable> { - const options = createRequestOption(req); - return this.http.get(this.resourceUrl, { params: options, observe: 'response' }); - } - - delete(login: string): Observable> { - return this.http.delete(`${this.resourceUrl}/${login}`, { observe: 'response' }); - } - - authorities(): Observable { - return this.http.get(SERVER_API_URL + 'api/users/authorities'); - } -} diff --git a/src/main/webapp/app/entities/asset/asset-delete-dialog.component.html b/src/main/webapp/app/entities/asset/asset-delete-dialog.component.html deleted file mode 100644 index bd1b9f78..00000000 --- a/src/main/webapp/app/entities/asset/asset-delete-dialog.component.html +++ /dev/null @@ -1,19 +0,0 @@ -
- - - -
diff --git a/src/main/webapp/app/entities/asset/asset-delete-dialog.component.ts b/src/main/webapp/app/entities/asset/asset-delete-dialog.component.ts deleted file mode 100644 index ff1dd113..00000000 --- a/src/main/webapp/app/entities/asset/asset-delete-dialog.component.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; - -import { NgbActiveModal, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { JhiEventManager } from 'ng-jhipster'; - -import { IAsset } from 'app/shared/model/asset.model'; -import { AssetService } from './asset.service'; - -@Component({ - selector: 'jhi-asset-delete-dialog', - templateUrl: './asset-delete-dialog.component.html' -}) -export class AssetDeleteDialogComponent { - asset: IAsset; - - constructor(protected assetService: AssetService, public activeModal: NgbActiveModal, protected eventManager: JhiEventManager) {} - - clear() { - this.activeModal.dismiss('cancel'); - } - - confirmDelete(id: number) { - this.assetService.delete(id).subscribe(response => { - this.eventManager.broadcast({ - name: 'assetListModification', - content: 'Deleted an asset' - }); - this.activeModal.dismiss(true); - }); - } -} - -@Component({ - selector: 'jhi-asset-delete-popup', - template: '' -}) -export class AssetDeletePopupComponent implements OnInit, OnDestroy { - protected ngbModalRef: NgbModalRef; - - constructor(protected activatedRoute: ActivatedRoute, protected router: Router, protected modalService: NgbModal) {} - - ngOnInit() { - this.activatedRoute.data.subscribe(({ asset }) => { - setTimeout(() => { - this.ngbModalRef = this.modalService.open(AssetDeleteDialogComponent as Component, { size: 'lg', backdrop: 'static' }); - this.ngbModalRef.componentInstance.asset = asset; - this.ngbModalRef.result.then( - result => { - this.router.navigate(['/asset', { outlets: { popup: null } }]); - this.ngbModalRef = null; - }, - reason => { - this.router.navigate(['/asset', { outlets: { popup: null } }]); - this.ngbModalRef = null; - } - ); - }, 0); - }); - } - - ngOnDestroy() { - this.ngbModalRef = null; - } -} diff --git a/src/main/webapp/app/entities/asset/asset-detail.component.html b/src/main/webapp/app/entities/asset/asset-detail.component.html deleted file mode 100644 index f3dd73ed..00000000 --- a/src/main/webapp/app/entities/asset/asset-detail.component.html +++ /dev/null @@ -1,49 +0,0 @@ -
-
-
-

Asset: #{{asset.id}} - {{asset.membershipDisplayLabel}}

-
- -
-
Document Date
-
- {{asset.documentDate | date:'mediumDate'}} -
-
Value Date
-
- {{asset.valueDate | date:'mediumDate'}} -
-
Action
-
- {{asset.action}} -
-
Amount
-
- {{asset.amount}} -
-
Remark
-
- -
-
Membership
-
- -
-
- - - - -
-
-
diff --git a/src/main/webapp/app/entities/asset/asset-detail.component.ts b/src/main/webapp/app/entities/asset/asset-detail.component.ts deleted file mode 100644 index 635ee255..00000000 --- a/src/main/webapp/app/entities/asset/asset-detail.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { IAsset } from 'app/shared/model/asset.model'; - -@Component({ - selector: 'jhi-asset-detail', - templateUrl: './asset-detail.component.html' -}) -export class AssetDetailComponent implements OnInit { - asset: IAsset; - - constructor(protected activatedRoute: ActivatedRoute) {} - - ngOnInit() { - this.activatedRoute.data.subscribe(({ asset }) => { - this.asset = asset; - }); - } - - previousState() { - window.history.back(); - } -} diff --git a/src/main/webapp/app/entities/asset/asset-update.component.html b/src/main/webapp/app/entities/asset/asset-update.component.html deleted file mode 100644 index d9d36906..00000000 --- a/src/main/webapp/app/entities/asset/asset-update.component.html +++ /dev/null @@ -1,112 +0,0 @@ -
-
-
-

Create or edit a Asset

-
- -
- - -
-
- -
- - - - -
-
- - This field is required. - -
-
-
- -
- - - - -
-
- - This field is required. - -
-
-
- - -
- - This field is required. - -
-
-
- - -
- - This field is required. - - - This field should be a number. - -
-
-
- - -
- - This field cannot be longer than 160 characters. - -
-
- -
- - -
-
- - This field is required. - -
-
-
- - -
-
-
-
diff --git a/src/main/webapp/app/entities/asset/asset-update.component.ts b/src/main/webapp/app/entities/asset/asset-update.component.ts deleted file mode 100644 index a58ab009..00000000 --- a/src/main/webapp/app/entities/asset/asset-update.component.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { HttpResponse, HttpErrorResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import * as moment from 'moment'; -import { JhiAlertService } from 'ng-jhipster'; -import { IAsset } from 'app/shared/model/asset.model'; -import { AssetService } from './asset.service'; -import { IMembership } from 'app/shared/model/membership.model'; -import { MembershipService } from 'app/entities/membership'; - -@Component({ - selector: 'jhi-asset-update', - templateUrl: './asset-update.component.html' -}) -export class AssetUpdateComponent implements OnInit { - asset: IAsset; - isSaving: boolean; - - memberships: IMembership[]; - documentDateDp: any; - valueDateDp: any; - - constructor( - protected jhiAlertService: JhiAlertService, - protected assetService: AssetService, - protected membershipService: MembershipService, - protected activatedRoute: ActivatedRoute - ) {} - - ngOnInit() { - this.isSaving = false; - this.activatedRoute.data.subscribe(({ asset }) => { - this.asset = asset; - }); - this.membershipService - .query() - .pipe( - filter((mayBeOk: HttpResponse) => mayBeOk.ok), - map((response: HttpResponse) => response.body) - ) - .subscribe((res: IMembership[]) => (this.memberships = res), (res: HttpErrorResponse) => this.onError(res.message)); - } - - previousState() { - window.history.back(); - } - - save() { - this.isSaving = true; - if (this.asset.id !== undefined) { - this.subscribeToSaveResponse(this.assetService.update(this.asset)); - } else { - this.subscribeToSaveResponse(this.assetService.create(this.asset)); - } - } - - protected subscribeToSaveResponse(result: Observable>) { - result.subscribe((res: HttpResponse) => this.onSaveSuccess(), (res: HttpErrorResponse) => this.onSaveError()); - } - - protected onSaveSuccess() { - this.isSaving = false; - this.previousState(); - } - - protected onSaveError() { - this.isSaving = false; - } - - protected onError(errorMessage: string) { - this.jhiAlertService.error(errorMessage, null, null); - } - - trackMembershipById(index: number, item: IMembership) { - return item.id; - } -} diff --git a/src/main/webapp/app/entities/asset/asset.component.html b/src/main/webapp/app/entities/asset/asset.component.html deleted file mode 100644 index 2545bb6f..00000000 --- a/src/main/webapp/app/entities/asset/asset.component.html +++ /dev/null @@ -1,94 +0,0 @@ -
-

- Assets - -

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ID Document Date Value Date Action Amount Membership
- - - -
{{asset.id}}{{asset.documentDate | date:'mediumDate'}}{{asset.valueDate | date:'mediumDate'}}{{asset.action}}{{asset.amount}} - - -
- - - -
-
-
-
diff --git a/src/main/webapp/app/entities/asset/asset.component.ts b/src/main/webapp/app/entities/asset/asset.component.ts deleted file mode 100644 index 19220504..00000000 --- a/src/main/webapp/app/entities/asset/asset.component.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http'; -import { Subscription } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster'; - -import { IAsset } from 'app/shared/model/asset.model'; -import { AccountService } from 'app/core'; - -import { ITEMS_PER_PAGE } from 'app/shared'; -import { AssetService } from './asset.service'; -import { IMembership } from 'app/shared/model/membership.model'; -import { MembershipService } from 'app/entities/membership'; -import { queryEquals, queryYearAsDateRange, TableFilter } from 'app/shared/util/tablefilter'; - -@Component({ - selector: 'jhi-asset', - templateUrl: './asset.component.html' -}) -export class AssetComponent implements OnInit, OnDestroy { - assets: IAsset[]; - currentAccount: any; - eventSubscriber: Subscription; - itemsPerPage: number; - links: any; - page: any; - predicate: any; - reverse: any; - totalItems: number; - memberships: IMembership[]; - filter: TableFilter<{ - documentDate?: string; - valueDate?: string; - action?: string; - amount?: string; - membershipId?: string; - }>; - - constructor( - protected assetService: AssetService, - protected membershipService: MembershipService, - protected jhiAlertService: JhiAlertService, - protected eventManager: JhiEventManager, - protected parseLinks: JhiParseLinks, - protected accountService: AccountService - ) { - this.assets = []; - this.itemsPerPage = ITEMS_PER_PAGE; - this.page = 0; - this.links = { - last: 0 - }; - this.predicate = 'id'; - this.reverse = true; - this.filter = new TableFilter( - { - documentDate: queryYearAsDateRange, - valueDate: queryYearAsDateRange, - action: queryEquals, - amount: queryEquals, - membershipId: queryEquals - }, - 500, - () => { - this.reset(); - } - ); - } - - loadAll() { - this.assetService - .query({ - ...this.filter.buildQueryCriteria(), - page: this.page, - size: this.itemsPerPage, - sort: this.sort() - }) - .subscribe( - (res: HttpResponse) => this.paginateAssets(res.body, res.headers), - (res: HttpErrorResponse) => this.onError(res.message) - ); - } - - reset() { - this.page = 0; - this.assets = []; - this.loadAll(); - } - - loadPage(page) { - this.page = page; - this.loadAll(); - } - - ngOnInit() { - this.loadAll(); - this.accountService.identity().then(account => { - this.currentAccount = account; - }); - this.membershipService - .query() - .pipe( - filter((mayBeOk: HttpResponse) => mayBeOk.ok), - map((response: HttpResponse) => response.body) - ) - .subscribe((res: IMembership[]) => (this.memberships = res), (res: HttpErrorResponse) => this.onError(res.message)); - this.registerChangeInAssets(); - } - - ngOnDestroy() { - this.eventManager.destroy(this.eventSubscriber); - } - - trackId(index: number, item: { id: number }) { - return item.id; - } - - registerChangeInAssets() { - this.eventSubscriber = this.eventManager.subscribe('assetListModification', response => this.reset()); - } - - sort() { - const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')]; - if (this.predicate !== 'id') { - result.push('id'); - } - return result; - } - - protected paginateAssets(data: IAsset[], headers: HttpHeaders) { - this.links = this.parseLinks.parse(headers.get('link')); - this.totalItems = parseInt(headers.get('X-Total-Count'), 10); - for (let i = 0; i < data.length; i++) { - this.assets.push(data[i]); - } - } - - protected onError(errorMessage: string) { - this.jhiAlertService.error(errorMessage, null, null); - } -} diff --git a/src/main/webapp/app/entities/asset/asset.module.ts b/src/main/webapp/app/entities/asset/asset.module.ts deleted file mode 100644 index 282a44e4..00000000 --- a/src/main/webapp/app/entities/asset/asset.module.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { JhiLanguageService } from 'ng-jhipster'; -import { JhiLanguageHelper } from 'app/core'; - -import { HsadminNgSharedModule } from 'app/shared'; -import { - AssetComponent, - AssetDetailComponent, - AssetUpdateComponent, - AssetDeletePopupComponent, - AssetDeleteDialogComponent, - assetRoute, - assetPopupRoute -} from './'; - -const ENTITY_STATES = [...assetRoute, ...assetPopupRoute]; - -@NgModule({ - imports: [HsadminNgSharedModule, RouterModule.forChild(ENTITY_STATES)], - declarations: [AssetComponent, AssetDetailComponent, AssetUpdateComponent, AssetDeleteDialogComponent, AssetDeletePopupComponent], - entryComponents: [AssetComponent, AssetUpdateComponent, AssetDeleteDialogComponent, AssetDeletePopupComponent], - providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class HsadminNgAssetModule { - constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) { - this.languageHelper.language.subscribe((languageKey: string) => { - if (languageKey !== undefined) { - this.languageService.changeLanguage(languageKey); - } - }); - } -} diff --git a/src/main/webapp/app/entities/asset/asset.route.ts b/src/main/webapp/app/entities/asset/asset.route.ts deleted file mode 100644 index b7e030d8..00000000 --- a/src/main/webapp/app/entities/asset/asset.route.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpResponse } from '@angular/common/http'; -import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router'; -import { UserRouteAccessService } from 'app/core'; -import { Observable, of } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { Asset } from 'app/shared/model/asset.model'; -import { AssetService } from './asset.service'; -import { AssetComponent } from './asset.component'; -import { AssetDetailComponent } from './asset-detail.component'; -import { AssetUpdateComponent } from './asset-update.component'; -import { AssetDeletePopupComponent } from './asset-delete-dialog.component'; -import { IAsset } from 'app/shared/model/asset.model'; - -@Injectable({ providedIn: 'root' }) -export class AssetResolve implements Resolve { - constructor(private service: AssetService) {} - - resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { - const id = route.params['id'] ? route.params['id'] : null; - if (id) { - return this.service.find(id).pipe( - filter((response: HttpResponse) => response.ok), - map((asset: HttpResponse) => asset.body) - ); - } - return of(new Asset()); - } -} - -export const assetRoute: Routes = [ - { - path: '', - component: AssetComponent, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.asset.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: ':id/view', - component: AssetDetailComponent, - resolve: { - asset: AssetResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.asset.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: 'new', - component: AssetUpdateComponent, - resolve: { - asset: AssetResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.asset.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: ':id/edit', - component: AssetUpdateComponent, - resolve: { - asset: AssetResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.asset.home.title' - }, - canActivate: [UserRouteAccessService] - } -]; - -export const assetPopupRoute: Routes = [ - { - path: ':id/delete', - component: AssetDeletePopupComponent, - resolve: { - asset: AssetResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.asset.home.title' - }, - canActivate: [UserRouteAccessService], - outlet: 'popup' - } -]; diff --git a/src/main/webapp/app/entities/asset/asset.service.ts b/src/main/webapp/app/entities/asset/asset.service.ts deleted file mode 100644 index 379d2cec..00000000 --- a/src/main/webapp/app/entities/asset/asset.service.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import * as moment from 'moment'; -import { DATE_FORMAT } from 'app/shared/constants/input.constants'; -import { map } from 'rxjs/operators'; - -import { SERVER_API_URL } from 'app/app.constants'; -import { createRequestOption } from 'app/shared'; -import { IAsset } from 'app/shared/model/asset.model'; - -type EntityResponseType = HttpResponse; -type EntityArrayResponseType = HttpResponse; - -@Injectable({ providedIn: 'root' }) -export class AssetService { - public resourceUrl = SERVER_API_URL + 'api/assets'; - - constructor(protected http: HttpClient) {} - - create(asset: IAsset): Observable { - const copy = this.convertDateFromClient(asset); - return this.http - .post(this.resourceUrl, copy, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - update(asset: IAsset): Observable { - const copy = this.convertDateFromClient(asset); - return this.http - .put(this.resourceUrl, copy, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - find(id: number): Observable { - return this.http - .get(`${this.resourceUrl}/${id}`, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - query(req?: any): Observable { - const options = createRequestOption(req); - return this.http - .get(this.resourceUrl, { params: options, observe: 'response' }) - .pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res))); - } - - delete(id: number): Observable> { - return this.http.delete(`${this.resourceUrl}/${id}`, { observe: 'response' }); - } - - protected convertDateFromClient(asset: IAsset): IAsset { - const copy: IAsset = Object.assign({}, asset, { - documentDate: asset.documentDate != null && asset.documentDate.isValid() ? asset.documentDate.format(DATE_FORMAT) : null, - valueDate: asset.valueDate != null && asset.valueDate.isValid() ? asset.valueDate.format(DATE_FORMAT) : null - }); - return copy; - } - - protected convertDateFromServer(res: EntityResponseType): EntityResponseType { - if (res.body) { - res.body.documentDate = res.body.documentDate != null ? moment(res.body.documentDate) : null; - res.body.valueDate = res.body.valueDate != null ? moment(res.body.valueDate) : null; - } - return res; - } - - protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType { - if (res.body) { - res.body.forEach((asset: IAsset) => { - asset.documentDate = asset.documentDate != null ? moment(asset.documentDate) : null; - asset.valueDate = asset.valueDate != null ? moment(asset.valueDate) : null; - }); - } - return res; - } -} diff --git a/src/main/webapp/app/entities/asset/index.ts b/src/main/webapp/app/entities/asset/index.ts deleted file mode 100644 index 5f865f3d..00000000 --- a/src/main/webapp/app/entities/asset/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './asset.service'; -export * from './asset-update.component'; -export * from './asset-delete-dialog.component'; -export * from './asset-detail.component'; -export * from './asset.component'; -export * from './asset.route'; diff --git a/src/main/webapp/app/entities/customer/customer-delete-dialog.component.html b/src/main/webapp/app/entities/customer/customer-delete-dialog.component.html deleted file mode 100644 index b04a8e62..00000000 --- a/src/main/webapp/app/entities/customer/customer-delete-dialog.component.html +++ /dev/null @@ -1,19 +0,0 @@ -
- - - -
diff --git a/src/main/webapp/app/entities/customer/customer-delete-dialog.component.ts b/src/main/webapp/app/entities/customer/customer-delete-dialog.component.ts deleted file mode 100644 index 3c96919d..00000000 --- a/src/main/webapp/app/entities/customer/customer-delete-dialog.component.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; - -import { NgbActiveModal, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { JhiEventManager } from 'ng-jhipster'; - -import { ICustomer } from 'app/shared/model/customer.model'; -import { CustomerService } from './customer.service'; - -@Component({ - selector: 'jhi-customer-delete-dialog', - templateUrl: './customer-delete-dialog.component.html' -}) -export class CustomerDeleteDialogComponent { - customer: ICustomer; - - constructor(protected customerService: CustomerService, public activeModal: NgbActiveModal, protected eventManager: JhiEventManager) {} - - clear() { - this.activeModal.dismiss('cancel'); - } - - confirmDelete(id: number) { - this.customerService.delete(id).subscribe(response => { - this.eventManager.broadcast({ - name: 'customerListModification', - content: 'Deleted an customer' - }); - this.activeModal.dismiss(true); - }); - } -} - -@Component({ - selector: 'jhi-customer-delete-popup', - template: '' -}) -export class CustomerDeletePopupComponent implements OnInit, OnDestroy { - protected ngbModalRef: NgbModalRef; - - constructor(protected activatedRoute: ActivatedRoute, protected router: Router, protected modalService: NgbModal) {} - - ngOnInit() { - this.activatedRoute.data.subscribe(({ customer }) => { - setTimeout(() => { - this.ngbModalRef = this.modalService.open(CustomerDeleteDialogComponent as Component, { size: 'lg', backdrop: 'static' }); - this.ngbModalRef.componentInstance.customer = customer; - this.ngbModalRef.result.then( - result => { - this.router.navigate(['/customer', { outlets: { popup: null } }]); - this.ngbModalRef = null; - }, - reason => { - this.router.navigate(['/customer', { outlets: { popup: null } }]); - this.ngbModalRef = null; - } - ); - }, 0); - }); - } - - ngOnDestroy() { - this.ngbModalRef = null; - } -} diff --git a/src/main/webapp/app/entities/customer/customer-detail.component.html b/src/main/webapp/app/entities/customer/customer-detail.component.html deleted file mode 100644 index 5e479fbb..00000000 --- a/src/main/webapp/app/entities/customer/customer-detail.component.html +++ /dev/null @@ -1,83 +0,0 @@ -
-
-
-

Customer: {{customer.displayLabel}}

-
- -
-
Reference
-
- {{customer.reference}} -
-
Prefix
-
- {{customer.prefix}} -
-
Name
-
- {{customer.name}} -
-
Kind
-
- {{customer.kind}} -
-
Birth Date
-
- {{customer.birthDate}} -
-
Birth Place
-
- {{customer.birthPlace}} -
-
Registration Court
-
- {{customer.registrationCourt}} -
-
Registration Number
-
- {{customer.registrationNumber}} -
-
Vat Region
-
- {{customer.vatRegion}} -
-
Vat Number
-
- {{customer.vatNumber}} -
-
Contractual Salutation
-
- {{customer.contractualSalutation}} -
-
Contractual Address
-
- -
-
Billing Salutation
-
- {{customer.billingSalutation}} -
-
Billing Address
-
- -
-
Remark
-
- -
-
- - - - -
-
-
diff --git a/src/main/webapp/app/entities/customer/customer-detail.component.ts b/src/main/webapp/app/entities/customer/customer-detail.component.ts deleted file mode 100644 index da1b94e3..00000000 --- a/src/main/webapp/app/entities/customer/customer-detail.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { ICustomer } from 'app/shared/model/customer.model'; - -@Component({ - selector: 'jhi-customer-detail', - templateUrl: './customer-detail.component.html' -}) -export class CustomerDetailComponent implements OnInit { - customer: ICustomer; - - constructor(protected activatedRoute: ActivatedRoute) {} - - ngOnInit() { - this.activatedRoute.data.subscribe(({ customer }) => { - this.customer = customer; - }); - } - - previousState() { - window.history.back(); - } -} diff --git a/src/main/webapp/app/entities/customer/customer-update.component.html b/src/main/webapp/app/entities/customer/customer-update.component.html deleted file mode 100644 index c59b92ac..00000000 --- a/src/main/webapp/app/entities/customer/customer-update.component.html +++ /dev/null @@ -1,222 +0,0 @@ -
-
-
-

Create or edit a Customer

-
- -
- - -
-
- - -
- - This field is required. - - - This field should be at least 10000. - - - This field cannot be more than 99999. - - - This field should be a number. - -
-
-
- - -
- - This field is required. - - - This field cannot be longer than 3 characters. - - - This field should follow pattern for "Prefix". - -
-
-
- - -
- - This field is required. - - - This field cannot be longer than 80 characters. - -
-
-
- - -
- - This field is required. - -
-
-
- -
- - - - -
-
-
- - -
- - This field cannot be longer than 80 characters. - -
-
-
- - -
- - This field cannot be longer than 80 characters. - -
-
-
- - -
- - This field cannot be longer than 80 characters. - -
-
-
- - -
- - This field is required. - -
-
-
- - -
- - This field cannot be longer than 40 characters. - -
-
-
- - -
- - This field cannot be longer than 80 characters. - -
-
-
- - -
- - This field is required. - - - This field cannot be longer than 400 characters. - -
-
-
- - -
- - This field cannot be longer than 80 characters. - -
-
-
- - -
- - This field cannot be longer than 400 characters. - -
-
-
- - -
- - This field cannot be longer than 160 characters. - -
-
- -
-
- - -
-
-
-
diff --git a/src/main/webapp/app/entities/customer/customer-update.component.ts b/src/main/webapp/app/entities/customer/customer-update.component.ts deleted file mode 100644 index e6c33ae8..00000000 --- a/src/main/webapp/app/entities/customer/customer-update.component.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { HttpErrorResponse, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import { ICustomer } from 'app/shared/model/customer.model'; -import { CustomerService } from './customer.service'; - -@Component({ - selector: 'jhi-customer-update', - templateUrl: './customer-update.component.html' -}) -export class CustomerUpdateComponent implements OnInit { - customer: ICustomer; - isSaving: boolean; - birthDateDp: any; - - constructor(protected customerService: CustomerService, protected activatedRoute: ActivatedRoute) {} - - ngOnInit() { - this.isSaving = false; - this.activatedRoute.data.subscribe(({ customer }) => { - this.customer = customer; - }); - } - - previousState() { - window.history.back(); - } - - save() { - this.isSaving = true; - if (this.customer.id !== undefined) { - this.subscribeToSaveResponse(this.customerService.update(this.customer)); - } else { - this.subscribeToSaveResponse(this.customerService.create(this.customer)); - } - } - - protected subscribeToSaveResponse(result: Observable>) { - result.subscribe((res: HttpResponse) => this.onSaveSuccess(), (res: HttpErrorResponse) => this.onSaveError()); - } - - protected onSaveSuccess() { - this.isSaving = false; - this.previousState(); - } - - protected onSaveError() { - this.isSaving = false; - } -} diff --git a/src/main/webapp/app/entities/customer/customer.component.html b/src/main/webapp/app/entities/customer/customer.component.html deleted file mode 100644 index f3183904..00000000 --- a/src/main/webapp/app/entities/customer/customer.component.html +++ /dev/null @@ -1,74 +0,0 @@ -
-

- Customers - -

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ID Reference Prefix Name Kind
- -
{{customer.id}}{{customer.reference}}{{customer.prefix}}{{customer.name}}{{customer.kind}} -
- - - -
-
-
-
diff --git a/src/main/webapp/app/entities/customer/customer.component.ts b/src/main/webapp/app/entities/customer/customer.component.ts deleted file mode 100644 index 94aa2e18..00000000 --- a/src/main/webapp/app/entities/customer/customer.component.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http'; -import { Subscription } from 'rxjs'; -import { JhiAlertService, JhiEventManager, JhiParseLinks } from 'ng-jhipster'; - -import { ICustomer } from 'app/shared/model/customer.model'; -import { AccountService } from 'app/core'; - -import { ITEMS_PER_PAGE } from 'app/shared'; -import { CustomerService } from './customer.service'; -import { TableFilter } from 'app/shared/util/tablefilter'; - -@Component({ - selector: 'jhi-customer', - templateUrl: './customer.component.html' -}) -export class CustomerComponent implements OnInit, OnDestroy { - customers: ICustomer[]; - currentAccount: any; - eventSubscriber: Subscription; - itemsPerPage: number; - links: any; - page: any; - predicate: any; - reverse: any; - totalItems: number; - filter: TableFilter<{ reference?: string; prefix?: string; name?: string; kind?: string }>; - - constructor( - protected customerService: CustomerService, - protected jhiAlertService: JhiAlertService, - protected eventManager: JhiEventManager, - protected parseLinks: JhiParseLinks, - protected accountService: AccountService - ) { - this.customers = []; - this.itemsPerPage = ITEMS_PER_PAGE; - this.page = 0; - this.links = { - last: 0 - }; - this.predicate = 'id'; - this.reverse = true; - this.filter = new TableFilter( - { - reference: 'reference.equals', - prefix: 'prefix.contains', - name: 'name.contains', - kind: 'kind.equals' - }, - 500, - () => { - this.reset(); - } - ); - } - - loadAll() { - this.customerService - .query({ - ...this.filter.buildQueryCriteria(), - page: this.page, - size: this.itemsPerPage, - sort: this.sort() - }) - .subscribe( - (res: HttpResponse) => this.paginateCustomers(res.body, res.headers), - (res: HttpErrorResponse) => this.onError(res.message) - ); - } - - reset() { - this.page = 0; - this.customers = []; - this.loadAll(); - } - - loadPage(page) { - this.page = page; - this.loadAll(); - } - - ngOnInit() { - this.loadAll(); - this.accountService.identity().then(account => { - this.currentAccount = account; - }); - this.registerChangeInCustomers(); - } - - ngOnDestroy() { - this.eventManager.destroy(this.eventSubscriber); - } - - trackId(index: number, item: ICustomer) { - return item.id; - } - - registerChangeInCustomers() { - this.eventSubscriber = this.eventManager.subscribe('customerListModification', response => this.reset()); - } - - sort() { - const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')]; - if (this.predicate !== 'id') { - result.push('id'); - } - return result; - } - - protected paginateCustomers(data: ICustomer[], headers: HttpHeaders) { - this.links = this.parseLinks.parse(headers.get('link')); - this.totalItems = parseInt(headers.get('X-Total-Count'), 10); - for (let i = 0; i < data.length; i++) { - this.customers.push(data[i]); - } - } - - protected onError(errorMessage: string) { - this.jhiAlertService.error(errorMessage, null, null); - } -} diff --git a/src/main/webapp/app/entities/customer/customer.module.ts b/src/main/webapp/app/entities/customer/customer.module.ts deleted file mode 100644 index 8d50348c..00000000 --- a/src/main/webapp/app/entities/customer/customer.module.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { JhiLanguageService } from 'ng-jhipster'; -import { JhiLanguageHelper } from 'app/core'; - -import { HsadminNgSharedModule } from 'app/shared'; -import { - CustomerComponent, - CustomerDetailComponent, - CustomerUpdateComponent, - CustomerDeletePopupComponent, - CustomerDeleteDialogComponent, - customerRoute, - customerPopupRoute -} from './'; - -const ENTITY_STATES = [...customerRoute, ...customerPopupRoute]; - -@NgModule({ - imports: [HsadminNgSharedModule, RouterModule.forChild(ENTITY_STATES)], - declarations: [ - CustomerComponent, - CustomerDetailComponent, - CustomerUpdateComponent, - CustomerDeleteDialogComponent, - CustomerDeletePopupComponent - ], - entryComponents: [CustomerComponent, CustomerUpdateComponent, CustomerDeleteDialogComponent, CustomerDeletePopupComponent], - providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class HsadminNgCustomerModule { - constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) { - this.languageHelper.language.subscribe((languageKey: string) => { - if (languageKey !== undefined) { - this.languageService.changeLanguage(languageKey); - } - }); - } -} diff --git a/src/main/webapp/app/entities/customer/customer.route.ts b/src/main/webapp/app/entities/customer/customer.route.ts deleted file mode 100644 index 269760db..00000000 --- a/src/main/webapp/app/entities/customer/customer.route.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpResponse } from '@angular/common/http'; -import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router'; -import { UserRouteAccessService } from 'app/core'; -import { Observable, of } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { Customer } from 'app/shared/model/customer.model'; -import { CustomerService } from './customer.service'; -import { CustomerComponent } from './customer.component'; -import { CustomerDetailComponent } from './customer-detail.component'; -import { CustomerUpdateComponent } from './customer-update.component'; -import { CustomerDeletePopupComponent } from './customer-delete-dialog.component'; -import { ICustomer } from 'app/shared/model/customer.model'; - -@Injectable({ providedIn: 'root' }) -export class CustomerResolve implements Resolve { - constructor(private service: CustomerService) {} - - resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { - const id = route.params['id'] ? route.params['id'] : null; - if (id) { - return this.service.find(id).pipe( - filter((response: HttpResponse) => response.ok), - map((customer: HttpResponse) => customer.body) - ); - } - return of(new Customer()); - } -} - -export const customerRoute: Routes = [ - { - path: '', - component: CustomerComponent, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.customer.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: ':id/view', - component: CustomerDetailComponent, - resolve: { - customer: CustomerResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.customer.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: 'new', - component: CustomerUpdateComponent, - resolve: { - customer: CustomerResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.customer.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: ':id/edit', - component: CustomerUpdateComponent, - resolve: { - customer: CustomerResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.customer.home.title' - }, - canActivate: [UserRouteAccessService] - } -]; - -export const customerPopupRoute: Routes = [ - { - path: ':id/delete', - component: CustomerDeletePopupComponent, - resolve: { - customer: CustomerResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.customer.home.title' - }, - canActivate: [UserRouteAccessService], - outlet: 'popup' - } -]; diff --git a/src/main/webapp/app/entities/customer/customer.service.ts b/src/main/webapp/app/entities/customer/customer.service.ts deleted file mode 100644 index 7b6951ce..00000000 --- a/src/main/webapp/app/entities/customer/customer.service.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import * as moment from 'moment'; -import { DATE_FORMAT } from 'app/shared/constants/input.constants'; -import { map } from 'rxjs/operators'; - -import { SERVER_API_URL } from 'app/app.constants'; -import { createRequestOption } from 'app/shared'; -import { ICustomer } from 'app/shared/model/customer.model'; - -type EntityResponseType = HttpResponse; -type EntityArrayResponseType = HttpResponse; - -@Injectable({ providedIn: 'root' }) -export class CustomerService { - public resourceUrl = SERVER_API_URL + 'api/customers'; - - constructor(protected http: HttpClient) {} - - create(customer: ICustomer): Observable { - const copy = this.convertDateFromClient(customer); - return this.http - .post(this.resourceUrl, copy, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - update(customer: ICustomer): Observable { - const copy = this.convertDateFromClient(customer); - return this.http - .put(this.resourceUrl, copy, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - find(id: number): Observable { - return this.http - .get(`${this.resourceUrl}/${id}`, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - query(req?: any): Observable { - const options = createRequestOption(req); - return this.http - .get(this.resourceUrl, { params: options, observe: 'response' }) - .pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res))); - } - - delete(id: number): Observable> { - return this.http.delete(`${this.resourceUrl}/${id}`, { observe: 'response' }); - } - - protected convertDateFromClient(customer: ICustomer): ICustomer { - const copy: ICustomer = Object.assign({}, customer, { - birthDate: customer.birthDate != null && customer.birthDate.isValid() ? customer.birthDate.format(DATE_FORMAT) : null - }); - return copy; - } - - protected convertDateFromServer(res: EntityResponseType): EntityResponseType { - if (res.body) { - res.body.birthDate = res.body.birthDate != null ? moment(res.body.birthDate) : null; - } - return res; - } - - protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType { - if (res.body) { - res.body.forEach((customer: ICustomer) => { - customer.birthDate = customer.birthDate != null ? moment(customer.birthDate) : null; - }); - } - return res; - } -} diff --git a/src/main/webapp/app/entities/customer/index.ts b/src/main/webapp/app/entities/customer/index.ts deleted file mode 100644 index 27ae3ca8..00000000 --- a/src/main/webapp/app/entities/customer/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './customer.service'; -export * from './customer-update.component'; -export * from './customer-delete-dialog.component'; -export * from './customer-detail.component'; -export * from './customer.component'; -export * from './customer.route'; diff --git a/src/main/webapp/app/entities/entity.module.ts b/src/main/webapp/app/entities/entity.module.ts deleted file mode 100644 index bdcacf35..00000000 --- a/src/main/webapp/app/entities/entity.module.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -@NgModule({ - imports: [ - RouterModule.forChild([ - { - path: 'customer', - loadChildren: './customer/customer.module#HsadminNgCustomerModule' - }, - { - path: 'membership', - loadChildren: './membership/membership.module#HsadminNgMembershipModule' - }, - { - path: 'share', - loadChildren: './share/share.module#HsadminNgShareModule' - }, - { - path: 'asset', - loadChildren: './asset/asset.module#HsadminNgAssetModule' - }, - { - path: 'sepa-mandate', - loadChildren: './sepa-mandate/sepa-mandate.module#HsadminNgSepaMandateModule' - }, - { - path: 'user-role-assignment', - loadChildren: './user-role-assignment/user-role-assignment.module#HsadminNgUserRoleAssignmentModule' - } - /* jhipster-needle-add-entity-route - JHipster will add entity modules routes here */ - ]) - ], - declarations: [], - entryComponents: [], - providers: [], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class HsadminNgEntityModule {} diff --git a/src/main/webapp/app/entities/membership/index.ts b/src/main/webapp/app/entities/membership/index.ts deleted file mode 100644 index 13a7f938..00000000 --- a/src/main/webapp/app/entities/membership/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './membership.service'; -export * from './membership-update.component'; -export * from './membership-delete-dialog.component'; -export * from './membership-detail.component'; -export * from './membership.component'; -export * from './membership.route'; diff --git a/src/main/webapp/app/entities/membership/membership-delete-dialog.component.html b/src/main/webapp/app/entities/membership/membership-delete-dialog.component.html deleted file mode 100644 index 8749c4ee..00000000 --- a/src/main/webapp/app/entities/membership/membership-delete-dialog.component.html +++ /dev/null @@ -1,19 +0,0 @@ -
- - - -
diff --git a/src/main/webapp/app/entities/membership/membership-delete-dialog.component.ts b/src/main/webapp/app/entities/membership/membership-delete-dialog.component.ts deleted file mode 100644 index ac1787db..00000000 --- a/src/main/webapp/app/entities/membership/membership-delete-dialog.component.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; - -import { NgbActiveModal, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { JhiEventManager } from 'ng-jhipster'; - -import { IMembership } from 'app/shared/model/membership.model'; -import { MembershipService } from './membership.service'; - -@Component({ - selector: 'jhi-membership-delete-dialog', - templateUrl: './membership-delete-dialog.component.html' -}) -export class MembershipDeleteDialogComponent { - membership: IMembership; - - constructor( - protected membershipService: MembershipService, - public activeModal: NgbActiveModal, - protected eventManager: JhiEventManager - ) {} - - clear() { - this.activeModal.dismiss('cancel'); - } - - confirmDelete(id: number) { - this.membershipService.delete(id).subscribe(response => { - this.eventManager.broadcast({ - name: 'membershipListModification', - content: 'Deleted an membership' - }); - this.activeModal.dismiss(true); - }); - } -} - -@Component({ - selector: 'jhi-membership-delete-popup', - template: '' -}) -export class MembershipDeletePopupComponent implements OnInit, OnDestroy { - protected ngbModalRef: NgbModalRef; - - constructor(protected activatedRoute: ActivatedRoute, protected router: Router, protected modalService: NgbModal) {} - - ngOnInit() { - this.activatedRoute.data.subscribe(({ membership }) => { - setTimeout(() => { - this.ngbModalRef = this.modalService.open(MembershipDeleteDialogComponent as Component, { size: 'lg', backdrop: 'static' }); - this.ngbModalRef.componentInstance.membership = membership; - this.ngbModalRef.result.then( - result => { - this.router.navigate(['/membership', { outlets: { popup: null } }]); - this.ngbModalRef = null; - }, - reason => { - this.router.navigate(['/membership', { outlets: { popup: null } }]); - this.ngbModalRef = null; - } - ); - }, 0); - }); - } - - ngOnDestroy() { - this.ngbModalRef = null; - } -} diff --git a/src/main/webapp/app/entities/membership/membership-detail.component.html b/src/main/webapp/app/entities/membership/membership-detail.component.html deleted file mode 100644 index dae64d50..00000000 --- a/src/main/webapp/app/entities/membership/membership-detail.component.html +++ /dev/null @@ -1,49 +0,0 @@ -
-
-
-

Membership: {{membership.displayLabel}}

-
- -
-
Admission Document Date
-
- {{membership.admissionDocumentDate | date:'mediumDate'}} -
-
Cancellation Document Date
-
- {{membership.cancellationDocumentDate | date:'mediumDate'}} -
-
Member From Date
-
- {{membership.memberFromDate | date:'mediumDate'}} -
-
Member Until Date
-
- {{membership.memberUntilDate | date:'mediumDate'}} -
-
Remark
-
- -
-
Customer
-
- -
-
- - - - -
-
-
diff --git a/src/main/webapp/app/entities/membership/membership-detail.component.ts b/src/main/webapp/app/entities/membership/membership-detail.component.ts deleted file mode 100644 index ed1105eb..00000000 --- a/src/main/webapp/app/entities/membership/membership-detail.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { IMembership } from 'app/shared/model/membership.model'; - -@Component({ - selector: 'jhi-membership-detail', - templateUrl: './membership-detail.component.html' -}) -export class MembershipDetailComponent implements OnInit { - membership: IMembership; - - constructor(protected activatedRoute: ActivatedRoute) {} - - ngOnInit() { - this.activatedRoute.data.subscribe(({ membership }) => { - this.membership = membership; - }); - } - - previousState() { - window.history.back(); - } -} diff --git a/src/main/webapp/app/entities/membership/membership-update.component.html b/src/main/webapp/app/entities/membership/membership-update.component.html deleted file mode 100644 index 758ce53a..00000000 --- a/src/main/webapp/app/entities/membership/membership-update.component.html +++ /dev/null @@ -1,100 +0,0 @@ -
-
-
-

Create or edit a Membership

-
- -
- - -
-
- -
- - - - -
-
- - This field is required. - -
-
-
- -
- - - - -
-
-
- -
- - - - -
-
- - This field is required. - -
-
-
- -
- - - - -
-
-
- - -
- - This field cannot be longer than 160 characters. - -
-
- -
- - -
-
- - This field is required. - -
-
-
- - -
-
-
-
diff --git a/src/main/webapp/app/entities/membership/membership-update.component.ts b/src/main/webapp/app/entities/membership/membership-update.component.ts deleted file mode 100644 index 74140751..00000000 --- a/src/main/webapp/app/entities/membership/membership-update.component.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { HttpErrorResponse, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { JhiAlertService } from 'ng-jhipster'; -import { IMembership } from 'app/shared/model/membership.model'; -import { MembershipService } from './membership.service'; -import { ICustomer } from 'app/shared/model/customer.model'; -import { CustomerService } from 'app/entities/customer'; - -@Component({ - selector: 'jhi-membership-update', - templateUrl: './membership-update.component.html' -}) -export class MembershipUpdateComponent implements OnInit { - membership: IMembership; - isSaving: boolean; - - customers: ICustomer[]; - admissionDocumentDateDp: any; - cancellationDocumentDateDp: any; - memberFromDateDp: any; - memberUntilDateDp: any; - - constructor( - protected jhiAlertService: JhiAlertService, - protected membershipService: MembershipService, - protected customerService: CustomerService, - protected activatedRoute: ActivatedRoute - ) {} - - ngOnInit() { - this.isSaving = false; - this.activatedRoute.data.subscribe(({ membership }) => { - this.membership = membership; - }); - this.customerService - .query() - .pipe( - filter((mayBeOk: HttpResponse) => mayBeOk.ok), - map((response: HttpResponse) => response.body) - ) - .subscribe((res: ICustomer[]) => (this.customers = res), (res: HttpErrorResponse) => this.onError(res.message)); - } - - previousState() { - window.history.back(); - } - - save() { - this.isSaving = true; - if (this.membership.id !== undefined) { - this.subscribeToSaveResponse(this.membershipService.update(this.membership)); - } else { - this.subscribeToSaveResponse(this.membershipService.create(this.membership)); - } - } - - protected subscribeToSaveResponse(result: Observable>) { - result.subscribe((res: HttpResponse) => this.onSaveSuccess(), (res: HttpErrorResponse) => this.onSaveError()); - } - - protected onSaveSuccess() { - this.isSaving = false; - this.previousState(); - } - - protected onSaveError() { - this.isSaving = false; - } - - protected onError(errorMessage: string) { - this.jhiAlertService.error(errorMessage, null, null); - } - - trackCustomerById(index: number, item: ICustomer) { - return item.id; - } -} diff --git a/src/main/webapp/app/entities/membership/membership.component.html b/src/main/webapp/app/entities/membership/membership.component.html deleted file mode 100644 index 920fcc61..00000000 --- a/src/main/webapp/app/entities/membership/membership.component.html +++ /dev/null @@ -1,84 +0,0 @@ -
-

- Memberships - -

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ID Admission Document Date Cancellation Document Date Member From Date Member Until Date Customer
- -
{{membership.id}}{{membership.admissionDocumentDate | date:'mediumDate'}}{{membership.cancellationDocumentDate | date:'mediumDate'}}{{membership.memberFromDate | date:'mediumDate'}}{{membership.memberUntilDate | date:'mediumDate'}} - - -
- - - -
-
-
-
diff --git a/src/main/webapp/app/entities/membership/membership.component.ts b/src/main/webapp/app/entities/membership/membership.component.ts deleted file mode 100644 index 5ca7c86a..00000000 --- a/src/main/webapp/app/entities/membership/membership.component.ts +++ /dev/null @@ -1,142 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http'; -import { Subscription } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster'; - -import { IMembership } from 'app/shared/model/membership.model'; -import { AccountService } from 'app/core'; - -import { ITEMS_PER_PAGE } from 'app/shared'; -import { MembershipService } from './membership.service'; -import { ICustomer } from 'app/shared/model/customer.model'; -import { CustomerService } from 'app/entities/customer'; -import { TableFilter, queryYearAsDateRange, queryEquals } from 'app/shared/util/tablefilter'; - -@Component({ - selector: 'jhi-membership', - templateUrl: './membership.component.html' -}) -export class MembershipComponent implements OnInit, OnDestroy { - memberships: IMembership[]; - currentAccount: any; - eventSubscriber: Subscription; - itemsPerPage: number; - links: any; - page: any; - predicate: any; - reverse: any; - totalItems: number; - customers: ICustomer[]; - filter: TableFilter<{ - admissionDocumentDate?: string; - cancellationDocumentDate?: string; - memberFromDate?: string; - memberUntilDate?: string; - customerId?: string; - }>; - - constructor( - protected membershipService: MembershipService, - protected customerService: CustomerService, - protected jhiAlertService: JhiAlertService, - protected eventManager: JhiEventManager, - protected parseLinks: JhiParseLinks, - protected accountService: AccountService - ) { - this.memberships = []; - this.itemsPerPage = ITEMS_PER_PAGE; - this.page = 0; - this.links = { - last: 0 - }; - this.predicate = 'id'; - this.reverse = true; - this.filter = new TableFilter( - { - admissionDocumentDate: queryYearAsDateRange, - cancellationDocumentDate: queryYearAsDateRange, - memberFromDate: queryYearAsDateRange, - memberUntilDate: queryYearAsDateRange, - customerId: queryEquals - }, - 500, - () => { - this.reset(); - } - ); - } - - loadAll() { - this.membershipService - .query({ - ...this.filter.buildQueryCriteria(), - page: this.page, - size: this.itemsPerPage, - sort: this.sort() - }) - .subscribe( - (res: HttpResponse) => this.paginateMemberships(res.body, res.headers), - (res: HttpErrorResponse) => this.onError(res.message) - ); - } - - reset() { - this.page = 0; - this.memberships = []; - this.loadAll(); - } - - loadPage(page) { - this.page = page; - this.loadAll(); - } - - ngOnInit() { - this.loadAll(); - this.accountService.identity().then(account => { - this.currentAccount = account; - }); - this.registerChangeInMemberships(); - this.customerService - .query() - .pipe( - filter((mayBeOk: HttpResponse) => mayBeOk.ok), - map((response: HttpResponse) => response.body) - ) - .subscribe((res: IMembership[]) => (this.customers = res), (res: HttpErrorResponse) => this.onError(res.message)); - } - - ngOnDestroy() { - this.eventManager.destroy(this.eventSubscriber); - } - - trackId(index: number, item: { id: number }) { - return item.id; - } - - registerChangeInMemberships() { - this.eventSubscriber = this.eventManager.subscribe('membershipListModification', response => this.reset()); - } - - sort() { - const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')]; - if (this.predicate !== 'id') { - result.push('id'); - } - return result; - } - - protected paginateMemberships(data: IMembership[], headers: HttpHeaders) { - this.links = this.parseLinks.parse(headers.get('link')); - this.totalItems = parseInt(headers.get('X-Total-Count'), 10); - this.memberships = []; - for (let i = 0; i < data.length; i++) { - this.memberships.push(data[i]); - } - } - - protected onError(errorMessage: string) { - this.jhiAlertService.error(errorMessage, null, null); - } -} diff --git a/src/main/webapp/app/entities/membership/membership.module.ts b/src/main/webapp/app/entities/membership/membership.module.ts deleted file mode 100644 index 01e0545f..00000000 --- a/src/main/webapp/app/entities/membership/membership.module.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { JhiLanguageService } from 'ng-jhipster'; -import { JhiLanguageHelper } from 'app/core'; - -import { HsadminNgSharedModule } from 'app/shared'; -import { - MembershipComponent, - MembershipDetailComponent, - MembershipUpdateComponent, - MembershipDeletePopupComponent, - MembershipDeleteDialogComponent, - membershipRoute, - membershipPopupRoute -} from './'; - -const ENTITY_STATES = [...membershipRoute, ...membershipPopupRoute]; - -@NgModule({ - imports: [HsadminNgSharedModule, RouterModule.forChild(ENTITY_STATES)], - declarations: [ - MembershipComponent, - MembershipDetailComponent, - MembershipUpdateComponent, - MembershipDeleteDialogComponent, - MembershipDeletePopupComponent - ], - entryComponents: [MembershipComponent, MembershipUpdateComponent, MembershipDeleteDialogComponent, MembershipDeletePopupComponent], - providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class HsadminNgMembershipModule { - constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) { - this.languageHelper.language.subscribe((languageKey: string) => { - if (languageKey !== undefined) { - this.languageService.changeLanguage(languageKey); - } - }); - } -} diff --git a/src/main/webapp/app/entities/membership/membership.route.ts b/src/main/webapp/app/entities/membership/membership.route.ts deleted file mode 100644 index fbf9f430..00000000 --- a/src/main/webapp/app/entities/membership/membership.route.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpResponse } from '@angular/common/http'; -import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router'; -import { UserRouteAccessService } from 'app/core'; -import { Observable, of } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { Membership } from 'app/shared/model/membership.model'; -import { MembershipService } from './membership.service'; -import { MembershipComponent } from './membership.component'; -import { MembershipDetailComponent } from './membership-detail.component'; -import { MembershipUpdateComponent } from './membership-update.component'; -import { MembershipDeletePopupComponent } from './membership-delete-dialog.component'; -import { IMembership } from 'app/shared/model/membership.model'; - -@Injectable({ providedIn: 'root' }) -export class MembershipResolve implements Resolve { - constructor(private service: MembershipService) {} - - resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { - const id = route.params['id'] ? route.params['id'] : null; - if (id) { - return this.service.find(id).pipe( - filter((response: HttpResponse) => response.ok), - map((membership: HttpResponse) => membership.body) - ); - } - return of(new Membership()); - } -} - -export const membershipRoute: Routes = [ - { - path: '', - component: MembershipComponent, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.membership.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: ':id/view', - component: MembershipDetailComponent, - resolve: { - membership: MembershipResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.membership.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: 'new', - component: MembershipUpdateComponent, - resolve: { - membership: MembershipResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.membership.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: ':id/edit', - component: MembershipUpdateComponent, - resolve: { - membership: MembershipResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.membership.home.title' - }, - canActivate: [UserRouteAccessService] - } -]; - -export const membershipPopupRoute: Routes = [ - { - path: ':id/delete', - component: MembershipDeletePopupComponent, - resolve: { - membership: MembershipResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.membership.home.title' - }, - canActivate: [UserRouteAccessService], - outlet: 'popup' - } -]; diff --git a/src/main/webapp/app/entities/membership/membership.service.ts b/src/main/webapp/app/entities/membership/membership.service.ts deleted file mode 100644 index 586846eb..00000000 --- a/src/main/webapp/app/entities/membership/membership.service.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import * as moment from 'moment'; -import { DATE_FORMAT } from 'app/shared/constants/input.constants'; -import { map } from 'rxjs/operators'; - -import { SERVER_API_URL } from 'app/app.constants'; -import { createRequestOption } from 'app/shared'; -import { IMembership } from 'app/shared/model/membership.model'; - -type EntityResponseType = HttpResponse; -type EntityArrayResponseType = HttpResponse; - -@Injectable({ providedIn: 'root' }) -export class MembershipService { - public resourceUrl = SERVER_API_URL + 'api/memberships'; - - constructor(protected http: HttpClient) {} - - create(membership: IMembership): Observable { - const copy = this.convertDateFromClient(membership); - return this.http - .post(this.resourceUrl, copy, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - update(membership: IMembership): Observable { - const copy = this.convertDateFromClient(membership); - return this.http - .put(this.resourceUrl, copy, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - find(id: number): Observable { - return this.http - .get(`${this.resourceUrl}/${id}`, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - query(req?: any): Observable { - const options = createRequestOption(req); - return this.http - .get(this.resourceUrl, { params: options, observe: 'response' }) - .pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res))); - } - - delete(id: number): Observable> { - return this.http.delete(`${this.resourceUrl}/${id}`, { observe: 'response' }); - } - - protected convertDateFromClient(membership: IMembership): IMembership { - const copy: IMembership = Object.assign({}, membership, { - admissionDocumentDate: - membership.admissionDocumentDate != null && membership.admissionDocumentDate.isValid() - ? membership.admissionDocumentDate.format(DATE_FORMAT) - : null, - cancellationDocumentDate: - membership.cancellationDocumentDate != null && membership.cancellationDocumentDate.isValid() - ? membership.cancellationDocumentDate.format(DATE_FORMAT) - : null, - memberFromDate: - membership.memberFromDate != null && membership.memberFromDate.isValid() - ? membership.memberFromDate.format(DATE_FORMAT) - : null, - memberUntilDate: - membership.memberUntilDate != null && membership.memberUntilDate.isValid() - ? membership.memberUntilDate.format(DATE_FORMAT) - : null - }); - return copy; - } - - protected convertDateFromServer(res: EntityResponseType): EntityResponseType { - if (res.body) { - res.body.admissionDocumentDate = res.body.admissionDocumentDate != null ? moment(res.body.admissionDocumentDate) : null; - res.body.cancellationDocumentDate = - res.body.cancellationDocumentDate != null ? moment(res.body.cancellationDocumentDate) : null; - res.body.memberFromDate = res.body.memberFromDate != null ? moment(res.body.memberFromDate) : null; - res.body.memberUntilDate = res.body.memberUntilDate != null ? moment(res.body.memberUntilDate) : null; - } - return res; - } - - protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType { - if (res.body) { - res.body.forEach((membership: IMembership) => { - membership.admissionDocumentDate = - membership.admissionDocumentDate != null ? moment(membership.admissionDocumentDate) : null; - membership.cancellationDocumentDate = - membership.cancellationDocumentDate != null ? moment(membership.cancellationDocumentDate) : null; - membership.memberFromDate = membership.memberFromDate != null ? moment(membership.memberFromDate) : null; - membership.memberUntilDate = membership.memberUntilDate != null ? moment(membership.memberUntilDate) : null; - }); - } - return res; - } -} diff --git a/src/main/webapp/app/entities/sepa-mandate/index.ts b/src/main/webapp/app/entities/sepa-mandate/index.ts deleted file mode 100644 index f99de152..00000000 --- a/src/main/webapp/app/entities/sepa-mandate/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './sepa-mandate.service'; -export * from './sepa-mandate-update.component'; -export * from './sepa-mandate-delete-dialog.component'; -export * from './sepa-mandate-detail.component'; -export * from './sepa-mandate.component'; -export * from './sepa-mandate.route'; diff --git a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-delete-dialog.component.html b/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-delete-dialog.component.html deleted file mode 100644 index 12baf54a..00000000 --- a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-delete-dialog.component.html +++ /dev/null @@ -1,19 +0,0 @@ -
- - - -
diff --git a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-delete-dialog.component.ts b/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-delete-dialog.component.ts deleted file mode 100644 index 741e2642..00000000 --- a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-delete-dialog.component.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; - -import { NgbActiveModal, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { JhiEventManager } from 'ng-jhipster'; - -import { ISepaMandate } from 'app/shared/model/sepa-mandate.model'; -import { SepaMandateService } from './sepa-mandate.service'; - -@Component({ - selector: 'jhi-sepa-mandate-delete-dialog', - templateUrl: './sepa-mandate-delete-dialog.component.html' -}) -export class SepaMandateDeleteDialogComponent { - sepaMandate: ISepaMandate; - - constructor( - protected sepaMandateService: SepaMandateService, - public activeModal: NgbActiveModal, - protected eventManager: JhiEventManager - ) {} - - clear() { - this.activeModal.dismiss('cancel'); - } - - confirmDelete(id: number) { - this.sepaMandateService.delete(id).subscribe(response => { - this.eventManager.broadcast({ - name: 'sepaMandateListModification', - content: 'Deleted an sepaMandate' - }); - this.activeModal.dismiss(true); - }); - } -} - -@Component({ - selector: 'jhi-sepa-mandate-delete-popup', - template: '' -}) -export class SepaMandateDeletePopupComponent implements OnInit, OnDestroy { - protected ngbModalRef: NgbModalRef; - - constructor(protected activatedRoute: ActivatedRoute, protected router: Router, protected modalService: NgbModal) {} - - ngOnInit() { - this.activatedRoute.data.subscribe(({ sepaMandate }) => { - setTimeout(() => { - this.ngbModalRef = this.modalService.open(SepaMandateDeleteDialogComponent as Component, { - size: 'lg', - backdrop: 'static' - }); - this.ngbModalRef.componentInstance.sepaMandate = sepaMandate; - this.ngbModalRef.result.then( - result => { - this.router.navigate(['/sepa-mandate', { outlets: { popup: null } }]); - this.ngbModalRef = null; - }, - reason => { - this.router.navigate(['/sepa-mandate', { outlets: { popup: null } }]); - this.ngbModalRef = null; - } - ); - }, 0); - }); - } - - ngOnDestroy() { - this.ngbModalRef = null; - } -} diff --git a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-detail.component.html b/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-detail.component.html deleted file mode 100644 index b12e9d33..00000000 --- a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-detail.component.html +++ /dev/null @@ -1,65 +0,0 @@ -
-
-
-

Sepa Mandate {{sepaMandate.id}}

-
- -
-
Reference
-
- {{sepaMandate.reference}} -
-
Iban
-
- {{sepaMandate.iban}} -
-
Bic
-
- {{sepaMandate.bic}} -
-
Granting Document Date
-
- {{sepaMandate.grantingDocumentDate | date:'mediumDate'}} -
-
Revokation Document Date
-
- {{sepaMandate.revokationDocumentDate | date:'mediumDate'}} -
-
Valid From Date
-
- {{sepaMandate.validFromDate | date:'mediumDate'}} -
-
Valid Until Date
-
- {{sepaMandate.validUntilDate | date:'mediumDate'}} -
-
Last Used Date
-
- {{sepaMandate.lastUsedDate | date:'mediumDate'}} -
-
Remark
-
- -
-
Customer
-
- -
-
- - - - -
-
-
diff --git a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-detail.component.ts b/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-detail.component.ts deleted file mode 100644 index 41c98730..00000000 --- a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-detail.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { ISepaMandate } from 'app/shared/model/sepa-mandate.model'; - -@Component({ - selector: 'jhi-sepa-mandate-detail', - templateUrl: './sepa-mandate-detail.component.html' -}) -export class SepaMandateDetailComponent implements OnInit { - sepaMandate: ISepaMandate; - - constructor(protected activatedRoute: ActivatedRoute) {} - - ngOnInit() { - this.activatedRoute.data.subscribe(({ sepaMandate }) => { - this.sepaMandate = sepaMandate; - }); - } - - previousState() { - window.history.back(); - } -} diff --git a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-update.component.html b/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-update.component.html deleted file mode 100644 index 50826fd8..00000000 --- a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-update.component.html +++ /dev/null @@ -1,147 +0,0 @@ -
-
-
-

Create or edit a Sepa Mandate

-
- -
- - -
-
- - -
- - This field is required. - - - This field cannot be longer than 40 characters. - -
-
-
- - -
- - This field cannot be longer than 34 characters. - -
-
-
- - -
- - This field cannot be longer than 11 characters. - -
-
-
- -
- - - - -
-
- - This field is required. - -
-
-
- -
- - - - -
-
-
- -
- - - - -
-
- - This field is required. - -
-
-
- -
- - - - -
-
-
- -
- - - - -
-
-
- - -
- - This field cannot be longer than 160 characters. - -
-
- -
- - -
-
- - This field is required. - -
-
-
- - -
-
-
-
diff --git a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-update.component.ts b/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-update.component.ts deleted file mode 100644 index 8efa2127..00000000 --- a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate-update.component.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { HttpErrorResponse, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { JhiAlertService } from 'ng-jhipster'; -import { ISepaMandate } from 'app/shared/model/sepa-mandate.model'; -import { SepaMandateService } from './sepa-mandate.service'; -import { ICustomer } from 'app/shared/model/customer.model'; -import { CustomerService } from 'app/entities/customer'; - -@Component({ - selector: 'jhi-sepa-mandate-update', - templateUrl: './sepa-mandate-update.component.html' -}) -export class SepaMandateUpdateComponent implements OnInit { - sepaMandate: ISepaMandate; - isSaving: boolean; - - customers: ICustomer[]; - grantingDocumentDateDp: any; - revokationDocumentDateDp: any; - validFromDateDp: any; - validUntilDateDp: any; - lastUsedDateDp: any; - - constructor( - protected jhiAlertService: JhiAlertService, - protected sepaMandateService: SepaMandateService, - protected customerService: CustomerService, - protected activatedRoute: ActivatedRoute - ) {} - - ngOnInit() { - this.isSaving = false; - this.activatedRoute.data.subscribe(({ sepaMandate }) => { - this.sepaMandate = sepaMandate; - }); - this.customerService - .query() - .pipe( - filter((mayBeOk: HttpResponse) => mayBeOk.ok), - map((response: HttpResponse) => response.body) - ) - .subscribe((res: ICustomer[]) => (this.customers = res), (res: HttpErrorResponse) => this.onError(res.message)); - } - - previousState() { - window.history.back(); - } - - save() { - this.isSaving = true; - if (this.sepaMandate.id !== undefined) { - this.subscribeToSaveResponse(this.sepaMandateService.update(this.sepaMandate)); - } else { - this.subscribeToSaveResponse(this.sepaMandateService.create(this.sepaMandate)); - } - } - - protected subscribeToSaveResponse(result: Observable>) { - result.subscribe((res: HttpResponse) => this.onSaveSuccess(), (res: HttpErrorResponse) => this.onSaveError()); - } - - protected onSaveSuccess() { - this.isSaving = false; - this.previousState(); - } - - protected onSaveError() { - this.isSaving = false; - } - - protected onError(errorMessage: string) { - this.jhiAlertService.error(errorMessage, null, null); - } - - trackCustomerById(index: number, item: ICustomer) { - return item.id; - } -} diff --git a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.component.html b/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.component.html deleted file mode 100644 index cc9c010f..00000000 --- a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.component.html +++ /dev/null @@ -1,96 +0,0 @@ -
-

- Sepa Mandates - -

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ID Reference Iban Bic Granting Document Date Revokation Document Date Valid From Date Valid Until Date Last Used Date Customer
- -
{{sepaMandate.id}}{{sepaMandate.reference}}{{sepaMandate.iban}}{{sepaMandate.bic}}{{sepaMandate.grantingDocumentDate | date:'mediumDate'}}{{sepaMandate.revokationDocumentDate | date:'mediumDate'}}{{sepaMandate.validFromDate | date:'mediumDate'}}{{sepaMandate.validUntilDate | date:'mediumDate'}}{{sepaMandate.lastUsedDate | date:'mediumDate'}} - - -
- - - -
-
-
-
diff --git a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.component.ts b/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.component.ts deleted file mode 100644 index d78686dd..00000000 --- a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.component.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http'; -import { Subscription } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster'; - -import { ISepaMandate } from 'app/shared/model/sepa-mandate.model'; -import { AccountService } from 'app/core'; - -import { ITEMS_PER_PAGE } from 'app/shared'; -import { SepaMandateService } from './sepa-mandate.service'; -import { ICustomer } from 'app/shared/model/customer.model'; -import { CustomerService } from 'app/entities/customer'; -import { TableFilter, queryYearAsDateRange, queryEquals, queryContains } from 'app/shared/util/tablefilter'; -import { IMembership } from 'app/shared/model/membership.model'; - -@Component({ - selector: 'jhi-sepa-mandate', - templateUrl: './sepa-mandate.component.html' -}) -export class SepaMandateComponent implements OnInit, OnDestroy { - sepaMandates: ISepaMandate[]; - currentAccount: any; - eventSubscriber: Subscription; - itemsPerPage: number; - links: any; - page: any; - predicate: any; - reverse: any; - totalItems: number; - customers: ICustomer[]; - filter: TableFilter<{ - reference?: string; - iban?: string; - bic?: string; - grantingDocumentDate?: string; - revokationDocumentDate?: string; - validFromDate?: string; - validUntilDate?: string; - lastUsedDate?: string; - customerId?: string; - }>; - - constructor( - protected sepaMandateService: SepaMandateService, - protected customerService: CustomerService, - protected jhiAlertService: JhiAlertService, - protected eventManager: JhiEventManager, - protected parseLinks: JhiParseLinks, - protected accountService: AccountService - ) { - this.sepaMandates = []; - this.itemsPerPage = ITEMS_PER_PAGE; - this.page = 0; - this.links = { - last: 0 - }; - this.predicate = 'id'; - this.reverse = true; - this.filter = new TableFilter( - { - reference: queryContains, - iban: queryContains, - bic: queryContains, - grantingDocumentDate: queryYearAsDateRange, - revokationDocumentDate: queryYearAsDateRange, - validFromDate: queryYearAsDateRange, - validUntilDate: queryYearAsDateRange, - lastUsedDate: queryYearAsDateRange, - customerId: queryEquals - }, - 500, - () => { - this.reset(); - } - ); - } - - loadAll() { - this.sepaMandateService - .query({ - ...this.filter.buildQueryCriteria(), - page: this.page, - size: this.itemsPerPage, - sort: this.sort() - }) - .subscribe( - (res: HttpResponse) => this.paginateSepaMandates(res.body, res.headers), - (res: HttpErrorResponse) => this.onError(res.message) - ); - } - - reset() { - this.page = 0; - this.sepaMandates = []; - this.loadAll(); - } - - loadPage(page) { - this.page = page; - this.loadAll(); - } - - ngOnInit() { - this.loadAll(); - this.accountService.identity().then(account => { - this.currentAccount = account; - }); - this.registerChangeInSepaMandates(); - this.customerService - .query() - .pipe( - filter((mayBeOk: HttpResponse) => mayBeOk.ok), - map((response: HttpResponse) => response.body) - ) - .subscribe((res: IMembership[]) => (this.customers = res), (res: HttpErrorResponse) => this.onError(res.message)); - } - - ngOnDestroy() { - this.eventManager.destroy(this.eventSubscriber); - } - - trackId(index: number, item: { id: number }) { - return item.id; - } - - registerChangeInSepaMandates() { - this.eventSubscriber = this.eventManager.subscribe('sepaMandateListModification', response => this.reset()); - } - - sort() { - const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')]; - if (this.predicate !== 'id') { - result.push('id'); - } - return result; - } - - protected paginateSepaMandates(data: ISepaMandate[], headers: HttpHeaders) { - this.links = this.parseLinks.parse(headers.get('link')); - this.totalItems = parseInt(headers.get('X-Total-Count'), 10); - for (let i = 0; i < data.length; i++) { - this.sepaMandates.push(data[i]); - } - } - - protected onError(errorMessage: string) { - this.jhiAlertService.error(errorMessage, null, null); - } -} diff --git a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.module.ts b/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.module.ts deleted file mode 100644 index f94a5113..00000000 --- a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.module.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { JhiLanguageService } from 'ng-jhipster'; -import { JhiLanguageHelper } from 'app/core'; - -import { HsadminNgSharedModule } from 'app/shared'; -import { - SepaMandateComponent, - SepaMandateDetailComponent, - SepaMandateUpdateComponent, - SepaMandateDeletePopupComponent, - SepaMandateDeleteDialogComponent, - sepaMandateRoute, - sepaMandatePopupRoute -} from './'; - -const ENTITY_STATES = [...sepaMandateRoute, ...sepaMandatePopupRoute]; - -@NgModule({ - imports: [HsadminNgSharedModule, RouterModule.forChild(ENTITY_STATES)], - declarations: [ - SepaMandateComponent, - SepaMandateDetailComponent, - SepaMandateUpdateComponent, - SepaMandateDeleteDialogComponent, - SepaMandateDeletePopupComponent - ], - entryComponents: [SepaMandateComponent, SepaMandateUpdateComponent, SepaMandateDeleteDialogComponent, SepaMandateDeletePopupComponent], - providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class HsadminNgSepaMandateModule { - constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) { - this.languageHelper.language.subscribe((languageKey: string) => { - if (languageKey !== undefined) { - this.languageService.changeLanguage(languageKey); - } - }); - } -} diff --git a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.route.ts b/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.route.ts deleted file mode 100644 index de46aaf3..00000000 --- a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.route.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpResponse } from '@angular/common/http'; -import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router'; -import { UserRouteAccessService } from 'app/core'; -import { Observable, of } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { SepaMandate } from 'app/shared/model/sepa-mandate.model'; -import { SepaMandateService } from './sepa-mandate.service'; -import { SepaMandateComponent } from './sepa-mandate.component'; -import { SepaMandateDetailComponent } from './sepa-mandate-detail.component'; -import { SepaMandateUpdateComponent } from './sepa-mandate-update.component'; -import { SepaMandateDeletePopupComponent } from './sepa-mandate-delete-dialog.component'; -import { ISepaMandate } from 'app/shared/model/sepa-mandate.model'; - -@Injectable({ providedIn: 'root' }) -export class SepaMandateResolve implements Resolve { - constructor(private service: SepaMandateService) {} - - resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { - const id = route.params['id'] ? route.params['id'] : null; - if (id) { - return this.service.find(id).pipe( - filter((response: HttpResponse) => response.ok), - map((sepaMandate: HttpResponse) => sepaMandate.body) - ); - } - return of(new SepaMandate()); - } -} - -export const sepaMandateRoute: Routes = [ - { - path: '', - component: SepaMandateComponent, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.sepaMandate.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: ':id/view', - component: SepaMandateDetailComponent, - resolve: { - sepaMandate: SepaMandateResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.sepaMandate.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: 'new', - component: SepaMandateUpdateComponent, - resolve: { - sepaMandate: SepaMandateResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.sepaMandate.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: ':id/edit', - component: SepaMandateUpdateComponent, - resolve: { - sepaMandate: SepaMandateResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.sepaMandate.home.title' - }, - canActivate: [UserRouteAccessService] - } -]; - -export const sepaMandatePopupRoute: Routes = [ - { - path: ':id/delete', - component: SepaMandateDeletePopupComponent, - resolve: { - sepaMandate: SepaMandateResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.sepaMandate.home.title' - }, - canActivate: [UserRouteAccessService], - outlet: 'popup' - } -]; diff --git a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.service.ts b/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.service.ts deleted file mode 100644 index 0cf01c0a..00000000 --- a/src/main/webapp/app/entities/sepa-mandate/sepa-mandate.service.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import * as moment from 'moment'; -import { DATE_FORMAT } from 'app/shared/constants/input.constants'; -import { map } from 'rxjs/operators'; - -import { SERVER_API_URL } from 'app/app.constants'; -import { createRequestOption } from 'app/shared'; -import { ISepaMandate } from 'app/shared/model/sepa-mandate.model'; - -type EntityResponseType = HttpResponse; -type EntityArrayResponseType = HttpResponse; - -@Injectable({ providedIn: 'root' }) -export class SepaMandateService { - public resourceUrl = SERVER_API_URL + 'api/sepa-mandates'; - - constructor(protected http: HttpClient) {} - - create(sepaMandate: ISepaMandate): Observable { - const copy = this.convertDateFromClient(sepaMandate); - return this.http - .post(this.resourceUrl, copy, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - update(sepaMandate: ISepaMandate): Observable { - const copy = this.convertDateFromClient(sepaMandate); - return this.http - .put(this.resourceUrl, copy, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - find(id: number): Observable { - return this.http - .get(`${this.resourceUrl}/${id}`, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - query(req?: any): Observable { - const options = createRequestOption(req); - return this.http - .get(this.resourceUrl, { params: options, observe: 'response' }) - .pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res))); - } - - delete(id: number): Observable> { - return this.http.delete(`${this.resourceUrl}/${id}`, { observe: 'response' }); - } - - protected convertDateFromClient(sepaMandate: ISepaMandate): ISepaMandate { - const copy: ISepaMandate = Object.assign({}, sepaMandate, { - grantingDocumentDate: - sepaMandate.grantingDocumentDate != null && sepaMandate.grantingDocumentDate.isValid() - ? sepaMandate.grantingDocumentDate.format(DATE_FORMAT) - : null, - revokationDocumentDate: - sepaMandate.revokationDocumentDate != null && sepaMandate.revokationDocumentDate.isValid() - ? sepaMandate.revokationDocumentDate.format(DATE_FORMAT) - : null, - validFromDate: - sepaMandate.validFromDate != null && sepaMandate.validFromDate.isValid() - ? sepaMandate.validFromDate.format(DATE_FORMAT) - : null, - validUntilDate: - sepaMandate.validUntilDate != null && sepaMandate.validUntilDate.isValid() - ? sepaMandate.validUntilDate.format(DATE_FORMAT) - : null, - lastUsedDate: - sepaMandate.lastUsedDate != null && sepaMandate.lastUsedDate.isValid() ? sepaMandate.lastUsedDate.format(DATE_FORMAT) : null - }); - return copy; - } - - protected convertDateFromServer(res: EntityResponseType): EntityResponseType { - if (res.body) { - res.body.grantingDocumentDate = res.body.grantingDocumentDate != null ? moment(res.body.grantingDocumentDate) : null; - res.body.revokationDocumentDate = res.body.revokationDocumentDate != null ? moment(res.body.revokationDocumentDate) : null; - res.body.validFromDate = res.body.validFromDate != null ? moment(res.body.validFromDate) : null; - res.body.validUntilDate = res.body.validUntilDate != null ? moment(res.body.validUntilDate) : null; - res.body.lastUsedDate = res.body.lastUsedDate != null ? moment(res.body.lastUsedDate) : null; - } - return res; - } - - protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType { - if (res.body) { - res.body.forEach((sepaMandate: ISepaMandate) => { - sepaMandate.grantingDocumentDate = - sepaMandate.grantingDocumentDate != null ? moment(sepaMandate.grantingDocumentDate) : null; - sepaMandate.revokationDocumentDate = - sepaMandate.revokationDocumentDate != null ? moment(sepaMandate.revokationDocumentDate) : null; - sepaMandate.validFromDate = sepaMandate.validFromDate != null ? moment(sepaMandate.validFromDate) : null; - sepaMandate.validUntilDate = sepaMandate.validUntilDate != null ? moment(sepaMandate.validUntilDate) : null; - sepaMandate.lastUsedDate = sepaMandate.lastUsedDate != null ? moment(sepaMandate.lastUsedDate) : null; - }); - } - return res; - } -} diff --git a/src/main/webapp/app/entities/share/index.ts b/src/main/webapp/app/entities/share/index.ts deleted file mode 100644 index ecc5eeaa..00000000 --- a/src/main/webapp/app/entities/share/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './share.service'; -export * from './share-update.component'; -export * from './share-delete-dialog.component'; -export * from './share-detail.component'; -export * from './share.component'; -export * from './share.route'; diff --git a/src/main/webapp/app/entities/share/share-delete-dialog.component.html b/src/main/webapp/app/entities/share/share-delete-dialog.component.html deleted file mode 100644 index 5437602b..00000000 --- a/src/main/webapp/app/entities/share/share-delete-dialog.component.html +++ /dev/null @@ -1,19 +0,0 @@ -
- - - -
diff --git a/src/main/webapp/app/entities/share/share-delete-dialog.component.ts b/src/main/webapp/app/entities/share/share-delete-dialog.component.ts deleted file mode 100644 index 34138baa..00000000 --- a/src/main/webapp/app/entities/share/share-delete-dialog.component.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; - -import { NgbActiveModal, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { JhiEventManager } from 'ng-jhipster'; - -import { IShare } from 'app/shared/model/share.model'; -import { ShareService } from './share.service'; - -@Component({ - selector: 'jhi-share-delete-dialog', - templateUrl: './share-delete-dialog.component.html' -}) -export class ShareDeleteDialogComponent { - share: IShare; - - constructor(protected shareService: ShareService, public activeModal: NgbActiveModal, protected eventManager: JhiEventManager) {} - - clear() { - this.activeModal.dismiss('cancel'); - } - - confirmDelete(id: number) { - this.shareService.delete(id).subscribe(response => { - this.eventManager.broadcast({ - name: 'shareListModification', - content: 'Deleted an share' - }); - this.activeModal.dismiss(true); - }); - } -} - -@Component({ - selector: 'jhi-share-delete-popup', - template: '' -}) -export class ShareDeletePopupComponent implements OnInit, OnDestroy { - protected ngbModalRef: NgbModalRef; - - constructor(protected activatedRoute: ActivatedRoute, protected router: Router, protected modalService: NgbModal) {} - - ngOnInit() { - this.activatedRoute.data.subscribe(({ share }) => { - setTimeout(() => { - this.ngbModalRef = this.modalService.open(ShareDeleteDialogComponent as Component, { size: 'lg', backdrop: 'static' }); - this.ngbModalRef.componentInstance.share = share; - this.ngbModalRef.result.then( - result => { - this.router.navigate(['/share', { outlets: { popup: null } }]); - this.ngbModalRef = null; - }, - reason => { - this.router.navigate(['/share', { outlets: { popup: null } }]); - this.ngbModalRef = null; - } - ); - }, 0); - }); - } - - ngOnDestroy() { - this.ngbModalRef = null; - } -} diff --git a/src/main/webapp/app/entities/share/share-detail.component.html b/src/main/webapp/app/entities/share/share-detail.component.html deleted file mode 100644 index 5dd34103..00000000 --- a/src/main/webapp/app/entities/share/share-detail.component.html +++ /dev/null @@ -1,49 +0,0 @@ -
-
-
-

Share: #{{share.id}} - {{share.membershipDisplayLabel}}

-
- -
-
Document Date
-
- {{share.documentDate | date:'mediumDate'}} -
-
Value Date
-
- {{share.valueDate | date:'mediumDate'}} -
-
Action
-
- {{share.action}} -
-
Quantity
-
- {{share.quantity}} -
-
Remark
-
- -
-
Membership
-
- -
-
- - - - -
-
-
diff --git a/src/main/webapp/app/entities/share/share-detail.component.ts b/src/main/webapp/app/entities/share/share-detail.component.ts deleted file mode 100644 index 5cd2ed0f..00000000 --- a/src/main/webapp/app/entities/share/share-detail.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { IShare } from 'app/shared/model/share.model'; - -@Component({ - selector: 'jhi-share-detail', - templateUrl: './share-detail.component.html' -}) -export class ShareDetailComponent implements OnInit { - share: IShare; - - constructor(protected activatedRoute: ActivatedRoute) {} - - ngOnInit() { - this.activatedRoute.data.subscribe(({ share }) => { - this.share = share; - }); - } - - previousState() { - window.history.back(); - } -} diff --git a/src/main/webapp/app/entities/share/share-update.component.html b/src/main/webapp/app/entities/share/share-update.component.html deleted file mode 100644 index 78a04f63..00000000 --- a/src/main/webapp/app/entities/share/share-update.component.html +++ /dev/null @@ -1,108 +0,0 @@ -
-
-
-

Create or edit a Share

-
- -
- - -
-
- -
- - - - -
-
- - This field is required. - -
-
-
- -
- - - - -
-
- - This field is required. - -
-
-
- - -
- - This field is required. - -
-
-
- - -
- - This field is required. - - - This field should be a number. - -
-
-
- - -
- - This field cannot be longer than 160 characters. - -
-
- -
- - -
-
- - This field is required. - -
-
-
- - -
-
-
-
diff --git a/src/main/webapp/app/entities/share/share-update.component.ts b/src/main/webapp/app/entities/share/share-update.component.ts deleted file mode 100644 index b031a238..00000000 --- a/src/main/webapp/app/entities/share/share-update.component.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { HttpResponse, HttpErrorResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { JhiAlertService } from 'ng-jhipster'; -import { IShare } from 'app/shared/model/share.model'; -import { ShareService } from './share.service'; -import { IMembership } from 'app/shared/model/membership.model'; -import { MembershipService } from 'app/entities/membership'; - -@Component({ - selector: 'jhi-share-update', - templateUrl: './share-update.component.html' -}) -export class ShareUpdateComponent implements OnInit { - share: IShare; - isSaving: boolean; - - memberships: IMembership[]; - documentDateDp: any; - valueDateDp: any; - - constructor( - protected jhiAlertService: JhiAlertService, - protected shareService: ShareService, - protected membershipService: MembershipService, - protected activatedRoute: ActivatedRoute - ) {} - - ngOnInit() { - this.isSaving = false; - this.activatedRoute.data.subscribe(({ share }) => { - this.share = share; - }); - this.membershipService - .query() - .pipe( - filter((mayBeOk: HttpResponse) => mayBeOk.ok), - map((response: HttpResponse) => response.body) - ) - .subscribe((res: IMembership[]) => (this.memberships = res), (res: HttpErrorResponse) => this.onError(res.message)); - } - - previousState() { - window.history.back(); - } - - save() { - this.isSaving = true; - if (this.share.id !== undefined) { - this.subscribeToSaveResponse(this.shareService.update(this.share)); - } else { - this.subscribeToSaveResponse(this.shareService.create(this.share)); - } - } - - protected subscribeToSaveResponse(result: Observable>) { - result.subscribe((res: HttpResponse) => this.onSaveSuccess(), (res: HttpErrorResponse) => this.onSaveError()); - } - - protected onSaveSuccess() { - this.isSaving = false; - this.previousState(); - } - - protected onSaveError() { - this.isSaving = false; - } - - protected onError(errorMessage: string) { - this.jhiAlertService.error(errorMessage, null, null); - } - - trackMembershipById(index: number, item: IMembership) { - return item.id; - } -} diff --git a/src/main/webapp/app/entities/share/share.component.html b/src/main/webapp/app/entities/share/share.component.html deleted file mode 100644 index 7ac7b10b..00000000 --- a/src/main/webapp/app/entities/share/share.component.html +++ /dev/null @@ -1,90 +0,0 @@ -
-

- Shares - -

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ID Document Date Value Date Action Quantity Membership
- - - -
{{share.id}}{{share.documentDate | date:'mediumDate'}}{{share.valueDate | date:'mediumDate'}}{{share.action}}{{share.quantity}} - - -
- - - -
-
-
-
diff --git a/src/main/webapp/app/entities/share/share.component.ts b/src/main/webapp/app/entities/share/share.component.ts deleted file mode 100644 index 831b30c6..00000000 --- a/src/main/webapp/app/entities/share/share.component.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http'; -import { Subscription } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster'; - -import { IShare } from 'app/shared/model/share.model'; -import { AccountService } from 'app/core'; - -import { ITEMS_PER_PAGE } from 'app/shared'; -import { ShareService } from './share.service'; -import { IMembership } from 'app/shared/model/membership.model'; -import { MembershipService } from 'app/entities/membership'; -import { TableFilter, queryYearAsDateRange, queryEquals } from 'app/shared/util/tablefilter'; - -@Component({ - selector: 'jhi-share', - templateUrl: './share.component.html' -}) -export class ShareComponent implements OnInit, OnDestroy { - shares: IShare[]; - currentAccount: any; - eventSubscriber: Subscription; - itemsPerPage: number; - links: any; - page: any; - predicate: any; - reverse: any; - totalItems: number; - memberships: IMembership[]; - filter: TableFilter<{ - documentDate?: string; - valueDate?: string; - action?: string; - quantity?: string; - membershipId?: string; - }>; - - constructor( - protected shareService: ShareService, - protected membershipService: MembershipService, - protected jhiAlertService: JhiAlertService, - protected eventManager: JhiEventManager, - protected parseLinks: JhiParseLinks, - protected accountService: AccountService - ) { - this.shares = []; - this.itemsPerPage = ITEMS_PER_PAGE; - this.page = 0; - this.links = { - last: 0 - }; - this.predicate = 'id'; - this.reverse = true; - this.filter = new TableFilter( - { - documentDate: queryYearAsDateRange, - valueDate: queryYearAsDateRange, - action: queryEquals, - quantity: queryEquals, - membershipId: queryEquals - }, - 500, - () => { - this.reset(); - } - ); - } - - loadAll() { - this.shareService - .query({ - ...this.filter.buildQueryCriteria(), - page: this.page, - size: this.itemsPerPage, - sort: this.sort() - }) - .subscribe( - (res: HttpResponse) => this.paginateShares(res.body, res.headers), - (res: HttpErrorResponse) => this.onError(res.message) - ); - } - - reset() { - this.page = 0; - this.shares = []; - this.loadAll(); - } - - loadPage(page) { - this.page = page; - this.loadAll(); - } - - ngOnInit() { - this.loadAll(); - this.accountService.identity().then(account => { - this.currentAccount = account; - }); - this.membershipService - .query() - .pipe( - filter((mayBeOk: HttpResponse) => mayBeOk.ok), - map((response: HttpResponse) => response.body) - ) - .subscribe((res: IMembership[]) => (this.memberships = res), (res: HttpErrorResponse) => this.onError(res.message)); - this.registerChangeInShares(); - } - - ngOnDestroy() { - this.eventManager.destroy(this.eventSubscriber); - } - - trackId(index: number, item: { id: number }) { - return item.id; - } - - registerChangeInShares() { - this.eventSubscriber = this.eventManager.subscribe('shareListModification', response => this.reset()); - } - - sort() { - const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')]; - if (this.predicate !== 'id') { - result.push('id'); - } - return result; - } - - protected paginateShares(data: IShare[], headers: HttpHeaders) { - this.links = this.parseLinks.parse(headers.get('link')); - this.totalItems = parseInt(headers.get('X-Total-Count'), 10); - for (let i = 0; i < data.length; i++) { - this.shares.push(data[i]); - } - } - - protected onError(errorMessage: string) { - this.jhiAlertService.error(errorMessage, null, null); - } -} diff --git a/src/main/webapp/app/entities/share/share.module.ts b/src/main/webapp/app/entities/share/share.module.ts deleted file mode 100644 index 9fb07b3a..00000000 --- a/src/main/webapp/app/entities/share/share.module.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { JhiLanguageService } from 'ng-jhipster'; -import { JhiLanguageHelper } from 'app/core'; - -import { HsadminNgSharedModule } from 'app/shared'; -import { - ShareComponent, - ShareDetailComponent, - ShareUpdateComponent, - ShareDeletePopupComponent, - ShareDeleteDialogComponent, - shareRoute, - sharePopupRoute -} from './'; - -const ENTITY_STATES = [...shareRoute, ...sharePopupRoute]; - -@NgModule({ - imports: [HsadminNgSharedModule, RouterModule.forChild(ENTITY_STATES)], - declarations: [ShareComponent, ShareDetailComponent, ShareUpdateComponent, ShareDeleteDialogComponent, ShareDeletePopupComponent], - entryComponents: [ShareComponent, ShareUpdateComponent, ShareDeleteDialogComponent, ShareDeletePopupComponent], - providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class HsadminNgShareModule { - constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) { - this.languageHelper.language.subscribe((languageKey: string) => { - if (languageKey !== undefined) { - this.languageService.changeLanguage(languageKey); - } - }); - } -} diff --git a/src/main/webapp/app/entities/share/share.route.ts b/src/main/webapp/app/entities/share/share.route.ts deleted file mode 100644 index 36f35a5b..00000000 --- a/src/main/webapp/app/entities/share/share.route.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpResponse } from '@angular/common/http'; -import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router'; -import { UserRouteAccessService } from 'app/core'; -import { Observable, of } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { Share } from 'app/shared/model/share.model'; -import { ShareService } from './share.service'; -import { ShareComponent } from './share.component'; -import { ShareDetailComponent } from './share-detail.component'; -import { ShareUpdateComponent } from './share-update.component'; -import { ShareDeletePopupComponent } from './share-delete-dialog.component'; -import { IShare } from 'app/shared/model/share.model'; - -@Injectable({ providedIn: 'root' }) -export class ShareResolve implements Resolve { - constructor(private service: ShareService) {} - - resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { - const id = route.params['id'] ? route.params['id'] : null; - if (id) { - return this.service.find(id).pipe( - filter((response: HttpResponse) => response.ok), - map((share: HttpResponse) => share.body) - ); - } - return of(new Share()); - } -} - -export const shareRoute: Routes = [ - { - path: '', - component: ShareComponent, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.share.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: ':id/view', - component: ShareDetailComponent, - resolve: { - share: ShareResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.share.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: 'new', - component: ShareUpdateComponent, - resolve: { - share: ShareResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.share.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: ':id/edit', - component: ShareUpdateComponent, - resolve: { - share: ShareResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.share.home.title' - }, - canActivate: [UserRouteAccessService] - } -]; - -export const sharePopupRoute: Routes = [ - { - path: ':id/delete', - component: ShareDeletePopupComponent, - resolve: { - share: ShareResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.share.home.title' - }, - canActivate: [UserRouteAccessService], - outlet: 'popup' - } -]; diff --git a/src/main/webapp/app/entities/share/share.service.ts b/src/main/webapp/app/entities/share/share.service.ts deleted file mode 100644 index d9bf57ec..00000000 --- a/src/main/webapp/app/entities/share/share.service.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import * as moment from 'moment'; -import { DATE_FORMAT } from 'app/shared/constants/input.constants'; -import { map } from 'rxjs/operators'; - -import { SERVER_API_URL } from 'app/app.constants'; -import { createRequestOption } from 'app/shared'; -import { IShare } from 'app/shared/model/share.model'; - -type EntityResponseType = HttpResponse; -type EntityArrayResponseType = HttpResponse; - -@Injectable({ providedIn: 'root' }) -export class ShareService { - public resourceUrl = SERVER_API_URL + 'api/shares'; - - constructor(protected http: HttpClient) {} - - create(share: IShare): Observable { - const copy = this.convertDateFromClient(share); - return this.http - .post(this.resourceUrl, copy, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - update(share: IShare): Observable { - const copy = this.convertDateFromClient(share); - return this.http - .put(this.resourceUrl, copy, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - find(id: number): Observable { - return this.http - .get(`${this.resourceUrl}/${id}`, { observe: 'response' }) - .pipe(map((res: EntityResponseType) => this.convertDateFromServer(res))); - } - - query(req?: any): Observable { - const options = createRequestOption(req); - return this.http - .get(this.resourceUrl, { params: options, observe: 'response' }) - .pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res))); - } - - delete(id: number): Observable> { - return this.http.delete(`${this.resourceUrl}/${id}`, { observe: 'response' }); - } - - protected convertDateFromClient(share: IShare): IShare { - const copy: IShare = Object.assign({}, share, { - documentDate: share.documentDate != null && share.documentDate.isValid() ? share.documentDate.format(DATE_FORMAT) : null, - valueDate: share.valueDate != null && share.valueDate.isValid() ? share.valueDate.format(DATE_FORMAT) : null - }); - return copy; - } - - protected convertDateFromServer(res: EntityResponseType): EntityResponseType { - if (res.body) { - res.body.documentDate = res.body.documentDate != null ? moment(res.body.documentDate) : null; - res.body.valueDate = res.body.valueDate != null ? moment(res.body.valueDate) : null; - } - return res; - } - - protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType { - if (res.body) { - res.body.forEach((share: IShare) => { - share.documentDate = share.documentDate != null ? moment(share.documentDate) : null; - share.valueDate = share.valueDate != null ? moment(share.valueDate) : null; - }); - } - return res; - } -} diff --git a/src/main/webapp/app/entities/user-role-assignment/index.ts b/src/main/webapp/app/entities/user-role-assignment/index.ts deleted file mode 100644 index c09ebecf..00000000 --- a/src/main/webapp/app/entities/user-role-assignment/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './user-role-assignment.service'; -export * from './user-role-assignment-update.component'; -export * from './user-role-assignment-delete-dialog.component'; -export * from './user-role-assignment-detail.component'; -export * from './user-role-assignment.component'; -export * from './user-role-assignment.route'; diff --git a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-delete-dialog.component.html b/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-delete-dialog.component.html deleted file mode 100644 index abf0a02e..00000000 --- a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-delete-dialog.component.html +++ /dev/null @@ -1,19 +0,0 @@ -
- - - -
diff --git a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-delete-dialog.component.ts b/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-delete-dialog.component.ts deleted file mode 100644 index 886df8fc..00000000 --- a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-delete-dialog.component.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; - -import { NgbActiveModal, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { JhiEventManager } from 'ng-jhipster'; - -import { IUserRoleAssignment } from 'app/shared/model/user-role-assignment.model'; -import { UserRoleAssignmentService } from './user-role-assignment.service'; - -@Component({ - selector: 'jhi-user-role-assignment-delete-dialog', - templateUrl: './user-role-assignment-delete-dialog.component.html' -}) -export class UserRoleAssignmentDeleteDialogComponent { - userRoleAssignment: IUserRoleAssignment; - - constructor( - protected userRoleAssignmentService: UserRoleAssignmentService, - public activeModal: NgbActiveModal, - protected eventManager: JhiEventManager - ) {} - - clear() { - this.activeModal.dismiss('cancel'); - } - - confirmDelete(id: number) { - this.userRoleAssignmentService.delete(id).subscribe(response => { - this.eventManager.broadcast({ - name: 'userRoleAssignmentListModification', - content: 'Deleted an userRoleAssignment' - }); - this.activeModal.dismiss(true); - }); - } -} - -@Component({ - selector: 'jhi-user-role-assignment-delete-popup', - template: '' -}) -export class UserRoleAssignmentDeletePopupComponent implements OnInit, OnDestroy { - protected ngbModalRef: NgbModalRef; - - constructor(protected activatedRoute: ActivatedRoute, protected router: Router, protected modalService: NgbModal) {} - - ngOnInit() { - this.activatedRoute.data.subscribe(({ userRoleAssignment }) => { - setTimeout(() => { - this.ngbModalRef = this.modalService.open(UserRoleAssignmentDeleteDialogComponent as Component, { - size: 'lg', - backdrop: 'static' - }); - this.ngbModalRef.componentInstance.userRoleAssignment = userRoleAssignment; - this.ngbModalRef.result.then( - result => { - this.router.navigate(['/user-role-assignment', { outlets: { popup: null } }]); - this.ngbModalRef = null; - }, - reason => { - this.router.navigate(['/user-role-assignment', { outlets: { popup: null } }]); - this.ngbModalRef = null; - } - ); - }, 0); - }); - } - - ngOnDestroy() { - this.ngbModalRef = null; - } -} diff --git a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-detail.component.html b/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-detail.component.html deleted file mode 100644 index d94896cf..00000000 --- a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-detail.component.html +++ /dev/null @@ -1,39 +0,0 @@ -
-
-
-

User Role Assignment {{userRoleAssignment.id}}

-
- -
-
Entity Type Id
-
- {{userRoleAssignment.entityTypeId}} -
-
Entity Object Id
-
- {{userRoleAssignment.entityObjectId}} -
-
Assigned Role
-
- {{userRoleAssignment.assignedRole}} -
-
User
-
- {{userRoleAssignment.user?.login}} -
-
- - - - -
-
-
diff --git a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-detail.component.ts b/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-detail.component.ts deleted file mode 100644 index 7882a634..00000000 --- a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-detail.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { IUserRoleAssignment } from 'app/shared/model/user-role-assignment.model'; - -@Component({ - selector: 'jhi-user-role-assignment-detail', - templateUrl: './user-role-assignment-detail.component.html' -}) -export class UserRoleAssignmentDetailComponent implements OnInit { - userRoleAssignment: IUserRoleAssignment; - - constructor(protected activatedRoute: ActivatedRoute) {} - - ngOnInit() { - this.activatedRoute.data.subscribe(({ userRoleAssignment }) => { - this.userRoleAssignment = userRoleAssignment; - }); - } - - previousState() { - window.history.back(); - } -} diff --git a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-update.component.html b/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-update.component.html deleted file mode 100644 index 73dc3e8f..00000000 --- a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-update.component.html +++ /dev/null @@ -1,77 +0,0 @@ -
-
-
-

Create or edit a User Role Assignment

-
- -
- - -
-
- - -
- - This field is required. - - - This field cannot be longer than 32 characters. - -
-
-
- - -
- - This field is required. - - - This field should be a number. - -
-
-
- - -
- - This field is required. - -
-
- -
- - -
-
-
- - -
-
-
-
diff --git a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-update.component.ts b/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-update.component.ts deleted file mode 100644 index acd6dd35..00000000 --- a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment-update.component.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { HttpResponse, HttpErrorResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { JhiAlertService } from 'ng-jhipster'; -import { IUserRoleAssignment } from 'app/shared/model/user-role-assignment.model'; -import { UserRoleAssignmentService } from './user-role-assignment.service'; -import { IUser, UserService } from 'app/core'; - -@Component({ - selector: 'jhi-user-role-assignment-update', - templateUrl: './user-role-assignment-update.component.html' -}) -export class UserRoleAssignmentUpdateComponent implements OnInit { - userRoleAssignment: IUserRoleAssignment; - isSaving: boolean; - - users: IUser[]; - - constructor( - protected jhiAlertService: JhiAlertService, - protected userRoleAssignmentService: UserRoleAssignmentService, - protected userService: UserService, - protected activatedRoute: ActivatedRoute - ) {} - - ngOnInit() { - this.isSaving = false; - this.activatedRoute.data.subscribe(({ userRoleAssignment }) => { - this.userRoleAssignment = userRoleAssignment; - }); - this.userService - .query() - .pipe( - filter((mayBeOk: HttpResponse) => mayBeOk.ok), - map((response: HttpResponse) => response.body) - ) - .subscribe((res: IUser[]) => (this.users = res), (res: HttpErrorResponse) => this.onError(res.message)); - } - - previousState() { - window.history.back(); - } - - save() { - this.isSaving = true; - if (this.userRoleAssignment.id !== undefined) { - this.subscribeToSaveResponse(this.userRoleAssignmentService.update(this.userRoleAssignment)); - } else { - this.subscribeToSaveResponse(this.userRoleAssignmentService.create(this.userRoleAssignment)); - } - } - - protected subscribeToSaveResponse(result: Observable>) { - result.subscribe((res: HttpResponse) => this.onSaveSuccess(), (res: HttpErrorResponse) => this.onSaveError()); - } - - protected onSaveSuccess() { - this.isSaving = false; - this.previousState(); - } - - protected onSaveError() { - this.isSaving = false; - } - - protected onError(errorMessage: string) { - this.jhiAlertService.error(errorMessage, null, null); - } - - trackUserById(index: number, item: IUser) { - return item.id; - } -} diff --git a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.component.html b/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.component.html deleted file mode 100644 index 5510b4f7..00000000 --- a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.component.html +++ /dev/null @@ -1,90 +0,0 @@ -
-

- User Role Assignments - -

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ID Entity Type Id Entity Object Id Assigned Role User
- - - -
{{userRoleAssignment.id}}{{userRoleAssignment.entityTypeId}}{{userRoleAssignment.entityObjectId}}{{userRoleAssignment.assignedRole}} - {{userRoleAssignment.user?.login}} - -
- - - -
-
-
-
diff --git a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.component.ts b/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.component.ts deleted file mode 100644 index 38fde13c..00000000 --- a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.component.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http'; -import { Subscription } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster'; - -import { IUserRoleAssignment } from 'app/shared/model/user-role-assignment.model'; -import { AccountService } from 'app/core'; - -import { ITEMS_PER_PAGE } from 'app/shared'; -import { UserRoleAssignmentService } from './user-role-assignment.service'; -import { IUser } from 'app/core/user/user.model'; -import { UserService } from 'app/core/user/user.service'; -import { TableFilter, queryEquals, queryContains } from 'app/shared/util/tablefilter'; - -@Component({ - selector: 'jhi-user-role-assignment', - templateUrl: './user-role-assignment.component.html' -}) -export class UserRoleAssignmentComponent implements OnInit, OnDestroy { - userRoleAssignments: IUserRoleAssignment[]; - currentAccount: any; - eventSubscriber: Subscription; - itemsPerPage: number; - links: any; - page: any; - predicate: any; - reverse: any; - totalItems: number; - users: IUser[]; - filter: TableFilter<{ - entityTypeId?: string; - entityObjectId?: string; - assignedRole?: string; - userId?: string; - }>; - - constructor( - protected userRoleAssignmentService: UserRoleAssignmentService, - protected userService: UserService, - protected jhiAlertService: JhiAlertService, - protected eventManager: JhiEventManager, - protected parseLinks: JhiParseLinks, - protected accountService: AccountService - ) { - this.userRoleAssignments = []; - this.itemsPerPage = ITEMS_PER_PAGE; - this.page = 0; - this.links = { - last: 0 - }; - this.predicate = 'id'; - this.reverse = true; - this.filter = new TableFilter( - { - entityTypeId: queryContains, - entityObjectId: queryEquals, - assignedRole: queryEquals, - userId: queryEquals - }, - 500, - () => { - this.reset(); - } - ); - } - - loadAll() { - this.userRoleAssignmentService - .query({ - ...this.filter.buildQueryCriteria(), - page: this.page, - size: this.itemsPerPage, - sort: this.sort() - }) - .subscribe( - (res: HttpResponse) => this.paginateUserRoleAssignments(res.body, res.headers), - (res: HttpErrorResponse) => this.onError(res.message) - ); - } - - reset() { - this.page = 0; - this.userRoleAssignments = []; - this.loadAll(); - } - - loadPage(page) { - this.page = page; - this.loadAll(); - } - - ngOnInit() { - this.loadAll(); - this.accountService.identity().then(account => { - this.currentAccount = account; - }); - this.userService - .query() - .pipe( - filter((mayBeOk: HttpResponse) => mayBeOk.ok), - map((response: HttpResponse) => response.body) - ) - .subscribe((res: IUser[]) => (this.users = res), (res: HttpErrorResponse) => this.onError(res.message)); - this.registerChangeInUserRoleAssignments(); - } - - ngOnDestroy() { - this.eventManager.destroy(this.eventSubscriber); - } - - trackId(index: number, item: { id: number }) { - return item.id; - } - - registerChangeInUserRoleAssignments() { - this.eventSubscriber = this.eventManager.subscribe('userRoleAssignmentListModification', response => this.reset()); - } - - sort() { - const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')]; - if (this.predicate !== 'id') { - result.push('id'); - } - return result; - } - - protected paginateUserRoleAssignments(data: IUserRoleAssignment[], headers: HttpHeaders) { - this.links = this.parseLinks.parse(headers.get('link')); - this.totalItems = parseInt(headers.get('X-Total-Count'), 10); - for (let i = 0; i < data.length; i++) { - this.userRoleAssignments.push(data[i]); - } - } - - protected onError(errorMessage: string) { - this.jhiAlertService.error(errorMessage, null, null); - } -} diff --git a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.module.ts b/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.module.ts deleted file mode 100644 index f90bd034..00000000 --- a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.module.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { JhiLanguageService } from 'ng-jhipster'; -import { JhiLanguageHelper } from 'app/core'; - -import { HsadminNgSharedModule } from 'app/shared'; -import { - UserRoleAssignmentComponent, - UserRoleAssignmentDetailComponent, - UserRoleAssignmentUpdateComponent, - UserRoleAssignmentDeletePopupComponent, - UserRoleAssignmentDeleteDialogComponent, - userRoleAssignmentRoute, - userRoleAssignmentPopupRoute -} from './'; - -const ENTITY_STATES = [...userRoleAssignmentRoute, ...userRoleAssignmentPopupRoute]; - -@NgModule({ - imports: [HsadminNgSharedModule, RouterModule.forChild(ENTITY_STATES)], - declarations: [ - UserRoleAssignmentComponent, - UserRoleAssignmentDetailComponent, - UserRoleAssignmentUpdateComponent, - UserRoleAssignmentDeleteDialogComponent, - UserRoleAssignmentDeletePopupComponent - ], - entryComponents: [ - UserRoleAssignmentComponent, - UserRoleAssignmentUpdateComponent, - UserRoleAssignmentDeleteDialogComponent, - UserRoleAssignmentDeletePopupComponent - ], - providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class HsadminNgUserRoleAssignmentModule { - constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) { - this.languageHelper.language.subscribe((languageKey: string) => { - if (languageKey !== undefined) { - this.languageService.changeLanguage(languageKey); - } - }); - } -} diff --git a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.route.ts b/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.route.ts deleted file mode 100644 index 7271326a..00000000 --- a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.route.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpResponse } from '@angular/common/http'; -import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router'; -import { UserRouteAccessService } from 'app/core'; -import { Observable, of } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; -import { UserRoleAssignment } from 'app/shared/model/user-role-assignment.model'; -import { UserRoleAssignmentService } from './user-role-assignment.service'; -import { UserRoleAssignmentComponent } from './user-role-assignment.component'; -import { UserRoleAssignmentDetailComponent } from './user-role-assignment-detail.component'; -import { UserRoleAssignmentUpdateComponent } from './user-role-assignment-update.component'; -import { UserRoleAssignmentDeletePopupComponent } from './user-role-assignment-delete-dialog.component'; -import { IUserRoleAssignment } from 'app/shared/model/user-role-assignment.model'; - -@Injectable({ providedIn: 'root' }) -export class UserRoleAssignmentResolve implements Resolve { - constructor(private service: UserRoleAssignmentService) {} - - resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { - const id = route.params['id'] ? route.params['id'] : null; - if (id) { - return this.service.find(id).pipe( - filter((response: HttpResponse) => response.ok), - map((userRoleAssignment: HttpResponse) => userRoleAssignment.body) - ); - } - return of(new UserRoleAssignment()); - } -} - -export const userRoleAssignmentRoute: Routes = [ - { - path: '', - component: UserRoleAssignmentComponent, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.userRoleAssignment.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: ':id/view', - component: UserRoleAssignmentDetailComponent, - resolve: { - userRoleAssignment: UserRoleAssignmentResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.userRoleAssignment.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: 'new', - component: UserRoleAssignmentUpdateComponent, - resolve: { - userRoleAssignment: UserRoleAssignmentResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.userRoleAssignment.home.title' - }, - canActivate: [UserRouteAccessService] - }, - { - path: ':id/edit', - component: UserRoleAssignmentUpdateComponent, - resolve: { - userRoleAssignment: UserRoleAssignmentResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.userRoleAssignment.home.title' - }, - canActivate: [UserRouteAccessService] - } -]; - -export const userRoleAssignmentPopupRoute: Routes = [ - { - path: ':id/delete', - component: UserRoleAssignmentDeletePopupComponent, - resolve: { - userRoleAssignment: UserRoleAssignmentResolve - }, - data: { - authorities: ['ROLE_USER'], - pageTitle: 'hsadminNgApp.userRoleAssignment.home.title' - }, - canActivate: [UserRouteAccessService], - outlet: 'popup' - } -]; diff --git a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.service.ts b/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.service.ts deleted file mode 100644 index ea268039..00000000 --- a/src/main/webapp/app/entities/user-role-assignment/user-role-assignment.service.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -import { SERVER_API_URL } from 'app/app.constants'; -import { createRequestOption } from 'app/shared'; -import { IUserRoleAssignment } from 'app/shared/model/user-role-assignment.model'; - -type EntityResponseType = HttpResponse; -type EntityArrayResponseType = HttpResponse; - -@Injectable({ providedIn: 'root' }) -export class UserRoleAssignmentService { - public resourceUrl = SERVER_API_URL + 'api/user-role-assignments'; - - constructor(protected http: HttpClient) {} - - create(userRoleAssignment: IUserRoleAssignment): Observable { - return this.http.post(this.resourceUrl, userRoleAssignment, { observe: 'response' }); - } - - update(userRoleAssignment: IUserRoleAssignment): Observable { - return this.http.put(this.resourceUrl, userRoleAssignment, { observe: 'response' }); - } - - find(id: number): Observable { - return this.http.get(`${this.resourceUrl}/${id}`, { observe: 'response' }); - } - - query(req?: any): Observable { - const options = createRequestOption(req); - return this.http.get(this.resourceUrl, { params: options, observe: 'response' }); - } - - delete(id: number): Observable> { - return this.http.delete(`${this.resourceUrl}/${id}`, { observe: 'response' }); - } -} diff --git a/src/main/webapp/app/home/home.component.html b/src/main/webapp/app/home/home.component.html deleted file mode 100644 index 46417688..00000000 --- a/src/main/webapp/app/home/home.component.html +++ /dev/null @@ -1,41 +0,0 @@ -
-
- -
-
-

Welcome, Java Hipster!

-

This is your homepage

- -
-
- You are logged in as user "{{account.login}}". -
- -
- If you want to - sign in, you can try the default accounts:
- Administrator (login="admin" and password="admin")
- User (login="user" and password="user").
-
-
- You don't have an account yet?  - Register a new account -
-
- -

- If you have any question on JHipster: -

- - - -

- If you like JHipster, don't forget to give us a star on GitHub! -

-
-
diff --git a/src/main/webapp/app/home/home.component.ts b/src/main/webapp/app/home/home.component.ts deleted file mode 100644 index af0e6c4e..00000000 --- a/src/main/webapp/app/home/home.component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { JhiEventManager } from 'ng-jhipster'; - -import { LoginModalService, AccountService, Account } from 'app/core'; - -@Component({ - selector: 'jhi-home', - templateUrl: './home.component.html', - styleUrls: ['home.css'] -}) -export class HomeComponent implements OnInit { - account: Account; - modalRef: NgbModalRef; - - constructor( - private accountService: AccountService, - private loginModalService: LoginModalService, - private eventManager: JhiEventManager - ) {} - - ngOnInit() { - this.accountService.identity().then((account: Account) => { - this.account = account; - }); - this.registerAuthenticationSuccess(); - } - - registerAuthenticationSuccess() { - this.eventManager.subscribe('authenticationSuccess', message => { - this.accountService.identity().then(account => { - this.account = account; - }); - }); - } - - isAuthenticated() { - return this.accountService.isAuthenticated(); - } - - login() { - this.modalRef = this.loginModalService.open(); - } -} diff --git a/src/main/webapp/app/home/home.css b/src/main/webapp/app/home/home.css deleted file mode 100644 index 736b6999..00000000 --- a/src/main/webapp/app/home/home.css +++ /dev/null @@ -1,23 +0,0 @@ -/* ========================================================================== -Main page styles -========================================================================== */ - -.hipster { - display: inline-block; - width: 347px; - height: 497px; - background: url('../../content/images/jhipster_family_member_3.svg') no-repeat center top; - background-size: contain; -} - -/* wait autoprefixer update to allow simple generation of high pixel density media query */ -@media only screen and (-webkit-min-device-pixel-ratio: 2), - only screen and (-moz-min-device-pixel-ratio: 2), - only screen and (-o-min-device-pixel-ratio: 2/1), - only screen and (min-resolution: 192dpi), - only screen and (min-resolution: 2dppx) { - .hipster { - background: url('../../content/images/jhipster_family_member_3.svg') no-repeat center top; - background-size: contain; - } -} diff --git a/src/main/webapp/app/home/home.module.ts b/src/main/webapp/app/home/home.module.ts deleted file mode 100644 index 617df607..00000000 --- a/src/main/webapp/app/home/home.module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { HsadminNgSharedModule } from 'app/shared'; -import { HOME_ROUTE, HomeComponent } from './'; - -@NgModule({ - imports: [HsadminNgSharedModule, RouterModule.forChild([HOME_ROUTE])], - declarations: [HomeComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class HsadminNgHomeModule {} diff --git a/src/main/webapp/app/home/home.route.ts b/src/main/webapp/app/home/home.route.ts deleted file mode 100644 index cfa1a3fb..00000000 --- a/src/main/webapp/app/home/home.route.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Route } from '@angular/router'; - -import { HomeComponent } from './'; - -export const HOME_ROUTE: Route = { - path: '', - component: HomeComponent, - data: { - authorities: [], - pageTitle: 'home.title' - } -}; diff --git a/src/main/webapp/app/home/index.ts b/src/main/webapp/app/home/index.ts deleted file mode 100644 index d76285b2..00000000 --- a/src/main/webapp/app/home/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './home.component'; -export * from './home.route'; -export * from './home.module'; diff --git a/src/main/webapp/app/layouts/error/error.component.html b/src/main/webapp/app/layouts/error/error.component.html deleted file mode 100644 index 64a40392..00000000 --- a/src/main/webapp/app/layouts/error/error.component.html +++ /dev/null @@ -1,19 +0,0 @@ -
-
-
- -
-
-

Error Page!

- -
-
{{errorMessage}} -
-
-
You are not authorized to access this page. -
-
The page asked was not found. -
-
-
-
diff --git a/src/main/webapp/app/layouts/error/error.component.ts b/src/main/webapp/app/layouts/error/error.component.ts deleted file mode 100644 index faa96581..00000000 --- a/src/main/webapp/app/layouts/error/error.component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -@Component({ - selector: 'jhi-error', - templateUrl: './error.component.html' -}) -export class ErrorComponent implements OnInit { - errorMessage: string; - error403: boolean; - error404: boolean; - - constructor(private route: ActivatedRoute) {} - - ngOnInit() { - this.route.data.subscribe(routeData => { - if (routeData.error403) { - this.error403 = routeData.error403; - } - if (routeData.error404) { - this.error404 = routeData.error404; - } - if (routeData.errorMessage) { - this.errorMessage = routeData.errorMessage; - } - }); - } -} diff --git a/src/main/webapp/app/layouts/error/error.route.ts b/src/main/webapp/app/layouts/error/error.route.ts deleted file mode 100644 index f40b4c7c..00000000 --- a/src/main/webapp/app/layouts/error/error.route.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Routes } from '@angular/router'; - -import { ErrorComponent } from './error.component'; - -export const errorRoute: Routes = [ - { - path: 'error', - component: ErrorComponent, - data: { - authorities: [], - pageTitle: 'error.title' - } - }, - { - path: 'accessdenied', - component: ErrorComponent, - data: { - authorities: [], - pageTitle: 'error.title', - error403: true - } - }, - { - path: '404', - component: ErrorComponent, - data: { - authorities: [], - pageTitle: 'error.title', - error404: true - } - }, - { - path: '**', - redirectTo: '/404' - } -]; diff --git a/src/main/webapp/app/layouts/footer/footer.component.html b/src/main/webapp/app/layouts/footer/footer.component.html deleted file mode 100644 index 9312ad06..00000000 --- a/src/main/webapp/app/layouts/footer/footer.component.html +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/src/main/webapp/app/layouts/footer/footer.component.ts b/src/main/webapp/app/layouts/footer/footer.component.ts deleted file mode 100644 index 37da8bca..00000000 --- a/src/main/webapp/app/layouts/footer/footer.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'jhi-footer', - templateUrl: './footer.component.html' -}) -export class FooterComponent {} diff --git a/src/main/webapp/app/layouts/index.ts b/src/main/webapp/app/layouts/index.ts deleted file mode 100644 index d7432602..00000000 --- a/src/main/webapp/app/layouts/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './error/error.component'; -export * from './error/error.route'; -export * from './main/main.component'; -export * from './footer/footer.component'; -export * from './navbar/navbar.component'; -export * from './navbar/navbar.route'; -export * from './navbar/active-menu.directive'; -export * from './profiles/page-ribbon.component'; -export * from './profiles/profile.service'; -export * from './profiles/profile-info.model'; diff --git a/src/main/webapp/app/layouts/main/main.component.html b/src/main/webapp/app/layouts/main/main.component.html deleted file mode 100644 index 5bcd12ab..00000000 --- a/src/main/webapp/app/layouts/main/main.component.html +++ /dev/null @@ -1,11 +0,0 @@ - -
- -
-
-
- - -
- -
diff --git a/src/main/webapp/app/layouts/main/main.component.ts b/src/main/webapp/app/layouts/main/main.component.ts deleted file mode 100644 index 4aa553bf..00000000 --- a/src/main/webapp/app/layouts/main/main.component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { Router, ActivatedRouteSnapshot, NavigationEnd, NavigationError } from '@angular/router'; - -import { JhiLanguageHelper } from 'app/core'; - -@Component({ - selector: 'jhi-main', - templateUrl: './main.component.html' -}) -export class JhiMainComponent implements OnInit { - constructor(private jhiLanguageHelper: JhiLanguageHelper, private router: Router) {} - - private getPageTitle(routeSnapshot: ActivatedRouteSnapshot) { - let title: string = routeSnapshot.data && routeSnapshot.data['pageTitle'] ? routeSnapshot.data['pageTitle'] : 'hsadminNgApp'; - if (routeSnapshot.firstChild) { - title = this.getPageTitle(routeSnapshot.firstChild) || title; - } - return title; - } - - ngOnInit() { - this.router.events.subscribe(event => { - if (event instanceof NavigationEnd) { - this.jhiLanguageHelper.updateTitle(this.getPageTitle(this.router.routerState.snapshot.root)); - } - if (event instanceof NavigationError && event.error.status === 404) { - this.router.navigate(['/404']); - } - }); - } -} diff --git a/src/main/webapp/app/layouts/navbar/active-menu.directive.ts b/src/main/webapp/app/layouts/navbar/active-menu.directive.ts deleted file mode 100644 index edbdeb94..00000000 --- a/src/main/webapp/app/layouts/navbar/active-menu.directive.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Directive, OnInit, ElementRef, Renderer, Input } from '@angular/core'; -import { TranslateService, LangChangeEvent } from '@ngx-translate/core'; - -@Directive({ - selector: '[jhiActiveMenu]' -}) -export class ActiveMenuDirective implements OnInit { - @Input() jhiActiveMenu: string; - - constructor(private el: ElementRef, private renderer: Renderer, private translateService: TranslateService) {} - - ngOnInit() { - this.translateService.onLangChange.subscribe((event: LangChangeEvent) => { - this.updateActiveFlag(event.lang); - }); - this.updateActiveFlag(this.translateService.currentLang); - } - - updateActiveFlag(selectedLanguage) { - if (this.jhiActiveMenu === selectedLanguage) { - this.renderer.setElementClass(this.el.nativeElement, 'active', true); - } else { - this.renderer.setElementClass(this.el.nativeElement, 'active', false); - } - } -} diff --git a/src/main/webapp/app/layouts/navbar/navbar.component.html b/src/main/webapp/app/layouts/navbar/navbar.component.html deleted file mode 100644 index cf34be25..00000000 --- a/src/main/webapp/app/layouts/navbar/navbar.component.html +++ /dev/null @@ -1,188 +0,0 @@ - diff --git a/src/main/webapp/app/layouts/navbar/navbar.component.ts b/src/main/webapp/app/layouts/navbar/navbar.component.ts deleted file mode 100644 index 52873680..00000000 --- a/src/main/webapp/app/layouts/navbar/navbar.component.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; -import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { JhiLanguageService } from 'ng-jhipster'; -import { SessionStorageService } from 'ngx-webstorage'; - -import { VERSION } from 'app/app.constants'; -import { JhiLanguageHelper, AccountService, LoginModalService, LoginService } from 'app/core'; -import { ProfileService } from 'app/layouts/profiles/profile.service'; - -@Component({ - selector: 'jhi-navbar', - templateUrl: './navbar.component.html', - styleUrls: ['navbar.css'] -}) -export class NavbarComponent implements OnInit { - inProduction: boolean; - isNavbarCollapsed: boolean; - languages: any[]; - swaggerEnabled: boolean; - modalRef: NgbModalRef; - version: string; - - constructor( - private loginService: LoginService, - private languageService: JhiLanguageService, - private languageHelper: JhiLanguageHelper, - private sessionStorage: SessionStorageService, - private accountService: AccountService, - private loginModalService: LoginModalService, - private profileService: ProfileService, - private router: Router - ) { - this.version = VERSION ? 'v' + VERSION : ''; - this.isNavbarCollapsed = true; - } - - ngOnInit() { - this.languageHelper.getAll().then(languages => { - this.languages = languages; - }); - - this.profileService.getProfileInfo().then(profileInfo => { - this.inProduction = profileInfo.inProduction; - this.swaggerEnabled = profileInfo.swaggerEnabled; - }); - } - - changeLanguage(languageKey: string) { - this.sessionStorage.store('locale', languageKey); - this.languageService.changeLanguage(languageKey); - } - - collapseNavbar() { - this.isNavbarCollapsed = true; - } - - isAuthenticated() { - return this.accountService.isAuthenticated(); - } - - login() { - this.modalRef = this.loginModalService.open(); - } - - logout() { - this.collapseNavbar(); - this.loginService.logout(); - this.router.navigate(['']); - } - - toggleNavbar() { - this.isNavbarCollapsed = !this.isNavbarCollapsed; - } - - getImageUrl() { - return this.isAuthenticated() ? this.accountService.getImageUrl() : null; - } -} diff --git a/src/main/webapp/app/layouts/navbar/navbar.css b/src/main/webapp/app/layouts/navbar/navbar.css deleted file mode 100644 index dccbee08..00000000 --- a/src/main/webapp/app/layouts/navbar/navbar.css +++ /dev/null @@ -1,89 +0,0 @@ -/* ========================================================================== -Navbar -========================================================================== */ -.navbar-version { - font-size: 10px; - color: #ccc; -} - -.jh-navbar { - background-color: #353d47; - padding: 0.2em 1em; -} - -.jh-navbar .profile-image { - margin: -10px 0px; - height: 40px; - width: 40px; - border-radius: 50%; -} - -.jh-navbar .dropdown-item.active, -.jh-navbar .dropdown-item.active:focus, -.jh-navbar .dropdown-item.active:hover { - background-color: #353d47; -} - -.jh-navbar .dropdown-toggle::after { - margin-left: 0.15em; -} - -.jh-navbar ul.navbar-nav { - padding: 0.5em; -} - -.jh-navbar .navbar-nav .nav-item { - margin-left: 1.5rem; -} - -.jh-navbar a.nav-link { - font-weight: 400; -} - -.jh-navbar .jh-navbar-toggler { - color: #ccc; - font-size: 1.5em; - padding: 10px; -} - -.jh-navbar .jh-navbar-toggler:hover { - color: #fff; -} - -@media screen and (min-width: 768px) { - .jh-navbar-toggler { - display: none; - } -} - -@media screen and (max-width: 992px) { - .jh-logo-container { - width: 100%; - } -} - -.navbar-title { - display: inline-block; - vertical-align: middle; -} - -/* ========================================================================== -Logo styles -========================================================================== */ -.navbar-brand.logo { - padding: 5px 15px; -} - -.logo-img { - height: 100%; - background: url('../../../content/images/logo-jhipster.png') no-repeat center center; - background-size: contain; - width: 100%; -} - -.logo .logo-img { - height: 45px; - display: inline-block; - vertical-align: middle; - width: 70px; -} diff --git a/src/main/webapp/app/layouts/navbar/navbar.route.ts b/src/main/webapp/app/layouts/navbar/navbar.route.ts deleted file mode 100644 index 317d9960..00000000 --- a/src/main/webapp/app/layouts/navbar/navbar.route.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Route } from '@angular/router'; - -import { NavbarComponent } from './navbar.component'; - -export const navbarRoute: Route = { - path: '', - component: NavbarComponent, - outlet: 'navbar' -}; diff --git a/src/main/webapp/app/layouts/profiles/page-ribbon.component.ts b/src/main/webapp/app/layouts/profiles/page-ribbon.component.ts deleted file mode 100644 index bcdb5069..00000000 --- a/src/main/webapp/app/layouts/profiles/page-ribbon.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ProfileService } from './profile.service'; -import { ProfileInfo } from './profile-info.model'; - -@Component({ - selector: 'jhi-page-ribbon', - template: ` - - `, - styleUrls: ['page-ribbon.css'] -}) -export class PageRibbonComponent implements OnInit { - profileInfo: ProfileInfo; - ribbonEnv: string; - - constructor(private profileService: ProfileService) {} - - ngOnInit() { - this.profileService.getProfileInfo().then(profileInfo => { - this.profileInfo = profileInfo; - this.ribbonEnv = profileInfo.ribbonEnv; - }); - } -} diff --git a/src/main/webapp/app/layouts/profiles/page-ribbon.css b/src/main/webapp/app/layouts/profiles/page-ribbon.css deleted file mode 100644 index b07c9efe..00000000 --- a/src/main/webapp/app/layouts/profiles/page-ribbon.css +++ /dev/null @@ -1,32 +0,0 @@ -/* ========================================================================== -Developement Ribbon -========================================================================== */ -.ribbon { - background-color: rgba(170, 0, 0, 0.5); - left: -3.5em; - -moz-transform: rotate(-45deg); - -ms-transform: rotate(-45deg); - -o-transform: rotate(-45deg); - -webkit-transform: rotate(-45deg); - transform: rotate(-45deg); - overflow: hidden; - position: absolute; - top: 40px; - white-space: nowrap; - width: 15em; - z-index: 9999; - pointer-events: none; - opacity: 0.75; -} - -.ribbon a { - color: #fff; - display: block; - font-weight: 400; - margin: 1px 0; - padding: 10px 50px; - text-align: center; - text-decoration: none; - text-shadow: 0 0 5px #444; - pointer-events: none; -} diff --git a/src/main/webapp/app/layouts/profiles/profile-info.model.ts b/src/main/webapp/app/layouts/profiles/profile-info.model.ts deleted file mode 100644 index f1adc52c..00000000 --- a/src/main/webapp/app/layouts/profiles/profile-info.model.ts +++ /dev/null @@ -1,6 +0,0 @@ -export class ProfileInfo { - activeProfiles: string[]; - ribbonEnv: string; - inProduction: boolean; - swaggerEnabled: boolean; -} diff --git a/src/main/webapp/app/layouts/profiles/profile.service.ts b/src/main/webapp/app/layouts/profiles/profile.service.ts deleted file mode 100644 index d07fad7e..00000000 --- a/src/main/webapp/app/layouts/profiles/profile.service.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpResponse } from '@angular/common/http'; - -import { SERVER_API_URL } from 'app/app.constants'; -import { ProfileInfo } from './profile-info.model'; -import { map } from 'rxjs/operators'; - -@Injectable({ providedIn: 'root' }) -export class ProfileService { - private infoUrl = SERVER_API_URL + 'management/info'; - private profileInfo: Promise; - - constructor(private http: HttpClient) {} - - getProfileInfo(): Promise { - if (!this.profileInfo) { - this.profileInfo = this.http - .get(this.infoUrl, { observe: 'response' }) - .pipe( - map((res: HttpResponse) => { - const data = res.body; - const pi = new ProfileInfo(); - pi.activeProfiles = data['activeProfiles']; - const displayRibbonOnProfiles = data['display-ribbon-on-profiles'].split(','); - if (pi.activeProfiles) { - const ribbonProfiles = displayRibbonOnProfiles.filter(profile => pi.activeProfiles.includes(profile)); - if (ribbonProfiles.length !== 0) { - pi.ribbonEnv = ribbonProfiles[0]; - } - pi.inProduction = pi.activeProfiles.includes('prod'); - pi.swaggerEnabled = pi.activeProfiles.includes('swagger'); - } - return pi; - }) - ) - .toPromise(); - } - return this.profileInfo; - } -} diff --git a/src/main/webapp/app/polyfills.ts b/src/main/webapp/app/polyfills.ts deleted file mode 100644 index cf38f322..00000000 --- a/src/main/webapp/app/polyfills.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -import 'core-js/es6/symbol'; -import 'core-js/es6/object'; -import 'core-js/es6/function'; -import 'core-js/es6/parse-int'; -import 'core-js/es6/parse-float'; -import 'core-js/es6/number'; -import 'core-js/es6/math'; -import 'core-js/es6/string'; -import 'core-js/es6/date'; -import 'core-js/es6/array'; -import 'core-js/es7/array'; -import 'core-js/es6/regexp'; -import 'core-js/es6/map'; -import 'core-js/es6/weak-map'; -import 'core-js/es6/set'; - -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** Evergreen browsers require these. **/ -import 'core-js/es6/reflect'; -import 'core-js/es7/reflect'; - -/** - * Required to support Web Animations `@angular/animation`. - * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation - **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - -/*************************************************************************************************** - * Zone JS is required by Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ - -/** - * Date, currency, decimal and percent pipes. - * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 - */ -// import 'intl'; // Run `npm install --save intl`. -/** - * Need to import at least one locale-data with intl. - */ -// import 'intl/locale-data/jsonp/en'; - -require('../manifest.webapp'); diff --git a/src/main/webapp/app/shared/alert/alert-error.component.ts b/src/main/webapp/app/shared/alert/alert-error.component.ts deleted file mode 100644 index 248bc75d..00000000 --- a/src/main/webapp/app/shared/alert/alert-error.component.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Component, OnDestroy } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; -import { JhiEventManager, JhiAlert, JhiAlertService } from 'ng-jhipster'; -import { Subscription } from 'rxjs'; - -@Component({ - selector: 'jhi-alert-error', - template: ` - - ` -}) -export class JhiAlertErrorComponent implements OnDestroy { - alerts: any[]; - cleanHttpErrorListener: Subscription; - /* tslint:disable */ - constructor(private alertService: JhiAlertService, private eventManager: JhiEventManager, private translateService: TranslateService) { - /* tslint:enable */ - this.alerts = []; - - this.cleanHttpErrorListener = eventManager.subscribe('hsadminNgApp.httpError', response => { - let i; - const httpErrorResponse = response.content; - switch (httpErrorResponse.status) { - // connection refused, server not reachable - case 0: - this.addErrorAlert('Server not reachable', 'error.server.not.reachable'); - break; - - case 400: - const arr = httpErrorResponse.headers.keys(); - let errorHeader = null; - let entityKey = null; - arr.forEach(entry => { - if (entry.toLowerCase().endsWith('app-error')) { - errorHeader = httpErrorResponse.headers.get(entry); - } else if (entry.toLowerCase().endsWith('app-params')) { - entityKey = httpErrorResponse.headers.get(entry); - } - }); - if (errorHeader) { - const entityName = translateService.instant('global.menu.entities.' + entityKey); - this.addErrorAlert(errorHeader, errorHeader, { entityName }); - } else if (httpErrorResponse.error !== '' && httpErrorResponse.error.fieldErrors) { - const fieldErrors = httpErrorResponse.error.fieldErrors; - for (i = 0; i < fieldErrors.length; i++) { - const fieldError = fieldErrors[i]; - if (['Min', 'Max', 'DecimalMin', 'DecimalMax'].includes(fieldError.message)) { - fieldError.message = 'Size'; - } - // convert 'something[14].other[4].id' to 'something[].other[].id' so translations can be written to it - const convertedField = fieldError.field.replace(/\[\d*\]/g, '[]'); - const fieldName = translateService.instant('hsadminNgApp.' + fieldError.objectName + '.' + convertedField); - this.addErrorAlert('Error on field "' + fieldName + '"', 'error.' + fieldError.message, { fieldName }); - } - } else if (httpErrorResponse.error !== '' && httpErrorResponse.error.message) { - this.addErrorAlert( - httpErrorResponse.error.message, - httpErrorResponse.error.message, - httpErrorResponse.error.params - ); - } else { - this.addErrorAlert(httpErrorResponse.error); - } - break; - - case 404: - this.addErrorAlert('Not found', 'error.url.not.found'); - break; - - default: - if (httpErrorResponse.error !== '' && httpErrorResponse.error.message) { - this.addErrorAlert(httpErrorResponse.error.message); - } else { - this.addErrorAlert(httpErrorResponse.error); - } - } - }); - } - - setClasses(alert) { - return { - toast: !!alert.toast, - [alert.position]: true - }; - } - - ngOnDestroy() { - if (this.cleanHttpErrorListener !== undefined && this.cleanHttpErrorListener !== null) { - this.eventManager.destroy(this.cleanHttpErrorListener); - this.alerts = []; - } - } - - addErrorAlert(message, key?, data?) { - message = key && key !== null ? key : message; - - const newAlert: JhiAlert = { - type: 'danger', - msg: message, - params: data, - timeout: 5000, - toast: this.alertService.isToast(), - scoped: true - }; - - this.alerts.push(this.alertService.addAlert(newAlert, this.alerts)); - } -} diff --git a/src/main/webapp/app/shared/alert/alert.component.ts b/src/main/webapp/app/shared/alert/alert.component.ts deleted file mode 100644 index a77c3e72..00000000 --- a/src/main/webapp/app/shared/alert/alert.component.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { JhiAlertService } from 'ng-jhipster'; - -@Component({ - selector: 'jhi-alert', - template: ` - - ` -}) -export class JhiAlertComponent implements OnInit, OnDestroy { - alerts: any[]; - - constructor(private alertService: JhiAlertService) {} - - ngOnInit() { - this.alerts = this.alertService.get(); - } - - setClasses(alert) { - return { - toast: !!alert.toast, - [alert.position]: true - }; - } - - ngOnDestroy() { - this.alerts = []; - } -} diff --git a/src/main/webapp/app/shared/auth/has-any-authority.directive.ts b/src/main/webapp/app/shared/auth/has-any-authority.directive.ts deleted file mode 100644 index 0f8cefb2..00000000 --- a/src/main/webapp/app/shared/auth/has-any-authority.directive.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core'; -import { AccountService } from 'app/core/auth/account.service'; - -/** - * @whatItDoes Conditionally includes an HTML element if current user has any - * of the authorities passed as the `expression`. - * - * @howToUse - * ``` - * ... - * - * ... - * ``` - */ -@Directive({ - selector: '[jhiHasAnyAuthority]' -}) -export class HasAnyAuthorityDirective { - private authorities: string[]; - - constructor( - private accountService: AccountService, - private templateRef: TemplateRef, - private viewContainerRef: ViewContainerRef - ) {} - - @Input() - set jhiHasAnyAuthority(value: string | string[]) { - this.authorities = typeof value === 'string' ? [value] : value; - this.updateView(); - // Get notified each time authentication state changes. - this.accountService.getAuthenticationState().subscribe(identity => this.updateView()); - } - - private updateView(): void { - const hasAnyAuthority = this.accountService.hasAnyAuthority(this.authorities); - this.viewContainerRef.clear(); - if (hasAnyAuthority) { - this.viewContainerRef.createEmbeddedView(this.templateRef); - } - } -} diff --git a/src/main/webapp/app/shared/constants/error.constants.ts b/src/main/webapp/app/shared/constants/error.constants.ts deleted file mode 100644 index 2ebea942..00000000 --- a/src/main/webapp/app/shared/constants/error.constants.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const PROBLEM_BASE_URL = 'https://www.jhipster.tech/problem'; -export const EMAIL_ALREADY_USED_TYPE = PROBLEM_BASE_URL + '/email-already-used'; -export const LOGIN_ALREADY_USED_TYPE = PROBLEM_BASE_URL + '/login-already-used'; -export const EMAIL_NOT_FOUND_TYPE = PROBLEM_BASE_URL + '/email-not-found'; diff --git a/src/main/webapp/app/shared/constants/input.constants.ts b/src/main/webapp/app/shared/constants/input.constants.ts deleted file mode 100644 index 1e3978a9..00000000 --- a/src/main/webapp/app/shared/constants/input.constants.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const DATE_FORMAT = 'YYYY-MM-DD'; -export const DATE_TIME_FORMAT = 'YYYY-MM-DDTHH:mm'; diff --git a/src/main/webapp/app/shared/constants/pagination.constants.ts b/src/main/webapp/app/shared/constants/pagination.constants.ts deleted file mode 100644 index 1d1b27bb..00000000 --- a/src/main/webapp/app/shared/constants/pagination.constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -// For infinite scroll, it should be more than fits into a window height. -// Otherwise, the scrollbar might not be there at all, and further pages can't be reached. -export const ITEMS_PER_PAGE = 100; diff --git a/src/main/webapp/app/shared/index.ts b/src/main/webapp/app/shared/index.ts deleted file mode 100644 index 27d7cc07..00000000 --- a/src/main/webapp/app/shared/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -export * from './constants/error.constants'; -export * from './constants/pagination.constants'; -export * from './constants/input.constants'; -export * from './alert/alert.component'; -export * from './alert/alert-error.component'; -export * from './auth/has-any-authority.directive'; -export * from './language/find-language-from-key.pipe'; -export * from './login/login.component'; -export * from './util/request-util'; -export * from './shared-libs.module'; -export * from './shared-common.module'; -export * from './shared.module'; -export * from './util/datepicker-adapter'; diff --git a/src/main/webapp/app/shared/language/find-language-from-key.pipe.ts b/src/main/webapp/app/shared/language/find-language-from-key.pipe.ts deleted file mode 100644 index 2cce488e..00000000 --- a/src/main/webapp/app/shared/language/find-language-from-key.pipe.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({ name: 'findLanguageFromKey' }) -export class FindLanguageFromKeyPipe implements PipeTransform { - private languages: any = { - en: { name: 'English' }, - de: { name: 'Deutsch' } - // jhipster-needle-i18n-language-key-pipe - JHipster will add/remove languages in this object - }; - transform(lang: string): string { - return this.languages[lang].name; - } -} diff --git a/src/main/webapp/app/shared/login/login.component.html b/src/main/webapp/app/shared/login/login.component.html deleted file mode 100644 index 6112e0a6..00000000 --- a/src/main/webapp/app/shared/login/login.component.html +++ /dev/null @@ -1,43 +0,0 @@ - - diff --git a/src/main/webapp/app/shared/login/login.component.ts b/src/main/webapp/app/shared/login/login.component.ts deleted file mode 100644 index 46711a06..00000000 --- a/src/main/webapp/app/shared/login/login.component.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { Component, AfterViewInit, Renderer, ElementRef } from '@angular/core'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { Router } from '@angular/router'; -import { JhiEventManager } from 'ng-jhipster'; - -import { LoginService } from 'app/core/login/login.service'; -import { StateStorageService } from 'app/core/auth/state-storage.service'; - -@Component({ - selector: 'jhi-login-modal', - templateUrl: './login.component.html' -}) -export class JhiLoginModalComponent implements AfterViewInit { - authenticationError: boolean; - password: string; - rememberMe: boolean; - username: string; - credentials: any; - - constructor( - private eventManager: JhiEventManager, - private loginService: LoginService, - private stateStorageService: StateStorageService, - private elementRef: ElementRef, - private renderer: Renderer, - private router: Router, - public activeModal: NgbActiveModal - ) { - this.credentials = {}; - } - - ngAfterViewInit() { - setTimeout(() => this.renderer.invokeElementMethod(this.elementRef.nativeElement.querySelector('#username'), 'focus', []), 0); - } - - cancel() { - this.credentials = { - username: null, - password: null, - rememberMe: true - }; - this.authenticationError = false; - this.activeModal.dismiss('cancel'); - } - - login() { - this.loginService - .login({ - username: this.username, - password: this.password, - rememberMe: this.rememberMe - }) - .then(() => { - this.authenticationError = false; - this.activeModal.dismiss('login success'); - if (this.router.url === '/register' || /^\/activate\//.test(this.router.url) || /^\/reset\//.test(this.router.url)) { - this.router.navigate(['']); - } - - this.eventManager.broadcast({ - name: 'authenticationSuccess', - content: 'Sending Authentication Success' - }); - - // previousState was set in the authExpiredInterceptor before being redirected to login modal. - // since login is successful, go to stored previousState and clear previousState - const redirect = this.stateStorageService.getUrl(); - if (redirect) { - this.stateStorageService.storeUrl(null); - this.router.navigate([redirect]); - } - }) - .catch(() => { - this.authenticationError = true; - }); - } - - register() { - this.activeModal.dismiss('to state register'); - this.router.navigate(['/register']); - } - - requestResetPassword() { - this.activeModal.dismiss('to state requestReset'); - this.router.navigate(['/reset', 'request']); - } -} diff --git a/src/main/webapp/app/shared/model/asset.model.ts b/src/main/webapp/app/shared/model/asset.model.ts deleted file mode 100644 index f3beb759..00000000 --- a/src/main/webapp/app/shared/model/asset.model.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Moment } from 'moment'; - -export const enum AssetAction { - PAYMENT = 'PAYMENT', - HANDOVER = 'HANDOVER', - ADOPTION = 'ADOPTION', - LOSS = 'LOSS', - CLEARING = 'CLEARING', - PAYBACK = 'PAYBACK' -} - -export interface IAsset { - id?: number; - documentDate?: Moment; - valueDate?: Moment; - action?: AssetAction; - amount?: number; - remark?: string; - membershipId?: number; - membershipDisplayLabel?: string; -} - -export class Asset implements IAsset { - constructor( - public id?: number, - public documentDate?: Moment, - public valueDate?: Moment, - public action?: AssetAction, - public amount?: number, - public remark?: string, - public membershipId?: number, - public membershipDisplayLabel?: string - ) {} -} diff --git a/src/main/webapp/app/shared/model/customer.model.ts b/src/main/webapp/app/shared/model/customer.model.ts deleted file mode 100644 index 95a2e895..00000000 --- a/src/main/webapp/app/shared/model/customer.model.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Moment } from 'moment'; -import { IMembership } from 'app/shared/model/membership.model'; -import { ISepaMandate } from 'app/shared/model/sepa-mandate.model'; - -export const enum CustomerKind { - NATURAL = 'NATURAL', - LEGAL = 'LEGAL' -} - -export const enum VatRegion { - DOMESTIC = 'DOMESTIC', - EU = 'EU', - OTHER = 'OTHER' -} - -export interface ICustomer { - id?: number; - reference?: number; - prefix?: string; - name?: string; - kind?: CustomerKind; - birthDate?: Moment; - birthPlace?: string; - registrationCourt?: string; - registrationNumber?: string; - vatRegion?: VatRegion; - vatNumber?: string; - contractualSalutation?: string; - contractualAddress?: string; - billingSalutation?: string; - billingAddress?: string; - remark?: string; - memberships?: IMembership[]; - sepamandates?: ISepaMandate[]; - displayLabel?: string; -} - -export class Customer implements ICustomer { - constructor( - public id?: number, - public reference?: number, - public prefix?: string, - public name?: string, - public kind?: CustomerKind, - public birthDate?: Moment, - public birthPlace?: string, - public registrationCourt?: string, - public registrationNumber?: string, - public vatRegion?: VatRegion, - public vatNumber?: string, - public contractualSalutation?: string, - public contractualAddress?: string, - public billingSalutation?: string, - public billingAddress?: string, - public remark?: string, - public memberships?: IMembership[], - public sepamandates?: ISepaMandate[], - public displayLabel?: string - ) {} -} diff --git a/src/main/webapp/app/shared/model/membership.model.ts b/src/main/webapp/app/shared/model/membership.model.ts deleted file mode 100644 index 0e9c9680..00000000 --- a/src/main/webapp/app/shared/model/membership.model.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Moment } from 'moment'; -import { IShare } from 'app/shared/model/share.model'; -import { IAsset } from 'app/shared/model/asset.model'; - -export interface IMembership { - id?: number; - admissionDocumentDate?: Moment; - cancellationDocumentDate?: Moment; - memberFromDate?: Moment; - memberUntilDate?: Moment; - remark?: string; - shares?: IShare[]; - assets?: IAsset[]; - customerPrefix?: string; - customerId?: number; - customerDisplayLabel?: string; - displayLabel?: string; -} - -export class Membership implements IMembership { - constructor( - public id?: number, - public admissionDocumentDate?: Moment, - public cancellationDocumentDate?: Moment, - public memberFromDate?: Moment, - public memberUntilDate?: Moment, - public remark?: string, - public shares?: IShare[], - public assets?: IAsset[], - public customerPrefix?: string, - public customerId?: number, - public customerDisplayLabel?: string, - public displayLabel?: string - ) {} -} diff --git a/src/main/webapp/app/shared/model/sepa-mandate.model.ts b/src/main/webapp/app/shared/model/sepa-mandate.model.ts deleted file mode 100644 index 57aa32b4..00000000 --- a/src/main/webapp/app/shared/model/sepa-mandate.model.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Moment } from 'moment'; - -export interface ISepaMandate { - id?: number; - reference?: string; - iban?: string; - bic?: string; - grantingDocumentDate?: Moment; - revokationDocumentDate?: Moment; - validFromDate?: Moment; - validUntilDate?: Moment; - lastUsedDate?: Moment; - remark?: string; - customerDisplayLabel?: string; - customerId?: number; -} - -export class SepaMandate implements ISepaMandate { - constructor( - public id?: number, - public reference?: string, - public iban?: string, - public bic?: string, - public grantingDocumentDate?: Moment, - public revokationDocumentDate?: Moment, - public validFromDate?: Moment, - public validUntilDate?: Moment, - public lastUsedDate?: Moment, - public remark?: string, - public customerDisplayLabel?: string, - public customerId?: number - ) {} -} diff --git a/src/main/webapp/app/shared/model/share.model.ts b/src/main/webapp/app/shared/model/share.model.ts deleted file mode 100644 index af0a23b7..00000000 --- a/src/main/webapp/app/shared/model/share.model.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Moment } from 'moment'; - -export const enum ShareAction { - SUBSCRIPTION = 'SUBSCRIPTION', - CANCELLATION = 'CANCELLATION' -} - -export interface IShare { - id?: number; - documentDate?: Moment; - valueDate?: Moment; - action?: ShareAction; - quantity?: number; - remark?: string; - membershipDisplayLabel?: string; - membershipId?: number; -} - -export class Share implements IShare { - constructor( - public id?: number, - public documentDate?: Moment, - public valueDate?: Moment, - public action?: ShareAction, - public quantity?: number, - public remark?: string, - public membershipDisplayLabel?: string, - public membershipId?: number - ) {} -} diff --git a/src/main/webapp/app/shared/model/user-role-assignment.model.ts b/src/main/webapp/app/shared/model/user-role-assignment.model.ts deleted file mode 100644 index 27a4b757..00000000 --- a/src/main/webapp/app/shared/model/user-role-assignment.model.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { IUser } from 'app/core/user/user.model'; - -export const enum UserRole { - HOSTMASTER = 'HOSTMASTER', - ADMIN = 'ADMIN', - SUPPORTER = 'SUPPORTER', - CONTRACTUAL_CONTACT = 'CONTRACTUAL_CONTACT', - FINANCIAL_CONTACT = 'FINANCIAL_CONTACT', - TECHNICAL_CONTACT = 'TECHNICAL_CONTACT', - CUSTOMER_USER = 'CUSTOMER_USER' -} - -export interface IUserRoleAssignment { - id?: number; - entityTypeId?: string; - entityObjectId?: number; - assignedRole?: UserRole; - user?: IUser; -} - -export class UserRoleAssignment implements IUserRoleAssignment { - constructor( - public id?: number, - public entityTypeId?: string, - public entityObjectId?: number, - public assignedRole?: UserRole, - public user?: IUser - ) {} -} diff --git a/src/main/webapp/app/shared/shared-common.module.ts b/src/main/webapp/app/shared/shared-common.module.ts deleted file mode 100644 index 9741c2d3..00000000 --- a/src/main/webapp/app/shared/shared-common.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { FindLanguageFromKeyPipe, HsadminNgSharedLibsModule, JhiAlertComponent, JhiAlertErrorComponent } from './'; -import { LinebreaksPipe } from 'app/shared/util/linebreaks-pipe'; - -@NgModule({ - imports: [HsadminNgSharedLibsModule], - declarations: [FindLanguageFromKeyPipe, LinebreaksPipe, JhiAlertComponent, JhiAlertErrorComponent], - exports: [HsadminNgSharedLibsModule, FindLanguageFromKeyPipe, LinebreaksPipe, JhiAlertComponent, JhiAlertErrorComponent] -}) -export class HsadminNgSharedCommonModule {} diff --git a/src/main/webapp/app/shared/shared-libs.module.ts b/src/main/webapp/app/shared/shared-libs.module.ts deleted file mode 100644 index 8d55a5da..00000000 --- a/src/main/webapp/app/shared/shared-libs.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { CommonModule } from '@angular/common'; -import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; -import { NgJhipsterModule } from 'ng-jhipster'; -import { InfiniteScrollModule } from 'ngx-infinite-scroll'; -import { CookieModule } from 'ngx-cookie'; -import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; - -@NgModule({ - imports: [NgbModule.forRoot(), InfiniteScrollModule, CookieModule.forRoot(), FontAwesomeModule], - exports: [FormsModule, CommonModule, NgbModule, NgJhipsterModule, InfiniteScrollModule, FontAwesomeModule] -}) -export class HsadminNgSharedLibsModule { - static forRoot() { - return { - ngModule: HsadminNgSharedLibsModule - }; - } -} diff --git a/src/main/webapp/app/shared/shared.module.ts b/src/main/webapp/app/shared/shared.module.ts deleted file mode 100644 index 072b67d3..00000000 --- a/src/main/webapp/app/shared/shared.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap'; - -import { NgbDateMomentAdapter } from './util/datepicker-adapter'; -import { HsadminNgSharedLibsModule, HsadminNgSharedCommonModule, JhiLoginModalComponent, HasAnyAuthorityDirective } from './'; - -@NgModule({ - imports: [HsadminNgSharedLibsModule, HsadminNgSharedCommonModule], - declarations: [JhiLoginModalComponent, HasAnyAuthorityDirective], - providers: [{ provide: NgbDateAdapter, useClass: NgbDateMomentAdapter }], - entryComponents: [JhiLoginModalComponent], - exports: [HsadminNgSharedCommonModule, JhiLoginModalComponent, HasAnyAuthorityDirective], - schemas: [CUSTOM_ELEMENTS_SCHEMA] -}) -export class HsadminNgSharedModule { - static forRoot() { - return { - ngModule: HsadminNgSharedModule - }; - } -} diff --git a/src/main/webapp/app/shared/util/datepicker-adapter.ts b/src/main/webapp/app/shared/util/datepicker-adapter.ts deleted file mode 100644 index 524a38c8..00000000 --- a/src/main/webapp/app/shared/util/datepicker-adapter.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Angular bootstrap Date adapter - */ -import { Injectable } from '@angular/core'; -import { NgbDateAdapter, NgbDateStruct } from '@ng-bootstrap/ng-bootstrap'; -import { Moment } from 'moment'; -import * as moment from 'moment'; - -@Injectable() -export class NgbDateMomentAdapter extends NgbDateAdapter { - fromModel(date: Moment): NgbDateStruct { - if (date != null && moment.isMoment(date) && date.isValid()) { - return { year: date.year(), month: date.month() + 1, day: date.date() }; - } - return null; - } - - toModel(date: NgbDateStruct): Moment { - return date ? moment(date.year + '-' + date.month + '-' + date.day, 'YYYY-MM-DD') : null; - } -} diff --git a/src/main/webapp/app/shared/util/linebreaks-pipe.ts b/src/main/webapp/app/shared/util/linebreaks-pipe.ts deleted file mode 100644 index 7cdab263..00000000 --- a/src/main/webapp/app/shared/util/linebreaks-pipe.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({ name: 'linebreaks' }) -export class LinebreaksPipe implements PipeTransform { - transform(text: string, as: string = '
'): string { - if (text == null) { - return null; - } - return text.replace(/\n/g, as); - } -} diff --git a/src/main/webapp/app/shared/util/request-util.ts b/src/main/webapp/app/shared/util/request-util.ts deleted file mode 100644 index 6579c3cb..00000000 --- a/src/main/webapp/app/shared/util/request-util.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { HttpParams } from '@angular/common/http'; - -export const createRequestOption = (req?: any): HttpParams => { - let options: HttpParams = new HttpParams(); - if (req) { - Object.keys(req).forEach(key => { - if (key !== 'sort') { - options = options.set(key, req[key]); - } - }); - if (req.sort) { - req.sort.forEach(val => { - options = options.append('sort', val); - }); - } - } - return options; -}; diff --git a/src/main/webapp/app/shared/util/tablefilter.ts b/src/main/webapp/app/shared/util/tablefilter.ts deleted file mode 100644 index f6ac701f..00000000 --- a/src/main/webapp/app/shared/util/tablefilter.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Subject, Subscription } from 'rxjs'; -import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; - -export interface QueryDeclarations { - [key: string]: string; -} -export type DynamicQueryDefinition = (name: string, value: string) => QueryDefinitions; -export interface QueryDefinitions { - [key: string]: string | DynamicQueryDefinition; -} - -/** - * Handles filtering in data tables by converting the user input to query criteria of the JHipster REST API. - * - * It also does not reload during a given debounce period. - */ -export class TableFilter { - criteria: T; - - private criteriaChangedSubject = new Subject(); - private criteriaChangedDebouncer: Subscription; - - constructor(private query: QueryDefinitions, private debounceMillis: number, private reload: () => void) { - this.criteria = {} as any; - this.criteriaChangedDebouncer = this.criteriaChangedSubject.pipe(debounceTime(debounceMillis)).subscribe(() => this.reload()); - } - - trigger($event) { - this.debounce(); - } - - reset() { - this.criteria = {} as any; - this.debounce(); - } - - buildQueryCriteria(): QueryDeclarations { - let queryCriteria: any = {} as any; - Object.keys(this.criteria).forEach(name => { - const value = this.criteria[name]; - if (value === '--') { - queryCriteria[name + '.specified'] = false; - } else if (value === '++') { - queryCriteria[name + '.specified'] = true; - } else { - const queryDef = this.query[name]; - if (typeof queryDef !== 'function') { - queryCriteria[queryDef] = value; - } else { - const additionalQueryCriteria = queryDef(name, value); - queryCriteria = { ...queryCriteria, ...additionalQueryCriteria }; - } - } - }); - return queryCriteria; - } - - private debounce() { - this.criteriaChangedSubject.next(); - } -} - -export function queryYearAsDateRange(name: string, value: string) { - if (value.length === 'YYYY'.length) { - const queryCriteria: any = {} as any; - queryCriteria[name + '.greaterOrEqualThan'] = value + '-01-01'; - queryCriteria[name + '.lessOrEqualThan'] = value + '-12-31'; - return queryCriteria; - } - return null; -} - -export function queryEquals(name: string, value: string) { - return { [name + '.equals']: value }; -} - -export function queryContains(name: string, value: string) { - return { [name + '.contains']: value }; -} diff --git a/src/main/webapp/app/vendor.ts b/src/main/webapp/app/vendor.ts deleted file mode 100644 index 9b608506..00000000 --- a/src/main/webapp/app/vendor.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* after changing this file run 'npm run webpack:build' */ -/* tslint:disable */ -import '../content/css/vendor.css'; - -// Imports all fontawesome core and solid icons - -import { library } from '@fortawesome/fontawesome-svg-core'; -import { - faUser, - faSort, - faSortUp, - faSortDown, - faSync, - faEye, - faBan, - faTimes, - faArrowLeft, - faSave, - faPlus, - faPencilAlt, - faBars, - faThList, - faUserPlus, - faRoad, - faTachometerAlt, - faHeart, - faList, - faBell, - faBook, - faHdd, - faFlag, - faWrench, - faClock, - faCloud, - faSignOutAlt, - faSignInAlt, - faCalendarAlt, - faSearch, - faTrashAlt, - faAsterisk, - faTasks, - faHome -} from '@fortawesome/free-solid-svg-icons'; - -// Adds the SVG icon to the library so you can use it in your page -library.add(faUser); -library.add(faSort); -library.add(faSortUp); -library.add(faSortDown); -library.add(faSync); -library.add(faEye); -library.add(faBan); -library.add(faTimes); -library.add(faArrowLeft); -library.add(faSave); -library.add(faPlus); -library.add(faPencilAlt); -library.add(faBars); -library.add(faHome); -library.add(faThList); -library.add(faUserPlus); -library.add(faRoad); -library.add(faTachometerAlt); -library.add(faHeart); -library.add(faList); -library.add(faBell); -library.add(faTasks); -library.add(faBook); -library.add(faHdd); -library.add(faFlag); -library.add(faWrench); -library.add(faClock); -library.add(faCloud); -library.add(faSignOutAlt); -library.add(faSignInAlt); -library.add(faCalendarAlt); -library.add(faSearch); -library.add(faTrashAlt); -library.add(faAsterisk); - -// jhipster-needle-add-element-to-vendor - JHipster will add new menu items here diff --git a/src/main/webapp/content/css/documentation.css b/src/main/webapp/content/css/documentation.css deleted file mode 100644 index 4aeb51b1..00000000 --- a/src/main/webapp/content/css/documentation.css +++ /dev/null @@ -1,3 +0,0 @@ -/*! - * Your CSS files will be generated in this directory by Webpack - */ diff --git a/src/main/webapp/content/css/global.css b/src/main/webapp/content/css/global.css deleted file mode 100644 index 9c162c66..00000000 --- a/src/main/webapp/content/css/global.css +++ /dev/null @@ -1,238 +0,0 @@ -/* ============================================================== -Bootstrap tweaks -===============================================================*/ - -body, -h1, -h2, -h3, -h4 { - font-weight: 300; -} - -body { - background: #e4e5e6; -} - -a { - color: #533f03; - font-weight: bold; -} - -a:hover { - color: #533f03; - font-weight: bold; - /* make sure browsers use the pointer cursor for anchors, even with no href */ - cursor: pointer; -} - -/* ========================================================================== -Browser Upgrade Prompt -========================================================================== */ -.browserupgrade { - margin: 0.2em 0; - background: #ccc; - color: #000; - padding: 0.2em 0; -} - -/* ========================================================================== -Generic styles -========================================================================== */ - -/* Error highlight on input fields */ -.ng-valid[required], -.ng-valid.required { - border-left: 5px solid green; -} - -.ng-invalid:not(form) { - border-left: 5px solid red; -} - -/* other generic styles */ - -.jh-card { - padding: 1.5%; - margin-top: 20px; - border: none; -} - -.error { - color: white; - background-color: red; -} - -.pad { - padding: 10px; -} - -.w-40 { - width: 40% !important; -} - -.w-60 { - width: 60% !important; -} - -.break { - white-space: normal; - word-break: break-all; -} - -.readonly { - background-color: #eee; - opacity: 1; -} - -.footer { - border-top: 1px solid rgba(0, 0, 0, 0.125); -} - -.hand, -[jhisortby] { - cursor: pointer; -} - -/* ========================================================================== -Custom alerts for notification -========================================================================== */ -.alerts .alert { - text-overflow: ellipsis; -} -.alert pre { - background: none; - border: none; - font: inherit; - color: inherit; - padding: 0; - margin: 0; -} - -.alert .popover pre { - font-size: 10px; -} - -.alerts .toast { - position: fixed; - width: 100%; -} - -.alerts .toast.left { - left: 5px; -} - -.alerts .toast.right { - right: 5px; -} - -.alerts .toast.top { - top: 55px; -} - -.alerts .toast.bottom { - bottom: 55px; -} - -@media screen and (min-width: 480px) { - .alerts .toast { - width: 50%; - } -} - -/* ========================================================================== -entity tables helpers -========================================================================== */ -/* Remove Bootstrap padding from the element -http://stackoverflow.com/questions/19562903/remove-padding-from-columns-in-bootstrap-3 */ -.no-padding-left { - padding-left: 0 !important; -} -.no-padding-right { - padding-right: 0 !important; -} -.no-padding-top { - padding-top: 0 !important; -} -.no-padding-bottom { - padding-bottom: 0 !important; -} -.no-padding { - padding: 0 !important; -} - -/* bootstrap 3 input-group 100% width -http://stackoverflow.com/questions/23436430/bootstrap-3-input-group-100-width */ -.width-min { - width: 1% !important; -} - -/* Makes toolbar not wrap on smaller screens -http://www.sketchingwithcss.com/samplechapter/cheatsheet.html#right */ -.flex-btn-group-container { - display: -webkit-flex; - display: flex; - -webkit-flex-direction: row; - flex-direction: row; - -webkit-justify-content: flex-end; - justify-content: flex-end; -} - -/* ========================================================================== -entity detail page css -========================================================================== */ -.row.jh-entity-details > dd { - margin-bottom: 15px; -} - -@media screen and (min-width: 768px) { - .row.jh-entity-details > dt { - margin-bottom: 15px; - } - - .row.jh-entity-details > dd { - border-bottom: 1px solid #eee; - padding-left: 180px; - margin-left: 0; - } -} - -/* ========================================================================== -ui bootstrap tweaks -========================================================================== */ -.nav, -.pagination, -.carousel, -.card-title a { - cursor: pointer; -} - -.datetime-picker-dropdown > li.date-picker-menu div > table .btn-secondary, -.uib-datepicker-popup > li > div.uib-datepicker > table .btn-secondary { - border: 0; -} - -.datetime-picker-dropdown > li.date-picker-menu div > table:focus, -.uib-datepicker-popup > li > div.uib-datepicker > table:focus { - outline: none; -} - -.thread-dump-modal-lock { - max-width: 450px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -/* jhipster-needle-css-add-main JHipster will add new css style */ - -/* ========================================================================== -ui tweaks by Hostsharing -========================================================================== */ -.jh-entity-details > dt { - color: lightslategray; -} - -.jh-entity-details > dd { - font-size: 140%; -} diff --git a/src/main/webapp/content/css/loading.css b/src/main/webapp/content/css/loading.css deleted file mode 100644 index a1e24615..00000000 --- a/src/main/webapp/content/css/loading.css +++ /dev/null @@ -1,152 +0,0 @@ -@keyframes lds-pacman-1 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 50% { - -webkit-transform: rotate(-45deg); - transform: rotate(-45deg); - } - 100% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } -} -@-webkit-keyframes lds-pacman-1 { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 50% { - -webkit-transform: rotate(-45deg); - transform: rotate(-45deg); - } - 100% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } -} -@keyframes lds-pacman-2 { - 0% { - -webkit-transform: rotate(180deg); - transform: rotate(180deg); - } - 50% { - -webkit-transform: rotate(225deg); - transform: rotate(225deg); - } - 100% { - -webkit-transform: rotate(180deg); - transform: rotate(180deg); - } -} -@-webkit-keyframes lds-pacman-2 { - 0% { - -webkit-transform: rotate(180deg); - transform: rotate(180deg); - } - 50% { - -webkit-transform: rotate(225deg); - transform: rotate(225deg); - } - 100% { - -webkit-transform: rotate(180deg); - transform: rotate(180deg); - } -} -@keyframes lds-pacman-3 { - 0% { - -webkit-transform: translate(190px, 0); - transform: translate(190px, 0); - opacity: 0; - } - 20% { - opacity: 1; - } - 100% { - -webkit-transform: translate(70px, 0); - transform: translate(70px, 0); - opacity: 1; - } -} -@-webkit-keyframes lds-pacman-3 { - 0% { - -webkit-transform: translate(190px, 0); - transform: translate(190px, 0); - opacity: 0; - } - 20% { - opacity: 1; - } - 100% { - -webkit-transform: translate(70px, 0); - transform: translate(70px, 0); - opacity: 1; - } -} - -.app-loading { - font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; - position: relative; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - top: 10em; -} -.app-loading p { - display: block; - font-size: 1.17em; - margin-inline-start: 0px; - margin-inline-end: 0px; - font-weight: normal; -} - -.app-loading .lds-pacman { - position: relative; - margin: auto; - width: 200px !important; - height: 200px !important; - -webkit-transform: translate(-100px, -100px) scale(1) translate(100px, 100px); - transform: translate(-100px, -100px) scale(1) translate(100px, 100px); -} -.app-loading .lds-pacman > div:nth-child(2) div { - position: absolute; - top: 40px; - left: 40px; - width: 120px; - height: 60px; - border-radius: 120px 120px 0 0; - background: #bbcedd; - -webkit-animation: lds-pacman-1 1s linear infinite; - animation: lds-pacman-1 1s linear infinite; - -webkit-transform-origin: 60px 60px; - transform-origin: 60px 60px; -} -.app-loading .lds-pacman > div:nth-child(2) div:nth-child(2) { - -webkit-animation: lds-pacman-2 1s linear infinite; - animation: lds-pacman-2 1s linear infinite; -} -.app-loading .lds-pacman > div:nth-child(1) div { - position: absolute; - top: 97px; - left: -8px; - width: 24px; - height: 10px; - background-image: url('../images/logo-jhipster.png'); - background-size: contain; - -webkit-animation: lds-pacman-3 1s linear infinite; - animation: lds-pacman-3 1.5s linear infinite; -} -.app-loading .lds-pacman > div:nth-child(1) div:nth-child(1) { - -webkit-animation-delay: -0.67s; - animation-delay: -1s; -} -.app-loading .lds-pacman > div:nth-child(1) div:nth-child(2) { - -webkit-animation-delay: -0.33s; - animation-delay: -0.5s; -} -.app-loading .lds-pacman > div:nth-child(1) div:nth-child(3) { - -webkit-animation-delay: 0s; - animation-delay: 0s; -} diff --git a/src/main/webapp/content/css/vendor.css b/src/main/webapp/content/css/vendor.css deleted file mode 100644 index 7e3ef984..00000000 --- a/src/main/webapp/content/css/vendor.css +++ /dev/null @@ -1,2 +0,0 @@ -/* after changing this file run 'npm run webpack:build' */ -@import '~bootstrap/dist/css/bootstrap.min.css'; diff --git a/src/main/webapp/content/images/jhipster_family_member_0.svg b/src/main/webapp/content/images/jhipster_family_member_0.svg deleted file mode 100755 index 1f9ab527..00000000 --- a/src/main/webapp/content/images/jhipster_family_member_0.svg +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/webapp/content/images/jhipster_family_member_0_head-192.png b/src/main/webapp/content/images/jhipster_family_member_0_head-192.png deleted file mode 100644 index 81330689..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_0_head-192.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_0_head-256.png b/src/main/webapp/content/images/jhipster_family_member_0_head-256.png deleted file mode 100644 index b4739ec3..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_0_head-256.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_0_head-384.png b/src/main/webapp/content/images/jhipster_family_member_0_head-384.png deleted file mode 100644 index 0280f27e..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_0_head-384.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_0_head-512.png b/src/main/webapp/content/images/jhipster_family_member_0_head-512.png deleted file mode 100644 index 326141b9..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_0_head-512.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_1.svg b/src/main/webapp/content/images/jhipster_family_member_1.svg deleted file mode 100755 index 7a118f30..00000000 --- a/src/main/webapp/content/images/jhipster_family_member_1.svg +++ /dev/null @@ -1,9387 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/src/main/webapp/content/images/jhipster_family_member_1_head-192.png b/src/main/webapp/content/images/jhipster_family_member_1_head-192.png deleted file mode 100644 index dd2643c1..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_1_head-192.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_1_head-256.png b/src/main/webapp/content/images/jhipster_family_member_1_head-256.png deleted file mode 100644 index 2c535268..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_1_head-256.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_1_head-384.png b/src/main/webapp/content/images/jhipster_family_member_1_head-384.png deleted file mode 100644 index f930681c..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_1_head-384.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_1_head-512.png b/src/main/webapp/content/images/jhipster_family_member_1_head-512.png deleted file mode 100644 index 9110dc8f..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_1_head-512.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_2.svg b/src/main/webapp/content/images/jhipster_family_member_2.svg deleted file mode 100755 index 17479338..00000000 --- a/src/main/webapp/content/images/jhipster_family_member_2.svg +++ /dev/null @@ -1,841 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/src/main/webapp/content/images/jhipster_family_member_2_head-192.png b/src/main/webapp/content/images/jhipster_family_member_2_head-192.png deleted file mode 100644 index 2699ab44..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_2_head-192.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_2_head-256.png b/src/main/webapp/content/images/jhipster_family_member_2_head-256.png deleted file mode 100644 index 3a5903e1..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_2_head-256.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_2_head-384.png b/src/main/webapp/content/images/jhipster_family_member_2_head-384.png deleted file mode 100644 index da964fcb..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_2_head-384.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_2_head-512.png b/src/main/webapp/content/images/jhipster_family_member_2_head-512.png deleted file mode 100644 index 6337f5ef..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_2_head-512.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_3.svg b/src/main/webapp/content/images/jhipster_family_member_3.svg deleted file mode 100755 index 6b9e0566..00000000 --- a/src/main/webapp/content/images/jhipster_family_member_3.svg +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/webapp/content/images/jhipster_family_member_3_head-192.png b/src/main/webapp/content/images/jhipster_family_member_3_head-192.png deleted file mode 100644 index 35b91257..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_3_head-192.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_3_head-256.png b/src/main/webapp/content/images/jhipster_family_member_3_head-256.png deleted file mode 100644 index 098fd8fb..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_3_head-256.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_3_head-384.png b/src/main/webapp/content/images/jhipster_family_member_3_head-384.png deleted file mode 100644 index b7700457..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_3_head-384.png and /dev/null differ diff --git a/src/main/webapp/content/images/jhipster_family_member_3_head-512.png b/src/main/webapp/content/images/jhipster_family_member_3_head-512.png deleted file mode 100644 index 58b28b9c..00000000 Binary files a/src/main/webapp/content/images/jhipster_family_member_3_head-512.png and /dev/null differ diff --git a/src/main/webapp/content/images/logo-jhipster.png b/src/main/webapp/content/images/logo-jhipster.png deleted file mode 100755 index 5d31c2f8..00000000 Binary files a/src/main/webapp/content/images/logo-jhipster.png and /dev/null differ diff --git a/src/main/webapp/favicon.ico b/src/main/webapp/favicon.ico deleted file mode 100755 index 4179874f..00000000 Binary files a/src/main/webapp/favicon.ico and /dev/null differ diff --git a/src/main/webapp/i18n/de/activate.json b/src/main/webapp/i18n/de/activate.json deleted file mode 100644 index d71d8a76..00000000 --- a/src/main/webapp/i18n/de/activate.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "activate": { - "title": "Aktivierung", - "messages": { - "success": "Ihr Benutzer wurde aktiviert. Bitte ", - "error": "Ihr Benutzer konnte nicht aktiviert werden. Bitte benutzen Sie die Registrierungsmaske, um sich zu registrieren." - } - } -} diff --git a/src/main/webapp/i18n/de/asset.json b/src/main/webapp/i18n/de/asset.json deleted file mode 100644 index dee8fe54..00000000 --- a/src/main/webapp/i18n/de/asset.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "hsadminNgApp": { - "asset": { - "home": { - "title": "Geschäftsguthaben-Transaktionen", - "createLabel": "Geschäftsguthaben-Transaktion erfassen", - "createOrEditLabel": "Geschäftsguthaben-Transaktion erfassen oder bearbeiten" - }, - "created": "Geschäftsguthaben-Transaktion erfasst mit ID {{ param }}", - "updated": "Geschäftsguthaben-Transaktion aktualisiert mit ID {{ param }}", - "deleted": "Geschäftsguthaben-Transaktion gelöscht mit ID {{ param }}", - "delete": { - "question": "Soll die Geschäftsguthaben-Transaktion {{ id }} wirklich dauerhaft gelöscht werden?" - }, - "detail": { - "title": "Geschäftsguthaben-Transaktion" - }, - "documentDate": "Belegdatum", - "valueDate": "Buchungsdatum", - "action": "Transaktion", - "amount": "Betrag", - "remark": "Bemerkung", - "membership": "zugehörige Mitgliedschaft" - } - } -} diff --git a/src/main/webapp/i18n/de/assetAction.json b/src/main/webapp/i18n/de/assetAction.json deleted file mode 100644 index e89d58f3..00000000 --- a/src/main/webapp/i18n/de/assetAction.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "hsadminNgApp": { - "AssetAction": { - "null": "", - "PAYMENT": "Einzahlung", - "HANDOVER": "Übertragung", - "ADOPTION": "Übernahme", - "LOSS": "Verlust", - "CLEARING": "Verrechnung", - "PAYBACK": "Auszahlung" - } - } -} diff --git a/src/main/webapp/i18n/de/audits.json b/src/main/webapp/i18n/de/audits.json deleted file mode 100644 index 28b324cf..00000000 --- a/src/main/webapp/i18n/de/audits.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "audits": { - "title": "Audits", - "filter": { - "title": "Nach Datum filtern", - "from": "von", - "to": "bis", - "button": { - "weeks": "Wochen", - "today": "heute", - "clear": "leeren", - "close": "abschließen" - } - }, - "table": { - "header": { - "principal": "Benutzer", - "date": "Datum", - "status": "Stand", - "data": "Extra Informationen" - }, - "data": { - "remoteAddress": "Remote-Adresse:" - } - } - } -} diff --git a/src/main/webapp/i18n/de/configuration.json b/src/main/webapp/i18n/de/configuration.json deleted file mode 100644 index 6395139c..00000000 --- a/src/main/webapp/i18n/de/configuration.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "configuration": { - "title": "Konfiguration", - "filter": "Filter (nach Präfix)", - "table": { - "prefix": "Präfix", - "properties": "Eigenschaften" - } - } -} diff --git a/src/main/webapp/i18n/de/custom-error.json b/src/main/webapp/i18n/de/custom-error.json deleted file mode 100644 index b62e6f9c..00000000 --- a/src/main/webapp/i18n/de/custom-error.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "error": { - "idNotFound": "Technische Datensatz-ID nicht gefunden", - "unknownProperty": "Unbekannte Eigenschaft", - "shareSubscriptionPositiveQuantity": "Zeichnungen von Geschäftsanteilen erfordern eine positive Stückzahl", - "shareCancellationNegativeQuantity": "Kündigungen von Geschäftsanteilen erfordern eine negative Stückzahl", - "shareTransactionImmutable": "Transaktionen mit Geschäftsanteilen sind unveränderlich", - "membershipNotDeletable": "Mitgliedschaft kann nicht gelöscht werden, setze stattdessen das 'untilDate'", - "customerNotDeletable": "Kunden können nicht explizit gelöscht werden'", - "untilDateMustBeAfterSinceDate": "Mitgliedshafts-Austrittsdatum muss nach dem Beitrittsdatum liegen", - "anotherUncancelledMembershipExists": "Nur eine einzige ungekündigte Mitgliedschaft pro Kunde ist zulässig", - "initializationProhibited": "Initialisierung des Feldes unzulässig", - "updateProhibited": "Aktualisierung des Feldes unzulässig", - "documentDateMayNotBeAfterValueDate": "Belegdatum darf nicht vor dem Buchungsdatum liegen", - "assetTransactionImmutable": "Transaktionen mit Geschäftsguthaben sind unveränderlich", - "assetPaymentsPositiveAmount": "Einzahlungen von Geschäftsguthaben erfordern einen positiven Betrag", - "assetAdoptionsPositiveAmount": "Übernahmen von Geschäftsguthaben erfordern einen positiven Betrag", - "assetPaybacksNegativeAmount": "Auszahlungen von Geschäftsguthaben erfordern einen negativen Betrag", - "assetHandoversNegativeAmount": "Übertragungen von Geschäftsguthaben erfordern einen negativen Betrag", - "assetLossesNegativeAmount": "Verluste von Geschäftsguthaben erfordern einen negativen Betrag", - "assetClearingsNegativeAmount": "Verrechnungen von Geschäftsguthaben erfordern einen negativen Betrag" - } -} diff --git a/src/main/webapp/i18n/de/customer.json b/src/main/webapp/i18n/de/customer.json deleted file mode 100644 index af18676c..00000000 --- a/src/main/webapp/i18n/de/customer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "hsadminNgApp": { - "customer": { - "home": { - "title": "Customers", - "createLabel": "Customer erstellen", - "createOrEditLabel": "Customer erstellen oder bearbeiten" - }, - "created": "Customer erstellt mit ID {{ param }}", - "updated": "Customer aktualisiert mit ID {{ param }}", - "deleted": "Customer gelöscht mit ID {{ param }}", - "delete": { - "question": "Soll Customer {{ id }} wirklich dauerhaft gelöscht werden?" - }, - "detail": { - "title": "Customer" - }, - "reference": "Reference", - "prefix": "Prefix", - "name": "Name", - "kind": "Kind", - "birthDate": "Birth Date", - "birthPlace": "Birth Place", - "registrationCourt": "Registration Court", - "registrationNumber": "Registration Number", - "vatRegion": "Vat Region", - "vatNumber": "Vat Number", - "contractualSalutation": "Contractual Salutation", - "contractualAddress": "Contractual Address", - "billingSalutation": "Billing Salutation", - "billingAddress": "Billing Address", - "remark": "Remark", - "membership": "Membership", - "sepamandate": "Sepamandate" - } - } -} diff --git a/src/main/webapp/i18n/de/customerKind.json b/src/main/webapp/i18n/de/customerKind.json deleted file mode 100644 index 62f07a45..00000000 --- a/src/main/webapp/i18n/de/customerKind.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "hsadminNgApp": { - "CustomerKind": { - "null": "", - "NATURAL": "natürliche Person", - "LEGAL": "juristische Person" - } - } -} diff --git a/src/main/webapp/i18n/de/error.json b/src/main/webapp/i18n/de/error.json deleted file mode 100644 index f68d3c70..00000000 --- a/src/main/webapp/i18n/de/error.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "error": { - "title": "Fehlerseite!", - "http": { - "400": "Ungültige Anfrage.", - "403": "Sie haben nicht die nötigen Berechtigungen um diese Seite anzuzeigen.", - "404": "Die Seite existiert nicht.", - "405": "Die verwendete Anfrage-Methode ist für diese URL nicht erlaubt.", - "500": "Interner Serverfehler." - }, - "concurrencyFailure": "Ein anderer Benutzer hat diese Daten zeitgleich mit Ihnen geändert. Ihre Änderungen wurden abgelehnt.", - "validation": "Validierungsfehler auf dem Server." - } -} diff --git a/src/main/webapp/i18n/de/global.json b/src/main/webapp/i18n/de/global.json deleted file mode 100644 index fabdfc34..00000000 --- a/src/main/webapp/i18n/de/global.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "global": { - "title": "HsadminNg", - "browsehappy": "Sie benutzen einen veralteten Browser. Bitte aktualisieren Sie Ihren Browser, um die Benutzerfreundlichkeit zu erhöhen.", - "menu": { - "home": "Startseite", - "jhipster-needle-menu-add-element": "JHipster will add additional menu entries here (do not translate!)", - "entities": { - "main": "Entitäten", - "customer": "Customer", - "membership": "Membership", - "share": "Share", - "asset": "Asset", - "sepaMandate": "Sepa Mandate", - "userRoleAssignment": "User Role Assignment", - "jhipster-needle-menu-add-entry": "JHipster will add additional entities here (do not translate!)" - }, - "account": { - "main": "Zugang", - "settings": "Einstellungen", - "password": "Passwort", - "sessions": "Sitzungen", - "login": "Anmelden", - "logout": "Abmelden", - "register": "Registrierung" - }, - "admin": { - "main": "Administration", - "userManagement": "Benutzerverwaltung", - "tracker": "Benutzer Aktivitäten", - "metrics": "Metriken", - "health": "Status", - "configuration": "Konfiguration", - "logs": "Protokoll", - "audits": "Audits", - "apidocs": "API", - "database": "Datenbank", - "jhipster-needle-menu-add-admin-element": "JHipster will add additional menu entries here (do not translate!)" - }, - "language": "Sprache" - }, - "form": { - "username": "Benutzername", - "username.placeholder": "Ihr Benutzername", - "currentpassword": "Aktuelles Passwort", - "currentpassword.placeholder": "Aktuelles Passwort", - "newpassword": "Neues Passwort", - "newpassword.placeholder": "Neues Passwort", - "confirmpassword": "Neues Passwort bestätigen", - "confirmpassword.placeholder": "Bestätigen Sie Ihr neues Passwort", - "email": "Email Adresse", - "email.placeholder": "Ihre Email Adresse" - }, - "messages": { - "info": { - "authenticated": { - "prefix": "Wenn Sie sich ", - "link": "anmelden", - "suffix": " möchten, versuchen Sie es mit
- Administrator (Name=\"admin\" und Passwort=\"admin\")
- Benutzer (Name=\"user\" und Passwort=\"user\")." - }, - "register": { - "noaccount": "Sie haben noch keinen Zugang?", - "link": "Registrieren Sie sich" - } - }, - "error": { - "dontmatch": "Das bestätigte Passwort entspricht nicht dem neuen Passwort!" - }, - "validate": { - "newpassword": { - "required": "Ein neues Passwort wird benötigt.", - "minlength": "Das neue Passwort muss mindestens 5 Zeichen lang sein", - "maxlength": "Das neue Passwort darf nicht länger als 50 Zeichen sein", - "strength": "Passwortstärke:" - }, - "confirmpassword": { - "required": "Sie müssen das Passwort bestätigen.", - "minlength": "Das bestätigte Passwort muss mindestens 5 Zeichen lang sein", - "maxlength": "Das bestätigte Passwort darf nicht länger als 50 Zeichen sein" - }, - "email": { - "required": "Ihre Email Adresse wird benötigt.", - "invalid": "Ihre Email Adresse ist ungültig.", - "minlength": "Ihre Email Adresse muss mindestens 5 Zeichen lang sein", - "maxlength": "Ihre Email Adresse darf nicht länger als 50 Zeichen sein" - } - } - }, - "field": { - "id": "ID" - }, - "ribbon": { - "dev": "Development" - }, - "item-count": "Ergebnis {{first}} - {{second}} von {{total}} Elemente." - }, - "entity": { - "action": { - "addblob": "Blob hinzufügen", - "addimage": "Bild hinzufügen", - "back": "Zurück", - "cancel": "Abbrechen", - "delete": "Löschen", - "edit": "Bearbeiten", - "open": "Öffnen", - "save": "Speichern", - "view": "Details" - }, - "detail": { - "field": "Feld", - "value": "Wert" - }, - "delete": { - "title": "Löschen bestätigen" - }, - "validation": { - "required": "Dieses Feld wird benötigt.", - "minlength": "Dieses Feld muss mind. {{min}} Zeichen lang sein.", - "maxlength": "Dieses Feld darf max. {{max}} Zeichen lang sein.", - "min": "Dieses Feld muss größer als {{min}} sein.", - "max": "Dieses Feld muss kleiner als {{max}} sein.", - "minbytes": "Dieses Feld sollte mehr als {{min}} bytes haben.", - "maxbytes": "Dieses Feld sollte nicht mehr als {{max}} bytes haben.", - "pattern": "Dieses Feld muss das Muster {{pattern}} erfüllen.", - "number": "Dieses Feld muss eine Zahl sein.", - "datetimelocal": "Dieses Feld muss eine Datums- und Zeitangabe enthalten.", - "duplicate": "Ein Wert ist doppelt zu existierenden Daten." - } - }, - "error": { - "internalServerError": "Interner Serverfehler", - "server.not.reachable": "Server ist nicht erreichbar", - "url.not.found": "Nicht gefunden", - "NotNull": "Feld {{fieldName}} kann nicht leer sein!", - "Size": "Feld {{fieldName}} erfüllt nicht die minimalen/maximalen Voraussetzungen!", - "userexists": "Benutzername bereits vergeben!", - "emailexists": "Email wird bereits verwendet!", - "idexists": "Ein neuer {{entityName}} kann noch keine ID haben", - "idnull": "Ungültige ID" - }, - "footer": "Dies ist Ihre Fußzeile" -} diff --git a/src/main/webapp/i18n/de/health.json b/src/main/webapp/i18n/de/health.json deleted file mode 100644 index e23e6ccc..00000000 --- a/src/main/webapp/i18n/de/health.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "health": { - "title": "Gesundheit Ihrer Anwendung", - "refresh.button": "Aktualisieren", - "stacktrace": "Stacktrace", - "details": { - "details": "Details", - "properties": "Properties", - "name": "Name", - "value": "Wert", - "error": "Error" - }, - "indicator": { - "diskSpace": "Festplattenspeicher", - "mail": "Email", - "db": "Datenbank" - }, - "table": { - "service": "Dienst Name", - "status": "Status" - }, - "status": { - "UNKNOWN": "UNKNOWN", - "UP": "UP", - "DOWN": "DOWN" - } - } -} diff --git a/src/main/webapp/i18n/de/home.json b/src/main/webapp/i18n/de/home.json deleted file mode 100644 index 57f16478..00000000 --- a/src/main/webapp/i18n/de/home.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "home": { - "title": "Willkommen, Java Hipster!", - "subtitle": "Dies ist Ihre Hauptseite", - "logged": { - "message": "Sie sind als Benutzer \"{{username}}\" angemeldet." - }, - "question": "Wenn Sie Fragen zu JHipster haben:", - "link": { - "homepage": "JHipster Hauptseite", - "stackoverflow": "JHipster auf Stack Overflow", - "bugtracker": "JHipster Fehlereinträge", - "chat": "JHipster Chat", - "follow": "kontaktieren Sie uns mit @java_hipster auf Twitter" - }, - "like": "Wenn Sie JHipster mögen, vergessen Sie nicht uns einen Stern zu geben auf", - "github": "GitHub" - } -} diff --git a/src/main/webapp/i18n/de/login.json b/src/main/webapp/i18n/de/login.json deleted file mode 100644 index cf7b2186..00000000 --- a/src/main/webapp/i18n/de/login.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "login": { - "title": "Anmeldung", - "form": { - "password": "Passwort", - "password.placeholder": "Ihr Passwort", - "rememberme": "Automatische Anmeldung", - "button": "Anmelden" - }, - "messages": { - "error": { - "authentication": "Anmeldung fehlgeschlagen! Überprüfen Sie bitte Ihre Angaben und versuchen Sie es erneut." - } - }, - "password": { - "forgot": "Sie haben Ihr Passwort vergessen?" - } - } -} diff --git a/src/main/webapp/i18n/de/logs.json b/src/main/webapp/i18n/de/logs.json deleted file mode 100644 index 9416c965..00000000 --- a/src/main/webapp/i18n/de/logs.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "logs": { - "title": "Protokolle", - "nbloggers": "Es existieren {{ total }} Logger.", - "filter": "Filter", - "table": { - "name": "Name", - "level": "Stufe" - } - } -} diff --git a/src/main/webapp/i18n/de/membership.json b/src/main/webapp/i18n/de/membership.json deleted file mode 100644 index e277b4dc..00000000 --- a/src/main/webapp/i18n/de/membership.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "hsadminNgApp": { - "membership": { - "home": { - "title": "Memberships", - "createLabel": "Membership erstellen", - "createOrEditLabel": "Membership erstellen oder bearbeiten" - }, - "created": "Membership erstellt mit ID {{ param }}", - "updated": "Membership aktualisiert mit ID {{ param }}", - "deleted": "Membership gelöscht mit ID {{ param }}", - "delete": { - "question": "Soll Membership {{ id }} wirklich dauerhaft gelöscht werden?" - }, - "detail": { - "title": "Membership" - }, - "admissionDocumentDate": "Admission Document Date", - "cancellationDocumentDate": "Cancellation Document Date", - "memberFromDate": "Member From Date", - "memberUntilDate": "Member Until Date", - "remark": "Remark", - "share": "Share", - "asset": "Asset", - "customer": "Customer" - } - } -} diff --git a/src/main/webapp/i18n/de/metrics.json b/src/main/webapp/i18n/de/metrics.json deleted file mode 100644 index 63e36ecb..00000000 --- a/src/main/webapp/i18n/de/metrics.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "metrics": { - "title": "Anwendungs-Metriken", - "refresh.button": "Aktualisieren", - "updating": "Aktualisierung...", - "jvm": { - "title": "JVM Metriken", - "memory": { - "title": "Hauptspeicher", - "total": "Gesamter Hauptspeicher", - "heap": "Heap Speicher", - "nonheap": "Non-Heap Speicher" - }, - "threads": { - "title": "Threads", - "all": "Alle", - "runnable": "Runnable", - "timedwaiting": "Wartezeit", - "waiting": "Wartend", - "blocked": "Geblockt", - "dump": { - "title": "Threads dump", - "id": "Id: ", - "blockedtime": "Geblockte Zeit", - "blockedcount": "Geblockte Zahl", - "waitedtime": "Gewartete Zeit", - "waitedcount": "Gewartete Anzahl", - "lockname": "Lock-Name", - "stacktrace": "Stacktrace", - "show": "Zeigen", - "hide": "Verstecken" - } - }, - "gc": { - "title": "Speicherbereinigung (GC)", - "marksweepcount": "Durchlaufmarkierungs (Mark Sweep) Anzahl", - "marksweeptime": "Durchlaufmarkierungs (Mark Sweep) Zeit", - "scavengecount": "Bereinigungslauf (Scavenge) Anzahl", - "scavengetime": "Bereinigungslauf (Scavenge) Zeit" - }, - "http": { - "title": "HTTP Anfragen (Ereignisse pro Sekunde)", - "active": "Aktive Anfragen:", - "total": "Alle Anfragen:", - "table": { - "code": "Codierung", - "count": "Anzahl", - "mean": "Durchschnittswert", - "average": "Mittelwert" - }, - "code": { - "ok": "Ok", - "notfound": "Nicht gefunden", - "servererror": "Server Fehler" - } - } - }, - "servicesstats": { - "title": "Service Statistiken (Zeit in Millisekunden)", - "table": { - "name": "Service Name", - "count": "Anzahl", - "mean": "Durchschnitt", - "min": "Minimum", - "max": "Maximum", - "p50": "p50", - "p75": "p75", - "p95": "p95", - "p99": "p99" - } - }, - "cache": { - "title": "Cache Statistiken", - "cachename": "Cache Name", - "hits": "Treffer", - "misses": "Keine Treffer", - "evictions": "Anzahl entfernter Objekte" - }, - "datasource": { - "usage": "Usage", - "title": "Datenquelle (Zeit in Millisekunden)", - "name": "Pool-Auslastung", - "count": "Anzahl", - "mean": "Mittel", - "min": "Min", - "max": "Max", - "p50": "p50", - "p75": "p75", - "p95": "p95", - "p99": "p99" - } - } -} diff --git a/src/main/webapp/i18n/de/password.json b/src/main/webapp/i18n/de/password.json deleted file mode 100644 index 3be321d7..00000000 --- a/src/main/webapp/i18n/de/password.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "password": { - "title": "Passwort für [{{username}}]", - "form": { - "button": "Speichern" - }, - "messages": { - "error": "Es ist ein Fehler aufgetreten! Das Passwort konnte nicht geändert werden.", - "success": "Passwort wurde geändert!" - } - } -} diff --git a/src/main/webapp/i18n/de/register.json b/src/main/webapp/i18n/de/register.json deleted file mode 100644 index 858c6fa5..00000000 --- a/src/main/webapp/i18n/de/register.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "register": { - "title": "Registrierung", - "form": { - "button": "Registrieren" - }, - "messages": { - "validate": { - "login": { - "required": "Ihr Benutzername wird benötigt.", - "minlength": "Ihr Benutzername muss mindestens 1 Zeichen lang sein", - "maxlength": "Ihr Benutzername darf nicht länger als 50 Zeichen sein", - "pattern": "Ihr Benutzername darf nur Kleinbuchstaben und Ziffern enthalten" - } - }, - "success": "Registrierung gespeichert! Bitte überprüfen Sie Ihre Emails für die Bestätigung.", - "error": { - "fail": "Registrierung fehlgeschlagen! Bitte versuchen Sie es später nochmal.", - "userexists": "Benutzername bereits vergeben! Bitte wählen Sie einen anderen aus.", - "emailexists": "Email wird bereits verwendet! Bitte wählen Sie eine andere aus." - } - } - } -} diff --git a/src/main/webapp/i18n/de/reset.json b/src/main/webapp/i18n/de/reset.json deleted file mode 100644 index 3f0f6993..00000000 --- a/src/main/webapp/i18n/de/reset.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "reset": { - "request": { - "title": "Passwort zurücksetzen", - "form": { - "button": "Passwort zurücksetzen" - }, - "messages": { - "info": "Geben Sie die Email Adresse ein, welche Sie bei der Registrierung verwendet haben.", - "success": "Eine Email mit weiteren Instruktionen für das Zurücksetzen des Passworts wurde gesendet.", - "notfound": "Diese Email Adresse existiert nicht! Überprüfen Sie Ihre Email Adresse und versuchen Sie es nochmal." - } - }, - "finish": { - "title": "Passwort zurücksetzen", - "form": { - "button": "Neues Passwort setzen" - }, - "messages": { - "info": "Wählen Sie ein neues Passwort", - "success": "Ihr Passwort wurde zurückgesetzt. Bitte ", - "keymissing": "Der Schlüssel zum Zurücksetzen fehlt.", - "error": "Ihr Passwort konnte nicht zurückgesetzt werden. Zur Erinnerung, Ihre Anfrage ist nur 24 Stunden gültig." - } - } - } -} diff --git a/src/main/webapp/i18n/de/sepaMandate.json b/src/main/webapp/i18n/de/sepaMandate.json deleted file mode 100644 index f5ea6b73..00000000 --- a/src/main/webapp/i18n/de/sepaMandate.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "hsadminNgApp": { - "sepaMandate": { - "home": { - "title": "Sepa Mandates", - "createLabel": "Sepa Mandate erstellen", - "createOrEditLabel": "Sepa Mandate erstellen oder bearbeiten" - }, - "created": "Sepa Mandate erstellt mit ID {{ param }}", - "updated": "Sepa Mandate aktualisiert mit ID {{ param }}", - "deleted": "Sepa Mandate gelöscht mit ID {{ param }}", - "delete": { - "question": "Soll Sepa Mandate {{ id }} wirklich dauerhaft gelöscht werden?" - }, - "detail": { - "title": "Sepa Mandate" - }, - "reference": "Reference", - "iban": "Iban", - "bic": "Bic", - "grantingDocumentDate": "Granting Document Date", - "revokationDocumentDate": "Revokation Document Date", - "validFromDate": "Valid From Date", - "validUntilDate": "Valid Until Date", - "lastUsedDate": "Last Used Date", - "remark": "Remark", - "customer": "Customer" - } - } -} diff --git a/src/main/webapp/i18n/de/sessions.json b/src/main/webapp/i18n/de/sessions.json deleted file mode 100644 index d8f61b5f..00000000 --- a/src/main/webapp/i18n/de/sessions.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "sessions": { - "title": "Aktive Sitzungen für [{{username}}]", - "table": { - "ipaddress": "IP Adresse", - "useragent": "User Agent", - "date": "Datum", - "button": "Schließen" - }, - "messages": { - "success": "Sitzung wurde geschlossen!", - "error": "Es ist ein Fehler aufgetreten! Die Sitzung konnte nicht geschlossen werden." - } - } -} diff --git a/src/main/webapp/i18n/de/settings.json b/src/main/webapp/i18n/de/settings.json deleted file mode 100644 index 379065e6..00000000 --- a/src/main/webapp/i18n/de/settings.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "settings": { - "title": "Einstellungen für Benutzer [{{username}}]", - "form": { - "firstname": "Vorname", - "firstname.placeholder": "Ihr Vorname", - "lastname": "Nachname", - "lastname.placeholder": "Ihr Nachname", - "language": "Sprache", - "button": "Speichern" - }, - "messages": { - "error": { - "fail": "Es ist ein Fehler aufgetreten! Die Einstellungen konnten nicht gespeichert werden.", - "emailexists": "Email wird bereits verwendet! Bitte wählen Sie eine andere aus." - }, - "success": "Einstellungen wurden gespeichert!", - "validate": { - "firstname": { - "required": "Ihr Vorname wird benötigt.", - "minlength": "Ihr Vorname muss mindestens 1 Zeichen lang sein", - "maxlength": "Ihr Vorname darf nicht länger als 50 Zeichen sein" - }, - "lastname": { - "required": "Ihr Nachname wird benötigt.", - "minlength": "Ihr Nachname muss mindestens 1 Zeichen lang sein", - "maxlength": "Ihr Nachname darf nicht länger als 50 Zeichen sein" - } - } - } - } -} diff --git a/src/main/webapp/i18n/de/share.json b/src/main/webapp/i18n/de/share.json deleted file mode 100644 index 2cadbe83..00000000 --- a/src/main/webapp/i18n/de/share.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "hsadminNgApp": { - "share": { - "home": { - "title": "Geschäftsanteil-Transaktionen", - "createLabel": "Geschäftsanteil-Transaktion erfassen", - "createOrEditLabel": "Geschäftsanteil-Transaktion erfassen oder bearbeiten" - }, - "created": "Geschäftsanteil-Transaktion erfasst mit ID {{ param }}", - "updated": "Geschäftsanteil-Transaktion aktualisiert mit ID {{ param }}", - "deleted": "Geschäftsanteil-Transaktion gelöscht mit ID {{ param }}", - "delete": { - "question": "Soll die Geschäftsanteil-Transaktion {{ id }} wirklich dauerhaft gelöscht werden?" - }, - "detail": { - "title": "Geschäftsanteil-Transaktion" - }, - "documentDate": "Belegdatum", - "valueDate": "Buchungsdatum", - "action": "Aktion", - "quantity": "Anzahl", - "remark": "Bemerkung", - "membership": "zugehörige Mitgliedschaft" - } - } -} diff --git a/src/main/webapp/i18n/de/shareAction.json b/src/main/webapp/i18n/de/shareAction.json deleted file mode 100644 index 63d4be57..00000000 --- a/src/main/webapp/i18n/de/shareAction.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "hsadminNgApp": { - "ShareAction": { - "null": "", - "SUBSCRIPTION": "Zeichnung", - "CANCELLATION": "Kündigung" - } - } -} diff --git a/src/main/webapp/i18n/de/user-management.json b/src/main/webapp/i18n/de/user-management.json deleted file mode 100644 index b697fedb..00000000 --- a/src/main/webapp/i18n/de/user-management.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "userManagement": { - "home": { - "title": "Benutzer", - "createLabel": "Neuen Benutzer erstellen", - "createOrEditLabel": "Benutzer erstellen oder bearbeiten" - }, - "created": "Ein neuer Benutzer wurde mit ID {{ param }} erstellt", - "updated": "Ein Benutzer mit ID {{ param }} wurde geändert", - "deleted": "Ein Benutzer mit ID {{ param }} wurde gelöscht", - "delete": { - "question": "Sind Sie sicher, dass Sie den Benutzer {{ login }} löschen möchten?" - }, - "detail": { - "title": "Benutzer" - }, - "login": "Login", - "firstName": "Vorname", - "lastName": "Nachname", - "email": "Email", - "activated": "Aktiv", - "deactivated": "Deaktiviert", - "profiles": "Profile", - "langKey": "Sprache", - "createdBy": "Erstellt von", - "createdDate": "Erstellt am", - "lastModifiedBy": "Bearbeitet von", - "lastModifiedDate": "Zuletzt bearbeitet" - } -} diff --git a/src/main/webapp/i18n/de/userRole.json b/src/main/webapp/i18n/de/userRole.json deleted file mode 100644 index 610dc2a4..00000000 --- a/src/main/webapp/i18n/de/userRole.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "hsadminNgApp": { - "UserRole": { - "null": "", - "HOSTMASTER": "HOSTMASTER", - "ADMIN": "ADMIN", - "SUPPORTER": "SUPPORTER", - "CONTRACTUAL_CONTACT": "CONTRACTUAL_CONTACT", - "FINANCIAL_CONTACT": "FINANCIAL_CONTACT", - "TECHNICAL_CONTACT": "TECHNICAL_CONTACT", - "CUSTOMER_USER": "CUSTOMER_USER" - } - } -} diff --git a/src/main/webapp/i18n/de/userRoleAssignment.json b/src/main/webapp/i18n/de/userRoleAssignment.json deleted file mode 100644 index c7c53d20..00000000 --- a/src/main/webapp/i18n/de/userRoleAssignment.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "hsadminNgApp": { - "userRoleAssignment": { - "home": { - "title": "User Role Assignments", - "createLabel": "User Role Assignment erstellen", - "createOrEditLabel": "User Role Assignment erstellen oder bearbeiten" - }, - "created": "User Role Assignment erstellt mit ID {{ param }}", - "updated": "User Role Assignment aktualisiert mit ID {{ param }}", - "deleted": "User Role Assignment gelöscht mit ID {{ param }}", - "delete": { - "question": "Soll User Role Assignment {{ id }} wirklich dauerhaft gelöscht werden?" - }, - "detail": { - "title": "User Role Assignment" - }, - "entityTypeId": "Entity Type Id", - "entityObjectId": "Entity Object Id", - "assignedRole": "Assigned Role", - "user": "User" - } - } -} diff --git a/src/main/webapp/i18n/de/vatRegion.json b/src/main/webapp/i18n/de/vatRegion.json deleted file mode 100644 index 339febc1..00000000 --- a/src/main/webapp/i18n/de/vatRegion.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "hsadminNgApp": { - "VatRegion": { - "null": "", - "DOMESTIC": "DOMESTIC", - "EU": "EU", - "OTHER": "OTHER" - } - } -} diff --git a/src/main/webapp/i18n/en/activate.json b/src/main/webapp/i18n/en/activate.json deleted file mode 100644 index 2926b789..00000000 --- a/src/main/webapp/i18n/en/activate.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "activate": { - "title": "Activation", - "messages": { - "success": "Your user account has been activated. Please ", - "error": "Your user could not be activated. Please use the registration form to sign up." - } - } -} diff --git a/src/main/webapp/i18n/en/asset.json b/src/main/webapp/i18n/en/asset.json deleted file mode 100644 index a380f70f..00000000 --- a/src/main/webapp/i18n/en/asset.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "hsadminNgApp": { - "asset": { - "home": { - "title": "Asset Transactions", - "createLabel": "Register a new asset transaction", - "createOrEditLabel": "Register or edit an asset transaction" - }, - "created": "A new asset transaction is registered with identifier {{ param }}", - "updated": "An asset transaction is updated with identifier {{ param }}", - "deleted": "An asset transaction is deleted with identifier {{ param }}", - "delete": { - "question": "Are you sure you want to delete asset transaction {{ id }}?" - }, - "detail": { - "title": "Asset transaction" - }, - "documentDate": "Document date", - "valueDate": "Value date", - "action": "Action", - "amount": "Amount", - "remark": "Remark", - "membership": "Related membership" - } - } -} diff --git a/src/main/webapp/i18n/en/assetAction.json b/src/main/webapp/i18n/en/assetAction.json deleted file mode 100644 index e17447ca..00000000 --- a/src/main/webapp/i18n/en/assetAction.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "hsadminNgApp": { - "AssetAction": { - "null": "", - "PAYMENT": "Payment", - "HANDOVER": "Handover", - "ADOPTION": "Adoption", - "LOSS": "Loss", - "CLEARING": "Clearing", - "PAYBACK": "Payback" - } - } -} diff --git a/src/main/webapp/i18n/en/audits.json b/src/main/webapp/i18n/en/audits.json deleted file mode 100644 index ed5e16d4..00000000 --- a/src/main/webapp/i18n/en/audits.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "audits": { - "title": "Audits", - "filter": { - "title": "Filter per date", - "from": "from", - "to": "to", - "button": { - "weeks": "Weeks", - "today": "today", - "clear": "clear", - "close": "close" - } - }, - "table": { - "header": { - "principal": "User", - "date": "Date", - "status": "State", - "data": "Extra data" - }, - "data": { - "remoteAddress": "Remote Address:" - } - } - } -} diff --git a/src/main/webapp/i18n/en/configuration.json b/src/main/webapp/i18n/en/configuration.json deleted file mode 100644 index 81e208de..00000000 --- a/src/main/webapp/i18n/en/configuration.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "configuration": { - "title": "Configuration", - "filter": "Filter (by prefix)", - "table": { - "prefix": "Prefix", - "properties": "Properties" - } - } -} diff --git a/src/main/webapp/i18n/en/custom-error.json b/src/main/webapp/i18n/en/custom-error.json deleted file mode 100644 index 3ca13d6c..00000000 --- a/src/main/webapp/i18n/en/custom-error.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "error": { - "idNotFound": "Technical record-ID not found", - "unknownProperty": "Unknown Property", - "shareSubscriptionPositiveQuantity": "Share subscriptions require a positive quantity", - "shareCancellationNegativeQuantity": "Share cancellations require a negative quantity", - "shareTransactionImmutable": "Share transactions are immutable", - "membershipNotDeletable": "Membership cannot be deleted, instead set 'untilDate'", - "customerNotDeletable": "Customer cannot be deleted explicitly'", - "untilDateMustBeAfterSinceDate": "Membership until date must be after since date", - "anotherUncancelledMembershipExists": "Only a single uncancelled membership allowed per customer", - "initializationProhibited": "Initialization of the field prohibited", - "updateProhibited": "Update of the field prohibited", - "documentDateMayNotBeAfterValueDate": "Document date may not be after value date", - "assetTransactionImmutable": "Asset transactions are immutable", - "assetPaymentsPositiveAmount": "Asset payments require a positive amount", - "assetAdoptionsPositiveAmount": "Asset adoptions require a positive amount", - "assetPaybacksNegativeAmount": "Asset paybacks require a negative amount", - "assetHandoversNegativeAmount": "Asset handovers require a negative amount", - "assetLossesNegativeAmount": "Asset losses require a negative amount", - "assetClearingsNegativeAmount": "Asset clearings require a negative amount" - } -} diff --git a/src/main/webapp/i18n/en/customer.json b/src/main/webapp/i18n/en/customer.json deleted file mode 100644 index 6444cda2..00000000 --- a/src/main/webapp/i18n/en/customer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "hsadminNgApp": { - "customer": { - "home": { - "title": "Customers", - "createLabel": "Create a new Customer", - "createOrEditLabel": "Create or edit a Customer" - }, - "created": "A new Customer is created with identifier {{ param }}", - "updated": "A Customer is updated with identifier {{ param }}", - "deleted": "A Customer is deleted with identifier {{ param }}", - "delete": { - "question": "Are you sure you want to delete Customer {{ id }}?" - }, - "detail": { - "title": "Customer" - }, - "reference": "Reference", - "prefix": "Prefix", - "name": "Name", - "kind": "Kind", - "birthDate": "Birth Date", - "birthPlace": "Birth Place", - "registrationCourt": "Registration Court", - "registrationNumber": "Registration Number", - "vatRegion": "Vat Region", - "vatNumber": "Vat Number", - "contractualSalutation": "Contractual Salutation", - "contractualAddress": "Contractual Address", - "billingSalutation": "Billing Salutation", - "billingAddress": "Billing Address", - "remark": "Remark", - "membership": "Membership", - "sepamandate": "Sepamandate" - } - } -} diff --git a/src/main/webapp/i18n/en/customerKind.json b/src/main/webapp/i18n/en/customerKind.json deleted file mode 100644 index f96e75e4..00000000 --- a/src/main/webapp/i18n/en/customerKind.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "hsadminNgApp": { - "CustomerKind": { - "null": "", - "NATURAL": "NATURAL", - "LEGAL": "LEGAL" - } - } -} diff --git a/src/main/webapp/i18n/en/error.json b/src/main/webapp/i18n/en/error.json deleted file mode 100644 index 4f8cc3e7..00000000 --- a/src/main/webapp/i18n/en/error.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "error": { - "title": "Error page!", - "http": { - "400": "Bad request.", - "403": "You are not authorized to access this page.", - "404": "The page does not exist.", - "405": "The HTTP verb you used is not supported for this URL.", - "500": "Internal server error." - }, - "concurrencyFailure": "Another user modified this data at the same time as you. Your changes were rejected.", - "validation": "Validation error on the server." - } -} diff --git a/src/main/webapp/i18n/en/global.json b/src/main/webapp/i18n/en/global.json deleted file mode 100644 index 72ca26ef..00000000 --- a/src/main/webapp/i18n/en/global.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "global": { - "title": "HsadminNg", - "browsehappy": "You are using an outdated browser. Please upgrade your browser to improve your experience.", - "menu": { - "home": "Home", - "jhipster-needle-menu-add-element": "JHipster will add additional menu entries here (do not translate!)", - "entities": { - "main": "Entities", - "customer": "Customer", - "membership": "Membership", - "share": "Share", - "asset": "Asset", - "sepaMandate": "Sepa Mandate", - "userRoleAssignment": "User Role Assignment", - "jhipster-needle-menu-add-entry": "JHipster will add additional entities here (do not translate!)" - }, - "account": { - "main": "Account", - "settings": "Settings", - "password": "Password", - "sessions": "Sessions", - "login": "Sign in", - "logout": "Sign out", - "register": "Register" - }, - "admin": { - "main": "Administration", - "userManagement": "User management", - "tracker": "User tracker", - "metrics": "Metrics", - "health": "Health", - "configuration": "Configuration", - "logs": "Logs", - "audits": "Audits", - "apidocs": "API", - "database": "Database", - "jhipster-needle-menu-add-admin-element": "JHipster will add additional menu entries here (do not translate!)" - }, - "language": "Language" - }, - "form": { - "username": "Username", - "username.placeholder": "Your username", - "currentpassword": "Current password", - "currentpassword.placeholder": "Current password", - "newpassword": "New password", - "newpassword.placeholder": "New password", - "confirmpassword": "New password confirmation", - "confirmpassword.placeholder": "Confirm the new password", - "email": "Email", - "email.placeholder": "Your email" - }, - "messages": { - "info": { - "authenticated": { - "prefix": "If you want to ", - "link": "sign in", - "suffix": ", you can try the default accounts:
- Administrator (login=\"admin\" and password=\"admin\")
- User (login=\"user\" and password=\"user\")." - }, - "register": { - "noaccount": "You don't have an account yet?", - "link": "Register a new account" - } - }, - "error": { - "dontmatch": "The password and its confirmation do not match!" - }, - "validate": { - "newpassword": { - "required": "Your password is required.", - "minlength": "Your password is required to be at least 4 characters.", - "maxlength": "Your password cannot be longer than 50 characters.", - "strength": "Password strength:" - }, - "confirmpassword": { - "required": "Your confirmation password is required.", - "minlength": "Your confirmation password is required to be at least 4 characters.", - "maxlength": "Your confirmation password cannot be longer than 50 characters." - }, - "email": { - "required": "Your email is required.", - "invalid": "Your email is invalid.", - "minlength": "Your email is required to be at least 5 characters.", - "maxlength": "Your email cannot be longer than 50 characters." - } - } - }, - "field": { - "id": "ID" - }, - "ribbon": { - "dev": "Development" - }, - "item-count": "Showing {{first}} - {{second}} of {{total}} items." - }, - "entity": { - "action": { - "addblob": "Add blob", - "addimage": "Add image", - "back": "Back", - "cancel": "Cancel", - "delete": "Delete", - "edit": "Edit", - "open": "Open", - "save": "Save", - "view": "View" - }, - "detail": { - "field": "Field", - "value": "Value" - }, - "delete": { - "title": "Confirm delete operation" - }, - "validation": { - "required": "This field is required.", - "minlength": "This field is required to be at least {{ min }} characters.", - "maxlength": "This field cannot be longer than {{ max }} characters.", - "min": "This field should be at least {{ min }}.", - "max": "This field cannot be more than {{ max }}.", - "minbytes": "This field should be at least {{ min }} bytes.", - "maxbytes": "This field cannot be more than {{ max }} bytes.", - "pattern": "This field should follow pattern for {{ pattern }}.", - "number": "This field should be a number.", - "datetimelocal": "This field should be a date and time.", - "patternLogin": "This field can only contain letters, digits and e-mail addresses.", - "duplicate": "This value is duplicate to existing data." - } - }, - "error": { - "internalServerError": "Internal server error", - "server.not.reachable": "Server not reachable", - "url.not.found": "Not found", - "NotNull": "Field {{ fieldName }} cannot be empty!", - "Size": "Field {{ fieldName }} does not meet min/max size requirements!", - "userexists": "Login name already used!", - "emailexists": "Email is already in use!", - "idexists": "A new {{ entityName }} cannot already have an ID", - "idnull": "Invalid ID" - }, - "footer": "This is your footer" -} diff --git a/src/main/webapp/i18n/en/health.json b/src/main/webapp/i18n/en/health.json deleted file mode 100644 index 9eba9c2d..00000000 --- a/src/main/webapp/i18n/en/health.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "health": { - "title": "Health Checks", - "refresh.button": "Refresh", - "stacktrace": "Stacktrace", - "details": { - "details": "Details", - "properties": "Properties", - "name": "Name", - "value": "Value", - "error": "Error" - }, - "indicator": { - "diskSpace": "Disk space", - "mail": "Email", - "db": "Database" - }, - "table": { - "service": "Service name", - "status": "Status" - }, - "status": { - "UNKNOWN": "UNKNOWN", - "UP": "UP", - "DOWN": "DOWN" - } - } -} diff --git a/src/main/webapp/i18n/en/home.json b/src/main/webapp/i18n/en/home.json deleted file mode 100644 index 402f1870..00000000 --- a/src/main/webapp/i18n/en/home.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "home": { - "title": "Welcome, Java Hipster!", - "subtitle": "This is your homepage", - "logged": { - "message": "You are logged in as user \"{{username}}\"." - }, - "question": "If you have any question on JHipster:", - "link": { - "homepage": "JHipster homepage", - "stackoverflow": "JHipster on Stack Overflow", - "bugtracker": "JHipster bug tracker", - "chat": "JHipster public chat room", - "follow": "follow @java_hipster on Twitter" - }, - "like": "If you like JHipster, don't forget to give us a star on", - "github": "GitHub" - } -} diff --git a/src/main/webapp/i18n/en/login.json b/src/main/webapp/i18n/en/login.json deleted file mode 100644 index 3552ddbf..00000000 --- a/src/main/webapp/i18n/en/login.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "login": { - "title": "Sign in", - "form": { - "password": "Password", - "password.placeholder": "Your password", - "rememberme": "Remember me", - "button": "Sign in" - }, - "messages": { - "error": { - "authentication": "Failed to sign in! Please check your credentials and try again." - } - }, - "password": { - "forgot": "Did you forget your password?" - } - } -} diff --git a/src/main/webapp/i18n/en/logs.json b/src/main/webapp/i18n/en/logs.json deleted file mode 100644 index a614b128..00000000 --- a/src/main/webapp/i18n/en/logs.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "logs": { - "title": "Logs", - "nbloggers": "There are {{ total }} loggers.", - "filter": "Filter", - "table": { - "name": "Name", - "level": "Level" - } - } -} diff --git a/src/main/webapp/i18n/en/membership.json b/src/main/webapp/i18n/en/membership.json deleted file mode 100644 index 30388671..00000000 --- a/src/main/webapp/i18n/en/membership.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "hsadminNgApp": { - "membership": { - "home": { - "title": "Memberships", - "createLabel": "Create a new Membership", - "createOrEditLabel": "Create or edit a Membership" - }, - "created": "A new Membership is created with identifier {{ param }}", - "updated": "A Membership is updated with identifier {{ param }}", - "deleted": "A Membership is deleted with identifier {{ param }}", - "delete": { - "question": "Are you sure you want to delete Membership {{ id }}?" - }, - "detail": { - "title": "Membership" - }, - "admissionDocumentDate": "Admission Document Date", - "cancellationDocumentDate": "Cancellation Document Date", - "memberFromDate": "Member From Date", - "memberUntilDate": "Member Until Date", - "remark": "Remark", - "share": "Share", - "asset": "Asset", - "customer": "Customer" - } - } -} diff --git a/src/main/webapp/i18n/en/metrics.json b/src/main/webapp/i18n/en/metrics.json deleted file mode 100644 index 7d379d20..00000000 --- a/src/main/webapp/i18n/en/metrics.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "metrics": { - "title": "Application Metrics", - "refresh.button": "Refresh", - "updating": "Updating...", - "jvm": { - "title": "JVM Metrics", - "memory": { - "title": "Memory", - "total": "Total Memory", - "heap": "Heap Memory", - "nonheap": "Non-Heap Memory" - }, - "threads": { - "title": "Threads", - "all": "All", - "runnable": "Runnable", - "timedwaiting": "Timed waiting", - "waiting": "Waiting", - "blocked": "Blocked", - "dump": { - "title": "Threads dump", - "id": "Id: ", - "blockedtime": "Blocked Time", - "blockedcount": "Blocked Count", - "waitedtime": "Waited Time", - "waitedcount": "Waited Count", - "lockname": "Lock name", - "stacktrace": "Stacktrace", - "show": "Show Stacktrace", - "hide": "Hide Stacktrace" - } - }, - "gc": { - "title": "Garbage collections", - "marksweepcount": "Mark Sweep count", - "marksweeptime": "Mark Sweep time", - "scavengecount": "Scavenge count", - "scavengetime": "Scavenge time" - }, - "http": { - "title": "HTTP requests (time in millisecond)", - "active": "Active requests:", - "total": "Total requests:", - "table": { - "code": "Code", - "count": "Count", - "mean": "Mean", - "average": "Average", - "max": "Max" - }, - "code": { - "ok": "Ok", - "notfound": "Not found", - "servererror": "Server Error" - } - } - }, - "servicesstats": { - "title": "Services statistics (time in millisecond)", - "table": { - "name": "Service name", - "count": "Count", - "mean": "Mean", - "min": "Min", - "max": "Max", - "p50": "p50", - "p75": "p75", - "p95": "p95", - "p99": "p99" - } - }, - "cache": { - "title": "Cache statistics", - "cachename": "Cache name", - "hits": "Cache Hits", - "misses": "Cache Misses", - "gets": "Cache Gets", - "puts": "Cache Puts", - "removals": "Cache Removals", - "evictions": "Cache Evictions", - "hitPercent": "Cache Hit %", - "missPercent": "Cache Miss %", - "averageGetTime": "Average get time (µs)", - "averagePutTime": "Average put time (µs)", - "averageRemoveTime": "Average remove time (µs)" - }, - "datasource": { - "usage": "Connection Pool Usage", - "title": "DataSource statistics (time in millisecond)", - "name": "Pool usage", - "count": "Count", - "mean": "Mean", - "min": "Min", - "max": "Max", - "p50": "p50", - "p75": "p75", - "p95": "p95", - "p99": "p99" - } - } -} diff --git a/src/main/webapp/i18n/en/password.json b/src/main/webapp/i18n/en/password.json deleted file mode 100644 index 7a7613f7..00000000 --- a/src/main/webapp/i18n/en/password.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "password": { - "title": "Password for [{{username}}]", - "form": { - "button": "Save" - }, - "messages": { - "error": "An error has occurred! The password could not be changed.", - "success": "Password changed!" - } - } -} diff --git a/src/main/webapp/i18n/en/register.json b/src/main/webapp/i18n/en/register.json deleted file mode 100644 index 3a03980b..00000000 --- a/src/main/webapp/i18n/en/register.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "register": { - "title": "Registration", - "form": { - "button": "Register" - }, - "messages": { - "validate": { - "login": { - "required": "Your username is required.", - "minlength": "Your username is required to be at least 1 character.", - "maxlength": "Your username cannot be longer than 50 characters.", - "pattern": "Your username can only contain letters and digits." - } - }, - "success": "Registration saved! Please check your email for confirmation.", - "error": { - "fail": "Registration failed! Please try again later.", - "userexists": "Login name already registered! Please choose another one.", - "emailexists": "Email is already in use! Please choose another one." - } - } - } -} diff --git a/src/main/webapp/i18n/en/reset.json b/src/main/webapp/i18n/en/reset.json deleted file mode 100644 index 6ceb949d..00000000 --- a/src/main/webapp/i18n/en/reset.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "reset": { - "request": { - "title": "Reset your password", - "form": { - "button": "Reset password" - }, - "messages": { - "info": "Enter the email address you used to register", - "success": "Check your emails for details on how to reset your password.", - "notfound": "Email address isn't registered! Please check and try again" - } - }, - "finish": { - "title": "Reset password", - "form": { - "button": "Validate new password" - }, - "messages": { - "info": "Choose a new password", - "success": "Your password has been reset. Please ", - "keymissing": "The reset key is missing.", - "error": "Your password couldn't be reset. Remember a password request is only valid for 24 hours." - } - } - } -} diff --git a/src/main/webapp/i18n/en/sepaMandate.json b/src/main/webapp/i18n/en/sepaMandate.json deleted file mode 100644 index d9aca2be..00000000 --- a/src/main/webapp/i18n/en/sepaMandate.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "hsadminNgApp": { - "sepaMandate": { - "home": { - "title": "Sepa Mandates", - "createLabel": "Create a new Sepa Mandate", - "createOrEditLabel": "Create or edit a Sepa Mandate" - }, - "created": "A new Sepa Mandate is created with identifier {{ param }}", - "updated": "A Sepa Mandate is updated with identifier {{ param }}", - "deleted": "A Sepa Mandate is deleted with identifier {{ param }}", - "delete": { - "question": "Are you sure you want to delete Sepa Mandate {{ id }}?" - }, - "detail": { - "title": "Sepa Mandate" - }, - "reference": "Reference", - "iban": "Iban", - "bic": "Bic", - "grantingDocumentDate": "Granting Document Date", - "revokationDocumentDate": "Revokation Document Date", - "validFromDate": "Valid From Date", - "validUntilDate": "Valid Until Date", - "lastUsedDate": "Last Used Date", - "remark": "Remark", - "customer": "Customer" - } - } -} diff --git a/src/main/webapp/i18n/en/sessions.json b/src/main/webapp/i18n/en/sessions.json deleted file mode 100644 index d410035e..00000000 --- a/src/main/webapp/i18n/en/sessions.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "sessions": { - "title": "Active sessions for [{{username}}]", - "table": { - "ipaddress": "IP address", - "useragent": "User Agent", - "date": "Date", - "button": "Invalidate" - }, - "messages": { - "success": "Session invalidated!", - "error": "An error has occurred! The session could not be invalidated." - } - } -} diff --git a/src/main/webapp/i18n/en/settings.json b/src/main/webapp/i18n/en/settings.json deleted file mode 100644 index d9413819..00000000 --- a/src/main/webapp/i18n/en/settings.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "settings": { - "title": "User settings for [{{username}}]", - "form": { - "firstname": "First Name", - "firstname.placeholder": "Your first name", - "lastname": "Last Name", - "lastname.placeholder": "Your last name", - "language": "Language", - "button": "Save" - }, - "messages": { - "error": { - "fail": "An error has occurred! Settings could not be saved.", - "emailexists": "Email is already in use! Please choose another one." - }, - "success": "Settings saved!", - "validate": { - "firstname": { - "required": "Your first name is required.", - "minlength": "Your first name is required to be at least 1 character", - "maxlength": "Your first name cannot be longer than 50 characters" - }, - "lastname": { - "required": "Your last name is required.", - "minlength": "Your last name is required to be at least 1 character", - "maxlength": "Your last name cannot be longer than 50 characters" - } - } - } - } -} diff --git a/src/main/webapp/i18n/en/share.json b/src/main/webapp/i18n/en/share.json deleted file mode 100644 index e103c0ec..00000000 --- a/src/main/webapp/i18n/en/share.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "hsadminNgApp": { - "share": { - "home": { - "title": "Share Transactions", - "createLabel": "Register a new share transaction", - "createOrEditLabel": "Register or edit a share transaction" - }, - "created": "A new share transactions is registered with identifier {{ param }}", - "updated": "A share transaction is updated with identifier {{ param }}", - "deleted": "A share transcation is deleted with identifier {{ param }}", - "delete": { - "question": "Are you sure you want to delete share transaction {{ id }}?" - }, - "detail": { - "title": "Share transaction" - }, - "documentDate": "Document date", - "valueDate": "Value date", - "action": "Action", - "quantity": "Quantity", - "remark": "Remark", - "membership": "Related membership" - } - } -} diff --git a/src/main/webapp/i18n/en/shareAction.json b/src/main/webapp/i18n/en/shareAction.json deleted file mode 100644 index b2aed341..00000000 --- a/src/main/webapp/i18n/en/shareAction.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "hsadminNgApp": { - "ShareAction": { - "null": "", - "SUBSCRIPTION": "Subscription", - "CANCELLATION": "Cancellation" - } - } -} diff --git a/src/main/webapp/i18n/en/user-management.json b/src/main/webapp/i18n/en/user-management.json deleted file mode 100644 index 30c125b6..00000000 --- a/src/main/webapp/i18n/en/user-management.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "userManagement": { - "home": { - "title": "Users", - "createLabel": "Create a new user", - "createOrEditLabel": "Create or edit a user" - }, - "created": "A new user is created with identifier {{ param }}", - "updated": "An user is updated with identifier {{ param }}", - "deleted": "An user is deleted with identifier {{ param }}", - "delete": { - "question": "Are you sure you want to delete user {{ login }}?" - }, - "detail": { - "title": "User" - }, - "login": "Login", - "firstName": "First name", - "lastName": "Last name", - "email": "Email", - "activated": "Activated", - "deactivated": "Deactivated", - "profiles": "Profiles", - "langKey": "Language", - "createdBy": "Created by", - "createdDate": "Created date", - "lastModifiedBy": "Modified by", - "lastModifiedDate": "Modified date" - } -} diff --git a/src/main/webapp/i18n/en/userRole.json b/src/main/webapp/i18n/en/userRole.json deleted file mode 100644 index 610dc2a4..00000000 --- a/src/main/webapp/i18n/en/userRole.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "hsadminNgApp": { - "UserRole": { - "null": "", - "HOSTMASTER": "HOSTMASTER", - "ADMIN": "ADMIN", - "SUPPORTER": "SUPPORTER", - "CONTRACTUAL_CONTACT": "CONTRACTUAL_CONTACT", - "FINANCIAL_CONTACT": "FINANCIAL_CONTACT", - "TECHNICAL_CONTACT": "TECHNICAL_CONTACT", - "CUSTOMER_USER": "CUSTOMER_USER" - } - } -} diff --git a/src/main/webapp/i18n/en/userRoleAssignment.json b/src/main/webapp/i18n/en/userRoleAssignment.json deleted file mode 100644 index 28225467..00000000 --- a/src/main/webapp/i18n/en/userRoleAssignment.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "hsadminNgApp": { - "userRoleAssignment": { - "home": { - "title": "User Role Assignments", - "createLabel": "Create a new User Role Assignment", - "createOrEditLabel": "Create or edit a User Role Assignment" - }, - "created": "A new User Role Assignment is created with identifier {{ param }}", - "updated": "A User Role Assignment is updated with identifier {{ param }}", - "deleted": "A User Role Assignment is deleted with identifier {{ param }}", - "delete": { - "question": "Are you sure you want to delete User Role Assignment {{ id }}?" - }, - "detail": { - "title": "User Role Assignment" - }, - "entityTypeId": "Entity Type Id", - "entityObjectId": "Entity Object Id", - "assignedRole": "Assigned Role", - "user": "User" - } - } -} diff --git a/src/main/webapp/i18n/en/vatRegion.json b/src/main/webapp/i18n/en/vatRegion.json deleted file mode 100644 index 339febc1..00000000 --- a/src/main/webapp/i18n/en/vatRegion.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "hsadminNgApp": { - "VatRegion": { - "null": "", - "DOMESTIC": "DOMESTIC", - "EU": "EU", - "OTHER": "OTHER" - } - } -} diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html deleted file mode 100644 index d912b1f0..00000000 --- a/src/main/webapp/index.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - hsadminNg - - - - - - - - - - - - -
-
-
-
-
-
-
-
-
- -
-
- - - - - - diff --git a/src/main/webapp/manifest.webapp b/src/main/webapp/manifest.webapp deleted file mode 100644 index 4b6ddbb7..00000000 --- a/src/main/webapp/manifest.webapp +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "HsadminNg", - "short_name": "HsadminNg", - "icons": [ - { - "src": "./content/images/jhipster_family_member_3_head-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "./content/images/jhipster_family_member_3_head-256.png", - "sizes": "256x256", - "type": "image/png" - }, - { - "src": "./content/images/jhipster_family_member_3_head-384.png", - "sizes": "384x384", - "type": "image/png" - }, - { - "src": "./content/images/jhipster_family_member_3_head-512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "theme_color": "#000000", - "background_color": "#e0e0e0", - "start_url": "/index.html", - "display": "standalone", - "orientation": "portrait" -} diff --git a/src/main/webapp/robots.txt b/src/main/webapp/robots.txt deleted file mode 100644 index 7cda2747..00000000 --- a/src/main/webapp/robots.txt +++ /dev/null @@ -1,11 +0,0 @@ -# robotstxt.org/ - -User-agent: * -Disallow: /api/account -Disallow: /api/account/change-password -Disallow: /api/account/sessions -Disallow: /api/audits/ -Disallow: /api/logs/ -Disallow: /api/users/ -Disallow: /management/ -Disallow: /v2/api-docs/ diff --git a/src/main/webapp/swagger-ui/dist/images/throbber.gif b/src/main/webapp/swagger-ui/dist/images/throbber.gif deleted file mode 100644 index 06393889..00000000 Binary files a/src/main/webapp/swagger-ui/dist/images/throbber.gif and /dev/null differ diff --git a/src/main/webapp/swagger-ui/index.html b/src/main/webapp/swagger-ui/index.html deleted file mode 100644 index 416eacef..00000000 --- a/src/main/webapp/swagger-ui/index.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - Swagger UI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-
- - diff --git a/src/test/features/gitkeep b/src/test/features/gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/features/user/user.feature b/src/test/features/user/user.feature deleted file mode 100644 index cffd53f0..00000000 --- a/src/test/features/user/user.feature +++ /dev/null @@ -1,6 +0,0 @@ -Feature: User management - - Scenario: Retrieve administrator user - When I search user 'admin' - Then the user is not found - And his last name is 'Administrator' diff --git a/src/test/java/net/hostsharing/hsadminng/arch/ArchUnitTest.java b/src/test/java/net/hostsharing/hsadminng/arch/ArchUnitTest.java new file mode 100644 index 00000000..156ce4e8 --- /dev/null +++ b/src/test/java/net/hostsharing/hsadminng/arch/ArchUnitTest.java @@ -0,0 +1,67 @@ +package net.hostsharing.hsadminng.arch; + +import com.tngtech.archunit.junit.AnalyzeClasses; +import com.tngtech.archunit.junit.ArchTest; +import com.tngtech.archunit.lang.ArchRule; +import org.junit.jupiter.api.Test; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.web.bind.annotation.RestController; + +import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.classes; +import static com.tngtech.archunit.library.dependencies.SlicesRuleDefinition.slices; + +@AnalyzeClasses(packages = ArchUnitTest.NET_HOSTSHARING_HSADMINNG) +public class ArchUnitTest { + + public static final String NET_HOSTSHARING_HSADMINNG = "net.hostsharing.hsadminng"; + + @ArchTest + @SuppressWarnings("unused") + public static final ArchRule contextPackageRule = classes() + .that().resideInAPackage("..context..") + .should().onlyDependOnClassesThat() + .resideOutsideOfPackage(NET_HOSTSHARING_HSADMINNG); + + @ArchTest + @SuppressWarnings("unused") + public static final ArchRule configPackageRule = classes() + .that().resideInAPackage("..config..") + .should().onlyDependOnClassesThat() + .resideOutsideOfPackage(NET_HOSTSHARING_HSADMINNG); + + @ArchTest + @SuppressWarnings("unused") + public static final ArchRule errorsPackageRule = classes() + .that().resideInAPackage("..errors..") + .should().onlyDependOnClassesThat() + .resideOutsideOfPackage(NET_HOSTSHARING_HSADMINNG); + + @ArchTest + @SuppressWarnings("unused") + public static final ArchRule hsPackagesRule = classes() + .that().resideInAPackage("..hs.(*)..") + .should().onlyBeAccessed().byClassesThat() + .resideInAnyPackage("..hs.(*).."); + + @ArchTest + @SuppressWarnings("unused") + public static final ArchRule hsPackagePackageRule = classes() + .that().resideInAPackage("..hs.hspackage..") + .should().onlyBeAccessed().byClassesThat() + .resideInAnyPackage("..hs.hspackage.."); + + @Test + public void everythingShouldBeFreeOfCycles() { + slices().matching("net.hostsharing.hsadminng.(*)..").should().beFreeOfCycles(); + } + + @Test + public void restControllerNaming() { + classes().that().areAnnotatedWith(RestController.class).should().haveSimpleNameEndingWith("Controller"); + } + + @Test + public void repositoryNaming() { + classes().that().implement(JpaRepository.class).should().haveSimpleNameEndingWith("Repository"); + } +} diff --git a/src/test/java/net/hostsharing/hsadminng/context/ContextIntegrationTests.java b/src/test/java/net/hostsharing/hsadminng/context/ContextIntegrationTests.java new file mode 100644 index 00000000..25b90e4e --- /dev/null +++ b/src/test/java/net/hostsharing/hsadminng/context/ContextIntegrationTests.java @@ -0,0 +1,43 @@ +package net.hostsharing.hsadminng.context; + +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; +import org.springframework.context.annotation.ComponentScan; + +import javax.transaction.Transactional; + +import static org.assertj.core.api.Assertions.assertThat; + +@DataJpaTest +@ComponentScan(basePackageClasses = Context.class) +class ContextIntegrationTests { + + @Autowired + private Context context; + + @Test + @Transactional + void setCurrentUser() { + context.setCurrentUser("mike@hostsharing.net"); + + final var currentUser = context.getCurrentUser(); + assertThat(currentUser).isEqualTo("mike@hostsharing.net"); + + final var assumedRoles = context.getAssumedRoles(); + assertThat(assumedRoles).isEmpty(); + } + + @Test + @Transactional + void assumeRoles() { + context.setCurrentUser("mike@hostsharing.net"); + context.assumeRoles("customer#aaa.owner;customer#aab.owner"); + + final var currentUser = context.getCurrentUser(); + assertThat(currentUser).isEqualTo("mike@hostsharing.net"); + + final var assumedRoles = context.getAssumedRoles(); + assertThat(assumedRoles).containsExactlyInAnyOrder("customer#aaa.owner", "customer#aab.owner"); + } +} diff --git a/src/test/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerControllerRestTest.java b/src/test/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerControllerRestTest.java new file mode 100644 index 00000000..7bb58746 --- /dev/null +++ b/src/test/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerControllerRestTest.java @@ -0,0 +1,66 @@ +package net.hostsharing.hsadminng.hs.hscustomer; + +import net.hostsharing.hsadminng.context.Context; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.MediaType; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; + +import static java.util.Arrays.asList; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.mockito.Mockito.when; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +@WebMvcTest(CustomerController.class) +class CustomerControllerRestTest { + + @Autowired + MockMvc mockMvc; + @MockBean + Context contextMock; + @MockBean + CustomerRepository customerRepositoryMock; + + @Test + void apiCustomersWillReturnAllCustomersFromRepositoryIfNoCriteriaGiven() throws Exception { + + // given + when(customerRepositoryMock.findCustomerByOptionalPrefixLike(null)).thenReturn(asList(TestCustomer.xxx, TestCustomer.yyy)); + + // when + mockMvc.perform(MockMvcRequestBuilders + .get("/api/customers") + .header("current-user", "mike@hostsharing.net") + .accept(MediaType.APPLICATION_JSON)) + + // then + .andExpect(status().isOk()) + .andExpect(jsonPath("$", hasSize(2))) + .andExpect(jsonPath("$[0].prefix", is(TestCustomer.xxx.getPrefix()))) + .andExpect(jsonPath("$[1].reference", is(TestCustomer.yyy.getReference()))); + } + + @Test + void apiCustomersWillReturnMatchingCustomersFromRepositoryIfCriteriaGiven() throws Exception { + + // given + when(customerRepositoryMock.findCustomerByOptionalPrefixLike("x")).thenReturn(asList(TestCustomer.xxx)); + + // when + mockMvc.perform(MockMvcRequestBuilders + .get("/api/customers") + .header("current-user", "mike@hostsharing.net") + .param("prefix", "x") + .accept(MediaType.APPLICATION_JSON)) + + // then + .andExpect(status().isOk()) + .andExpect(jsonPath("$", hasSize(1))) + .andExpect(jsonPath("$[0].prefix", is(TestCustomer.xxx.getPrefix()))); + } +} diff --git a/src/test/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerControllerUnitTest.java b/src/test/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerControllerUnitTest.java new file mode 100644 index 00000000..3a5af0c7 --- /dev/null +++ b/src/test/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerControllerUnitTest.java @@ -0,0 +1,55 @@ +package net.hostsharing.hsadminng.hs.hscustomer; + +import net.hostsharing.hsadminng.context.Context; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +import static java.util.Arrays.asList; +import static java.util.Collections.singletonList; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.*; + +@ExtendWith(MockitoExtension.class) +class CustomerControllerUnitTest { + + @Mock + Context contextMock; + @Mock + CustomerRepository customerRepositoryMock; + + @InjectMocks + CustomerController customerController; + + @Test + void apiCustomersWillReturnCustomersFromRepository() throws Exception { + + // given + when(customerRepositoryMock.findCustomerByOptionalPrefixLike(null)).thenReturn(asList(TestCustomer.xxx, TestCustomer.yyy)); + + // when + final var pacs = customerController.listCustomers("mike@hostsharing.net", null, null); + + // then + assertThat(pacs).hasSize(2); + verify(contextMock).setCurrentUser("mike@hostsharing.net"); + verify(contextMock, never()).assumeRoles(any()); + } + + @Test + void findAllWithAssumedCustomerAdminRole() throws Exception { + + // given + when(customerRepositoryMock.findCustomerByOptionalPrefixLike(null)).thenReturn(singletonList(TestCustomer.yyy)); + + // when + final var pacs = customerController.listCustomers("mike@hostsharing.net", "customer#yyy.admin", null); + + // then + assertThat(pacs).hasSize(1); + verify(contextMock).setCurrentUser("mike@hostsharing.net"); + verify(contextMock).assumeRoles("customer#yyy.admin"); + } +} diff --git a/src/test/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerRepositoryIntegrationTest.java new file mode 100644 index 00000000..75691819 --- /dev/null +++ b/src/test/java/net/hostsharing/hsadminng/hs/hscustomer/CustomerRepositoryIntegrationTest.java @@ -0,0 +1,240 @@ +package net.hostsharing.hsadminng.hs.hscustomer; + +import net.hostsharing.hsadminng.context.Context; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.orm.jpa.JpaSystemException; + +import javax.persistence.EntityManager; +import javax.persistence.PersistenceException; +import javax.transaction.Transactional; +import java.util.List; +import java.util.UUID; + +import static net.hostsharing.test.JpaAttempt.attempt; +import static org.assertj.core.api.Assertions.assertThat; + +@DataJpaTest +@ComponentScan(basePackageClasses = { Context.class, CustomerRepository.class }) +class CustomerRepositoryIntegrationTest { + + @Autowired + Context context; + + @Autowired + CustomerRepository customerRepository; + + @Autowired EntityManager em; + + @Nested + class CreateCustomer { + + @Test + public void hostsharingAdmin_withoutAssumedRole_canCreateNewCustomer() { + // given + currentUser("mike@hostsharing.net"); + + // when + + final var attempt = attempt(em, () -> { + final var newCustomer = new CustomerEntity( + UUID.randomUUID(), "xxx", 90001, "admin@xxx.example.com"); + return customerRepository.save(newCustomer); + }); + + // then + assertThat(attempt.wasSuccessful()).isTrue(); + assertThat(attempt.returnedResult()).isNotNull().extracting(CustomerEntity::getUuid).isNotNull(); + assertThatCustomerIsPersisted(attempt.returnedResult()); + } + + @Test + public void hostsharingAdmin_withAssumedCustomerRole_cannotCreateNewCustomer() { + // given + currentUser("mike@hostsharing.net"); + assumedRoles("customer#aaa.admin"); + + // when + final var attempt = attempt(em, () -> { + final var newCustomer = new CustomerEntity( + UUID.randomUUID(), "xxx", 90001, "admin@xxx.example.com"); + return customerRepository.save(newCustomer); + }); + + // then + attempt.assertExceptionWithRootCauseMessage( + PersistenceException.class, + "add-customer not permitted for customer#aaa.admin"); + } + + @Test + public void customerAdmin_withoutAssumedRole_cannotCreateNewCustomer() { + // given + currentUser("admin@aaa.example.com"); + + // when + final var attempt = attempt(em, () -> { + final var newCustomer = new CustomerEntity( + UUID.randomUUID(), "yyy", 90002, "admin@yyy.example.com"); + return customerRepository.save(newCustomer); + }); + + // then + attempt.assertExceptionWithRootCauseMessage( + PersistenceException.class, + "add-customer not permitted for admin@aaa.example.com"); + + } + + private void assertThatCustomerIsPersisted(final CustomerEntity saved) { + final var found = customerRepository.findByUuid(saved.getUuid()); + assertThat(found).isNotEmpty().get().usingRecursiveComparison().isEqualTo(saved); + } + } + + @Nested + class FindAllCustomers { + + @Test + public void hostsharingAdmin_withoutAssumedRole_canViewAllCustomers() { + // given + currentUser("mike@hostsharing.net"); + + // when + final var result = customerRepository.findCustomerByOptionalPrefixLike(null); + + // then + exactlyTheseCustomersAreReturned(result, "aaa", "aab", "aac"); + } + + @Test + public void hostsharingAdmin_withAssumedHostsharingAdminRole_canViewAllCustomers() { + given: + currentUser("mike@hostsharing.net"); + assumedRoles("global#hostsharing.admin"); + + // when + final var result = customerRepository.findCustomerByOptionalPrefixLike(null); + + then: + exactlyTheseCustomersAreReturned(result, "aaa", "aab", "aac"); + } + + @Test + public void customerAdmin_withoutAssumedRole_canViewOnlyItsOwnCustomer() { + // given: + currentUser("admin@aaa.example.com"); + + // when: + final var result = customerRepository.findCustomerByOptionalPrefixLike(null); + + // then: + exactlyTheseCustomersAreReturned(result, "aaa"); + } + + @Test + public void customerAdmin_withAssumedOwnedPackageAdminRole_canViewOnlyItsOwnCustomer() { + currentUser("admin@aaa.example.com"); + assumedRoles("package#aaa00.admin"); + + final var result = customerRepository.findCustomerByOptionalPrefixLike(null); + + exactlyTheseCustomersAreReturned(result, "aaa"); + } + + @Test + public void customerAdmin_withAssumedAlienPackageAdminRole_cannotViewAnyCustomer() { + // given: + currentUser("admin@aaa.example.com"); + assumedRoles("package#aab00.admin"); + + // when + final var attempt = attempt( + em, + () -> customerRepository.findCustomerByOptionalPrefixLike(null)); + + // then + attempt.assertExceptionWithRootCauseMessage( + JpaSystemException.class, + "user admin@aaa.example.com .* has no permission to assume role package#aab00#admin"); + } + + @Test + void unknownUser_withoutAssumedRole_cannotViewAnyCustomers() { + currentUser("unknown@example.org"); + + final var attempt = attempt( + em, + () -> customerRepository.findCustomerByOptionalPrefixLike(null)); + + attempt.assertExceptionWithRootCauseMessage( + JpaSystemException.class, + "hsadminng.currentUser defined as unknown@example.org, but does not exists"); + } + + @Test + @Transactional + void unknownUser_withAssumedCustomerRole_cannotViewAnyCustomers() { + currentUser("unknown@example.org"); + assumedRoles("customer#aaa.admin"); + + final var attempt = attempt( + em, + () -> customerRepository.findCustomerByOptionalPrefixLike(null)); + + attempt.assertExceptionWithRootCauseMessage( + JpaSystemException.class, + "hsadminng.currentUser defined as unknown@example.org, but does not exists"); + } + + } + + @Nested + class FindByPrefixLike { + + @Test + public void hostsharingAdmin_withoutAssumedRole_canViewAllCustomers() { + // given + currentUser("mike@hostsharing.net"); + + // when + final var result = customerRepository.findCustomerByOptionalPrefixLike("aab"); + + // then + exactlyTheseCustomersAreReturned(result, "aab"); + } + + @Test + public void customerAdmin_withoutAssumedRole_canViewOnlyItsOwnCustomer() { + // given: + currentUser("admin@aaa.example.com"); + + // when: + final var result = customerRepository.findCustomerByOptionalPrefixLike("aab"); + + // then: + exactlyTheseCustomersAreReturned(result); + } + } + + void currentUser(final String currentUser) { + context.setCurrentUser(currentUser); + assertThat(context.getCurrentUser()).as("precondition").isEqualTo(currentUser); + } + + void assumedRoles(final String assumedRoles) { + context.assumeRoles(assumedRoles); + assertThat(context.getAssumedRoles()).as("precondition").containsExactly(assumedRoles.split(";")); + } + + void exactlyTheseCustomersAreReturned(final List actualResult, final String... customerPrefixes) { + assertThat(actualResult) + .hasSize(customerPrefixes.length) + .extracting(CustomerEntity::getPrefix) + .containsExactlyInAnyOrder(customerPrefixes); + } + +} diff --git a/src/test/java/net/hostsharing/hsadminng/hs/hscustomer/TestCustomer.java b/src/test/java/net/hostsharing/hsadminng/hs/hscustomer/TestCustomer.java new file mode 100644 index 00000000..c92cad82 --- /dev/null +++ b/src/test/java/net/hostsharing/hsadminng/hs/hscustomer/TestCustomer.java @@ -0,0 +1,15 @@ +package net.hostsharing.hsadminng.hs.hscustomer; + + +import static java.util.UUID.randomUUID; + +public class TestCustomer { + + public static final CustomerEntity xxx = hsCustomer("xxx", 10001, "xxx@example.com"); + static final CustomerEntity yyy = hsCustomer("yyy", 10002, "yyy@example.com"); + + + static public CustomerEntity hsCustomer(final String prefix, final int reference, final String adminName) { + return new CustomerEntity(randomUUID(), prefix, reference, adminName); + } +} diff --git a/src/test/java/net/hostsharing/hsadminng/hs/hspackage/PackageControllerRestTest.java b/src/test/java/net/hostsharing/hsadminng/hs/hspackage/PackageControllerRestTest.java new file mode 100644 index 00000000..92ebd1ef --- /dev/null +++ b/src/test/java/net/hostsharing/hsadminng/hs/hspackage/PackageControllerRestTest.java @@ -0,0 +1,78 @@ +package net.hostsharing.hsadminng.hs.hspackage; + +import net.hostsharing.hsadminng.context.Context; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.MediaType; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; + +import java.util.List; + +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +@WebMvcTest(PackageController.class) +class PackageControllerRestTest { + + @Autowired + MockMvc mockMvc; + @MockBean + Context contextMock; + @MockBean + PackageRepository packageRepositoryMock; + + @Test + void listPackagesWithoutNameParameter() throws Exception { + + // given + final var givenPacs = List.of(TestPackage.xxx00, TestPackage.xxx01, TestPackage.xxx02); + when(packageRepositoryMock.findAllByOptionalNameLike(null)).thenReturn(givenPacs); + + // when + final var pacs = mockMvc.perform(MockMvcRequestBuilders + .get("/api/packages") + .header("current-user", "mike@hostsharing.net") + .header("assumed-roles", "customer#xxx.admin") + .accept(MediaType.APPLICATION_JSON)) + + // then + .andExpect(status().isOk()) + .andExpect(jsonPath("$", hasSize(3))) + .andExpect(jsonPath("$[0].name", is("xxx00"))) + .andExpect(jsonPath("$[1].uuid", is(TestPackage.xxx01.getUuid().toString()))) + .andExpect(jsonPath("$[2].customer.prefix", is("xxx"))); + + verify(contextMock).setCurrentUser("mike@hostsharing.net"); + verify(contextMock).assumeRoles("customer#xxx.admin"); + } + + @Test + void listPackagesWithNameParameter() throws Exception { + + // given + final var givenPacs = List.of(TestPackage.xxx01); + when(packageRepositoryMock.findAllByOptionalNameLike("xxx01")).thenReturn(givenPacs); + + // when + final var pacs = mockMvc.perform(MockMvcRequestBuilders + .get("/api/packages?name=xxx01") + .header("current-user", "mike@hostsharing.net") + .header("assumed-roles", "customer#xxx.admin") + .accept(MediaType.APPLICATION_JSON)) + + // then + .andExpect(status().isOk()) + .andExpect(jsonPath("$", hasSize(1))) + .andExpect(jsonPath("$[0].name", is("xxx01"))); + + verify(contextMock).setCurrentUser("mike@hostsharing.net"); + verify(contextMock).assumeRoles("customer#xxx.admin"); + } +} diff --git a/src/test/java/net/hostsharing/hsadminng/hs/hspackage/TestPackage.java b/src/test/java/net/hostsharing/hsadminng/hs/hspackage/TestPackage.java new file mode 100644 index 00000000..f2fde56f --- /dev/null +++ b/src/test/java/net/hostsharing/hsadminng/hs/hspackage/TestPackage.java @@ -0,0 +1,17 @@ +package net.hostsharing.hsadminng.hs.hspackage; + +import net.hostsharing.hsadminng.hs.hscustomer.CustomerEntity; +import net.hostsharing.hsadminng.hs.hscustomer.TestCustomer; + +import static java.util.UUID.randomUUID; + +public class TestPackage { + + public static final PackageEntity xxx00 = hsPackage(TestCustomer.xxx, "xxx00"); + public static final PackageEntity xxx01 = hsPackage(TestCustomer.xxx, "xxx01"); + public static final PackageEntity xxx02 = hsPackage(TestCustomer.xxx, "xxx02"); + + public static PackageEntity hsPackage(final CustomerEntity customer, final String name) { + return new PackageEntity(randomUUID(), name, customer); + } +} diff --git a/src/test/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleControllerRestTest.java b/src/test/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleControllerRestTest.java new file mode 100644 index 00000000..f80599d3 --- /dev/null +++ b/src/test/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleControllerRestTest.java @@ -0,0 +1,54 @@ +package net.hostsharing.hsadminng.rbac.rbacrole; + +import net.hostsharing.hsadminng.context.Context; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.MediaType; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; + +import static java.util.Arrays.asList; +import static net.hostsharing.hsadminng.rbac.rbacrole.TestRbacRole.*; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.mockito.Mockito.when; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +@WebMvcTest(RbacRoleController.class) +class RbacRoleControllerRestTest { + + @Autowired + MockMvc mockMvc; + @MockBean + Context contextMock; + @MockBean + RbacRoleRepository rbacRoleRepository; + + @Test + void apiCustomersWillReturnCustomersFromRepository() throws Exception { + + // given + when(rbacRoleRepository.findAll()).thenReturn( + asList(hostmasterRole, customerXxxOwner, customerXxxAdmin)); + + // when + mockMvc.perform(MockMvcRequestBuilders + .get("/api/rbacroles") + .header("current-user", "mike@hostsharing.net") + .accept(MediaType.APPLICATION_JSON)) + + // then + .andExpect(status().isOk()) + .andExpect(jsonPath("$", hasSize(3))) + .andExpect(jsonPath("$[0].roleName", is("global#hostsharing.admin"))) + .andExpect(jsonPath("$[1].roleName", is("customer#xxx.owner"))) + .andExpect(jsonPath("$[2].roleName", is("customer#xxx.admin"))) + .andExpect(jsonPath("$[2].uuid", is(customerXxxAdmin.getUuid().toString()))) + .andExpect(jsonPath("$[2].objectUuid", is(customerXxxAdmin.getObjectUuid().toString()))) + .andExpect(jsonPath("$[2].objectTable", is(customerXxxAdmin.getObjectTable().toString()))) + .andExpect(jsonPath("$[2].objectIdName", is(customerXxxAdmin.getObjectIdName().toString()))); + } +} diff --git a/src/test/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleRepositoryIntegrationTest.java new file mode 100644 index 00000000..5542bb9f --- /dev/null +++ b/src/test/java/net/hostsharing/hsadminng/rbac/rbacrole/RbacRoleRepositoryIntegrationTest.java @@ -0,0 +1,169 @@ +package net.hostsharing.hsadminng.rbac.rbacrole; + +import net.hostsharing.hsadminng.context.Context; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.orm.jpa.JpaSystemException; + +import javax.persistence.EntityManager; +import javax.transaction.Transactional; + +import static net.hostsharing.test.JpaAttempt.attempt; +import static org.assertj.core.api.Assertions.assertThat; + +@DataJpaTest +@ComponentScan(basePackageClasses = { Context.class, RbacRoleRepository.class }) +class RbacRoleRepositoryIntegrationTest { + + @Autowired + Context context; + + @Autowired + RbacRoleRepository rbacRoleRepository; + + @Autowired EntityManager em; + + @Nested + class FindAllRbacRoles { + + private static final String[] ALL_TEST_DATA_ROLES = new String[] { + // @formatter:off + "global#hostsharing.admin", + "customer#aaa.admin", "customer#aaa.owner", "customer#aaa.tenant", + "package#aaa00.admin", "package#aaa00.owner", "package#aaa00.tenant", + "package#aaa01.admin", "package#aaa01.owner", "package#aaa01.tenant", + "package#aaa02.admin", "package#aaa02.owner", "package#aaa02.tenant", + "customer#aab.admin", "customer#aab.owner", "customer#aab.tenant", + "package#aab00.admin", "package#aab00.owner", "package#aab00.tenant", + "package#aab01.admin", "package#aab01.owner", "package#aab01.tenant", + "package#aab02.admin", "package#aab02.owner", "package#aab02.tenant", + "customer#aac.admin", "customer#aac.owner", "customer#aac.tenant", + "package#aac00.admin", "package#aac00.owner", "package#aac00.tenant", + "package#aac01.admin", "package#aac01.owner", "package#aac01.tenant", + "package#aac02.admin", "package#aac02.owner", "package#aac02.tenant" + // @formatter:on + }; + + @Test + public void hostsharingAdmin_withoutAssumedRole_canViewAllRbacRoles() { + // given + currentUser("mike@hostsharing.net"); + + // when + final var result = rbacRoleRepository.findAll(); + + // then + exactlyTheseRbacRolesAreReturned(result, ALL_TEST_DATA_ROLES); + } + + @Test + public void hostsharingAdmin_withAssumedHostsharingAdminRole_canViewAllRbacRoles() { + given: + currentUser("mike@hostsharing.net"); + assumedRoles("global#hostsharing.admin"); + + // when + final var result = rbacRoleRepository.findAll(); + + then: + exactlyTheseRbacRolesAreReturned(result, ALL_TEST_DATA_ROLES); + } + + @Test + public void RbacRoleAdmin_withoutAssumedRole_canViewOnlyItsOwnRbacRole() { + // given: + currentUser("admin@aaa.example.com"); + + // when: + final var result = rbacRoleRepository.findAll(); + + // then: + exactlyTheseRbacRolesAreReturned( + result, + // @formatter:off + "customer#aaa.admin", "customer#aaa.tenant", + "package#aaa00.admin", "package#aaa00.owner", "package#aaa00.tenant", + "package#aaa01.admin", "package#aaa01.owner", "package#aaa01.tenant", + "package#aaa02.admin", "package#aaa02.owner", "package#aaa02.tenant" + // @formatter:on + ); + } + + @Test + public void RbacRoleAdmin_withAssumedOwnedPackageAdminRole_canViewOnlyItsOwnRbacRole() { + currentUser("admin@aaa.example.com"); + assumedRoles("package#aaa00.admin"); + + final var result = rbacRoleRepository.findAll(); + + exactlyTheseRbacRolesAreReturned(result, "customer#aaa.tenant", "package#aaa00.tenant", "package#aaa00.admin"); + } + + @Test + public void RbacRoleAdmin_withAssumedAlienPackageAdminRole_cannotViewAnyRbacRole() { + // given: + currentUser("admin@aaa.example.com"); + assumedRoles("package#aab00.admin"); + + // when + final var attempt = attempt( + em, + () -> rbacRoleRepository.findAll()); + + // then + attempt.assertExceptionWithRootCauseMessage( + JpaSystemException.class, + "user admin@aaa.example.com .* has no permission to assume role package#aab00#admin"); + } + + @Test + void unknownUser_withoutAssumedRole_cannotViewAnyRbacRoles() { + currentUser("unknown@example.org"); + + final var attempt = attempt( + em, + () -> rbacRoleRepository.findAll()); + + attempt.assertExceptionWithRootCauseMessage( + JpaSystemException.class, + "hsadminng.currentUser defined as unknown@example.org, but does not exists"); + } + + @Test + @Transactional + void unknownUser_withAssumedRbacRoleRole_cannotViewAnyRbacRoles() { + currentUser("unknown@example.org"); + assumedRoles("RbacRole#aaa.admin"); + + final var attempt = attempt( + em, + () -> rbacRoleRepository.findAll()); + + attempt.assertExceptionWithRootCauseMessage( + JpaSystemException.class, + "hsadminng.currentUser defined as unknown@example.org, but does not exists"); + } + + } + + void currentUser(final String currentUser) { + context.setCurrentUser(currentUser); + assertThat(context.getCurrentUser()).as("precondition").isEqualTo(currentUser); + } + + void assumedRoles(final String assumedRoles) { + context.assumeRoles(assumedRoles); + assertThat(context.getAssumedRoles()).as("precondition").containsExactly(assumedRoles.split(";")); + } + + void exactlyTheseRbacRolesAreReturned(final Iterable actualResult, final String... rbacRoleNames) { + assertThat(actualResult) + //.hasSize(rbacRoleNames.length) + .extracting(RbacRoleEntity::getRoleName) + .containsExactlyInAnyOrder(rbacRoleNames); + } + +} diff --git a/src/test/java/net/hostsharing/hsadminng/rbac/rbacrole/TestRbacRole.java b/src/test/java/net/hostsharing/hsadminng/rbac/rbacrole/TestRbacRole.java new file mode 100644 index 00000000..cabb96b3 --- /dev/null +++ b/src/test/java/net/hostsharing/hsadminng/rbac/rbacrole/TestRbacRole.java @@ -0,0 +1,14 @@ +package net.hostsharing.hsadminng.rbac.rbacrole; + +import static java.util.UUID.randomUUID; + +public class TestRbacRole { + + public static final RbacRoleEntity hostmasterRole = rbacRole("global", "hostsharing", RbacRoleType.admin); + static final RbacRoleEntity customerXxxOwner = rbacRole("customer", "xxx", RbacRoleType.owner); + static final RbacRoleEntity customerXxxAdmin = rbacRole("customer", "xxx", RbacRoleType.admin); + + static public RbacRoleEntity rbacRole(final String objectTable, final String objectIdName, final RbacRoleType roleType) { + return new RbacRoleEntity(randomUUID(), randomUUID(), objectTable, objectIdName, roleType, objectTable+'#'+objectIdName+'.'+roleType); + } +} diff --git a/src/test/java/net/hostsharing/test/JpaAttempt.java b/src/test/java/net/hostsharing/test/JpaAttempt.java new file mode 100644 index 00000000..358b1a6e --- /dev/null +++ b/src/test/java/net/hostsharing/test/JpaAttempt.java @@ -0,0 +1,79 @@ +package net.hostsharing.test; + +import junit.framework.AssertionFailedError; +import org.springframework.core.NestedExceptionUtils; + +import javax.persistence.EntityManager; +import java.util.Optional; +import java.util.function.Supplier; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Wraps the 'when' part of a DataJpaTest to improve readability of tests. + *

+ * It + * - makes sure that the SQL code is actually performed (em.flush()), + * - if any exception is throw, it's caught and stored, + * - makes the result available for assertions, + * - cleans the JPA first level cache to force assertions read from the database, not just cache, + * - offers some assertions based on the exception. + * * + * + * @param success result type + */ +public class JpaAttempt { + + private T result = null; + private RuntimeException exception = null; + + private String firstRootCauseMessageLineOf(final RuntimeException exception) { + final var rootCause = NestedExceptionUtils.getRootCause(exception); + return Optional.ofNullable(rootCause) + .map(Throwable::getMessage) + .map(message -> message.split("\\r|\\n|\\r\\n", 0)[0]) + .orElse(null); + } + + public static JpaAttempt attempt(final EntityManager em, final Supplier code) { + return new JpaAttempt<>(em, code); + } + + public JpaAttempt(final EntityManager em, final Supplier code) { + try { + result = code.get(); + em.flush(); + em.clear(); + } catch (RuntimeException exc) { + exception = exc; + } + } + + public boolean wasSuccessful() { + return exception == null; + } + + public T returnedResult() { + return result; + } + + public RuntimeException caughtException() { + return exception; + } + + @SuppressWarnings("unchecked") + public E caughtException(final Class expectedExceptionClass) { + if (expectedExceptionClass.isAssignableFrom(exception.getClass())) { + return (E) exception; + } + throw new AssertionFailedError("expected " + expectedExceptionClass + " but got " + exception); + } + + public void assertExceptionWithRootCauseMessage( + final Class expectedExceptionClass, + final String expectedRootCauseMessage) { + assertThat( + firstRootCauseMessageLineOf(caughtException(expectedExceptionClass))) + .matches(".*" + expectedRootCauseMessage + ".*"); + } +} diff --git a/src/test/java/org/hostsharing/hsadminng/config/WebConfigurerTest.java b/src/test/java/org/hostsharing/hsadminng/config/WebConfigurerTest.java deleted file mode 100644 index bd2b6447..00000000 --- a/src/test/java/org/hostsharing/hsadminng/config/WebConfigurerTest.java +++ /dev/null @@ -1,193 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.*; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.options; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -import io.github.jhipster.config.JHipsterConstants; -import io.github.jhipster.config.JHipsterProperties; -import io.github.jhipster.web.filter.CachingHttpHeadersFilter; -import io.undertow.Undertow; -import io.undertow.Undertow.Builder; -import io.undertow.UndertowOptions; - -import org.apache.commons.io.FilenameUtils; -import org.h2.server.web.WebServlet; -import org.junit.Before; -import org.junit.Test; -import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; -import org.springframework.http.HttpHeaders; -import org.springframework.mock.env.MockEnvironment; -import org.springframework.mock.web.MockServletContext; -import org.springframework.test.util.ReflectionTestUtils; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.xnio.OptionMap; - -import java.util.*; - -import javax.servlet.*; - -/** - * Unit tests for the WebConfigurer class. - * - * @see WebConfigurer - */ -public class WebConfigurerTest { - - private WebConfigurer webConfigurer; - - private MockServletContext servletContext; - - private MockEnvironment env; - - private JHipsterProperties props; - - @Before - public void setup() { - servletContext = spy(new MockServletContext()); - doReturn(mock(FilterRegistration.Dynamic.class)) - .when(servletContext) - .addFilter(anyString(), any(Filter.class)); - doReturn(mock(ServletRegistration.Dynamic.class)) - .when(servletContext) - .addServlet(anyString(), any(Servlet.class)); - - env = new MockEnvironment(); - props = new JHipsterProperties(); - - webConfigurer = new WebConfigurer(env, props); - } - - @Test - public void testStartUpProdServletContext() throws ServletException { - env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); - webConfigurer.onStartup(servletContext); - - verify(servletContext).addFilter(eq("cachingHttpHeadersFilter"), any(CachingHttpHeadersFilter.class)); - verify(servletContext, never()).addServlet(eq("H2Console"), any(WebServlet.class)); - } - - @Test - public void testStartUpDevServletContext() throws ServletException { - env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT); - webConfigurer.onStartup(servletContext); - - verify(servletContext, never()).addFilter(eq("cachingHttpHeadersFilter"), any(CachingHttpHeadersFilter.class)); - verify(servletContext).addServlet(eq("H2Console"), any(WebServlet.class)); - } - - @Test - public void testCustomizeServletContainer() { - env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); - UndertowServletWebServerFactory container = new UndertowServletWebServerFactory(); - webConfigurer.customize(container); - assertThat(container.getMimeMappings().get("abs")).isEqualTo("audio/x-mpeg"); - assertThat(container.getMimeMappings().get("html")).isEqualTo("text/html;charset=utf-8"); - assertThat(container.getMimeMappings().get("json")).isEqualTo("text/html;charset=utf-8"); - if (container.getDocumentRoot() != null) { - assertThat(container.getDocumentRoot().getPath()).isEqualTo(FilenameUtils.separatorsToSystem("build/www")); - } - - Builder builder = Undertow.builder(); - container.getBuilderCustomizers().forEach(c -> c.customize(builder)); - OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); - assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isNull(); - } - - @Test - public void testUndertowHttp2Enabled() { - props.getHttp().setVersion(JHipsterProperties.Http.Version.V_2_0); - UndertowServletWebServerFactory container = new UndertowServletWebServerFactory(); - webConfigurer.customize(container); - Builder builder = Undertow.builder(); - container.getBuilderCustomizers().forEach(c -> c.customize(builder)); - OptionMap.Builder serverOptions = (OptionMap.Builder) ReflectionTestUtils.getField(builder, "serverOptions"); - assertThat(serverOptions.getMap().get(UndertowOptions.ENABLE_HTTP2)).isTrue(); - } - - @Test - public void testCorsFilterOnApiPath() throws Exception { - props.getCors().setAllowedOrigins(Collections.singletonList("*")); - props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); - props.getCors().setAllowedHeaders(Collections.singletonList("*")); - props.getCors().setMaxAge(1800L); - props.getCors().setAllowCredentials(true); - - MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) - .addFilters(webConfigurer.corsFilter()) - .build(); - - mockMvc.perform( - options("/api/test-cors") - .header(HttpHeaders.ORIGIN, "other.domain.com") - .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "POST")) - .andExpect(status().isOk()) - .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")) - .andExpect(header().string(HttpHeaders.VARY, "Origin")) - .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET,POST,PUT,DELETE")) - .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true")) - .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_MAX_AGE, "1800")); - - mockMvc.perform( - get("/api/test-cors") - .header(HttpHeaders.ORIGIN, "other.domain.com")) - .andExpect(status().isOk()) - .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")); - } - - @Test - public void testCorsFilterOnOtherPath() throws Exception { - props.getCors().setAllowedOrigins(Collections.singletonList("*")); - props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); - props.getCors().setAllowedHeaders(Collections.singletonList("*")); - props.getCors().setMaxAge(1800L); - props.getCors().setAllowCredentials(true); - - MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) - .addFilters(webConfigurer.corsFilter()) - .build(); - - mockMvc.perform( - get("/test/test-cors") - .header(HttpHeaders.ORIGIN, "other.domain.com")) - .andExpect(status().isOk()) - .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); - } - - @Test - public void testCorsFilterDeactivated() throws Exception { - props.getCors().setAllowedOrigins(null); - - MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) - .addFilters(webConfigurer.corsFilter()) - .build(); - - mockMvc.perform( - get("/api/test-cors") - .header(HttpHeaders.ORIGIN, "other.domain.com")) - .andExpect(status().isOk()) - .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); - } - - @Test - public void testCorsFilterDeactivated2() throws Exception { - props.getCors().setAllowedOrigins(new ArrayList<>()); - - MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) - .addFilters(webConfigurer.corsFilter()) - .build(); - - mockMvc.perform( - get("/api/test-cors") - .header(HttpHeaders.ORIGIN, "other.domain.com")) - .andExpect(status().isOk()) - .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/config/WebConfigurerTestController.java b/src/test/java/org/hostsharing/hsadminng/config/WebConfigurerTestController.java deleted file mode 100644 index c866cd51..00000000 --- a/src/test/java/org/hostsharing/hsadminng/config/WebConfigurerTestController.java +++ /dev/null @@ -1,17 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class WebConfigurerTestController { - - @GetMapping("/api/test-cors") - public void testCorsOnApiPath() { - } - - @GetMapping("/test/test-cors") - public void testCorsOnOtherPath() { - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/config/timezone/HibernateTimeZoneTest.java b/src/test/java/org/hostsharing/hsadminng/config/timezone/HibernateTimeZoneTest.java deleted file mode 100644 index bc81adb9..00000000 --- a/src/test/java/org/hostsharing/hsadminng/config/timezone/HibernateTimeZoneTest.java +++ /dev/null @@ -1,178 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.config.timezone; - -import static java.lang.String.format; -import static org.assertj.core.api.Assertions.assertThat; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.repository.timezone.DateTimeWrapper; -import org.hostsharing.hsadminng.repository.timezone.DateTimeWrapperRepository; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.jdbc.support.rowset.SqlRowSet; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.transaction.annotation.Transactional; - -import java.time.*; -import java.time.format.DateTimeFormatter; - -/** - * Unit tests for the UTC Hibernate configuration. - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class HibernateTimeZoneTest { - - @Autowired - private DateTimeWrapperRepository dateTimeWrapperRepository; - @Autowired - private JdbcTemplate jdbcTemplate; - - private DateTimeWrapper dateTimeWrapper; - private DateTimeFormatter dateTimeFormatter; - private DateTimeFormatter timeFormatter; - private DateTimeFormatter dateFormatter; - - @Before - public void setup() { - dateTimeWrapper = new DateTimeWrapper(); - dateTimeWrapper.setInstant(Instant.parse("2014-11-12T05:50:00.0Z")); - dateTimeWrapper.setLocalDateTime(LocalDateTime.parse("2014-11-12T07:50:00.0")); - dateTimeWrapper.setOffsetDateTime(OffsetDateTime.parse("2011-12-14T08:30:00.0Z")); - dateTimeWrapper.setZonedDateTime(ZonedDateTime.parse("2011-12-14T08:30:00.0Z")); - dateTimeWrapper.setLocalTime(LocalTime.parse("14:30:00")); - dateTimeWrapper.setOffsetTime(OffsetTime.parse("14:30:00+02:00")); - dateTimeWrapper.setLocalDate(LocalDate.parse("2016-09-10")); - - dateTimeFormatter = DateTimeFormatter - .ofPattern("yyyy-MM-dd HH:mm:ss.S") - .withZone(ZoneId.of("UTC")); - - timeFormatter = DateTimeFormatter - .ofPattern("HH:mm:ss") - .withZone(ZoneId.of("UTC")); - - dateFormatter = DateTimeFormatter - .ofPattern("yyyy-MM-dd"); - } - - @Test - @Transactional - public void storeInstantWithUtcConfigShouldBeStoredOnGMTTimeZone() { - dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); - - String request = generateSqlRequest("instant", dateTimeWrapper.getId()); - SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); - String expectedValue = dateTimeFormatter.format(dateTimeWrapper.getInstant()); - - assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); - } - - @Test - @Transactional - public void storeLocalDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() { - dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); - - String request = generateSqlRequest("local_date_time", dateTimeWrapper.getId()); - SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); - String expectedValue = dateTimeWrapper - .getLocalDateTime() - .atZone(ZoneId.systemDefault()) - .format(dateTimeFormatter); - - assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); - } - - @Test - @Transactional - public void storeOffsetDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() { - dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); - - String request = generateSqlRequest("offset_date_time", dateTimeWrapper.getId()); - SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); - String expectedValue = dateTimeWrapper - .getOffsetDateTime() - .format(dateTimeFormatter); - - assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); - } - - @Test - @Transactional - public void storeZoneDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() { - dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); - - String request = generateSqlRequest("zoned_date_time", dateTimeWrapper.getId()); - SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); - String expectedValue = dateTimeWrapper - .getZonedDateTime() - .format(dateTimeFormatter); - - assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); - } - - @Test - @Transactional - public void storeLocalTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() { - dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); - - String request = generateSqlRequest("local_time", dateTimeWrapper.getId()); - SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); - String expectedValue = dateTimeWrapper - .getLocalTime() - .atDate(LocalDate.of(1970, Month.JANUARY, 1)) - .atZone(ZoneId.systemDefault()) - .format(timeFormatter); - - assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); - } - - @Test - @Transactional - public void storeOffsetTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() { - dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); - - String request = generateSqlRequest("offset_time", dateTimeWrapper.getId()); - SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); - String expectedValue = dateTimeWrapper - .getOffsetTime() - .toLocalTime() - .atDate(LocalDate.of(1970, Month.JANUARY, 1)) - .atZone(ZoneId.systemDefault()) - .format(timeFormatter); - - assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); - } - - @Test - @Transactional - public void storeLocalDateWithUtcConfigShouldBeStoredWithoutTransformation() { - dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); - - String request = generateSqlRequest("local_date", dateTimeWrapper.getId()); - SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); - String expectedValue = dateTimeWrapper - .getLocalDate() - .format(dateFormatter); - - assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); - } - - private String generateSqlRequest(String fieldName, long id) { - return format("SELECT %s FROM jhi_date_time_wrapper where id=%d", fieldName, id); - } - - private void assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(SqlRowSet sqlRowSet, String expectedValue) { - while (sqlRowSet.next()) { - String dbValue = sqlRowSet.getString(1); - - assertThat(dbValue).isNotNull(); - assertThat(dbValue).isEqualTo(expectedValue); - } - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/cucumber/CucumberContextConfiguration.java b/src/test/java/org/hostsharing/hsadminng/cucumber/CucumberContextConfiguration.java deleted file mode 100644 index 09ebc4bc..00000000 --- a/src/test/java/org/hostsharing/hsadminng/cucumber/CucumberContextConfiguration.java +++ /dev/null @@ -1,23 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.cucumber; - -import org.hostsharing.hsadminng.HsadminNgApp; - -import cucumber.api.java.Before; - -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.web.WebAppConfiguration; - -@SpringBootTest -@WebAppConfiguration -@ContextConfiguration(classes = HsadminNgApp.class) -public class CucumberContextConfiguration { - - @Before - public void setup_cucumber_spring_context() { - // Dummy method so cucumber will recognize this class as glue - // and use its context configuration. - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/cucumber/CucumberTest.java b/src/test/java/org/hostsharing/hsadminng/cucumber/CucumberTest.java deleted file mode 100644 index 5d292157..00000000 --- a/src/test/java/org/hostsharing/hsadminng/cucumber/CucumberTest.java +++ /dev/null @@ -1,13 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.cucumber; - -import cucumber.api.CucumberOptions; -import cucumber.api.junit.Cucumber; - -import org.junit.runner.RunWith; - -@RunWith(Cucumber.class) -@CucumberOptions(plugin = "pretty", features = "src/test/features") -public class CucumberTest { - -} diff --git a/src/test/java/org/hostsharing/hsadminng/cucumber/stepdefs/StepDefs.java b/src/test/java/org/hostsharing/hsadminng/cucumber/stepdefs/StepDefs.java deleted file mode 100644 index 1d0ea7a4..00000000 --- a/src/test/java/org/hostsharing/hsadminng/cucumber/stepdefs/StepDefs.java +++ /dev/null @@ -1,10 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.cucumber.stepdefs; - -import org.springframework.test.web.servlet.ResultActions; - -public abstract class StepDefs { - - protected ResultActions actions; - -} diff --git a/src/test/java/org/hostsharing/hsadminng/cucumber/stepdefs/UserStepDefs.java b/src/test/java/org/hostsharing/hsadminng/cucumber/stepdefs/UserStepDefs.java deleted file mode 100644 index fc5f77de..00000000 --- a/src/test/java/org/hostsharing/hsadminng/cucumber/stepdefs/UserStepDefs.java +++ /dev/null @@ -1,49 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.cucumber.stepdefs; - -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; - -import org.hostsharing.hsadminng.web.rest.UserResource; - -import cucumber.api.java.Before; -import cucumber.api.java.en.Then; -import cucumber.api.java.en.When; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; - -public class UserStepDefs extends StepDefs { - - @Autowired - private UserResource userResource; - - private MockMvc restUserMockMvc; - - @Before - public void setup() { - this.restUserMockMvc = MockMvcBuilders.standaloneSetup(userResource).build(); - } - - @When("I search user {string}") - public void i_search_user(String userId) throws Throwable { - actions = restUserMockMvc.perform( - get("/api/users/" + userId) - .accept(MediaType.APPLICATION_JSON)); - } - - @Then("the user is found") - public void the_user_is_found() throws Throwable { - actions - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)); - } - - @Then("his last name is {string}") - public void his_last_name_is(String lastName) throws Throwable { - actions.andExpect(jsonPath("$.lastName").value(lastName)); - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/liquibase/ReplaceCustomChangeUnitTest.java b/src/test/java/org/hostsharing/hsadminng/liquibase/ReplaceCustomChangeUnitTest.java deleted file mode 100644 index 53c971c8..00000000 --- a/src/test/java/org/hostsharing/hsadminng/liquibase/ReplaceCustomChangeUnitTest.java +++ /dev/null @@ -1,165 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.liquibase; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.ThrowableAssert.catchThrowable; -import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.verify; - -import liquibase.database.Database; -import liquibase.database.jvm.JdbcConnection; -import liquibase.exception.CustomChangeException; -import liquibase.exception.DatabaseException; -import liquibase.exception.SetupException; - -import com.google.common.base.VerifyException; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -import java.sql.SQLException; -import java.sql.Statement; - -public class ReplaceCustomChangeUnitTest { - - private static final String POSTGRES_DATABASE_PRODUCT_NAME = "PostgreSQL"; - private static final String H2_DATABASE_PRODUCT_NAME = "H2"; - - @Rule - public MockitoRule mockitoRule = MockitoJUnit.rule(); - - @Mock - private Database database; - - @Mock - private JdbcConnection connection; - - @Mock - private Statement statement; - - @Before - public void initMocks() throws DatabaseException { - given(database.getConnection()).willReturn(connection); - given(connection.getAutoCommit()).willReturn(false); - given(connection.createStatement()).willReturn(statement); - } - - @Test - public void updatesForPostgres() throws Exception { - // given - given(database.getDatabaseProductName()).willReturn(POSTGRES_DATABASE_PRODUCT_NAME); - final ReplaceCustomChange replaceCustomChange = givenReplaceCustomChange("some_table", "address,remark", "|", "\\n"); - - // when - replaceCustomChange.execute(database); - - // then - verify(statement).executeUpdate("UPDATE some_table SET address= replace(address, '|', E'\\n')"); - verify(statement).executeUpdate("UPDATE some_table SET remark= replace(remark, '|', E'\\n')"); - } - - @Test - public void updatesForH2() throws Exception { - // given - given(database.getDatabaseProductName()).willReturn(H2_DATABASE_PRODUCT_NAME); - final ReplaceCustomChange replaceCustomChange = givenReplaceCustomChange("some_table", "address,remark", "|", "\\n"); - - // when - replaceCustomChange.execute(database); - - // then - verify(statement).executeUpdate("UPDATE some_table SET address= replace(address, '|', STRINGDECODE('\\n'))"); - verify(statement).executeUpdate("UPDATE some_table SET remark= replace(remark, '|', STRINGDECODE('\\n'))"); - } - - @Test - public void getConfirmationMessage() throws Exception { - // given - final ReplaceCustomChange replaceCustomChange = givenReplaceCustomChange("some_table", "address,remark", "|", "\\n"); - - // when - final String actual = replaceCustomChange.getConfirmationMessage(); - - // then - assertThat(actual).isEqualTo("in table some_table / columns address,remark: replaced all '|' to '\\n'"); - } - - @Test - public void throwsValidationErrorIfAutoCommitIsOff() throws Exception { - // given - given(database.getDatabaseProductName()).willReturn(POSTGRES_DATABASE_PRODUCT_NAME); - final ReplaceCustomChange replaceCustomChange = givenReplaceCustomChange("some_table", "address,remark", "|", "\\n"); - given(connection.getAutoCommit()).willReturn(true); - - // when - final Throwable actual = catchThrowable(() -> replaceCustomChange.execute(database)); - - // then - assertThat(actual).isInstanceOf(VerifyException.class); - } - - @Test - public void onDatabaseExceptionThrowsCustomChangeException() throws Exception { - // given - given(database.getDatabaseProductName()).willReturn(POSTGRES_DATABASE_PRODUCT_NAME); - final ReplaceCustomChange replaceCustomChange = givenReplaceCustomChange("some_table", "address,remark", "|", "\\n"); - final Exception givenCausingException = new DatabaseException("dummy"); - given(connection.createStatement()).willThrow(givenCausingException); - - // when - final Throwable actual = catchThrowable(() -> replaceCustomChange.execute(database)); - - // then - assertThat(actual).isInstanceOfSatisfying( - CustomChangeException.class, - (cce) -> assertThat(cce.getCause()).isSameAs(givenCausingException)); - } - - @Test - public void onSQLExceptionThrowsCustomChangeException() throws Exception { - // given - given(database.getDatabaseProductName()).willReturn(POSTGRES_DATABASE_PRODUCT_NAME); - final ReplaceCustomChange replaceCustomChange = givenReplaceCustomChange("some_table", "address,remark", "|", "\\n"); - final Exception givenCausingException = new SQLException("dummy"); - given(statement.executeUpdate(anyString())).willThrow(givenCausingException); - - // when - final Throwable actual = catchThrowable(() -> replaceCustomChange.execute(database)); - - // then - assertThat(actual).isInstanceOfSatisfying( - CustomChangeException.class, - (cce) -> assertThat(cce.getCause()).isSameAs(givenCausingException)); - } - - @Test - public void setFileOpenerDoesNothing() { - new ReplaceCustomChange().setFileOpener(null); - } - - @Test - public void validateDoesNothing() { - new ReplaceCustomChange().validate(null); - } - - // --- only test fixture below --- - - private ReplaceCustomChange givenReplaceCustomChange( - final String some_table, - final String columns, - final String searchFor, - final String replaceWith) throws SetupException { - final ReplaceCustomChange replaceCustomChange = new ReplaceCustomChange(); - replaceCustomChange.setUp(); - replaceCustomChange.setTableName(some_table); - replaceCustomChange.setColumnNames(columns); - replaceCustomChange.setSearchFor(searchFor); - replaceCustomChange.setReplaceWith(replaceWith); - return replaceCustomChange; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/repository/AssetRepositoryIntTest.java b/src/test/java/org/hostsharing/hsadminng/repository/AssetRepositoryIntTest.java deleted file mode 100644 index 2bceb8b6..00000000 --- a/src/test/java/org/hostsharing/hsadminng/repository/AssetRepositoryIntTest.java +++ /dev/null @@ -1,76 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.Asset; -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.domain.enumeration.AssetAction; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.transaction.annotation.Transactional; - -import java.math.BigDecimal; -import java.time.LocalDate; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -@Transactional -public class AssetRepositoryIntTest { - - @Autowired - private CustomerRepository customerRepository; - - @Autowired - private MembershipRepository membershipRepository; - - @Autowired - private AssetRepository assetRepository; - - @Test - public void sequenceStartsAbove1000000ToSpareIdsForSampleData() { - // given - final Asset givenAsset = createArbitraryAsset(); - - // when - assetRepository.save(givenAsset); - - // then - assertThat(givenAsset.getId()).isGreaterThan(1000000); - } - - // --- only test fixture below --- - - private Customer createPersistentCustomer() { - return customerRepository.save(CustomerRepositoryIntTest.createCustomer()); - } - - private Membership createPersistentMembership() { - return membershipRepository - .save(MembershipRepositoryIntTest.createMembership(createPersistentCustomer(), "2019-01-08", null)); - } - - static Asset createAsset( - final Membership membership, - final AssetAction action, - final String amount, - final String documentDate) { - final Asset asset = new Asset(); - asset.setMembership(membership); - asset.setAction(action); - asset.setAmount(new BigDecimal(amount)); - asset.setDocumentDate(LocalDate.parse(documentDate)); - asset.setValueDate(LocalDate.parse(documentDate).plusDays(1)); - return asset; - } - - private Asset createArbitraryAsset() { - return createAsset(createPersistentMembership(), AssetAction.PAYMENT, "160.00", "2019-01-08"); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/repository/CustomAuditEventRepositoryIntTest.java b/src/test/java/org/hostsharing/hsadminng/repository/CustomAuditEventRepositoryIntTest.java deleted file mode 100644 index a66d3a6d..00000000 --- a/src/test/java/org/hostsharing/hsadminng/repository/CustomAuditEventRepositoryIntTest.java +++ /dev/null @@ -1,168 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.hostsharing.hsadminng.repository.CustomAuditEventRepository.EVENT_DATA_COLUMN_MAX_LENGTH; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.config.Constants; -import org.hostsharing.hsadminng.config.audit.AuditEventConverter; -import org.hostsharing.hsadminng.domain.PersistentAuditEvent; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.actuate.audit.AuditEvent; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.mock.web.MockHttpServletRequest; -import org.springframework.mock.web.MockHttpSession; -import org.springframework.security.web.authentication.WebAuthenticationDetails; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.transaction.annotation.Transactional; - -import java.time.Instant; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpSession; - -/** - * Test class for the CustomAuditEventRepository class. - * - * @see CustomAuditEventRepository - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -@Transactional -public class CustomAuditEventRepositoryIntTest { - - @Autowired - private PersistenceAuditEventRepository persistenceAuditEventRepository; - - @Autowired - private AuditEventConverter auditEventConverter; - - private CustomAuditEventRepository customAuditEventRepository; - - private PersistentAuditEvent testUserEvent; - - private PersistentAuditEvent testOtherUserEvent; - - private PersistentAuditEvent testOldUserEvent; - - @Before - public void setup() { - customAuditEventRepository = new CustomAuditEventRepository(persistenceAuditEventRepository, auditEventConverter); - persistenceAuditEventRepository.deleteAll(); - Instant oneHourAgo = Instant.now().minusSeconds(3600); - - testUserEvent = new PersistentAuditEvent(); - testUserEvent.setPrincipal("test-user"); - testUserEvent.setAuditEventType("test-type"); - testUserEvent.setAuditEventDate(oneHourAgo); - Map data = new HashMap<>(); - data.put("test-key", "test-value"); - testUserEvent.setData(data); - - testOldUserEvent = new PersistentAuditEvent(); - testOldUserEvent.setPrincipal("test-user"); - testOldUserEvent.setAuditEventType("test-type"); - testOldUserEvent.setAuditEventDate(oneHourAgo.minusSeconds(10000)); - - testOtherUserEvent = new PersistentAuditEvent(); - testOtherUserEvent.setPrincipal("other-test-user"); - testOtherUserEvent.setAuditEventType("test-type"); - testOtherUserEvent.setAuditEventDate(oneHourAgo); - } - - @Test - public void addAuditEvent() { - Map data = new HashMap<>(); - data.put("test-key", "test-value"); - AuditEvent event = new AuditEvent("test-user", "test-type", data); - customAuditEventRepository.add(event); - List persistentAuditEvents = persistenceAuditEventRepository.findAll(); - assertThat(persistentAuditEvents).hasSize(1); - PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); - assertThat(persistentAuditEvent.getPrincipal()).isEqualTo(event.getPrincipal()); - assertThat(persistentAuditEvent.getAuditEventType()).isEqualTo(event.getType()); - assertThat(persistentAuditEvent.getData()).containsKey("test-key"); - assertThat(persistentAuditEvent.getData().get("test-key")).isEqualTo("test-value"); - assertThat(persistentAuditEvent.getAuditEventDate()).isEqualTo(event.getTimestamp()); - } - - @Test - public void addAuditEventTruncateLargeData() { - Map data = new HashMap<>(); - StringBuilder largeData = new StringBuilder(); - for (int i = 0; i < EVENT_DATA_COLUMN_MAX_LENGTH + 10; i++) { - largeData.append("a"); - } - data.put("test-key", largeData); - AuditEvent event = new AuditEvent("test-user", "test-type", data); - customAuditEventRepository.add(event); - List persistentAuditEvents = persistenceAuditEventRepository.findAll(); - assertThat(persistentAuditEvents).hasSize(1); - PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); - assertThat(persistentAuditEvent.getPrincipal()).isEqualTo(event.getPrincipal()); - assertThat(persistentAuditEvent.getAuditEventType()).isEqualTo(event.getType()); - assertThat(persistentAuditEvent.getData()).containsKey("test-key"); - String actualData = persistentAuditEvent.getData().get("test-key"); - assertThat(actualData.length()).isEqualTo(EVENT_DATA_COLUMN_MAX_LENGTH); - assertThat(actualData).isSubstringOf(largeData); - assertThat(persistentAuditEvent.getAuditEventDate()).isEqualTo(event.getTimestamp()); - } - - @Test - public void testAddEventWithWebAuthenticationDetails() { - HttpSession session = new MockHttpSession(null, "test-session-id"); - MockHttpServletRequest request = new MockHttpServletRequest(); - request.setSession(session); - request.setRemoteAddr("1.2.3.4"); - WebAuthenticationDetails details = new WebAuthenticationDetails(request); - Map data = new HashMap<>(); - data.put("test-key", details); - AuditEvent event = new AuditEvent("test-user", "test-type", data); - customAuditEventRepository.add(event); - List persistentAuditEvents = persistenceAuditEventRepository.findAll(); - assertThat(persistentAuditEvents).hasSize(1); - PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); - assertThat(persistentAuditEvent.getData().get("remoteAddress")).isEqualTo("1.2.3.4"); - assertThat(persistentAuditEvent.getData().get("sessionId")).isEqualTo("test-session-id"); - } - - @Test - public void testAddEventWithNullData() { - Map data = new HashMap<>(); - data.put("test-key", null); - AuditEvent event = new AuditEvent("test-user", "test-type", data); - customAuditEventRepository.add(event); - List persistentAuditEvents = persistenceAuditEventRepository.findAll(); - assertThat(persistentAuditEvents).hasSize(1); - PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); - assertThat(persistentAuditEvent.getData().get("test-key")).isEqualTo("null"); - } - - @Test - public void addAuditEventWithAnonymousUser() { - Map data = new HashMap<>(); - data.put("test-key", "test-value"); - AuditEvent event = new AuditEvent(Constants.ANONYMOUS_USER, "test-type", data); - customAuditEventRepository.add(event); - List persistentAuditEvents = persistenceAuditEventRepository.findAll(); - assertThat(persistentAuditEvents).hasSize(0); - } - - @Test - public void addAuditEventWithAuthorizationFailureType() { - Map data = new HashMap<>(); - data.put("test-key", "test-value"); - AuditEvent event = new AuditEvent("test-user", "AUTHORIZATION_FAILURE", data); - customAuditEventRepository.add(event); - List persistentAuditEvents = persistenceAuditEventRepository.findAll(); - assertThat(persistentAuditEvents).hasSize(0); - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/repository/CustomerRepositoryIntTest.java b/src/test/java/org/hostsharing/hsadminng/repository/CustomerRepositoryIntTest.java deleted file mode 100644 index 3b517140..00000000 --- a/src/test/java/org/hostsharing/hsadminng/repository/CustomerRepositoryIntTest.java +++ /dev/null @@ -1,52 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.enumeration.CustomerKind; -import org.hostsharing.hsadminng.domain.enumeration.VatRegion; - -import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.RandomUtils; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.transaction.annotation.Transactional; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -@Transactional -public class CustomerRepositoryIntTest { - - @Autowired - private CustomerRepository customerRepository; - - @Test - public void sequenceStartsAbove1000000ToSpareIdsForSampleData() { - // given - final Customer givenCustomer = createCustomer(); - - // when - customerRepository.save(givenCustomer); - - // then - assertThat(givenCustomer.getId()).isGreaterThan(1000000); - } - - // --- only test fixture below --- - - static Customer createCustomer() { - final Customer customer = new Customer(); - customer.setPrefix(RandomStringUtils.randomAlphabetic(3).toLowerCase()); - customer.setReference(RandomUtils.nextInt(10001, 19999)); - customer.setName(RandomStringUtils.randomAlphabetic(10)); - customer.setContractualAddress(RandomStringUtils.randomAlphabetic(10)); - customer.setKind(CustomerKind.NATURAL); - customer.setVatRegion(VatRegion.DOMESTIC); - return customer; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/repository/MembershipRepositoryIntTest.java b/src/test/java/org/hostsharing/hsadminng/repository/MembershipRepositoryIntTest.java deleted file mode 100644 index 3b38815d..00000000 --- a/src/test/java/org/hostsharing/hsadminng/repository/MembershipRepositoryIntTest.java +++ /dev/null @@ -1,104 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.Membership; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.transaction.annotation.Transactional; - -import java.time.LocalDate; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -@Transactional -public class MembershipRepositoryIntTest { - - @Autowired - private CustomerRepository customerRepository; - - @Autowired - private MembershipRepository membershipRepository; - - @Test - public void sequenceStartsAbove1000000ToSpareIdsForSampleData() { - // given - final Membership givenMembership = createMembership(createPersistentCustomer(), "2019-01-01", null); - - // when - membershipRepository.save(givenMembership); - - // then - assertThat(givenMembership.getId()).isGreaterThan(1000000); - } - - @Test - public void hasUncancelledMembershipForCustomerIsTrueForCustomerWithUncancelledMembership() { - // given - final Customer givenCustomerWithUncancelledMembership = createPersistentCustomerWithMembership("2011-08-18", null); - - // when - boolean actual = membershipRepository - .hasUncancelledMembershipForCustomer(givenCustomerWithUncancelledMembership.getId()); - - // then - assertThat(actual).isTrue(); - } - - @Test - public void hasUncancelledMembershipForCustomerIsFalseForCustomerWithoutMembership() { - // given - final Customer givenCustomerWithoutMembership = createPersistentCustomer(); - - // when - boolean actual = membershipRepository.hasUncancelledMembershipForCustomer(givenCustomerWithoutMembership.getId()); - - // then - assertThat(actual).isFalse(); - } - - @Test - public void hasUncancelledMembershipForCustomerIsFalseForCustomerWithCancelledMembership() { - // given - final Customer givenCustomerWithCancelledMembership = createPersistentCustomerWithMembership( - "2011-08-18", - "2017-12-31"); - - // when - boolean actual = membershipRepository.hasUncancelledMembershipForCustomer(givenCustomerWithCancelledMembership.getId()); - - // then - assertThat(actual).isFalse(); - } - - // --- only test fixture below --- - - private Customer createPersistentCustomer() { - return customerRepository.save(CustomerRepositoryIntTest.createCustomer()); - } - - private Customer createPersistentCustomerWithMembership(final String from, final String to) { - final Customer customer = createPersistentCustomer(); - final Membership membership = createMembership(customer, from, to); - membershipRepository.save(membership); - return customer; - } - - static Membership createMembership(final Customer customer, final String from, final String to) { - final Membership membership = new Membership(); - membership.setCustomer(customer); - membership.setMemberFromDate(LocalDate.parse(from)); - if (to != null) { - membership.setMemberUntilDate(LocalDate.parse(to)); - } - membership.setAdmissionDocumentDate(membership.getMemberFromDate().minusDays(7)); - return membership; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/repository/SepaMandateRepositoryIntTest.java b/src/test/java/org/hostsharing/hsadminng/repository/SepaMandateRepositoryIntTest.java deleted file mode 100644 index 6e23fe75..00000000 --- a/src/test/java/org/hostsharing/hsadminng/repository/SepaMandateRepositoryIntTest.java +++ /dev/null @@ -1,62 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.SepaMandate; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.transaction.annotation.Transactional; - -import java.time.LocalDate; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -@Transactional -public class SepaMandateRepositoryIntTest { - - @Autowired - private CustomerRepository customerRepository; - - @Autowired - private SepaMandateRepository sepaMandateRepository; - - @Test - public void sequenceStartsAbove1000000ToSpareIdsForSampleData() { - // given - final SepaMandate givenSepaMandate = createSepaMandate(createPersistentCustomer(), "DUMMY_REF", "2019-01-08", null); - - // when - sepaMandateRepository.save(givenSepaMandate); - - // then - assertThat(givenSepaMandate.getId()).isGreaterThan(1000000); - } - - // --- only test fixture below --- - - private Customer createPersistentCustomer() { - return customerRepository.save(CustomerRepositoryIntTest.createCustomer()); - } - - static SepaMandate createSepaMandate(final Customer customer, final String reference, final String from, final String to) { - final SepaMandate sepaMandate = new SepaMandate(); - sepaMandate.setCustomer(customer); - sepaMandate.setReference(reference); - sepaMandate.setIban("NL57ABNA2228161411"); - sepaMandate.setBic("ABNANL2A"); - sepaMandate.setGrantingDocumentDate(LocalDate.parse(from)); - sepaMandate.setValidFromDate(LocalDate.parse(from).plusDays(1)); - if (to != null) { - sepaMandate.setRevokationDocumentDate(LocalDate.parse(to)); - sepaMandate.setValidUntilDate(LocalDate.parse(to).plusDays(7)); - } - return sepaMandate; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/repository/ShareRepositoryIntTest.java b/src/test/java/org/hostsharing/hsadminng/repository/ShareRepositoryIntTest.java deleted file mode 100644 index 25489811..00000000 --- a/src/test/java/org/hostsharing/hsadminng/repository/ShareRepositoryIntTest.java +++ /dev/null @@ -1,75 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.domain.Share; -import org.hostsharing.hsadminng.domain.enumeration.ShareAction; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.transaction.annotation.Transactional; - -import java.time.LocalDate; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -@Transactional -public class ShareRepositoryIntTest { - - @Autowired - private CustomerRepository customerRepository; - - @Autowired - private MembershipRepository membershipRepository; - - @Autowired - private ShareRepository shareRepository; - - @Test - public void sequenceStartsAbove1000000ToSpareIdsForSampleData() { - // given - final Share givenShare = createArbitraryShare(); - - // when - shareRepository.save(givenShare); - - // then - assertThat(givenShare.getId()).isGreaterThan(1000000); - } - - // --- only test fixture below --- - - private Customer createPersistentCustomer() { - return customerRepository.save(CustomerRepositoryIntTest.createCustomer()); - } - - private Membership createPersistentMembership() { - return membershipRepository - .save(MembershipRepositoryIntTest.createMembership(createPersistentCustomer(), "2019-01-08", null)); - } - - static Share createShare( - final Membership membership, - final ShareAction action, - final int quantity, - final String documentDate) { - final Share share = new Share(); - share.setMembership(membership); - share.setAction(action); - share.setQuantity(quantity); - share.setDocumentDate(LocalDate.parse(documentDate)); - share.setValueDate(LocalDate.parse(documentDate).plusDays(1)); - return share; - } - - private Share createArbitraryShare() { - return createShare(createPersistentMembership(), ShareAction.SUBSCRIPTION, 1, "2019-01-08"); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/repository/timezone/DateTimeWrapper.java b/src/test/java/org/hostsharing/hsadminng/repository/timezone/DateTimeWrapper.java deleted file mode 100644 index c3d86649..00000000 --- a/src/test/java/org/hostsharing/hsadminng/repository/timezone/DateTimeWrapper.java +++ /dev/null @@ -1,134 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository.timezone; - -import java.io.Serializable; -import java.time.*; -import java.util.Objects; - -import javax.persistence.*; - -@Entity -@Table(name = "jhi_date_time_wrapper") -public class DateTimeWrapper implements Serializable { - - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") - @SequenceGenerator(name = "sequenceGenerator") - private Long id; - - @Column(name = "instant") - private Instant instant; - - @Column(name = "local_date_time") - private LocalDateTime localDateTime; - - @Column(name = "offset_date_time") - private OffsetDateTime offsetDateTime; - - @Column(name = "zoned_date_time") - private ZonedDateTime zonedDateTime; - - @Column(name = "local_time") - private LocalTime localTime; - - @Column(name = "offset_time") - private OffsetTime offsetTime; - - @Column(name = "local_date") - private LocalDate localDate; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Instant getInstant() { - return instant; - } - - public void setInstant(Instant instant) { - this.instant = instant; - } - - public LocalDateTime getLocalDateTime() { - return localDateTime; - } - - public void setLocalDateTime(LocalDateTime localDateTime) { - this.localDateTime = localDateTime; - } - - public OffsetDateTime getOffsetDateTime() { - return offsetDateTime; - } - - public void setOffsetDateTime(OffsetDateTime offsetDateTime) { - this.offsetDateTime = offsetDateTime; - } - - public ZonedDateTime getZonedDateTime() { - return zonedDateTime; - } - - public void setZonedDateTime(ZonedDateTime zonedDateTime) { - this.zonedDateTime = zonedDateTime; - } - - public LocalTime getLocalTime() { - return localTime; - } - - public void setLocalTime(LocalTime localTime) { - this.localTime = localTime; - } - - public OffsetTime getOffsetTime() { - return offsetTime; - } - - public void setOffsetTime(OffsetTime offsetTime) { - this.offsetTime = offsetTime; - } - - public LocalDate getLocalDate() { - return localDate; - } - - public void setLocalDate(LocalDate localDate) { - this.localDate = localDate; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - DateTimeWrapper dateTimeWrapper = (DateTimeWrapper) o; - return !(dateTimeWrapper.getId() == null || getId() == null) && Objects.equals(getId(), dateTimeWrapper.getId()); - } - - @Override - public int hashCode() { - return Objects.hashCode(getId()); - } - - @Override - public String toString() { - return "TimeZoneTest{" + - "id=" + id + - ", instant=" + instant + - ", localDateTime=" + localDateTime + - ", offsetDateTime=" + offsetDateTime + - ", zonedDateTime=" + zonedDateTime + - '}'; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/repository/timezone/DateTimeWrapperRepository.java b/src/test/java/org/hostsharing/hsadminng/repository/timezone/DateTimeWrapperRepository.java deleted file mode 100644 index 1eea9b1d..00000000 --- a/src/test/java/org/hostsharing/hsadminng/repository/timezone/DateTimeWrapperRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.repository.timezone; - -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -/** - * Spring Data JPA repository for the DateTimeWrapper entity. - */ -@Repository -public interface DateTimeWrapperRepository extends JpaRepository { - -} diff --git a/src/test/java/org/hostsharing/hsadminng/security/DomainUserDetailsServiceIntTest.java b/src/test/java/org/hostsharing/hsadminng/security/DomainUserDetailsServiceIntTest.java deleted file mode 100644 index 78bfa455..00000000 --- a/src/test/java/org/hostsharing/hsadminng/security/DomainUserDetailsServiceIntTest.java +++ /dev/null @@ -1,128 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.security; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.repository.UserRepository; - -import org.apache.commons.lang3.RandomStringUtils; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Locale; - -/** - * Test class for DomainUserDetailsService. - * - * @see DomainUserDetailsService - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -@Transactional -public class DomainUserDetailsServiceIntTest { - - private static final String USER_ONE_LOGIN = "test-user-one"; - private static final String USER_ONE_EMAIL = "test-user-one@localhost"; - private static final String USER_TWO_LOGIN = "test-user-two"; - private static final String USER_TWO_EMAIL = "test-user-two@localhost"; - private static final String USER_THREE_LOGIN = "test-user-three"; - private static final String USER_THREE_EMAIL = "test-user-three@localhost"; - - @Autowired - private UserRepository userRepository; - - @Autowired - private UserDetailsService domainUserDetailsService; - - private User userOne; - private User userTwo; - private User userThree; - - @Before - public void init() { - userOne = new User(); - userOne.setLogin(USER_ONE_LOGIN); - userOne.setPassword(RandomStringUtils.random(60)); - userOne.setActivated(true); - userOne.setEmail(USER_ONE_EMAIL); - userOne.setFirstName("userOne"); - userOne.setLastName("doe"); - userOne.setLangKey("en"); - userRepository.save(userOne); - - userTwo = new User(); - userTwo.setLogin(USER_TWO_LOGIN); - userTwo.setPassword(RandomStringUtils.random(60)); - userTwo.setActivated(true); - userTwo.setEmail(USER_TWO_EMAIL); - userTwo.setFirstName("userTwo"); - userTwo.setLastName("doe"); - userTwo.setLangKey("en"); - userRepository.save(userTwo); - - userThree = new User(); - userThree.setLogin(USER_THREE_LOGIN); - userThree.setPassword(RandomStringUtils.random(60)); - userThree.setActivated(false); - userThree.setEmail(USER_THREE_EMAIL); - userThree.setFirstName("userThree"); - userThree.setLastName("doe"); - userThree.setLangKey("en"); - userRepository.save(userThree); - } - - @Test - @Transactional - public void assertThatUserCanBeFoundByLogin() { - UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_LOGIN); - assertThat(userDetails).isNotNull(); - assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN); - } - - @Test - @Transactional - public void assertThatUserCanBeFoundByLoginIgnoreCase() { - UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_LOGIN.toUpperCase(Locale.ENGLISH)); - assertThat(userDetails).isNotNull(); - assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN); - } - - @Test - @Transactional - public void assertThatUserCanBeFoundByEmail() { - UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_TWO_EMAIL); - assertThat(userDetails).isNotNull(); - assertThat(userDetails.getUsername()).isEqualTo(USER_TWO_LOGIN); - } - - @Test(expected = UsernameNotFoundException.class) - @Transactional - public void assertThatUserCanNotBeFoundByEmailIgnoreCase() { - domainUserDetailsService.loadUserByUsername(USER_TWO_EMAIL.toUpperCase(Locale.ENGLISH)); - } - - @Test - @Transactional - public void assertThatEmailIsPrioritizedOverLogin() { - UserDetails userDetails = domainUserDetailsService.loadUserByUsername(USER_ONE_EMAIL); - assertThat(userDetails).isNotNull(); - assertThat(userDetails.getUsername()).isEqualTo(USER_ONE_LOGIN); - } - - @Test(expected = UserNotActivatedException.class) - @Transactional - public void assertThatUserNotActivatedExceptionIsThrownForNotActivatedUsers() { - domainUserDetailsService.loadUserByUsername(USER_THREE_LOGIN); - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/security/SecurityUtilsUnitTest.java b/src/test/java/org/hostsharing/hsadminng/security/SecurityUtilsUnitTest.java deleted file mode 100644 index 05769287..00000000 --- a/src/test/java/org/hostsharing/hsadminng/security/SecurityUtilsUnitTest.java +++ /dev/null @@ -1,74 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.security; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.junit.Test; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.SimpleGrantedAuthority; -import org.springframework.security.core.context.SecurityContext; -import org.springframework.security.core.context.SecurityContextHolder; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Optional; - -/** - * Test class for the SecurityUtils utility class. - * - * @see SecurityUtils - */ -public class SecurityUtilsUnitTest { - - @Test - public void testgetCurrentUserLogin() { - SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); - securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin")); - SecurityContextHolder.setContext(securityContext); - Optional login = SecurityUtils.getCurrentUserLogin(); - assertThat(login).contains("admin"); - } - - @Test - public void testgetCurrentUserJWT() { - SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); - securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "token")); - SecurityContextHolder.setContext(securityContext); - Optional jwt = SecurityUtils.getCurrentUserJWT(); - assertThat(jwt).contains("token"); - } - - @Test - public void testIsAuthenticated() { - SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); - securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin")); - SecurityContextHolder.setContext(securityContext); - boolean isAuthenticated = SecurityUtils.isAuthenticated(); - assertThat(isAuthenticated).isTrue(); - } - - @Test - public void testAnonymousIsNotAuthenticated() { - SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); - Collection authorities = new ArrayList<>(); - authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.ANONYMOUS)); - securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("anonymous", "anonymous", authorities)); - SecurityContextHolder.setContext(securityContext); - boolean isAuthenticated = SecurityUtils.isAuthenticated(); - assertThat(isAuthenticated).isFalse(); - } - - @Test - public void testIsCurrentUserInRole() { - SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); - Collection authorities = new ArrayList<>(); - authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.USER)); - securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("user", "user", authorities)); - SecurityContextHolder.setContext(securityContext); - - assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.USER)).isTrue(); - assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.ADMIN)).isFalse(); - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/security/jwt/JWTFilterTest.java b/src/test/java/org/hostsharing/hsadminng/security/jwt/JWTFilterTest.java deleted file mode 100644 index ac77496a..00000000 --- a/src/test/java/org/hostsharing/hsadminng/security/jwt/JWTFilterTest.java +++ /dev/null @@ -1,119 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.security.jwt; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.hostsharing.hsadminng.security.AuthoritiesConstants; - -import io.github.jhipster.config.JHipsterProperties; -import io.jsonwebtoken.io.Decoders; -import io.jsonwebtoken.security.Keys; - -import org.junit.Before; -import org.junit.Test; -import org.springframework.http.HttpStatus; -import org.springframework.mock.web.MockFilterChain; -import org.springframework.mock.web.MockHttpServletRequest; -import org.springframework.mock.web.MockHttpServletResponse; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.authority.SimpleGrantedAuthority; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.test.util.ReflectionTestUtils; - -import java.util.Collections; - -public class JWTFilterTest { - - private TokenProvider tokenProvider; - - private JWTFilter jwtFilter; - - @Before - public void setup() { - JHipsterProperties jHipsterProperties = new JHipsterProperties(); - tokenProvider = new TokenProvider(jHipsterProperties); - ReflectionTestUtils.setField( - tokenProvider, - "key", - Keys.hmacShaKeyFor( - Decoders.BASE64 - .decode( - "fd54a45s65fds737b9aafcb3412e07ed99b267f33413274720ddbb7f6c5e64e9f14075f2d7ed041592f0b7657baf8"))); - - ReflectionTestUtils.setField(tokenProvider, "tokenValidityInMilliseconds", 60000); - jwtFilter = new JWTFilter(tokenProvider); - SecurityContextHolder.getContext().setAuthentication(null); - } - - @Test - public void testJWTFilter() throws Exception { - UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken( - "test-user", - "test-password", - Collections.singletonList(new SimpleGrantedAuthority(AuthoritiesConstants.USER))); - String jwt = tokenProvider.createToken(authentication, false); - MockHttpServletRequest request = new MockHttpServletRequest(); - request.addHeader(JWTFilter.AUTHORIZATION_HEADER, "Bearer " + jwt); - request.setRequestURI("/api/test"); - MockHttpServletResponse response = new MockHttpServletResponse(); - MockFilterChain filterChain = new MockFilterChain(); - jwtFilter.doFilter(request, response, filterChain); - assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); - assertThat(SecurityContextHolder.getContext().getAuthentication().getName()).isEqualTo("test-user"); - assertThat(SecurityContextHolder.getContext().getAuthentication().getCredentials().toString()).isEqualTo(jwt); - } - - @Test - public void testJWTFilterInvalidToken() throws Exception { - String jwt = "wrong_jwt"; - MockHttpServletRequest request = new MockHttpServletRequest(); - request.addHeader(JWTFilter.AUTHORIZATION_HEADER, "Bearer " + jwt); - request.setRequestURI("/api/test"); - MockHttpServletResponse response = new MockHttpServletResponse(); - MockFilterChain filterChain = new MockFilterChain(); - jwtFilter.doFilter(request, response, filterChain); - assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); - assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull(); - } - - @Test - public void testJWTFilterMissingAuthorization() throws Exception { - MockHttpServletRequest request = new MockHttpServletRequest(); - request.setRequestURI("/api/test"); - MockHttpServletResponse response = new MockHttpServletResponse(); - MockFilterChain filterChain = new MockFilterChain(); - jwtFilter.doFilter(request, response, filterChain); - assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); - assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull(); - } - - @Test - public void testJWTFilterMissingToken() throws Exception { - MockHttpServletRequest request = new MockHttpServletRequest(); - request.addHeader(JWTFilter.AUTHORIZATION_HEADER, "Bearer "); - request.setRequestURI("/api/test"); - MockHttpServletResponse response = new MockHttpServletResponse(); - MockFilterChain filterChain = new MockFilterChain(); - jwtFilter.doFilter(request, response, filterChain); - assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); - assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull(); - } - - @Test - public void testJWTFilterWrongScheme() throws Exception { - UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken( - "test-user", - "test-password", - Collections.singletonList(new SimpleGrantedAuthority(AuthoritiesConstants.USER))); - String jwt = tokenProvider.createToken(authentication, false); - MockHttpServletRequest request = new MockHttpServletRequest(); - request.addHeader(JWTFilter.AUTHORIZATION_HEADER, "Basic " + jwt); - request.setRequestURI("/api/test"); - MockHttpServletResponse response = new MockHttpServletResponse(); - MockFilterChain filterChain = new MockFilterChain(); - jwtFilter.doFilter(request, response, filterChain); - assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); - assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull(); - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/security/jwt/TokenProviderTest.java b/src/test/java/org/hostsharing/hsadminng/security/jwt/TokenProviderTest.java deleted file mode 100644 index d1e6934a..00000000 --- a/src/test/java/org/hostsharing/hsadminng/security/jwt/TokenProviderTest.java +++ /dev/null @@ -1,116 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.security.jwt; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.hostsharing.hsadminng.security.AuthoritiesConstants; - -import io.github.jhipster.config.JHipsterProperties; -import io.jsonwebtoken.Jwts; -import io.jsonwebtoken.SignatureAlgorithm; -import io.jsonwebtoken.io.Decoders; -import io.jsonwebtoken.security.Keys; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mockito; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.SimpleGrantedAuthority; -import org.springframework.test.util.ReflectionTestUtils; - -import java.security.Key; -import java.util.*; - -public class TokenProviderTest { - - private final long ONE_MINUTE = 60000; - private Key key; - private JHipsterProperties jHipsterProperties; - private TokenProvider tokenProvider; - - @Before - public void setup() { - jHipsterProperties = Mockito.mock(JHipsterProperties.class); - tokenProvider = new TokenProvider(jHipsterProperties); - key = Keys.hmacShaKeyFor( - Decoders.BASE64 - .decode( - "fd54a45s65fds737b9aafcb3412e07ed99b267f33413274720ddbb7f6c5e64e9f14075f2d7ed041592f0b7657baf8")); - - ReflectionTestUtils.setField(tokenProvider, "key", key); - ReflectionTestUtils.setField(tokenProvider, "tokenValidityInMilliseconds", ONE_MINUTE); - } - - @Test - public void testReturnFalseWhenJWThasInvalidSignature() { - boolean isTokenValid = tokenProvider.validateToken(createTokenWithDifferentSignature()); - - assertThat(isTokenValid).isEqualTo(false); - } - - @Test - public void testReturnFalseWhenJWTisMalformed() { - Authentication authentication = createAuthentication(); - String token = tokenProvider.createToken(authentication, false); - String invalidToken = token.substring(1); - boolean isTokenValid = tokenProvider.validateToken(invalidToken); - - assertThat(isTokenValid).isEqualTo(false); - } - - @Test - public void testReturnFalseWhenJWTisExpired() { - ReflectionTestUtils.setField(tokenProvider, "tokenValidityInMilliseconds", -ONE_MINUTE); - - Authentication authentication = createAuthentication(); - String token = tokenProvider.createToken(authentication, false); - - boolean isTokenValid = tokenProvider.validateToken(token); - - assertThat(isTokenValid).isEqualTo(false); - } - - @Test - public void testReturnFalseWhenJWTisUnsupported() { - String unsupportedToken = createUnsupportedToken(); - - boolean isTokenValid = tokenProvider.validateToken(unsupportedToken); - - assertThat(isTokenValid).isEqualTo(false); - } - - @Test - public void testReturnFalseWhenJWTisInvalid() { - boolean isTokenValid = tokenProvider.validateToken(""); - - assertThat(isTokenValid).isEqualTo(false); - } - - private Authentication createAuthentication() { - Collection authorities = new ArrayList<>(); - authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.ANONYMOUS)); - return new UsernamePasswordAuthenticationToken("anonymous", "anonymous", authorities); - } - - private String createUnsupportedToken() { - return Jwts.builder() - .setPayload("payload") - .signWith(key, SignatureAlgorithm.HS512) - .compact(); - } - - private String createTokenWithDifferentSignature() { - Key otherKey = Keys.hmacShaKeyFor( - Decoders.BASE64 - .decode( - "Xfd54a45s65fds737b9aafcb3412e07ed99b267f33413274720ddbb7f6c5e64e9f14075f2d7ed041592f0b7657baf8")); - - return Jwts.builder() - .setSubject("anonymous") - .signWith(otherKey, SignatureAlgorithm.HS512) - .setExpiration(new Date(new Date().getTime() + ONE_MINUTE)) - .compact(); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/AssetServiceUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/AssetServiceUnitTest.java deleted file mode 100644 index dd7eb4e2..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/AssetServiceUnitTest.java +++ /dev/null @@ -1,180 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowableOfType; -import static org.mockito.ArgumentMatchers.same; -import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.*; - -import org.hostsharing.hsadminng.domain.Asset; -import org.hostsharing.hsadminng.domain.enumeration.AssetAction; -import org.hostsharing.hsadminng.repository.AssetRepository; -import org.hostsharing.hsadminng.service.dto.AssetDTO; -import org.hostsharing.hsadminng.service.mapper.AssetMapper; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.apache.commons.lang3.RandomUtils; -import org.junit.Rule; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -import java.math.BigDecimal; - -import javax.persistence.EntityManager; - -// HINT: In IntelliJ IDEA such unit test classes can be created with Shift-Ctrl-T. -// Do not forget to amend the class name (.e.g. ...UnitTest / ...IntTest)! -public class AssetServiceUnitTest { - - @Rule - public MockitoRule mockitoRule = MockitoJUnit.rule(); - - @Mock - private EntityManager em; - - @Mock - private AssetRepository assetRepository; - - @Mock - private AssetValidator assetValidator; // needed for @InjectMocks assetService - - @Mock - private AssetMapper assetMapper; - - @InjectMocks - private AssetService assetService; - - // HINT: Click outside of any test method (e.g. here) and use Ctrl-Shift-F10 - // to run all tests from this test class. Use Ctrl-F5 to run the last execution again; - // 'execution' here can also apply to running the application, whatever ran last. - - // HINT: In IntelliJ IDEA such test methods can be created with Alt-Insert. - @Test - public void deleteIsRejectedForAssetTransactions() { - // when - final Throwable throwException = catchThrowableOfType( - () -> assetService.delete(RandomUtils.nextLong()), - BadRequestAlertException.class); - - // then - // HINT: When using auto-import for assertions (e.g. via Alt-Enter in IntelliJ IDEA), - // beware to use the correct candidate from org.assertj.core.api.Assertions. - assertThat(throwException).isEqualToComparingFieldByField( - new BadRequestAlertException("Asset transactions are immutable", "asset", "assetTransactionImmutable")); - } - - @Test - public void saveShouldPersistValidTransactions() { - // given - final AssetDTO givenAssetDTO = givenAssetDTO(null, AssetAction.PAYMENT, anyPositiveAmout()); - // HINT: given(...)...will...() can't be used for void methods, in that case use Mockito's do...() methods - doNothing().when(assetValidator).validate(givenAssetDTO); - - // when - final AssetDTO returnedAssetDto = assetService.save(givenAssetDTO); - - // then - verify(em).flush(); - verify(em).refresh(any(Asset.class)); - assertThat(returnedAssetDto).isEqualToIgnoringGivenFields(givenAssetDTO, "id"); - } - - @Test - public void saveShouldNotPersistInvalidTransactions() { - // given - final AssetDTO givenAssetDTO = givenAssetDTO(null, AssetAction.PAYMENT, anyNegativeAmount()); - doThrow(new BadRequestAlertException("Some Dummy Test Violation", "asset", "assetInvalidTestDummy")) - .when(assetValidator) - .validate(givenAssetDTO); - - // when - final Throwable throwException = catchThrowableOfType( - () -> assetService.save(givenAssetDTO), - BadRequestAlertException.class); - - // then - assertThat(throwException).isEqualToComparingFieldByField( - new BadRequestAlertException("Some Dummy Test Violation", "asset", "assetInvalidTestDummy")); - } - - @Test - public void saveShouldUpdateValidTransactions() { - // given - final AssetDTO givenAssetDTO = givenAssetDTO(anyNonNullId(), AssetAction.PAYMENT, anyPositiveAmout()); - doNothing().when(assetValidator).validate(givenAssetDTO); - - // when - final AssetDTO returnedAssetDto = assetService.save(givenAssetDTO); - - // then - verify(em).flush(); - verify(em).refresh(any(Asset.class)); - assertThat(returnedAssetDto).isEqualToIgnoringGivenFields(givenAssetDTO, "id"); - } - - @Test - public void saveShouldNotUpdateInvalidTransactions() { - // given - final AssetDTO givenAssetDTO = givenAssetDTO(anyNonNullId(), AssetAction.PAYMENT, anyNegativeAmount()); - // HINT: given(...) can't be used for void methods, in that case use Mockito's do...() methods - doThrow(new BadRequestAlertException("Some Dummy Test Violation", "asset", "assetInvalidTestDummy")) - .when(assetValidator) - .validate(givenAssetDTO); - - // when - final Throwable throwException = catchThrowableOfType( - () -> assetService.save(givenAssetDTO), - BadRequestAlertException.class); - - // then - assertThat(throwException).isEqualToComparingFieldByField( - new BadRequestAlertException("Some Dummy Test Violation", "asset", "assetInvalidTestDummy")); - } - - // --- only test fixture code below --- - - private long anyNonNullId() { - return RandomUtils.nextInt(); - } - - // HINT: This rather complicated setup indicates that the method AssetService::save breaks the single responsibility - // principle. - private AssetDTO givenAssetDTO(final Long id, final AssetAction givenAction, final BigDecimal givenQuantity) { - final AssetDTO givenAssetDTO = createAssetDTO(id, givenAction, givenQuantity); - - // dto -> entity - final Asset givenAssetEntity = Mockito.mock(Asset.class); - given(assetMapper.toEntity(same(givenAssetDTO))).willReturn(givenAssetEntity); - - // assetRepository.save(entity); - final Asset persistedAssetEntity = Mockito.mock(Asset.class); - given(assetRepository.save(same(givenAssetEntity))).willReturn(persistedAssetEntity); - - // entity -> dto - AssetDTO persistedAssetDTO = createAssetDTO(id == null ? RandomUtils.nextLong() : id, givenAction, givenQuantity); - given(assetMapper.toDto(same(persistedAssetEntity))).willReturn(persistedAssetDTO); - - return givenAssetDTO; - } - - private AssetDTO createAssetDTO(Long id, AssetAction givenAction, BigDecimal givenAmount) { - final AssetDTO givenAssetDTO = new AssetDTO(); - givenAssetDTO.setId(id); - givenAssetDTO.setAction(givenAction); - givenAssetDTO.setAmount(givenAmount); - return givenAssetDTO; - } - - private BigDecimal anyPositiveAmout() { - return BigDecimal.valueOf(RandomUtils.nextInt()).add(new BigDecimal("0.1")); - } - - private BigDecimal anyNegativeAmount() { - return anyPositiveAmout().negate(); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/AssetValidatorUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/AssetValidatorUnitTest.java deleted file mode 100644 index 69442072..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/AssetValidatorUnitTest.java +++ /dev/null @@ -1,318 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowableOfType; - -import org.hostsharing.hsadminng.domain.enumeration.AssetAction; -import org.hostsharing.hsadminng.service.dto.AssetDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import com.google.common.collect.ImmutableList; - -import org.apache.commons.lang3.RandomUtils; -import org.assertj.core.api.AbstractThrowableAssert; -import org.junit.Test; - -import java.math.BigDecimal; -import java.time.LocalDate; -import java.util.function.Consumer; - -public class AssetValidatorUnitTest { - - private AssetValidator assetValidator = new AssetValidator(); - - @Test - public void shouldAcceptValidIncreasingTransaction() { - for (AssetAction action : ImmutableList.of(AssetAction.PAYMENT, AssetAction.ADOPTION)) { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(action) - .withAmount("64.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isNull(); - } - } - - @Test - public void shouldAcceptValidDecreasingTransaction() { - for (AssetAction action : ImmutableList - .of(AssetAction.PAYBACK, AssetAction.HANDOVER, AssetAction.CLEARING, AssetAction.LOSS)) { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(action) - .withAmount("-64.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isNull(); - } - } - - @Test - public void shouldAcceptIfDocumentDateEqualsValueDate() { - new GivenAssetValidationTestCase() - .withDocumentDate("2019-04-11") - .withValueDate("2019-04-11") - .withAction(AssetAction.PAYMENT) - .withAmount("64.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isNull(); - } - - @Test - public void shouldRejectUpdates() { - new GivenAssetValidationTestCase() - .withId(RandomUtils.nextLong()) - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset transactions are immutable", - "asset", - "assetTransactionImmutable")); - } - - @Test - public void shouldRejectIfDocumentDateAfterValueDate() { - new GivenAssetValidationTestCase() - .withDocumentDate("2019-04-13") - .withValueDate("2019-04-12") - .withAction(AssetAction.PAYMENT) - .withAmount("64.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Document date may not be after value date", - "asset", - "documentDateMayNotBeAfterValueDate")); - } - - @Test - public void shouldRejectIfPaymentWithNegativeAmount() { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(AssetAction.PAYMENT) - .withAmount("-64.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset payments require a positive amount", - "asset", - "assetPaymentsPositiveAmount")); - } - - @Test - public void shouldRejectIfPaymentWithZeroAmount() { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(AssetAction.PAYMENT) - .withAmount("0.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset payments require a positive amount", - "asset", - "assetPaymentsPositiveAmount")); - } - - @Test - public void shouldRejectIfAdoptionWithNegativeAmount() { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(AssetAction.ADOPTION) - .withAmount("-64.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset adoptions require a positive amount", - "asset", - "assetAdoptionsPositiveAmount")); - } - - @Test - public void shouldRejectIfAdoptionWithZeroAmount() { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(AssetAction.ADOPTION) - .withAmount("0.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset adoptions require a positive amount", - "asset", - "assetAdoptionsPositiveAmount")); - } - - @Test - public void shouldRejectIfPaybackWithPositiveAmount() { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(AssetAction.PAYBACK) - .withAmount("64.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset paybacks require a negative amount", - "asset", - "assetPaybacksNegativeAmount")); - } - - @Test - public void shouldRejectIfPaybackWithZeroAmount() { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(AssetAction.PAYBACK) - .withAmount("0.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset paybacks require a negative amount", - "asset", - "assetPaybacksNegativeAmount")); - } - - @Test - public void shouldRejectIfHandoverWithPositiveAmount() { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(AssetAction.HANDOVER) - .withAmount("64.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset handovers require a negative amount", - "asset", - "assetHandoversNegativeAmount")); - } - - @Test - public void shouldRejectIfHandoverWithZeroAmount() { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(AssetAction.HANDOVER) - .withAmount("0.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset handovers require a negative amount", - "asset", - "assetHandoversNegativeAmount")); - } - - @Test - public void shouldRejectIfLossWithPositiveAmount() { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(AssetAction.LOSS) - .withAmount("64.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset losses require a negative amount", - "asset", - "assetLossesNegativeAmount")); - } - - @Test - public void shouldRejectIfLossWithZeroAmount() { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(AssetAction.LOSS) - .withAmount("0.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset losses require a negative amount", - "asset", - "assetLossesNegativeAmount")); - } - - @Test - public void shouldRejectIfClearingWithPositiveAmount() { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(AssetAction.CLEARING) - .withAmount("64.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset clearings require a negative amount", - "asset", - "assetClearingsNegativeAmount")); - } - - @Test - public void shouldRejectIfClearingWithZeroAmount() { - new GivenAssetValidationTestCase() - .withAnyValidDateValues() - .withAction(AssetAction.CLEARING) - .withAmount("0.00") - .when((AssetDTO assetDto) -> assetValidator.validate(assetDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Asset clearings require a negative amount", - "asset", - "assetClearingsNegativeAmount")); - } - - // -- only test fixture below --- - - private class GivenAssetValidationTestCase { - - private final AssetDTO assetDto = new AssetDTO(); - private BadRequestAlertException actualException; - - public GivenAssetValidationTestCase withId(long id) { - assetDto.setId(id); - return this; - } - - GivenAssetValidationTestCase withDocumentDate(String documentDate) { - assetDto.setDocumentDate(LocalDate.parse(documentDate)); - return this; - } - - GivenAssetValidationTestCase withValueDate(String valueDate) { - assetDto.setValueDate(LocalDate.parse(valueDate)); - return this; - } - - public GivenAssetValidationTestCase withAnyValidDateValues() { - return withDocumentDate("2019-04-11").withValueDate("2019-04-12"); - } - - GivenAssetValidationTestCase withAction(AssetAction assetAction) { - assetDto.setAction(assetAction); - return this; - } - - GivenAssetValidationTestCase withAmount(String amount) { - assetDto.setAmount(new BigDecimal(amount)); - return this; - } - - GivenAssetValidationTestCase when(final Consumer statement) { - actualException = catchThrowableOfType(() -> assetValidator.validate(assetDto), BadRequestAlertException.class); - return this; - } - - public AbstractThrowableAssert thenActualException() { - return assertThat(actualException); - } - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/MailServiceIntTest.java b/src/test/java/org/hostsharing/hsadminng/service/MailServiceIntTest.java deleted file mode 100644 index 70022a1a..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/MailServiceIntTest.java +++ /dev/null @@ -1,192 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.*; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.config.Constants; -import org.hostsharing.hsadminng.domain.User; - -import io.github.jhipster.config.JHipsterProperties; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.ArgumentCaptor; -import org.mockito.Captor; -import org.mockito.MockitoAnnotations; -import org.mockito.Spy; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.MessageSource; -import org.springframework.mail.MailSendException; -import org.springframework.mail.javamail.JavaMailSenderImpl; -import org.springframework.test.context.junit4.SpringRunner; -import org.thymeleaf.spring5.SpringTemplateEngine; - -import java.io.ByteArrayOutputStream; - -import javax.mail.Multipart; -import javax.mail.internet.MimeBodyPart; -import javax.mail.internet.MimeMessage; -import javax.mail.internet.MimeMultipart; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class MailServiceIntTest { - - @Autowired - private JHipsterProperties jHipsterProperties; - - @Autowired - private MessageSource messageSource; - - @Autowired - private SpringTemplateEngine templateEngine; - - @Spy - private JavaMailSenderImpl javaMailSender; - - @Captor - private ArgumentCaptor messageCaptor; - - private MailService mailService; - - @Before - public void setup() { - MockitoAnnotations.initMocks(this); - doNothing().when(javaMailSender).send(any(MimeMessage.class)); - mailService = new MailService(jHipsterProperties, javaMailSender, messageSource, templateEngine); - } - - @Test - public void testSendEmail() throws Exception { - mailService.sendEmail("john.doe@example.com", "testSubject", "testContent", false, false); - verify(javaMailSender).send(messageCaptor.capture()); - MimeMessage message = messageCaptor.getValue(); - assertThat(message.getSubject()).isEqualTo("testSubject"); - assertThat(message.getAllRecipients()[0].toString()).isEqualTo("john.doe@example.com"); - assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); - assertThat(message.getContent()).isInstanceOf(String.class); - assertThat(message.getContent().toString()).isEqualTo("testContent"); - assertThat(message.getDataHandler().getContentType()).isEqualTo("text/plain; charset=UTF-8"); - } - - @Test - public void testSendHtmlEmail() throws Exception { - mailService.sendEmail("john.doe@example.com", "testSubject", "testContent", false, true); - verify(javaMailSender).send(messageCaptor.capture()); - MimeMessage message = messageCaptor.getValue(); - assertThat(message.getSubject()).isEqualTo("testSubject"); - assertThat(message.getAllRecipients()[0].toString()).isEqualTo("john.doe@example.com"); - assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); - assertThat(message.getContent()).isInstanceOf(String.class); - assertThat(message.getContent().toString()).isEqualTo("testContent"); - assertThat(message.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); - } - - @Test - public void testSendMultipartEmail() throws Exception { - mailService.sendEmail("john.doe@example.com", "testSubject", "testContent", true, false); - verify(javaMailSender).send(messageCaptor.capture()); - MimeMessage message = messageCaptor.getValue(); - MimeMultipart mp = (MimeMultipart) message.getContent(); - MimeBodyPart part = (MimeBodyPart) ((MimeMultipart) mp.getBodyPart(0).getContent()).getBodyPart(0); - ByteArrayOutputStream aos = new ByteArrayOutputStream(); - part.writeTo(aos); - assertThat(message.getSubject()).isEqualTo("testSubject"); - assertThat(message.getAllRecipients()[0].toString()).isEqualTo("john.doe@example.com"); - assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); - assertThat(message.getContent()).isInstanceOf(Multipart.class); - assertThat(aos.toString()).isEqualTo("\r\ntestContent"); - assertThat(part.getDataHandler().getContentType()).isEqualTo("text/plain; charset=UTF-8"); - } - - @Test - public void testSendMultipartHtmlEmail() throws Exception { - mailService.sendEmail("john.doe@example.com", "testSubject", "testContent", true, true); - verify(javaMailSender).send(messageCaptor.capture()); - MimeMessage message = messageCaptor.getValue(); - MimeMultipart mp = (MimeMultipart) message.getContent(); - MimeBodyPart part = (MimeBodyPart) ((MimeMultipart) mp.getBodyPart(0).getContent()).getBodyPart(0); - ByteArrayOutputStream aos = new ByteArrayOutputStream(); - part.writeTo(aos); - assertThat(message.getSubject()).isEqualTo("testSubject"); - assertThat(message.getAllRecipients()[0].toString()).isEqualTo("john.doe@example.com"); - assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); - assertThat(message.getContent()).isInstanceOf(Multipart.class); - assertThat(aos.toString()).isEqualTo("\r\ntestContent"); - assertThat(part.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); - } - - @Test - public void testSendEmailFromTemplate() throws Exception { - User user = new User(); - user.setLogin("john"); - user.setEmail("john.doe@example.com"); - user.setLangKey("en"); - mailService.sendEmailFromTemplate(user, "mail/testEmail", "email.test.title"); - verify(javaMailSender).send(messageCaptor.capture()); - MimeMessage message = messageCaptor.getValue(); - assertThat(message.getSubject()).isEqualTo("test title"); - assertThat(message.getAllRecipients()[0].toString()).isEqualTo(user.getEmail()); - assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); - assertThat(message.getContent().toString()) - .isEqualToNormalizingNewlines("test title, http://127.0.0.1:8080, john\n"); - assertThat(message.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); - } - - @Test - public void testSendActivationEmail() throws Exception { - User user = new User(); - user.setLangKey(Constants.DEFAULT_LANGUAGE); - user.setLogin("john"); - user.setEmail("john.doe@example.com"); - mailService.sendActivationEmail(user); - verify(javaMailSender).send(messageCaptor.capture()); - MimeMessage message = messageCaptor.getValue(); - assertThat(message.getAllRecipients()[0].toString()).isEqualTo(user.getEmail()); - assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); - assertThat(message.getContent().toString()).isNotEmpty(); - assertThat(message.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); - } - - @Test - public void testCreationEmail() throws Exception { - User user = new User(); - user.setLangKey(Constants.DEFAULT_LANGUAGE); - user.setLogin("john"); - user.setEmail("john.doe@example.com"); - mailService.sendCreationEmail(user); - verify(javaMailSender).send(messageCaptor.capture()); - MimeMessage message = messageCaptor.getValue(); - assertThat(message.getAllRecipients()[0].toString()).isEqualTo(user.getEmail()); - assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); - assertThat(message.getContent().toString()).isNotEmpty(); - assertThat(message.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); - } - - @Test - public void testSendPasswordResetMail() throws Exception { - User user = new User(); - user.setLangKey(Constants.DEFAULT_LANGUAGE); - user.setLogin("john"); - user.setEmail("john.doe@example.com"); - mailService.sendPasswordResetMail(user); - verify(javaMailSender).send(messageCaptor.capture()); - MimeMessage message = messageCaptor.getValue(); - assertThat(message.getAllRecipients()[0].toString()).isEqualTo(user.getEmail()); - assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); - assertThat(message.getContent().toString()).isNotEmpty(); - assertThat(message.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); - } - - @Test - public void testSendEmailWithException() throws Exception { - doThrow(MailSendException.class).when(javaMailSender).send(any(MimeMessage.class)); - mailService.sendEmail("john.doe@example.com", "testSubject", "testContent", false, false); - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/MembershipServiceUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/MembershipServiceUnitTest.java deleted file mode 100644 index 1b5452d6..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/MembershipServiceUnitTest.java +++ /dev/null @@ -1,68 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowableOfType; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.*; - -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.repository.MembershipRepository; -import org.hostsharing.hsadminng.service.dto.MembershipDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.apache.commons.lang3.RandomUtils; -import org.junit.Rule; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -public class MembershipServiceUnitTest { - - @Rule - public MockitoRule mockitoRule = MockitoJUnit.rule(); - - @Mock - private MembershipRepository membershipRepository; - - @Mock - private MembershipValidator membershipValidator; - - @InjectMocks - private MembershipService membershipService; - - @Test - public void deleteIsRejectedForMembership() { - // when - final Throwable throwException = catchThrowableOfType( - () -> membershipService.delete(RandomUtils.nextLong()), - BadRequestAlertException.class); - - // then - assertThat(throwException).isEqualToComparingFieldByField( - new BadRequestAlertException("Membership cannot be deleted", "membership", "membershipNotDeletable")); - } - - @Test - public void saveRejectsInvalidMembershipDTO() { - // given - final MembershipDTO givenMembershipDTO = new MembershipDTO(); - final BadRequestAlertException givenBadRequestAlertException = new BadRequestAlertException( - "Invalid Membership", - Membership.ENTITY_NAME, - "invalidMembership"); - doThrow(givenBadRequestAlertException).when(membershipValidator).validate(givenMembershipDTO); - - // when - final Throwable throwException = catchThrowableOfType( - () -> membershipService.save(givenMembershipDTO), - BadRequestAlertException.class); - - // then - assertThat(throwException).isSameAs(givenBadRequestAlertException); - verify(membershipRepository, never()).save(any(Membership.class)); - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/MembershipValidatorUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/MembershipValidatorUnitTest.java deleted file mode 100644 index a1327412..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/MembershipValidatorUnitTest.java +++ /dev/null @@ -1,149 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowableOfType; -import static org.mockito.ArgumentMatchers.anyLong; -import static org.mockito.BDDMockito.given; - -import org.hostsharing.hsadminng.repository.MembershipRepository; -import org.hostsharing.hsadminng.service.dto.MembershipDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.assertj.core.api.AbstractThrowableAssert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -import java.time.LocalDate; -import java.util.function.Consumer; - -public class MembershipValidatorUnitTest { - - @Rule - public MockitoRule mockitoRule = MockitoJUnit.rule(); - - @Mock - private MembershipRepository membershipRepository; - - @InjectMocks - private MembershipValidator membershipValidator; - - @Before - public void initMocks() { - given(membershipRepository.hasUncancelledMembershipForCustomer(anyLong())).willReturn(false); - } - - @Test - public void shouldAcceptNewMembershipIfUntilDateAfterSinceDate() { - new GivenMembershipValidationTestCase() - .withNewMembershipForCustomer(1L) - .since("2019-04-11") - .until("2019-04-12") - .when((MembershipDTO membershipDto) -> membershipValidator.validate(membershipDto)) - .thenActualException() - .isNull(); - } - - @Test - public void shouldRejectNewMembershipIfUntilDateEqualToSinceDate() { - new GivenMembershipValidationTestCase() - .withNewMembershipForCustomer(1L) - .since("2019-04-11") - .until("2019-04-11") - .when((MembershipDTO membershipDto) -> membershipValidator.validate(membershipDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Invalid untilDate", - "membership", - "untilDateMustBeAfterSinceDate")); - } - - @Test - public void shouldRejectNewMembershipIfUntilDateAfterSinceDate() { - new GivenMembershipValidationTestCase() - .withNewMembershipForCustomer(1L) - .since("2019-04-12") - .until("2019-04-11") - .when((MembershipDTO membershipDto) -> membershipValidator.validate(membershipDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Invalid untilDate", - "membership", - "untilDateMustBeAfterSinceDate")); - } - - @Test - public void shouldAcceptNewUncancelledMembershipIfNoUncancelledMembershipExistsForSameCustomer() { - new GivenMembershipValidationTestCase() - .withUncancelledMembershipForCustomer(1L, false) - .withNewMembershipForCustomer(1L) - .since("2019-04-12") - .when((MembershipDTO membershipDto) -> membershipValidator.validate(membershipDto)) - .thenActualException() - .isNull(); - } - - @Test - public void shouldRejectNewMembershipIfAnyUncancelledMembershipExistsForSameCustomer() { - - new GivenMembershipValidationTestCase() - .withUncancelledMembershipForCustomer(1L, true) - .withNewMembershipForCustomer(1L) - .since("2019-04-12") - .when((MembershipDTO membershipDto) -> membershipValidator.validate(membershipDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Another uncancelled membership exists", - "membership", - "anotherUncancelledMembershipExists")); - } - - // -- only test fixture below --- - - private class GivenMembershipValidationTestCase { - - private final MembershipDTO membershipDto = new MembershipDTO(); - private BadRequestAlertException actualException; - - GivenMembershipValidationTestCase withUncancelledMembershipForCustomer( - final long customerId, - final boolean hasUncancelledMembership) { - given(membershipRepository.hasUncancelledMembershipForCustomer(customerId)).willReturn(hasUncancelledMembership); - return this; - } - - GivenMembershipValidationTestCase withNewMembershipForCustomer(long customerId) { - membershipDto.setCustomerId(1L); - return this; - } - - GivenMembershipValidationTestCase since(final String sinceDate) { - membershipDto.setMemberFromDate(LocalDate.parse(sinceDate)); - return this; - } - - public GivenMembershipValidationTestCase until(final String untilDate) { - membershipDto.setMemberUntilDate(LocalDate.parse(untilDate)); - return this; - } - - GivenMembershipValidationTestCase when(final Consumer statement) { - actualException = catchThrowableOfType( - () -> membershipValidator.validate(membershipDto), - BadRequestAlertException.class); - return this; - } - - public AbstractThrowableAssert thenActualException() { - return assertThat(actualException); - } - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/ShareServiceUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/ShareServiceUnitTest.java deleted file mode 100644 index 3d44236f..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/ShareServiceUnitTest.java +++ /dev/null @@ -1,178 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowableOfType; -import static org.mockito.ArgumentMatchers.same; -import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.*; - -import org.hostsharing.hsadminng.domain.Share; -import org.hostsharing.hsadminng.domain.enumeration.ShareAction; -import org.hostsharing.hsadminng.repository.ShareRepository; -import org.hostsharing.hsadminng.service.dto.ShareDTO; -import org.hostsharing.hsadminng.service.mapper.ShareMapper; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.apache.commons.lang3.RandomUtils; -import org.junit.Rule; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -import javax.persistence.EntityManager; - -// HINT: In IntelliJ IDEA such unit test classes can be created with Shift-Ctrl-T. -// Do not forget to amend the class name (.e.g. ...UnitTest / ...IntTest)! -public class ShareServiceUnitTest { - - @Rule - public MockitoRule mockitoRule = MockitoJUnit.rule(); - - @Mock - private EntityManager em; - - @Mock - private ShareRepository shareRepository; - - @Mock - private ShareValidator shareValidator; // needed for @InjectMocks shareService - - @Mock - private ShareMapper shareMapper; - - @InjectMocks - private ShareService shareService; - - // HINT: Click outside of any test method (e.g. here) and use Ctrl-Shift-F10 - // to run all tests from this test class. Use Ctrl-F5 to run the last execution again; - // 'execution' here can also apply to running the application, whatever ran last. - - // HINT: In IntelliJ IDEA such test methods can be created with Alt-Insert. - @Test - public void deleteIsRejectedForShareTransactions() { - // when - final Throwable throwException = catchThrowableOfType( - () -> shareService.delete(RandomUtils.nextLong()), - BadRequestAlertException.class); - - // then - // HINT: When using auto-import for assertions (e.g. via Alt-Enter in IntelliJ IDEA), - // beware to use the correct candidate from org.assertj.core.api.Assertions. - assertThat(throwException).isEqualToComparingFieldByField( - new BadRequestAlertException("Share transactions are immutable", "share", "shareTransactionImmutable")); - } - - @Test - public void saveShouldPersistValidTransactions() { - // given - final ShareDTO givenShareDTO = givenShareDTO(null, ShareAction.SUBSCRIPTION, anyPositiveNumber()); - // HINT: given(...)...will...() can't be used for void methods, in that case use Mockito's do...() methods - doNothing().when(shareValidator).validate(givenShareDTO); - - // when - final ShareDTO returnedShareDto = shareService.save(givenShareDTO); - - // then - verify(em).flush(); - verify(em).refresh(any(Share.class)); - assertThat(returnedShareDto).isEqualToIgnoringGivenFields(givenShareDTO, "id"); - } - - @Test - public void saveShouldNotPersistInvalidTransactions() { - // given - final ShareDTO givenShareDTO = givenShareDTO(null, ShareAction.SUBSCRIPTION, anyNegativeNumber()); - doThrow(new BadRequestAlertException("Some Dummy Test Violation", "share", "shareInvalidTestDummy")) - .when(shareValidator) - .validate(givenShareDTO); - - // when - final Throwable throwException = catchThrowableOfType( - () -> shareService.save(givenShareDTO), - BadRequestAlertException.class); - - // then - assertThat(throwException).isEqualToComparingFieldByField( - new BadRequestAlertException("Some Dummy Test Violation", "share", "shareInvalidTestDummy")); - } - - @Test - public void saveShouldUpdateValidTransactions() { - // given - final ShareDTO givenShareDTO = givenShareDTO(anyNonNullId(), ShareAction.SUBSCRIPTION, anyPositiveNumber()); - doNothing().when(shareValidator).validate(givenShareDTO); - - // when - final ShareDTO returnedShareDto = shareService.save(givenShareDTO); - - // then - verify(em).flush(); - verify(em).refresh(any(Share.class)); - assertThat(returnedShareDto).isEqualToIgnoringGivenFields(givenShareDTO, "id"); - } - - @Test - public void saveShouldNotUpdateInvalidTransactions() { - // given - final ShareDTO givenShareDTO = givenShareDTO(anyNonNullId(), ShareAction.SUBSCRIPTION, anyNegativeNumber()); - // HINT: given(...) can't be used for void methods, in that case use Mockito's do...() methods - doThrow(new BadRequestAlertException("Some Dummy Test Violation", "share", "shareInvalidTestDummy")) - .when(shareValidator) - .validate(givenShareDTO); - - // when - final Throwable throwException = catchThrowableOfType( - () -> shareService.save(givenShareDTO), - BadRequestAlertException.class); - - // then - assertThat(throwException).isEqualToComparingFieldByField( - new BadRequestAlertException("Some Dummy Test Violation", "share", "shareInvalidTestDummy")); - } - - // --- only test fixture code below --- - - private long anyNonNullId() { - return RandomUtils.nextInt(); - } - - // HINT: This rather complicated setup indicates that the method ShareService::save breaks the single responsibility - // principle. - private ShareDTO givenShareDTO(final Long id, final ShareAction givenAction, final int givenQuantity) { - final ShareDTO givenShareDTO = createShareDTO(id, givenAction, givenQuantity); - - // dto -> entity - final Share givenShareEntity = Mockito.mock(Share.class); - given(shareMapper.toEntity(same(givenShareDTO))).willReturn(givenShareEntity); - - // shareRepository.save(entity); - final Share persistedShareEntity = Mockito.mock(Share.class); - given(shareRepository.save(same(givenShareEntity))).willReturn(persistedShareEntity); - - // entity -> dto - ShareDTO persistedShareDTO = createShareDTO(id == null ? RandomUtils.nextLong() : id, givenAction, givenQuantity); - given(shareMapper.toDto(same(persistedShareEntity))).willReturn(persistedShareDTO); - - return givenShareDTO; - } - - private ShareDTO createShareDTO(Long id, ShareAction givenAction, int givenQuantity) { - final ShareDTO givenShareDTO = new ShareDTO(); - givenShareDTO.setId(id); - givenShareDTO.setAction(givenAction); - givenShareDTO.setQuantity(givenQuantity); - return givenShareDTO; - } - - private int anyPositiveNumber() { - return RandomUtils.nextInt(1, 1000); - } - - private int anyNegativeNumber() { - return -anyPositiveNumber(); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/ShareValidatorUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/ShareValidatorUnitTest.java deleted file mode 100644 index 6f8993b7..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/ShareValidatorUnitTest.java +++ /dev/null @@ -1,190 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowableOfType; - -import org.hostsharing.hsadminng.domain.enumeration.ShareAction; -import org.hostsharing.hsadminng.service.dto.ShareDTO; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.apache.commons.lang3.RandomUtils; -import org.assertj.core.api.AbstractThrowableAssert; -import org.junit.Test; - -import java.time.LocalDate; -import java.util.function.Consumer; - -public class ShareValidatorUnitTest { - - private ShareValidator shareValidator = new ShareValidator(); - - @Test - public void shouldAcceptValidSubscription() { - new GivenShareValidationTestCase() - .withAnyValidDateValues() - .withAction(ShareAction.SUBSCRIPTION) - .withQuantity(1) - .when((ShareDTO shareDto) -> shareValidator.validate(shareDto)) - .thenActualException() - .isNull(); - } - - @Test - public void shouldAcceptValidCancellation() { - new GivenShareValidationTestCase() - .withAnyValidDateValues() - .withAction(ShareAction.CANCELLATION) - .withQuantity(-1) - .when((ShareDTO shareDto) -> shareValidator.validate(shareDto)) - .thenActualException() - .isNull(); - } - - @Test - public void shouldAcceptIfDocumentDateEqualsValueDate() { - new GivenShareValidationTestCase() - .withDocumentDate("2019-04-11") - .withValueDate("2019-04-11") - .withAction(ShareAction.SUBSCRIPTION) - .withQuantity(1) - .when((ShareDTO shareDto) -> shareValidator.validate(shareDto)) - .thenActualException() - .isNull(); - } - - @Test - public void shouldRejectUpdates() { - new GivenShareValidationTestCase() - .withId(RandomUtils.nextLong()) - .when((ShareDTO shareDto) -> shareValidator.validate(shareDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Share transactions are immutable", - "share", - "shareTransactionImmutable")); - } - - @Test - public void shouldRejectIfDocumentDateAfterValueDate() { - new GivenShareValidationTestCase() - .withDocumentDate("2019-04-13") - .withValueDate("2019-04-12") - .withAction(ShareAction.SUBSCRIPTION) - .withQuantity(1) - .when((ShareDTO shareDto) -> shareValidator.validate(shareDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Document date may not be after value date", - "share", - "documentDateMayNotBeAfterValueDate")); - } - - @Test - public void shouldRejectIfSubscriptionWithNegativeQuantity() { - new GivenShareValidationTestCase() - .withAnyValidDateValues() - .withAction(ShareAction.SUBSCRIPTION) - .withQuantity(-1) - .when((ShareDTO shareDto) -> shareValidator.validate(shareDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Share subscriptions require a positive quantity", - "share", - "shareSubscriptionPositiveQuantity")); - } - - @Test - public void shouldRejectIfSubscriptionWithZeroQuantity() { - new GivenShareValidationTestCase() - .withAnyValidDateValues() - .withAction(ShareAction.SUBSCRIPTION) - .withQuantity(0) - .when((ShareDTO shareDto) -> shareValidator.validate(shareDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Share subscriptions require a positive quantity", - "share", - "shareSubscriptionPositiveQuantity")); - } - - @Test - public void shouldRejectIfCancellationWithPositiveQuantity() { - new GivenShareValidationTestCase() - .withAnyValidDateValues() - .withAction(ShareAction.CANCELLATION) - .withQuantity(1) - .when((ShareDTO shareDto) -> shareValidator.validate(shareDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Share cancellations require a negative quantity", - "share", - "shareCancellationNegativeQuantity")); - } - - @Test - public void shouldRejectIfCancellationWithZeroQuantity() { - new GivenShareValidationTestCase() - .withAnyValidDateValues() - .withAction(ShareAction.CANCELLATION) - .withQuantity(0) - .when((ShareDTO shareDto) -> shareValidator.validate(shareDto)) - .thenActualException() - .isEqualToComparingFieldByField( - new BadRequestAlertException( - "Share cancellations require a negative quantity", - "share", - "shareCancellationNegativeQuantity")); - } - - // -- only test fixture below --- - - private class GivenShareValidationTestCase { - - private final ShareDTO shareDto = new ShareDTO(); - private BadRequestAlertException actualException; - - public GivenShareValidationTestCase withId(long id) { - shareDto.setId(id); - return this; - } - - GivenShareValidationTestCase withDocumentDate(String documentDate) { - shareDto.setDocumentDate(LocalDate.parse(documentDate)); - return this; - } - - GivenShareValidationTestCase withValueDate(String valueDate) { - shareDto.setValueDate(LocalDate.parse(valueDate)); - return this; - } - - public GivenShareValidationTestCase withAnyValidDateValues() { - return withDocumentDate("2019-04-11").withValueDate("2019-04-12"); - } - - GivenShareValidationTestCase withAction(ShareAction shareAction) { - shareDto.setAction(shareAction); - return this; - } - - GivenShareValidationTestCase withQuantity(Integer quantity) { - shareDto.setQuantity(quantity); - return this; - } - - GivenShareValidationTestCase when(final Consumer statement) { - actualException = catchThrowableOfType(() -> shareValidator.validate(shareDto), BadRequestAlertException.class); - return this; - } - - public AbstractThrowableAssert thenActualException() { - return assertThat(actualException); - } - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/UserRoleAssignmentServiceUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/UserRoleAssignmentServiceUnitTest.java deleted file mode 100644 index de103658..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/UserRoleAssignmentServiceUnitTest.java +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowable; -import static org.mockito.BDDMockito.given; - -import org.hostsharing.hsadminng.domain.UserRoleAssignment; -import org.hostsharing.hsadminng.repository.UserRoleAssignmentRepository; -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerContractualContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerFinancialContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerTechnicalContact; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextFake; - -import com.google.common.base.VerifyException; - -import org.junit.Rule; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -import java.util.Arrays; -import java.util.Set; - -public class UserRoleAssignmentServiceUnitTest { - - @Rule - public MockitoRule mockitoRule = MockitoJUnit.rule(); - - @Mock - private UserRoleAssignmentRepository userRoleAssignmentRepository; - - @InjectMocks - private UserRoleAssignmentService userRoleAssignmentService; - - @Test - public void getEffectiveRoleOfCurrentUserReturnsEmptySetIfUserNotAuthenticated() { - // when - final Set actual = userRoleAssignmentService.getEffectiveRoleOfCurrentUser("test.Something", 1L); - - // then - assertThat(actual).isEmpty(); - } - - @Test - public void getEffectiveRoleOfCurrentUserReturnsEmptySetIfUserAuthenticatedButNoRolesAssigned() { - // given - SecurityContextFake.havingAuthenticatedUser(); - - // when - final Set actual = userRoleAssignmentService.getEffectiveRoleOfCurrentUser("test.Something", 1L); - - // then - assertThat(actual).isEmpty(); - } - - @Test - public void getEffectiveRoleOfCurrentUserReturnsExactlyAssignedRoles() { - // given - final String givenUserLogin = "someUser"; - SecurityContextFake.havingAuthenticatedUser(givenUserLogin); - final long givenEntityObjectId = 2L; - final String givenEntityTypeId = "test.Something"; - given(userRoleAssignmentRepository.findByLogin(givenUserLogin)).willReturn( - Arrays.asList( - new UserRoleAssignment().entityTypeId("test.SomethingElse") - .entityObjectId(givenEntityObjectId) - .assignedRole(CustomerContractualContact.ROLE), - new UserRoleAssignment().entityTypeId(givenEntityTypeId) - .entityObjectId(givenEntityObjectId) - .assignedRole(CustomerFinancialContact.ROLE), - new UserRoleAssignment().entityTypeId(givenEntityTypeId) - .entityObjectId(givenEntityObjectId) - .assignedRole(CustomerTechnicalContact.ROLE), - new UserRoleAssignment().entityTypeId(givenEntityTypeId) - .entityObjectId(3L) - .assignedRole(CustomerContractualContact.ROLE))); - - // when - final Set actual = userRoleAssignmentService - .getEffectiveRoleOfCurrentUser(givenEntityTypeId, givenEntityObjectId); - - // then - assertThat(actual) - .containsExactlyInAnyOrder(Role.of(CustomerFinancialContact.class), Role.of(CustomerTechnicalContact.class)); - } - - @Test - public void getEffectiveRoleOfCurrentUserThrowsExceptionIfEntityTypeIdIsMissing() { - // when - final Throwable actual = catchThrowable(() -> userRoleAssignmentService.getEffectiveRoleOfCurrentUser(null, 1L)); - - // then - assertThat(actual).isInstanceOf(VerifyException.class); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/UserServiceIntTest.java b/src/test/java/org/hostsharing/hsadminng/service/UserServiceIntTest.java deleted file mode 100644 index d872bf32..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/UserServiceIntTest.java +++ /dev/null @@ -1,194 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.Mockito.when; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.config.Constants; -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.repository.UserRepository; -import org.hostsharing.hsadminng.service.dto.UserDTO; -import org.hostsharing.hsadminng.service.util.RandomUtil; - -import org.apache.commons.lang3.RandomStringUtils; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.data.auditing.AuditingHandler; -import org.springframework.data.auditing.DateTimeProvider; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageRequest; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.transaction.annotation.Transactional; - -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.temporal.ChronoUnit; -import java.util.List; -import java.util.Optional; - -/** - * Test class for the UserResource REST controller. - * - * @see UserService - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -@Transactional -public class UserServiceIntTest { - - @Autowired - private UserRepository userRepository; - - @Autowired - private UserService userService; - - @Autowired - private AuditingHandler auditingHandler; - - @Mock - DateTimeProvider dateTimeProvider; - - private User user; - - @Before - public void init() { - user = new User(); - user.setLogin("johndoe"); - user.setPassword(RandomStringUtils.random(60)); - user.setActivated(true); - user.setEmail("johndoe@localhost"); - user.setFirstName("john"); - user.setLastName("doe"); - user.setImageUrl("http://placehold.it/50x50"); - user.setLangKey("en"); - - when(dateTimeProvider.getNow()).thenReturn(Optional.of(LocalDateTime.now())); - auditingHandler.setDateTimeProvider(dateTimeProvider); - } - - @Test - @Transactional - public void assertThatUserMustExistToResetPassword() { - userRepository.saveAndFlush(user); - Optional maybeUser = userService.requestPasswordReset("invalid.login@localhost"); - assertThat(maybeUser).isNotPresent(); - - maybeUser = userService.requestPasswordReset(user.getEmail()); - assertThat(maybeUser).isPresent(); - assertThat(maybeUser.orElse(null).getEmail()).isEqualTo(user.getEmail()); - assertThat(maybeUser.orElse(null).getResetDate()).isNotNull(); - assertThat(maybeUser.orElse(null).getResetKey()).isNotNull(); - } - - @Test - @Transactional - public void assertThatOnlyActivatedUserCanRequestPasswordReset() { - user.setActivated(false); - userRepository.saveAndFlush(user); - - Optional maybeUser = userService.requestPasswordReset(user.getLogin()); - assertThat(maybeUser).isNotPresent(); - userRepository.delete(user); - } - - @Test - @Transactional - public void assertThatResetKeyMustNotBeOlderThan24Hours() { - Instant daysAgo = Instant.now().minus(25, ChronoUnit.HOURS); - String resetKey = RandomUtil.generateResetKey(); - user.setActivated(true); - user.setResetDate(daysAgo); - user.setResetKey(resetKey); - userRepository.saveAndFlush(user); - - Optional maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); - assertThat(maybeUser).isNotPresent(); - userRepository.delete(user); - } - - @Test - @Transactional - public void assertThatResetKeyMustBeValid() { - Instant daysAgo = Instant.now().minus(25, ChronoUnit.HOURS); - user.setActivated(true); - user.setResetDate(daysAgo); - user.setResetKey("1234"); - userRepository.saveAndFlush(user); - - Optional maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); - assertThat(maybeUser).isNotPresent(); - userRepository.delete(user); - } - - @Test - @Transactional - public void assertThatUserCanResetPassword() { - String oldPassword = user.getPassword(); - Instant daysAgo = Instant.now().minus(2, ChronoUnit.HOURS); - String resetKey = RandomUtil.generateResetKey(); - user.setActivated(true); - user.setResetDate(daysAgo); - user.setResetKey(resetKey); - userRepository.saveAndFlush(user); - - Optional maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); - assertThat(maybeUser).isPresent(); - assertThat(maybeUser.orElse(null).getResetDate()).isNull(); - assertThat(maybeUser.orElse(null).getResetKey()).isNull(); - assertThat(maybeUser.orElse(null).getPassword()).isNotEqualTo(oldPassword); - - userRepository.delete(user); - } - - @Test - @Transactional - public void testFindNotActivatedUsersByCreationDateBefore() { - Instant now = Instant.now(); - when(dateTimeProvider.getNow()).thenReturn(Optional.of(now.minus(4, ChronoUnit.DAYS))); - user.setActivated(false); - User dbUser = userRepository.saveAndFlush(user); - dbUser.setCreatedDate(now.minus(4, ChronoUnit.DAYS)); - userRepository.saveAndFlush(user); - List users = userRepository.findAllByActivatedIsFalseAndCreatedDateBefore(now.minus(3, ChronoUnit.DAYS)); - assertThat(users).isNotEmpty(); - userService.removeNotActivatedUsers(); - users = userRepository.findAllByActivatedIsFalseAndCreatedDateBefore(now.minus(3, ChronoUnit.DAYS)); - assertThat(users).isEmpty(); - } - - @Test - @Transactional - public void assertThatAnonymousUserIsNotGet() { - user.setLogin(Constants.ANONYMOUS_USER); - if (!userRepository.findOneByLogin(Constants.ANONYMOUS_USER).isPresent()) { - userRepository.saveAndFlush(user); - } - final PageRequest pageable = PageRequest.of(0, (int) userRepository.count()); - final Page allManagedUsers = userService.getAllManagedUsers(pageable); - assertThat( - allManagedUsers.getContent() - .stream() - .noneMatch(user -> Constants.ANONYMOUS_USER.equals(user.getLogin()))) - .isTrue(); - } - - @Test - @Transactional - public void testRemoveNotActivatedUsers() { - // custom "now" for audit to use as creation date - when(dateTimeProvider.getNow()).thenReturn(Optional.of(Instant.now().minus(30, ChronoUnit.DAYS))); - - user.setActivated(false); - userRepository.saveAndFlush(user); - - assertThat(userRepository.findOneByLogin("johndoe")).isPresent(); - userService.removeNotActivatedUsers(); - assertThat(userRepository.findOneByLogin("johndoe")).isNotPresent(); - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonAccessFilterTest.java b/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonAccessFilterTest.java deleted file mode 100644 index dd6a1ba1..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonAccessFilterTest.java +++ /dev/null @@ -1,34 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; - -import org.junit.Test; -import org.mockito.Mock; - -public class JSonAccessFilterTest { - - @Mock - private UserRoleAssignmentService userRoleAssignmentService; - - @Test - public void getLoginUserRoles() { - SecurityContextFake.havingUnauthenticatedUser(); - new JSonAccessFilter(null, userRoleAssignmentService, new TestEntity()) { - - { - assertThat(this.getLoginUserRoles()).hasSize(0); - } - }; - } - - private static class TestEntity implements AccessMappings { - - @Override - public Long getId() { - return null; - } - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonAccessFilterTestFixture.java b/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonAccessFilterTestFixture.java deleted file mode 100644 index ecb9fc02..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonAccessFilterTestFixture.java +++ /dev/null @@ -1,237 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import static org.hostsharing.hsadminng.service.accessfilter.Role.*; - -import org.hostsharing.hsadminng.service.IdToDtoResolver; -import org.hostsharing.hsadminng.service.dto.FluentBuilder; - -import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.RandomUtils; - -import java.math.BigDecimal; -import java.time.LocalDate; - -public class JSonAccessFilterTestFixture { - - static GivenDto createSampleDto() { - final GivenDto dto = new GivenDto(); - dto.customerId = 888L; - dto.restrictedField = RandomStringUtils.randomAlphabetic(10); - dto.openStringField = RandomStringUtils.randomAlphabetic(10); - dto.openIntegerField = RandomUtils.nextInt(); - dto.openPrimitiveIntField = RandomUtils.nextInt(); - dto.openLongField = RandomUtils.nextLong(); - dto.openPrimitiveLongField = RandomUtils.nextLong(); - dto.openBooleanField = true; - dto.openPrimitiveBooleanField = false; - dto.openBigDecimalField = new BigDecimal("987654321234567890987654321234567890.09"); - dto.openLocalDateField = LocalDate.parse("2019-04-25"); - dto.openLocalDateFieldAsString = "2019-04-25"; - dto.openEnumField = TestEnum.GREEN; - dto.openEnumFieldAsString = "GREEN"; - return dto; - } - - @EntityTypeId("test.GivenCustomer") - static class GivenCustomerDto implements FluentBuilder { - - @SelfId(resolver = GivenService.class) - @AccessFor(read = Anybody.class) - Long id; - - @AccessFor(update = Ignored.class, read = Anybody.class) - String displayLabel; - - } - - static abstract class GivenCustomerService implements IdToDtoResolver { - } - - @EntityTypeId("test.Given") - static class GivenDto implements AccessMappings, FluentBuilder { - - @SelfId(resolver = GivenService.class) - @AccessFor(read = Anybody.class) - Long id; - - @ParentId(resolver = GivenCustomerService.class) - @AccessFor(init = AnyCustomerUser.class, update = AnyCustomerUser.class, read = AnyCustomerUser.class) - Long customerId; - - @AccessFor( - init = { CustomerTechnicalContact.class, CustomerFinancialContact.class }, - update = { CustomerTechnicalContact.class, CustomerFinancialContact.class }, - read = { CustomerTechnicalContact.class, CustomerFinancialContact.class }) - String restrictedField; - - @AccessFor(init = Anybody.class, update = Anybody.class, read = Anybody.class) - String openStringField; - - @AccessFor(init = Anybody.class, update = Anybody.class, read = Anybody.class) - Integer openIntegerField; - - @AccessFor(init = Anybody.class, update = Anybody.class, read = Anybody.class) - int openPrimitiveIntField; - - @AccessFor(init = Anybody.class, update = Anybody.class, read = Anybody.class) - Long openLongField; - - @AccessFor(init = Anybody.class, update = Anybody.class, read = Anybody.class) - long openPrimitiveLongField; - - @AccessFor(init = Anybody.class, update = Anybody.class, read = Anybody.class) - Boolean openBooleanField; - - @AccessFor(read = Anybody.class) - boolean openPrimitiveBooleanField; - - @AccessFor(init = Anybody.class, update = Anybody.class, read = Anybody.class) - LocalDate openLocalDateField; - transient String openLocalDateFieldAsString; - - @AccessFor(init = Anybody.class, update = Anybody.class, read = Anybody.class) - LocalDate openLocalDateField2; - transient String openLocalDateField2AsString; - - @AccessFor(init = Anybody.class, update = Anybody.class, read = Anybody.class) - TestEnum openEnumField; - transient String openEnumFieldAsString; - - @AccessFor(init = Anybody.class, update = Anybody.class, read = Anybody.class) - BigDecimal openBigDecimalField; - - @AccessFor(init = Supporter.class, update = Supporter.class, read = Supporter.class) - BigDecimal restrictedBigDecimalField; - - @AccessFor(init = Anybody.class, update = Anybody.class, read = Anybody.class) - int[] openArrayField; - - @AccessFor(init = Ignored.class, update = Ignored.class, read = Anybody.class) - String displayLabel; - - @Override - public Long getId() { - return id; - } - } - - static abstract class GivenService implements IdToDtoResolver { - } - - enum TestEnum { - BLUE, - GREEN - } - - static abstract class GivenChildService implements IdToDtoResolver { - } - - public static class GivenChildDto implements AccessMappings, FluentBuilder { - - @SelfId(resolver = GivenChildService.class) - @AccessFor(read = AnyCustomerUser.class) - Long id; - - @AccessFor( - init = CustomerContractualContact.class, - update = CustomerContractualContact.class, - read = AnyCustomerUser.class) - @ParentId(resolver = GivenService.class) - Long parentId; - - @AccessFor( - init = { CustomerTechnicalContact.class, CustomerFinancialContact.class }, - update = { - CustomerTechnicalContact.class, - CustomerFinancialContact.class }) - String restrictedField; - - @Override - public Long getId() { - return id; - } - } - - public static class GivenDtoWithMultipleSelfId implements AccessMappings { - - @SelfId(resolver = GivenChildService.class) - @AccessFor(read = AnyCustomerUser.class) - Long id; - - @SelfId(resolver = GivenChildService.class) - @AccessFor(read = AnyCustomerUser.class) - Long id2; - - @Override - public Long getId() { - return id; - } - } - - public static class GivenDtoWithUnknownFieldType implements AccessMappings { - - @SelfId(resolver = GivenChildService.class) - @AccessFor(read = Anybody.class) - Long id; - - @AccessFor(init = Anybody.class, read = Anybody.class) - Arbitrary unknown; - - @Override - public Long getId() { - return id; - } - } - - static class Arbitrary { - } - - @EntityTypeId("givenParent") - public static class GivenParent implements AccessMappings, FluentBuilder { - - @SelfId(resolver = GivenParentService.class) - @AccessFor(read = AnyCustomerUser.class) - Long id; - - @Override - public Long getId() { - return id; - } - - public GivenParent id(final long id) { - this.id = id; - return this; - } - } - - public static class GivenChild implements AccessMappings, FluentBuilder { - - @SelfId(resolver = GivenChildService.class) - @AccessFor(read = AnyCustomerUser.class) - Long id; - - @AccessFor( - init = CustomerContractualContact.class, - update = CustomerContractualContact.class, - read = AnyCustomerUser.class) - @ParentId(resolver = GivenParentService.class) - GivenParent parent; - - @AccessFor( - init = { CustomerTechnicalContact.class, CustomerFinancialContact.class }, - update = { - CustomerTechnicalContact.class, - CustomerFinancialContact.class }) - String restrictedField; - - @Override - public Long getId() { - return id; - } - } - - static abstract class GivenParentService implements IdToDtoResolver { - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonBuilder.java b/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonBuilder.java deleted file mode 100644 index e25cac6a..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonBuilder.java +++ /dev/null @@ -1,91 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.tuple.ImmutablePair; - -import java.util.List; - -public class JSonBuilder { - - private StringBuilder json = new StringBuilder(); - - @SafeVarargs - public static String asJSon(final ImmutablePair... properties) { - final StringBuilder json = new StringBuilder(); - for (ImmutablePair prop : properties) { - json.append(inQuotes(prop.left)); - json.append(": "); - if (prop.right instanceof Number) { - json.append(prop.right); - } else if (prop.right instanceof List) { - json.append(toJSonArray(prop.right)); - } else if (prop.right instanceof String && ((String) prop.right).startsWith("{\n")) { - // TODO mhoennig: find better solution for adding object nodes - json.append(prop.right); - } else { - json.append(inQuotes(prop.right)); - } - json.append(",\n"); - } - return "{\n" + json.substring(0, json.length() - 2) + "\n}"; - } - - public JSonBuilder withFieldValue(String name, String value) { - json.append(inQuotes(name)).append(":").append(value != null ? inQuotes(value) : "null").append(","); - return this; - } - - public JSonBuilder withFieldValue(String name, Number value) { - json.append(inQuotes(name)).append(":").append(value != null ? value : "null").append(","); - return this; - } - - public JSonBuilder toJSonNullFieldDefinition(String name) { - json.append(inQuotes(name)).append(":null,"); - return this; - } - - public JSonBuilder withFieldValueIfPresent(String name, String value) { - if (value != null) { - json.append(inQuotes(name)).append(":").append(inQuotes(value)).append(","); - } - return this; - } - - public JSonBuilder withFieldValueIfPresent(String name, Number value) { - if (value != null) { - json.append(inQuotes(name)).append(":").append(value).append(","); - } - return this; - } - - public > JSonBuilder withFieldValueIfPresent(final String name, final Role value) { - if (value != null) { - json.append(inQuotes(name)).append(":").append(inQuotes(value.name())).append(","); - } - return this; - } - - @Override - public String toString() { - return "{" + StringUtils.removeEnd(json.toString(), ",") + "}"; - } - - @SuppressWarnings("unchecked") - // currently just for the case of date values represented as arrays of integer - private static String toJSonArray(final Object value) { - final StringBuilder jsonArray = new StringBuilder("["); - for (int n = 0; n < ((List) value).size(); ++n) { - if (n > 0) { - jsonArray.append(","); - } - jsonArray.append(((List) value).get(n)); - } - return jsonArray.toString() + "]"; - } - - private static String inQuotes(Object value) { - return value != null ? "\"" + value.toString() + "\"" : "null"; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonDeserializationWithAccessFilterUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonDeserializationWithAccessFilterUnitTest.java deleted file mode 100644 index 6e3ebc56..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonDeserializationWithAccessFilterUnitTest.java +++ /dev/null @@ -1,579 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowable; -import static org.assertj.core.api.Assumptions.assumeThat; -import static org.hostsharing.hsadminng.service.accessfilter.JSonAccessFilterTestFixture.*; -import static org.hostsharing.hsadminng.service.accessfilter.JSonBuilder.asJSon; -import static org.mockito.BDDMockito.given; - -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.Role.Admin; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.ObjectCodec; -import com.fasterxml.jackson.core.TreeNode; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.ObjectMapper; - -import org.apache.commons.lang3.NotImplementedException; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; -import org.springframework.beans.factory.config.AutowireCapableBeanFactory; -import org.springframework.context.ApplicationContext; - -import java.io.IOException; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.util.Arrays; -import java.util.Optional; - -@SuppressWarnings("ALL") -public class JSonDeserializationWithAccessFilterUnitTest { - - public static final String SOME_BIG_DECIMAL_AS_STRING = "5432191234888.1"; - public static final BigDecimal SOME_BIG_DECIMAL = new BigDecimal(SOME_BIG_DECIMAL_AS_STRING) - .setScale(2, BigDecimal.ROUND_HALF_UP); - public static final BigDecimal SOME_BIG_DECIMAL_WITH_ANOTHER_SCALE = new BigDecimal(SOME_BIG_DECIMAL_AS_STRING) - .setScale(5, BigDecimal.ROUND_HALF_UP); - @Rule - public MockitoRule mockitoRule = MockitoJUnit.rule(); - - @Mock - private ApplicationContext ctx; - - @Mock - private AutowireCapableBeanFactory autowireCapableBeanFactory; - - @Mock - private JsonParser jsonParser; - - @Mock - private ObjectCodec codec; - - @Mock - private TreeNode treeNode; - - @Mock - private UserRoleAssignmentService userRoleAssignmentService; - - @Mock - private GivenService givenService; - - @Mock - private GivenChildService givenChildService; - - @Mock - private GivenParentService givenParentService; - - @Mock - private GivenCustomerService givenCustomerService; - private SecurityContextMock securityContext; - - @Before - public void init() { - securityContext = SecurityContextMock.usingMock(userRoleAssignmentService) - .havingAuthenticatedUser() - .withRole(GivenDto.class, 1234L, Role.AnyCustomerUser.ROLE); - - given(ctx.getAutowireCapableBeanFactory()).willReturn(autowireCapableBeanFactory); - given(autowireCapableBeanFactory.createBean(GivenService.class)).willReturn(givenService); - given(givenService.findOne(1234L)).willReturn( - Optional.of( - new GivenDto() - .with(dto -> { - dto.id = 1234L; - dto.customerId = 888L; - dto.openIntegerField = 11111; - dto.openPrimitiveIntField = 2222; - dto.openLongField = 33333333333333L; - dto.openPrimitiveLongField = 44444444L; - dto.openBooleanField = true; - dto.openPrimitiveBooleanField = false; - dto.openBigDecimalField = SOME_BIG_DECIMAL; - dto.openStringField = "3333"; - dto.restrictedField = "initial value of restricted field"; - dto.restrictedBigDecimalField = SOME_BIG_DECIMAL; - }))); - given(autowireCapableBeanFactory.createBean(GivenCustomerService.class)).willReturn(givenCustomerService); - given(givenCustomerService.findOne(888L)).willReturn( - Optional.of( - new GivenCustomerDto() - .with(dto -> dto.id = 888L))); - - given(autowireCapableBeanFactory.createBean(GivenChildService.class)).willReturn(givenChildService); - given(autowireCapableBeanFactory.createBean(GivenParentService.class)).willReturn(givenParentService); - - given(jsonParser.getCodec()).willReturn(codec); - } - - @Test - public void shouldDeserializeNullField() throws IOException { - // given - givenJSonTree( - asJSon( - ImmutablePair.of("id", 1234L), - ImmutablePair.of("customerId", 888L), - ImmutablePair.of("openStringField", null))); - - // when - final GivenDto actualDto = deserializerFor(GivenDto.class).deserialize(jsonParser, null); - - // then - assertThat(actualDto.openStringField).isNull(); - } - - @Test - public void shouldDeserializeStringField() throws IOException { - // given - givenJSonTree( - asJSon( - ImmutablePair.of("id", 1234L), - ImmutablePair.of("customerId", 888L), - ImmutablePair.of("openStringField", "String Value"))); - - // when - final GivenDto actualDto = deserializerFor(GivenDto.class).deserialize(jsonParser, null); - - // then - assertThat(actualDto.openStringField).isEqualTo("String Value"); - } - - @Test - public void shouldDeserializeIntegerField() throws IOException { - // given - givenJSonTree( - asJSon( - ImmutablePair.of("id", 1234L), - ImmutablePair.of("customerId", 888L), - ImmutablePair.of("openIntegerField", 1234))); - - // when - // @formatter:off - final GivenDto actualDto = deserializerFor(GivenDto.class).deserialize(jsonParser, null);; - // @formatter:on - - // then - assertThat(actualDto.openIntegerField).isEqualTo(1234); - } - - @Test - public void shouldDeserializeRestrictedBigDecimalFieldIfUnchangedByCompareTo() throws IOException { - // given - assumeThat(SOME_BIG_DECIMAL_WITH_ANOTHER_SCALE).isNotEqualTo(SOME_BIG_DECIMAL); - givenJSonTree( - asJSon( - ImmutablePair.of("id", 1234L), - ImmutablePair.of("customerId", 888L), - ImmutablePair.of("restrictedBigDecimalField", SOME_BIG_DECIMAL_WITH_ANOTHER_SCALE))); - - // when - final GivenDto actualDto = deserializerFor(GivenDto.class).deserialize(jsonParser, null); - ; - - // then - assertThat(actualDto.restrictedBigDecimalField).isEqualByComparingTo(SOME_BIG_DECIMAL); - assertThat(actualDto.restrictedBigDecimalField).isEqualByComparingTo(SOME_BIG_DECIMAL_WITH_ANOTHER_SCALE); - } - - @Test - // TODO: split in separate tests for each type, you see all errors at once (if any) and it's easier to debug when there are - // problems - public void shouldDeserializeAcessibleFieldOfAnyType() throws IOException { - // given - givenJSonTree( - asJSon( - ImmutablePair.of("id", 1234L), - ImmutablePair.of("customerId", 888L), - ImmutablePair.of("openIntegerField", 11), - ImmutablePair.of("openPrimitiveIntField", 22), - ImmutablePair.of("openLongField", 333333333333333333L), - ImmutablePair.of("openPrimitiveLongField", 44444L), - ImmutablePair.of("openBooleanField", true), - ImmutablePair.of("openPrimitiveBooleanField", false), - // TODO: ImmutablePair.of("openBigDecimalField", new BigDecimal("99999999999999999999.1")), - // check why DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS is not working! - ImmutablePair.of("openBigDecimalField", new BigDecimal("99999999999999.1")), - ImmutablePair.of("openLocalDateField", LocalDate.parse("2019-04-25")), - ImmutablePair.of("openLocalDateField2", Arrays.asList(2019, 4, 24)), - ImmutablePair.of("openEnumField", TestEnum.GREEN))); - - // when - final GivenDto actualDto = deserializerFor(GivenDto.class).deserialize(jsonParser, null); - ; - - // then - assertThat(actualDto.openIntegerField).isEqualTo(11); - assertThat(actualDto.openPrimitiveIntField).isEqualTo(22); - assertThat(actualDto.openLongField).isEqualTo(333333333333333333L); - assertThat(actualDto.openPrimitiveLongField).isEqualTo(44444L); - assertThat(actualDto.openBooleanField).isEqualTo(true); - assertThat(actualDto.openPrimitiveBooleanField).isEqualTo(false); - assertThat(actualDto.openBigDecimalField).isEqualTo(new BigDecimal("99999999999999.1")); - assertThat(actualDto.openLocalDateField).isEqualTo(LocalDate.parse("2019-04-25")); - assertThat(actualDto.openLocalDateField2).isEqualTo(LocalDate.parse("2019-04-24")); - assertThat(actualDto.openEnumField).isEqualTo(TestEnum.GREEN); - } - - @Test - public void shouldNotDeserializeFieldWithUnknownJSonNodeType() throws IOException { - // given - givenJSonTree( - asJSon( - ImmutablePair.of("id", 1234L), - ImmutablePair.of("customerId", 888L), - ImmutablePair.of("openArrayField", Arrays.asList(11, 22, 33)))); - - // when - Throwable exception = catchThrowable(() -> deserializerFor(GivenDto.class).deserialize(jsonParser, null)); - - // then - assertThat(exception).isInstanceOf(NotImplementedException.class); - } - - @Test - public void shouldDeserializeStringFieldIfRequiredRoleIsCoveredByUser() throws IOException { - // given - securityContext.havingAuthenticatedUser() - .withRole(GivenCustomerDto.class, 888L, Role.CustomerFinancialContact.ROLE); - givenJSonTree( - asJSon( - ImmutablePair.of("id", 1234L), - ImmutablePair.of("customerId", 888L), - ImmutablePair.of("restrictedField", "update value of restricted field"))); - - // when - final GivenDto actualDto = deserializerFor(GivenDto.class).deserialize(jsonParser, null); - - // then - assertThat(actualDto.restrictedField).isEqualTo("update value of restricted field"); - } - - @Test - public void shouldDeserializeUnchangedStringFieldIfRequiredRoleIsNotCoveredByUser() throws IOException { - // given - securityContext.havingAuthenticatedUser() - .withRole(GivenCustomerDto.class, 888L, Role.CustomerFinancialContact.ROLE); - givenJSonTree( - asJSon( - ImmutablePair.of("id", 1234L), - ImmutablePair.of("customerId", 888L), - ImmutablePair.of("restrictedField", "initial value of restricted field"))); - - // when - final GivenDto actualDto = deserializerFor(GivenDto.class).deserialize(jsonParser, null); - - // then - assertThat(actualDto.restrictedField).isEqualTo("initial value of restricted field"); - } - - @Test - public void shouldNotDeserializeUpatedStringFieldIfRequiredRoleIsNotCoveredByUser() throws IOException { - // given - securityContext.havingAuthenticatedUser() - .withRole(GivenCustomerDto.class, 888L, Role.ActualCustomerUser.ROLE); - givenJSonTree( - asJSon( - ImmutablePair.of("customerId", 888L), - ImmutablePair.of("restrictedField", "updated value of restricted field"))); - - // when - final Throwable exception = catchThrowable(() -> deserializerFor(GivenDto.class).deserialize(jsonParser, null)); - - // then - assertThat(exception).isInstanceOfSatisfying(BadRequestAlertException.class, badRequestAlertException -> { - assertThat(badRequestAlertException.getParam()).isEqualTo("GivenDto.restrictedField"); - assertThat(badRequestAlertException.getErrorKey()).isEqualTo("initializationProhibited"); - }); - } - - @Test - public void shouldNotInitializeFieldIfRequiredRoleIsNotCoveredByUser() throws IOException { - // given - securityContext.havingAuthenticatedUser() - .withRole(GivenCustomerDto.class, 888L, Role.ActualCustomerUser.ROLE); - givenJSonTree( - asJSon( - ImmutablePair.of("customerId", 888L), - ImmutablePair.of("restrictedField", "another value of restricted field"))); - - // when - final Throwable exception = catchThrowable(() -> deserializerFor(GivenDto.class).deserialize(jsonParser, null)); - - // then - assertThat(exception).isInstanceOfSatisfying(BadRequestAlertException.class, badRequestAlertException -> { - assertThat(badRequestAlertException.getParam()).isEqualTo("GivenDto.restrictedField"); - assertThat(badRequestAlertException.getErrorKey()).isEqualTo("initializationProhibited"); - }); - } - - @Test - public void shouldNotCreateIfRoleRequiredByParentEntityIsNotCoveredByUser() throws IOException { - // given - securityContext.havingAuthenticatedUser() - .withRole(GivenCustomerDto.class, 9999L, Role.CustomerContractualContact.ROLE); - givenJSonTree( - asJSon( - ImmutablePair.of("parentId", 1234L))); - - // when - Throwable exception = catchThrowable( - () -> deserializerFor(GivenChildDto.class).deserialize(jsonParser, null)); - - // then - assertThat(exception).isInstanceOfSatisfying(BadRequestAlertException.class, badRequestAlertException -> { - assertThat(badRequestAlertException.getParam()).isEqualTo("GivenChildDto.parentId"); - assertThat(badRequestAlertException.getErrorKey()).isEqualTo("referencingProhibited"); - }); - } - - @Test - public void shouldCreateIfRoleRequiredByReferencedEntityIsCoveredByUser() throws IOException { - // given - securityContext.havingAuthenticatedUser() - .withRole(GivenCustomerDto.class, 888L, Role.CustomerContractualContact.ROLE); - givenJSonTree( - asJSon( - ImmutablePair.of("parentId", 1234L))); - - // when - final GivenChildDto actualDto = deserializerFor(GivenChildDto.class).deserialize(jsonParser, null); - ; - - // then - assertThat(actualDto.parentId).isEqualTo(1234L); - } - - @Test - public void shouldResolveParentIdFromIdOfSerializedSubEntity() throws IOException { - // given - securityContext.havingAuthenticatedUser() - .withRole(GivenParent.class, 1234L, Role.CustomerContractualContact.ROLE); - givenJSonTree( - asJSon( - ImmutablePair.of( - "parent", - asJSon( - ImmutablePair.of("id", 1234L))))); - given(givenParentService.findOne(1234L)).willReturn(Optional.of(new GivenParent().id(1234))); - - // when - final GivenChild actualDto = deserializerFor(GivenChild.class).deserialize(jsonParser, null); - - // then - assertThat(actualDto.parent.id).isEqualTo(1234L); - } - - @Test - public void shouldNotUpdateFieldIfRequiredRoleIsNotCoveredByUser() throws IOException { - // given - securityContext.havingAuthenticatedUser() - .withRole(GivenCustomerDto.class, 888L, Role.ActualCustomerUser.ROLE); - givenJSonTree( - asJSon( - ImmutablePair.of("id", 1234L), - ImmutablePair.of("customerId", 888L), - ImmutablePair.of("restrictedField", "Restricted String Value"))); - - // when - final Throwable exception = catchThrowable( - () -> deserializerFor(GivenDto.class).deserialize(jsonParser, null)); - - // then - assertThat(exception).isInstanceOfSatisfying(BadRequestAlertException.class, badRequestAlertException -> { - assertThat(badRequestAlertException.getParam()).isEqualTo("GivenDto.restrictedField"); - assertThat(badRequestAlertException.getErrorKey()).isEqualTo("updateProhibited"); - }); - } - - @Test - public void shouldDetectMultipleSelfIdFields() throws IOException { - // given - givenJSonTree(asJSon(ImmutablePair.of("id", 1111L))); - - // when - final Throwable exception = catchThrowable( - () -> deserializerFor(GivenDtoWithMultipleSelfId.class).deserialize(jsonParser, null)); - - // then - assertThat(exception).isInstanceOf(AssertionError.class) - .hasMessage("multiple @SelfId detected in GivenDtoWithMultipleSelfId"); - } - - @Test - public void shouldDetectUnknownFieldType() throws IOException { - // given - securityContext.havingAuthenticatedUser().withAuthority(AuthoritiesConstants.ADMIN); - givenJSonTree(asJSon(ImmutablePair.of("unknown", new Arbitrary()))); - - // when - final Throwable exception = catchThrowable( - () -> deserializerFor(GivenDtoWithUnknownFieldType.class).deserialize(jsonParser, null)); - - // then - assertThat(exception).isInstanceOf(NotImplementedException.class) - .hasMessageStartingWith("property type not yet implemented: ") - .hasMessageContaining("Arbitrary") - .hasMessageContaining("GivenDtoWithUnknownFieldType.unknown"); - } - - @Test - public void shouldDetectUnknownPropertyName() throws IOException { - // given - securityContext.havingAuthenticatedUser().withAuthority(AuthoritiesConstants.ADMIN); - givenJSonTree(asJSon(ImmutablePair.of("somePropWhichDoesNotExist", "Some Value"))); - - // when - final Throwable exception = catchThrowable( - () -> deserializerFor(GivenDto.class).deserialize(jsonParser, null)); - - // then - assertThat(exception).isInstanceOfSatisfying(BadRequestAlertException.class, (exc) -> { - assertThat(exc).hasMessageStartingWith("Unknown property"); - assertThat(exc.getParam()).isEqualTo("somePropWhichDoesNotExist"); - assumeThat(exc.getErrorKey()).isEqualTo("unknownProperty"); - }); - } - - @Test - public void shouldNotDeserializeArrayValue() throws IOException { - // given - securityContext.havingAuthenticatedUser().withAuthority(AuthoritiesConstants.ADMIN); - givenJSonTree(asJSon(ImmutablePair.of("openStringField", Arrays.asList(1, 2)))); - - // when - final Throwable exception = catchThrowable( - () -> deserializerFor(GivenDto.class).deserialize(jsonParser, null)); - - // then - assertThat(exception).isInstanceOf(NotImplementedException.class); - } - - @Test - public void shouldNotDeserializeObjectValue() throws IOException { - // given - securityContext.havingAuthenticatedUser().withAuthority(AuthoritiesConstants.ADMIN); - givenJSonTree("{ \"openStringField\": {\"a\": 1, \"b\": 2 } }"); - - // when - final Throwable exception = catchThrowable( - () -> deserializerFor(GivenDto.class).deserialize(jsonParser, null)); - - // then - assertThat(exception).isInstanceOf(NotImplementedException.class); - } - - @Test - public void shouldIgnorePropertyToIgnoreForInit() throws IOException { - // given - securityContext.havingAuthenticatedUser().withAuthority(Admin.ROLE.authority()); - givenJSonTree( - asJSon( - ImmutablePair.of("displayLabel", "Some Value"))); - - // when - deserializerFor(GivenDto.class).deserialize(jsonParser, null); - final Throwable exception = catchThrowable(() -> deserializerFor(GivenDto.class).deserialize(jsonParser, null)); - - // then - assertThat(exception).isNull(); - } - - @Test - public void shouldIgnorePropertyToIgnoreForUpdate() throws IOException { - // given - securityContext.havingAuthenticatedUser().withAuthority(AuthoritiesConstants.ADMIN); - givenJSonTree( - asJSon( - ImmutablePair.of("id", 1234L), - ImmutablePair.of("displayLabel", "Some Value"))); - - // when - final Throwable exception = catchThrowable(() -> deserializerFor(GivenDto.class).deserialize(jsonParser, null)); - - // then - assertThat(exception).isNull(); - } - - // --- only fixture code below --- - - private void givenJSonTree(String givenJSon) throws IOException { - final ObjectMapper objectMapper = new ObjectMapper(); - objectMapper.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS); - given(codec.readTree(jsonParser)).willReturn(new ObjectMapper().readTree(givenJSon)); - } - - // We need specialied factories for the deserializer subclasses - // so that the generic type can be accessed via reflection. - // And it's down here to keep the ugly formatting out of the test cases. - // The trick with the unused ...-parameterr might look strange but the reason is - // that I wanted the concrete class to be navigable in the tests and - // multiple deserializer(Class<...Dto>) methods would have the same erasure - // and adding the type the method name, is redundant for the reader. - - public JsonDeserializerWithAccessFilter deserializerFor( - final Class clazz, - final GivenDto... qualifier) { - return new JsonDeserializerWithAccessFilter(ctx, userRoleAssignmentService) { - // no need to overload any method here - }; - } - - public JsonDeserializerWithAccessFilter deserializerFor( - final Class clazz, - final GivenChildDto... qualifier) { - return new JsonDeserializerWithAccessFilter(ctx, userRoleAssignmentService) { - // no need to overload any method here - }; - } - - private JsonDeserializer deserializerFor( - final Class clazz, - final GivenDtoWithMultipleSelfId... qualifier) { - return new JsonDeserializerWithAccessFilter(ctx, userRoleAssignmentService) { - // no need to overload any method here - }; - } - - private JsonDeserializer deserializerFor( - final Class clazz, - final GivenDtoWithUnknownFieldType... qualifier) { - return new JsonDeserializerWithAccessFilter(ctx, userRoleAssignmentService) { - // no need to overload any method here - }; - } - - public JsonDeserializerWithAccessFilter deserializerFor( - final Class clazz, - final GivenChild... qualifier) { - return new JsonDeserializerWithAccessFilter(ctx, userRoleAssignmentService) { - - @Override - protected JSonFieldReader jsonFieldReader(final TreeNode treeNode, final Field field) { - if ("parent".equals(field.getName())) { - return (final GivenChild target) -> { - final long id = getSubNode(treeNode, "id").asLong(); - target.parent = givenParentService.findOne(id) - .orElseThrow( - () -> new BadRequestAlertException( - GivenParent.class.getSimpleName() + "#" + id + " not found", - String.valueOf(id), - "idNotFound")); - }; - } - return super.jsonFieldReader(treeNode, field); - } - }; - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonSerializationWithAccessFilterUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonSerializationWithAccessFilterUnitTest.java deleted file mode 100644 index a7f807b3..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/JSonSerializationWithAccessFilterUnitTest.java +++ /dev/null @@ -1,218 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowable; -import static org.hostsharing.hsadminng.service.accessfilter.JSonAccessFilterTestFixture.*; -import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.verify; - -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; - -import com.fasterxml.jackson.core.JsonGenerator; - -import org.apache.commons.lang3.NotImplementedException; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; -import org.springframework.beans.factory.config.AutowireCapableBeanFactory; -import org.springframework.context.ApplicationContext; - -import java.io.IOException; -import java.util.Optional; - -public class JSonSerializationWithAccessFilterUnitTest { - - @Rule - public MockitoRule mockitoRule = MockitoJUnit.rule(); - - @Mock - private ApplicationContext ctx; - - @Mock - private AutowireCapableBeanFactory autowireCapableBeanFactory; - - @Mock - private JsonGenerator jsonGenerator; - - @Mock - private UserRoleAssignmentService userRoleAssignmentService; - - @Mock - private GivenCustomerService givenCustomerService; - - private SecurityContextMock securityContext; - - private final GivenDto givenDTO = createSampleDto(); - - @Before - public void init() { - securityContext = SecurityContextMock.usingMock(userRoleAssignmentService) - .havingAuthenticatedUser() - .withRole(GivenCustomerDto.class, 888L, Role.AnyCustomerUser.ROLE); - - given(ctx.getAutowireCapableBeanFactory()).willReturn(autowireCapableBeanFactory); - given(autowireCapableBeanFactory.createBean(GivenCustomerService.class)).willReturn(givenCustomerService); - given(givenCustomerService.findOne(888L)).willReturn( - Optional.of( - new GivenCustomerDto() - .with(dto -> dto.id = 888L))); - } - - @Test - public void shouldSerializeStringField() throws IOException { - // when - serialize(givenDTO); - - // then - verify(jsonGenerator).writeStringField("openStringField", givenDTO.openStringField); - } - - @Test - public void shouldSerializeIntegerField() throws IOException { - // when - serialize(givenDTO); - - // then - verify(jsonGenerator).writeNumberField("openIntegerField", givenDTO.openIntegerField); - } - - @Test - public void shouldSerializePrimitiveIntField() throws IOException { - // when - serialize(givenDTO); - - // then - verify(jsonGenerator).writeNumberField("openPrimitiveIntField", givenDTO.openPrimitiveIntField); - } - - @Test - public void shouldSerializeLongField() throws IOException { - // when - final Throwable actual = catchThrowable(() -> serialize(givenDTO)); - - // then - verify(jsonGenerator).writeNumberField("openLongField", givenDTO.openLongField); - } - - @Test - public void shouldSerializePrimitiveLongField() throws IOException { - // when - serialize(givenDTO); - - // then - verify(jsonGenerator).writeNumberField("openPrimitiveLongField", givenDTO.openPrimitiveLongField); - } - - @Test - public void shouldSerializeBooleanField() throws IOException { - // when - serialize(givenDTO); - - // then - verify(jsonGenerator).writeBooleanField("openBooleanField", givenDTO.openBooleanField); - } - - @Test - public void shouldSerializePrimitiveBooleanField() throws IOException { - // when - serialize(givenDTO); - - // then - verify(jsonGenerator).writeBooleanField("openPrimitiveBooleanField", givenDTO.openPrimitiveBooleanField); - } - - @Test - public void shouldSerializeBigDecimalField() throws IOException { - // when - final Throwable actual = catchThrowable(() -> serialize(givenDTO)); - - // then - verify(jsonGenerator).writeNumberField("openBigDecimalField", givenDTO.openBigDecimalField); - } - - @Test - public void shouldSerializeLocalDateField() throws IOException { - // when - serialize(givenDTO); - - // then - verify(jsonGenerator).writeStringField("openLocalDateField", givenDTO.openLocalDateFieldAsString); - } - - @Test - public void shouldSerializeEnumField() throws IOException { - // when - serialize(givenDTO); - - // then - verify(jsonGenerator).writeStringField("openEnumField", givenDTO.openEnumFieldAsString); - } - - @Test - public void shouldSerializeRestrictedFieldIfRequiredRoleIsCoveredByUser() throws IOException { - - // given - securityContext.havingAuthenticatedUser() - .withRole(GivenCustomerDto.class, 888L, Role.of(Role.CustomerFinancialContact.class)); - - // when - serialize(givenDTO); - - // then - verify(jsonGenerator).writeStringField("restrictedField", givenDTO.restrictedField); - } - - @Test - public void shouldNotSerializeRestrictedFieldIfRequiredRoleIsNotCoveredByUser() throws IOException { - - // given - securityContext.havingAuthenticatedUser().withRole(GivenCustomerDto.class, 888L, Role.AnyCustomerUser.ROLE); - - // when - serialize(givenDTO); - - // then - verify(jsonGenerator, never()).writeStringField("restrictedField", givenDTO.restrictedField); - } - - @Test - public void shouldThrowExceptionForUnimplementedFieldType() { - - // given - class Arbitrary { - - } - class GivenDtoWithUnimplementedFieldType implements AccessMappings { - - @AccessFor(read = Role.Anybody.class) - Arbitrary fieldWithUnimplementedType = new Arbitrary(); - - @Override - public Long getId() { - return null; - } - } - final GivenDtoWithUnimplementedFieldType givenDtoWithUnimplementedFieldType = new GivenDtoWithUnimplementedFieldType(); - SecurityContextFake.havingAuthenticatedUser(); - - // when - final Throwable actual = catchThrowable(() -> serialize(givenDtoWithUnimplementedFieldType)); - - // then - assertThat(actual).isInstanceOf(NotImplementedException.class); - } - - // --- fixture code below --- - - private void serialize(final T dto) throws IOException { - // @formatter:off - new JsonSerializerWithAccessFilter(ctx, userRoleAssignmentService) {} - .serialize(dto, jsonGenerator, null); - // @formatter:on - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/RoleUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/accessfilter/RoleUnitTest.java deleted file mode 100644 index aa080e22..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/RoleUnitTest.java +++ /dev/null @@ -1,195 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.ThrowableAssert.catchThrowable; - -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.accessfilter.Role.*; - -import com.google.common.base.VerifyException; - -import org.junit.Test; - -import java.lang.reflect.Field; - -public class RoleUnitTest { - - @Test - public void allUserRolesShouldCoverSameRequiredRole() { - assertThat(Hostmaster.ROLE.covers(Hostmaster.class)).isTrue(); - assertThat(Admin.ROLE.covers(Admin.class)).isTrue(); - assertThat(Supporter.ROLE.covers(Supporter.class)).isTrue(); - - assertThat(Role.CustomerContractualContact.ROLE.covers(Role.CustomerContractualContact.class)).isTrue(); - assertThat(CustomerFinancialContact.ROLE.covers(CustomerFinancialContact.class)).isTrue(); - assertThat(CustomerTechnicalContact.ROLE.covers(CustomerTechnicalContact.class)).isTrue(); - - assertThat(ActualCustomerUser.ROLE.covers((ActualCustomerUser.class))).isTrue(); - assertThat(AnyCustomerUser.ROLE.covers((Role.AnyCustomerUser.class))).isTrue(); - } - - @Test - public void lowerUserRolesShouldNotCoverHigherRequiredRoles() { - assertThat(Hostmaster.ROLE.covers(Nobody.class)).isFalse(); - assertThat(Admin.ROLE.covers(Hostmaster.class)).isFalse(); - assertThat(Supporter.ROLE.covers(Admin.class)).isFalse(); - - assertThat(AnyCustomerContact.ROLE.covers(Supporter.class)).isFalse(); - assertThat(AnyCustomerContact.ROLE.covers(Role.CustomerContractualContact.class)).isFalse(); - assertThat(CustomerFinancialContact.ROLE.covers(Role.CustomerContractualContact.class)).isFalse(); - assertThat(CustomerFinancialContact.ROLE.covers(CustomerTechnicalContact.class)).isFalse(); - assertThat(CustomerTechnicalContact.ROLE.covers(Role.CustomerContractualContact.class)).isFalse(); - assertThat(CustomerTechnicalContact.ROLE.covers(CustomerFinancialContact.class)).isFalse(); - - assertThat(ActualCustomerUser.ROLE.covers((AnyCustomerContact.class))).isFalse(); - assertThat(ActualCustomerUser.ROLE.covers((Role.CustomerContractualContact.class))).isFalse(); - assertThat(ActualCustomerUser.ROLE.covers((CustomerTechnicalContact.class))).isFalse(); - assertThat(ActualCustomerUser.ROLE.covers((CustomerFinancialContact.class))).isFalse(); - - assertThat(AnyCustomerUser.ROLE.covers((ActualCustomerUser.class))).isFalse(); - assertThat(AnyCustomerUser.ROLE.covers((AnyCustomerContact.class))).isFalse(); - assertThat(AnyCustomerUser.ROLE.covers((Role.CustomerContractualContact.class))).isFalse(); - assertThat(AnyCustomerUser.ROLE.covers((CustomerTechnicalContact.class))).isFalse(); - assertThat(AnyCustomerUser.ROLE.covers((CustomerFinancialContact.class))).isFalse(); - - assertThat(Anybody.ROLE.covers((Role.AnyCustomerUser.class))).isFalse(); - } - - @Test - public void higherUserRolesShouldCoverLowerRequiredRoles() { - assertThat(Hostmaster.ROLE.covers(Supporter.class)).isTrue(); - assertThat(Admin.ROLE.covers(Supporter.class)).isTrue(); - - assertThat(Supporter.ROLE.covers(AnyCustomerContact.class)).isTrue(); - - assertThat(Role.CustomerContractualContact.ROLE.covers(AnyCustomerContact.class)).isTrue(); - assertThat(Role.CustomerContractualContact.ROLE.covers(CustomerFinancialContact.class)).isTrue(); - assertThat(Role.CustomerContractualContact.ROLE.covers(CustomerTechnicalContact.class)).isTrue(); - assertThat(CustomerTechnicalContact.ROLE.covers(Role.AnyCustomerUser.class)).isTrue(); - - assertThat(ActualCustomerUser.ROLE.covers((Role.AnyCustomerUser.class))).isTrue(); - assertThat(AnyCustomerUser.ROLE.covers((Anybody.class))).isTrue(); - } - - @Test - public void financialContactShouldNotCoverAnyOtherRealRoleRequirement() { - assertThat(CustomerFinancialContact.ROLE.covers(Role.AnyCustomerUser.class)).isFalse(); - assertThat(CustomerFinancialContact.ROLE.covers(ActualCustomerUser.class)).isFalse(); - assertThat(CustomerFinancialContact.ROLE.covers(Role.AnyCustomerUser.class)).isFalse(); - } - - @Test - public void ignoredCoversNothingAndIsNotCovered() { - assertThat(Ignored.ROLE.covers(Hostmaster.class)).isFalse(); - assertThat(Ignored.ROLE.covers(Anybody.class)).isFalse(); - assertThat(Ignored.ROLE.covers(Ignored.class)).isFalse(); - assertThat(Hostmaster.ROLE.covers(Ignored.class)).isFalse(); - assertThat(Anybody.ROLE.covers(Ignored.class)).isFalse(); - } - - @Test - public void coversAny() { - assertThat(Hostmaster.ROLE.coversAny(Role.CustomerContractualContact.class, CustomerFinancialContact.class)).isTrue(); - assertThat( - Role.CustomerContractualContact.ROLE.coversAny( - Role.CustomerContractualContact.class, - CustomerFinancialContact.class)) - .isTrue(); - assertThat( - CustomerFinancialContact.ROLE.coversAny( - Role.CustomerContractualContact.class, - CustomerFinancialContact.class)) - .isTrue(); - - assertThat(Role.AnyCustomerUser.ROLE.coversAny(Role.CustomerContractualContact.class, CustomerFinancialContact.class)) - .isFalse(); - - assertThat(catchThrowable(Hostmaster.ROLE::coversAny)).isInstanceOf(VerifyException.class); - assertThat( - catchThrowable( - () -> Hostmaster.ROLE.coversAny( - (Class[]) null))).isInstanceOf(VerifyException.class); - } - - @Test - public void toBeIgnoredForUpdates() { - assertThat(Role.toBeIgnoredForUpdates(someFieldWithoutAccessForAnnotation)).isTrue(); - assertThat(Role.toBeIgnoredForUpdates(someFieldWithAccessForAnnotationToBeIgnoredForUpdates)).isTrue(); - assertThat(Role.toBeIgnoredForUpdates(someFieldWithAccessForAnnotationToBeIgnoredForUpdatesAmongOthers)).isFalse(); - assertThat(Role.toBeIgnoredForUpdates(someFieldWithAccessForAnnotation)).isFalse(); - } - - @Test - public void getAuthority() { - assertThat(Nobody.ROLE.authority()).isEqualTo(AuthoritiesConstants.USER); - assertThat(Hostmaster.ROLE.authority()).isEqualTo(AuthoritiesConstants.HOSTMASTER); - assertThat(Admin.ROLE.authority()).isEqualTo(AuthoritiesConstants.ADMIN); - assertThat(Supporter.ROLE.authority()).isEqualTo(AuthoritiesConstants.SUPPORTER); - assertThat(Role.CustomerContractualContact.ROLE.authority()).isEqualTo(AuthoritiesConstants.USER); - assertThat(Anybody.ROLE.authority()).isEqualTo(AuthoritiesConstants.ANONYMOUS); - } - - @Test - public void isBroadest() { - assertThat(Role.broadest(Hostmaster.ROLE, Role.CustomerContractualContact.ROLE)).isEqualTo(Hostmaster.ROLE); - assertThat(Role.broadest(Role.CustomerContractualContact.ROLE, Hostmaster.ROLE)).isEqualTo(Hostmaster.ROLE); - assertThat(Role.broadest(Role.CustomerContractualContact.ROLE, Role.AnyCustomerUser.ROLE)) - .isEqualTo(Role.CustomerContractualContact.ROLE); - } - - @Test - public void isAllowedToInit() { - assertThat(Hostmaster.ROLE.isAllowedToInit(someFieldWithoutAccessForAnnotation)).isFalse(); - assertThat(Supporter.ROLE.isAllowedToInit(someFieldWithoutAccessForAnnotation)).isFalse(); - assertThat(Admin.ROLE.isAllowedToInit(someFieldWithAccessForAnnotation)).isTrue(); - } - - @Test - public void isAllowedToUpdate() { - assertThat(Hostmaster.ROLE.isAllowedToUpdate(someFieldWithoutAccessForAnnotation)).isFalse(); - assertThat(AnyCustomerContact.ROLE.isAllowedToUpdate(someFieldWithAccessForAnnotation)).isFalse(); - assertThat(Supporter.ROLE.isAllowedToUpdate(someFieldWithAccessForAnnotation)).isTrue(); - } - - @Test - public void isAllowedToRead() { - assertThat(Hostmaster.ROLE.isAllowedToRead(someFieldWithoutAccessForAnnotation)).isFalse(); - assertThat(Role.AnyCustomerUser.ROLE.isAllowedToRead(someFieldWithAccessForAnnotation)).isFalse(); - assertThat(AnyCustomerContact.ROLE.isAllowedToRead(someFieldWithAccessForAnnotation)).isTrue(); - } - - // --- only test fixture below --- - - private static class TestDto { - - @AccessFor(init = Admin.class, update = Supporter.class, read = AnyCustomerContact.class) - private Integer someFieldWithAccessForAnnotation; - - @AccessFor(update = Ignored.class, read = AnyCustomerContact.class) - private Integer someFieldWithAccessForAnnotationToBeIgnoredForUpdates; - - @AccessFor(update = { Ignored.class, Supporter.class }, read = AnyCustomerContact.class) - private Integer someFieldWithAccessForAnnotationToBeIgnoredForUpdatesAmongOthers; - - private Integer someFieldWithoutAccessForAnnotation; - } - - private static Field someFieldWithoutAccessForAnnotation; - private static Field someFieldWithAccessForAnnotationToBeIgnoredForUpdates; - private static Field someFieldWithAccessForAnnotationToBeIgnoredForUpdatesAmongOthers; - private static Field someFieldWithAccessForAnnotation; - - static { - try { - someFieldWithoutAccessForAnnotation = TestDto.class.getDeclaredField("someFieldWithoutAccessForAnnotation"); - someFieldWithAccessForAnnotationToBeIgnoredForUpdates = TestDto.class - .getDeclaredField("someFieldWithAccessForAnnotationToBeIgnoredForUpdates"); - someFieldWithAccessForAnnotationToBeIgnoredForUpdatesAmongOthers = TestDto.class - .getDeclaredField("someFieldWithAccessForAnnotationToBeIgnoredForUpdatesAmongOthers"); - someFieldWithAccessForAnnotation = TestDto.class.getDeclaredField("someFieldWithAccessForAnnotation"); - } catch (NoSuchFieldException e) { - throw new AssertionError("precondition failed", e); - } - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/SecurityContextDouble.java b/src/test/java/org/hostsharing/hsadminng/service/accessfilter/SecurityContextDouble.java deleted file mode 100644 index c88015fc..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/SecurityContextDouble.java +++ /dev/null @@ -1,57 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import static org.assertj.core.api.Assumptions.assumeThat; - -import org.hostsharing.hsadminng.security.SecurityUtils; - -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.context.SecurityContext; -import org.springframework.security.core.context.SecurityContextHolder; - -import java.util.ArrayList; -import java.util.Collection; - -abstract class SecurityContextDouble { - - private final Collection authorities = new ArrayList<>(); - - protected SecurityContextDouble() { - } - - protected SecurityContextDouble withAuthenticatedUser(final String login) { - SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); - - securityContext.setAuthentication(new UsernamePasswordAuthenticationToken(login, "dummyPassword") { - - @Override - public Collection getAuthorities() { - return authorities; - } - }); - SecurityContextHolder.setContext(securityContext); - assumeThat(SecurityUtils.getCurrentUserLogin()).hasValue(login); - return this; - } - - public T withAuthority(final String authority) { - authorities.add((GrantedAuthority) () -> authority); - return (T) this; - } - - private static class FakePrincipal { - - private final String username; - - public FakePrincipal(final String username) { - this.username = username; - } - - @Override - public String toString() { - return username; - } - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/SecurityContextFake.java b/src/test/java/org/hostsharing/hsadminng/service/accessfilter/SecurityContextFake.java deleted file mode 100644 index 85b3ef66..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/SecurityContextFake.java +++ /dev/null @@ -1,23 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -public class SecurityContextFake extends SecurityContextDouble { - - public static SecurityContextFake havingUnauthenticatedUser() { - final SecurityContextFake securityContext = new SecurityContextFake(); - return securityContext; - } - - public static SecurityContextFake havingAuthenticatedUser() { - return havingAuthenticatedUser("dummyUser"); - } - - public static SecurityContextFake havingAuthenticatedUser(final String login) { - final SecurityContextFake securityContext = new SecurityContextFake(); - securityContext.withAuthenticatedUser(login); - return securityContext; - } - - protected SecurityContextFake() { - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/SecurityContextMock.java b/src/test/java/org/hostsharing/hsadminng/service/accessfilter/SecurityContextMock.java deleted file mode 100644 index 402df6f8..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/accessfilter/SecurityContextMock.java +++ /dev/null @@ -1,47 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.accessfilter; - -import static org.assertj.core.api.Assumptions.assumeThat; -import static org.mockito.BDDMockito.given; - -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; - -import org.mockito.Mockito; - -import java.util.Arrays; -import java.util.HashSet; - -public class SecurityContextMock extends SecurityContextDouble { - - private final UserRoleAssignmentService userRoleAssignmentService; - - public static SecurityContextMock usingMock(final UserRoleAssignmentService userRoleAssignmentService) { - return new SecurityContextMock(userRoleAssignmentService); - } - - public SecurityContextMock(final UserRoleAssignmentService userRoleAssignmentService) { - this.userRoleAssignmentService = userRoleAssignmentService; - } - - public SecurityContextMock havingAuthenticatedUser() { - return havingAuthenticatedUser("dummyUser"); - } - - public SecurityContextMock havingAuthenticatedUser(final String login) { - super.withAuthenticatedUser(login); - Mockito.reset(userRoleAssignmentService); - return this; - } - - public SecurityContextMock withRole(final Class onClass, final long onId, final Role... roles) { - if (userRoleAssignmentService == null) { - throw new IllegalStateException("mock not registered for: " + UserRoleAssignmentService.class.getSimpleName()); - } - final EntityTypeId entityTypeId = onClass.getAnnotation(EntityTypeId.class); - assumeThat(entityTypeId).as("@" + EntityTypeId.class.getSimpleName() + " missing on class " + onClass.toString()) - .isNotNull(); - given(userRoleAssignmentService.getEffectiveRoleOfCurrentUser(entityTypeId.value(), onId)) - .willReturn(new HashSet(Arrays.asList(roles))); - return this; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/dto/AccessMappingsUnitTestBase.java b/src/test/java/org/hostsharing/hsadminng/service/dto/AccessMappingsUnitTestBase.java deleted file mode 100644 index 4d10d2c0..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/dto/AccessMappingsUnitTestBase.java +++ /dev/null @@ -1,237 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import static org.apache.commons.lang3.StringUtils.removeEnd; -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.fail; - -import org.hostsharing.hsadminng.service.accessfilter.*; -import org.hostsharing.hsadminng.service.util.ReflectionUtil; - -import org.apache.commons.lang3.RandomUtils; -import org.junit.Test; -import org.springframework.boot.jackson.JsonComponent; - -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.HashSet; -import java.util.Objects; -import java.util.Set; -import java.util.function.BiFunction; -import java.util.function.Function; -import java.util.stream.Collectors; - -/** - * Usually base classes for unit tests are not a good idea, but because - * DTOs which implement AccessMapping are more like a DSL, - * this base class should be used to enforce its required structure. - */ -public abstract class AccessMappingsUnitTestBase { - - private final Class dtoClass; - private final BiFunction createSampleDTO; - private final BiFunction createRandomDTO; - - public AccessMappingsUnitTestBase( - Class dtoClass, - final BiFunction createSampleDTO, - final BiFunction createRandomDTO) { - this.dtoClass = dtoClass; - this.createSampleDTO = createSampleDTO; - this.createRandomDTO = createRandomDTO; - } - - @Test - public void shouldConvertToString() { - final D sampleDto = createSampleDTO.apply(1234L, 77L); - final String dtoAsString = dtoToString(sampleDto); - assertThat(sampleDto.toString()).isEqualTo(dtoAsString); - } - - @Test - @SuppressWarnings("all") - public void shouldImplementEqualsJustUsingClassAndId() { - final D dto = createSampleDTO.apply(1234L, 77L); - assertThat(dto.equals(dto)).isTrue(); - - final D dtoWithSameId = createSampleDTO.apply(1234L, 77L); - assertThat(dto.equals(dtoWithSameId)).isTrue(); - - final D dtoWithAnotherId = createSampleDTO.apply(RandomUtils.nextLong(2000, 9999), 77L); - assertThat(dtoWithAnotherId.equals(dtoWithSameId)).isFalse(); - - final D dtoWithoutId = createSampleDTO.apply(null, RandomUtils.nextLong()); - assertThat(dto.equals(dtoWithoutId)).isFalse(); - assertThat(dtoWithoutId.equals(dto)).isFalse(); - - assertThat(dto.equals(null)).isFalse(); - assertThat(dto.equals("")).isFalse(); - } - - @Test - public void shouldImplementHashCodeJustUsingClassAndId() { - final long randomId = RandomUtils.nextLong(); - final D dto = createSampleDTO.apply(randomId, RandomUtils.nextLong()); - assertThat(dto.hashCode()).isEqualTo(Objects.hashCode(randomId)); - - final D dtoWithoutId = createSampleDTO.apply(null, RandomUtils.nextLong()); - assertThat(dtoWithoutId.hashCode()).isEqualTo(Objects.hashCode(null)); - } - - @Test - public void shouldImplementAccessMappings() { - assertThat(dtoClass.getInterfaces()).as("must implement " + AccessMappings.class).contains(AccessMappings.class); - } - - @Test - public void shouldImplementSerializer() { - shouldImplementJsonComponent(JsonSerializerWithAccessFilter.class); - } - - @Test - public void shouldImplementDeserializer() { - shouldImplementJsonComponent(JsonDeserializerWithAccessFilter.class); - } - - // --- only test fixture below --- - - protected AccessRightsMatcher initAccessFor(final Class dtoClass, final Role role) { - return new AccessRightsMatcher(dtoClass, role, AccessFor::init); - } - - protected AccessRightsMatcher updateAccessFor(final Class dtoClass, final Role role) { - return new AccessRightsMatcher(dtoClass, role, AccessFor::update); - } - - protected AccessRightsMatcher readAccessFor(final Class dtoClass, final Role role) { - return new AccessRightsMatcher(dtoClass, role, AccessFor::read); - } - - // This class should have the same generics as the outer class, but then the - // method references (AccessFor::*) can't be resolved anymore by the Java compiler. - protected static class AccessRightsMatcher { - - private final Object dtoClass; - private final Role role; - - private final String[] namesOfFieldsWithAccessForAnnotation; - private final String[] namesOfAccessibleFields; - - AccessRightsMatcher(final Class dtoClass, final Role role, final Function[]> access) { - this.dtoClass = dtoClass; - this.role = role; - - final Set fieldsWithAccessForAnnotation = determineFieldsWithAccessForAnnotation(dtoClass); - this.namesOfFieldsWithAccessForAnnotation = fieldsWithAccessForAnnotation.stream() - .map(Field::getName) - .collect(Collectors.toList()) - .toArray(new String[] {}); - this.namesOfAccessibleFields = fieldsWithAccessForAnnotation.stream() - .filter(f -> allows(f, access, role)) - .map(Field::getName) - .collect(Collectors.toList()) - .toArray(new String[] {}); - } - - public void shouldBeExactlyFor(final String... expectedFields) { - assertThat(namesOfAccessibleFields).containsExactlyInAnyOrder(expectedFields); - } - - public void shouldBeForNothing() { - assertThat(namesOfAccessibleFields).isEmpty(); - } - - public void shouldBeForAllFields() { - assertThat(namesOfAccessibleFields).containsExactlyInAnyOrder(namesOfFieldsWithAccessForAnnotation); - } - - private static Set determineFieldsWithAccessForAnnotation(final Class dtoClass) { - - final Set fieldsWithAccessForAnnotation = new HashSet<>(); - - for (Field field : dtoClass.getDeclaredFields()) { - if (field.isAnnotationPresent(AccessFor.class)) { - final AccessFor accessFor = field.getAnnotation(AccessFor.class); - fieldsWithAccessForAnnotation.add(field); - } - } - - return fieldsWithAccessForAnnotation; - } - - private static boolean allows( - final Field field, - final Function[]> access, - final Role role) { - if (field.isAnnotationPresent(AccessFor.class)) { - final AccessFor accessFor = field.getAnnotation(AccessFor.class); - Class[] roleClasses = access.apply(accessFor); - return role.coversAny(roleClasses); - } - return false; - } - } - - private String dtoToString(final D dto) { - final StringBuilder fieldValues = new StringBuilder(); - boolean firstField = true; - for (Field field : dto.getClass().getDeclaredFields()) { - if (field.isAnnotationPresent(AccessFor.class)) { - firstField = appendCommaOptionally(fieldValues, firstField); - appendFieldName(fieldValues, field); - appendFieldValue(dto, fieldValues, field); - } - } - return dto.getClass().getSimpleName() + "{" + fieldValues + "}"; - } - - private void appendFieldValue(final D dto, final StringBuilder fieldValues, final Field field) { - final Object value = ReflectionUtil.getValue(dto, field); - final boolean inQuotes = isJHipsterToStringUsingQuotes(field); - if (inQuotes) { - fieldValues.append("'"); - } - fieldValues.append(value); - if (inQuotes) { - fieldValues.append("'"); - } - } - - private void appendFieldName(final StringBuilder fieldValues, final Field field) { - fieldValues.append(removeEnd(field.getName(), "Id")); - fieldValues.append("="); - } - - private boolean appendCommaOptionally(final StringBuilder fieldValues, boolean firstField) { - if (firstField) { - firstField = false; - } else { - fieldValues.append(", "); - } - return firstField; - } - - private boolean isJHipsterToStringUsingQuotes(final Field field) { - return !Number.class.isAssignableFrom(field.getType()) && !Boolean.class.isAssignableFrom(field.getType()); - } - - private void shouldImplementJsonComponent(final Class expectedSuperclass) { - for (Class declaredClass : dtoClass.getDeclaredClasses()) { - if (expectedSuperclass.isAssignableFrom(declaredClass)) { - assertThat(declaredClass.isAnnotationPresent(JsonComponent.class)) - .as(declaredClass + " requires @" + JsonComponent.class.getSimpleName()) - .isTrue(); - assertThat(ReflectionUtil.determineGenericClassParameter(declaredClass, expectedSuperclass, 0)) - .as(declaredClass + " must resolve generic parameter of " + expectedSuperclass + " to type of DTO") - .isEqualTo(dtoClass); - assertThat(Modifier.isPublic(declaredClass.getModifiers())).as(declaredClass + " must be public").isTrue(); - assertThat(Modifier.isStatic(declaredClass.getModifiers())).as(declaredClass + " must be static").isTrue(); - assertThat(Modifier.isFinal(declaredClass.getModifiers())).as(declaredClass + " must not be final").isFalse(); - assertThat(Modifier.isAbstract(declaredClass.getModifiers())).as(declaredClass + " must not be abstract") - .isFalse(); - return; - } - } - fail("no " + expectedSuperclass + " defined for " + dtoClass); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/dto/AssetDTOIntTest.java b/src/test/java/org/hostsharing/hsadminng/service/dto/AssetDTOIntTest.java deleted file mode 100644 index 1f8d6121..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/dto/AssetDTOIntTest.java +++ /dev/null @@ -1,229 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowable; -import static org.junit.Assert.assertEquals; -import static org.mockito.BDDMockito.given; - -import org.hostsharing.hsadminng.domain.Asset; -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.domain.enumeration.AssetAction; -import org.hostsharing.hsadminng.repository.AssetRepository; -import org.hostsharing.hsadminng.repository.CustomerRepository; -import org.hostsharing.hsadminng.repository.MembershipRepository; -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.AssetService; -import org.hostsharing.hsadminng.service.AssetValidator; -import org.hostsharing.hsadminng.service.MembershipValidator; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.JSonBuilder; -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerContractualContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerFinancialContact; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextMock; -import org.hostsharing.hsadminng.service.mapper.AssetMapper; -import org.hostsharing.hsadminng.service.mapper.AssetMapperImpl; -import org.hostsharing.hsadminng.service.mapper.CustomerMapperImpl; -import org.hostsharing.hsadminng.service.mapper.MembershipMapperImpl; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -import org.apache.commons.lang3.RandomUtils; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.json.JsonTest; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.test.context.junit4.SpringRunner; - -import java.io.IOException; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.util.Optional; - -import javax.persistence.EntityManager; - -@JsonTest -@SpringBootTest( - classes = { - CustomerMapperImpl.class, - MembershipMapperImpl.class, - AssetMapperImpl.class, - AssetDTO.JsonSerializer.class, - AssetDTO.JsonDeserializer.class - }) -@RunWith(SpringRunner.class) -public class AssetDTOIntTest { - - private static final Long SOME_CUSTOMER_ID = RandomUtils.nextLong(100, 199); - private static final Integer SOME_CUSTOMER_REFERENCE = 10001; - private static final String SOME_CUSTOMER_PREFIX = "abc"; - private static final String SOME_CUSTOMER_NAME = "Some Customer Name"; - private static final Customer SOME_CUSTOMER = new Customer().id(SOME_CUSTOMER_ID) - .reference(SOME_CUSTOMER_REFERENCE) - .prefix(SOME_CUSTOMER_PREFIX) - .name(SOME_CUSTOMER_NAME); - - private static final Long SOME_MEMBERSHIP_ID = RandomUtils.nextLong(200, 299); - private static final LocalDate SOME_MEMBER_FROM_DATE = LocalDate.parse("2000-12-06"); - private static final Membership SOME_MEMBERSHIP = new Membership().id(SOME_MEMBERSHIP_ID) - .customer(SOME_CUSTOMER) - .memberFromDate(SOME_MEMBER_FROM_DATE); - private static final String SOME_MEMBERSHIP_DISPLAY_LABEL = "Some Customer Name [10001:abc] 2000-12-06 - ..."; - - private static final Long SOME_ASSET_ID = RandomUtils.nextLong(300, 399); - private static final Asset SOME_ASSET = new Asset().id(SOME_ASSET_ID).membership(SOME_MEMBERSHIP); - - @Rule - public MockitoRule mockito = MockitoJUnit.rule(); - - @Autowired - private ObjectMapper objectMapper; - - @Autowired - private AssetMapper assetMapper; - - @MockBean - private AssetRepository assetRepository; - - @MockBean - private AssetValidator assetValidator; - - @MockBean - private CustomerRepository customerRepository; - - @MockBean - private MembershipRepository membershipRepository; - - @MockBean - private MembershipValidator membershipValidator; - - @MockBean - private AssetService assetService; - - @MockBean - private EntityManager em; - - @MockBean - private UserRoleAssignmentService userRoleAssignmentService; - - private SecurityContextMock securityContext; - - @Before - public void init() { - given(customerRepository.findById(SOME_CUSTOMER_ID)).willReturn(Optional.of(SOME_CUSTOMER)); - given(membershipRepository.findById(SOME_MEMBERSHIP_ID)).willReturn(Optional.of(SOME_MEMBERSHIP)); - given(assetRepository.findById(SOME_ASSET_ID)).willReturn((Optional.of(SOME_ASSET))); - securityContext = SecurityContextMock.usingMock(userRoleAssignmentService); - } - - @Test - public void shouldSerializePartiallyForFinancialCustomerContact() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser() - .withRole(CustomerDTO.class, SOME_CUSTOMER_ID, Role.of(CustomerFinancialContact.class)); - - final AssetDTO given = createSomeAssetDTO(SOME_ASSET_ID); - - // when - final String actual = objectMapper.writeValueAsString(given); - - // then - given.setRemark(null); - assertEquals(createExpectedJSon(given), actual); - } - - @Test - public void shouldSerializeCompletelyForSupporter() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser().withAuthority(AuthoritiesConstants.SUPPORTER); - final AssetDTO given = createSomeAssetDTO(SOME_ASSET_ID); - - // when - final String actual = objectMapper.writeValueAsString(given); - - // then - assertEquals(createExpectedJSon(given), actual); - } - - @Test - public void shouldNotDeserializeForContractualCustomerContact() { - // given - securityContext.havingAuthenticatedUser() - .withRole(CustomerDTO.class, SOME_CUSTOMER_ID, Role.of(CustomerContractualContact.class)); - final String json = new JSonBuilder() - .withFieldValue("id", SOME_ASSET_ID) - .withFieldValue("remark", "Updated Remark") - .toString(); - - // when - final Throwable actual = catchThrowable(() -> objectMapper.readValue(json, AssetDTO.class)); - - // then - assertThat(actual).isInstanceOfSatisfying( - BadRequestAlertException.class, - bre -> assertThat(bre.getMessage()) - .isEqualTo( - "Update of field AssetDTO.remark prohibited for current user role(s): CustomerContractualContact")); - } - - @Test - public void shouldDeserializeForAdminIfRemarkIsChanged() throws IOException { - // given - securityContext.havingAuthenticatedUser().withAuthority(AuthoritiesConstants.ADMIN); - final String json = new JSonBuilder() - .withFieldValue("id", SOME_ASSET_ID) - .withFieldValue("remark", "Updated Remark") - .toString(); - - // when - final AssetDTO actual = objectMapper.readValue(json, AssetDTO.class); - - // then - final AssetDTO expected = new AssetDTO(); - expected.setId(SOME_ASSET_ID); - expected.setMembershipId(SOME_MEMBERSHIP_ID); - expected.setRemark("Updated Remark"); - expected.setMembershipDisplayLabel(SOME_MEMBERSHIP_DISPLAY_LABEL); - assertThat(actual).isEqualToIgnoringGivenFields(expected, "displayLabel"); - } - - // --- only test fixture below --- - - private String createExpectedJSon(AssetDTO dto) { - return new JSonBuilder() - .withFieldValueIfPresent("id", dto.getId()) - .withFieldValueIfPresent("documentDate", dto.getDocumentDate().toString()) - .withFieldValueIfPresent("valueDate", dto.getValueDate().toString()) - .withFieldValueIfPresent("action", dto.getAction().name()) - .withFieldValueIfPresent("amount", dto.getAmount().doubleValue()) - .withFieldValueIfPresent("remark", dto.getRemark()) - .withFieldValueIfPresent("membershipId", dto.getMembershipId()) - .withFieldValue("membershipDisplayLabel", dto.getMembershipDisplayLabel()) - .toString(); - } - - private AssetDTO createSomeAssetDTO(final long id) { - final AssetDTO given = new AssetDTO(); - given.setId(id); - given.setAction(AssetAction.PAYMENT); - given.setAmount(new BigDecimal("512.01")); - given.setDocumentDate(LocalDate.parse("2019-04-27")); - given.setValueDate(LocalDate.parse("2019-04-28")); - given.setMembershipId(SOME_MEMBERSHIP_ID); - given.setRemark("Some Remark"); - given.setMembershipDisplayLabel("Display Label for Membership #" + SOME_MEMBERSHIP_ID); - return given; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/dto/AssetDTOUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/dto/AssetDTOUnitTest.java deleted file mode 100644 index 3f71acad..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/dto/AssetDTOUnitTest.java +++ /dev/null @@ -1,92 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import org.hostsharing.hsadminng.domain.enumeration.AssetAction; -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.Role.Admin; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerContractualContact; -import org.hostsharing.hsadminng.service.util.RandomUtil; - -import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.RandomUtils; -import org.junit.Test; - -import java.math.BigDecimal; -import java.time.LocalDate; - -public class AssetDTOUnitTest extends AccessMappingsUnitTestBase { - - public AssetDTOUnitTest() { - super(AssetDTO.class, AssetDTOUnitTest::createSampleDTO, AssetDTOUnitTest::createRandomDTO); - } - - @Test - public void shouldHaveProperAccessForAdmin() { - initAccessFor(AssetDTO.class, Admin.ROLE).shouldBeExactlyFor( - "membershipId", - "documentDate", - "amount", - "action", - "valueDate", - "remark"); - updateAccessFor(AssetDTO.class, Admin.ROLE).shouldBeExactlyFor("remark"); - readAccessFor(AssetDTO.class, Admin.ROLE).shouldBeForAllFields(); - } - - @Test - public void shouldHaveProperAccessForContractualContact() { - initAccessFor(AssetDTO.class, CustomerContractualContact.ROLE).shouldBeForNothing(); - updateAccessFor(AssetDTO.class, CustomerContractualContact.ROLE).shouldBeForNothing(); - readAccessFor(AssetDTO.class, CustomerContractualContact.ROLE).shouldBeExactlyFor( - "id", - "membershipId", - "documentDate", - "amount", - "action", - "valueDate", - "membershipDisplayLabel"); - } - - @Test - public void shouldHaveNoAccessForTechnicalContact() { - initAccessFor(AssetDTO.class, Role.CustomerTechnicalContact.ROLE).shouldBeForNothing(); - updateAccessFor(AssetDTO.class, Role.CustomerTechnicalContact.ROLE).shouldBeForNothing(); - readAccessFor(AssetDTO.class, Role.CustomerTechnicalContact.ROLE).shouldBeForNothing(); - } - - @Test - public void shouldHaveNoAccessForNormalUsersWithinCustomerRealm() { - initAccessFor(AssetDTO.class, Role.AnyCustomerUser.ROLE).shouldBeForNothing(); - updateAccessFor(AssetDTO.class, Role.AnyCustomerUser.ROLE).shouldBeForNothing(); - readAccessFor(AssetDTO.class, Role.AnyCustomerUser.ROLE).shouldBeForNothing(); - } - - // --- only test fixture below --- - - private static AssetDTO createSampleDTO(final Long id, final Long parentId) { - final AssetDTO dto = new AssetDTO(); - dto.setId(id); - dto.setDocumentDate(LocalDate.parse("2000-12-07")); - dto.setAmount(new BigDecimal("512.01")); - dto.setAction(AssetAction.PAYMENT); - dto.setRemark("Some Remark"); - dto.setValueDate(LocalDate.parse("2000-12-18")); - dto.setMembershipId(parentId); - dto.setMembershipDisplayLabel("Some Membership"); - return dto; - } - - private static AssetDTO createRandomDTO(final Long id, final Long parentId) { - final AssetDTO dto = new AssetDTO(); - dto.setId(id); - final LocalDate randomDate = LocalDate.parse("2000-12-07").plusDays(RandomUtils.nextInt(1, 999)); - dto.setDocumentDate(randomDate); - dto.setAmount(new BigDecimal(RandomUtils.nextDouble())); - dto.setAction(RandomUtil.generateEnumValue(AssetAction.class)); - dto.setRemark(RandomStringUtils.randomAlphanumeric(20)); - dto.setValueDate(randomDate.plusDays(RandomUtils.nextInt(1, 99))); - dto.setMembershipId(parentId); - dto.setMembershipDisplayLabel("The Membership #" + dto.getMembershipId()); - return dto; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/dto/CustomerDTOUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/dto/CustomerDTOUnitTest.java deleted file mode 100644 index b9214af6..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/dto/CustomerDTOUnitTest.java +++ /dev/null @@ -1,188 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; -import static org.mockito.BDDMockito.given; - -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.enumeration.CustomerKind; -import org.hostsharing.hsadminng.domain.enumeration.VatRegion; -import org.hostsharing.hsadminng.repository.CustomerRepository; -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.CustomerService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.JSonBuilder; -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerContractualContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerTechnicalContact; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextMock; -import org.hostsharing.hsadminng.service.mapper.CustomerMapper; -import org.hostsharing.hsadminng.service.mapper.CustomerMapperImpl; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.json.JsonTest; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.test.context.junit4.SpringRunner; - -import java.io.IOException; -import java.util.Optional; - -@JsonTest -@SpringBootTest( - classes = { - CustomerMapperImpl.class, - CustomerRepository.class, - CustomerService.class, - CustomerDTO.CustomerJsonSerializer.class, - CustomerDTO.CustomerJsonDeserializer.class }) -@RunWith(SpringRunner.class) -public class CustomerDTOUnitTest { - - @Rule - public MockitoRule mockito = MockitoJUnit.rule(); - - @Autowired - private ObjectMapper objectMapper; - - @Autowired - private CustomerMapper customerMapper; - - @MockBean - private CustomerRepository customerRepository; - - @MockBean - private CustomerService customerService; - - @MockBean - private UserRoleAssignmentService userRoleAssignmentService; - - private SecurityContextMock securityContext; - - @Before - public void init() { - securityContext = SecurityContextMock.usingMock(userRoleAssignmentService); - } - - @Test - public void testSerializationAsContractualCustomerContact() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser().withRole(CustomerDTO.class, 1234L, Role.of(CustomerContractualContact.class)); - CustomerDTO given = createSomeCustomerDTO(1234L); - - // when - String actual = objectMapper.writeValueAsString(given); - - // then - given.setRemark(null); - assertEquals(createExpectedJSon(given), actual); - } - - @Test - public void testSerializationAsTechnicalCustomerUser() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser().withRole(CustomerDTO.class, 1234L, Role.of(CustomerTechnicalContact.class)); - CustomerDTO given = createSomeCustomerDTO(1234L); - - // when - String actual = objectMapper.writeValueAsString(given); - - // then - final String expectedJSon = new JSonBuilder() - .withFieldValue("id", given.getId()) - .withFieldValue("reference", given.getReference()) - .withFieldValue("prefix", given.getPrefix()) - .withFieldValue("name", given.getName()) - .withFieldValue("displayLabel", given.getDisplayLabel()) - .toString(); - assertEquals(expectedJSon, actual); - } - - @Test - public void testSerializationAsSupporter() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser().withAuthority(AuthoritiesConstants.SUPPORTER); - CustomerDTO given = createSomeCustomerDTO(1234L); - - // when - String actual = objectMapper.writeValueAsString(given); - - // then - assertThat(actual).isEqualTo(createExpectedJSon(given)); - } - - @Test - public void testDeserializeAsContractualCustomerContact() throws IOException { - // given - securityContext.havingAuthenticatedUser().withRole(CustomerDTO.class, 1234L, Role.of(CustomerContractualContact.class)); - given(customerRepository.findById(1234L)).willReturn(Optional.of(new Customer().id(1234L))); - String json = "{\"id\":1234,\"contractualSalutation\":\"Hallo Updated\",\"billingSalutation\":\"Moin Updated\"}"; - - // when - CustomerDTO actual = objectMapper.readValue(json, CustomerDTO.class); - - // then - CustomerDTO expected = new CustomerDTO(); - expected.setId(1234L); - expected.setContractualSalutation("Hallo Updated"); - expected.setBillingSalutation("Moin Updated"); - assertThat(actual).isEqualToIgnoringGivenFields(expected, "displayLabel"); - } - - // --- only test fixture below --- - - private String createExpectedJSon(CustomerDTO dto) { - return new JSonBuilder() - .withFieldValueIfPresent("id", dto.getId()) - .withFieldValueIfPresent("reference", dto.getReference()) - .withFieldValueIfPresent("prefix", dto.getPrefix()) - .withFieldValueIfPresent("name", dto.getName()) - .withFieldValueIfPresent("kind", "LEGAL") - .toJSonNullFieldDefinition("birthDate") - .toJSonNullFieldDefinition("birthPlace") - .withFieldValueIfPresent("registrationCourt", "Registergericht") - .withFieldValueIfPresent("registrationNumber", "Registernummer") - .withFieldValueIfPresent("vatRegion", "DOMESTIC") - .withFieldValueIfPresent("vatNumber", "DE1234") - .withFieldValueIfPresent("contractualSalutation", dto.getContractualSalutation()) - .withFieldValueIfPresent("contractualAddress", dto.getContractualAddress()) - .withFieldValueIfPresent("billingSalutation", dto.getBillingSalutation()) - .withFieldValueIfPresent("billingAddress", dto.getBillingAddress()) - .withFieldValueIfPresent("remark", dto.getRemark()) - .withFieldValueIfPresent("displayLabel", dto.getDisplayLabel()) - .toString(); - } - - private CustomerDTO createSomeCustomerDTO(final long id) { - final CustomerDTO given = new CustomerDTO(); - given.setId(id); - given.setReference(10001); - given.setPrefix("abc"); - given.setName("Mein Name"); - given.setKind(CustomerKind.LEGAL); - given.setRegistrationCourt("Registergericht"); - given.setRegistrationNumber("Registernummer"); - given.setVatRegion(VatRegion.DOMESTIC); - given.setVatNumber("DE1234"); - given.setContractualAddress("Eine Adresse"); - given.setContractualSalutation("Hallo"); - given.setBillingAddress("Noch eine Adresse"); - given.setBillingSalutation("Moin"); - given.setRemark("Eine Bemerkung"); - given.setDisplayLabel("Display Label"); - return given; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/dto/MembershipDTOIntTest.java b/src/test/java/org/hostsharing/hsadminng/service/dto/MembershipDTOIntTest.java deleted file mode 100644 index 3b8ff9a8..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/dto/MembershipDTOIntTest.java +++ /dev/null @@ -1,197 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowable; -import static org.hostsharing.hsadminng.service.dto.MembershipDTOUnitTest.createSampleDTO; -import static org.junit.Assert.assertEquals; -import static org.mockito.BDDMockito.given; - -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.repository.CustomerRepository; -import org.hostsharing.hsadminng.repository.MembershipRepository; -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.MembershipService; -import org.hostsharing.hsadminng.service.MembershipValidator; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.JSonBuilder; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerContractualContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerFinancialContact; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextMock; -import org.hostsharing.hsadminng.service.mapper.CustomerMapperImpl; -import org.hostsharing.hsadminng.service.mapper.MembershipMapper; -import org.hostsharing.hsadminng.service.mapper.MembershipMapperImpl; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -import org.apache.commons.lang3.RandomUtils; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.json.JsonTest; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.test.context.junit4.SpringRunner; - -import java.io.IOException; -import java.util.Objects; -import java.util.Optional; - -import javax.persistence.EntityManager; - -@JsonTest -@SpringBootTest( - classes = { - CustomerMapperImpl.class, - MembershipMapperImpl.class, - MembershipMapperImpl.class, - MembershipDTO.JsonSerializer.class, - MembershipDTO.JsonDeserializer.class - }) -@RunWith(SpringRunner.class) -public class MembershipDTOIntTest { - - private static final Long SOME_CUSTOMER_ID = RandomUtils.nextLong(100, 199); - private static final Integer SOME_CUSTOMER_REFERENCE = 10001; - private static final String SOME_CUSTOMER_PREFIX = "abc"; - private static final String SOME_CUSTOMER_NAME = "Some Customer Name"; - private static final String SOME_CUSTOMER_DISPLAY_LABEL = "Some Customer Name [10001:abc]"; - private static final Customer SOME_CUSTOMER = new Customer().id(SOME_CUSTOMER_ID) - .reference(SOME_CUSTOMER_REFERENCE) - .prefix(SOME_CUSTOMER_PREFIX) - .name(SOME_CUSTOMER_NAME); - - private static final Long SOME_SEPA_MANDATE_ID = RandomUtils.nextLong(300, 399); - private static final Membership SOME_SEPA_MANDATE = new Membership().id(SOME_SEPA_MANDATE_ID).customer(SOME_CUSTOMER); - - @Rule - public MockitoRule mockito = MockitoJUnit.rule(); - - @Autowired - private ObjectMapper objectMapper; - - @Autowired - private MembershipMapper membershipMapper; - - @MockBean - private CustomerRepository customerRepository; - - @MockBean - private MembershipRepository membershipRepository; - - @MockBean - private MembershipValidator membershipValidator; - - @MockBean - private MembershipService MembershipService; - - @MockBean - private EntityManager em; - - @MockBean - public UserRoleAssignmentService userRoleAssignmentService; - - private SecurityContextMock securityContext; - - @Before - public void init() { - given(customerRepository.findById(SOME_CUSTOMER_ID)).willReturn(Optional.of(SOME_CUSTOMER)); - given(membershipRepository.findById(SOME_SEPA_MANDATE_ID)).willReturn((Optional.of(SOME_SEPA_MANDATE))); - - securityContext = SecurityContextMock.usingMock(userRoleAssignmentService); - } - - @Test - public void shouldSerializePartiallyForFinancialCustomerContact() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser() - .withRole(CustomerDTO.class, SOME_CUSTOMER_ID, CustomerFinancialContact.ROLE); - final MembershipDTO given = createSampleDTO(SOME_SEPA_MANDATE_ID, SOME_CUSTOMER_ID); - - // when - final String actual = objectMapper.writeValueAsString(given); - - // then - given.setRemark(null); - assertEquals(createExpectedJSon(given), actual); - } - - @Test - public void shouldSerializeCompletelyForSupporter() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser().withAuthority(AuthoritiesConstants.SUPPORTER); - final MembershipDTO given = createSampleDTO(SOME_SEPA_MANDATE_ID, SOME_CUSTOMER_ID); - - // when - final String actual = objectMapper.writeValueAsString(given); - - // then - assertEquals(createExpectedJSon(given), actual); - } - - @Test - public void shouldNotDeserializeForContractualCustomerContact() { - // given - securityContext.havingAuthenticatedUser() - .withRole(CustomerDTO.class, SOME_CUSTOMER_ID, CustomerContractualContact.ROLE); - final String json = new JSonBuilder() - .withFieldValue("id", SOME_SEPA_MANDATE_ID) - .withFieldValue("remark", "Updated Remark") - .toString(); - - // when - final Throwable actual = catchThrowable(() -> objectMapper.readValue(json, MembershipDTO.class)); - - // then - assertThat(actual).isInstanceOfSatisfying( - BadRequestAlertException.class, - bre -> assertThat(bre.getMessage()).isEqualTo( - "Update of field MembershipDTO.remark prohibited for current user role(s): CustomerContractualContact")); - } - - @Test - public void shouldDeserializeForAdminIfRemarkIsChanged() throws IOException { - // given - securityContext.havingAuthenticatedUser().withAuthority(AuthoritiesConstants.ADMIN); - final String json = new JSonBuilder() - .withFieldValue("id", SOME_SEPA_MANDATE_ID) - .withFieldValue("remark", "Updated Remark") - .toString(); - - // when - final MembershipDTO actual = objectMapper.readValue(json, MembershipDTO.class); - - // then - final MembershipDTO expected = new MembershipDTO(); - expected.setId(SOME_SEPA_MANDATE_ID); - expected.setCustomerId(SOME_CUSTOMER_ID); - expected.setRemark("Updated Remark"); - assertThat(actual).isEqualToIgnoringGivenFields(expected, "customerPrefix", "customerDisplayLabel", "displayLabel"); - } - - // --- only test fixture below --- - - private String createExpectedJSon(MembershipDTO dto) { - return new JSonBuilder() - .withFieldValueIfPresent("id", dto.getId()) - .withFieldValueIfPresent("admissionDocumentDate", Objects.toString(dto.getAdmissionDocumentDate())) - .withFieldValueIfPresent("cancellationDocumentDate", Objects.toString(dto.getCancellationDocumentDate())) - .withFieldValueIfPresent("memberFromDate", Objects.toString(dto.getMemberFromDate())) - .withFieldValueIfPresent("memberUntilDate", Objects.toString(dto.getMemberUntilDate())) - .withFieldValueIfPresent("remark", dto.getRemark()) - .withFieldValueIfPresent("customerId", dto.getCustomerId()) - .withFieldValue("customerPrefix", dto.getCustomerPrefix()) - .withFieldValue("customerDisplayLabel", dto.getCustomerDisplayLabel()) - .withFieldValue("displayLabel", dto.getDisplayLabel()) - .toString(); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/dto/MembershipDTOUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/dto/MembershipDTOUnitTest.java deleted file mode 100644 index 79c21466..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/dto/MembershipDTOUnitTest.java +++ /dev/null @@ -1,108 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.Role.Admin; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerContractualContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerTechnicalContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.Supporter; - -import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.RandomUtils; -import org.junit.Test; - -import java.time.LocalDate; - -public class MembershipDTOUnitTest extends AccessMappingsUnitTestBase { - - public MembershipDTOUnitTest() { - super(MembershipDTO.class, MembershipDTOUnitTest::createSampleDTO, MembershipDTOUnitTest::createRandomDTO); - } - - @Test - public void shouldHaveProperAccessForAdmin() { - initAccessFor(MembershipDTO.class, Admin.ROLE).shouldBeExactlyFor( - "admissionDocumentDate", - "cancellationDocumentDate", - "memberFromDate", - "memberUntilDate", - "customerId", - "remark"); - updateAccessFor(MembershipDTO.class, Admin.ROLE).shouldBeExactlyFor( - "cancellationDocumentDate", - "memberUntilDate", - "remark"); - readAccessFor(MembershipDTO.class, Admin.ROLE).shouldBeForAllFields(); - } - - @Test - public void shouldHaveProperAccessForSupporter() { - initAccessFor(MembershipDTO.class, Supporter.ROLE).shouldBeForNothing(); - updateAccessFor(MembershipDTO.class, Supporter.ROLE).shouldBeForNothing(); - readAccessFor(MembershipDTO.class, Supporter.ROLE).shouldBeForAllFields(); - } - - @Test - public void shouldHaveProperAccessForContractualContact() { - initAccessFor(MembershipDTO.class, CustomerContractualContact.ROLE).shouldBeForNothing(); - updateAccessFor(MembershipDTO.class, CustomerContractualContact.ROLE).shouldBeForNothing(); - readAccessFor(MembershipDTO.class, CustomerContractualContact.ROLE).shouldBeExactlyFor( - "id", - "admissionDocumentDate", - "cancellationDocumentDate", - "memberFromDate", - "memberUntilDate", - "customerId", - "customerPrefix", - "customerDisplayLabel", - "displayLabel"); - } - - @Test - public void shouldHaveNoAccessForTechnicalContact() { - initAccessFor(MembershipDTO.class, CustomerTechnicalContact.ROLE).shouldBeForNothing(); - updateAccessFor(MembershipDTO.class, CustomerTechnicalContact.ROLE).shouldBeForNothing(); - readAccessFor(MembershipDTO.class, CustomerTechnicalContact.ROLE).shouldBeForNothing(); - } - - @Test - public void shouldHaveNoAccessForNormalUsersWithinCustomerRealm() { - initAccessFor(MembershipDTO.class, Role.AnyCustomerUser.ROLE).shouldBeForNothing(); - updateAccessFor(MembershipDTO.class, Role.AnyCustomerUser.ROLE).shouldBeForNothing(); - readAccessFor(MembershipDTO.class, Role.AnyCustomerUser.ROLE).shouldBeForNothing(); - } - - // --- only test fixture below --- - - static MembershipDTO createSampleDTO(final Long id, final Long parentId) { - final MembershipDTO dto = new MembershipDTO(); - dto.setId(id); - final LocalDate referenceDate = LocalDate.parse("2000-12-07"); - dto.setAdmissionDocumentDate(referenceDate); - dto.setCancellationDocumentDate(referenceDate.plusDays(3500)); - dto.setMemberFromDate(referenceDate.plusDays(4)); - dto.setMemberUntilDate(referenceDate.plusDays(3500).plusDays(400).withDayOfYear(1).minusDays(1)); - dto.setRemark("Some Remark"); - dto.setCustomerId(parentId); - dto.setCustomerPrefix("abc"); - dto.setCustomerDisplayLabel("ABC GmbH [abc:10001]"); - dto.setDisplayLabel("ABC GmbH [abc:10001] 2000-12-11 - 2011-12-31"); - return dto; - } - - public static MembershipDTO createRandomDTO(final Long id, final Long parentId) { - final MembershipDTO dto = new MembershipDTO(); - dto.setId(id); - final LocalDate randomDate = LocalDate.parse("2000-12-07").plusDays(RandomUtils.nextInt(1, 999)); - dto.setAdmissionDocumentDate(randomDate); - dto.setCancellationDocumentDate(randomDate.plusDays(3500)); - dto.setMemberFromDate(randomDate.plusDays(4)); - dto.setMemberUntilDate(randomDate.plusDays(3500).plusDays(400).withDayOfYear(1).minusDays(1)); - dto.setRemark(RandomStringUtils.randomAlphanumeric(20).toUpperCase()); - dto.setCustomerId(parentId); - dto.setCustomerPrefix(RandomStringUtils.randomAlphabetic(3).toLowerCase()); - dto.setCustomerDisplayLabel(RandomStringUtils.randomAlphabetic(13)); - dto.setDisplayLabel(dto.getCustomerDisplayLabel() + dto.getMemberFromDate() + " - " + dto.getMemberUntilDate()); - return dto; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/dto/SepaMandateDTOIntTest.java b/src/test/java/org/hostsharing/hsadminng/service/dto/SepaMandateDTOIntTest.java deleted file mode 100644 index 34807ba1..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/dto/SepaMandateDTOIntTest.java +++ /dev/null @@ -1,206 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowable; -import static org.hostsharing.hsadminng.service.dto.SepaMandateDTOUnitTest.createSampleDTO; -import static org.junit.Assert.assertEquals; -import static org.mockito.BDDMockito.given; - -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.SepaMandate; -import org.hostsharing.hsadminng.repository.CustomerRepository; -import org.hostsharing.hsadminng.repository.MembershipRepository; -import org.hostsharing.hsadminng.repository.SepaMandateRepository; -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.MembershipValidator; -import org.hostsharing.hsadminng.service.SepaMandateService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.JSonBuilder; -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerContractualContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerFinancialContact; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextMock; -import org.hostsharing.hsadminng.service.mapper.CustomerMapperImpl; -import org.hostsharing.hsadminng.service.mapper.MembershipMapperImpl; -import org.hostsharing.hsadminng.service.mapper.SepaMandateMapper; -import org.hostsharing.hsadminng.service.mapper.SepaMandateMapperImpl; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -import org.apache.commons.lang3.RandomUtils; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.json.JsonTest; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.test.context.junit4.SpringRunner; - -import java.io.IOException; -import java.util.Objects; -import java.util.Optional; - -import javax.persistence.EntityManager; - -@JsonTest -@SpringBootTest( - classes = { - CustomerMapperImpl.class, - MembershipMapperImpl.class, - SepaMandateMapperImpl.class, - SepaMandateDTO.JsonSerializer.class, - SepaMandateDTO.JsonDeserializer.class - }) -@RunWith(SpringRunner.class) -public class SepaMandateDTOIntTest { - - private static final Long SOME_CUSTOMER_ID = RandomUtils.nextLong(100, 199); - private static final Integer SOME_CUSTOMER_REFERENCE = 10001; - private static final String SOME_CUSTOMER_PREFIX = "abc"; - private static final String SOME_CUSTOMER_NAME = "Some Customer Name"; - private static final String SOME_CUSTOMER_DISPLAY_LABEL = "Some Customer Name [10001:abc]"; - private static final Customer SOME_CUSTOMER = new Customer().id(SOME_CUSTOMER_ID) - .reference(SOME_CUSTOMER_REFERENCE) - .prefix(SOME_CUSTOMER_PREFIX) - .name(SOME_CUSTOMER_NAME); - - private static final Long SOME_SEPA_MANDATE_ID = RandomUtils.nextLong(300, 399); - private static final SepaMandate SOME_SEPA_MANDATE = new SepaMandate().id(SOME_SEPA_MANDATE_ID).customer(SOME_CUSTOMER); - - @Rule - public MockitoRule mockito = MockitoJUnit.rule(); - - @Autowired - private ObjectMapper objectMapper; - - @Autowired - private SepaMandateMapper sepaMandateMapper; - - @MockBean - private SepaMandateRepository sepaMandateRepository; - - @MockBean - private CustomerRepository customerRepository; - - @MockBean - private MembershipRepository membershipRepository; - - @MockBean - private MembershipValidator membershipValidator; - - @MockBean - private SepaMandateService sepaMandateService; - - @MockBean - private EntityManager em; - - @MockBean - public UserRoleAssignmentService userRoleAssignmentService; - - private SecurityContextMock securityContext; - - @Before - public void init() { - given(customerRepository.findById(SOME_CUSTOMER_ID)).willReturn(Optional.of(SOME_CUSTOMER)); - given(sepaMandateRepository.findById(SOME_SEPA_MANDATE_ID)).willReturn((Optional.of(SOME_SEPA_MANDATE))); - - securityContext = SecurityContextMock.usingMock(userRoleAssignmentService); - } - - @Test - public void shouldSerializePartiallyForFinancialCustomerContact() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser() - .withRole(CustomerDTO.class, SOME_CUSTOMER_ID, Role.of(CustomerFinancialContact.class)); - final SepaMandateDTO given = createSampleDTO(SOME_SEPA_MANDATE_ID, SOME_CUSTOMER_ID); - - // when - final String actual = objectMapper.writeValueAsString(given); - - // then - given.setRemark(null); - assertEquals(createExpectedJSon(given), actual); - } - - @Test - public void shouldSerializeCompletelyForSupporter() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser().withAuthority(AuthoritiesConstants.SUPPORTER); - final SepaMandateDTO given = createSampleDTO(SOME_SEPA_MANDATE_ID, SOME_CUSTOMER_ID); - - // when - final String actual = objectMapper.writeValueAsString(given); - - // then - assertEquals(createExpectedJSon(given), actual); - } - - @Test - public void shouldNotDeserializeForContractualCustomerContact() { - // given - securityContext.havingAuthenticatedUser() - .withRole(CustomerDTO.class, SOME_CUSTOMER_ID, CustomerContractualContact.ROLE); - final String json = new JSonBuilder() - .withFieldValue("id", SOME_SEPA_MANDATE_ID) - .withFieldValue("remark", "Updated Remark") - .toString(); - - // when - final Throwable actual = catchThrowable(() -> objectMapper.readValue(json, SepaMandateDTO.class)); - - // then - assertThat(actual).isInstanceOfSatisfying( - BadRequestAlertException.class, - bre -> assertThat(bre.getMessage()).isEqualTo( - "Update of field SepaMandateDTO.remark prohibited for current user role(s): CustomerContractualContact")); - } - - @Test - public void shouldDeserializeForAdminIfRemarkIsChanged() throws IOException { - // given - securityContext.havingAuthenticatedUser().withAuthority(AuthoritiesConstants.ADMIN); - final String json = new JSonBuilder() - .withFieldValue("id", SOME_SEPA_MANDATE_ID) - .withFieldValue("remark", "Updated Remark") - .toString(); - - // when - final SepaMandateDTO actual = objectMapper.readValue(json, SepaMandateDTO.class); - - // then - final SepaMandateDTO expected = new SepaMandateDTO(); - expected.setId(SOME_SEPA_MANDATE_ID); - expected.setCustomerId(SOME_CUSTOMER_ID); - expected.setRemark("Updated Remark"); - expected.setCustomerDisplayLabel(SOME_CUSTOMER_DISPLAY_LABEL); - assertThat(actual).isEqualToIgnoringGivenFields(expected, "displayLabel"); - } - - // --- only test fixture below --- - - private String createExpectedJSon(SepaMandateDTO dto) { - return new JSonBuilder() - .withFieldValueIfPresent("id", dto.getId()) - .withFieldValueIfPresent("reference", dto.getReference()) - .withFieldValueIfPresent("iban", dto.getIban()) - .withFieldValueIfPresent("bic", dto.getBic()) - .withFieldValueIfPresent("grantingDocumentDate", Objects.toString(dto.getGrantingDocumentDate())) - .withFieldValueIfPresent("revokationDocumentDate", Objects.toString(dto.getRevokationDocumentDate())) - .withFieldValueIfPresent("validFromDate", Objects.toString(dto.getValidFromDate())) - .withFieldValueIfPresent("validUntilDate", Objects.toString(dto.getValidUntilDate())) - .withFieldValueIfPresent("lastUsedDate", Objects.toString(dto.getLastUsedDate())) - .withFieldValueIfPresent("remark", dto.getRemark()) - .withFieldValueIfPresent("customerId", dto.getCustomerId()) - .withFieldValue("customerDisplayLabel", dto.getCustomerDisplayLabel()) - .toString(); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/dto/SepaMandateDTOUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/dto/SepaMandateDTOUnitTest.java deleted file mode 100644 index 76bd52bd..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/dto/SepaMandateDTOUnitTest.java +++ /dev/null @@ -1,137 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.Role.Admin; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerContractualContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerTechnicalContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.Supporter; - -import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.RandomUtils; -import org.junit.Test; - -import java.time.LocalDate; - -public class SepaMandateDTOUnitTest extends AccessMappingsUnitTestBase { - - public SepaMandateDTOUnitTest() { - super(SepaMandateDTO.class, SepaMandateDTOUnitTest::createSampleDTO, SepaMandateDTOUnitTest::createRandomDTO); - } - - @Test - public void shouldHaveProperAccessForAdmin() { - initAccessFor(SepaMandateDTO.class, Role.of(Admin.class)).shouldBeExactlyFor( - "grantingDocumentDate", - "bic", - "remark", - "validUntilDate", - "customerId", - "validFromDate", - "iban", - "revokationDocumentDate", - "lastUsedDate", - "reference"); - updateAccessFor(SepaMandateDTO.class, Role.of(Admin.class)).shouldBeExactlyFor( - "remark", - "validUntilDate", - "revokationDocumentDate", - "lastUsedDate"); - readAccessFor(SepaMandateDTO.class, Role.of(Admin.class)).shouldBeForAllFields(); - } - - @Test - public void shouldHaveProperAccessForSupporter() { - initAccessFor(SepaMandateDTO.class, Role.of(Supporter.class)).shouldBeExactlyFor( - "grantingDocumentDate", - "bic", - "validUntilDate", - "customerId", - "validFromDate", - "iban", - "reference"); - updateAccessFor(SepaMandateDTO.class, Role.of(Supporter.class)).shouldBeExactlyFor( - "remark", - "validUntilDate", - "revokationDocumentDate"); - readAccessFor(SepaMandateDTO.class, Role.of(Supporter.class)).shouldBeForAllFields(); - } - - @Test - public void shouldHaveProperAccessForContractualContact() { - initAccessFor(SepaMandateDTO.class, Role.of(CustomerContractualContact.class)).shouldBeExactlyFor( - "grantingDocumentDate", - "bic", - "validUntilDate", - "customerId", - "validFromDate", - "iban", - "reference"); - updateAccessFor(SepaMandateDTO.class, Role.of(CustomerContractualContact.class)).shouldBeExactlyFor( - "validUntilDate", - "revokationDocumentDate"); - readAccessFor(SepaMandateDTO.class, Role.of(CustomerContractualContact.class)).shouldBeExactlyFor( - "grantingDocumentDate", - "bic", - "id", - "validUntilDate", - "customerId", - "validFromDate", - "iban", - "revokationDocumentDate", - "customerDisplayLabel", - "lastUsedDate", - "reference"); - } - - @Test - public void shouldHaveNoAccessForTechnicalContact() { - initAccessFor(SepaMandateDTO.class, Role.of(CustomerTechnicalContact.class)).shouldBeForNothing(); - updateAccessFor(SepaMandateDTO.class, Role.of(CustomerTechnicalContact.class)).shouldBeForNothing(); - readAccessFor(SepaMandateDTO.class, Role.of(CustomerTechnicalContact.class)).shouldBeForNothing(); - } - - @Test - public void shouldHaveNoAccessForNormalUsersWithinCustomerRealm() { - initAccessFor(SepaMandateDTO.class, Role.AnyCustomerUser.ROLE).shouldBeForNothing(); - updateAccessFor(SepaMandateDTO.class, Role.AnyCustomerUser.ROLE).shouldBeForNothing(); - readAccessFor(SepaMandateDTO.class, Role.AnyCustomerUser.ROLE).shouldBeForNothing(); - } - - // --- only test fixture below --- - - public static SepaMandateDTO createSampleDTO(final Long id, final Long parentId) { - final SepaMandateDTO dto = new SepaMandateDTO(); - dto.setId(id); - dto.setReference("Some Reference"); - dto.setGrantingDocumentDate(LocalDate.parse("2000-12-07")); - dto.setRevokationDocumentDate(LocalDate.parse("2019-04-27")); - dto.setValidFromDate(LocalDate.parse("2000-12-18")); - dto.setValidUntilDate(LocalDate.parse("2019-05-31")); - dto.setLastUsedDate(LocalDate.parse("2019-04-04")); - dto.setIban("DE1234IBAN"); - dto.setBic("BIC1234"); - dto.setRemark("Some Remark"); - dto.setCustomerId(parentId); - dto.setCustomerDisplayLabel("abc"); - return dto; - } - - public static SepaMandateDTO createRandomDTO(final Long id, final Long parentId) { - final SepaMandateDTO dto = new SepaMandateDTO(); - dto.setId(id); - dto.setReference(RandomStringUtils.randomAlphanumeric(10)); - final LocalDate randomDate = LocalDate.parse("2000-12-07").plusDays(RandomUtils.nextInt(1, 999)); - dto.setGrantingDocumentDate(randomDate); - dto.setRevokationDocumentDate(randomDate.plusDays(RandomUtils.nextInt(1100, 2999))); - dto.setValidFromDate(randomDate.plusDays(RandomUtils.nextInt(0, 7))); - dto.setValidUntilDate(dto.getRevokationDocumentDate().plusDays(7)); - dto.setLastUsedDate(dto.getRevokationDocumentDate().minusDays(20)); - dto.setIban(RandomStringUtils.randomAlphanumeric(20).toUpperCase()); - dto.setBic(RandomStringUtils.randomAlphanumeric(10).toUpperCase()); - dto.setRemark(RandomStringUtils.randomAlphanumeric(20).toUpperCase()); - dto.setCustomerId(parentId); - dto.setCustomerDisplayLabel(RandomStringUtils.randomAlphabetic(3).toLowerCase()); - return dto; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/dto/ShareDTOIntTest.java b/src/test/java/org/hostsharing/hsadminng/service/dto/ShareDTOIntTest.java deleted file mode 100644 index 0948d163..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/dto/ShareDTOIntTest.java +++ /dev/null @@ -1,227 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.catchThrowable; -import static org.junit.Assert.assertEquals; -import static org.mockito.BDDMockito.given; - -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.domain.Share; -import org.hostsharing.hsadminng.domain.enumeration.ShareAction; -import org.hostsharing.hsadminng.repository.CustomerRepository; -import org.hostsharing.hsadminng.repository.MembershipRepository; -import org.hostsharing.hsadminng.repository.ShareRepository; -import org.hostsharing.hsadminng.service.MembershipValidator; -import org.hostsharing.hsadminng.service.ShareService; -import org.hostsharing.hsadminng.service.ShareValidator; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.JSonBuilder; -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerContractualContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerFinancialContact; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextMock; -import org.hostsharing.hsadminng.service.mapper.CustomerMapperImpl; -import org.hostsharing.hsadminng.service.mapper.MembershipMapperImpl; -import org.hostsharing.hsadminng.service.mapper.ShareMapper; -import org.hostsharing.hsadminng.service.mapper.ShareMapperImpl; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -import org.apache.commons.lang3.RandomUtils; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.json.JsonTest; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.test.context.junit4.SpringRunner; - -import java.io.IOException; -import java.time.LocalDate; -import java.util.Optional; - -import javax.persistence.EntityManager; - -@JsonTest -@SpringBootTest( - classes = { - CustomerMapperImpl.class, - MembershipMapperImpl.class, - ShareMapperImpl.class, - ShareDTO.JsonSerializer.class, - ShareDTO.JsonDeserializer.class - }) -@RunWith(SpringRunner.class) -public class ShareDTOIntTest { - - private static final Long SOME_CUSTOMER_ID = RandomUtils.nextLong(100, 199); - private static final Integer SOME_CUSTOMER_REFERENCE = 10001; - private static final String SOME_CUSTOMER_PREFIX = "abc"; - private static final String SOME_CUSTOMER_NAME = "Some Customer Name"; - private static final Customer SOME_CUSTOMER = new Customer().id(SOME_CUSTOMER_ID) - .reference(SOME_CUSTOMER_REFERENCE) - .prefix(SOME_CUSTOMER_PREFIX) - .name(SOME_CUSTOMER_NAME); - - private static final Long SOME_MEMBERSHIP_ID = RandomUtils.nextLong(200, 299); - private static final LocalDate SOME_MEMBER_FROM_DATE = LocalDate.parse("2000-12-06"); - private static final Membership SOME_MEMBERSHIP = new Membership().id(SOME_MEMBERSHIP_ID) - .customer(SOME_CUSTOMER) - .memberFromDate(SOME_MEMBER_FROM_DATE); - private static final String SOME_MEMBERSHIP_DISPLAY_LABEL = "Some Customer Name [10001:abc] 2000-12-06 - ..."; - - private static final Long SOME_SHARE_ID = RandomUtils.nextLong(300, 399); - private static final Share SOME_SHARE = new Share().id(SOME_SHARE_ID).membership(SOME_MEMBERSHIP); - - @Rule - public MockitoRule mockito = MockitoJUnit.rule(); - - @Autowired - private ObjectMapper objectMapper; - - @Autowired - private ShareMapper shareMapper; - - @MockBean - private ShareRepository shareRepository; - - @MockBean - private ShareValidator shareValidator; - - @MockBean - private CustomerRepository customerRepository; - - @MockBean - private MembershipRepository membershipRepository; - - @MockBean - private MembershipValidator membershipValidator; - - @MockBean - private ShareService shareService; - - @MockBean - private EntityManager em; - - @MockBean - private UserRoleAssignmentService userRoleAssignmentService; - - private SecurityContextMock securityContext; - - @Before - public void init() { - given(customerRepository.findById(SOME_CUSTOMER_ID)).willReturn(Optional.of(SOME_CUSTOMER)); - given(membershipRepository.findById(SOME_MEMBERSHIP_ID)).willReturn(Optional.of(SOME_MEMBERSHIP)); - given(shareRepository.findById(SOME_SHARE_ID)).willReturn((Optional.of(SOME_SHARE))); - - securityContext = SecurityContextMock.usingMock(userRoleAssignmentService); - } - - @Test - public void shouldSerializePartiallyForFinancialCustomerContact() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser() - .withRole(CustomerDTO.class, SOME_CUSTOMER_ID, CustomerFinancialContact.ROLE); - final ShareDTO given = createSomeShareDTO(SOME_SHARE_ID); - - // when - final String actual = objectMapper.writeValueAsString(given); - - // then - given.setRemark(null); - assertEquals(createExpectedJSon(given), actual); - } - - @Test - public void shouldSerializeCompletelyForSupporter() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser().withAuthority(Role.Supporter.ROLE.authority()); - final ShareDTO given = createSomeShareDTO(SOME_SHARE_ID); - - // when - final String actual = objectMapper.writeValueAsString(given); - - // then - assertEquals(createExpectedJSon(given), actual); - } - - @Test - public void shouldNotDeserializeForContractualCustomerContact() { - // given - securityContext.havingAuthenticatedUser() - .withRole(CustomerDTO.class, SOME_CUSTOMER_ID, CustomerContractualContact.ROLE); - final String json = new JSonBuilder() - .withFieldValue("id", SOME_SHARE_ID) - .withFieldValue("remark", "Updated Remark") - .toString(); - - // when - final Throwable actual = catchThrowable(() -> objectMapper.readValue(json, ShareDTO.class)); - - // then - assertThat(actual).isInstanceOfSatisfying( - BadRequestAlertException.class, - bre -> assertThat(bre.getMessage()) - .isEqualTo( - "Update of field ShareDTO.remark prohibited for current user role(s): CustomerContractualContact")); - } - - @Test - public void shouldDeserializeForAdminIfRemarkIsChanged() throws IOException { - // given - securityContext.havingAuthenticatedUser().withAuthority(Role.Admin.ROLE.authority()); - final String json = new JSonBuilder() - .withFieldValue("id", SOME_SHARE_ID) - .withFieldValue("remark", "Updated Remark") - .toString(); - - // when - final ShareDTO actual = objectMapper.readValue(json, ShareDTO.class); - - // then - final ShareDTO expected = new ShareDTO(); - expected.setId(SOME_SHARE_ID); - expected.setMembershipId(SOME_MEMBERSHIP_ID); - expected.setRemark("Updated Remark"); - expected.setMembershipDisplayLabel(SOME_MEMBERSHIP_DISPLAY_LABEL); - assertThat(actual).isEqualToIgnoringGivenFields(expected, "displayLabel"); - } - - // --- only test fixture below --- - - private String createExpectedJSon(ShareDTO dto) { - return new JSonBuilder() - .withFieldValueIfPresent("id", dto.getId()) - .withFieldValueIfPresent("documentDate", dto.getDocumentDate().toString()) - .withFieldValueIfPresent("valueDate", dto.getValueDate().toString()) - .withFieldValueIfPresent("action", dto.getAction().name()) - .withFieldValueIfPresent("quantity", dto.getQuantity()) - .withFieldValueIfPresent("remark", dto.getRemark()) - .withFieldValueIfPresent("membershipId", dto.getMembershipId()) - .withFieldValue("membershipDisplayLabel", dto.getMembershipDisplayLabel()) - .toString(); - } - - private ShareDTO createSomeShareDTO(final long id) { - final ShareDTO given = new ShareDTO(); - given.setId(id); - given.setAction(ShareAction.SUBSCRIPTION); - given.setQuantity(16); - given.setDocumentDate(LocalDate.parse("2019-04-27")); - given.setValueDate(LocalDate.parse("2019-04-28")); - given.setMembershipId(SOME_MEMBERSHIP_ID); - given.setRemark("Some Remark"); - given.setMembershipDisplayLabel("Display Label for Membership #" + SOME_MEMBERSHIP_ID); - return given; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/dto/ShareDTOUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/dto/ShareDTOUnitTest.java deleted file mode 100644 index 17b79e77..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/dto/ShareDTOUnitTest.java +++ /dev/null @@ -1,92 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import org.hostsharing.hsadminng.domain.enumeration.ShareAction; -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.Role.Admin; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerContractualContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerTechnicalContact; -import org.hostsharing.hsadminng.service.util.RandomUtil; - -import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.RandomUtils; -import org.junit.Test; - -import java.time.LocalDate; - -public class ShareDTOUnitTest extends AccessMappingsUnitTestBase { - - public ShareDTOUnitTest() { - super(ShareDTO.class, ShareDTOUnitTest::createSampleDTO, ShareDTOUnitTest::createRandomDTO); - } - - @Test - public void shouldHaveProperAccessForAdmin() { - initAccessFor(ShareDTO.class, Admin.ROLE).shouldBeExactlyFor( - "membershipId", - "documentDate", - "quantity", - "action", - "valueDate", - "remark"); - updateAccessFor(ShareDTO.class, Admin.ROLE).shouldBeExactlyFor("remark"); - readAccessFor(ShareDTO.class, Admin.ROLE).shouldBeForAllFields(); - } - - @Test - public void shouldHaveProperAccessForContractualContact() { - initAccessFor(ShareDTO.class, CustomerContractualContact.ROLE).shouldBeForNothing(); - updateAccessFor(ShareDTO.class, CustomerContractualContact.ROLE).shouldBeForNothing(); - readAccessFor(ShareDTO.class, CustomerContractualContact.ROLE).shouldBeExactlyFor( - "id", - "membershipId", - "documentDate", - "quantity", - "action", - "valueDate", - "membershipDisplayLabel"); - } - - @Test - public void shouldHaveNoAccessForTechnicalContact() { - initAccessFor(ShareDTO.class, CustomerTechnicalContact.ROLE).shouldBeForNothing(); - updateAccessFor(ShareDTO.class, CustomerTechnicalContact.ROLE).shouldBeForNothing(); - readAccessFor(ShareDTO.class, CustomerTechnicalContact.ROLE).shouldBeForNothing(); - } - - @Test - public void shouldHaveNoAccessForNormalUsersWithinCustomerRealm() { - initAccessFor(ShareDTO.class, Role.AnyCustomerUser.ROLE).shouldBeForNothing(); - updateAccessFor(ShareDTO.class, Role.AnyCustomerUser.ROLE).shouldBeForNothing(); - readAccessFor(ShareDTO.class, Role.AnyCustomerUser.ROLE).shouldBeForNothing(); - } - - // --- only test fixture below --- - - private static ShareDTO createSampleDTO(final Long id, final Long parentId) { - final ShareDTO dto = new ShareDTO(); - dto.setId(id); - dto.setMembershipId(parentId); - dto.setAction(ShareAction.SUBSCRIPTION); - dto.setQuantity(3); - dto.setDocumentDate(LocalDate.parse("2019-04-22")); - dto.setValueDate(LocalDate.parse("2019-04-30")); - dto.setRemark("Some Remark"); - dto.setMembershipDisplayLabel("The Membership #888"); - return dto; - } - - private static ShareDTO createRandomDTO(final Long id, final Long parentId) { - final ShareDTO dto = new ShareDTO(); - dto.setId(id); - dto.setMembershipId(parentId); - dto.setAction(RandomUtil.generateEnumValue(ShareAction.class)); - dto.setQuantity(RandomUtils.nextInt()); - final LocalDate randomDate = LocalDate.parse("2000-12-07").plusDays(RandomUtils.nextInt(1, 999)); - dto.setDocumentDate(randomDate); - dto.setValueDate(randomDate.plusDays(RandomUtils.nextInt(1, 99))); - dto.setRemark(RandomStringUtils.randomAlphanumeric(20)); - dto.setMembershipDisplayLabel("The Membership #" + dto.getMembershipId()); - return dto; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/dto/UserRoleAssignmentUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/dto/UserRoleAssignmentUnitTest.java deleted file mode 100644 index 5a22d68d..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/dto/UserRoleAssignmentUnitTest.java +++ /dev/null @@ -1,163 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.dto; - -import static org.apache.commons.lang3.tuple.ImmutablePair.of; -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertEquals; -import static org.mockito.BDDMockito.given; - -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.domain.UserRoleAssignment; -import org.hostsharing.hsadminng.repository.UserRepository; -import org.hostsharing.hsadminng.repository.UserRoleAssignmentRepository; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.JSonBuilder; -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextMock; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.json.JsonTest; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.test.context.junit4.SpringRunner; - -import java.io.IOException; -import java.util.Optional; - -@JsonTest -@SpringBootTest( - classes = { - UserRoleAssignmentRepository.class, - UserRoleAssignmentService.class, - UserRoleAssignment.UserRoleAssignmentJsonSerializer.class, - UserRoleAssignment.UserRoleAssignmentJsonDeserializer.class }) -@RunWith(SpringRunner.class) -public class UserRoleAssignmentUnitTest { - - private static final long USER_ROLE_ASSIGNMENT_ID = 1234L; - private static final long CUSTOMER_ID = 888L; - private static final long USER_ID = 42L; - - @Rule - public MockitoRule mockito = MockitoJUnit.rule(); - - @Autowired - private ObjectMapper objectMapper; - - @MockBean - private UserRepository userRepository; - - @MockBean - private UserRoleAssignmentRepository userRoleAssignmentRepository; - - @MockBean - private UserRoleAssignmentService userRoleAssignmentService; - - private SecurityContextMock securityContext; - - @Before - public void init() { - securityContext = SecurityContextMock.usingMock(userRoleAssignmentService); - } - - @Test - public void testSerializationAsContractualCustomerContact() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser() - .withRole( - CustomerDTO.class, - CUSTOMER_ID, - Role.CustomerContractualContact.ROLE); - UserRoleAssignment given = createSomeUserRoleAssignment(USER_ROLE_ASSIGNMENT_ID); - - // when - String actual = objectMapper.writeValueAsString(given); - - // then - assertEquals("{}", actual); // dependent rights not yet implemented for UserRoleAssignments - } - - @Test - public void testSerializationAsSupporter() throws JsonProcessingException { - - // given - securityContext.havingAuthenticatedUser().withAuthority(Role.Supporter.ROLE.authority()); - UserRoleAssignment given = createSomeUserRoleAssignment(USER_ROLE_ASSIGNMENT_ID); - - // when - String actual = objectMapper.writeValueAsString(given); - - // then - assertThat(actual).isEqualTo(createExpectedJSon(given)); - } - - @Test - public void testDeserializeAsAdmin() throws IOException { - // given - securityContext.havingAuthenticatedUser().withAuthority(Role.Admin.ROLE.authority()); - given(userRoleAssignmentRepository.findById(USER_ROLE_ASSIGNMENT_ID)) - .willReturn(Optional.of(new UserRoleAssignment().id(USER_ROLE_ASSIGNMENT_ID))); - final User expectedUser = new User().id(USER_ID); - given(userRepository.getOne(USER_ID)).willReturn(expectedUser); - String json = JSonBuilder.asJSon( - of("id", USER_ROLE_ASSIGNMENT_ID), - of("entityTypeId", Customer.ENTITY_TYPE_ID), - of("entityObjectId", CUSTOMER_ID), - of( - "user", - JSonBuilder.asJSon( - of("id", USER_ID))), - of("assignedRole", Role.CustomerTechnicalContact.ROLE.name())); - - // when - UserRoleAssignment actual = objectMapper.readValue(json, UserRoleAssignment.class); - - // then - UserRoleAssignment expected = new UserRoleAssignment(); - expected.setId(USER_ROLE_ASSIGNMENT_ID); - expected.setEntityTypeId(Customer.ENTITY_TYPE_ID); - expected.setEntityObjectId(CUSTOMER_ID); - expected.setAssignedRole(Role.CustomerTechnicalContact.ROLE); - expected.setUser(expectedUser); - assertThat(actual).isEqualToComparingFieldByField(expected); - } - - @Test - public void getAssignedRoleHandlesNullValue() { - assertThat(new UserRoleAssignment().assignedRole(null).getAssignedRole()).isNull(); - assertThat(new UserRoleAssignment().assignedRole(Role.Admin.ROLE).getAssignedRole()).isEqualTo(Role.Admin.ROLE); - } - - // --- only test fixture below --- - - public static String createExpectedJSon(UserRoleAssignment dto) { - return new JSonBuilder() - .withFieldValueIfPresent("id", dto.getId()) - .withFieldValueIfPresent("entityTypeId", dto.getEntityTypeId()) - .withFieldValueIfPresent("entityObjectId", dto.getEntityObjectId()) - .withFieldValueIfPresent("assignedRole", dto.getAssignedRole()) - .withFieldValueIfPresent("user", dto.getUser().getId()) - .toString(); - } - - public static UserRoleAssignment createSomeUserRoleAssignment(final Long id) { - final UserRoleAssignment given = new UserRoleAssignment(); - given.setId(id); - given.setEntityTypeId(Customer.ENTITY_TYPE_ID); - given.setEntityObjectId(CUSTOMER_ID); - given.setUser(new User().id(USER_ID)); - given.setAssignedRole(Role.CustomerTechnicalContact.ROLE); - return given; - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/mapper/UserMapperTest.java b/src/test/java/org/hostsharing/hsadminng/service/mapper/UserMapperTest.java deleted file mode 100644 index 69bd23c3..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/mapper/UserMapperTest.java +++ /dev/null @@ -1,151 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.mapper; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.service.dto.UserDTO; - -import org.apache.commons.lang3.RandomStringUtils; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -/** - * Test class for the UserMapper. - * - * @see UserMapper - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class UserMapperTest { - - private static final String DEFAULT_LOGIN = "johndoe"; - - @Autowired - private UserMapper userMapper; - - private User user; - private UserDTO userDto; - - private static final Long DEFAULT_ID = 1L; - - @Before - public void init() { - user = new User(); - user.setLogin(DEFAULT_LOGIN); - user.setPassword(RandomStringUtils.random(60)); - user.setActivated(true); - user.setEmail("johndoe@localhost"); - user.setFirstName("john"); - user.setLastName("doe"); - user.setImageUrl("image_url"); - user.setLangKey("en"); - - userDto = new UserDTO(user); - } - - @Test - public void usersToUserDTOsShouldMapOnlyNonNullUsers() { - List users = new ArrayList<>(); - users.add(user); - users.add(null); - - List userDTOS = userMapper.usersToUserDTOs(users); - - assertThat(userDTOS).isNotEmpty(); - assertThat(userDTOS).size().isEqualTo(1); - } - - @Test - public void userDTOsToUsersShouldMapOnlyNonNullUsers() { - List usersDto = new ArrayList<>(); - usersDto.add(userDto); - usersDto.add(null); - - List users = userMapper.userDTOsToUsers(usersDto); - - assertThat(users).isNotEmpty(); - assertThat(users).size().isEqualTo(1); - } - - @Test - public void userDTOsToUsersWithAuthoritiesStringShouldMapToUsersWithAuthoritiesDomain() { - Set authoritiesAsString = new HashSet<>(); - authoritiesAsString.add("ADMIN"); - userDto.setAuthorities(authoritiesAsString); - - List usersDto = new ArrayList<>(); - usersDto.add(userDto); - - List users = userMapper.userDTOsToUsers(usersDto); - - assertThat(users).isNotEmpty(); - assertThat(users).size().isEqualTo(1); - assertThat(users.get(0).getAuthorities()).isNotNull(); - assertThat(users.get(0).getAuthorities()).isNotEmpty(); - assertThat(users.get(0).getAuthorities().iterator().next().getName()).isEqualTo("ADMIN"); - } - - @Test - public void userDTOsToUsersMapWithNullAuthoritiesStringShouldReturnUserWithEmptyAuthorities() { - userDto.setAuthorities(null); - - List usersDto = new ArrayList<>(); - usersDto.add(userDto); - - List users = userMapper.userDTOsToUsers(usersDto); - - assertThat(users).isNotEmpty(); - assertThat(users).size().isEqualTo(1); - assertThat(users.get(0).getAuthorities()).isNotNull(); - assertThat(users.get(0).getAuthorities()).isEmpty(); - } - - @Test - public void userDTOToUserMapWithAuthoritiesStringShouldReturnUserWithAuthorities() { - Set authoritiesAsString = new HashSet<>(); - authoritiesAsString.add("ADMIN"); - userDto.setAuthorities(authoritiesAsString); - - userDto.setAuthorities(authoritiesAsString); - - User user = userMapper.userDTOToUser(userDto); - - assertThat(user).isNotNull(); - assertThat(user.getAuthorities()).isNotNull(); - assertThat(user.getAuthorities()).isNotEmpty(); - assertThat(user.getAuthorities().iterator().next().getName()).isEqualTo("ADMIN"); - } - - @Test - public void userDTOToUserMapWithNullAuthoritiesStringShouldReturnUserWithEmptyAuthorities() { - userDto.setAuthorities(null); - - User user = userMapper.userDTOToUser(userDto); - - assertThat(user).isNotNull(); - assertThat(user.getAuthorities()).isNotNull(); - assertThat(user.getAuthorities()).isEmpty(); - } - - @Test - public void userDTOToUserMapWithNullUserShouldReturnNull() { - assertThat(userMapper.userDTOToUser(null)).isNull(); - } - - @Test - public void testUserFromId() { - assertThat(userMapper.userFromId(DEFAULT_ID).getId()).isEqualTo(DEFAULT_ID); - assertThat(userMapper.userFromId(null)).isNull(); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/service/util/ReflectionUtilUnitTest.java b/src/test/java/org/hostsharing/hsadminng/service/util/ReflectionUtilUnitTest.java deleted file mode 100644 index 43013560..00000000 --- a/src/test/java/org/hostsharing/hsadminng/service/util/ReflectionUtilUnitTest.java +++ /dev/null @@ -1,147 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.service.util; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.ThrowableAssert.catchThrowable; -import static org.hostsharing.hsadminng.service.util.ReflectionUtil.unchecked; - -import org.junit.Test; - -public class ReflectionUtilUnitTest { - - @Test - public void getUknownFieldThrowsIllegalArgumentException() { - final Throwable actual = catchThrowable(() -> ReflectionUtil.getField(SomeClass.class, "unknownField")); - assertThat(actual).isInstanceOf(IllegalArgumentException.class) - .hasMessage("java.lang.NoSuchFieldException: unknownField"); - } - - @Test - public void setValue() { - final TestDto dto = new TestDto(5); - ReflectionUtil.setValue(dto, ReflectionUtil.getField(dto.getClass(), "intVal"), 77); - assertThat(dto.intVal).isEqualTo(77); - } - - @Test - public void setValueViaSuperclass() { - final SubTestDto dto = new SubTestDto(5); - ReflectionUtil.setValue(dto, ReflectionUtil.getField(dto.getClass(), "intVal"), 77); - assertThat(dto.intVal).isEqualTo(77); - } - - @Test - public void getValue() { - final TestDto dto = new TestDto(5); - final int actual = ReflectionUtil.getValue(dto, ReflectionUtil.getField(dto.getClass(), "intVal")); - assertThat(actual).isEqualTo(5); - } - - @Test - public void getValueViaSuperclass() { - final SubTestDto dto = new SubTestDto(5); - final int actual = ReflectionUtil.getValue(dto, ReflectionUtil.getField(dto.getClass(), "intVal")); - assertThat(actual).isEqualTo(5); - } - - @Test - public void determineGenericInterfaceParameteDirect() { - Class actual = ReflectionUtil.determineGenericInterfaceParameter(SuperClass.class, GenericInterface.class, 1); - assertThat(actual).isEqualTo(Long.class); - } - - @Test - public void determineGenericInterfaceParameterViaSuperclass() { - Class actual = ReflectionUtil.determineGenericInterfaceParameter(SomeClass.class, GenericInterface.class, 1); - assertThat(actual).isEqualTo(Long.class); - } - - @Test - public void throwsExceptionIfGenericInterfaceNotImplemented() { - final Throwable actual = catchThrowable( - () -> ReflectionUtil.determineGenericInterfaceParameter(SomeClass.class, UnusedGenericInterface.class, 1)); - assertThat(actual).isInstanceOf(AssertionError.class) - .hasMessageContaining("SomeClass expected to implement UnusedGenericInterface<...>"); - } - - @Test - public void determineGenericClassParameterDirect() { - Class actual = ReflectionUtil.determineGenericClassParameter(SuperClass.class, GenericClass.class, 1); - assertThat(actual).isEqualTo(Boolean.class); - } - - @Test - public void determineGenericClassParameterViaSuperclss() { - Class actual = ReflectionUtil.determineGenericClassParameter(SomeClass.class, GenericClass.class, 1); - assertThat(actual).isEqualTo(Boolean.class); - } - - @Test - public void throwsExceptionIfGenericClassNotExended() { - final Throwable actual = catchThrowable( - () -> ReflectionUtil.determineGenericClassParameter(SomeClass.class, UnusedSuperClass.class, 1)); - assertThat(actual).isInstanceOf(AssertionError.class) - .hasMessageContaining("GenericClass expected to extend UnusedSuperClass<...>"); - } - - @Test - public void uncheckedRethrowsCheckedException() { - final Exception givenException = new Exception("Checked Test Exception"); - final Throwable actual = catchThrowable(() -> unchecked(() -> { - throw givenException; - })); - assertThat(actual) - .isInstanceOfSatisfying(RuntimeException.class, rte -> assertThat(rte.getCause()).isSameAs(givenException)); - } - - @Test - public void asEnumValue() { - assertThat(ReflectionUtil.asEnumValue(SomeEnum.class, "GREEN")).isEqualTo(SomeEnum.GREEN); - } - - // --- only test fixture below --- - - private static class TestDto { - - int intVal; - - TestDto(final int intval) { - this.intVal = intval; - } - } - - private static class SubTestDto extends TestDto { - - SubTestDto(final int intval) { - super(intval); - } - } - - private static class SomeClass extends SuperClass { - } - - private static class SuperClass extends GenericClass implements IntermediateInterfaces { - } - - private static class UnusedSuperClass extends GenericClass - implements IntermediateInterfaces { - } - - private static class GenericClass { - } - - private interface IntermediateInterfaces extends GenericInterface { - } - - private interface GenericInterface { - } - - private interface UnusedGenericInterface { - } - - enum SomeEnum { - RED, - BLUE, - GREEN - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/AccountResourceIntTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/AccountResourceIntTest.java deleted file mode 100644 index dcaf6a6c..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/AccountResourceIntTest.java +++ /dev/null @@ -1,829 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.doNothing; -import static org.mockito.Mockito.when; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.config.Constants; -import org.hostsharing.hsadminng.domain.Authority; -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.repository.AuthorityRepository; -import org.hostsharing.hsadminng.repository.UserRepository; -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.MailService; -import org.hostsharing.hsadminng.service.UserService; -import org.hostsharing.hsadminng.service.dto.PasswordChangeDTO; -import org.hostsharing.hsadminng.service.dto.UserDTO; -import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator; -import org.hostsharing.hsadminng.web.rest.vm.KeyAndPasswordVM; -import org.hostsharing.hsadminng.web.rest.vm.ManagedUserVM; - -import org.apache.commons.lang3.RandomStringUtils; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.http.MediaType; -import org.springframework.http.converter.HttpMessageConverter; -import org.springframework.security.crypto.password.PasswordEncoder; -import org.springframework.security.test.context.support.WithMockUser; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.transaction.annotation.Transactional; - -import java.time.Instant; -import java.util.*; - -/** - * Test class for the AccountResource REST controller. - * - * @see AccountResource - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class AccountResourceIntTest { - - @Autowired - private UserRepository userRepository; - - @Autowired - private AuthorityRepository authorityRepository; - - @Autowired - private UserService userService; - - @Autowired - private PasswordEncoder passwordEncoder; - - @Autowired - private HttpMessageConverter[] httpMessageConverters; - - @Autowired - private ExceptionTranslator exceptionTranslator; - - @Mock - private UserService mockUserService; - - @Mock - private MailService mockMailService; - - private MockMvc restMvc; - - private MockMvc restUserMockMvc; - - @Before - public void setup() { - MockitoAnnotations.initMocks(this); - doNothing().when(mockMailService).sendActivationEmail(any()); - AccountResource accountResource = new AccountResource(userRepository, userService, mockMailService); - - AccountResource accountUserMockResource = new AccountResource(userRepository, mockUserService, mockMailService); - this.restMvc = MockMvcBuilders.standaloneSetup(accountResource) - .setMessageConverters(httpMessageConverters) - .setControllerAdvice(exceptionTranslator) - .build(); - this.restUserMockMvc = MockMvcBuilders.standaloneSetup(accountUserMockResource) - .setControllerAdvice(exceptionTranslator) - .build(); - } - - @Test - public void testNonAuthenticatedUser() throws Exception { - restUserMockMvc.perform( - get("/api/authenticate") - .accept(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()) - .andExpect(content().string("")); - } - - @Test - public void testAuthenticatedUser() throws Exception { - restUserMockMvc.perform( - get("/api/authenticate") - .with(request -> { - request.setRemoteUser("test"); - return request; - }) - .accept(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()) - .andExpect(content().string("test")); - } - - @Test - public void testGetExistingAccount() throws Exception { - Set authorities = new HashSet<>(); - Authority authority = new Authority(); - authority.setName(AuthoritiesConstants.ADMIN); - authorities.add(authority); - - User user = new User(); - user.setLogin("test"); - user.setFirstName("john"); - user.setLastName("doe"); - user.setEmail("john.doe@jhipster.com"); - user.setImageUrl("http://placehold.it/50x50"); - user.setLangKey("en"); - user.setAuthorities(authorities); - when(mockUserService.getUserWithAuthorities()).thenReturn(Optional.of(user)); - - restUserMockMvc.perform( - get("/api/account") - .accept(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.login").value("test")) - .andExpect(jsonPath("$.firstName").value("john")) - .andExpect(jsonPath("$.lastName").value("doe")) - .andExpect(jsonPath("$.email").value("john.doe@jhipster.com")) - .andExpect(jsonPath("$.imageUrl").value("http://placehold.it/50x50")) - .andExpect(jsonPath("$.langKey").value("en")) - .andExpect(jsonPath("$.authorities").value(AuthoritiesConstants.ADMIN)); - } - - @Test - public void testGetUnknownAccount() throws Exception { - when(mockUserService.getUserWithAuthorities()).thenReturn(Optional.empty()); - - restUserMockMvc.perform( - get("/api/account") - .accept(MediaType.APPLICATION_PROBLEM_JSON)) - .andExpect(status().isInternalServerError()); - } - - @Test - @Transactional - public void testRegisterValid() throws Exception { - ManagedUserVM validUser = new ManagedUserVM(); - validUser.setLogin("test-register-valid"); - validUser.setPassword("password"); - validUser.setFirstName("Alice"); - validUser.setLastName("Test"); - validUser.setEmail("test-register-valid@example.com"); - validUser.setImageUrl("http://placehold.it/50x50"); - validUser.setLangKey(Constants.DEFAULT_LANGUAGE); - validUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - assertThat(userRepository.findOneByLogin("test-register-valid").isPresent()).isFalse(); - - restMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(validUser))) - .andExpect(status().isCreated()); - - assertThat(userRepository.findOneByLogin("test-register-valid").isPresent()).isTrue(); - } - - @Test - @Transactional - public void testRegisterInvalidLogin() throws Exception { - ManagedUserVM invalidUser = new ManagedUserVM(); - invalidUser.setLogin("funky-log!n");// <-- invalid - invalidUser.setPassword("password"); - invalidUser.setFirstName("Funky"); - invalidUser.setLastName("One"); - invalidUser.setEmail("funky@example.com"); - invalidUser.setActivated(true); - invalidUser.setImageUrl("http://placehold.it/50x50"); - invalidUser.setLangKey(Constants.DEFAULT_LANGUAGE); - invalidUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - restUserMockMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(invalidUser))) - .andExpect(status().isBadRequest()); - - Optional user = userRepository.findOneByEmailIgnoreCase("funky@example.com"); - assertThat(user.isPresent()).isFalse(); - } - - @Test - @Transactional - public void testRegisterInvalidEmail() throws Exception { - ManagedUserVM invalidUser = new ManagedUserVM(); - invalidUser.setLogin("bob"); - invalidUser.setPassword("password"); - invalidUser.setFirstName("Bob"); - invalidUser.setLastName("Green"); - invalidUser.setEmail("invalid");// <-- invalid - invalidUser.setActivated(true); - invalidUser.setImageUrl("http://placehold.it/50x50"); - invalidUser.setLangKey(Constants.DEFAULT_LANGUAGE); - invalidUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - restUserMockMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(invalidUser))) - .andExpect(status().isBadRequest()); - - Optional user = userRepository.findOneByLogin("bob"); - assertThat(user.isPresent()).isFalse(); - } - - @Test - @Transactional - public void testRegisterInvalidPassword() throws Exception { - ManagedUserVM invalidUser = new ManagedUserVM(); - invalidUser.setLogin("bob"); - invalidUser.setPassword("123");// password with only 3 digits - invalidUser.setFirstName("Bob"); - invalidUser.setLastName("Green"); - invalidUser.setEmail("bob@example.com"); - invalidUser.setActivated(true); - invalidUser.setImageUrl("http://placehold.it/50x50"); - invalidUser.setLangKey(Constants.DEFAULT_LANGUAGE); - invalidUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - restUserMockMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(invalidUser))) - .andExpect(status().isBadRequest()); - - Optional user = userRepository.findOneByLogin("bob"); - assertThat(user.isPresent()).isFalse(); - } - - @Test - @Transactional - public void testRegisterNullPassword() throws Exception { - ManagedUserVM invalidUser = new ManagedUserVM(); - invalidUser.setLogin("bob"); - invalidUser.setPassword(null);// invalid null password - invalidUser.setFirstName("Bob"); - invalidUser.setLastName("Green"); - invalidUser.setEmail("bob@example.com"); - invalidUser.setActivated(true); - invalidUser.setImageUrl("http://placehold.it/50x50"); - invalidUser.setLangKey(Constants.DEFAULT_LANGUAGE); - invalidUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - restUserMockMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(invalidUser))) - .andExpect(status().isBadRequest()); - - Optional user = userRepository.findOneByLogin("bob"); - assertThat(user.isPresent()).isFalse(); - } - - @Test - @Transactional - public void testRegisterDuplicateLogin() throws Exception { - // First registration - ManagedUserVM firstUser = new ManagedUserVM(); - firstUser.setLogin("alice"); - firstUser.setPassword("password"); - firstUser.setFirstName("Alice"); - firstUser.setLastName("Something"); - firstUser.setEmail("alice@example.com"); - firstUser.setImageUrl("http://placehold.it/50x50"); - firstUser.setLangKey(Constants.DEFAULT_LANGUAGE); - firstUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - // Duplicate login, different email - ManagedUserVM secondUser = new ManagedUserVM(); - secondUser.setLogin(firstUser.getLogin()); - secondUser.setPassword(firstUser.getPassword()); - secondUser.setFirstName(firstUser.getFirstName()); - secondUser.setLastName(firstUser.getLastName()); - secondUser.setEmail("alice2@example.com"); - secondUser.setImageUrl(firstUser.getImageUrl()); - secondUser.setLangKey(firstUser.getLangKey()); - secondUser.setCreatedBy(firstUser.getCreatedBy()); - secondUser.setCreatedDate(firstUser.getCreatedDate()); - secondUser.setLastModifiedBy(firstUser.getLastModifiedBy()); - secondUser.setLastModifiedDate(firstUser.getLastModifiedDate()); - secondUser.setAuthorities(new HashSet<>(firstUser.getAuthorities())); - - // First user - restMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(firstUser))) - .andExpect(status().isCreated()); - - // Second (non activated) user - restMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(secondUser))) - .andExpect(status().isCreated()); - - Optional testUser = userRepository.findOneByEmailIgnoreCase("alice2@example.com"); - assertThat(testUser.isPresent()).isTrue(); - testUser.get().setActivated(true); - userRepository.save(testUser.get()); - - // Second (already activated) user - restMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(secondUser))) - .andExpect(status().is4xxClientError()); - } - - @Test - @Transactional - public void testRegisterDuplicateEmail() throws Exception { - // First user - ManagedUserVM firstUser = new ManagedUserVM(); - firstUser.setLogin("test-register-duplicate-email"); - firstUser.setPassword("password"); - firstUser.setFirstName("Alice"); - firstUser.setLastName("Test"); - firstUser.setEmail("test-register-duplicate-email@example.com"); - firstUser.setImageUrl("http://placehold.it/50x50"); - firstUser.setLangKey(Constants.DEFAULT_LANGUAGE); - firstUser.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - // Register first user - restMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(firstUser))) - .andExpect(status().isCreated()); - - Optional testUser1 = userRepository.findOneByLogin("test-register-duplicate-email"); - assertThat(testUser1.isPresent()).isTrue(); - - // Duplicate email, different login - ManagedUserVM secondUser = new ManagedUserVM(); - secondUser.setLogin("test-register-duplicate-email-2"); - secondUser.setPassword(firstUser.getPassword()); - secondUser.setFirstName(firstUser.getFirstName()); - secondUser.setLastName(firstUser.getLastName()); - secondUser.setEmail(firstUser.getEmail()); - secondUser.setImageUrl(firstUser.getImageUrl()); - secondUser.setLangKey(firstUser.getLangKey()); - secondUser.setAuthorities(new HashSet<>(firstUser.getAuthorities())); - - // Register second (non activated) user - restMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(secondUser))) - .andExpect(status().isCreated()); - - Optional testUser2 = userRepository.findOneByLogin("test-register-duplicate-email"); - assertThat(testUser2.isPresent()).isFalse(); - - Optional testUser3 = userRepository.findOneByLogin("test-register-duplicate-email-2"); - assertThat(testUser3.isPresent()).isTrue(); - - // Duplicate email - with uppercase email address - ManagedUserVM userWithUpperCaseEmail = new ManagedUserVM(); - userWithUpperCaseEmail.setId(firstUser.getId()); - userWithUpperCaseEmail.setLogin("test-register-duplicate-email-3"); - userWithUpperCaseEmail.setPassword(firstUser.getPassword()); - userWithUpperCaseEmail.setFirstName(firstUser.getFirstName()); - userWithUpperCaseEmail.setLastName(firstUser.getLastName()); - userWithUpperCaseEmail.setEmail("TEST-register-duplicate-email@example.com"); - userWithUpperCaseEmail.setImageUrl(firstUser.getImageUrl()); - userWithUpperCaseEmail.setLangKey(firstUser.getLangKey()); - userWithUpperCaseEmail.setAuthorities(new HashSet<>(firstUser.getAuthorities())); - - // Register third (not activated) user - restMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(userWithUpperCaseEmail))) - .andExpect(status().isCreated()); - - Optional testUser4 = userRepository.findOneByLogin("test-register-duplicate-email-3"); - assertThat(testUser4.isPresent()).isTrue(); - assertThat(testUser4.get().getEmail()).isEqualTo("test-register-duplicate-email@example.com"); - - testUser4.get().setActivated(true); - userService.updateUser((new UserDTO(testUser4.get()))); - - // Register 4th (already activated) user - restMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(secondUser))) - .andExpect(status().is4xxClientError()); - } - - @Test - @Transactional - public void testRegisterAdminIsIgnored() throws Exception { - ManagedUserVM validUser = new ManagedUserVM(); - validUser.setLogin("badguy"); - validUser.setPassword("password"); - validUser.setFirstName("Bad"); - validUser.setLastName("Guy"); - validUser.setEmail("badguy@example.com"); - validUser.setActivated(true); - validUser.setImageUrl("http://placehold.it/50x50"); - validUser.setLangKey(Constants.DEFAULT_LANGUAGE); - validUser.setAuthorities(Collections.singleton(AuthoritiesConstants.ADMIN)); - - restMvc.perform( - post("/api/register") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(validUser))) - .andExpect(status().isCreated()); - - Optional userDup = userRepository.findOneByLogin("badguy"); - assertThat(userDup.isPresent()).isTrue(); - assertThat(userDup.get().getAuthorities()).hasSize(1) - .containsExactly(authorityRepository.findById(AuthoritiesConstants.USER).get()); - } - - @Test - @Transactional - public void testActivateAccount() throws Exception { - final String activationKey = "some activation key"; - User user = new User(); - user.setLogin("activate-account"); - user.setEmail("activate-account@example.com"); - user.setPassword(RandomStringUtils.random(60)); - user.setActivated(false); - user.setActivationKey(activationKey); - - userRepository.saveAndFlush(user); - - restMvc.perform(get("/api/activate?key={activationKey}", activationKey)) - .andExpect(status().isOk()); - - user = userRepository.findOneByLogin(user.getLogin()).orElse(null); - assertThat(user.getActivated()).isTrue(); - } - - @Test - @Transactional - public void testActivateAccountWithWrongKey() throws Exception { - restMvc.perform(get("/api/activate?key=wrongActivationKey")) - .andExpect(status().isInternalServerError()); - } - - @Test - @Transactional - @WithMockUser("save-account") - public void testSaveAccount() throws Exception { - User user = new User(); - user.setLogin("save-account"); - user.setEmail("save-account@example.com"); - user.setPassword(RandomStringUtils.random(60)); - user.setActivated(true); - - userRepository.saveAndFlush(user); - - UserDTO userDTO = new UserDTO(); - userDTO.setLogin("not-used"); - userDTO.setFirstName("firstname"); - userDTO.setLastName("lastname"); - userDTO.setEmail("save-account@example.com"); - userDTO.setActivated(false); - userDTO.setImageUrl("http://placehold.it/50x50"); - userDTO.setLangKey(Constants.DEFAULT_LANGUAGE); - userDTO.setAuthorities(Collections.singleton(AuthoritiesConstants.ADMIN)); - - restMvc.perform( - post("/api/account") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(userDTO))) - .andExpect(status().isOk()); - - User updatedUser = userRepository.findOneByLogin(user.getLogin()).orElse(null); - assertThat(updatedUser.getFirstName()).isEqualTo(userDTO.getFirstName()); - assertThat(updatedUser.getLastName()).isEqualTo(userDTO.getLastName()); - assertThat(updatedUser.getEmail()).isEqualTo(userDTO.getEmail()); - assertThat(updatedUser.getLangKey()).isEqualTo(userDTO.getLangKey()); - assertThat(updatedUser.getPassword()).isEqualTo(user.getPassword()); - assertThat(updatedUser.getImageUrl()).isEqualTo(userDTO.getImageUrl()); - assertThat(updatedUser.getActivated()).isEqualTo(true); - assertThat(updatedUser.getAuthorities()).isEmpty(); - } - - @Test - @Transactional - @WithMockUser("save-invalid-email") - public void testSaveInvalidEmail() throws Exception { - User user = new User(); - user.setLogin("save-invalid-email"); - user.setEmail("save-invalid-email@example.com"); - user.setPassword(RandomStringUtils.random(60)); - user.setActivated(true); - - userRepository.saveAndFlush(user); - - UserDTO userDTO = new UserDTO(); - userDTO.setLogin("not-used"); - userDTO.setFirstName("firstname"); - userDTO.setLastName("lastname"); - userDTO.setEmail("invalid email"); - userDTO.setActivated(false); - userDTO.setImageUrl("http://placehold.it/50x50"); - userDTO.setLangKey(Constants.DEFAULT_LANGUAGE); - userDTO.setAuthorities(Collections.singleton(AuthoritiesConstants.ADMIN)); - - restMvc.perform( - post("/api/account") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(userDTO))) - .andExpect(status().isBadRequest()); - - assertThat(userRepository.findOneByEmailIgnoreCase("invalid email")).isNotPresent(); - } - - @Test - @Transactional - @WithMockUser("save-existing-email") - public void testSaveExistingEmail() throws Exception { - User user = new User(); - user.setLogin("save-existing-email"); - user.setEmail("save-existing-email@example.com"); - user.setPassword(RandomStringUtils.random(60)); - user.setActivated(true); - - userRepository.saveAndFlush(user); - - User anotherUser = new User(); - anotherUser.setLogin("save-existing-email2"); - anotherUser.setEmail("save-existing-email2@example.com"); - anotherUser.setPassword(RandomStringUtils.random(60)); - anotherUser.setActivated(true); - - userRepository.saveAndFlush(anotherUser); - - UserDTO userDTO = new UserDTO(); - userDTO.setLogin("not-used"); - userDTO.setFirstName("firstname"); - userDTO.setLastName("lastname"); - userDTO.setEmail("save-existing-email2@example.com"); - userDTO.setActivated(false); - userDTO.setImageUrl("http://placehold.it/50x50"); - userDTO.setLangKey(Constants.DEFAULT_LANGUAGE); - userDTO.setAuthorities(Collections.singleton(AuthoritiesConstants.ADMIN)); - - restMvc.perform( - post("/api/account") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(userDTO))) - .andExpect(status().isBadRequest()); - - User updatedUser = userRepository.findOneByLogin("save-existing-email").orElse(null); - assertThat(updatedUser.getEmail()).isEqualTo("save-existing-email@example.com"); - } - - @Test - @Transactional - @WithMockUser("save-existing-email-and-login") - public void testSaveExistingEmailAndLogin() throws Exception { - User user = new User(); - user.setLogin("save-existing-email-and-login"); - user.setEmail("save-existing-email-and-login@example.com"); - user.setPassword(RandomStringUtils.random(60)); - user.setActivated(true); - - userRepository.saveAndFlush(user); - - UserDTO userDTO = new UserDTO(); - userDTO.setLogin("not-used"); - userDTO.setFirstName("firstname"); - userDTO.setLastName("lastname"); - userDTO.setEmail("save-existing-email-and-login@example.com"); - userDTO.setActivated(false); - userDTO.setImageUrl("http://placehold.it/50x50"); - userDTO.setLangKey(Constants.DEFAULT_LANGUAGE); - userDTO.setAuthorities(Collections.singleton(AuthoritiesConstants.ADMIN)); - - restMvc.perform( - post("/api/account") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(userDTO))) - .andExpect(status().isOk()); - - User updatedUser = userRepository.findOneByLogin("save-existing-email-and-login").orElse(null); - assertThat(updatedUser.getEmail()).isEqualTo("save-existing-email-and-login@example.com"); - } - - @Test - @Transactional - @WithMockUser("change-password-wrong-existing-password") - public void testChangePasswordWrongExistingPassword() throws Exception { - User user = new User(); - String currentPassword = RandomStringUtils.random(60); - user.setPassword(passwordEncoder.encode(currentPassword)); - user.setLogin("change-password-wrong-existing-password"); - user.setEmail("change-password-wrong-existing-password@example.com"); - userRepository.saveAndFlush(user); - - restMvc.perform( - post("/api/account/change-password") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content( - TestUtil.convertObjectToJsonBytes( - new PasswordChangeDTO("1" + currentPassword, "new password")))) - .andExpect(status().isBadRequest()); - - User updatedUser = userRepository.findOneByLogin("change-password-wrong-existing-password").orElse(null); - assertThat(passwordEncoder.matches("new password", updatedUser.getPassword())).isFalse(); - assertThat(passwordEncoder.matches(currentPassword, updatedUser.getPassword())).isTrue(); - } - - @Test - @Transactional - @WithMockUser("change-password") - public void testChangePassword() throws Exception { - User user = new User(); - String currentPassword = RandomStringUtils.random(60); - user.setPassword(passwordEncoder.encode(currentPassword)); - user.setLogin("change-password"); - user.setEmail("change-password@example.com"); - userRepository.saveAndFlush(user); - - restMvc.perform( - post("/api/account/change-password") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(new PasswordChangeDTO(currentPassword, "new password")))) - .andExpect(status().isOk()); - - User updatedUser = userRepository.findOneByLogin("change-password").orElse(null); - assertThat(passwordEncoder.matches("new password", updatedUser.getPassword())).isTrue(); - } - - @Test - @Transactional - @WithMockUser("change-password-too-small") - public void testChangePasswordTooSmall() throws Exception { - User user = new User(); - String currentPassword = RandomStringUtils.random(60); - user.setPassword(passwordEncoder.encode(currentPassword)); - user.setLogin("change-password-too-small"); - user.setEmail("change-password-too-small@example.com"); - userRepository.saveAndFlush(user); - - String newPassword = RandomStringUtils.random(ManagedUserVM.PASSWORD_MIN_LENGTH - 1); - - restMvc.perform( - post("/api/account/change-password") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(new PasswordChangeDTO(currentPassword, newPassword)))) - .andExpect(status().isBadRequest()); - - User updatedUser = userRepository.findOneByLogin("change-password-too-small").orElse(null); - assertThat(updatedUser.getPassword()).isEqualTo(user.getPassword()); - } - - @Test - @Transactional - @WithMockUser("change-password-too-long") - public void testChangePasswordTooLong() throws Exception { - User user = new User(); - String currentPassword = RandomStringUtils.random(60); - user.setPassword(passwordEncoder.encode(currentPassword)); - user.setLogin("change-password-too-long"); - user.setEmail("change-password-too-long@example.com"); - userRepository.saveAndFlush(user); - - String newPassword = RandomStringUtils.random(ManagedUserVM.PASSWORD_MAX_LENGTH + 1); - - restMvc.perform( - post("/api/account/change-password") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(new PasswordChangeDTO(currentPassword, newPassword)))) - .andExpect(status().isBadRequest()); - - User updatedUser = userRepository.findOneByLogin("change-password-too-long").orElse(null); - assertThat(updatedUser.getPassword()).isEqualTo(user.getPassword()); - } - - @Test - @Transactional - @WithMockUser("change-password-empty") - public void testChangePasswordEmpty() throws Exception { - User user = new User(); - String currentPassword = RandomStringUtils.random(60); - user.setPassword(passwordEncoder.encode(currentPassword)); - user.setLogin("change-password-empty"); - user.setEmail("change-password-empty@example.com"); - userRepository.saveAndFlush(user); - - restMvc.perform( - post("/api/account/change-password") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(new PasswordChangeDTO(currentPassword, "")))) - .andExpect(status().isBadRequest()); - - User updatedUser = userRepository.findOneByLogin("change-password-empty").orElse(null); - assertThat(updatedUser.getPassword()).isEqualTo(user.getPassword()); - } - - @Test - @Transactional - public void testRequestPasswordReset() throws Exception { - User user = new User(); - user.setPassword(RandomStringUtils.random(60)); - user.setActivated(true); - user.setLogin("password-reset"); - user.setEmail("password-reset@example.com"); - userRepository.saveAndFlush(user); - - restMvc.perform( - post("/api/account/reset-password/init") - .content("password-reset@example.com")) - .andExpect(status().isOk()); - } - - @Test - @Transactional - public void testRequestPasswordResetUpperCaseEmail() throws Exception { - User user = new User(); - user.setPassword(RandomStringUtils.random(60)); - user.setActivated(true); - user.setLogin("password-reset"); - user.setEmail("password-reset@example.com"); - userRepository.saveAndFlush(user); - - restMvc.perform( - post("/api/account/reset-password/init") - .content("password-reset@EXAMPLE.COM")) - .andExpect(status().isOk()); - } - - @Test - public void testRequestPasswordResetWrongEmail() throws Exception { - restMvc.perform( - post("/api/account/reset-password/init") - .content("password-reset-wrong-email@example.com")) - .andExpect(status().isBadRequest()); - } - - @Test - @Transactional - public void testFinishPasswordReset() throws Exception { - User user = new User(); - user.setPassword(RandomStringUtils.random(60)); - user.setLogin("finish-password-reset"); - user.setEmail("finish-password-reset@example.com"); - user.setResetDate(Instant.now().plusSeconds(60)); - user.setResetKey("reset key"); - userRepository.saveAndFlush(user); - - KeyAndPasswordVM keyAndPassword = new KeyAndPasswordVM(); - keyAndPassword.setKey(user.getResetKey()); - keyAndPassword.setNewPassword("new password"); - - restMvc.perform( - post("/api/account/reset-password/finish") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(keyAndPassword))) - .andExpect(status().isOk()); - - User updatedUser = userRepository.findOneByLogin(user.getLogin()).orElse(null); - assertThat(passwordEncoder.matches(keyAndPassword.getNewPassword(), updatedUser.getPassword())).isTrue(); - } - - @Test - @Transactional - public void testFinishPasswordResetTooSmall() throws Exception { - User user = new User(); - user.setPassword(RandomStringUtils.random(60)); - user.setLogin("finish-password-reset-too-small"); - user.setEmail("finish-password-reset-too-small@example.com"); - user.setResetDate(Instant.now().plusSeconds(60)); - user.setResetKey("reset key too small"); - userRepository.saveAndFlush(user); - - KeyAndPasswordVM keyAndPassword = new KeyAndPasswordVM(); - keyAndPassword.setKey(user.getResetKey()); - keyAndPassword.setNewPassword("foo"); - - restMvc.perform( - post("/api/account/reset-password/finish") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(keyAndPassword))) - .andExpect(status().isBadRequest()); - - User updatedUser = userRepository.findOneByLogin(user.getLogin()).orElse(null); - assertThat(passwordEncoder.matches(keyAndPassword.getNewPassword(), updatedUser.getPassword())).isFalse(); - } - - @Test - @Transactional - public void testFinishPasswordResetWrongKey() throws Exception { - KeyAndPasswordVM keyAndPassword = new KeyAndPasswordVM(); - keyAndPassword.setKey("wrong reset key"); - keyAndPassword.setNewPassword("new password"); - - restMvc.perform( - post("/api/account/reset-password/finish") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(keyAndPassword))) - .andExpect(status().isInternalServerError()); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/AssetResourceIntTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/AssetResourceIntTest.java deleted file mode 100644 index 30849f41..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/AssetResourceIntTest.java +++ /dev/null @@ -1,777 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.hamcrest.Matchers.hasItem; -import static org.hostsharing.hsadminng.web.rest.TestUtil.createFormattingConversionService; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.Asset; -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.domain.enumeration.AssetAction; -import org.hostsharing.hsadminng.repository.AssetRepository; -import org.hostsharing.hsadminng.service.AssetQueryService; -import org.hostsharing.hsadminng.service.AssetService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextMock; -import org.hostsharing.hsadminng.service.dto.AssetDTO; -import org.hostsharing.hsadminng.service.mapper.AssetMapper; -import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.MockitoAnnotations; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.data.web.PageableHandlerMethodArgumentResolver; -import org.springframework.http.MediaType; -import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.validation.Validator; - -import java.math.BigDecimal; -import java.math.RoundingMode; -import java.time.LocalDate; -import java.time.ZoneId; -import java.util.List; - -import javax.persistence.EntityManager; - -/** - * Test class for the AssetResource REST controller. - * - * @see AssetResource - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class AssetResourceIntTest { - - private static final LocalDate DEFAULT_DOCUMENT_DATE = LocalDate.ofEpochDay(0L); - private static final LocalDate UPDATED_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault()); - - private static final LocalDate DEFAULT_VALUE_DATE = LocalDate.ofEpochDay(0L); - private static final LocalDate UPDATED_VALUE_DATE = LocalDate.now(ZoneId.systemDefault()); - - private static final AssetAction DEFAULT_ACTION = AssetAction.PAYMENT; - private static final AssetAction UPDATED_ACTION = AssetAction.HANDOVER; - - private static final BigDecimal DEFAULT_AMOUNT = new BigDecimal("1"); - private static final BigDecimal UPDATED_AMOUNT = new BigDecimal("2"); - - private static final String DEFAULT_REMARK = "AAAAAAAAAA"; - private static final String UPDATED_REMARK = "BBBBBBBBBB"; - - @Autowired - private AssetRepository assetRepository; - - @Autowired - private AssetMapper assetMapper; - - @Autowired - private AssetService assetService; - - @Autowired - private AssetQueryService assetQueryService; - - @Autowired - private MappingJackson2HttpMessageConverter jacksonMessageConverter; - - @Autowired - private PageableHandlerMethodArgumentResolver pageableArgumentResolver; - - @Autowired - private ExceptionTranslator exceptionTranslator; - - @Autowired - private EntityManager em; - - @Autowired - private Validator validator; - - @MockBean - private UserRoleAssignmentService userRoleAssignmentService; - - private MockMvc restAssetMockMvc; - - private Asset asset; - - @Before - public void setup() { - SecurityContextMock.usingMock(userRoleAssignmentService) - .havingAuthenticatedUser() - .withAuthority(Role.Admin.ROLE.authority()); - - MockitoAnnotations.initMocks(this); - final AssetResource assetResource = new AssetResource(assetService, assetQueryService); - this.restAssetMockMvc = MockMvcBuilders.standaloneSetup(assetResource) - .setCustomArgumentResolvers(pageableArgumentResolver) - .setControllerAdvice(exceptionTranslator) - .setConversionService(createFormattingConversionService()) - .setMessageConverters(jacksonMessageConverter) - .setValidator(validator) - .build(); - } - - /** - * Create an entity for this test. - * - * This is a static method, as tests for other entities might also need it, - * if they test an entity which requires the current entity. - */ - public static Asset createEntity(EntityManager em) { - Asset asset = new Asset() - .documentDate(DEFAULT_DOCUMENT_DATE) - .valueDate(DEFAULT_VALUE_DATE) - .action(DEFAULT_ACTION) - .amount(DEFAULT_AMOUNT) - .remark(DEFAULT_REMARK); - // Add required entity - Membership membership = MembershipResourceIntTest.createEntity(em); - em.persist(membership); - em.flush(); - asset.setMembership(membership); - return asset; - } - - /** - * Create a persistent entity related to the given persistent membership for testing purposes. - * - * This is a static method, as tests for other entities might also need it, - * if they test an entity which requires the current entity. - */ - public static Asset createPersistentEntity(EntityManager em, final Membership membership) { - Asset asset = new Asset() - .documentDate(DEFAULT_DOCUMENT_DATE) - .valueDate(DEFAULT_VALUE_DATE) - .action(DEFAULT_ACTION) - .amount(DEFAULT_AMOUNT) - .remark(DEFAULT_REMARK); - // Add required entity - asset.setMembership(membership); - membership.addAsset(asset); - em.persist(asset); - em.flush(); - return asset; - } - - @Before - public void initTest() { - asset = createEntity(em); - } - - @Test - @Transactional - public void createAsset() throws Exception { - int databaseSizeBeforeCreate = assetRepository.findAll().size(); - - // Create the Asset - AssetDTO assetDTO = assetMapper.toDto(asset); - assetDTO.setMembershipDisplayLabel(null); - restAssetMockMvc.perform( - post("/api/assets") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(assetDTO))) - .andExpect(status().isCreated()); - - // Validate the Asset in the database - List assetList = assetRepository.findAll(); - assertThat(assetList).hasSize(databaseSizeBeforeCreate + 1); - Asset testAsset = assetList.get(assetList.size() - 1); - assertThat(testAsset.getDocumentDate()).isEqualTo(DEFAULT_DOCUMENT_DATE); - assertThat(testAsset.getValueDate()).isEqualTo(DEFAULT_VALUE_DATE); - assertThat(testAsset.getAction()).isEqualTo(DEFAULT_ACTION); - assertThat(testAsset.getAmount()).isEqualTo(DEFAULT_AMOUNT.setScale(2, RoundingMode.HALF_DOWN)); - assertThat(testAsset.getRemark()).isEqualTo(DEFAULT_REMARK); - } - - @Test - @Transactional - public void createAssetWithIdForNonExistingEntity() throws Exception { - int databaseSizeBeforeCreate = assetRepository.findAll().size(); - - // Create the Asset with an ID - asset.setId(1L); - AssetDTO assetDTO = assetMapper.toDto(asset); - - // An entity with an existing ID cannot be created, so this API call must fail - restAssetMockMvc.perform( - post("/api/assets") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(assetDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Asset in the database - List assetList = assetRepository.findAll(); - assertThat(assetList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void createAssetWithExistingExistingEntity() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - int databaseSizeBeforeCreate = assetRepository.findAll().size(); - - // Create the Asset with the ID of an existing ID - AssetDTO assetDTO = assetMapper.toDto(asset); - - // An entity with an existing ID cannot be created, so this API call must fail - restAssetMockMvc.perform( - post("/api/assets") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(assetDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Asset in the database - List assetList = assetRepository.findAll(); - assertThat(assetList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void checkDocumentDateIsRequired() throws Exception { - int databaseSizeBeforeTest = assetRepository.findAll().size(); - // set the field null - asset.setDocumentDate(null); - - // Create the Asset, which fails. - AssetDTO assetDTO = assetMapper.toDto(asset); - - restAssetMockMvc.perform( - post("/api/assets") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(assetDTO))) - .andExpect(status().isBadRequest()); - - List assetList = assetRepository.findAll(); - assertThat(assetList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkValueDateIsRequired() throws Exception { - int databaseSizeBeforeTest = assetRepository.findAll().size(); - // set the field null - asset.setValueDate(null); - - // Create the Asset, which fails. - AssetDTO assetDTO = assetMapper.toDto(asset); - - restAssetMockMvc.perform( - post("/api/assets") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(assetDTO))) - .andExpect(status().isBadRequest()); - - List assetList = assetRepository.findAll(); - assertThat(assetList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkActionIsRequired() throws Exception { - int databaseSizeBeforeTest = assetRepository.findAll().size(); - // set the field null - asset.setAction(null); - - // Create the Asset, which fails. - AssetDTO assetDTO = assetMapper.toDto(asset); - - restAssetMockMvc.perform( - post("/api/assets") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(assetDTO))) - .andExpect(status().isBadRequest()); - - List assetList = assetRepository.findAll(); - assertThat(assetList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkAmountIsRequired() throws Exception { - int databaseSizeBeforeTest = assetRepository.findAll().size(); - // set the field null - asset.setAmount(null); - - // Create the Asset, which fails. - AssetDTO assetDTO = assetMapper.toDto(asset); - - restAssetMockMvc.perform( - post("/api/assets") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(assetDTO))) - .andExpect(status().isBadRequest()); - - List assetList = assetRepository.findAll(); - assertThat(assetList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void getAllAssets() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList - restAssetMockMvc.perform(get("/api/assets?sort=id,desc")) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].id").value(hasItem(asset.getId().intValue()))) - .andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString()))) - .andExpect(jsonPath("$.[*].valueDate").value(hasItem(DEFAULT_VALUE_DATE.toString()))) - .andExpect(jsonPath("$.[*].action").value(hasItem(DEFAULT_ACTION.toString()))) - .andExpect(jsonPath("$.[*].amount").value(hasItem(DEFAULT_AMOUNT.intValue()))) - .andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK))); - } - - @Test - @Transactional - public void getAsset() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get the asset - restAssetMockMvc.perform(get("/api/assets/{id}", asset.getId())) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.id").value(asset.getId().intValue())) - .andExpect(jsonPath("$.documentDate").value(DEFAULT_DOCUMENT_DATE.toString())) - .andExpect(jsonPath("$.valueDate").value(DEFAULT_VALUE_DATE.toString())) - .andExpect(jsonPath("$.action").value(DEFAULT_ACTION.toString())) - .andExpect(jsonPath("$.amount").value(DEFAULT_AMOUNT.intValue())) - .andExpect(jsonPath("$.remark").value(DEFAULT_REMARK)); - } - - @Test - @Transactional - public void getAllAssetsByDocumentDateIsEqualToSomething() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where documentDate equals to DEFAULT_DOCUMENT_DATE - defaultAssetShouldBeFound("documentDate.equals=" + DEFAULT_DOCUMENT_DATE); - - // Get all the assetList where documentDate equals to UPDATED_DOCUMENT_DATE - defaultAssetShouldNotBeFound("documentDate.equals=" + UPDATED_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllAssetsByDocumentDateIsInShouldWork() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where documentDate in DEFAULT_DOCUMENT_DATE or UPDATED_DOCUMENT_DATE - defaultAssetShouldBeFound("documentDate.in=" + DEFAULT_DOCUMENT_DATE + "," + UPDATED_DOCUMENT_DATE); - - // Get all the assetList where documentDate equals to UPDATED_DOCUMENT_DATE - defaultAssetShouldNotBeFound("documentDate.in=" + UPDATED_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllAssetsByDocumentDateIsNullOrNotNull() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where documentDate is not null - defaultAssetShouldBeFound("documentDate.specified=true"); - - // Get all the assetList where documentDate is null - defaultAssetShouldNotBeFound("documentDate.specified=false"); - } - - @Test - @Transactional - public void getAllAssetsByDocumentDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where documentDate greater than or equals to DEFAULT_DOCUMENT_DATE - defaultAssetShouldBeFound("documentDate.greaterOrEqualThan=" + DEFAULT_DOCUMENT_DATE); - - // Get all the assetList where documentDate greater than or equals to UPDATED_DOCUMENT_DATE - defaultAssetShouldNotBeFound("documentDate.greaterOrEqualThan=" + UPDATED_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllAssetsByDocumentDateIsLessThanSomething() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where documentDate less than or equals to DEFAULT_DOCUMENT_DATE - defaultAssetShouldNotBeFound("documentDate.lessThan=" + DEFAULT_DOCUMENT_DATE); - - // Get all the assetList where documentDate less than or equals to UPDATED_DOCUMENT_DATE - defaultAssetShouldBeFound("documentDate.lessThan=" + UPDATED_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllAssetsByValueDateIsEqualToSomething() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where valueDate equals to DEFAULT_VALUE_DATE - defaultAssetShouldBeFound("valueDate.equals=" + DEFAULT_VALUE_DATE); - - // Get all the assetList where valueDate equals to UPDATED_VALUE_DATE - defaultAssetShouldNotBeFound("valueDate.equals=" + UPDATED_VALUE_DATE); - } - - @Test - @Transactional - public void getAllAssetsByValueDateIsInShouldWork() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where valueDate in DEFAULT_VALUE_DATE or UPDATED_VALUE_DATE - defaultAssetShouldBeFound("valueDate.in=" + DEFAULT_VALUE_DATE + "," + UPDATED_VALUE_DATE); - - // Get all the assetList where valueDate equals to UPDATED_VALUE_DATE - defaultAssetShouldNotBeFound("valueDate.in=" + UPDATED_VALUE_DATE); - } - - @Test - @Transactional - public void getAllAssetsByValueDateIsNullOrNotNull() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where valueDate is not null - defaultAssetShouldBeFound("valueDate.specified=true"); - - // Get all the assetList where valueDate is null - defaultAssetShouldNotBeFound("valueDate.specified=false"); - } - - @Test - @Transactional - public void getAllAssetsByValueDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where valueDate greater than or equals to DEFAULT_VALUE_DATE - defaultAssetShouldBeFound("valueDate.greaterOrEqualThan=" + DEFAULT_VALUE_DATE); - - // Get all the assetList where valueDate greater than or equals to UPDATED_VALUE_DATE - defaultAssetShouldNotBeFound("valueDate.greaterOrEqualThan=" + UPDATED_VALUE_DATE); - } - - @Test - @Transactional - public void getAllAssetsByValueDateIsLessThanSomething() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where valueDate less than or equals to DEFAULT_VALUE_DATE - defaultAssetShouldNotBeFound("valueDate.lessThan=" + DEFAULT_VALUE_DATE); - - // Get all the assetList where valueDate less than or equals to UPDATED_VALUE_DATE - defaultAssetShouldBeFound("valueDate.lessThan=" + UPDATED_VALUE_DATE); - } - - @Test - @Transactional - public void getAllAssetsByActionIsEqualToSomething() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where action equals to DEFAULT_ACTION - defaultAssetShouldBeFound("action.equals=" + DEFAULT_ACTION); - - // Get all the assetList where action equals to UPDATED_ACTION - defaultAssetShouldNotBeFound("action.equals=" + UPDATED_ACTION); - } - - @Test - @Transactional - public void getAllAssetsByActionIsInShouldWork() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where action in DEFAULT_ACTION or UPDATED_ACTION - defaultAssetShouldBeFound("action.in=" + DEFAULT_ACTION + "," + UPDATED_ACTION); - - // Get all the assetList where action equals to UPDATED_ACTION - defaultAssetShouldNotBeFound("action.in=" + UPDATED_ACTION); - } - - @Test - @Transactional - public void getAllAssetsByActionIsNullOrNotNull() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where action is not null - defaultAssetShouldBeFound("action.specified=true"); - - // Get all the assetList where action is null - defaultAssetShouldNotBeFound("action.specified=false"); - } - - @Test - @Transactional - public void getAllAssetsByAmountIsEqualToSomething() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where amount equals to DEFAULT_AMOUNT - defaultAssetShouldBeFound("amount.equals=" + DEFAULT_AMOUNT); - - // Get all the assetList where amount equals to UPDATED_AMOUNT - defaultAssetShouldNotBeFound("amount.equals=" + UPDATED_AMOUNT); - } - - @Test - @Transactional - public void getAllAssetsByAmountIsInShouldWork() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where amount in DEFAULT_AMOUNT or UPDATED_AMOUNT - defaultAssetShouldBeFound("amount.in=" + DEFAULT_AMOUNT + "," + UPDATED_AMOUNT); - - // Get all the assetList where amount equals to UPDATED_AMOUNT - defaultAssetShouldNotBeFound("amount.in=" + UPDATED_AMOUNT); - } - - @Test - @Transactional - public void getAllAssetsByAmountIsNullOrNotNull() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where amount is not null - defaultAssetShouldBeFound("amount.specified=true"); - - // Get all the assetList where amount is null - defaultAssetShouldNotBeFound("amount.specified=false"); - } - - @Test - @Transactional - public void getAllAssetsByRemarkIsEqualToSomething() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where remark equals to DEFAULT_REMARK - defaultAssetShouldBeFound("remark.equals=" + DEFAULT_REMARK); - - // Get all the assetList where remark equals to UPDATED_REMARK - defaultAssetShouldNotBeFound("remark.equals=" + UPDATED_REMARK); - } - - @Test - @Transactional - public void getAllAssetsByRemarkIsInShouldWork() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where remark in DEFAULT_REMARK or UPDATED_REMARK - defaultAssetShouldBeFound("remark.in=" + DEFAULT_REMARK + "," + UPDATED_REMARK); - - // Get all the assetList where remark equals to UPDATED_REMARK - defaultAssetShouldNotBeFound("remark.in=" + UPDATED_REMARK); - } - - @Test - @Transactional - public void getAllAssetsByRemarkIsNullOrNotNull() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - // Get all the assetList where remark is not null - defaultAssetShouldBeFound("remark.specified=true"); - - // Get all the assetList where remark is null - defaultAssetShouldNotBeFound("remark.specified=false"); - } - - @Test - @Transactional - public void getAllAssetsByMembershipIsEqualToSomething() throws Exception { - // Initialize the database - Membership membership = MembershipResourceIntTest - .createPersistentEntity(em, CustomerResourceIntTest.createPersistentEntity(em)); - asset.setMembership(membership); - assetRepository.saveAndFlush(asset); - Long membershipId = membership.getId(); - - // Get all the assetList where membership equals to membershipId - defaultAssetShouldBeFound("membershipId.equals=" + membershipId); - - // Get all the assetList where membership equals to membershipId + 1 - defaultAssetShouldNotBeFound("membershipId.equals=" + (membershipId + 1)); - } - - /** - * Executes the search, and checks that the default entity is returned - */ - private void defaultAssetShouldBeFound(String filter) throws Exception { - restAssetMockMvc.perform(get("/api/assets?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].id").value(hasItem(asset.getId().intValue()))) - .andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString()))) - .andExpect(jsonPath("$.[*].valueDate").value(hasItem(DEFAULT_VALUE_DATE.toString()))) - .andExpect(jsonPath("$.[*].action").value(hasItem(DEFAULT_ACTION.toString()))) - .andExpect(jsonPath("$.[*].amount").value(hasItem(DEFAULT_AMOUNT.intValue()))) - .andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK))); - - // Check, that the count call also returns 1 - restAssetMockMvc.perform(get("/api/assets/count?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(content().string("1")); - } - - /** - * Executes the search, and checks that the default entity is not returned - */ - private void defaultAssetShouldNotBeFound(String filter) throws Exception { - restAssetMockMvc.perform(get("/api/assets?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$").isArray()) - .andExpect(jsonPath("$").isEmpty()); - - // Check, that the count call also returns 0 - restAssetMockMvc.perform(get("/api/assets/count?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(content().string("0")); - } - - @Test - @Transactional - public void getNonExistingAsset() throws Exception { - // Get the asset - restAssetMockMvc.perform(get("/api/assets/{id}", Long.MAX_VALUE)) - .andExpect(status().isNotFound()); - } - - @Test - @Transactional - public void updateAsset() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - int databaseSizeBeforeUpdate = assetRepository.findAll().size(); - - // Update the asset - Asset updatedAsset = assetRepository.findById(asset.getId()).get(); - // Disconnect from session so that the updates on updatedAsset are not directly saved in db - em.detach(updatedAsset); - updatedAsset - .documentDate(UPDATED_DOCUMENT_DATE) - .valueDate(UPDATED_VALUE_DATE) - .action(UPDATED_ACTION) - .amount(UPDATED_AMOUNT) - .remark(UPDATED_REMARK); - AssetDTO assetDTO = assetMapper.toDto(updatedAsset); - - restAssetMockMvc.perform( - put("/api/assets") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(assetDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Asset in the database - List assetList = assetRepository.findAll(); - assertThat(assetList).hasSize(databaseSizeBeforeUpdate); - Asset testAsset = assetList.get(assetList.size() - 1); - assertThat(testAsset.getDocumentDate()).isEqualTo(DEFAULT_DOCUMENT_DATE); - assertThat(testAsset.getValueDate()).isEqualTo(DEFAULT_VALUE_DATE); - assertThat(testAsset.getAction()).isEqualByComparingTo(DEFAULT_ACTION); - assertThat(testAsset.getAmount()).isEqualByComparingTo(DEFAULT_AMOUNT); - assertThat(testAsset.getRemark()).isEqualTo(DEFAULT_REMARK); - } - - @Test - @Transactional - public void updateNonExistingAsset() throws Exception { - int databaseSizeBeforeUpdate = assetRepository.findAll().size(); - - // Create the Asset - AssetDTO assetDTO = assetMapper.toDto(asset); - - // If the entity doesn't have an ID, it will throw BadRequestAlertException - restAssetMockMvc.perform( - put("/api/assets") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(assetDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Asset in the database - List assetList = assetRepository.findAll(); - assertThat(assetList).hasSize(databaseSizeBeforeUpdate); - } - - @Test - @Transactional - public void deleteAsset() throws Exception { - // Initialize the database - assetRepository.saveAndFlush(asset); - - int databaseSizeBeforeDelete = assetRepository.findAll().size(); - - // Delete the asset - restAssetMockMvc.perform( - delete("/api/assets/{id}", asset.getId()) - .accept(TestUtil.APPLICATION_JSON_UTF8)) - .andExpect(status().isBadRequest()); - - // Validate the database still contains the same number of assets - List assetList = assetRepository.findAll(); - assertThat(assetList).hasSize(databaseSizeBeforeDelete); - } - - @Test - @Transactional - public void equalsVerifier() throws Exception { - TestUtil.equalsVerifier(Asset.class); - Asset asset1 = new Asset(); - asset1.setId(1L); - Asset asset2 = new Asset(); - asset2.setId(asset1.getId()); - assertThat(asset1).isEqualTo(asset2); - asset2.setId(2L); - assertThat(asset1).isNotEqualTo(asset2); - asset1.setId(null); - assertThat(asset1).isNotEqualTo(asset2); - } - - @Test - @Transactional - public void dtoEqualsVerifier() throws Exception { - TestUtil.equalsVerifier(AssetDTO.class); - AssetDTO assetDTO1 = new AssetDTO(); - assetDTO1.setId(1L); - AssetDTO assetDTO2 = new AssetDTO(); - assertThat(assetDTO1).isNotEqualTo(assetDTO2); - assetDTO2.setId(assetDTO1.getId()); - assertThat(assetDTO1).isEqualTo(assetDTO2); - assetDTO2.setId(2L); - assertThat(assetDTO1).isNotEqualTo(assetDTO2); - assetDTO1.setId(null); - assertThat(assetDTO1).isNotEqualTo(assetDTO2); - } - - @Test - @Transactional - public void testEntityFromId() { - assertThat(assetMapper.fromId(42L).getId()).isEqualTo(42); - assertThat(assetMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/AuditResourceIntTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/AuditResourceIntTest.java deleted file mode 100644 index b2ca196d..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/AuditResourceIntTest.java +++ /dev/null @@ -1,164 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.hamcrest.Matchers.hasItem; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.config.audit.AuditEventConverter; -import org.hostsharing.hsadminng.domain.PersistentAuditEvent; -import org.hostsharing.hsadminng.repository.PersistenceAuditEventRepository; -import org.hostsharing.hsadminng.service.AuditEventService; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.MockitoAnnotations; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.data.web.PageableHandlerMethodArgumentResolver; -import org.springframework.format.support.FormattingConversionService; -import org.springframework.http.MediaType; -import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.transaction.annotation.Transactional; - -import java.time.Instant; - -/** - * Test class for the AuditResource REST controller. - * - * @see AuditResource - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -@Transactional -public class AuditResourceIntTest { - - private static final String SAMPLE_PRINCIPAL = "SAMPLE_PRINCIPAL"; - private static final String SAMPLE_TYPE = "SAMPLE_TYPE"; - private static final Instant SAMPLE_TIMESTAMP = Instant.parse("2015-08-04T10:11:30Z"); - private static final long SECONDS_PER_DAY = 60 * 60 * 24; - - @Autowired - private PersistenceAuditEventRepository auditEventRepository; - - @Autowired - private AuditEventConverter auditEventConverter; - - @Autowired - private MappingJackson2HttpMessageConverter jacksonMessageConverter; - - @Autowired - private FormattingConversionService formattingConversionService; - - @Autowired - private PageableHandlerMethodArgumentResolver pageableArgumentResolver; - - private PersistentAuditEvent auditEvent; - - private MockMvc restAuditMockMvc; - - @Before - public void setup() { - MockitoAnnotations.initMocks(this); - AuditEventService auditEventService = new AuditEventService(auditEventRepository, auditEventConverter); - AuditResource auditResource = new AuditResource(auditEventService); - this.restAuditMockMvc = MockMvcBuilders.standaloneSetup(auditResource) - .setCustomArgumentResolvers(pageableArgumentResolver) - .setConversionService(formattingConversionService) - .setMessageConverters(jacksonMessageConverter) - .build(); - } - - @Before - public void initTest() { - auditEventRepository.deleteAll(); - auditEvent = new PersistentAuditEvent(); - auditEvent.setAuditEventType(SAMPLE_TYPE); - auditEvent.setPrincipal(SAMPLE_PRINCIPAL); - auditEvent.setAuditEventDate(SAMPLE_TIMESTAMP); - } - - @Test - public void getAllAudits() throws Exception { - // Initialize the database - auditEventRepository.save(auditEvent); - - // Get all the audits - restAuditMockMvc.perform(get("/management/audits")) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL))); - } - - @Test - public void getAudit() throws Exception { - // Initialize the database - auditEventRepository.save(auditEvent); - - // Get the audit - restAuditMockMvc.perform(get("/management/audits/{id}", auditEvent.getId())) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.principal").value(SAMPLE_PRINCIPAL)); - } - - @Test - public void getAuditsByDate() throws Exception { - // Initialize the database - auditEventRepository.save(auditEvent); - - // Generate dates for selecting audits by date, making sure the period will contain the audit - String fromDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10); - String toDate = SAMPLE_TIMESTAMP.plusSeconds(SECONDS_PER_DAY).toString().substring(0, 10); - - // Get the audit - restAuditMockMvc.perform(get("/management/audits?fromDate=" + fromDate + "&toDate=" + toDate)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL))); - } - - @Test - public void getNonExistingAuditsByDate() throws Exception { - // Initialize the database - auditEventRepository.save(auditEvent); - - // Generate dates for selecting audits by date, making sure the period will not contain the sample audit - String fromDate = SAMPLE_TIMESTAMP.minusSeconds(2 * SECONDS_PER_DAY).toString().substring(0, 10); - String toDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10); - - // Query audits but expect no results - restAuditMockMvc.perform(get("/management/audits?fromDate=" + fromDate + "&toDate=" + toDate)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(header().string("X-Total-Count", "0")); - } - - @Test - public void getNonExistingAudit() throws Exception { - // Get the audit - restAuditMockMvc.perform(get("/management/audits/{id}", Long.MAX_VALUE)) - .andExpect(status().isNotFound()); - } - - @Test - @Transactional - public void testPersistentAuditEventEquals() throws Exception { - TestUtil.equalsVerifier(PersistentAuditEvent.class); - PersistentAuditEvent auditEvent1 = new PersistentAuditEvent(); - auditEvent1.setId(1L); - PersistentAuditEvent auditEvent2 = new PersistentAuditEvent(); - auditEvent2.setId(auditEvent1.getId()); - assertThat(auditEvent1).isEqualTo(auditEvent2); - auditEvent2.setId(2L); - assertThat(auditEvent1).isNotEqualTo(auditEvent2); - auditEvent1.setId(null); - assertThat(auditEvent1).isNotEqualTo(auditEvent2); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/CustomerResourceIntTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/CustomerResourceIntTest.java deleted file mode 100644 index 0b3f1356..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/CustomerResourceIntTest.java +++ /dev/null @@ -1,1339 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.hamcrest.Matchers.hasItem; -import static org.hostsharing.hsadminng.web.rest.TestUtil.createFormattingConversionService; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.domain.SepaMandate; -import org.hostsharing.hsadminng.domain.enumeration.CustomerKind; -import org.hostsharing.hsadminng.domain.enumeration.VatRegion; -import org.hostsharing.hsadminng.repository.CustomerRepository; -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.CustomerQueryService; -import org.hostsharing.hsadminng.service.CustomerService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextMock; -import org.hostsharing.hsadminng.service.dto.CustomerDTO; -import org.hostsharing.hsadminng.service.mapper.CustomerMapper; -import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.MockitoAnnotations; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.context.annotation.Bean; -import org.springframework.data.web.PageableHandlerMethodArgumentResolver; -import org.springframework.http.MediaType; -import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; -import org.springframework.security.data.repository.query.SecurityEvaluationContextExtension; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.validation.Validator; - -import java.time.LocalDate; -import java.time.ZoneId; -import java.util.List; - -import javax.persistence.EntityManager; - -/** - * Test class for the CustomerResource REST controller. - * - * @see CustomerResource - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class CustomerResourceIntTest { - - private static final Integer DEFAULT_REFERENCE = 10000; - private static final Integer UPDATED_REFERENCE = 10001; - private static final Integer OTHER_REFERENCE_BASE = 11000; - - private static final String DEFAULT_PREFIX = "def"; - private static final String UPDATED_PREFIX = "new"; - private static final String OTHER_PREFIX_BASE = "o"; - - private static final String DEFAULT_NAME = "Default GmbH"; - private static final String UPDATED_NAME = "Updated Default GmbH"; - private static final String OTHER_NAME_BASE = "Other Corp."; - - private static final String DEFAULT_CONTRACTUAL_ADDRESS = "Default Address"; - private static final String UPDATED_CONTRACTUAL_ADDRESS = "Updated Address"; - private static final String OTHER_CONTRACTUAL_ADDRESS_BASE = "Other Street "; - - private static final String DEFAULT_CONTRACTUAL_SALUTATION = "Default Contractual Salutation"; - private static final String UPDATED_CONTRACTUAL_SALUTATION = "Update Contractual Salutation"; - - private static final String DEFAULT_BILLING_ADDRESS = "Default Billing Address"; - private static final String UPDATED_BILLING_ADDRESS = "Updated Billing Address"; - - private static final String DEFAULT_BILLING_SALUTATION = "Default Billing Salutation"; - private static final String UPDATED_BILLING_SALUTATION = "Updted Billing Salutation"; - - private static final String DEFAULT_REMARK = "Default Remark"; - private static final String UPDATED_REMARK = "Updated Remark"; - - private static final CustomerKind DEFAULT_KIND = CustomerKind.NATURAL; - private static final CustomerKind UPDATED_KIND = CustomerKind.LEGAL; - private static final CustomerKind OTHER_KIND = CustomerKind.LEGAL; - - private static final LocalDate DEFAULT_BIRTH_DATE = LocalDate.ofEpochDay(0L); - private static final LocalDate UPDATED_BIRTH_DATE = LocalDate.now(ZoneId.systemDefault()); - - private static final String DEFAULT_BIRTH_PLACE = "AAAAAAAAAA"; - private static final String UPDATED_BIRTH_PLACE = "BBBBBBBBBB"; - - private static final String DEFAULT_REGISTRATION_COURT = "AAAAAAAAAA"; - private static final String UPDATED_REGISTRATION_COURT = "BBBBBBBBBB"; - - private static final String DEFAULT_REGISTRATION_NUMBER = "AAAAAAAAAA"; - private static final String UPDATED_REGISTRATION_NUMBER = "BBBBBBBBBB"; - - private static final VatRegion DEFAULT_VAT_REGION = VatRegion.DOMESTIC; - private static final VatRegion UPDATED_VAT_REGION = VatRegion.EU; - private static final VatRegion OTHER_VAT_REGION = VatRegion.EU; - - private static final String DEFAULT_VAT_NUMBER = "AAAAAAAAAA"; - private static final String UPDATED_VAT_NUMBER = "BBBBBBBBBB"; - - private static int otherCounter = 0; - - @Bean - public SecurityEvaluationContextExtension securityEvaluationContextExtension() { - return new SecurityEvaluationContextExtension(); - } - - @Autowired - private CustomerRepository customerRepository; - - @Autowired - private CustomerMapper customerMapper; - - @Autowired - private CustomerService customerService; - - @Autowired - private CustomerQueryService customerQueryService; - - @Autowired - private MappingJackson2HttpMessageConverter jacksonMessageConverter; - - @Autowired - private PageableHandlerMethodArgumentResolver pageableArgumentResolver; - - @Autowired - private ExceptionTranslator exceptionTranslator; - - @Autowired - private EntityManager em; - - @Autowired - private Validator validator; - - @MockBean - private UserRoleAssignmentService userRoleAssignmentService; - - private MockMvc restCustomerMockMvc; - - private Customer customer; - - @Before - public void setup() { - MockitoAnnotations.initMocks(this); - SecurityContextMock.usingMock(userRoleAssignmentService) - .havingAuthenticatedUser() - .withAuthority(AuthoritiesConstants.ADMIN); - - final CustomerResource customerResource = new CustomerResource(customerService, customerQueryService); - this.restCustomerMockMvc = MockMvcBuilders.standaloneSetup(customerResource) - .setCustomArgumentResolvers(pageableArgumentResolver) - .setControllerAdvice(exceptionTranslator) - .setConversionService(createFormattingConversionService()) - .setMessageConverters(jacksonMessageConverter) - .setValidator(validator) - .build(); - } - - /** - * Create an entity for this test. - *

- * This is a static method, as tests for other entities might also need it, - * if they test an entity which requires the current entity. - */ - public static Customer createEntity(EntityManager em) { - Customer customer = new Customer() - .reference(DEFAULT_REFERENCE) - .prefix(DEFAULT_PREFIX) - .name(DEFAULT_NAME) - .kind(DEFAULT_KIND) - .birthDate(DEFAULT_BIRTH_DATE) - .birthPlace(DEFAULT_BIRTH_PLACE) - .registrationCourt(DEFAULT_REGISTRATION_COURT) - .registrationNumber(DEFAULT_REGISTRATION_NUMBER) - .vatRegion(DEFAULT_VAT_REGION) - .vatNumber(DEFAULT_VAT_NUMBER) - .contractualSalutation(DEFAULT_CONTRACTUAL_SALUTATION) - .contractualAddress(DEFAULT_CONTRACTUAL_ADDRESS) - .billingSalutation(DEFAULT_BILLING_SALUTATION) - .billingAddress(DEFAULT_BILLING_ADDRESS) - .remark(DEFAULT_REMARK); - return customer; - } - - /** - * Create another entity for tests. - *

- * This is a static method, as tests for other entities might also need it, - * if they test an entity which requires the current entity. - */ - public static Customer createPersistentEntity(EntityManager em) { - Customer customer = new Customer() - .reference(OTHER_REFERENCE_BASE + otherCounter) - .prefix(OTHER_PREFIX_BASE + String.format("%02d", otherCounter)) - .name(OTHER_NAME_BASE + otherCounter) - .kind(OTHER_KIND) - .vatRegion(OTHER_VAT_REGION) - .contractualAddress(OTHER_CONTRACTUAL_ADDRESS_BASE + otherCounter); - em.persist(customer); - em.flush(); - ++otherCounter; - return customer; - } - - @Before - public void initTest() { - customer = createEntity(em); - } - - @Test - @Transactional - public void createCustomer() throws Exception { - int databaseSizeBeforeCreate = customerRepository.findAll().size(); - - // Create the Customer - CustomerDTO customerDTO = customerMapper.toDto(customer); - restCustomerMockMvc.perform( - post("/api/customers") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(customerDTO))) - .andExpect(status().isCreated()); - - // Validate the Customer in the database - List customerList = customerRepository.findAll(); - assertThat(customerList).hasSize(databaseSizeBeforeCreate + 1); - Customer testCustomer = customerList.get(customerList.size() - 1); - assertThat(testCustomer.getReference()).isEqualTo(DEFAULT_REFERENCE); - assertThat(testCustomer.getPrefix()).isEqualTo(DEFAULT_PREFIX); - assertThat(testCustomer.getName()).isEqualTo(DEFAULT_NAME); - assertThat(testCustomer.getKind()).isEqualTo(DEFAULT_KIND); - assertThat(testCustomer.getBirthDate()).isEqualTo(DEFAULT_BIRTH_DATE); - assertThat(testCustomer.getBirthPlace()).isEqualTo(DEFAULT_BIRTH_PLACE); - assertThat(testCustomer.getRegistrationCourt()).isEqualTo(DEFAULT_REGISTRATION_COURT); - assertThat(testCustomer.getRegistrationNumber()).isEqualTo(DEFAULT_REGISTRATION_NUMBER); - assertThat(testCustomer.getVatRegion()).isEqualTo(DEFAULT_VAT_REGION); - assertThat(testCustomer.getVatNumber()).isEqualTo(DEFAULT_VAT_NUMBER); - assertThat(testCustomer.getContractualSalutation()).isEqualTo(DEFAULT_CONTRACTUAL_SALUTATION); - assertThat(testCustomer.getContractualAddress()).isEqualTo(DEFAULT_CONTRACTUAL_ADDRESS); - assertThat(testCustomer.getBillingSalutation()).isEqualTo(DEFAULT_BILLING_SALUTATION); - assertThat(testCustomer.getBillingAddress()).isEqualTo(DEFAULT_BILLING_ADDRESS); - assertThat(testCustomer.getRemark()).isEqualTo(DEFAULT_REMARK); - } - - @Test - @Transactional - public void createCustomerWithExistingIdIsRejected() throws Exception { - // Initialize the database - final long existingCustomerId = customerRepository.saveAndFlush(customer).getId(); - int databaseSizeBeforeCreate = customerRepository.findAll().size(); - - // Create the Customer with an existing ID - customer.setId(existingCustomerId); - CustomerDTO customerDTO = customerMapper.toDto(customer); - - // An entity with an existing ID cannot be created, so this API call must fail - restCustomerMockMvc.perform( - post("/api/customers") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(customerDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Customer in the database - List customerList = customerRepository.findAll(); - assertThat(customerList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void createCustomerWithNonExistingIdIsRejected() throws Exception { - int databaseSizeBeforeCreate = customerRepository.findAll().size(); - - // Create the Customer with an ID for which no entity exists - customer.setId(1L); - CustomerDTO customerDTO = customerMapper.toDto(customer); - - // An entity with an existing ID cannot be created, so this API call must fail - restCustomerMockMvc.perform( - post("/api/customers") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(customerDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Customer in the database - List customerList = customerRepository.findAll(); - assertThat(customerList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void checkReferenceIsRequired() throws Exception { - int databaseSizeBeforeTest = customerRepository.findAll().size(); - // set the field null - customer.setReference(null); - - // Create the Customer, which fails. - CustomerDTO customerDTO = customerMapper.toDto(customer); - - restCustomerMockMvc.perform( - post("/api/customers") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(customerDTO))) - .andExpect(status().isBadRequest()); - - List customerList = customerRepository.findAll(); - assertThat(customerList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkPrefixIsRequired() throws Exception { - int databaseSizeBeforeTest = customerRepository.findAll().size(); - // set the field null - customer.setPrefix(null); - - // Create the Customer, which fails. - CustomerDTO customerDTO = customerMapper.toDto(customer); - - restCustomerMockMvc.perform( - post("/api/customers") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(customerDTO))) - .andExpect(status().isBadRequest()); - - List customerList = customerRepository.findAll(); - assertThat(customerList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkNameIsRequired() throws Exception { - int databaseSizeBeforeTest = customerRepository.findAll().size(); - // set the field null - customer.setName(null); - - // Create the Customer, which fails. - CustomerDTO customerDTO = customerMapper.toDto(customer); - - restCustomerMockMvc.perform( - post("/api/customers") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(customerDTO))) - .andExpect(status().isBadRequest()); - - List customerList = customerRepository.findAll(); - assertThat(customerList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkKindIsRequired() throws Exception { - int databaseSizeBeforeTest = customerRepository.findAll().size(); - // set the field null - customer.setKind(null); - - // Create the Customer, which fails. - CustomerDTO customerDTO = customerMapper.toDto(customer); - - restCustomerMockMvc.perform( - post("/api/customers") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(customerDTO))) - .andExpect(status().isBadRequest()); - - List customerList = customerRepository.findAll(); - assertThat(customerList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkVatRegionIsRequired() throws Exception { - int databaseSizeBeforeTest = customerRepository.findAll().size(); - // set the field null - customer.setVatRegion(null); - - // Create the Customer, which fails. - CustomerDTO customerDTO = customerMapper.toDto(customer); - - restCustomerMockMvc.perform( - post("/api/customers") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(customerDTO))) - .andExpect(status().isBadRequest()); - - List customerList = customerRepository.findAll(); - assertThat(customerList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkContractualAddressIsRequired() throws Exception { - int databaseSizeBeforeTest = customerRepository.findAll().size(); - // set the field null - customer.setContractualAddress(null); - - // Create the Customer, which fails. - CustomerDTO customerDTO = customerMapper.toDto(customer); - - restCustomerMockMvc.perform( - post("/api/customers") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(customerDTO))) - .andExpect(status().isBadRequest()); - - List customerList = customerRepository.findAll(); - assertThat(customerList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void getAllCustomers() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList - restCustomerMockMvc.perform(get("/api/customers?sort=id,desc")) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].id").value(hasItem(customer.getId().intValue()))) - .andExpect(jsonPath("$.[*].reference").value(hasItem(DEFAULT_REFERENCE))) - .andExpect(jsonPath("$.[*].prefix").value(hasItem(DEFAULT_PREFIX))) - .andExpect(jsonPath("$.[*].name").value(hasItem(DEFAULT_NAME))) - .andExpect(jsonPath("$.[*].kind").value(hasItem(DEFAULT_KIND.toString()))) - .andExpect(jsonPath("$.[*].birthDate").value(hasItem(DEFAULT_BIRTH_DATE.toString()))) - .andExpect(jsonPath("$.[*].birthPlace").value(hasItem(DEFAULT_BIRTH_PLACE))) - .andExpect(jsonPath("$.[*].registrationCourt").value(hasItem(DEFAULT_REGISTRATION_COURT))) - .andExpect(jsonPath("$.[*].registrationNumber").value(hasItem(DEFAULT_REGISTRATION_NUMBER))) - .andExpect(jsonPath("$.[*].vatRegion").value(hasItem(DEFAULT_VAT_REGION.toString()))) - .andExpect(jsonPath("$.[*].vatNumber").value(hasItem(DEFAULT_VAT_NUMBER))) - .andExpect(jsonPath("$.[*].contractualSalutation").value(hasItem(DEFAULT_CONTRACTUAL_SALUTATION))) - .andExpect(jsonPath("$.[*].contractualAddress").value(hasItem(DEFAULT_CONTRACTUAL_ADDRESS))) - .andExpect(jsonPath("$.[*].billingSalutation").value(hasItem(DEFAULT_BILLING_SALUTATION))) - .andExpect(jsonPath("$.[*].billingAddress").value(hasItem(DEFAULT_BILLING_ADDRESS))) - .andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK))); - } - - @Test - @Transactional - public void getCustomer() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get the customer - restCustomerMockMvc.perform(get("/api/customers/{id}", customer.getId())) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.id").value(customer.getId().intValue())) - .andExpect(jsonPath("$.reference").value(DEFAULT_REFERENCE)) - .andExpect(jsonPath("$.prefix").value(DEFAULT_PREFIX)) - .andExpect(jsonPath("$.name").value(DEFAULT_NAME)) - .andExpect(jsonPath("$.kind").value(DEFAULT_KIND.toString())) - .andExpect(jsonPath("$.birthDate").value(DEFAULT_BIRTH_DATE.toString())) - .andExpect(jsonPath("$.birthPlace").value(DEFAULT_BIRTH_PLACE)) - .andExpect(jsonPath("$.registrationCourt").value(DEFAULT_REGISTRATION_COURT)) - .andExpect(jsonPath("$.registrationNumber").value(DEFAULT_REGISTRATION_NUMBER)) - .andExpect(jsonPath("$.vatRegion").value(DEFAULT_VAT_REGION.toString())) - .andExpect(jsonPath("$.vatNumber").value(DEFAULT_VAT_NUMBER)) - .andExpect(jsonPath("$.contractualSalutation").value(DEFAULT_CONTRACTUAL_SALUTATION)) - .andExpect(jsonPath("$.contractualAddress").value(DEFAULT_CONTRACTUAL_ADDRESS)) - .andExpect(jsonPath("$.billingSalutation").value(DEFAULT_BILLING_SALUTATION)) - .andExpect(jsonPath("$.billingAddress").value(DEFAULT_BILLING_ADDRESS)) - .andExpect(jsonPath("$.remark").value(DEFAULT_REMARK)); - } - - @Test - @Transactional - public void getAllCustomersByReferenceIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where reference equals to DEFAULT_REFERENCE - defaultCustomerShouldBeFound("reference.equals=" + DEFAULT_REFERENCE); - - // Get all the customerList where reference equals to UPDATED_REFERENCE - defaultCustomerShouldNotBeFound("reference.equals=" + UPDATED_REFERENCE); - } - - @Test - @Transactional - public void getAllCustomersByReferenceIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where reference in DEFAULT_REFERENCE or UPDATED_REFERENCE - defaultCustomerShouldBeFound("reference.in=" + DEFAULT_REFERENCE + "," + UPDATED_REFERENCE); - - // Get all the customerList where reference equals to UPDATED_REFERENCE - defaultCustomerShouldNotBeFound("reference.in=" + UPDATED_REFERENCE); - } - - @Test - @Transactional - public void getAllCustomersByReferenceIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where reference is not null - defaultCustomerShouldBeFound("reference.specified=true"); - - // Get all the customerList where reference is null - defaultCustomerShouldNotBeFound("reference.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByReferenceIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where reference greater than or equals to DEFAULT_REFERENCE - defaultCustomerShouldBeFound("reference.greaterOrEqualThan=" + DEFAULT_REFERENCE); - - // Get all the customerList where reference greater than or equals to (DEFAULT_REFERENCE + 1) - defaultCustomerShouldNotBeFound("reference.greaterOrEqualThan=" + (DEFAULT_REFERENCE + 1)); - } - - @Test - @Transactional - public void getAllCustomersByReferenceIsLessThanSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where reference less than or equals to DEFAULT_REFERENCE - defaultCustomerShouldNotBeFound("reference.lessThan=" + DEFAULT_REFERENCE); - - // Get all the customerList where reference less than or equals to (DEFAULT_REFERENCE + 1) - defaultCustomerShouldBeFound("reference.lessThan=" + (DEFAULT_REFERENCE + 1)); - } - - @Test - @Transactional - public void getAllCustomersByPrefixIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where prefix equals to DEFAULT_PREFIX - defaultCustomerShouldBeFound("prefix.equals=" + DEFAULT_PREFIX); - - // Get all the customerList where prefix equals to UPDATED_PREFIX - defaultCustomerShouldNotBeFound("prefix.equals=" + UPDATED_PREFIX); - } - - @Test - @Transactional - public void getAllCustomersByPrefixIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where prefix in DEFAULT_PREFIX or UPDATED_PREFIX - defaultCustomerShouldBeFound("prefix.in=" + DEFAULT_PREFIX + "," + UPDATED_PREFIX); - - // Get all the customerList where prefix equals to UPDATED_PREFIX - defaultCustomerShouldNotBeFound("prefix.in=" + UPDATED_PREFIX); - } - - @Test - @Transactional - public void getAllCustomersByPrefixIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where prefix is not null - defaultCustomerShouldBeFound("prefix.specified=true"); - - // Get all the customerList where prefix is null - defaultCustomerShouldNotBeFound("prefix.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByNameIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where name equals to DEFAULT_NAME - defaultCustomerShouldBeFound("name.equals=" + DEFAULT_NAME); - - // Get all the customerList where name equals to UPDATED_NAME - defaultCustomerShouldNotBeFound("name.equals=" + UPDATED_NAME); - } - - @Test - @Transactional - public void getAllCustomersByNameIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where name in DEFAULT_NAME or UPDATED_NAME - defaultCustomerShouldBeFound("name.in=" + DEFAULT_NAME + "," + UPDATED_NAME); - - // Get all the customerList where name equals to UPDATED_NAME - defaultCustomerShouldNotBeFound("name.in=" + UPDATED_NAME); - } - - @Test - @Transactional - public void getAllCustomersByNameIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where name is not null - defaultCustomerShouldBeFound("name.specified=true"); - - // Get all the customerList where name is null - defaultCustomerShouldNotBeFound("name.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByKindIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where kind equals to DEFAULT_KIND - defaultCustomerShouldBeFound("kind.equals=" + DEFAULT_KIND); - - // Get all the customerList where kind equals to UPDATED_KIND - defaultCustomerShouldNotBeFound("kind.equals=" + UPDATED_KIND); - } - - @Test - @Transactional - public void getAllCustomersByKindIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where kind in DEFAULT_KIND or UPDATED_KIND - defaultCustomerShouldBeFound("kind.in=" + DEFAULT_KIND + "," + UPDATED_KIND); - - // Get all the customerList where kind equals to UPDATED_KIND - defaultCustomerShouldNotBeFound("kind.in=" + UPDATED_KIND); - } - - @Test - @Transactional - public void getAllCustomersByKindIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where kind is not null - defaultCustomerShouldBeFound("kind.specified=true"); - - // Get all the customerList where kind is null - defaultCustomerShouldNotBeFound("kind.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByBirthDateIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where birthDate equals to DEFAULT_BIRTH_DATE - defaultCustomerShouldBeFound("birthDate.equals=" + DEFAULT_BIRTH_DATE); - - // Get all the customerList where birthDate equals to UPDATED_BIRTH_DATE - defaultCustomerShouldNotBeFound("birthDate.equals=" + UPDATED_BIRTH_DATE); - } - - @Test - @Transactional - public void getAllCustomersByBirthDateIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where birthDate in DEFAULT_BIRTH_DATE or UPDATED_BIRTH_DATE - defaultCustomerShouldBeFound("birthDate.in=" + DEFAULT_BIRTH_DATE + "," + UPDATED_BIRTH_DATE); - - // Get all the customerList where birthDate equals to UPDATED_BIRTH_DATE - defaultCustomerShouldNotBeFound("birthDate.in=" + UPDATED_BIRTH_DATE); - } - - @Test - @Transactional - public void getAllCustomersByBirthDateIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where birthDate is not null - defaultCustomerShouldBeFound("birthDate.specified=true"); - - // Get all the customerList where birthDate is null - defaultCustomerShouldNotBeFound("birthDate.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByBirthDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where birthDate greater than or equals to DEFAULT_BIRTH_DATE - defaultCustomerShouldBeFound("birthDate.greaterOrEqualThan=" + DEFAULT_BIRTH_DATE); - - // Get all the customerList where birthDate greater than or equals to UPDATED_BIRTH_DATE - defaultCustomerShouldNotBeFound("birthDate.greaterOrEqualThan=" + UPDATED_BIRTH_DATE); - } - - @Test - @Transactional - public void getAllCustomersByBirthDateIsLessThanSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where birthDate less than or equals to DEFAULT_BIRTH_DATE - defaultCustomerShouldNotBeFound("birthDate.lessThan=" + DEFAULT_BIRTH_DATE); - - // Get all the customerList where birthDate less than or equals to UPDATED_BIRTH_DATE - defaultCustomerShouldBeFound("birthDate.lessThan=" + UPDATED_BIRTH_DATE); - } - - @Test - @Transactional - public void getAllCustomersByBirthPlaceIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where birthPlace equals to DEFAULT_BIRTH_PLACE - defaultCustomerShouldBeFound("birthPlace.equals=" + DEFAULT_BIRTH_PLACE); - - // Get all the customerList where birthPlace equals to UPDATED_BIRTH_PLACE - defaultCustomerShouldNotBeFound("birthPlace.equals=" + UPDATED_BIRTH_PLACE); - } - - @Test - @Transactional - public void getAllCustomersByBirthPlaceIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where birthPlace in DEFAULT_BIRTH_PLACE or UPDATED_BIRTH_PLACE - defaultCustomerShouldBeFound("birthPlace.in=" + DEFAULT_BIRTH_PLACE + "," + UPDATED_BIRTH_PLACE); - - // Get all the customerList where birthPlace equals to UPDATED_BIRTH_PLACE - defaultCustomerShouldNotBeFound("birthPlace.in=" + UPDATED_BIRTH_PLACE); - } - - @Test - @Transactional - public void getAllCustomersByBirthPlaceIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where birthPlace is not null - defaultCustomerShouldBeFound("birthPlace.specified=true"); - - // Get all the customerList where birthPlace is null - defaultCustomerShouldNotBeFound("birthPlace.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByRegistrationCourtIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where registrationCourt equals to DEFAULT_REGISTRATION_COURT - defaultCustomerShouldBeFound("registrationCourt.equals=" + DEFAULT_REGISTRATION_COURT); - - // Get all the customerList where registrationCourt equals to UPDATED_REGISTRATION_COURT - defaultCustomerShouldNotBeFound("registrationCourt.equals=" + UPDATED_REGISTRATION_COURT); - } - - @Test - @Transactional - public void getAllCustomersByRegistrationCourtIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where registrationCourt in DEFAULT_REGISTRATION_COURT or UPDATED_REGISTRATION_COURT - defaultCustomerShouldBeFound("registrationCourt.in=" + DEFAULT_REGISTRATION_COURT + "," + UPDATED_REGISTRATION_COURT); - - // Get all the customerList where registrationCourt equals to UPDATED_REGISTRATION_COURT - defaultCustomerShouldNotBeFound("registrationCourt.in=" + UPDATED_REGISTRATION_COURT); - } - - @Test - @Transactional - public void getAllCustomersByRegistrationCourtIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where registrationCourt is not null - defaultCustomerShouldBeFound("registrationCourt.specified=true"); - - // Get all the customerList where registrationCourt is null - defaultCustomerShouldNotBeFound("registrationCourt.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByRegistrationNumberIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where registrationNumber equals to DEFAULT_REGISTRATION_NUMBER - defaultCustomerShouldBeFound("registrationNumber.equals=" + DEFAULT_REGISTRATION_NUMBER); - - // Get all the customerList where registrationNumber equals to UPDATED_REGISTRATION_NUMBER - defaultCustomerShouldNotBeFound("registrationNumber.equals=" + UPDATED_REGISTRATION_NUMBER); - } - - @Test - @Transactional - public void getAllCustomersByRegistrationNumberIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where registrationNumber in DEFAULT_REGISTRATION_NUMBER or UPDATED_REGISTRATION_NUMBER - defaultCustomerShouldBeFound( - "registrationNumber.in=" + DEFAULT_REGISTRATION_NUMBER + "," + UPDATED_REGISTRATION_NUMBER); - - // Get all the customerList where registrationNumber equals to UPDATED_REGISTRATION_NUMBER - defaultCustomerShouldNotBeFound("registrationNumber.in=" + UPDATED_REGISTRATION_NUMBER); - } - - @Test - @Transactional - public void getAllCustomersByRegistrationNumberIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where registrationNumber is not null - defaultCustomerShouldBeFound("registrationNumber.specified=true"); - - // Get all the customerList where registrationNumber is null - defaultCustomerShouldNotBeFound("registrationNumber.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByVatRegionIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where vatRegion equals to DEFAULT_VAT_REGION - defaultCustomerShouldBeFound("vatRegion.equals=" + DEFAULT_VAT_REGION); - - // Get all the customerList where vatRegion equals to UPDATED_VAT_REGION - defaultCustomerShouldNotBeFound("vatRegion.equals=" + UPDATED_VAT_REGION); - } - - @Test - @Transactional - public void getAllCustomersByVatRegionIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where vatRegion in DEFAULT_VAT_REGION or UPDATED_VAT_REGION - defaultCustomerShouldBeFound("vatRegion.in=" + DEFAULT_VAT_REGION + "," + UPDATED_VAT_REGION); - - // Get all the customerList where vatRegion equals to UPDATED_VAT_REGION - defaultCustomerShouldNotBeFound("vatRegion.in=" + UPDATED_VAT_REGION); - } - - @Test - @Transactional - public void getAllCustomersByVatRegionIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where vatRegion is not null - defaultCustomerShouldBeFound("vatRegion.specified=true"); - - // Get all the customerList where vatRegion is null - defaultCustomerShouldNotBeFound("vatRegion.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByVatNumberIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where vatNumber equals to DEFAULT_VAT_NUMBER - defaultCustomerShouldBeFound("vatNumber.equals=" + DEFAULT_VAT_NUMBER); - - // Get all the customerList where vatNumber equals to UPDATED_VAT_NUMBER - defaultCustomerShouldNotBeFound("vatNumber.equals=" + UPDATED_VAT_NUMBER); - } - - @Test - @Transactional - public void getAllCustomersByVatNumberIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where vatNumber in DEFAULT_VAT_NUMBER or UPDATED_VAT_NUMBER - defaultCustomerShouldBeFound("vatNumber.in=" + DEFAULT_VAT_NUMBER + "," + UPDATED_VAT_NUMBER); - - // Get all the customerList where vatNumber equals to UPDATED_VAT_NUMBER - defaultCustomerShouldNotBeFound("vatNumber.in=" + UPDATED_VAT_NUMBER); - } - - @Test - @Transactional - public void getAllCustomersByVatNumberIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where vatNumber is not null - defaultCustomerShouldBeFound("vatNumber.specified=true"); - - // Get all the customerList where vatNumber is null - defaultCustomerShouldNotBeFound("vatNumber.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByContractualSalutationIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where contractualSalutation equals to DEFAULT_CONTRACTUAL_SALUTATION - defaultCustomerShouldBeFound("contractualSalutation.equals=" + DEFAULT_CONTRACTUAL_SALUTATION); - - // Get all the customerList where contractualSalutation equals to UPDATED_CONTRACTUAL_SALUTATION - defaultCustomerShouldNotBeFound("contractualSalutation.equals=" + UPDATED_CONTRACTUAL_SALUTATION); - } - - @Test - @Transactional - public void getAllCustomersByContractualSalutationIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where contractualSalutation in DEFAULT_CONTRACTUAL_SALUTATION or - // UPDATED_CONTRACTUAL_SALUTATION - defaultCustomerShouldBeFound( - "contractualSalutation.in=" + DEFAULT_CONTRACTUAL_SALUTATION + "," + UPDATED_CONTRACTUAL_SALUTATION); - - // Get all the customerList where contractualSalutation equals to UPDATED_CONTRACTUAL_SALUTATION - defaultCustomerShouldNotBeFound("contractualSalutation.in=" + UPDATED_CONTRACTUAL_SALUTATION); - } - - @Test - @Transactional - public void getAllCustomersByContractualSalutationIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where contractualSalutation is not null - defaultCustomerShouldBeFound("contractualSalutation.specified=true"); - - // Get all the customerList where contractualSalutation is null - defaultCustomerShouldNotBeFound("contractualSalutation.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByContractualAddressIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where contractualAddress equals to DEFAULT_CONTRACTUAL_ADDRESS - defaultCustomerShouldBeFound("contractualAddress.equals=" + DEFAULT_CONTRACTUAL_ADDRESS); - - // Get all the customerList where contractualAddress equals to UPDATED_CONTRACTUAL_ADDRESS - defaultCustomerShouldNotBeFound("contractualAddress.equals=" + UPDATED_CONTRACTUAL_ADDRESS); - } - - @Test - @Transactional - public void getAllCustomersByContractualAddressIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where contractualAddress in DEFAULT_CONTRACTUAL_ADDRESS or UPDATED_CONTRACTUAL_ADDRESS - defaultCustomerShouldBeFound( - "contractualAddress.in=" + DEFAULT_CONTRACTUAL_ADDRESS + "," + UPDATED_CONTRACTUAL_ADDRESS); - - // Get all the customerList where contractualAddress equals to UPDATED_CONTRACTUAL_ADDRESS - defaultCustomerShouldNotBeFound("contractualAddress.in=" + UPDATED_CONTRACTUAL_ADDRESS); - } - - @Test - @Transactional - public void getAllCustomersByContractualAddressIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where contractualAddress is not null - defaultCustomerShouldBeFound("contractualAddress.specified=true"); - - // Get all the customerList where contractualAddress is null - defaultCustomerShouldNotBeFound("contractualAddress.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByBillingSalutationIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where billingSalutation equals to DEFAULT_BILLING_SALUTATION - defaultCustomerShouldBeFound("billingSalutation.equals=" + DEFAULT_BILLING_SALUTATION); - - // Get all the customerList where billingSalutation equals to UPDATED_BILLING_SALUTATION - defaultCustomerShouldNotBeFound("billingSalutation.equals=" + UPDATED_BILLING_SALUTATION); - } - - @Test - @Transactional - public void getAllCustomersByBillingSalutationIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where billingSalutation in DEFAULT_BILLING_SALUTATION or UPDATED_BILLING_SALUTATION - defaultCustomerShouldBeFound("billingSalutation.in=" + DEFAULT_BILLING_SALUTATION + "," + UPDATED_BILLING_SALUTATION); - - // Get all the customerList where billingSalutation equals to UPDATED_BILLING_SALUTATION - defaultCustomerShouldNotBeFound("billingSalutation.in=" + UPDATED_BILLING_SALUTATION); - } - - @Test - @Transactional - public void getAllCustomersByBillingSalutationIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where billingSalutation is not null - defaultCustomerShouldBeFound("billingSalutation.specified=true"); - - // Get all the customerList where billingSalutation is null - defaultCustomerShouldNotBeFound("billingSalutation.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByBillingAddressIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where billingAddress equals to DEFAULT_BILLING_ADDRESS - defaultCustomerShouldBeFound("billingAddress.equals=" + DEFAULT_BILLING_ADDRESS); - - // Get all the customerList where billingAddress equals to UPDATED_BILLING_ADDRESS - defaultCustomerShouldNotBeFound("billingAddress.equals=" + UPDATED_BILLING_ADDRESS); - } - - @Test - @Transactional - public void getAllCustomersByBillingAddressIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where billingAddress in DEFAULT_BILLING_ADDRESS or UPDATED_BILLING_ADDRESS - defaultCustomerShouldBeFound("billingAddress.in=" + DEFAULT_BILLING_ADDRESS + "," + UPDATED_BILLING_ADDRESS); - - // Get all the customerList where billingAddress equals to UPDATED_BILLING_ADDRESS - defaultCustomerShouldNotBeFound("billingAddress.in=" + UPDATED_BILLING_ADDRESS); - } - - @Test - @Transactional - public void getAllCustomersByBillingAddressIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where billingAddress is not null - defaultCustomerShouldBeFound("billingAddress.specified=true"); - - // Get all the customerList where billingAddress is null - defaultCustomerShouldNotBeFound("billingAddress.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByRemarkIsEqualToSomething() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where remark equals to DEFAULT_REMARK - defaultCustomerShouldBeFound("remark.equals=" + DEFAULT_REMARK); - - // Get all the customerList where remark equals to UPDATED_REMARK - defaultCustomerShouldNotBeFound("remark.equals=" + UPDATED_REMARK); - } - - @Test - @Transactional - public void getAllCustomersByRemarkIsInShouldWork() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where remark in DEFAULT_REMARK or UPDATED_REMARK - defaultCustomerShouldBeFound("remark.in=" + DEFAULT_REMARK + "," + UPDATED_REMARK); - - // Get all the customerList where remark equals to UPDATED_REMARK - defaultCustomerShouldNotBeFound("remark.in=" + UPDATED_REMARK); - } - - @Test - @Transactional - public void getAllCustomersByRemarkIsNullOrNotNull() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - // Get all the customerList where remark is not null - defaultCustomerShouldBeFound("remark.specified=true"); - - // Get all the customerList where remark is null - defaultCustomerShouldNotBeFound("remark.specified=false"); - } - - @Test - @Transactional - public void getAllCustomersByMembershipIsEqualToSomething() throws Exception { - // Initialize the database - Membership membership = MembershipResourceIntTest.createPersistentEntity(em, createPersistentEntity(em)); - em.persist(membership); - em.flush(); - customer.addMembership(membership); - customerRepository.saveAndFlush(customer); - Long membershipId = membership.getId(); - - // Get all the customerList where membership equals to membershipId - defaultCustomerShouldBeFound("membershipId.equals=" + membershipId); - - // Get all the customerList where membership equals to membershipId + 1 - defaultCustomerShouldNotBeFound("membershipId.equals=" + (membershipId + 1)); - } - - @Test - @Transactional - public void getAllCustomersBySepamandateIsEqualToSomething() throws Exception { - // Initialize the database - SepaMandate sepamandate = SepaMandateResourceIntTest.createEntity(em, createPersistentEntity(em)); - em.persist(sepamandate); - em.flush(); - customer.addSepamandate(sepamandate); - customerRepository.saveAndFlush(customer); - Long sepamandateId = sepamandate.getId(); - - // Get all the customerList where sepamandate equals to sepamandateId - defaultCustomerShouldBeFound("sepamandateId.equals=" + sepamandateId); - - // Get all the customerList where sepamandate equals to sepamandateId + 1 - defaultCustomerShouldNotBeFound("sepamandateId.equals=" + (sepamandateId + 1)); - } - - /** - * Executes the search, and checks that the default entity is returned - */ - private void defaultCustomerShouldBeFound(String filter) throws Exception { - restCustomerMockMvc.perform(get("/api/customers?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].id").value(hasItem(customer.getId().intValue()))) - .andExpect(jsonPath("$.[*].reference").value(hasItem(DEFAULT_REFERENCE))) - .andExpect(jsonPath("$.[*].prefix").value(hasItem(DEFAULT_PREFIX))) - .andExpect(jsonPath("$.[*].name").value(hasItem(DEFAULT_NAME))) - .andExpect(jsonPath("$.[*].kind").value(hasItem(DEFAULT_KIND.toString()))) - .andExpect(jsonPath("$.[*].birthDate").value(hasItem(DEFAULT_BIRTH_DATE.toString()))) - .andExpect(jsonPath("$.[*].birthPlace").value(hasItem(DEFAULT_BIRTH_PLACE))) - .andExpect(jsonPath("$.[*].registrationCourt").value(hasItem(DEFAULT_REGISTRATION_COURT))) - .andExpect(jsonPath("$.[*].registrationNumber").value(hasItem(DEFAULT_REGISTRATION_NUMBER))) - .andExpect(jsonPath("$.[*].vatRegion").value(hasItem(DEFAULT_VAT_REGION.toString()))) - .andExpect(jsonPath("$.[*].vatNumber").value(hasItem(DEFAULT_VAT_NUMBER))) - .andExpect(jsonPath("$.[*].contractualSalutation").value(hasItem(DEFAULT_CONTRACTUAL_SALUTATION))) - .andExpect(jsonPath("$.[*].contractualAddress").value(hasItem(DEFAULT_CONTRACTUAL_ADDRESS))) - .andExpect(jsonPath("$.[*].billingSalutation").value(hasItem(DEFAULT_BILLING_SALUTATION))) - .andExpect(jsonPath("$.[*].billingAddress").value(hasItem(DEFAULT_BILLING_ADDRESS))) - .andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK))); - - // Check, that the count call also returns 1 - restCustomerMockMvc.perform(get("/api/customers/count?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(content().string("1")); - } - - /** - * Executes the search, and checks that the default entity is not returned - */ - private void defaultCustomerShouldNotBeFound(String filter) throws Exception { - restCustomerMockMvc.perform(get("/api/customers?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$").isArray()) - .andExpect(jsonPath("$").isEmpty()); - - // Check, that the count call also returns 0 - restCustomerMockMvc.perform(get("/api/customers/count?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(content().string("0")); - } - - @Test - @Transactional - public void getNonExistingCustomer() throws Exception { - // Get the customer - restCustomerMockMvc.perform(get("/api/customers/{id}", Long.MAX_VALUE)) - .andExpect(status().isNotFound()); - } - - @Test - @Transactional - public void updateCustomer() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - int databaseSizeBeforeUpdate = customerRepository.findAll().size(); - - // Update the customer - Customer updatedCustomer = customerRepository.findById(customer.getId()).get(); - // Disconnect from session so that the updates on updatedCustomer are not directly saved in db - em.detach(updatedCustomer); - updatedCustomer - .reference(null) - .prefix(null) - .name(UPDATED_NAME) - .kind(UPDATED_KIND) - .birthDate(UPDATED_BIRTH_DATE) - .birthPlace(UPDATED_BIRTH_PLACE) - .registrationCourt(UPDATED_REGISTRATION_COURT) - .registrationNumber(UPDATED_REGISTRATION_NUMBER) - .vatRegion(UPDATED_VAT_REGION) - .vatNumber(UPDATED_VAT_NUMBER) - .contractualSalutation(UPDATED_CONTRACTUAL_SALUTATION) - .contractualAddress(UPDATED_CONTRACTUAL_ADDRESS) - .billingSalutation(UPDATED_BILLING_SALUTATION) - .billingAddress(UPDATED_BILLING_ADDRESS) - .remark(UPDATED_REMARK); - CustomerDTO customerDTO = customerMapper.toDto(updatedCustomer); - - restCustomerMockMvc.perform( - put("/api/customers") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(customerDTO))) - .andExpect(status().isOk()); - - // Validate the Customer in the database - List customerList = customerRepository.findAll(); - assertThat(customerList).hasSize(databaseSizeBeforeUpdate); - Customer testCustomer = customerList.get(customerList.size() - 1); - assertThat(testCustomer.getReference()).isEqualTo(DEFAULT_REFERENCE); - assertThat(testCustomer.getPrefix()).isEqualTo(DEFAULT_PREFIX); - assertThat(testCustomer.getName()).isEqualTo(UPDATED_NAME); - assertThat(testCustomer.getKind()).isEqualTo(UPDATED_KIND); - assertThat(testCustomer.getBirthDate()).isEqualTo(UPDATED_BIRTH_DATE); - assertThat(testCustomer.getBirthPlace()).isEqualTo(UPDATED_BIRTH_PLACE); - assertThat(testCustomer.getRegistrationCourt()).isEqualTo(UPDATED_REGISTRATION_COURT); - assertThat(testCustomer.getRegistrationNumber()).isEqualTo(UPDATED_REGISTRATION_NUMBER); - assertThat(testCustomer.getVatRegion()).isEqualTo(UPDATED_VAT_REGION); - assertThat(testCustomer.getVatNumber()).isEqualTo(UPDATED_VAT_NUMBER); - assertThat(testCustomer.getContractualSalutation()).isEqualTo(UPDATED_CONTRACTUAL_SALUTATION); - assertThat(testCustomer.getContractualAddress()).isEqualTo(UPDATED_CONTRACTUAL_ADDRESS); - assertThat(testCustomer.getBillingSalutation()).isEqualTo(UPDATED_BILLING_SALUTATION); - assertThat(testCustomer.getBillingAddress()).isEqualTo(UPDATED_BILLING_ADDRESS); - assertThat(testCustomer.getRemark()).isEqualTo(UPDATED_REMARK); - } - - @Test - @Transactional - public void updateNonExistingCustomer() throws Exception { - int databaseSizeBeforeUpdate = customerRepository.findAll().size(); - - // Create the Customer - CustomerDTO customerDTO = customerMapper.toDto(customer); - - // If the entity doesn't have an ID, it will throw BadRequestAlertException - restCustomerMockMvc.perform( - put("/api/customers") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(customerDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Customer in the database - List customerList = customerRepository.findAll(); - assertThat(customerList).hasSize(databaseSizeBeforeUpdate); - } - - @Test - @Transactional - public void deleteCustomer() throws Exception { - // Initialize the database - customerRepository.saveAndFlush(customer); - - int databaseSizeBeforeDelete = customerRepository.findAll().size(); - - // Delete the customer - restCustomerMockMvc.perform( - delete("/api/customers/{id}", customer.getId()) - .accept(TestUtil.APPLICATION_JSON_UTF8)) - .andExpect(status().isBadRequest()); - - // Validate the database is unchanged - List customerList = customerRepository.findAll(); - assertThat(customerList).hasSize(databaseSizeBeforeDelete); - } - - @Test - @Transactional - public void equalsVerifier() throws Exception { - TestUtil.equalsVerifier(Customer.class); - Customer customer1 = new Customer(); - customer1.setId(1L); - Customer customer2 = new Customer(); - customer2.setId(customer1.getId()); - assertThat(customer1).isEqualTo(customer2); - customer2.setId(2L); - assertThat(customer1).isNotEqualTo(customer2); - customer1.setId(null); - assertThat(customer1).isNotEqualTo(customer2); - } - - @Test - @Transactional - public void dtoEqualsVerifier() throws Exception { - TestUtil.equalsVerifier(CustomerDTO.class); - CustomerDTO customerDTO1 = new CustomerDTO(); - customerDTO1.setId(1L); - CustomerDTO customerDTO2 = new CustomerDTO(); - assertThat(customerDTO1).isNotEqualTo(customerDTO2); - customerDTO2.setId(customerDTO1.getId()); - assertThat(customerDTO1).isEqualTo(customerDTO2); - customerDTO2.setId(2L); - assertThat(customerDTO1).isNotEqualTo(customerDTO2); - customerDTO1.setId(null); - assertThat(customerDTO1).isNotEqualTo(customerDTO2); - } - - @Test - @Transactional - public void testEntityFromId() { - assertThat(customerMapper.fromId(42L).getId()).isEqualTo(42); - assertThat(customerMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/LogsResourceIntTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/LogsResourceIntTest.java deleted file mode 100644 index c6a0093c..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/LogsResourceIntTest.java +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.web.rest.vm.LoggerVM; - -import ch.qos.logback.classic.AsyncAppender; -import ch.qos.logback.classic.LoggerContext; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.slf4j.LoggerFactory; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.http.MediaType; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; - -/** - * Test class for the LogsResource REST controller. - * - * @see LogsResource - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class LogsResourceIntTest { - - private MockMvc restLogsMockMvc; - - @Before - public void setup() { - LogsResource logsResource = new LogsResource(); - this.restLogsMockMvc = MockMvcBuilders - .standaloneSetup(logsResource) - .build(); - } - - @Test - public void getAllLogs() throws Exception { - restLogsMockMvc.perform(get("/management/logs")) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)); - } - - @Test - public void changeLogs() throws Exception { - LoggerVM logger = new LoggerVM(); - logger.setLevel("INFO"); - logger.setName("ROOT"); - - restLogsMockMvc.perform( - put("/management/logs") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(logger))) - .andExpect(status().isNoContent()); - } - - @Test - public void testLogstashAppender() { - LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); - assertThat(context.getLogger("ROOT").getAppender("ASYNC_LOGSTASH")).isInstanceOf(AsyncAppender.class); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/MembershipResourceIntTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/MembershipResourceIntTest.java deleted file mode 100644 index 7d757ce0..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/MembershipResourceIntTest.java +++ /dev/null @@ -1,837 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.hamcrest.Matchers.hasItem; -import static org.hostsharing.hsadminng.web.rest.TestUtil.createFormattingConversionService; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.Asset; -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.domain.Share; -import org.hostsharing.hsadminng.repository.MembershipRepository; -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.MembershipQueryService; -import org.hostsharing.hsadminng.service.MembershipService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextMock; -import org.hostsharing.hsadminng.service.dto.MembershipDTO; -import org.hostsharing.hsadminng.service.mapper.MembershipMapper; -import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.MockitoAnnotations; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.data.web.PageableHandlerMethodArgumentResolver; -import org.springframework.http.MediaType; -import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.validation.Validator; - -import java.time.LocalDate; -import java.time.ZoneId; -import java.util.List; - -import javax.persistence.EntityManager; - -/** - * Test class for the MembershipResource REST controller. - * - * @see MembershipResource - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class MembershipResourceIntTest { - - private static final LocalDate DEFAULT_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault()); - private static final LocalDate UPDATED_DOCUMENT_DATE = DEFAULT_DOCUMENT_DATE.plusDays(1); - - private static final LocalDate DEFAULT_MEMBER_FROM_DATE = DEFAULT_DOCUMENT_DATE.plusDays(2); - private static final LocalDate UPDATED_MEMBER_FROM_DATE = UPDATED_DOCUMENT_DATE.plusDays(8); - - private static final LocalDate DEFAULT_MEMBER_UNTIL_DATE = DEFAULT_MEMBER_FROM_DATE.plusYears(1) - .withMonth(12) - .withDayOfMonth(31); - private static final LocalDate UPDATED_MEMBER_UNTIL_DATE = UPDATED_MEMBER_FROM_DATE.plusYears(7) - .withMonth(12) - .withDayOfMonth(31); - - private static final LocalDate DEFAULT_ADMISSION_DOCUMENT_DATE = LocalDate.ofEpochDay(0L); - private static final LocalDate UPDATED_ADMISSION_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault()); - - private static final LocalDate DEFAULT_CANCELLATION_DOCUMENT_DATE = LocalDate.ofEpochDay(0L); - private static final LocalDate UPDATED_CANCELLATION_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault()); - - private static final String DEFAULT_REMARK = "AAAAAAAAAA"; - private static final String UPDATED_REMARK = "BBBBBBBBBB"; - - @Autowired - private MembershipRepository membershipRepository; - - @Autowired - private MembershipMapper membershipMapper; - - @Autowired - private MembershipService membershipService; - - @Autowired - private MembershipQueryService membershipQueryService; - - @Autowired - private MappingJackson2HttpMessageConverter jacksonMessageConverter; - - @Autowired - private PageableHandlerMethodArgumentResolver pageableArgumentResolver; - - @Autowired - private ExceptionTranslator exceptionTranslator; - - @Autowired - private EntityManager em; - - @Autowired - private Validator validator; - - @MockBean - private UserRoleAssignmentService userRoleAssignmentService; - - private SecurityContextMock securityContext; - - private MockMvc restMembershipMockMvc; - - private Membership membership; - - @Before - public void setup() { - securityContext = SecurityContextMock.usingMock(userRoleAssignmentService) - .havingAuthenticatedUser() - .withAuthority(AuthoritiesConstants.ADMIN); - - MockitoAnnotations.initMocks(this); - final MembershipResource membershipResource = new MembershipResource(membershipService, membershipQueryService); - this.restMembershipMockMvc = MockMvcBuilders.standaloneSetup(membershipResource) - .setCustomArgumentResolvers(pageableArgumentResolver) - .setControllerAdvice(exceptionTranslator) - .setConversionService(createFormattingConversionService()) - .setMessageConverters(jacksonMessageConverter) - .setValidator(validator) - .build(); - } - - /** - * Create an entity for this test. - * - * This is a static method, as tests for other entities might also need it, - * if they test an entity which requires the current entity. - */ - public static Membership createEntity(EntityManager em) { - Membership membership = new Membership() - .admissionDocumentDate(DEFAULT_ADMISSION_DOCUMENT_DATE) - .cancellationDocumentDate(DEFAULT_CANCELLATION_DOCUMENT_DATE) - .memberFromDate(DEFAULT_MEMBER_FROM_DATE) - .memberUntilDate(DEFAULT_MEMBER_UNTIL_DATE) - .remark(DEFAULT_REMARK); - // Add required entity - Customer customer = CustomerResourceIntTest.createEntity(em); - em.persist(customer); - em.flush(); - membership.setCustomer(customer); - return membership; - } - - /** - * Create an entity for tests for a specific customer. - *

- * This is a static method, as tests for other entities might also need it, - * if they test an entity which requires the current entity. - */ - public static Membership createPersistentEntity(EntityManager em, final Customer customer) { - Membership membership = new Membership() - .admissionDocumentDate(DEFAULT_ADMISSION_DOCUMENT_DATE) - .memberFromDate(DEFAULT_MEMBER_FROM_DATE) - .memberUntilDate(DEFAULT_MEMBER_UNTIL_DATE) - .remark(DEFAULT_REMARK); - // Add required entity - membership.setCustomer(customer); - em.persist(membership); - em.flush(); - return membership; - } - - @Before - public void initTest() { - membership = createEntity(em); - } - - @Test - @Transactional - public void createMembership() throws Exception { - int databaseSizeBeforeCreate = membershipRepository.findAll().size(); - - // Create the Membership - MembershipDTO membershipDTO = membershipMapper.toDto(membership); - membershipDTO.setCustomerPrefix(null); - membershipDTO.setCustomerDisplayLabel(null); - membershipDTO.setDisplayLabel(null); - restMembershipMockMvc.perform( - post("/api/memberships") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(membershipDTO))) - .andExpect(status().isCreated()); - - // Validate the Membership in the database - List membershipList = membershipRepository.findAll(); - assertThat(membershipList).hasSize(databaseSizeBeforeCreate + 1); - Membership testMembership = membershipList.get(membershipList.size() - 1); - assertThat(testMembership.getAdmissionDocumentDate()).isEqualTo(DEFAULT_ADMISSION_DOCUMENT_DATE); - assertThat(testMembership.getCancellationDocumentDate()).isEqualTo(DEFAULT_CANCELLATION_DOCUMENT_DATE); - assertThat(testMembership.getMemberFromDate()).isEqualTo(DEFAULT_MEMBER_FROM_DATE); - assertThat(testMembership.getMemberUntilDate()).isEqualTo(DEFAULT_MEMBER_UNTIL_DATE); - assertThat(testMembership.getRemark()).isEqualTo(DEFAULT_REMARK); - } - - @Test - @Transactional - public void createCustomerWithExistingIdIsRejected() throws Exception { - // Initialize the database - final long existingCustomerId = membershipRepository.saveAndFlush(membership).getId(); - int databaseSizeBeforeCreate = membershipRepository.findAll().size(); - - // Create the Customer with an existing ID - membership.setId(existingCustomerId); - MembershipDTO membershipDTO = membershipMapper.toDto(membership); - - // An entity with an existing ID cannot be created, so this API call must fail - restMembershipMockMvc.perform( - post("/api/memberships") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(membershipDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Customer in the database - List membershipList = membershipRepository.findAll(); - assertThat(membershipList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void createCustomerWithNonExistingIdIsRejected() throws Exception { - int databaseSizeBeforeCreate = membershipRepository.findAll().size(); - - // Create the Membership with an ID for which no entity exists - membership.setId(1L); - MembershipDTO membershipDTO = membershipMapper.toDto(membership); - - // An entity with an existing ID cannot be created, so this API call must fail - restMembershipMockMvc.perform( - post("/api/memberships") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(membershipDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Membership in the database - List membershipList = membershipRepository.findAll(); - assertThat(membershipList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void checkAdmissionDocumentDateIsRequired() throws Exception { - int databaseSizeBeforeTest = membershipRepository.findAll().size(); - // set the field null - membership.setAdmissionDocumentDate(null); - - // Create the Membership, which fails. - MembershipDTO membershipDTO = membershipMapper.toDto(membership); - - restMembershipMockMvc.perform( - post("/api/memberships") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(membershipDTO))) - .andExpect(status().isBadRequest()); - - List membershipList = membershipRepository.findAll(); - assertThat(membershipList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkMemberFromDateIsRequired() throws Exception { - int databaseSizeBeforeTest = membershipRepository.findAll().size(); - // set the field null - membership.setMemberFromDate(null); - - // Create the Membership, which fails. - MembershipDTO membershipDTO = membershipMapper.toDto(membership); - - restMembershipMockMvc.perform( - post("/api/memberships") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(membershipDTO))) - .andExpect(status().isBadRequest()); - - List membershipList = membershipRepository.findAll(); - assertThat(membershipList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void getAllMemberships() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList - restMembershipMockMvc.perform(get("/api/memberships?sort=id,desc")) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].id").value(hasItem(membership.getId().intValue()))) - .andExpect(jsonPath("$.[*].admissionDocumentDate").value(hasItem(DEFAULT_ADMISSION_DOCUMENT_DATE.toString()))) - .andExpect( - jsonPath("$.[*].cancellationDocumentDate") - .value(hasItem(DEFAULT_CANCELLATION_DOCUMENT_DATE.toString()))) - .andExpect(jsonPath("$.[*].memberFromDate").value(hasItem(DEFAULT_MEMBER_FROM_DATE.toString()))) - .andExpect(jsonPath("$.[*].memberUntilDate").value(hasItem(DEFAULT_MEMBER_UNTIL_DATE.toString()))) - .andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK))); - } - - @Test - @Transactional - public void getMembership() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get the membership - restMembershipMockMvc.perform(get("/api/memberships/{id}", membership.getId())) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.id").value(membership.getId().intValue())) - .andExpect(jsonPath("$.admissionDocumentDate").value(DEFAULT_ADMISSION_DOCUMENT_DATE.toString())) - .andExpect(jsonPath("$.cancellationDocumentDate").value(DEFAULT_CANCELLATION_DOCUMENT_DATE.toString())) - .andExpect(jsonPath("$.memberFromDate").value(DEFAULT_MEMBER_FROM_DATE.toString())) - .andExpect(jsonPath("$.memberUntilDate").value(DEFAULT_MEMBER_UNTIL_DATE.toString())) - .andExpect(jsonPath("$.remark").value(DEFAULT_REMARK)); - } - - @Test - @Transactional - public void getAllMembershipsByAdmissionDocumentDateIsEqualToSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where admissionDocumentDate equals to DEFAULT_ADMISSION_DOCUMENT_DATE - defaultMembershipShouldBeFound("admissionDocumentDate.equals=" + DEFAULT_ADMISSION_DOCUMENT_DATE); - - // Get all the membershipList where admissionDocumentDate equals to UPDATED_ADMISSION_DOCUMENT_DATE - defaultMembershipShouldNotBeFound("admissionDocumentDate.equals=" + UPDATED_ADMISSION_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByAdmissionDocumentDateIsInShouldWork() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where admissionDocumentDate in DEFAULT_ADMISSION_DOCUMENT_DATE or - // UPDATED_ADMISSION_DOCUMENT_DATE - defaultMembershipShouldBeFound( - "admissionDocumentDate.in=" + DEFAULT_ADMISSION_DOCUMENT_DATE + "," + UPDATED_ADMISSION_DOCUMENT_DATE); - - // Get all the membershipList where admissionDocumentDate equals to UPDATED_ADMISSION_DOCUMENT_DATE - defaultMembershipShouldNotBeFound("admissionDocumentDate.in=" + UPDATED_ADMISSION_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByAdmissionDocumentDateIsNullOrNotNull() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where admissionDocumentDate is not null - defaultMembershipShouldBeFound("admissionDocumentDate.specified=true"); - - // Get all the membershipList where admissionDocumentDate is null - defaultMembershipShouldNotBeFound("admissionDocumentDate.specified=false"); - } - - @Test - @Transactional - public void getAllMembershipsByAdmissionDocumentDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where admissionDocumentDate greater than or equals to DEFAULT_ADMISSION_DOCUMENT_DATE - defaultMembershipShouldBeFound("admissionDocumentDate.greaterOrEqualThan=" + DEFAULT_ADMISSION_DOCUMENT_DATE); - - // Get all the membershipList where admissionDocumentDate greater than or equals to UPDATED_ADMISSION_DOCUMENT_DATE - defaultMembershipShouldNotBeFound("admissionDocumentDate.greaterOrEqualThan=" + UPDATED_ADMISSION_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByAdmissionDocumentDateIsLessThanSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where admissionDocumentDate less than or equals to DEFAULT_ADMISSION_DOCUMENT_DATE - defaultMembershipShouldNotBeFound("admissionDocumentDate.lessThan=" + DEFAULT_ADMISSION_DOCUMENT_DATE); - - // Get all the membershipList where admissionDocumentDate less than or equals to UPDATED_ADMISSION_DOCUMENT_DATE - defaultMembershipShouldBeFound("admissionDocumentDate.lessThan=" + UPDATED_ADMISSION_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByCancellationDocumentDateIsEqualToSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where cancellationDocumentDate equals to DEFAULT_CANCELLATION_DOCUMENT_DATE - defaultMembershipShouldBeFound("cancellationDocumentDate.equals=" + DEFAULT_CANCELLATION_DOCUMENT_DATE); - - // Get all the membershipList where cancellationDocumentDate equals to UPDATED_CANCELLATION_DOCUMENT_DATE - defaultMembershipShouldNotBeFound("cancellationDocumentDate.equals=" + UPDATED_CANCELLATION_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByCancellationDocumentDateIsInShouldWork() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where cancellationDocumentDate in DEFAULT_CANCELLATION_DOCUMENT_DATE or - // UPDATED_CANCELLATION_DOCUMENT_DATE - defaultMembershipShouldBeFound( - "cancellationDocumentDate.in=" + DEFAULT_CANCELLATION_DOCUMENT_DATE + "," + UPDATED_CANCELLATION_DOCUMENT_DATE); - - // Get all the membershipList where cancellationDocumentDate equals to UPDATED_CANCELLATION_DOCUMENT_DATE - defaultMembershipShouldNotBeFound("cancellationDocumentDate.in=" + UPDATED_CANCELLATION_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByCancellationDocumentDateIsNullOrNotNull() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where cancellationDocumentDate is not null - defaultMembershipShouldBeFound("cancellationDocumentDate.specified=true"); - - // Get all the membershipList where cancellationDocumentDate is null - defaultMembershipShouldNotBeFound("cancellationDocumentDate.specified=false"); - } - - @Test - @Transactional - public void getAllMembershipsByCancellationDocumentDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where cancellationDocumentDate greater than or equals to - // DEFAULT_CANCELLATION_DOCUMENT_DATE - defaultMembershipShouldBeFound("cancellationDocumentDate.greaterOrEqualThan=" + DEFAULT_CANCELLATION_DOCUMENT_DATE); - - // Get all the membershipList where cancellationDocumentDate greater than or equals to - // UPDATED_CANCELLATION_DOCUMENT_DATE - defaultMembershipShouldNotBeFound("cancellationDocumentDate.greaterOrEqualThan=" + UPDATED_CANCELLATION_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByCancellationDocumentDateIsLessThanSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where cancellationDocumentDate less than or equals to DEFAULT_CANCELLATION_DOCUMENT_DATE - defaultMembershipShouldNotBeFound("cancellationDocumentDate.lessThan=" + DEFAULT_CANCELLATION_DOCUMENT_DATE); - - // Get all the membershipList where cancellationDocumentDate less than or equals to UPDATED_CANCELLATION_DOCUMENT_DATE - defaultMembershipShouldBeFound("cancellationDocumentDate.lessThan=" + UPDATED_CANCELLATION_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByMemberFromDateIsEqualToSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where memberFromDate equals to DEFAULT_MEMBER_FROM_DATE - defaultMembershipShouldBeFound("memberFromDate.equals=" + DEFAULT_MEMBER_FROM_DATE); - - // Get all the membershipList where memberFromDate equals to UPDATED_MEMBER_FROM_DATE - defaultMembershipShouldNotBeFound("memberFromDate.equals=" + UPDATED_MEMBER_FROM_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByMemberFromDateIsInShouldWork() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where memberFromDate in DEFAULT_MEMBER_FROM_DATE or UPDATED_MEMBER_FROM_DATE - defaultMembershipShouldBeFound("memberFromDate.in=" + DEFAULT_MEMBER_FROM_DATE + "," + UPDATED_MEMBER_FROM_DATE); - - // Get all the membershipList where memberFromDate equals to UPDATED_MEMBER_FROM_DATE - defaultMembershipShouldNotBeFound("memberFromDate.in=" + UPDATED_MEMBER_FROM_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByMemberFromDateIsNullOrNotNull() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where memberFromDate is not null - defaultMembershipShouldBeFound("memberFromDate.specified=true"); - - // Get all the membershipList where memberFromDate is null - defaultMembershipShouldNotBeFound("memberFromDate.specified=false"); - } - - @Test - @Transactional - public void getAllMembershipsByMemberFromDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where memberFromDate greater than or equals to DEFAULT_MEMBER_FROM_DATE - defaultMembershipShouldBeFound("memberFromDate.greaterOrEqualThan=" + DEFAULT_MEMBER_FROM_DATE); - - // Get all the membershipList where memberFromDate greater than or equals to UPDATED_MEMBER_FROM_DATE - defaultMembershipShouldNotBeFound("memberFromDate.greaterOrEqualThan=" + UPDATED_MEMBER_FROM_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByMemberFromDateIsLessThanSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where memberFromDate less than or equals to DEFAULT_MEMBER_FROM_DATE - defaultMembershipShouldNotBeFound("memberFromDate.lessThan=" + DEFAULT_MEMBER_FROM_DATE); - - // Get all the membershipList where memberFromDate less than or equals to UPDATED_MEMBER_FROM_DATE - defaultMembershipShouldBeFound("memberFromDate.lessThan=" + UPDATED_MEMBER_FROM_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByMemberUntilDateIsEqualToSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where memberUntilDate equals to DEFAULT_MEMBER_UNTIL_DATE - defaultMembershipShouldBeFound("memberUntilDate.equals=" + DEFAULT_MEMBER_UNTIL_DATE); - - // Get all the membershipList where memberUntilDate equals to UPDATED_MEMBER_UNTIL_DATE - defaultMembershipShouldNotBeFound("memberUntilDate.equals=" + UPDATED_MEMBER_UNTIL_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByMemberUntilDateIsInShouldWork() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where memberUntilDate in DEFAULT_MEMBER_UNTIL_DATE or UPDATED_MEMBER_UNTIL_DATE - defaultMembershipShouldBeFound("memberUntilDate.in=" + DEFAULT_MEMBER_UNTIL_DATE + "," + UPDATED_MEMBER_UNTIL_DATE); - - // Get all the membershipList where memberUntilDate equals to UPDATED_MEMBER_UNTIL_DATE - defaultMembershipShouldNotBeFound("memberUntilDate.in=" + UPDATED_MEMBER_UNTIL_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByMemberUntilDateIsNullOrNotNull() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where memberUntilDate is not null - defaultMembershipShouldBeFound("memberUntilDate.specified=true"); - - // Get all the membershipList where memberUntilDate is null - defaultMembershipShouldNotBeFound("memberUntilDate.specified=false"); - } - - @Test - @Transactional - public void getAllMembershipsByMemberUntilDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where memberUntilDate greater than or equals to DEFAULT_MEMBER_UNTIL_DATE - defaultMembershipShouldBeFound("memberUntilDate.greaterOrEqualThan=" + DEFAULT_MEMBER_UNTIL_DATE); - - // Get all the membershipList where memberUntilDate greater than or equals to UPDATED_MEMBER_UNTIL_DATE - defaultMembershipShouldNotBeFound("memberUntilDate.greaterOrEqualThan=" + UPDATED_MEMBER_UNTIL_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByMemberUntilDateIsLessThanSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where memberUntilDate less than or equals to DEFAULT_MEMBER_UNTIL_DATE - defaultMembershipShouldNotBeFound("memberUntilDate.lessThan=" + DEFAULT_MEMBER_UNTIL_DATE); - - // Get all the membershipList where memberUntilDate less than or equals to UPDATED_MEMBER_UNTIL_DATE - defaultMembershipShouldBeFound("memberUntilDate.lessThan=" + UPDATED_MEMBER_UNTIL_DATE); - } - - @Test - @Transactional - public void getAllMembershipsByRemarkIsEqualToSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where remark equals to DEFAULT_REMARK - defaultMembershipShouldBeFound("remark.equals=" + DEFAULT_REMARK); - - // Get all the membershipList where remark equals to UPDATED_REMARK - defaultMembershipShouldNotBeFound("remark.equals=" + UPDATED_REMARK); - } - - @Test - @Transactional - public void getAllMembershipsByRemarkIsInShouldWork() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where remark in DEFAULT_REMARK or UPDATED_REMARK - defaultMembershipShouldBeFound("remark.in=" + DEFAULT_REMARK + "," + UPDATED_REMARK); - - // Get all the membershipList where remark equals to UPDATED_REMARK - defaultMembershipShouldNotBeFound("remark.in=" + UPDATED_REMARK); - } - - @Test - @Transactional - public void getAllMembershipsByRemarkIsNullOrNotNull() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - // Get all the membershipList where remark is not null - defaultMembershipShouldBeFound("remark.specified=true"); - - // Get all the membershipList where remark is null - defaultMembershipShouldNotBeFound("remark.specified=false"); - } - - @Test - @Transactional - public void getAllMembershipsByShareIsEqualToSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - Share share = ShareResourceIntTest.createPersistentEntity(em, membership); - - Long shareId = share.getId(); - - // Get all the membershipList where share equals to shareId - defaultMembershipShouldBeFound("shareId.equals=" + shareId); - - // Get all the membershipList where share equals to shareId + 1 - defaultMembershipShouldNotBeFound("shareId.equals=" + (shareId + 1)); - } - - @Test - @Transactional - public void getAllMembershipsByAssetIsEqualToSomething() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - Asset asset = AssetResourceIntTest.createPersistentEntity(em, membership); - - Long assetId = asset.getId(); - - // Get all the membershipList where asset equals to assetId - defaultMembershipShouldBeFound("assetId.equals=" + assetId); - - // Get all the membershipList where asset equals to assetId + 1 - defaultMembershipShouldNotBeFound("assetId.equals=" + (assetId + 1)); - } - - @Test - @Transactional - public void getAllMembershipsByCustomerIsEqualToSomething() throws Exception { - // Initialize the database - Customer customer = CustomerResourceIntTest.createPersistentEntity(em); - membership.setCustomer(customer); - membershipRepository.saveAndFlush(membership); - Long customerId = customer.getId(); - - // Get all the membershipList where customer equals to customerId - defaultMembershipShouldBeFound("customerId.equals=" + customerId); - - // Get all the membershipList where customer equals to customerId + 1 - defaultMembershipShouldNotBeFound("customerId.equals=" + (customerId + 1)); - } - - /** - * Executes the search, and checks that the default entity is returned - */ - private void defaultMembershipShouldBeFound(String filter) throws Exception { - restMembershipMockMvc.perform(get("/api/memberships?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].id").value(hasItem(membership.getId().intValue()))) - .andExpect(jsonPath("$.[*].admissionDocumentDate").value(hasItem(DEFAULT_ADMISSION_DOCUMENT_DATE.toString()))) - .andExpect( - jsonPath("$.[*].cancellationDocumentDate") - .value(hasItem(DEFAULT_CANCELLATION_DOCUMENT_DATE.toString()))) - .andExpect(jsonPath("$.[*].memberFromDate").value(hasItem(DEFAULT_MEMBER_FROM_DATE.toString()))) - .andExpect(jsonPath("$.[*].memberUntilDate").value(hasItem(DEFAULT_MEMBER_UNTIL_DATE.toString()))) - .andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK))); - - // Check, that the count call also returns 1 - restMembershipMockMvc.perform(get("/api/memberships/count?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(content().string("1")); - } - - /** - * Executes the search, and checks that the default entity is not returned - */ - private void defaultMembershipShouldNotBeFound(String filter) throws Exception { - restMembershipMockMvc.perform(get("/api/memberships?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$").isArray()) - .andExpect(jsonPath("$").isEmpty()); - - // Check, that the count call also returns 0 - restMembershipMockMvc.perform(get("/api/memberships/count?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(content().string("0")); - } - - @Test - @Transactional - public void getNonExistingMembership() throws Exception { - // Get the membership - restMembershipMockMvc.perform(get("/api/memberships/{id}", Long.MAX_VALUE)) - .andExpect(status().isNotFound()); - } - - @Test - @Transactional - public void updateMembership() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - int databaseSizeBeforeUpdate = membershipRepository.findAll().size(); - - // Update the membership - Membership updatedMembership = membershipRepository.findById(membership.getId()).get(); - // Disconnect from session so that the updates on updatedMembership are not directly saved in db - em.detach(updatedMembership); - updatedMembership - .cancellationDocumentDate(UPDATED_CANCELLATION_DOCUMENT_DATE) - .memberUntilDate(UPDATED_MEMBER_UNTIL_DATE) - .remark(UPDATED_REMARK); - MembershipDTO membershipDTO = membershipMapper.toDto(updatedMembership); - - restMembershipMockMvc.perform( - put("/api/memberships") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(membershipDTO))) - .andExpect(status().isOk()); - - // Validate the Membership in the database - List membershipList = membershipRepository.findAll(); - assertThat(membershipList).hasSize(databaseSizeBeforeUpdate); - Membership testMembership = membershipList.get(membershipList.size() - 1); - assertThat(testMembership.getAdmissionDocumentDate()).isEqualTo(DEFAULT_ADMISSION_DOCUMENT_DATE); - assertThat(testMembership.getCancellationDocumentDate()).isEqualTo(UPDATED_CANCELLATION_DOCUMENT_DATE); - assertThat(testMembership.getMemberFromDate()).isEqualTo(DEFAULT_MEMBER_FROM_DATE); - assertThat(testMembership.getMemberUntilDate()).isEqualTo(UPDATED_MEMBER_UNTIL_DATE); - assertThat(testMembership.getRemark()).isEqualTo(UPDATED_REMARK); - } - - @Test - @Transactional - public void updateNonExistingMembership() throws Exception { - int databaseSizeBeforeUpdate = membershipRepository.findAll().size(); - - // Create the Membership - MembershipDTO membershipDTO = membershipMapper.toDto(membership); - - // If the entity doesn't have an ID, it will throw BadRequestAlertException - restMembershipMockMvc.perform( - put("/api/memberships") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(membershipDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Membership in the database - List membershipList = membershipRepository.findAll(); - assertThat(membershipList).hasSize(databaseSizeBeforeUpdate); - } - - @Test - @Transactional - public void deleteMembership() throws Exception { - // Initialize the database - membershipRepository.saveAndFlush(membership); - - int databaseSizeBeforeDelete = membershipRepository.findAll().size(); - - // Delete the membership - restMembershipMockMvc.perform( - delete("/api/memberships/{id}", membership.getId()) - .accept(TestUtil.APPLICATION_JSON_UTF8)) - .andExpect(status().isBadRequest()); - - // Validate the database is unchanged - List membershipList = membershipRepository.findAll(); - assertThat(membershipList).hasSize(databaseSizeBeforeDelete); - } - - @Test - @Transactional - public void equalsVerifier() throws Exception { - TestUtil.equalsVerifier(Membership.class); - Membership membership1 = new Membership(); - membership1.setId(1L); - Membership membership2 = new Membership(); - membership2.setId(membership1.getId()); - assertThat(membership1).isEqualTo(membership2); - membership2.setId(2L); - assertThat(membership1).isNotEqualTo(membership2); - membership1.setId(null); - assertThat(membership1).isNotEqualTo(membership2); - } - - @Test - @Transactional - public void dtoEqualsVerifier() throws Exception { - TestUtil.equalsVerifier(MembershipDTO.class); - MembershipDTO membershipDTO1 = new MembershipDTO(); - membershipDTO1.setId(1L); - MembershipDTO membershipDTO2 = new MembershipDTO(); - assertThat(membershipDTO1).isNotEqualTo(membershipDTO2); - membershipDTO2.setId(membershipDTO1.getId()); - assertThat(membershipDTO1).isEqualTo(membershipDTO2); - membershipDTO2.setId(2L); - assertThat(membershipDTO1).isNotEqualTo(membershipDTO2); - membershipDTO1.setId(null); - assertThat(membershipDTO1).isNotEqualTo(membershipDTO2); - } - - @Test - @Transactional - public void testEntityFromId() { - assertThat(membershipMapper.fromId(42L).getId()).isEqualTo(42); - assertThat(membershipMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/MembershipResourceUnitTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/MembershipResourceUnitTest.java deleted file mode 100644 index 89db87df..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/MembershipResourceUnitTest.java +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.ThrowableAssert.catchThrowable; - -import org.hostsharing.hsadminng.service.dto.MembershipDTO; -import org.hostsharing.hsadminng.service.dto.MembershipDTOUnitTest; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.junit.Rule; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -// Currently this class tests mostly special 'bad paths' -// which make little sense to test in *ResourceIntTest. -public class MembershipResourceUnitTest { - - @Rule - public MockitoRule mockitoRule = MockitoJUnit.rule(); - - @InjectMocks - private MembershipResource membershipResource; - - @Test - public void createSepaMandateWithoutIdThrowsBadRequestException() { - - // given - final MembershipDTO givenDto = MembershipDTOUnitTest.createRandomDTO(null, 1L); - - // when - final Throwable actual = catchThrowable(() -> membershipResource.updateMembership(givenDto)); - - // then - assertThat(actual).isInstanceOfSatisfying(BadRequestAlertException.class, bre -> { - assertThat(bre.getErrorKey()).isEqualTo("idnull"); - assertThat(bre.getParam()).isEqualTo("membership"); - }); - } - - @Test - public void createSepaMandateWithIdThrowsBadRequestException() { - - // given - final MembershipDTO givenDto = MembershipDTOUnitTest.createRandomDTO(2L, 1L); - - // when - final Throwable actual = catchThrowable(() -> membershipResource.createMembership(givenDto)); - - // then - assertThat(actual).isInstanceOfSatisfying(BadRequestAlertException.class, bre -> { - assertThat(bre.getErrorKey()).isEqualTo("idexists"); - assertThat(bre.getParam()).isEqualTo("membership"); - }); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/SepaMandateResourceIntTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/SepaMandateResourceIntTest.java deleted file mode 100644 index 565b058d..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/SepaMandateResourceIntTest.java +++ /dev/null @@ -1,1009 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.hamcrest.Matchers.hasItem; -import static org.hostsharing.hsadminng.web.rest.TestUtil.createFormattingConversionService; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.Customer; -import org.hostsharing.hsadminng.domain.SepaMandate; -import org.hostsharing.hsadminng.repository.SepaMandateRepository; -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.SepaMandateQueryService; -import org.hostsharing.hsadminng.service.SepaMandateService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextMock; -import org.hostsharing.hsadminng.service.dto.SepaMandateDTO; -import org.hostsharing.hsadminng.service.mapper.SepaMandateMapper; -import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.MockitoAnnotations; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.data.web.PageableHandlerMethodArgumentResolver; -import org.springframework.http.MediaType; -import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.validation.Validator; - -import java.time.LocalDate; -import java.time.ZoneId; -import java.util.List; - -import javax.persistence.EntityManager; - -/** - * Test class for the SepaMandateResource REST controller. - * - * @see SepaMandateResource - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class SepaMandateResourceIntTest { - - private static final String DEFAULT_REFERENCE = "AAAAAAAAAA"; - private static final String UPDATED_REFERENCE = "BBBBBBBBBB"; - - private static final String DEFAULT_IBAN = "AAAAAAAAAA"; - private static final String UPDATED_IBAN = "BBBBBBBBBB"; - - private static final String DEFAULT_BIC = "AAAAAAAAAA"; - private static final String UPDATED_BIC = "BBBBBBBBBB"; - - private static final LocalDate DEFAULT_VALID_FROM_DATE = LocalDate.ofEpochDay(0L); - private static final LocalDate UPDATED_VALID_FROM_DATE = LocalDate.now(ZoneId.systemDefault()); - - private static final LocalDate DEFAULT_VALID_UNTIL_DATE = LocalDate.ofEpochDay(0L); - private static final LocalDate UPDATED_VALID_UNTIL_DATE = LocalDate.now(ZoneId.systemDefault()); - - private static final LocalDate DEFAULT_GRANTING_DOCUMENT_DATE = LocalDate.ofEpochDay(0L); - private static final LocalDate UPDATED_GRANTING_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault()); - - private static final LocalDate DEFAULT_REVOKATION_DOCUMENT_DATE = LocalDate.ofEpochDay(0L); - private static final LocalDate UPDATED_REVOKATION_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault()); - - private static final LocalDate DEFAULT_LAST_USED_DATE = LocalDate.ofEpochDay(0L); - private static final LocalDate UPDATED_LAST_USED_DATE = LocalDate.now(ZoneId.systemDefault()); - - private static final String DEFAULT_REMARK = "AAAAAAAAAA"; - private static final String UPDATED_REMARK = "BBBBBBBBBB"; - - @Autowired - private SepaMandateRepository sepaMandateRepository; - - @Autowired - private SepaMandateMapper sepaMandateMapper; - - @Autowired - private SepaMandateService sepaMandateService; - - @Autowired - private SepaMandateQueryService sepaMandateQueryService; - - @Autowired - private MappingJackson2HttpMessageConverter jacksonMessageConverter; - - @Autowired - private PageableHandlerMethodArgumentResolver pageableArgumentResolver; - - @Autowired - private ExceptionTranslator exceptionTranslator; - - @Autowired - private EntityManager em; - - @Autowired - private Validator validator; - - @MockBean - private UserRoleAssignmentService userRoleAssignmentService; - - private MockMvc restSepaMandateMockMvc; - - private SepaMandate sepaMandate; - - @Before - public void setup() { - SecurityContextMock.usingMock(userRoleAssignmentService) - .havingAuthenticatedUser() - .withAuthority(AuthoritiesConstants.ADMIN); - - MockitoAnnotations.initMocks(this); - final SepaMandateResource sepaMandateResource = new SepaMandateResource(sepaMandateService, sepaMandateQueryService); - this.restSepaMandateMockMvc = MockMvcBuilders.standaloneSetup(sepaMandateResource) - .setCustomArgumentResolvers(pageableArgumentResolver) - .setControllerAdvice(exceptionTranslator) - .setConversionService(createFormattingConversionService()) - .setMessageConverters(jacksonMessageConverter) - .setValidator(validator) - .build(); - } - - /** - * Create an entity for this test. - *

- * This is a static method, as tests for other entities might also need it, - * if they test an entity which requires the current entity. - */ - public static SepaMandate createEntity(EntityManager em) { - SepaMandate sepaMandate = new SepaMandate() - .reference(DEFAULT_REFERENCE) - .iban(DEFAULT_IBAN) - .bic(DEFAULT_BIC) - .grantingDocumentDate(DEFAULT_GRANTING_DOCUMENT_DATE) - .revokationDocumentDate(DEFAULT_REVOKATION_DOCUMENT_DATE) - .validFromDate(DEFAULT_VALID_FROM_DATE) - .validUntilDate(DEFAULT_VALID_UNTIL_DATE) - .lastUsedDate(DEFAULT_LAST_USED_DATE) - .remark(DEFAULT_REMARK); - // Add required entity - Customer customer = CustomerResourceIntTest.createEntity(em); - em.persist(customer); - em.flush(); - sepaMandate.setCustomer(customer); - return sepaMandate; - } - - /** - * Create an entity for tests with a specific customer. - *

- * This is a static method, as tests for other entities might also need it, - * if they test an entity which requires the current entity. - */ - public static SepaMandate createEntity(EntityManager em, final Customer customer) { - SepaMandate sepaMandate = new SepaMandate() - .reference(DEFAULT_REFERENCE) - .iban(DEFAULT_IBAN) - .bic(DEFAULT_BIC) - .grantingDocumentDate(DEFAULT_GRANTING_DOCUMENT_DATE) - .validFromDate(DEFAULT_VALID_FROM_DATE) - .validUntilDate(DEFAULT_VALID_UNTIL_DATE) - .lastUsedDate(DEFAULT_LAST_USED_DATE) - .revokationDocumentDate(DEFAULT_REVOKATION_DOCUMENT_DATE) - .remark(DEFAULT_REMARK); - // Add required entity - sepaMandate.setCustomer(customer); - return sepaMandate; - } - - @Before - public void initTest() { - sepaMandate = createEntity(em); - } - - @Test - @Transactional - public void createSepaMandate() throws Exception { - int databaseSizeBeforeCreate = sepaMandateRepository.findAll().size(); - - // Create the SepaMandate - SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate); - sepaMandateDTO.setCustomerDisplayLabel(null); - sepaMandateDTO.setRemark(null); - sepaMandateDTO.setRevokationDocumentDate(null); - sepaMandateDTO.setLastUsedDate(null); - - restSepaMandateMockMvc.perform( - post("/api/sepa-mandates") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(sepaMandateDTO))) - .andExpect(status().isCreated()); - - // Validate the SepaMandate in the database - List sepaMandateList = sepaMandateRepository.findAll(); - assertThat(sepaMandateList).hasSize(databaseSizeBeforeCreate + 1); - SepaMandate testSepaMandate = sepaMandateList.get(sepaMandateList.size() - 1); - assertThat(testSepaMandate.getReference()).isEqualTo(DEFAULT_REFERENCE); - assertThat(testSepaMandate.getIban()).isEqualTo(DEFAULT_IBAN); - assertThat(testSepaMandate.getBic()).isEqualTo(DEFAULT_BIC); - assertThat(testSepaMandate.getGrantingDocumentDate()).isEqualTo(DEFAULT_GRANTING_DOCUMENT_DATE); - assertThat(testSepaMandate.getRevokationDocumentDate()).isNull(); - assertThat(testSepaMandate.getValidFromDate()).isEqualTo(DEFAULT_VALID_FROM_DATE); - assertThat(testSepaMandate.getValidUntilDate()).isEqualTo(DEFAULT_VALID_UNTIL_DATE); - assertThat(testSepaMandate.getLastUsedDate()).isNull(); - assertThat(testSepaMandate.getRemark()).isNull(); - } - - @Test - @Transactional - public void createSepaMandateWithExistingId() throws Exception { - int databaseSizeBeforeCreate = sepaMandateRepository.findAll().size(); - - // Create the SepaMandate with an existing ID - sepaMandate.setId(1L); - SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate); - - // An entity with an existing ID cannot be created, so this API call must fail - restSepaMandateMockMvc.perform( - post("/api/sepa-mandates") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(sepaMandateDTO))) - .andExpect(status().isBadRequest()); - - // Validate the SepaMandate in the database - List sepaMandateList = sepaMandateRepository.findAll(); - assertThat(sepaMandateList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void checkReferenceIsRequired() throws Exception { - int databaseSizeBeforeTest = sepaMandateRepository.findAll().size(); - // set the field null - sepaMandate.setReference(null); - - // Create the SepaMandate, which fails. - SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate); - - restSepaMandateMockMvc.perform( - post("/api/sepa-mandates") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(sepaMandateDTO))) - .andExpect(status().isBadRequest()); - - List sepaMandateList = sepaMandateRepository.findAll(); - assertThat(sepaMandateList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkGrantingDocumentDateIsRequired() throws Exception { - int databaseSizeBeforeTest = sepaMandateRepository.findAll().size(); - // set the field null - sepaMandate.setGrantingDocumentDate(null); - - // Create the SepaMandate, which fails. - SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate); - - restSepaMandateMockMvc.perform( - post("/api/sepa-mandates") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(sepaMandateDTO))) - .andExpect(status().isBadRequest()); - - List sepaMandateList = sepaMandateRepository.findAll(); - assertThat(sepaMandateList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkValidFromDateIsRequired() throws Exception { - int databaseSizeBeforeTest = sepaMandateRepository.findAll().size(); - // set the field null - sepaMandate.setValidFromDate(null); - - // Create the SepaMandate, which fails. - SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate); - - restSepaMandateMockMvc.perform( - post("/api/sepa-mandates") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(sepaMandateDTO))) - .andExpect(status().isBadRequest()); - - List sepaMandateList = sepaMandateRepository.findAll(); - assertThat(sepaMandateList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void getAllSepaMandates() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList - restSepaMandateMockMvc.perform(get("/api/sepa-mandates?sort=id,desc")) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].id").value(hasItem(sepaMandate.getId().intValue()))) - .andExpect(jsonPath("$.[*].reference").value(hasItem(DEFAULT_REFERENCE))) - .andExpect(jsonPath("$.[*].iban").value(hasItem(DEFAULT_IBAN))) - .andExpect(jsonPath("$.[*].bic").value(hasItem(DEFAULT_BIC))) - .andExpect(jsonPath("$.[*].grantingDocumentDate").value(hasItem(DEFAULT_GRANTING_DOCUMENT_DATE.toString()))) - .andExpect(jsonPath("$.[*].revokationDocumentDate").value(hasItem(DEFAULT_REVOKATION_DOCUMENT_DATE.toString()))) - .andExpect(jsonPath("$.[*].validFromDate").value(hasItem(DEFAULT_VALID_FROM_DATE.toString()))) - .andExpect(jsonPath("$.[*].validUntilDate").value(hasItem(DEFAULT_VALID_UNTIL_DATE.toString()))) - .andExpect(jsonPath("$.[*].lastUsedDate").value(hasItem(DEFAULT_LAST_USED_DATE.toString()))) - .andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK))); - } - - @Test - @Transactional - public void getSepaMandate() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get the sepaMandate - restSepaMandateMockMvc.perform(get("/api/sepa-mandates/{id}", sepaMandate.getId())) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.id").value(sepaMandate.getId().intValue())) - .andExpect(jsonPath("$.reference").value(DEFAULT_REFERENCE)) - .andExpect(jsonPath("$.iban").value(DEFAULT_IBAN)) - .andExpect(jsonPath("$.bic").value(DEFAULT_BIC)) - .andExpect(jsonPath("$.grantingDocumentDate").value(DEFAULT_GRANTING_DOCUMENT_DATE.toString())) - .andExpect(jsonPath("$.revokationDocumentDate").value(DEFAULT_REVOKATION_DOCUMENT_DATE.toString())) - .andExpect(jsonPath("$.validFromDate").value(DEFAULT_VALID_FROM_DATE.toString())) - .andExpect(jsonPath("$.validUntilDate").value(DEFAULT_VALID_UNTIL_DATE.toString())) - .andExpect(jsonPath("$.lastUsedDate").value(DEFAULT_LAST_USED_DATE.toString())) - .andExpect(jsonPath("$.remark").value(DEFAULT_REMARK)); - } - - @Test - @Transactional - public void getAllSepaMandatesByReferenceIsEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where reference equals to DEFAULT_REFERENCE - defaultSepaMandateShouldBeFound("reference.equals=" + DEFAULT_REFERENCE); - - // Get all the sepaMandateList where reference equals to UPDATED_REFERENCE - defaultSepaMandateShouldNotBeFound("reference.equals=" + UPDATED_REFERENCE); - } - - @Test - @Transactional - public void getAllSepaMandatesByReferenceIsInShouldWork() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where reference in DEFAULT_REFERENCE or UPDATED_REFERENCE - defaultSepaMandateShouldBeFound("reference.in=" + DEFAULT_REFERENCE + "," + UPDATED_REFERENCE); - - // Get all the sepaMandateList where reference equals to UPDATED_REFERENCE - defaultSepaMandateShouldNotBeFound("reference.in=" + UPDATED_REFERENCE); - } - - @Test - @Transactional - public void getAllSepaMandatesByReferenceIsNullOrNotNull() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where reference is not null - defaultSepaMandateShouldBeFound("reference.specified=true"); - - // Get all the sepaMandateList where reference is null - defaultSepaMandateShouldNotBeFound("reference.specified=false"); - } - - @Test - @Transactional - public void getAllSepaMandatesByIbanIsEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where iban equals to DEFAULT_IBAN - defaultSepaMandateShouldBeFound("iban.equals=" + DEFAULT_IBAN); - - // Get all the sepaMandateList where iban equals to UPDATED_IBAN - defaultSepaMandateShouldNotBeFound("iban.equals=" + UPDATED_IBAN); - } - - @Test - @Transactional - public void getAllSepaMandatesByIbanIsInShouldWork() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where iban in DEFAULT_IBAN or UPDATED_IBAN - defaultSepaMandateShouldBeFound("iban.in=" + DEFAULT_IBAN + "," + UPDATED_IBAN); - - // Get all the sepaMandateList where iban equals to UPDATED_IBAN - defaultSepaMandateShouldNotBeFound("iban.in=" + UPDATED_IBAN); - } - - @Test - @Transactional - public void getAllSepaMandatesByIbanIsNullOrNotNull() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where iban is not null - defaultSepaMandateShouldBeFound("iban.specified=true"); - - // Get all the sepaMandateList where iban is null - defaultSepaMandateShouldNotBeFound("iban.specified=false"); - } - - @Test - @Transactional - public void getAllSepaMandatesByBicIsEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where bic equals to DEFAULT_BIC - defaultSepaMandateShouldBeFound("bic.equals=" + DEFAULT_BIC); - - // Get all the sepaMandateList where bic equals to UPDATED_BIC - defaultSepaMandateShouldNotBeFound("bic.equals=" + UPDATED_BIC); - } - - @Test - @Transactional - public void getAllSepaMandatesByBicIsInShouldWork() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where bic in DEFAULT_BIC or UPDATED_BIC - defaultSepaMandateShouldBeFound("bic.in=" + DEFAULT_BIC + "," + UPDATED_BIC); - - // Get all the sepaMandateList where bic equals to UPDATED_BIC - defaultSepaMandateShouldNotBeFound("bic.in=" + UPDATED_BIC); - } - - @Test - @Transactional - public void getAllSepaMandatesByBicIsNullOrNotNull() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where bic is not null - defaultSepaMandateShouldBeFound("bic.specified=true"); - - // Get all the sepaMandateList where bic is null - defaultSepaMandateShouldNotBeFound("bic.specified=false"); - } - - @Test - @Transactional - public void getAllSepaMandatesByGrantingDocumentDateIsEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where grantingDocumentDate equals to DEFAULT_GRANTING_DOCUMENT_DATE - defaultSepaMandateShouldBeFound("grantingDocumentDate.equals=" + DEFAULT_GRANTING_DOCUMENT_DATE); - - // Get all the sepaMandateList where grantingDocumentDate equals to UPDATED_GRANTING_DOCUMENT_DATE - defaultSepaMandateShouldNotBeFound("grantingDocumentDate.equals=" + UPDATED_GRANTING_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByGrantingDocumentDateIsInShouldWork() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where grantingDocumentDate in DEFAULT_GRANTING_DOCUMENT_DATE or - // UPDATED_GRANTING_DOCUMENT_DATE - defaultSepaMandateShouldBeFound( - "grantingDocumentDate.in=" + DEFAULT_GRANTING_DOCUMENT_DATE + "," + UPDATED_GRANTING_DOCUMENT_DATE); - - // Get all the sepaMandateList where grantingDocumentDate equals to UPDATED_GRANTING_DOCUMENT_DATE - defaultSepaMandateShouldNotBeFound("grantingDocumentDate.in=" + UPDATED_GRANTING_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByGrantingDocumentDateIsNullOrNotNull() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where grantingDocumentDate is not null - defaultSepaMandateShouldBeFound("grantingDocumentDate.specified=true"); - - // Get all the sepaMandateList where grantingDocumentDate is null - defaultSepaMandateShouldNotBeFound("grantingDocumentDate.specified=false"); - } - - @Test - @Transactional - public void getAllSepaMandatesByGrantingDocumentDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where grantingDocumentDate greater than or equals to DEFAULT_GRANTING_DOCUMENT_DATE - defaultSepaMandateShouldBeFound("grantingDocumentDate.greaterOrEqualThan=" + DEFAULT_GRANTING_DOCUMENT_DATE); - - // Get all the sepaMandateList where grantingDocumentDate greater than or equals to UPDATED_GRANTING_DOCUMENT_DATE - defaultSepaMandateShouldNotBeFound("grantingDocumentDate.greaterOrEqualThan=" + UPDATED_GRANTING_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByGrantingDocumentDateIsLessThanSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where grantingDocumentDate less than or equals to DEFAULT_GRANTING_DOCUMENT_DATE - defaultSepaMandateShouldNotBeFound("grantingDocumentDate.lessThan=" + DEFAULT_GRANTING_DOCUMENT_DATE); - - // Get all the sepaMandateList where grantingDocumentDate less than or equals to UPDATED_GRANTING_DOCUMENT_DATE - defaultSepaMandateShouldBeFound("grantingDocumentDate.lessThan=" + UPDATED_GRANTING_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByRevokationDocumentDateIsEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where revokationDocumentDate equals to DEFAULT_REVOKATION_DOCUMENT_DATE - defaultSepaMandateShouldBeFound("revokationDocumentDate.equals=" + DEFAULT_REVOKATION_DOCUMENT_DATE); - - // Get all the sepaMandateList where revokationDocumentDate equals to UPDATED_REVOKATION_DOCUMENT_DATE - defaultSepaMandateShouldNotBeFound("revokationDocumentDate.equals=" + UPDATED_REVOKATION_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByRevokationDocumentDateIsInShouldWork() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where revokationDocumentDate in DEFAULT_REVOKATION_DOCUMENT_DATE or - // UPDATED_REVOKATION_DOCUMENT_DATE - defaultSepaMandateShouldBeFound( - "revokationDocumentDate.in=" + DEFAULT_REVOKATION_DOCUMENT_DATE + "," + UPDATED_REVOKATION_DOCUMENT_DATE); - - // Get all the sepaMandateList where revokationDocumentDate equals to UPDATED_REVOKATION_DOCUMENT_DATE - defaultSepaMandateShouldNotBeFound("revokationDocumentDate.in=" + UPDATED_REVOKATION_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByRevokationDocumentDateIsNullOrNotNull() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where revokationDocumentDate is not null - defaultSepaMandateShouldBeFound("revokationDocumentDate.specified=true"); - - // Get all the sepaMandateList where revokationDocumentDate is null - defaultSepaMandateShouldNotBeFound("revokationDocumentDate.specified=false"); - } - - @Test - @Transactional - public void getAllSepaMandatesByRevokationDocumentDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where revokationDocumentDate greater than or equals to DEFAULT_REVOKATION_DOCUMENT_DATE - defaultSepaMandateShouldBeFound("revokationDocumentDate.greaterOrEqualThan=" + DEFAULT_REVOKATION_DOCUMENT_DATE); - - // Get all the sepaMandateList where revokationDocumentDate greater than or equals to UPDATED_REVOKATION_DOCUMENT_DATE - defaultSepaMandateShouldNotBeFound("revokationDocumentDate.greaterOrEqualThan=" + UPDATED_REVOKATION_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByRevokationDocumentDateIsLessThanSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where revokationDocumentDate less than or equals to DEFAULT_REVOKATION_DOCUMENT_DATE - defaultSepaMandateShouldNotBeFound("revokationDocumentDate.lessThan=" + DEFAULT_REVOKATION_DOCUMENT_DATE); - - // Get all the sepaMandateList where revokationDocumentDate less than or equals to UPDATED_REVOKATION_DOCUMENT_DATE - defaultSepaMandateShouldBeFound("revokationDocumentDate.lessThan=" + UPDATED_REVOKATION_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByValidFromDateIsEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where validFromDate equals to DEFAULT_VALID_FROM_DATE - defaultSepaMandateShouldBeFound("validFromDate.equals=" + DEFAULT_VALID_FROM_DATE); - - // Get all the sepaMandateList where validFromDate equals to UPDATED_VALID_FROM_DATE - defaultSepaMandateShouldNotBeFound("validFromDate.equals=" + UPDATED_VALID_FROM_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByValidFromDateIsInShouldWork() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where validFromDate in DEFAULT_VALID_FROM_DATE or UPDATED_VALID_FROM_DATE - defaultSepaMandateShouldBeFound("validFromDate.in=" + DEFAULT_VALID_FROM_DATE + "," + UPDATED_VALID_FROM_DATE); - - // Get all the sepaMandateList where validFromDate equals to UPDATED_VALID_FROM_DATE - defaultSepaMandateShouldNotBeFound("validFromDate.in=" + UPDATED_VALID_FROM_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByValidFromDateIsNullOrNotNull() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where validFromDate is not null - defaultSepaMandateShouldBeFound("validFromDate.specified=true"); - - // Get all the sepaMandateList where validFromDate is null - defaultSepaMandateShouldNotBeFound("validFromDate.specified=false"); - } - - @Test - @Transactional - public void getAllSepaMandatesByValidFromDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where validFromDate greater than or equals to DEFAULT_VALID_FROM_DATE - defaultSepaMandateShouldBeFound("validFromDate.greaterOrEqualThan=" + DEFAULT_VALID_FROM_DATE); - - // Get all the sepaMandateList where validFromDate greater than or equals to UPDATED_VALID_FROM_DATE - defaultSepaMandateShouldNotBeFound("validFromDate.greaterOrEqualThan=" + UPDATED_VALID_FROM_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByValidFromDateIsLessThanSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where validFromDate less than or equals to DEFAULT_VALID_FROM_DATE - defaultSepaMandateShouldNotBeFound("validFromDate.lessThan=" + DEFAULT_VALID_FROM_DATE); - - // Get all the sepaMandateList where validFromDate less than or equals to UPDATED_VALID_FROM_DATE - defaultSepaMandateShouldBeFound("validFromDate.lessThan=" + UPDATED_VALID_FROM_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByValidUntilDateIsEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where validUntilDate equals to DEFAULT_VALID_UNTIL_DATE - defaultSepaMandateShouldBeFound("validUntilDate.equals=" + DEFAULT_VALID_UNTIL_DATE); - - // Get all the sepaMandateList where validUntilDate equals to UPDATED_VALID_UNTIL_DATE - defaultSepaMandateShouldNotBeFound("validUntilDate.equals=" + UPDATED_VALID_UNTIL_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByValidUntilDateIsInShouldWork() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where validUntilDate in DEFAULT_VALID_UNTIL_DATE or UPDATED_VALID_UNTIL_DATE - defaultSepaMandateShouldBeFound("validUntilDate.in=" + DEFAULT_VALID_UNTIL_DATE + "," + UPDATED_VALID_UNTIL_DATE); - - // Get all the sepaMandateList where validUntilDate equals to UPDATED_VALID_UNTIL_DATE - defaultSepaMandateShouldNotBeFound("validUntilDate.in=" + UPDATED_VALID_UNTIL_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByValidUntilDateIsNullOrNotNull() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where validUntilDate is not null - defaultSepaMandateShouldBeFound("validUntilDate.specified=true"); - - // Get all the sepaMandateList where validUntilDate is null - defaultSepaMandateShouldNotBeFound("validUntilDate.specified=false"); - } - - @Test - @Transactional - public void getAllSepaMandatesByValidUntilDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where validUntilDate greater than or equals to DEFAULT_VALID_UNTIL_DATE - defaultSepaMandateShouldBeFound("validUntilDate.greaterOrEqualThan=" + DEFAULT_VALID_UNTIL_DATE); - - // Get all the sepaMandateList where validUntilDate greater than or equals to UPDATED_VALID_UNTIL_DATE - defaultSepaMandateShouldNotBeFound("validUntilDate.greaterOrEqualThan=" + UPDATED_VALID_UNTIL_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByValidUntilDateIsLessThanSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where validUntilDate less than or equals to DEFAULT_VALID_UNTIL_DATE - defaultSepaMandateShouldNotBeFound("validUntilDate.lessThan=" + DEFAULT_VALID_UNTIL_DATE); - - // Get all the sepaMandateList where validUntilDate less than or equals to UPDATED_VALID_UNTIL_DATE - defaultSepaMandateShouldBeFound("validUntilDate.lessThan=" + UPDATED_VALID_UNTIL_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByLastUsedDateIsEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where lastUsedDate equals to DEFAULT_LAST_USED_DATE - defaultSepaMandateShouldBeFound("lastUsedDate.equals=" + DEFAULT_LAST_USED_DATE); - - // Get all the sepaMandateList where lastUsedDate equals to UPDATED_LAST_USED_DATE - defaultSepaMandateShouldNotBeFound("lastUsedDate.equals=" + UPDATED_LAST_USED_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByLastUsedDateIsInShouldWork() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where lastUsedDate in DEFAULT_LAST_USED_DATE or UPDATED_LAST_USED_DATE - defaultSepaMandateShouldBeFound("lastUsedDate.in=" + DEFAULT_LAST_USED_DATE + "," + UPDATED_LAST_USED_DATE); - - // Get all the sepaMandateList where lastUsedDate equals to UPDATED_LAST_USED_DATE - defaultSepaMandateShouldNotBeFound("lastUsedDate.in=" + UPDATED_LAST_USED_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByLastUsedDateIsNullOrNotNull() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where lastUsedDate is not null - defaultSepaMandateShouldBeFound("lastUsedDate.specified=true"); - - // Get all the sepaMandateList where lastUsedDate is null - defaultSepaMandateShouldNotBeFound("lastUsedDate.specified=false"); - } - - @Test - @Transactional - public void getAllSepaMandatesByLastUsedDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where lastUsedDate greater than or equals to DEFAULT_LAST_USED_DATE - defaultSepaMandateShouldBeFound("lastUsedDate.greaterOrEqualThan=" + DEFAULT_LAST_USED_DATE); - - // Get all the sepaMandateList where lastUsedDate greater than or equals to UPDATED_LAST_USED_DATE - defaultSepaMandateShouldNotBeFound("lastUsedDate.greaterOrEqualThan=" + UPDATED_LAST_USED_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByLastUsedDateIsLessThanSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where lastUsedDate less than or equals to DEFAULT_LAST_USED_DATE - defaultSepaMandateShouldNotBeFound("lastUsedDate.lessThan=" + DEFAULT_LAST_USED_DATE); - - // Get all the sepaMandateList where lastUsedDate less than or equals to UPDATED_LAST_USED_DATE - defaultSepaMandateShouldBeFound("lastUsedDate.lessThan=" + UPDATED_LAST_USED_DATE); - } - - @Test - @Transactional - public void getAllSepaMandatesByRemarkIsEqualToSomething() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where remark equals to DEFAULT_REMARK - defaultSepaMandateShouldBeFound("remark.equals=" + DEFAULT_REMARK); - - // Get all the sepaMandateList where remark equals to UPDATED_REMARK - defaultSepaMandateShouldNotBeFound("remark.equals=" + UPDATED_REMARK); - } - - @Test - @Transactional - public void getAllSepaMandatesByRemarkIsInShouldWork() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where remark in DEFAULT_REMARK or UPDATED_REMARK - defaultSepaMandateShouldBeFound("remark.in=" + DEFAULT_REMARK + "," + UPDATED_REMARK); - - // Get all the sepaMandateList where remark equals to UPDATED_REMARK - defaultSepaMandateShouldNotBeFound("remark.in=" + UPDATED_REMARK); - } - - @Test - @Transactional - public void getAllSepaMandatesByRemarkIsNullOrNotNull() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - // Get all the sepaMandateList where remark is not null - defaultSepaMandateShouldBeFound("remark.specified=true"); - - // Get all the sepaMandateList where remark is null - defaultSepaMandateShouldNotBeFound("remark.specified=false"); - } - - @Test - @Transactional - public void getAllSepaMandatesByCustomerIsEqualToSomething() throws Exception { - // Initialize the database - Customer customer = CustomerResourceIntTest.createPersistentEntity(em); - sepaMandate.setCustomer(customer); - sepaMandateRepository.saveAndFlush(sepaMandate); - Long customerId = customer.getId(); - - // Get all the sepaMandateList where customer equals to customerId - defaultSepaMandateShouldBeFound("customerId.equals=" + customerId); - - // Get all the sepaMandateList where customer equals to customerId + 1 - defaultSepaMandateShouldNotBeFound("customerId.equals=" + (customerId + 1)); - } - - /** - * Executes the search, and checks that the default entity is returned - */ - private void defaultSepaMandateShouldBeFound(String filter) throws Exception { - restSepaMandateMockMvc.perform(get("/api/sepa-mandates?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].id").value(hasItem(sepaMandate.getId().intValue()))) - .andExpect(jsonPath("$.[*].reference").value(hasItem(DEFAULT_REFERENCE))) - .andExpect(jsonPath("$.[*].iban").value(hasItem(DEFAULT_IBAN))) - .andExpect(jsonPath("$.[*].bic").value(hasItem(DEFAULT_BIC))) - .andExpect(jsonPath("$.[*].grantingDocumentDate").value(hasItem(DEFAULT_GRANTING_DOCUMENT_DATE.toString()))) - .andExpect(jsonPath("$.[*].revokationDocumentDate").value(hasItem(DEFAULT_REVOKATION_DOCUMENT_DATE.toString()))) - .andExpect(jsonPath("$.[*].validFromDate").value(hasItem(DEFAULT_VALID_FROM_DATE.toString()))) - .andExpect(jsonPath("$.[*].validUntilDate").value(hasItem(DEFAULT_VALID_UNTIL_DATE.toString()))) - .andExpect(jsonPath("$.[*].lastUsedDate").value(hasItem(DEFAULT_LAST_USED_DATE.toString()))) - .andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK))); - - // Check, that the count call also returns 1 - restSepaMandateMockMvc.perform(get("/api/sepa-mandates/count?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(content().string("1")); - } - - /** - * Executes the search, and checks that the default entity is not returned - */ - private void defaultSepaMandateShouldNotBeFound(String filter) throws Exception { - restSepaMandateMockMvc.perform(get("/api/sepa-mandates?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$").isArray()) - .andExpect(jsonPath("$").isEmpty()); - - // Check, that the count call also returns 0 - restSepaMandateMockMvc.perform(get("/api/sepa-mandates/count?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(content().string("0")); - } - - @Test - @Transactional - public void getNonExistingSepaMandate() throws Exception { - // Get the sepaMandate - restSepaMandateMockMvc.perform(get("/api/sepa-mandates/{id}", Long.MAX_VALUE)) - .andExpect(status().isNotFound()); - } - - @Test - @Transactional - public void updateSepaMandate() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - int databaseSizeBeforeUpdate = sepaMandateRepository.findAll().size(); - - // Update the sepaMandate - SepaMandate updatedSepaMandate = sepaMandateRepository.findById(sepaMandate.getId()).get(); - // Disconnect from session so that the updates on updatedSepaMandate are not directly saved in db - em.detach(updatedSepaMandate); - updatedSepaMandate - .revokationDocumentDate(UPDATED_REVOKATION_DOCUMENT_DATE) - .validUntilDate(UPDATED_VALID_UNTIL_DATE) - .lastUsedDate(UPDATED_LAST_USED_DATE) - .remark(UPDATED_REMARK); - SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(updatedSepaMandate); - - restSepaMandateMockMvc.perform( - put("/api/sepa-mandates") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(sepaMandateDTO))) - .andExpect(status().isOk()); - - // Validate the SepaMandate in the database - List sepaMandateList = sepaMandateRepository.findAll(); - assertThat(sepaMandateList).hasSize(databaseSizeBeforeUpdate); - SepaMandate testSepaMandate = sepaMandateList.get(sepaMandateList.size() - 1); - assertThat(testSepaMandate.getReference()).isEqualTo(DEFAULT_REFERENCE); - assertThat(testSepaMandate.getIban()).isEqualTo(DEFAULT_IBAN); - assertThat(testSepaMandate.getBic()).isEqualTo(DEFAULT_BIC); - assertThat(testSepaMandate.getGrantingDocumentDate()).isEqualTo(DEFAULT_GRANTING_DOCUMENT_DATE); - assertThat(testSepaMandate.getRevokationDocumentDate()).isEqualTo(UPDATED_REVOKATION_DOCUMENT_DATE); - assertThat(testSepaMandate.getValidFromDate()).isEqualTo(DEFAULT_VALID_FROM_DATE); - assertThat(testSepaMandate.getValidUntilDate()).isEqualTo(UPDATED_VALID_UNTIL_DATE); - assertThat(testSepaMandate.getLastUsedDate()).isEqualTo(UPDATED_LAST_USED_DATE); - assertThat(testSepaMandate.getRemark()).isEqualTo(UPDATED_REMARK); - } - - @Test - @Transactional - public void updateNonExistingSepaMandate() throws Exception { - int databaseSizeBeforeUpdate = sepaMandateRepository.findAll().size(); - - // Create the SepaMandate - SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate); - - // If the entity doesn't have an ID, it will throw BadRequestAlertException - restSepaMandateMockMvc.perform( - put("/api/sepa-mandates") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(sepaMandateDTO))) - .andExpect(status().isBadRequest()); - - // Validate the SepaMandate in the database - List sepaMandateList = sepaMandateRepository.findAll(); - assertThat(sepaMandateList).hasSize(databaseSizeBeforeUpdate); - } - - @Test - @Transactional - public void deleteSepaMandate() throws Exception { - // Initialize the database - sepaMandateRepository.saveAndFlush(sepaMandate); - - int databaseSizeBeforeDelete = sepaMandateRepository.findAll().size(); - - // Delete the sepaMandate - restSepaMandateMockMvc.perform( - delete("/api/sepa-mandates/{id}", sepaMandate.getId()) - .accept(TestUtil.APPLICATION_JSON_UTF8)) - .andExpect(status().isOk()); - - // Validate the database is empty - List sepaMandateList = sepaMandateRepository.findAll(); - assertThat(sepaMandateList).hasSize(databaseSizeBeforeDelete - 1); - } - - @Test - @Transactional - public void equalsVerifier() throws Exception { - TestUtil.equalsVerifier(SepaMandate.class); - SepaMandate sepaMandate1 = new SepaMandate(); - sepaMandate1.setId(1L); - SepaMandate sepaMandate2 = new SepaMandate(); - sepaMandate2.setId(sepaMandate1.getId()); - assertThat(sepaMandate1).isEqualTo(sepaMandate2); - sepaMandate2.setId(2L); - assertThat(sepaMandate1).isNotEqualTo(sepaMandate2); - sepaMandate1.setId(null); - assertThat(sepaMandate1).isNotEqualTo(sepaMandate2); - } - - @Test - @Transactional - public void dtoEqualsVerifier() throws Exception { - TestUtil.equalsVerifier(SepaMandateDTO.class); - SepaMandateDTO sepaMandateDTO1 = new SepaMandateDTO(); - sepaMandateDTO1.setId(1L); - SepaMandateDTO sepaMandateDTO2 = new SepaMandateDTO(); - assertThat(sepaMandateDTO1).isNotEqualTo(sepaMandateDTO2); - sepaMandateDTO2.setId(sepaMandateDTO1.getId()); - assertThat(sepaMandateDTO1).isEqualTo(sepaMandateDTO2); - sepaMandateDTO2.setId(2L); - assertThat(sepaMandateDTO1).isNotEqualTo(sepaMandateDTO2); - sepaMandateDTO1.setId(null); - assertThat(sepaMandateDTO1).isNotEqualTo(sepaMandateDTO2); - } - - @Test - @Transactional - public void testEntityFromId() { - assertThat(sepaMandateMapper.fromId(42L).getId()).isEqualTo(42); - assertThat(sepaMandateMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/SepaMandateResourceUnitTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/SepaMandateResourceUnitTest.java deleted file mode 100644 index d320486b..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/SepaMandateResourceUnitTest.java +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.ThrowableAssert.catchThrowable; - -import org.hostsharing.hsadminng.service.dto.SepaMandateDTO; -import org.hostsharing.hsadminng.service.dto.SepaMandateDTOUnitTest; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.junit.Rule; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -// Currently this class tests mostly special 'bad paths' -// which make little sense to test in *ResourceIntTest. -public class SepaMandateResourceUnitTest { - - @Rule - public MockitoRule mockitoRule = MockitoJUnit.rule(); - - @InjectMocks - private SepaMandateResource sepaMandateResource; - - @Test - public void createSepaMandateWithoutIdThrowsBadRequestException() { - - // given - final SepaMandateDTO givenDto = SepaMandateDTOUnitTest.createRandomDTO(null, 1L); - - // when - final Throwable actual = catchThrowable(() -> sepaMandateResource.updateSepaMandate(givenDto)); - - // then - assertThat(actual).isInstanceOfSatisfying(BadRequestAlertException.class, bre -> { - assertThat(bre.getErrorKey()).isEqualTo("idnull"); - assertThat(bre.getParam()).isEqualTo("sepaMandate"); - }); - } - - @Test - public void createSepaMandateWithIdThrowsBadRequestException() { - - // given - final SepaMandateDTO givenDto = SepaMandateDTOUnitTest.createRandomDTO(2L, 1L); - - // when - final Throwable actual = catchThrowable(() -> sepaMandateResource.createSepaMandate(givenDto)); - - // then - assertThat(actual).isInstanceOfSatisfying(BadRequestAlertException.class, bre -> { - assertThat(bre.getErrorKey()).isEqualTo("idexists"); - assertThat(bre.getParam()).isEqualTo("sepaMandate"); - }); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/ShareResourceIntTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/ShareResourceIntTest.java deleted file mode 100644 index 3feef446..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/ShareResourceIntTest.java +++ /dev/null @@ -1,802 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.hamcrest.Matchers.hasItem; -import static org.hostsharing.hsadminng.web.rest.TestUtil.createFormattingConversionService; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.Membership; -import org.hostsharing.hsadminng.domain.Share; -import org.hostsharing.hsadminng.domain.enumeration.ShareAction; -import org.hostsharing.hsadminng.repository.ShareRepository; -import org.hostsharing.hsadminng.service.ShareQueryService; -import org.hostsharing.hsadminng.service.ShareService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextMock; -import org.hostsharing.hsadminng.service.dto.ShareDTO; -import org.hostsharing.hsadminng.service.mapper.ShareMapper; -import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.MockitoAnnotations; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.data.web.PageableHandlerMethodArgumentResolver; -import org.springframework.http.MediaType; -import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.validation.Validator; - -import java.time.LocalDate; -import java.time.ZoneId; -import java.util.List; - -import javax.persistence.EntityManager; - -/** - * Test class for the ShareResource REST controller. - * - * @see ShareResource - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class ShareResourceIntTest { - - private static final LocalDate DEFAULT_DOCUMENT_DATE = LocalDate.ofEpochDay(0L); - private static final LocalDate UPDATED_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault()); - - private static final LocalDate DEFAULT_VALUE_DATE = LocalDate.ofEpochDay(0L); - private static final LocalDate UPDATED_VALUE_DATE = LocalDate.now(ZoneId.systemDefault()); - - private static final ShareAction DEFAULT_ACTION = ShareAction.SUBSCRIPTION; - private static final ShareAction UPDATED_ACTION = ShareAction.CANCELLATION; - - private static final Integer DEFAULT_QUANTITY = 1; - private static final Integer UPDATED_QUANTITY = 2; - - private static final String DEFAULT_REMARK = "AAAAAAAAAA"; - private static final String UPDATED_REMARK = "BBBBBBBBBB"; - - @Autowired - private ShareRepository shareRepository; - - @Autowired - private ShareMapper shareMapper; - - @Autowired - private ShareService shareService; - - @Autowired - private ShareQueryService shareQueryService; - - @Autowired - private MappingJackson2HttpMessageConverter jacksonMessageConverter; - - @Autowired - private PageableHandlerMethodArgumentResolver pageableArgumentResolver; - - @Autowired - private ExceptionTranslator exceptionTranslator; - - @Autowired - private EntityManager em; - - @Autowired - private Validator validator; - - @MockBean - private UserRoleAssignmentService userRoleAssignmentService; - - private MockMvc restShareMockMvc; - - private Share share; - - @Before - public void setup() { - SecurityContextMock.usingMock(userRoleAssignmentService) - .havingAuthenticatedUser() - .withAuthority(Role.Admin.ROLE.authority()); - - MockitoAnnotations.initMocks(this); - final ShareResource shareResource = new ShareResource(shareService, shareQueryService); - this.restShareMockMvc = MockMvcBuilders.standaloneSetup(shareResource) - .setCustomArgumentResolvers(pageableArgumentResolver) - .setControllerAdvice(exceptionTranslator) - .setConversionService(createFormattingConversionService()) - .setMessageConverters(jacksonMessageConverter) - .setValidator(validator) - .build(); - } - - /** - * Create an entity for this test. - *

- * This is a static method, as tests for other entities might also need it, - * if they test an entity which requires the current entity. - */ - public static Share createEntity(EntityManager em) { - Share share = new Share() - .documentDate(DEFAULT_DOCUMENT_DATE) - .valueDate(DEFAULT_VALUE_DATE) - .action(DEFAULT_ACTION) - .quantity(DEFAULT_QUANTITY) - .remark(DEFAULT_REMARK); - // Add required entity - Membership membership = MembershipResourceIntTest.createEntity(em); - em.persist(membership); - em.flush(); - share.setMembership(membership); - return share; - } - - /** - * Create a persistent entity related to the given persistent membership for testing purposes. - *

- * This is a static method, as tests for other entities might also need it, - * if they test an entity which requires the current entity. - */ - public static Share createPersistentEntity(EntityManager em, final Membership membership) { - Share share = new Share() - .documentDate(DEFAULT_DOCUMENT_DATE) - .valueDate(DEFAULT_VALUE_DATE) - .action(DEFAULT_ACTION) - .quantity(DEFAULT_QUANTITY) - .remark(DEFAULT_REMARK); - // Add required entity - share.setMembership(membership); - membership.addShare(share); - em.persist(share); - em.flush(); - return share; - } - - @Before - public void initTest() { - share = createEntity(em); - } - - @Test - @Transactional - public void createShare() throws Exception { - int databaseSizeBeforeCreate = shareRepository.findAll().size(); - - // Create the Share - ShareDTO shareDTO = shareMapper.toDto(share); - shareDTO.setMembershipDisplayLabel(null); - restShareMockMvc.perform( - post("/api/shares") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(shareDTO))) - .andExpect(status().isCreated()); - - // Validate the Share in the database - List shareList = shareRepository.findAll(); - assertThat(shareList).hasSize(databaseSizeBeforeCreate + 1); - Share testShare = shareList.get(shareList.size() - 1); - assertThat(testShare.getDocumentDate()).isEqualTo(DEFAULT_DOCUMENT_DATE); - assertThat(testShare.getValueDate()).isEqualTo(DEFAULT_VALUE_DATE); - assertThat(testShare.getAction()).isEqualTo(DEFAULT_ACTION); - assertThat(testShare.getQuantity()).isEqualTo(DEFAULT_QUANTITY); - assertThat(testShare.getRemark()).isEqualTo(DEFAULT_REMARK); - } - - @Test - @Transactional - public void createShareWithIdForNonExistingEntity() throws Exception { - int databaseSizeBeforeCreate = shareRepository.findAll().size(); - - // Create the Share with an ID - share.setId(1L); - ShareDTO shareDTO = shareMapper.toDto(share); - - // An entity with an existing ID cannot be created, so this API call must fail - restShareMockMvc.perform( - post("/api/shares") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(shareDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Share in the database - List shareList = shareRepository.findAll(); - assertThat(shareList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void createShareWithExistingExistingEntity() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - int databaseSizeBeforeCreate = shareRepository.findAll().size(); - - // Create the Share with the ID of an existing ID - ShareDTO shareDTO = shareMapper.toDto(share); - - // An entity with an existing ID cannot be created, so this API call must fail - restShareMockMvc.perform( - post("/api/shares") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(shareDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Share in the database - List assetList = shareRepository.findAll(); - assertThat(assetList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void checkDocumentDateIsRequired() throws Exception { - int databaseSizeBeforeTest = shareRepository.findAll().size(); - // set the field null - share.setDocumentDate(null); - - // Create the Share, which fails. - ShareDTO shareDTO = shareMapper.toDto(share); - - restShareMockMvc.perform( - post("/api/shares") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(shareDTO))) - .andExpect(status().isBadRequest()); - - List shareList = shareRepository.findAll(); - assertThat(shareList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkValueDateIsRequired() throws Exception { - int databaseSizeBeforeTest = shareRepository.findAll().size(); - // set the field null - share.setValueDate(null); - - // Create the Share, which fails. - ShareDTO shareDTO = shareMapper.toDto(share); - - restShareMockMvc.perform( - post("/api/shares") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(shareDTO))) - .andExpect(status().isBadRequest()); - - List shareList = shareRepository.findAll(); - assertThat(shareList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkActionIsRequired() throws Exception { - int databaseSizeBeforeTest = shareRepository.findAll().size(); - // set the field null - share.setAction(null); - - // Create the Share, which fails. - ShareDTO shareDTO = shareMapper.toDto(share); - - restShareMockMvc.perform( - post("/api/shares") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(shareDTO))) - .andExpect(status().isBadRequest()); - - List shareList = shareRepository.findAll(); - assertThat(shareList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkQuantityIsRequired() throws Exception { - int databaseSizeBeforeTest = shareRepository.findAll().size(); - // set the field null - share.setQuantity(null); - - // Create the Share, which fails. - ShareDTO shareDTO = shareMapper.toDto(share); - - restShareMockMvc.perform( - post("/api/shares") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(shareDTO))) - .andExpect(status().isBadRequest()); - - List shareList = shareRepository.findAll(); - assertThat(shareList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void getAllShares() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList - restShareMockMvc.perform(get("/api/shares?sort=id,desc")) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].id").value(hasItem(share.getId().intValue()))) - .andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString()))) - .andExpect(jsonPath("$.[*].valueDate").value(hasItem(DEFAULT_VALUE_DATE.toString()))) - .andExpect(jsonPath("$.[*].action").value(hasItem(DEFAULT_ACTION.toString()))) - .andExpect(jsonPath("$.[*].quantity").value(hasItem(DEFAULT_QUANTITY))) - .andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK.toString()))); - } - - @Test - @Transactional - public void getShare() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get the share - restShareMockMvc.perform(get("/api/shares/{id}", share.getId())) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.id").value(share.getId().intValue())) - .andExpect(jsonPath("$.documentDate").value(DEFAULT_DOCUMENT_DATE.toString())) - .andExpect(jsonPath("$.valueDate").value(DEFAULT_VALUE_DATE.toString())) - .andExpect(jsonPath("$.action").value(DEFAULT_ACTION.toString())) - .andExpect(jsonPath("$.quantity").value(DEFAULT_QUANTITY)) - .andExpect(jsonPath("$.remark").value(DEFAULT_REMARK.toString())); - } - - @Test - @Transactional - public void getAllSharesByDocumentDateIsEqualToSomething() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where documentDate equals to DEFAULT_DOCUMENT_DATE - defaultShareShouldBeFound("documentDate.equals=" + DEFAULT_DOCUMENT_DATE); - - // Get all the shareList where documentDate equals to UPDATED_DOCUMENT_DATE - defaultShareShouldNotBeFound("documentDate.equals=" + UPDATED_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllSharesByDocumentDateIsInShouldWork() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where documentDate in DEFAULT_DOCUMENT_DATE or UPDATED_DOCUMENT_DATE - defaultShareShouldBeFound("documentDate.in=" + DEFAULT_DOCUMENT_DATE + "," + UPDATED_DOCUMENT_DATE); - - // Get all the shareList where documentDate equals to UPDATED_DOCUMENT_DATE - defaultShareShouldNotBeFound("documentDate.in=" + UPDATED_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllSharesByDocumentDateIsNullOrNotNull() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where documentDate is not null - defaultShareShouldBeFound("documentDate.specified=true"); - - // Get all the shareList where documentDate is null - defaultShareShouldNotBeFound("documentDate.specified=false"); - } - - @Test - @Transactional - public void getAllSharesByDocumentDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where documentDate greater than or equals to DEFAULT_DOCUMENT_DATE - defaultShareShouldBeFound("documentDate.greaterOrEqualThan=" + DEFAULT_DOCUMENT_DATE); - - // Get all the shareList where documentDate greater than or equals to UPDATED_DOCUMENT_DATE - defaultShareShouldNotBeFound("documentDate.greaterOrEqualThan=" + UPDATED_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllSharesByDocumentDateIsLessThanSomething() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where documentDate less than or equals to DEFAULT_DOCUMENT_DATE - defaultShareShouldNotBeFound("documentDate.lessThan=" + DEFAULT_DOCUMENT_DATE); - - // Get all the shareList where documentDate less than or equals to UPDATED_DOCUMENT_DATE - defaultShareShouldBeFound("documentDate.lessThan=" + UPDATED_DOCUMENT_DATE); - } - - @Test - @Transactional - public void getAllSharesByValueDateIsEqualToSomething() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where valueDate equals to DEFAULT_VALUE_DATE - defaultShareShouldBeFound("valueDate.equals=" + DEFAULT_VALUE_DATE); - - // Get all the shareList where valueDate equals to UPDATED_VALUE_DATE - defaultShareShouldNotBeFound("valueDate.equals=" + UPDATED_VALUE_DATE); - } - - @Test - @Transactional - public void getAllSharesByValueDateIsInShouldWork() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where valueDate in DEFAULT_VALUE_DATE or UPDATED_VALUE_DATE - defaultShareShouldBeFound("valueDate.in=" + DEFAULT_VALUE_DATE + "," + UPDATED_VALUE_DATE); - - // Get all the shareList where valueDate equals to UPDATED_VALUE_DATE - defaultShareShouldNotBeFound("valueDate.in=" + UPDATED_VALUE_DATE); - } - - @Test - @Transactional - public void getAllSharesByValueDateIsNullOrNotNull() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where valueDate is not null - defaultShareShouldBeFound("valueDate.specified=true"); - - // Get all the shareList where valueDate is null - defaultShareShouldNotBeFound("valueDate.specified=false"); - } - - @Test - @Transactional - public void getAllSharesByValueDateIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where valueDate greater than or equals to DEFAULT_VALUE_DATE - defaultShareShouldBeFound("valueDate.greaterOrEqualThan=" + DEFAULT_VALUE_DATE); - - // Get all the shareList where valueDate greater than or equals to UPDATED_VALUE_DATE - defaultShareShouldNotBeFound("valueDate.greaterOrEqualThan=" + UPDATED_VALUE_DATE); - } - - @Test - @Transactional - public void getAllSharesByValueDateIsLessThanSomething() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where valueDate less than or equals to DEFAULT_VALUE_DATE - defaultShareShouldNotBeFound("valueDate.lessThan=" + DEFAULT_VALUE_DATE); - - // Get all the shareList where valueDate less than or equals to UPDATED_VALUE_DATE - defaultShareShouldBeFound("valueDate.lessThan=" + UPDATED_VALUE_DATE); - } - - @Test - @Transactional - public void getAllSharesByActionIsEqualToSomething() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where action equals to DEFAULT_ACTION - defaultShareShouldBeFound("action.equals=" + DEFAULT_ACTION); - - // Get all the shareList where action equals to UPDATED_ACTION - defaultShareShouldNotBeFound("action.equals=" + UPDATED_ACTION); - } - - @Test - @Transactional - public void getAllSharesByActionIsInShouldWork() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where action in DEFAULT_ACTION or UPDATED_ACTION - defaultShareShouldBeFound("action.in=" + DEFAULT_ACTION + "," + UPDATED_ACTION); - - // Get all the shareList where action equals to UPDATED_ACTION - defaultShareShouldNotBeFound("action.in=" + UPDATED_ACTION); - } - - @Test - @Transactional - public void getAllSharesByActionIsNullOrNotNull() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where action is not null - defaultShareShouldBeFound("action.specified=true"); - - // Get all the shareList where action is null - defaultShareShouldNotBeFound("action.specified=false"); - } - - @Test - @Transactional - public void getAllSharesByQuantityIsEqualToSomething() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where quantity equals to DEFAULT_QUANTITY - defaultShareShouldBeFound("quantity.equals=" + DEFAULT_QUANTITY); - - // Get all the shareList where quantity equals to UPDATED_QUANTITY - defaultShareShouldNotBeFound("quantity.equals=" + UPDATED_QUANTITY); - } - - @Test - @Transactional - public void getAllSharesByQuantityIsInShouldWork() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where quantity in DEFAULT_QUANTITY or UPDATED_QUANTITY - defaultShareShouldBeFound("quantity.in=" + DEFAULT_QUANTITY + "," + UPDATED_QUANTITY); - - // Get all the shareList where quantity equals to UPDATED_QUANTITY - defaultShareShouldNotBeFound("quantity.in=" + UPDATED_QUANTITY); - } - - @Test - @Transactional - public void getAllSharesByQuantityIsNullOrNotNull() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where quantity is not null - defaultShareShouldBeFound("quantity.specified=true"); - - // Get all the shareList where quantity is null - defaultShareShouldNotBeFound("quantity.specified=false"); - } - - @Test - @Transactional - public void getAllSharesByQuantityIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where quantity greater than or equals to DEFAULT_QUANTITY - defaultShareShouldBeFound("quantity.greaterOrEqualThan=" + DEFAULT_QUANTITY); - - // Get all the shareList where quantity greater than or equals to UPDATED_QUANTITY - defaultShareShouldNotBeFound("quantity.greaterOrEqualThan=" + UPDATED_QUANTITY); - } - - @Test - @Transactional - public void getAllSharesByQuantityIsLessThanSomething() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where quantity less than or equals to DEFAULT_QUANTITY - defaultShareShouldNotBeFound("quantity.lessThan=" + DEFAULT_QUANTITY); - - // Get all the shareList where quantity less than or equals to UPDATED_QUANTITY - defaultShareShouldBeFound("quantity.lessThan=" + UPDATED_QUANTITY); - } - - @Test - @Transactional - public void getAllSharesByRemarkIsEqualToSomething() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where remark equals to DEFAULT_REMARK - defaultShareShouldBeFound("remark.equals=" + DEFAULT_REMARK); - - // Get all the shareList where remark equals to UPDATED_REMARK - defaultShareShouldNotBeFound("remark.equals=" + UPDATED_REMARK); - } - - @Test - @Transactional - public void getAllSharesByRemarkIsInShouldWork() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where remark in DEFAULT_REMARK or UPDATED_REMARK - defaultShareShouldBeFound("remark.in=" + DEFAULT_REMARK + "," + UPDATED_REMARK); - - // Get all the shareList where remark equals to UPDATED_REMARK - defaultShareShouldNotBeFound("remark.in=" + UPDATED_REMARK); - } - - @Test - @Transactional - public void getAllSharesByRemarkIsNullOrNotNull() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - // Get all the shareList where remark is not null - defaultShareShouldBeFound("remark.specified=true"); - - // Get all the shareList where remark is null - defaultShareShouldNotBeFound("remark.specified=false"); - } - - @Test - @Transactional - public void getAllSharesByMembershipIsEqualToSomething() throws Exception { - // Initialize the database - Membership membership = MembershipResourceIntTest - .createPersistentEntity(em, CustomerResourceIntTest.createPersistentEntity(em)); - share.setMembership(membership); - shareRepository.saveAndFlush(share); - Long membershipId = membership.getId(); - - // Get all the shareList where membership equals to membershipId - defaultShareShouldBeFound("membershipId.equals=" + membershipId); - - // Get all the shareList where membership equals to membershipId + 1 - defaultShareShouldNotBeFound("membershipId.equals=" + (membershipId + 1)); - } - - /** - * Executes the search, and checks that the default entity is returned - */ - private void defaultShareShouldBeFound(String filter) throws Exception { - restShareMockMvc.perform(get("/api/shares?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].id").value(hasItem(share.getId().intValue()))) - .andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString()))) - .andExpect(jsonPath("$.[*].valueDate").value(hasItem(DEFAULT_VALUE_DATE.toString()))) - .andExpect(jsonPath("$.[*].action").value(hasItem(DEFAULT_ACTION.toString()))) - .andExpect(jsonPath("$.[*].quantity").value(hasItem(DEFAULT_QUANTITY))) - .andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK))); - - // Check, that the count call also returns 1 - restShareMockMvc.perform(get("/api/shares/count?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(content().string("1")); - } - - /** - * Executes the search, and checks that the default entity is not returned - */ - private void defaultShareShouldNotBeFound(String filter) throws Exception { - restShareMockMvc.perform(get("/api/shares?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$").isArray()) - .andExpect(jsonPath("$").isEmpty()); - - // Check, that the count call also returns 0 - restShareMockMvc.perform(get("/api/shares/count?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(content().string("0")); - } - - @Test - @Transactional - public void getNonExistingShare() throws Exception { - // Get the share - restShareMockMvc.perform(get("/api/shares/{id}", Long.MAX_VALUE)) - .andExpect(status().isNotFound()); - } - - @Test - @Transactional - public void updateShare() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - int databaseSizeBeforeUpdate = shareRepository.findAll().size(); - - // Update the share - Share updatedShare = shareRepository.findById(share.getId()).get(); - // Disconnect from session so that the updates on updatedShare are not directly saved in db - em.detach(updatedShare); - updatedShare - .documentDate(UPDATED_DOCUMENT_DATE) - .valueDate(UPDATED_VALUE_DATE) - .action(UPDATED_ACTION) - .quantity(UPDATED_QUANTITY) - .remark(UPDATED_REMARK); - ShareDTO shareDTO = shareMapper.toDto(updatedShare); - - restShareMockMvc.perform( - put("/api/shares") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(shareDTO))) - .andExpect(status().isBadRequest()); - - // Validate the database is unchanged - List shareList = shareRepository.findAll(); - assertThat(shareList).hasSize(databaseSizeBeforeUpdate); - - Share testShare = shareList.get(shareList.size() - 1); - assertThat(testShare.getDocumentDate()).isEqualTo(DEFAULT_DOCUMENT_DATE); - assertThat(testShare.getValueDate()).isEqualTo(DEFAULT_VALUE_DATE); - assertThat(testShare.getAction()).isEqualTo(DEFAULT_ACTION); - assertThat(testShare.getQuantity()).isEqualTo(DEFAULT_QUANTITY); - assertThat(testShare.getRemark()).isEqualTo(DEFAULT_REMARK); - } - - @Test - @Transactional - public void updateNonExistingShare() throws Exception { - int databaseSizeBeforeUpdate = shareRepository.findAll().size(); - - // Create the Share - ShareDTO shareDTO = shareMapper.toDto(share); - - // If the entity doesn't have an ID, it will throw BadRequestAlertException - restShareMockMvc.perform( - put("/api/shares") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(shareDTO))) - .andExpect(status().isBadRequest()); - - // Validate the Share in the database - List shareList = shareRepository.findAll(); - assertThat(shareList).hasSize(databaseSizeBeforeUpdate); - } - - @Test - @Transactional - public void deleteShare() throws Exception { - // Initialize the database - shareRepository.saveAndFlush(share); - - int databaseSizeBeforeDelete = shareRepository.findAll().size(); - - // Delete the share - restShareMockMvc.perform( - delete("/api/shares/{id}", share.getId()) - .accept(TestUtil.APPLICATION_JSON_UTF8)) - .andExpect(status().isBadRequest()); - - // Validate the database is unchanged - List shareList = shareRepository.findAll(); - assertThat(shareList).hasSize(databaseSizeBeforeDelete); - } - - @Test - @Transactional - public void equalsVerifier() throws Exception { - TestUtil.equalsVerifier(Share.class); - Share share1 = new Share(); - share1.setId(1L); - Share share2 = new Share(); - share2.setId(share1.getId()); - assertThat(share1).isEqualTo(share2); - share2.setId(2L); - assertThat(share1).isNotEqualTo(share2); - share1.setId(null); - assertThat(share1).isNotEqualTo(share2); - } - - @Test - @Transactional - public void dtoEqualsVerifier() throws Exception { - TestUtil.equalsVerifier(ShareDTO.class); - ShareDTO shareDTO1 = new ShareDTO(); - shareDTO1.setId(1L); - ShareDTO shareDTO2 = new ShareDTO(); - assertThat(shareDTO1).isNotEqualTo(shareDTO2); - shareDTO2.setId(shareDTO1.getId()); - assertThat(shareDTO1).isEqualTo(shareDTO2); - shareDTO2.setId(2L); - assertThat(shareDTO1).isNotEqualTo(shareDTO2); - shareDTO1.setId(null); - assertThat(shareDTO1).isNotEqualTo(shareDTO2); - } - - @Test - @Transactional - public void testEntityFromId() { - assertThat(shareMapper.fromId(42L).getId()).isEqualTo(42); - assertThat(shareMapper.fromId(null)).isNull(); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/TestUtil.java b/src/test/java/org/hostsharing/hsadminng/web/rest/TestUtil.java deleted file mode 100644 index b4d22bed..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/TestUtil.java +++ /dev/null @@ -1,147 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.Assertions.assertThat; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; - -import org.hamcrest.Description; -import org.hamcrest.TypeSafeDiagnosingMatcher; -import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; -import org.springframework.format.support.DefaultFormattingConversionService; -import org.springframework.format.support.FormattingConversionService; -import org.springframework.http.MediaType; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.time.ZonedDateTime; -import java.time.format.DateTimeParseException; - -/** - * Utility class for testing REST controllers. - */ -public final class TestUtil { - - private static final ObjectMapper mapper = createObjectMapper(); - - /** MediaType for JSON UTF8 */ - public static final MediaType APPLICATION_JSON_UTF8 = new MediaType( - MediaType.APPLICATION_JSON.getType(), - MediaType.APPLICATION_JSON.getSubtype(), - StandardCharsets.UTF_8); - - private static ObjectMapper createObjectMapper() { - ObjectMapper mapper = new ObjectMapper(); - mapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); - mapper.registerModule(new JavaTimeModule()); - return mapper; - } - - /** - * Convert an object to JSON byte array. - * - * @param object - * the object to convert - * @return the JSON byte array - * @throws IOException - */ - public static byte[] convertObjectToJsonBytes(Object object) - throws IOException { - return mapper.writeValueAsBytes(object); - } - - /** - * Create a byte array with a specific size filled with specified data. - * - * @param size the size of the byte array - * @param data the data to put in the byte array - * @return the JSON byte array - */ - public static byte[] createByteArray(int size, String data) { - byte[] byteArray = new byte[size]; - for (int i = 0; i < size; i++) { - byteArray[i] = Byte.parseByte(data, 2); - } - return byteArray; - } - - /** - * A matcher that tests that the examined string represents the same instant as the reference datetime. - */ - public static class ZonedDateTimeMatcher extends TypeSafeDiagnosingMatcher { - - private final ZonedDateTime date; - - public ZonedDateTimeMatcher(ZonedDateTime date) { - this.date = date; - } - - @Override - protected boolean matchesSafely(String item, Description mismatchDescription) { - try { - if (!date.isEqual(ZonedDateTime.parse(item))) { - mismatchDescription.appendText("was ").appendValue(item); - return false; - } - return true; - } catch (DateTimeParseException e) { - mismatchDescription.appendText("was ") - .appendValue(item) - .appendText(", which could not be parsed as a ZonedDateTime"); - return false; - } - - } - - @Override - public void describeTo(Description description) { - description.appendText("a String representing the same Instant as ").appendValue(date); - } - } - - /** - * Creates a matcher that matches when the examined string reprensents the same instant as the reference datetime - * - * @param date the reference datetime against which the examined string is checked - */ - public static ZonedDateTimeMatcher sameInstant(ZonedDateTime date) { - return new ZonedDateTimeMatcher(date); - } - - /** - * Verifies the equals/hashcode contract on the domain object. - */ - public static void equalsVerifier(Class clazz) throws Exception { - T domainObject1 = clazz.getConstructor().newInstance(); - assertThat(domainObject1.toString()).isNotNull(); - assertThat(domainObject1).isEqualTo(domainObject1); - assertThat(domainObject1.hashCode()).isEqualTo(domainObject1.hashCode()); - // Test with an instance of another class - Object testOtherObject = new Object(); - assertThat(domainObject1).isNotEqualTo(testOtherObject); - assertThat(domainObject1).isNotEqualTo(null); - // Test with an instance of the same class - T domainObject2 = clazz.getConstructor().newInstance(); - assertThat(domainObject1).isNotEqualTo(domainObject2); - // HashCodes are equals because the objects are not persisted yet - assertThat(domainObject1.hashCode()).isEqualTo(domainObject2.hashCode()); - } - - /** - * Create a FormattingConversionService which use ISO date format, instead of the localized one. - * - * @return the FormattingConversionService - */ - public static FormattingConversionService createFormattingConversionService() { - DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService(); - DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); - registrar.setUseIsoFormat(true); - registrar.registerFormatters(dfcs); - return dfcs; - } - - private TestUtil() { - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/UserJWTControllerIntTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/UserJWTControllerIntTest.java deleted file mode 100644 index 43ea4434..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/UserJWTControllerIntTest.java +++ /dev/null @@ -1,130 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.hamcrest.Matchers.isEmptyString; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.Matchers.nullValue; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.repository.UserRepository; -import org.hostsharing.hsadminng.security.jwt.TokenProvider; -import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator; -import org.hostsharing.hsadminng.web.rest.vm.LoginVM; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.crypto.password.PasswordEncoder; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.transaction.annotation.Transactional; - -/** - * Test class for the UserJWTController REST controller. - * - * @see UserJWTController - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class UserJWTControllerIntTest { - - @Autowired - private TokenProvider tokenProvider; - - @Autowired - private AuthenticationManager authenticationManager; - - @Autowired - private UserRepository userRepository; - - @Autowired - private PasswordEncoder passwordEncoder; - - @Autowired - private ExceptionTranslator exceptionTranslator; - - private MockMvc mockMvc; - - @Before - public void setup() { - UserJWTController userJWTController = new UserJWTController(tokenProvider, authenticationManager); - this.mockMvc = MockMvcBuilders.standaloneSetup(userJWTController) - .setControllerAdvice(exceptionTranslator) - .build(); - } - - @Test - @Transactional - public void testAuthorize() throws Exception { - User user = new User(); - user.setLogin("user-jwt-controller"); - user.setEmail("user-jwt-controller@example.com"); - user.setActivated(true); - user.setPassword(passwordEncoder.encode("test")); - - userRepository.saveAndFlush(user); - - LoginVM login = new LoginVM(); - login.setUsername("user-jwt-controller"); - login.setPassword("test"); - mockMvc.perform( - post("/api/authenticate") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(login))) - .andExpect(status().isOk()) - .andExpect(jsonPath("$.id_token").isString()) - .andExpect(jsonPath("$.id_token").isNotEmpty()) - .andExpect(header().string("Authorization", not(nullValue()))) - .andExpect(header().string("Authorization", not(isEmptyString()))); - } - - @Test - @Transactional - public void testAuthorizeWithRememberMe() throws Exception { - User user = new User(); - user.setLogin("user-jwt-controller-remember-me"); - user.setEmail("user-jwt-controller-remember-me@example.com"); - user.setActivated(true); - user.setPassword(passwordEncoder.encode("test")); - - userRepository.saveAndFlush(user); - - LoginVM login = new LoginVM(); - login.setUsername("user-jwt-controller-remember-me"); - login.setPassword("test"); - login.setRememberMe(true); - mockMvc.perform( - post("/api/authenticate") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(login))) - .andExpect(status().isOk()) - .andExpect(jsonPath("$.id_token").isString()) - .andExpect(jsonPath("$.id_token").isNotEmpty()) - .andExpect(header().string("Authorization", not(nullValue()))) - .andExpect(header().string("Authorization", not(isEmptyString()))); - } - - @Test - @Transactional - public void testAuthorizeFails() throws Exception { - LoginVM login = new LoginVM(); - login.setUsername("wrong-user"); - login.setPassword("wrong password"); - mockMvc.perform( - post("/api/authenticate") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(login))) - .andExpect(status().isUnauthorized()) - .andExpect(jsonPath("$.id_token").doesNotExist()) - .andExpect(header().doesNotExist("Authorization")); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/UserResourceIntTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/UserResourceIntTest.java deleted file mode 100644 index 07029e3a..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/UserResourceIntTest.java +++ /dev/null @@ -1,622 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.hamcrest.Matchers.hasItem; -import static org.hamcrest.Matchers.hasItems; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.Authority; -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.repository.UserRepository; -import org.hostsharing.hsadminng.security.AuthoritiesConstants; -import org.hostsharing.hsadminng.service.MailService; -import org.hostsharing.hsadminng.service.UserService; -import org.hostsharing.hsadminng.service.dto.UserDTO; -import org.hostsharing.hsadminng.service.mapper.UserMapper; -import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator; -import org.hostsharing.hsadminng.web.rest.vm.ManagedUserVM; - -import org.apache.commons.lang3.RandomStringUtils; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.cache.CacheManager; -import org.springframework.data.web.PageableHandlerMethodArgumentResolver; -import org.springframework.http.MediaType; -import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.transaction.annotation.Transactional; - -import java.time.Instant; -import java.util.*; - -import javax.persistence.EntityManager; - -/** - * Test class for the UserResource REST controller. - * - * @see UserResource - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class UserResourceIntTest { - - private static final String DEFAULT_LOGIN = "johndoe"; - private static final String UPDATED_LOGIN = "jhipster"; - - private static final Long DEFAULT_ID = 1L; - - private static final String DEFAULT_PASSWORD = "passjohndoe"; - private static final String UPDATED_PASSWORD = "passjhipster"; - - private static final String DEFAULT_EMAIL = "johndoe@localhost"; - private static final String UPDATED_EMAIL = "jhipster@localhost"; - - private static final String DEFAULT_FIRSTNAME = "john"; - private static final String UPDATED_FIRSTNAME = "jhipsterFirstName"; - - private static final String DEFAULT_LASTNAME = "doe"; - private static final String UPDATED_LASTNAME = "jhipsterLastName"; - - private static final String DEFAULT_IMAGEURL = "http://placehold.it/50x50"; - private static final String UPDATED_IMAGEURL = "http://placehold.it/40x40"; - - private static final String DEFAULT_LANGKEY = "en"; - private static final String UPDATED_LANGKEY = "fr"; - - @Autowired - private UserRepository userRepository; - - @Autowired - private MailService mailService; - - @Autowired - private UserService userService; - - @Autowired - private UserMapper userMapper; - - @Autowired - private MappingJackson2HttpMessageConverter jacksonMessageConverter; - - @Autowired - private PageableHandlerMethodArgumentResolver pageableArgumentResolver; - - @Autowired - private ExceptionTranslator exceptionTranslator; - - @Autowired - private EntityManager em; - - @Autowired - private CacheManager cacheManager; - - private MockMvc restUserMockMvc; - - private User user; - - @Before - public void setup() { - cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).clear(); - cacheManager.getCache(UserRepository.USERS_BY_EMAIL_CACHE).clear(); - UserResource userResource = new UserResource(userService, userRepository, mailService); - - this.restUserMockMvc = MockMvcBuilders.standaloneSetup(userResource) - .setCustomArgumentResolvers(pageableArgumentResolver) - .setControllerAdvice(exceptionTranslator) - .setMessageConverters(jacksonMessageConverter) - .build(); - } - - /** - * Create a User. - * - * This is a static method, as tests for other entities might also need it, - * if they test an entity which has a required relationship to the User entity. - */ - public static User createEntity(EntityManager em) { - User user = new User(); - user.setLogin(DEFAULT_LOGIN + RandomStringUtils.randomAlphabetic(5)); - user.setPassword(RandomStringUtils.random(60)); - user.setActivated(true); - user.setEmail(RandomStringUtils.randomAlphabetic(5) + DEFAULT_EMAIL); - user.setFirstName(DEFAULT_FIRSTNAME); - user.setLastName(DEFAULT_LASTNAME); - user.setImageUrl(DEFAULT_IMAGEURL); - user.setLangKey(DEFAULT_LANGKEY); - return user; - } - - @Before - public void initTest() { - user = createEntity(em); - user.setLogin(DEFAULT_LOGIN); - user.setEmail(DEFAULT_EMAIL); - } - - @Test - @Transactional - public void createUser() throws Exception { - int databaseSizeBeforeCreate = userRepository.findAll().size(); - - // Create the User - ManagedUserVM managedUserVM = new ManagedUserVM(); - managedUserVM.setLogin(DEFAULT_LOGIN); - managedUserVM.setPassword(DEFAULT_PASSWORD); - managedUserVM.setFirstName(DEFAULT_FIRSTNAME); - managedUserVM.setLastName(DEFAULT_LASTNAME); - managedUserVM.setEmail(DEFAULT_EMAIL); - managedUserVM.setActivated(true); - managedUserVM.setImageUrl(DEFAULT_IMAGEURL); - managedUserVM.setLangKey(DEFAULT_LANGKEY); - managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - restUserMockMvc.perform( - post("/api/users") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) - .andExpect(status().isCreated()); - - // Validate the User in the database - List userList = userRepository.findAll(); - assertThat(userList).hasSize(databaseSizeBeforeCreate + 1); - User testUser = userList.get(userList.size() - 1); - assertThat(testUser.getLogin()).isEqualTo(DEFAULT_LOGIN); - assertThat(testUser.getFirstName()).isEqualTo(DEFAULT_FIRSTNAME); - assertThat(testUser.getLastName()).isEqualTo(DEFAULT_LASTNAME); - assertThat(testUser.getEmail()).isEqualTo(DEFAULT_EMAIL); - assertThat(testUser.getImageUrl()).isEqualTo(DEFAULT_IMAGEURL); - assertThat(testUser.getLangKey()).isEqualTo(DEFAULT_LANGKEY); - } - - @Test - @Transactional - public void createUserWithExistingId() throws Exception { - int databaseSizeBeforeCreate = userRepository.findAll().size(); - - ManagedUserVM managedUserVM = new ManagedUserVM(); - managedUserVM.setId(1L); - managedUserVM.setLogin(DEFAULT_LOGIN); - managedUserVM.setPassword(DEFAULT_PASSWORD); - managedUserVM.setFirstName(DEFAULT_FIRSTNAME); - managedUserVM.setLastName(DEFAULT_LASTNAME); - managedUserVM.setEmail(DEFAULT_EMAIL); - managedUserVM.setActivated(true); - managedUserVM.setImageUrl(DEFAULT_IMAGEURL); - managedUserVM.setLangKey(DEFAULT_LANGKEY); - managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - // An entity with an existing ID cannot be created, so this API call must fail - restUserMockMvc.perform( - post("/api/users") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) - .andExpect(status().isBadRequest()); - - // Validate the User in the database - List userList = userRepository.findAll(); - assertThat(userList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void createUserWithExistingLogin() throws Exception { - // Initialize the database - userRepository.saveAndFlush(user); - int databaseSizeBeforeCreate = userRepository.findAll().size(); - - ManagedUserVM managedUserVM = new ManagedUserVM(); - managedUserVM.setLogin(DEFAULT_LOGIN);// this login should already be used - managedUserVM.setPassword(DEFAULT_PASSWORD); - managedUserVM.setFirstName(DEFAULT_FIRSTNAME); - managedUserVM.setLastName(DEFAULT_LASTNAME); - managedUserVM.setEmail("anothermail@localhost"); - managedUserVM.setActivated(true); - managedUserVM.setImageUrl(DEFAULT_IMAGEURL); - managedUserVM.setLangKey(DEFAULT_LANGKEY); - managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - // Create the User - restUserMockMvc.perform( - post("/api/users") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) - .andExpect(status().isBadRequest()); - - // Validate the User in the database - List userList = userRepository.findAll(); - assertThat(userList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void createUserWithExistingEmail() throws Exception { - // Initialize the database - userRepository.saveAndFlush(user); - int databaseSizeBeforeCreate = userRepository.findAll().size(); - - ManagedUserVM managedUserVM = new ManagedUserVM(); - managedUserVM.setLogin("anotherlogin"); - managedUserVM.setPassword(DEFAULT_PASSWORD); - managedUserVM.setFirstName(DEFAULT_FIRSTNAME); - managedUserVM.setLastName(DEFAULT_LASTNAME); - managedUserVM.setEmail(DEFAULT_EMAIL);// this email should already be used - managedUserVM.setActivated(true); - managedUserVM.setImageUrl(DEFAULT_IMAGEURL); - managedUserVM.setLangKey(DEFAULT_LANGKEY); - managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - // Create the User - restUserMockMvc.perform( - post("/api/users") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) - .andExpect(status().isBadRequest()); - - // Validate the User in the database - List userList = userRepository.findAll(); - assertThat(userList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void getAllUsers() throws Exception { - // Initialize the database - userRepository.saveAndFlush(user); - - // Get all the users - restUserMockMvc.perform( - get("/api/users?sort=id,desc") - .accept(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].login").value(hasItem(DEFAULT_LOGIN))) - .andExpect(jsonPath("$.[*].firstName").value(hasItem(DEFAULT_FIRSTNAME))) - .andExpect(jsonPath("$.[*].lastName").value(hasItem(DEFAULT_LASTNAME))) - .andExpect(jsonPath("$.[*].email").value(hasItem(DEFAULT_EMAIL))) - .andExpect(jsonPath("$.[*].imageUrl").value(hasItem(DEFAULT_IMAGEURL))) - .andExpect(jsonPath("$.[*].langKey").value(hasItem(DEFAULT_LANGKEY))); - } - - @Test - @Transactional - public void getUser() throws Exception { - // Initialize the database - userRepository.saveAndFlush(user); - - assertThat(cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).get(user.getLogin())).isNull(); - - // Get the user - restUserMockMvc.perform(get("/api/users/{login}", user.getLogin())) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.login").value(user.getLogin())) - .andExpect(jsonPath("$.firstName").value(DEFAULT_FIRSTNAME)) - .andExpect(jsonPath("$.lastName").value(DEFAULT_LASTNAME)) - .andExpect(jsonPath("$.email").value(DEFAULT_EMAIL)) - .andExpect(jsonPath("$.imageUrl").value(DEFAULT_IMAGEURL)) - .andExpect(jsonPath("$.langKey").value(DEFAULT_LANGKEY)); - - assertThat(cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).get(user.getLogin())).isNotNull(); - } - - @Test - @Transactional - public void getNonExistingUser() throws Exception { - restUserMockMvc.perform(get("/api/users/unknown")) - .andExpect(status().isNotFound()); - } - - @Test - @Transactional - public void updateUser() throws Exception { - // Initialize the database - userRepository.saveAndFlush(user); - int databaseSizeBeforeUpdate = userRepository.findAll().size(); - - // Update the user - User updatedUser = userRepository.findById(user.getId()).get(); - - ManagedUserVM managedUserVM = new ManagedUserVM(); - managedUserVM.setId(updatedUser.getId()); - managedUserVM.setLogin(updatedUser.getLogin()); - managedUserVM.setPassword(UPDATED_PASSWORD); - managedUserVM.setFirstName(UPDATED_FIRSTNAME); - managedUserVM.setLastName(UPDATED_LASTNAME); - managedUserVM.setEmail(UPDATED_EMAIL); - managedUserVM.setActivated(updatedUser.getActivated()); - managedUserVM.setImageUrl(UPDATED_IMAGEURL); - managedUserVM.setLangKey(UPDATED_LANGKEY); - managedUserVM.setCreatedBy(updatedUser.getCreatedBy()); - managedUserVM.setCreatedDate(updatedUser.getCreatedDate()); - managedUserVM.setLastModifiedBy(updatedUser.getLastModifiedBy()); - managedUserVM.setLastModifiedDate(updatedUser.getLastModifiedDate()); - managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - restUserMockMvc.perform( - put("/api/users") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) - .andExpect(status().isOk()); - - // Validate the User in the database - List userList = userRepository.findAll(); - assertThat(userList).hasSize(databaseSizeBeforeUpdate); - User testUser = userList.get(userList.size() - 1); - assertThat(testUser.getFirstName()).isEqualTo(UPDATED_FIRSTNAME); - assertThat(testUser.getLastName()).isEqualTo(UPDATED_LASTNAME); - assertThat(testUser.getEmail()).isEqualTo(UPDATED_EMAIL); - assertThat(testUser.getImageUrl()).isEqualTo(UPDATED_IMAGEURL); - assertThat(testUser.getLangKey()).isEqualTo(UPDATED_LANGKEY); - } - - @Test - @Transactional - public void updateUserLogin() throws Exception { - // Initialize the database - userRepository.saveAndFlush(user); - int databaseSizeBeforeUpdate = userRepository.findAll().size(); - - // Update the user - User updatedUser = userRepository.findById(user.getId()).get(); - - ManagedUserVM managedUserVM = new ManagedUserVM(); - managedUserVM.setId(updatedUser.getId()); - managedUserVM.setLogin(UPDATED_LOGIN); - managedUserVM.setPassword(UPDATED_PASSWORD); - managedUserVM.setFirstName(UPDATED_FIRSTNAME); - managedUserVM.setLastName(UPDATED_LASTNAME); - managedUserVM.setEmail(UPDATED_EMAIL); - managedUserVM.setActivated(updatedUser.getActivated()); - managedUserVM.setImageUrl(UPDATED_IMAGEURL); - managedUserVM.setLangKey(UPDATED_LANGKEY); - managedUserVM.setCreatedBy(updatedUser.getCreatedBy()); - managedUserVM.setCreatedDate(updatedUser.getCreatedDate()); - managedUserVM.setLastModifiedBy(updatedUser.getLastModifiedBy()); - managedUserVM.setLastModifiedDate(updatedUser.getLastModifiedDate()); - managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - restUserMockMvc.perform( - put("/api/users") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) - .andExpect(status().isOk()); - - // Validate the User in the database - List userList = userRepository.findAll(); - assertThat(userList).hasSize(databaseSizeBeforeUpdate); - User testUser = userList.get(userList.size() - 1); - assertThat(testUser.getLogin()).isEqualTo(UPDATED_LOGIN); - assertThat(testUser.getFirstName()).isEqualTo(UPDATED_FIRSTNAME); - assertThat(testUser.getLastName()).isEqualTo(UPDATED_LASTNAME); - assertThat(testUser.getEmail()).isEqualTo(UPDATED_EMAIL); - assertThat(testUser.getImageUrl()).isEqualTo(UPDATED_IMAGEURL); - assertThat(testUser.getLangKey()).isEqualTo(UPDATED_LANGKEY); - } - - @Test - @Transactional - public void updateUserExistingEmail() throws Exception { - // Initialize the database with 2 users - userRepository.saveAndFlush(user); - - User anotherUser = new User(); - anotherUser.setLogin("jhipster"); - anotherUser.setPassword(RandomStringUtils.random(60)); - anotherUser.setActivated(true); - anotherUser.setEmail("jhipster@localhost"); - anotherUser.setFirstName("java"); - anotherUser.setLastName("hipster"); - anotherUser.setImageUrl(""); - anotherUser.setLangKey("en"); - userRepository.saveAndFlush(anotherUser); - - // Update the user - User updatedUser = userRepository.findById(user.getId()).get(); - - ManagedUserVM managedUserVM = new ManagedUserVM(); - managedUserVM.setId(updatedUser.getId()); - managedUserVM.setLogin(updatedUser.getLogin()); - managedUserVM.setPassword(updatedUser.getPassword()); - managedUserVM.setFirstName(updatedUser.getFirstName()); - managedUserVM.setLastName(updatedUser.getLastName()); - managedUserVM.setEmail("jhipster@localhost");// this email should already be used by anotherUser - managedUserVM.setActivated(updatedUser.getActivated()); - managedUserVM.setImageUrl(updatedUser.getImageUrl()); - managedUserVM.setLangKey(updatedUser.getLangKey()); - managedUserVM.setCreatedBy(updatedUser.getCreatedBy()); - managedUserVM.setCreatedDate(updatedUser.getCreatedDate()); - managedUserVM.setLastModifiedBy(updatedUser.getLastModifiedBy()); - managedUserVM.setLastModifiedDate(updatedUser.getLastModifiedDate()); - managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - restUserMockMvc.perform( - put("/api/users") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) - .andExpect(status().isBadRequest()); - } - - @Test - @Transactional - public void updateUserExistingLogin() throws Exception { - // Initialize the database - userRepository.saveAndFlush(user); - - User anotherUser = new User(); - anotherUser.setLogin("jhipster"); - anotherUser.setPassword(RandomStringUtils.random(60)); - anotherUser.setActivated(true); - anotherUser.setEmail("jhipster@localhost"); - anotherUser.setFirstName("java"); - anotherUser.setLastName("hipster"); - anotherUser.setImageUrl(""); - anotherUser.setLangKey("en"); - userRepository.saveAndFlush(anotherUser); - - // Update the user - User updatedUser = userRepository.findById(user.getId()).get(); - - ManagedUserVM managedUserVM = new ManagedUserVM(); - managedUserVM.setId(updatedUser.getId()); - managedUserVM.setLogin("jhipster");// this login should already be used by anotherUser - managedUserVM.setPassword(updatedUser.getPassword()); - managedUserVM.setFirstName(updatedUser.getFirstName()); - managedUserVM.setLastName(updatedUser.getLastName()); - managedUserVM.setEmail(updatedUser.getEmail()); - managedUserVM.setActivated(updatedUser.getActivated()); - managedUserVM.setImageUrl(updatedUser.getImageUrl()); - managedUserVM.setLangKey(updatedUser.getLangKey()); - managedUserVM.setCreatedBy(updatedUser.getCreatedBy()); - managedUserVM.setCreatedDate(updatedUser.getCreatedDate()); - managedUserVM.setLastModifiedBy(updatedUser.getLastModifiedBy()); - managedUserVM.setLastModifiedDate(updatedUser.getLastModifiedDate()); - managedUserVM.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - restUserMockMvc.perform( - put("/api/users") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(managedUserVM))) - .andExpect(status().isBadRequest()); - } - - @Test - @Transactional - public void deleteUser() throws Exception { - // Initialize the database - userRepository.saveAndFlush(user); - int databaseSizeBeforeDelete = userRepository.findAll().size(); - - // Delete the user - restUserMockMvc.perform( - delete("/api/users/{login}", user.getLogin()) - .accept(TestUtil.APPLICATION_JSON_UTF8)) - .andExpect(status().isOk()); - - assertThat(cacheManager.getCache(UserRepository.USERS_BY_LOGIN_CACHE).get(user.getLogin())).isNull(); - - // Validate the database is empty - List userList = userRepository.findAll(); - assertThat(userList).hasSize(databaseSizeBeforeDelete - 1); - } - - @Test - @Transactional - public void getAllAuthorities() throws Exception { - restUserMockMvc.perform( - get("/api/users/authorities") - .accept(TestUtil.APPLICATION_JSON_UTF8) - .contentType(TestUtil.APPLICATION_JSON_UTF8)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$").isArray()) - .andExpect(jsonPath("$").value(hasItems(AuthoritiesConstants.USER, AuthoritiesConstants.ADMIN))); - } - - @Test - @Transactional - public void testUserEquals() throws Exception { - TestUtil.equalsVerifier(User.class); - User user1 = new User(); - user1.setId(1L); - User user2 = new User(); - user2.setId(user1.getId()); - assertThat(user1).isEqualTo(user2); - user2.setId(2L); - assertThat(user1).isNotEqualTo(user2); - user1.setId(null); - assertThat(user1).isNotEqualTo(user2); - } - - @Test - public void testUserDTOtoUser() { - UserDTO userDTO = new UserDTO(); - userDTO.setId(DEFAULT_ID); - userDTO.setLogin(DEFAULT_LOGIN); - userDTO.setFirstName(DEFAULT_FIRSTNAME); - userDTO.setLastName(DEFAULT_LASTNAME); - userDTO.setEmail(DEFAULT_EMAIL); - userDTO.setActivated(true); - userDTO.setImageUrl(DEFAULT_IMAGEURL); - userDTO.setLangKey(DEFAULT_LANGKEY); - userDTO.setCreatedBy(DEFAULT_LOGIN); - userDTO.setLastModifiedBy(DEFAULT_LOGIN); - userDTO.setAuthorities(Collections.singleton(AuthoritiesConstants.USER)); - - User user = userMapper.userDTOToUser(userDTO); - assertThat(user.getId()).isEqualTo(DEFAULT_ID); - assertThat(user.getLogin()).isEqualTo(DEFAULT_LOGIN); - assertThat(user.getFirstName()).isEqualTo(DEFAULT_FIRSTNAME); - assertThat(user.getLastName()).isEqualTo(DEFAULT_LASTNAME); - assertThat(user.getEmail()).isEqualTo(DEFAULT_EMAIL); - assertThat(user.getActivated()).isEqualTo(true); - assertThat(user.getImageUrl()).isEqualTo(DEFAULT_IMAGEURL); - assertThat(user.getLangKey()).isEqualTo(DEFAULT_LANGKEY); - assertThat(user.getCreatedBy()).isNull(); - assertThat(user.getCreatedDate()).isNotNull(); - assertThat(user.getLastModifiedBy()).isNull(); - assertThat(user.getLastModifiedDate()).isNotNull(); - assertThat(user.getAuthorities()).extracting("name").containsExactly(AuthoritiesConstants.USER); - } - - @Test - public void testUserToUserDTO() { - user.setId(DEFAULT_ID); - user.setCreatedBy(DEFAULT_LOGIN); - user.setCreatedDate(Instant.now()); - user.setLastModifiedBy(DEFAULT_LOGIN); - user.setLastModifiedDate(Instant.now()); - Set authorities = new HashSet<>(); - Authority authority = new Authority(); - authority.setName(AuthoritiesConstants.USER); - authorities.add(authority); - user.setAuthorities(authorities); - - UserDTO userDTO = userMapper.userToUserDTO(user); - - assertThat(userDTO.getId()).isEqualTo(DEFAULT_ID); - assertThat(userDTO.getLogin()).isEqualTo(DEFAULT_LOGIN); - assertThat(userDTO.getFirstName()).isEqualTo(DEFAULT_FIRSTNAME); - assertThat(userDTO.getLastName()).isEqualTo(DEFAULT_LASTNAME); - assertThat(userDTO.getEmail()).isEqualTo(DEFAULT_EMAIL); - assertThat(userDTO.isActivated()).isEqualTo(true); - assertThat(userDTO.getImageUrl()).isEqualTo(DEFAULT_IMAGEURL); - assertThat(userDTO.getLangKey()).isEqualTo(DEFAULT_LANGKEY); - assertThat(userDTO.getCreatedBy()).isEqualTo(DEFAULT_LOGIN); - assertThat(userDTO.getCreatedDate()).isEqualTo(user.getCreatedDate()); - assertThat(userDTO.getLastModifiedBy()).isEqualTo(DEFAULT_LOGIN); - assertThat(userDTO.getLastModifiedDate()).isEqualTo(user.getLastModifiedDate()); - assertThat(userDTO.getAuthorities()).containsExactly(AuthoritiesConstants.USER); - assertThat(userDTO.toString()).isNotNull(); - } - - @Test - public void testAuthorityEquals() { - Authority authorityA = new Authority(); - assertThat(authorityA).isEqualTo(authorityA); - assertThat(authorityA).isNotEqualTo(null); - assertThat(authorityA).isNotEqualTo(new Object()); - assertThat(authorityA.hashCode()).isEqualTo(0); - assertThat(authorityA.toString()).isNotNull(); - - Authority authorityB = new Authority(); - assertThat(authorityA).isEqualTo(authorityB); - - authorityB.setName(AuthoritiesConstants.ADMIN); - assertThat(authorityA).isNotEqualTo(authorityB); - - authorityA.setName(AuthoritiesConstants.USER); - assertThat(authorityA).isNotEqualTo(authorityB); - - authorityB.setName(AuthoritiesConstants.USER); - assertThat(authorityA).isEqualTo(authorityB); - assertThat(authorityA.hashCode()).isEqualTo(authorityB.hashCode()); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/UserRoleAssignmentResourceIntTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/UserRoleAssignmentResourceIntTest.java deleted file mode 100644 index cfadadd8..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/UserRoleAssignmentResourceIntTest.java +++ /dev/null @@ -1,552 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.hamcrest.Matchers.hasItem; -import static org.hostsharing.hsadminng.web.rest.TestUtil.createFormattingConversionService; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; - -import org.hostsharing.hsadminng.HsadminNgApp; -import org.hostsharing.hsadminng.domain.User; -import org.hostsharing.hsadminng.domain.UserRoleAssignment; -import org.hostsharing.hsadminng.repository.UserRoleAssignmentRepository; -import org.hostsharing.hsadminng.service.UserRoleAssignmentQueryService; -import org.hostsharing.hsadminng.service.UserRoleAssignmentService; -import org.hostsharing.hsadminng.service.accessfilter.Role; -import org.hostsharing.hsadminng.service.accessfilter.Role.Admin; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerContractualContact; -import org.hostsharing.hsadminng.service.accessfilter.Role.CustomerTechnicalContact; -import org.hostsharing.hsadminng.service.accessfilter.SecurityContextFake; -import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.MockitoAnnotations; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.data.web.PageableHandlerMethodArgumentResolver; -import org.springframework.http.MediaType; -import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.validation.Validator; - -import java.util.List; - -import javax.persistence.EntityManager; - -/** - * Test class for the UserRoleAssignmentResource REST controller. - * - * @see UserRoleAssignmentResource - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = { HsadminNgApp.class }) -public class UserRoleAssignmentResourceIntTest { - - private static final String DEFAULT_ENTITY_TYPE_ID = "AAAAAAAAAA"; - private static final String UPDATED_ENTITY_TYPE_ID = "BBBBBBBBBB"; - - private static final Long DEFAULT_ENTITY_OBJECT_ID = 1L; - private static final Long UPDATED_ENTITY_OBJECT_ID = 2L; - - private static final Role DEFAULT_ASSIGNED_ROLE = CustomerTechnicalContact.ROLE; - private static final Role UPDATED_ASSIGNED_ROLE = CustomerContractualContact.ROLE; - - @Autowired - private UserRoleAssignmentRepository userRoleAssignmentRepository; - - @Autowired - private UserRoleAssignmentService userRoleAssignmentService; - - @Autowired - private UserRoleAssignmentQueryService userRoleAssignmentQueryService; - - @Autowired - private MappingJackson2HttpMessageConverter jacksonMessageConverter; - - @Autowired - private PageableHandlerMethodArgumentResolver pageableArgumentResolver; - - @Autowired - private ExceptionTranslator exceptionTranslator; - - @Autowired - private EntityManager em; - - @Autowired - private Validator validator; - - private MockMvc restUserRoleAssignmentMockMvc; - - private UserRoleAssignment userRoleAssignment; - - @Before - public void setup() { - MockitoAnnotations.initMocks(this); - final UserRoleAssignmentResource userRoleAssignmentResource = new UserRoleAssignmentResource( - userRoleAssignmentService, - userRoleAssignmentQueryService); - this.restUserRoleAssignmentMockMvc = MockMvcBuilders.standaloneSetup(userRoleAssignmentResource) - .setCustomArgumentResolvers(pageableArgumentResolver) - .setControllerAdvice(exceptionTranslator) - .setConversionService(createFormattingConversionService()) - .setMessageConverters(jacksonMessageConverter) - .setValidator(validator) - .build(); - - SecurityContextFake.havingAuthenticatedUser().withAuthority(Role.Supporter.ROLE.authority()); - } - - /** - * Create an entity for this test. - * - * This is a static method, as tests for other entities might also need it, - * if they test an entity which requires the current entity. - */ - public static UserRoleAssignment createEntity(EntityManager em) { - User user = UserResourceIntTest.createEntity(em); - em.persist(user); - em.flush(); - return new UserRoleAssignment() - .entityTypeId(DEFAULT_ENTITY_TYPE_ID) - .entityObjectId(DEFAULT_ENTITY_OBJECT_ID) - .user(user) - .assignedRole(DEFAULT_ASSIGNED_ROLE); - } - - @Before - public void initTest() { - userRoleAssignment = createEntity(em); - } - - @Test - @Transactional - public void createUserRoleAssignment() throws Exception { - int databaseSizeBeforeCreate = userRoleAssignmentRepository.findAll().size(); - - // Create the UserRoleAssignment - SecurityContextFake.havingAuthenticatedUser().withAuthority(Admin.ROLE.authority()); - restUserRoleAssignmentMockMvc.perform( - post("/api/user-role-assignments") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(userRoleAssignment))) - .andExpect(status().isCreated()); - - // Validate the UserRoleAssignment in the database - List userRoleAssignmentList = userRoleAssignmentRepository.findAll(); - assertThat(userRoleAssignmentList).hasSize(databaseSizeBeforeCreate + 1); - UserRoleAssignment testUserRoleAssignment = userRoleAssignmentList.get(userRoleAssignmentList.size() - 1); - assertThat(testUserRoleAssignment.getEntityTypeId()).isEqualTo(DEFAULT_ENTITY_TYPE_ID); - assertThat(testUserRoleAssignment.getEntityObjectId()).isEqualTo(DEFAULT_ENTITY_OBJECT_ID); - assertThat(testUserRoleAssignment.getAssignedRole().name()).isEqualTo(DEFAULT_ASSIGNED_ROLE.name()); - assertThat(testUserRoleAssignment.getAssignedRole()).isEqualTo(DEFAULT_ASSIGNED_ROLE); - } - - @Test - @Transactional - public void createUserRoleAssignmentWithExistingId() throws Exception { - int databaseSizeBeforeCreate = userRoleAssignmentRepository.findAll().size(); - - // Create the UserRoleAssignment with an existing ID - userRoleAssignment.setId(1L); - - // An entity with an existing ID cannot be created, so this API call must fail - restUserRoleAssignmentMockMvc.perform( - post("/api/user-role-assignments") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(userRoleAssignment))) - .andExpect(status().isBadRequest()); - - // Validate the UserRoleAssignment in the database - List userRoleAssignmentList = userRoleAssignmentRepository.findAll(); - assertThat(userRoleAssignmentList).hasSize(databaseSizeBeforeCreate); - } - - @Test - @Transactional - public void checkEntityTypeIdIsRequired() throws Exception { - int databaseSizeBeforeTest = userRoleAssignmentRepository.findAll().size(); - // set the field null - userRoleAssignment.setEntityTypeId(null); - - // Create the UserRoleAssignment, which fails. - - restUserRoleAssignmentMockMvc.perform( - post("/api/user-role-assignments") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(userRoleAssignment))) - .andExpect(status().isBadRequest()); - - List userRoleAssignmentList = userRoleAssignmentRepository.findAll(); - assertThat(userRoleAssignmentList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkEntityObjectIdIsRequired() throws Exception { - int databaseSizeBeforeTest = userRoleAssignmentRepository.findAll().size(); - // set the field null - userRoleAssignment.setEntityObjectId(null); - - // Create the UserRoleAssignment, which fails. - - restUserRoleAssignmentMockMvc.perform( - post("/api/user-role-assignments") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(userRoleAssignment))) - .andExpect(status().isBadRequest()); - - List userRoleAssignmentList = userRoleAssignmentRepository.findAll(); - assertThat(userRoleAssignmentList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void checkAssignedRoleIsRequired() throws Exception { - int databaseSizeBeforeTest = userRoleAssignmentRepository.findAll().size(); - // set the field null - userRoleAssignment.setAssignedRole(null); - - // Create the UserRoleAssignment, which fails. - - restUserRoleAssignmentMockMvc.perform( - post("/api/user-role-assignments") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(userRoleAssignment))) - .andExpect(status().isBadRequest()); - - List userRoleAssignmentList = userRoleAssignmentRepository.findAll(); - assertThat(userRoleAssignmentList).hasSize(databaseSizeBeforeTest); - } - - @Test - @Transactional - public void getAllUserRoleAssignments() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get all the userRoleAssignmentList - restUserRoleAssignmentMockMvc.perform(get("/api/user-role-assignments?sort=id,desc")) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].id").value(hasItem(userRoleAssignment.getId().intValue()))) - .andExpect(jsonPath("$.[*].entityTypeId").value(hasItem(DEFAULT_ENTITY_TYPE_ID))) - .andExpect(jsonPath("$.[*].entityObjectId").value(hasItem(DEFAULT_ENTITY_OBJECT_ID.intValue()))) - .andExpect(jsonPath("$.[*].assignedRole").value(hasItem(DEFAULT_ASSIGNED_ROLE.name()))); - } - - @Test - @Transactional - public void getUserRoleAssignment() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get the userRoleAssignment - restUserRoleAssignmentMockMvc.perform(get("/api/user-role-assignments/{id}", userRoleAssignment.getId())) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.id").value(userRoleAssignment.getId().intValue())) - .andExpect(jsonPath("$.entityTypeId").value(DEFAULT_ENTITY_TYPE_ID)) - .andExpect(jsonPath("$.entityObjectId").value(DEFAULT_ENTITY_OBJECT_ID.intValue())) - .andExpect(jsonPath("$.assignedRole").value(DEFAULT_ASSIGNED_ROLE.name())); - } - - @Test - @Transactional - public void getAllUserRoleAssignmentsByEntityTypeIdIsEqualToSomething() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get all the userRoleAssignmentList where entityTypeId equals to DEFAULT_ENTITY_TYPE_ID - defaultUserRoleAssignmentShouldBeFound("entityTypeId.equals=" + DEFAULT_ENTITY_TYPE_ID); - - // Get all the userRoleAssignmentList where entityTypeId equals to UPDATED_ENTITY_TYPE_ID - defaultUserRoleAssignmentShouldNotBeFound("entityTypeId.equals=" + UPDATED_ENTITY_TYPE_ID); - } - - @Test - @Transactional - public void getAllUserRoleAssignmentsByEntityTypeIdIsInShouldWork() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get all the userRoleAssignmentList where entityTypeId in DEFAULT_ENTITY_TYPE_ID or UPDATED_ENTITY_TYPE_ID - defaultUserRoleAssignmentShouldBeFound("entityTypeId.in=" + DEFAULT_ENTITY_TYPE_ID + "," + UPDATED_ENTITY_TYPE_ID); - - // Get all the userRoleAssignmentList where entityTypeId equals to UPDATED_ENTITY_TYPE_ID - defaultUserRoleAssignmentShouldNotBeFound("entityTypeId.in=" + UPDATED_ENTITY_TYPE_ID); - } - - @Test - @Transactional - public void getAllUserRoleAssignmentsByEntityTypeIdIsNullOrNotNull() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get all the userRoleAssignmentList where entityTypeId is not null - defaultUserRoleAssignmentShouldBeFound("entityTypeId.specified=true"); - - // Get all the userRoleAssignmentList where entityTypeId is null - defaultUserRoleAssignmentShouldNotBeFound("entityTypeId.specified=false"); - } - - @Test - @Transactional - public void getAllUserRoleAssignmentsByEntityObjectIdIsEqualToSomething() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get all the userRoleAssignmentList where entityObjectId equals to DEFAULT_ENTITY_OBJECT_ID - defaultUserRoleAssignmentShouldBeFound("entityObjectId.equals=" + DEFAULT_ENTITY_OBJECT_ID); - - // Get all the userRoleAssignmentList where entityObjectId equals to UPDATED_ENTITY_OBJECT_ID - defaultUserRoleAssignmentShouldNotBeFound("entityObjectId.equals=" + UPDATED_ENTITY_OBJECT_ID); - } - - @Test - @Transactional - public void getAllUserRoleAssignmentsByEntityObjectIdIsInShouldWork() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get all the userRoleAssignmentList where entityObjectId in DEFAULT_ENTITY_OBJECT_ID or UPDATED_ENTITY_OBJECT_ID - defaultUserRoleAssignmentShouldBeFound( - "entityObjectId.in=" + DEFAULT_ENTITY_OBJECT_ID + "," + UPDATED_ENTITY_OBJECT_ID); - - // Get all the userRoleAssignmentList where entityObjectId equals to UPDATED_ENTITY_OBJECT_ID - defaultUserRoleAssignmentShouldNotBeFound("entityObjectId.in=" + UPDATED_ENTITY_OBJECT_ID); - } - - @Test - @Transactional - public void getAllUserRoleAssignmentsByEntityObjectIdIsNullOrNotNull() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get all the userRoleAssignmentList where entityObjectId is not null - defaultUserRoleAssignmentShouldBeFound("entityObjectId.specified=true"); - - // Get all the userRoleAssignmentList where entityObjectId is null - defaultUserRoleAssignmentShouldNotBeFound("entityObjectId.specified=false"); - } - - @Test - @Transactional - public void getAllUserRoleAssignmentsByEntityObjectIdIsGreaterThanOrEqualToSomething() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get all the userRoleAssignmentList where entityObjectId greater than or equals to DEFAULT_ENTITY_OBJECT_ID - defaultUserRoleAssignmentShouldBeFound("entityObjectId.greaterOrEqualThan=" + DEFAULT_ENTITY_OBJECT_ID); - - // Get all the userRoleAssignmentList where entityObjectId greater than or equals to UPDATED_ENTITY_OBJECT_ID - defaultUserRoleAssignmentShouldNotBeFound("entityObjectId.greaterOrEqualThan=" + UPDATED_ENTITY_OBJECT_ID); - } - - @Test - @Transactional - public void getAllUserRoleAssignmentsByEntityObjectIdIsLessThanSomething() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get all the userRoleAssignmentList where entityObjectId less than or equals to DEFAULT_ENTITY_OBJECT_ID - defaultUserRoleAssignmentShouldNotBeFound("entityObjectId.lessThan=" + DEFAULT_ENTITY_OBJECT_ID); - - // Get all the userRoleAssignmentList where entityObjectId less than or equals to UPDATED_ENTITY_OBJECT_ID - defaultUserRoleAssignmentShouldBeFound("entityObjectId.lessThan=" + UPDATED_ENTITY_OBJECT_ID); - } - - @Test - @Transactional - public void getAllUserRoleAssignmentsByAssignedRoleIsEqualToSomething() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get all the userRoleAssignmentList where assignedRole equals to DEFAULT_ASSIGNED_ROLE - defaultUserRoleAssignmentShouldBeFound("assignedRole.equals=" + DEFAULT_ASSIGNED_ROLE.name()); - - // Get all the userRoleAssignmentList where assignedRole equals to UPDATED_ASSIGNED_ROLE - defaultUserRoleAssignmentShouldNotBeFound("assignedRole.equals=" + UPDATED_ASSIGNED_ROLE.name()); - } - - @Test - @Transactional - public void getAllUserRoleAssignmentsByAssignedRoleIsInShouldWork() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get all the userRoleAssignmentList where assignedRole in DEFAULT_ASSIGNED_ROLE or UPDATED_ASSIGNED_ROLE - defaultUserRoleAssignmentShouldBeFound( - "assignedRole.in=" + DEFAULT_ASSIGNED_ROLE.name() + "," + UPDATED_ASSIGNED_ROLE.name()); - - // Get all the userRoleAssignmentList where assignedRole equals to UPDATED_ASSIGNED_ROLE - defaultUserRoleAssignmentShouldNotBeFound("assignedRole.in=" + UPDATED_ASSIGNED_ROLE.name()); - } - - @Test - @Transactional - public void getAllUserRoleAssignmentsByAssignedRoleIsNullOrNotNull() throws Exception { - // Initialize the database - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - - // Get all the userRoleAssignmentList where assignedRole is not null - defaultUserRoleAssignmentShouldBeFound("assignedRole.specified=true"); - - // Get all the userRoleAssignmentList where assignedRole is null - defaultUserRoleAssignmentShouldNotBeFound("assignedRole.specified=false"); - } - - @Test - @Transactional - public void getAllUserRoleAssignmentsByUserIsEqualToSomething() throws Exception { - // Initialize the database - User user = UserResourceIntTest.createEntity(em); - em.persist(user); - em.flush(); - userRoleAssignment.setUser(user); - userRoleAssignmentRepository.saveAndFlush(userRoleAssignment); - Long userId = user.getId(); - - // Get all the userRoleAssignmentList where user equals to userId - defaultUserRoleAssignmentShouldBeFound("userId.equals=" + userId); - - // Get all the userRoleAssignmentList where user equals to userId + 1 - defaultUserRoleAssignmentShouldNotBeFound("userId.equals=" + (userId + 1)); - } - - /** - * Executes the search, and checks that the default entity is returned - */ - private void defaultUserRoleAssignmentShouldBeFound(String filter) throws Exception { - restUserRoleAssignmentMockMvc.perform(get("/api/user-role-assignments?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$.[*].id").value(hasItem(userRoleAssignment.getId().intValue()))) - .andExpect(jsonPath("$.[*].entityTypeId").value(hasItem(DEFAULT_ENTITY_TYPE_ID))) - .andExpect(jsonPath("$.[*].entityObjectId").value(hasItem(DEFAULT_ENTITY_OBJECT_ID.intValue()))) - .andExpect(jsonPath("$.[*].assignedRole").value(hasItem(DEFAULT_ASSIGNED_ROLE.name()))); - - // Check, that the count call also returns 1 - restUserRoleAssignmentMockMvc.perform(get("/api/user-role-assignments/count?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(content().string("1")); - } - - /** - * Executes the search, and checks that the default entity is not returned - */ - private void defaultUserRoleAssignmentShouldNotBeFound(String filter) throws Exception { - restUserRoleAssignmentMockMvc.perform(get("/api/user-role-assignments?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(jsonPath("$").isArray()) - .andExpect(jsonPath("$").isEmpty()); - - // Check, that the count call also returns 0 - restUserRoleAssignmentMockMvc.perform(get("/api/user-role-assignments/count?sort=id,desc&" + filter)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) - .andExpect(content().string("0")); - } - - @Test - @Transactional - public void getNonExistingUserRoleAssignment() throws Exception { - // Get the userRoleAssignment - restUserRoleAssignmentMockMvc.perform(get("/api/user-role-assignments/{id}", Long.MAX_VALUE)) - .andExpect(status().isNotFound()); - } - - @Test - @Transactional - public void updateUserRoleAssignment() throws Exception { - // Initialize the database - userRoleAssignmentService.save(userRoleAssignment); - - int databaseSizeBeforeUpdate = userRoleAssignmentRepository.findAll().size(); - - // Update the userRoleAssignment - SecurityContextFake.havingAuthenticatedUser().withAuthority(Admin.ROLE.authority()); - UserRoleAssignment updatedUserRoleAssignment = userRoleAssignmentRepository.findById(userRoleAssignment.getId()).get(); - // Disconnect from session so that the updates on updatedUserRoleAssignment are not directly saved in db - em.detach(updatedUserRoleAssignment); - updatedUserRoleAssignment - .entityTypeId(UPDATED_ENTITY_TYPE_ID) - .entityObjectId(UPDATED_ENTITY_OBJECT_ID) - .assignedRole(UPDATED_ASSIGNED_ROLE); - - restUserRoleAssignmentMockMvc.perform( - put("/api/user-role-assignments") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(updatedUserRoleAssignment))) - .andExpect(status().isOk()); - - // Validate the UserRoleAssignment in the database - List userRoleAssignmentList = userRoleAssignmentRepository.findAll(); - assertThat(userRoleAssignmentList).hasSize(databaseSizeBeforeUpdate); - UserRoleAssignment testUserRoleAssignment = userRoleAssignmentList.get(userRoleAssignmentList.size() - 1); - assertThat(testUserRoleAssignment.getEntityTypeId()).isEqualTo(UPDATED_ENTITY_TYPE_ID); - assertThat(testUserRoleAssignment.getEntityObjectId()).isEqualTo(UPDATED_ENTITY_OBJECT_ID); - assertThat(testUserRoleAssignment.getAssignedRole().name()).isEqualTo(UPDATED_ASSIGNED_ROLE.name()); - assertThat(testUserRoleAssignment.getAssignedRole()).isEqualTo(UPDATED_ASSIGNED_ROLE); - } - - @Test - @Transactional - public void updateNonExistingUserRoleAssignment() throws Exception { - int databaseSizeBeforeUpdate = userRoleAssignmentRepository.findAll().size(); - - // Create the UserRoleAssignment - - // If the entity doesn't have an ID, it will throw BadRequestAlertException - restUserRoleAssignmentMockMvc.perform( - put("/api/user-role-assignments") - .contentType(TestUtil.APPLICATION_JSON_UTF8) - .content(TestUtil.convertObjectToJsonBytes(userRoleAssignment))) - .andExpect(status().isBadRequest()); - - // Validate the UserRoleAssignment in the database - List userRoleAssignmentList = userRoleAssignmentRepository.findAll(); - assertThat(userRoleAssignmentList).hasSize(databaseSizeBeforeUpdate); - } - - @Test - @Transactional - public void deleteUserRoleAssignment() throws Exception { - // Initialize the database - userRoleAssignmentService.save(userRoleAssignment); - - int databaseSizeBeforeDelete = userRoleAssignmentRepository.findAll().size(); - - // Delete the userRoleAssignment - restUserRoleAssignmentMockMvc.perform( - delete("/api/user-role-assignments/{id}", userRoleAssignment.getId()) - .accept(TestUtil.APPLICATION_JSON_UTF8)) - .andExpect(status().isOk()); - - // Validate the database is empty - List userRoleAssignmentList = userRoleAssignmentRepository.findAll(); - assertThat(userRoleAssignmentList).hasSize(databaseSizeBeforeDelete - 1); - } - - @Test - @Transactional - public void equalsVerifier() throws Exception { - TestUtil.equalsVerifier(UserRoleAssignment.class); - UserRoleAssignment userRoleAssignment1 = new UserRoleAssignment(); - userRoleAssignment1.setId(1L); - UserRoleAssignment userRoleAssignment2 = new UserRoleAssignment(); - userRoleAssignment2.setId(userRoleAssignment1.getId()); - assertThat(userRoleAssignment1).isEqualTo(userRoleAssignment2); - userRoleAssignment2.setId(2L); - assertThat(userRoleAssignment1).isNotEqualTo(userRoleAssignment2); - userRoleAssignment1.setId(null); - assertThat(userRoleAssignment1).isNotEqualTo(userRoleAssignment2); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/UserRoleAssignmentResourceUnitTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/UserRoleAssignmentResourceUnitTest.java deleted file mode 100644 index d5774a42..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/UserRoleAssignmentResourceUnitTest.java +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.ThrowableAssert.catchThrowable; - -import org.hostsharing.hsadminng.domain.UserRoleAssignment; -import org.hostsharing.hsadminng.service.dto.UserRoleAssignmentUnitTest; -import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException; - -import org.junit.Rule; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; - -// Currently this class tests mostly special 'bad paths' -// which make little sense to test in *ResourceIntTest. -public class UserRoleAssignmentResourceUnitTest { - - @Rule - public MockitoRule mockitoRule = MockitoJUnit.rule(); - - @InjectMocks - private UserRoleAssignmentResource userRoleAssignmentResource; - - @Test - public void createUserRoleAssignmentWithoutIdThrowsBadRequestException() { - - // given - final UserRoleAssignment givenEntity = UserRoleAssignmentUnitTest.createSomeUserRoleAssignment(null); - - // when - final Throwable actual = catchThrowable(() -> userRoleAssignmentResource.updateUserRoleAssignment(givenEntity)); - - // then - assertThat(actual).isInstanceOfSatisfying(BadRequestAlertException.class, bre -> { - assertThat(bre.getErrorKey()).isEqualTo("idnull"); - assertThat(bre.getParam()).isEqualTo("userRoleAssignment"); - }); - } - - @Test - public void createUserRoleAssignmentWithIdThrowsBadRequestException() { - - // given - final UserRoleAssignment givenEntity = UserRoleAssignmentUnitTest.createSomeUserRoleAssignment(1L); - - // when - final Throwable actual = catchThrowable(() -> userRoleAssignmentResource.createUserRoleAssignment(givenEntity)); - - // then - assertThat(actual).isInstanceOfSatisfying(BadRequestAlertException.class, bre -> { - assertThat(bre.getErrorKey()).isEqualTo("idexists"); - assertThat(bre.getParam()).isEqualTo("userRoleAssignment"); - }); - } -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/errors/ExceptionTranslatorIntTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/errors/ExceptionTranslatorIntTest.java deleted file mode 100644 index d99a9669..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/errors/ExceptionTranslatorIntTest.java +++ /dev/null @@ -1,152 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.errors; - -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -import org.hostsharing.hsadminng.HsadminNgApp; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.http.MediaType; -import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; - -/** - * Test class for the ExceptionTranslator controller advice. - * - * @see ExceptionTranslator - */ -@RunWith(SpringRunner.class) -@SpringBootTest(classes = HsadminNgApp.class) -public class ExceptionTranslatorIntTest { - - @Autowired - private ExceptionTranslatorTestController controller; - - @Autowired - private ExceptionTranslator exceptionTranslator; - - @Autowired - private MappingJackson2HttpMessageConverter jacksonMessageConverter; - - private MockMvc mockMvc; - - @Before - public void setup() { - mockMvc = MockMvcBuilders.standaloneSetup(controller) - .setControllerAdvice(exceptionTranslator) - .setMessageConverters(jacksonMessageConverter) - .build(); - } - - @Test - public void testConcurrencyFailure() throws Exception { - mockMvc.perform(get("/test/concurrency-failure")) - .andExpect(status().isConflict()) - .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) - .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_CONCURRENCY_FAILURE)); - } - - @Test - public void testMethodArgumentNotValid() throws Exception { - mockMvc.perform(post("/test/method-argument").content("{}").contentType(MediaType.APPLICATION_JSON)) - .andExpect(status().isBadRequest()) - .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) - .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_VALIDATION)) - .andExpect(jsonPath("$.fieldErrors.[0].objectName").value("testDTO")) - .andExpect(jsonPath("$.fieldErrors.[0].field").value("test")) - .andExpect(jsonPath("$.fieldErrors.[0].message").value("NotNull")); - } - - @Test - public void testParameterizedError() throws Exception { - mockMvc.perform(get("/test/parameterized-error")) - .andExpect(status().isBadRequest()) - .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) - .andExpect(jsonPath("$.message").value("test parameterized error")) - .andExpect(jsonPath("$.params.param0").value("param0_value")) - .andExpect(jsonPath("$.params.param1").value("param1_value")); - } - - @Test - public void testParameterizedError2() throws Exception { - mockMvc.perform(get("/test/parameterized-error2")) - .andExpect(status().isBadRequest()) - .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) - .andExpect(jsonPath("$.message").value("test parameterized error")) - .andExpect(jsonPath("$.params.foo").value("foo_value")) - .andExpect(jsonPath("$.params.bar").value("bar_value")); - } - - @Test - public void testMissingServletRequestPartException() throws Exception { - mockMvc.perform(get("/test/missing-servlet-request-part")) - .andExpect(status().isBadRequest()) - .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) - .andExpect(jsonPath("$.message").value("error.http.400")); - } - - @Test - public void testMissingServletRequestParameterException() throws Exception { - mockMvc.perform(get("/test/missing-servlet-request-parameter")) - .andExpect(status().isBadRequest()) - .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) - .andExpect(jsonPath("$.message").value("error.http.400")); - } - - @Test - public void testAccessDenied() throws Exception { - mockMvc.perform(get("/test/access-denied")) - .andExpect(status().isForbidden()) - .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) - .andExpect(jsonPath("$.message").value("error.http.403")) - .andExpect(jsonPath("$.detail").value("test access denied!")); - } - - @Test - public void testUnauthorized() throws Exception { - mockMvc.perform(get("/test/unauthorized")) - .andExpect(status().isUnauthorized()) - .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) - .andExpect(jsonPath("$.message").value("error.http.401")) - .andExpect(jsonPath("$.path").value("/test/unauthorized")) - .andExpect(jsonPath("$.detail").value("test authentication failed!")); - } - - @Test - public void testMethodNotSupported() throws Exception { - mockMvc.perform(post("/test/access-denied")) - .andExpect(status().isMethodNotAllowed()) - .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) - .andExpect(jsonPath("$.message").value("error.http.405")) - .andExpect(jsonPath("$.detail").value("Request method 'POST' not supported")); - } - - @Test - public void testExceptionWithResponseStatus() throws Exception { - mockMvc.perform(get("/test/response-status")) - .andExpect(status().isBadRequest()) - .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) - .andExpect(jsonPath("$.message").value("error.http.400")) - .andExpect(jsonPath("$.title").value("test response status")); - } - - @Test - public void testInternalServerError() throws Exception { - mockMvc.perform(get("/test/internal-server-error")) - .andExpect(status().isInternalServerError()) - .andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON)) - .andExpect(jsonPath("$.message").value("error.http.500")) - .andExpect(jsonPath("$.title").value("Internal Server Error")); - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/errors/ExceptionTranslatorTestController.java b/src/test/java/org/hostsharing/hsadminng/web/rest/errors/ExceptionTranslatorTestController.java deleted file mode 100644 index 4465a55a..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/errors/ExceptionTranslatorTestController.java +++ /dev/null @@ -1,88 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.errors; - -import org.springframework.dao.ConcurrencyFailureException; -import org.springframework.http.HttpStatus; -import org.springframework.security.access.AccessDeniedException; -import org.springframework.security.authentication.BadCredentialsException; -import org.springframework.web.bind.annotation.*; - -import java.util.HashMap; -import java.util.Map; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -@RestController -public class ExceptionTranslatorTestController { - - @GetMapping("/test/concurrency-failure") - public void concurrencyFailure() { - throw new ConcurrencyFailureException("test concurrency failure"); - } - - @PostMapping("/test/method-argument") - public void methodArgument(@Valid @RequestBody TestDTO testDTO) { - } - - @GetMapping("/test/parameterized-error") - public void parameterizedError() { - throw new CustomParameterizedException("test parameterized error", "param0_value", "param1_value"); - } - - @GetMapping("/test/parameterized-error2") - public void parameterizedError2() { - Map params = new HashMap<>(); - params.put("foo", "foo_value"); - params.put("bar", "bar_value"); - throw new CustomParameterizedException("test parameterized error", params); - } - - @GetMapping("/test/missing-servlet-request-part") - public void missingServletRequestPartException(@RequestPart String part) { - } - - @GetMapping("/test/missing-servlet-request-parameter") - public void missingServletRequestParameterException(@RequestParam String param) { - } - - @GetMapping("/test/access-denied") - public void accessdenied() { - throw new AccessDeniedException("test access denied!"); - } - - @GetMapping("/test/unauthorized") - public void unauthorized() { - throw new BadCredentialsException("test authentication failed!"); - } - - @GetMapping("/test/response-status") - public void exceptionWithReponseStatus() { - throw new TestResponseStatusException(); - } - - @GetMapping("/test/internal-server-error") - public void internalServerError() { - throw new RuntimeException(); - } - - public static class TestDTO { - - @NotNull - private String test; - - public String getTest() { - return test; - } - - public void setTest(String test) { - this.test = test; - } - } - - @ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "test response status") - @SuppressWarnings("serial") - public static class TestResponseStatusException extends RuntimeException { - } - -} diff --git a/src/test/java/org/hostsharing/hsadminng/web/rest/util/PaginationUtilUnitTest.java b/src/test/java/org/hostsharing/hsadminng/web/rest/util/PaginationUtilUnitTest.java deleted file mode 100644 index 6cabf756..00000000 --- a/src/test/java/org/hostsharing/hsadminng/web/rest/util/PaginationUtilUnitTest.java +++ /dev/null @@ -1,45 +0,0 @@ -// Licensed under Apache-2.0 -package org.hostsharing.hsadminng.web.rest.util; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageImpl; -import org.springframework.data.domain.PageRequest; -import org.springframework.http.HttpHeaders; - -import java.util.ArrayList; -import java.util.List; - -/** - * Tests based on parsing algorithm in app/components/util/pagination-util.service.js - * - * @see PaginationUtil - */ -public class PaginationUtilUnitTest { - - @Test - public void generatePaginationHttpHeadersTest() { - String baseUrl = "/api/_search/example"; - List content = new ArrayList<>(); - Page page = new PageImpl<>(content, PageRequest.of(6, 50), 400L); - HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, baseUrl); - List strHeaders = headers.get(HttpHeaders.LINK); - assertNotNull(strHeaders); - assertTrue(strHeaders.size() == 1); - String headerData = strHeaders.get(0); - assertTrue(headerData.split(",").length == 4); - String expectedData = "; rel=\"next\"," - + "; rel=\"prev\"," - + "; rel=\"last\"," - + "; rel=\"first\""; - assertEquals(expectedData, headerData); - List xTotalCountHeaders = headers.get("X-Total-Count"); - assertTrue(xTotalCountHeaders.size() == 1); - assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(400L)); - } - -} diff --git a/src/test/javascript/jest-global-mocks.ts b/src/test/javascript/jest-global-mocks.ts deleted file mode 100644 index a9982598..00000000 --- a/src/test/javascript/jest-global-mocks.ts +++ /dev/null @@ -1,15 +0,0 @@ -const mock = () => { - let storage = {}; - return { - getItem: key => (key in storage ? storage[key] : null), - setItem: (key, value) => (storage[key] = value || ''), - removeItem: key => delete storage[key], - clear: () => (storage = {}) - }; -}; - -Object.defineProperty(window, 'localStorage', { value: mock() }); -Object.defineProperty(window, 'sessionStorage', { value: mock() }); -Object.defineProperty(window, 'getComputedStyle', { - value: () => ['-webkit-appearance'] -}); diff --git a/src/test/javascript/jest.conf.js b/src/test/javascript/jest.conf.js deleted file mode 100644 index 71f72625..00000000 --- a/src/test/javascript/jest.conf.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = { - preset: 'jest-preset-angular', - setupTestFrameworkScriptFile: '/src/test/javascript/jest.ts', - coverageDirectory: '/build/test-results/', - globals: { - 'ts-jest': { - tsConfigFile: 'tsconfig.json' - }, - __TRANSFORM_HTML__: true - }, - coveragePathIgnorePatterns: [ - '/src/test/javascript' - ], - moduleNameMapper: { - 'app/(.*)': '/src/main/webapp/app/$1' - }, - reporters: [ - 'default', - [ 'jest-junit', { output: './build/test-results/TESTS-results-jest.xml' } ] - ], - testResultsProcessor: 'jest-sonar-reporter', - transformIgnorePatterns: ['node_modules/(?!@angular/common/locales)'], - testMatch: ['/src/test/javascript/spec/**/+(*.)+(spec.ts)'], - rootDir: '../../../', - testURL: "http://localhost/" -}; diff --git a/src/test/javascript/jest.ts b/src/test/javascript/jest.ts deleted file mode 100644 index 904329f5..00000000 --- a/src/test/javascript/jest.ts +++ /dev/null @@ -1,2 +0,0 @@ -import 'jest-preset-angular'; -import './jest-global-mocks'; diff --git a/src/test/javascript/spec/app/account/activate/activate.component.spec.ts b/src/test/javascript/spec/app/account/activate/activate.component.spec.ts deleted file mode 100644 index f8714911..00000000 --- a/src/test/javascript/spec/app/account/activate/activate.component.spec.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { TestBed, async, tick, fakeAsync, inject } from '@angular/core/testing'; -import { ActivatedRoute } from '@angular/router'; -import { Observable, of, throwError } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { MockActivatedRoute } from '../../../helpers/mock-route.service'; -import { ActivateService } from 'app/account/activate/activate.service'; -import { ActivateComponent } from 'app/account/activate/activate.component'; - -describe('Component Tests', () => { - describe('ActivateComponent', () => { - let comp: ActivateComponent; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [ActivateComponent], - providers: [ - { - provide: ActivatedRoute, - useValue: new MockActivatedRoute({ key: 'ABC123' }) - } - ] - }) - .overrideTemplate(ActivateComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - const fixture = TestBed.createComponent(ActivateComponent); - comp = fixture.componentInstance; - }); - - it('calls activate.get with the key from params', inject( - [ActivateService], - fakeAsync((service: ActivateService) => { - spyOn(service, 'get').and.returnValue(of()); - - comp.ngOnInit(); - tick(); - - expect(service.get).toHaveBeenCalledWith('ABC123'); - }) - )); - - it('should set set success to OK upon successful activation', inject( - [ActivateService], - fakeAsync((service: ActivateService) => { - spyOn(service, 'get').and.returnValue(of({})); - - comp.ngOnInit(); - tick(); - - expect(comp.error).toBe(null); - expect(comp.success).toEqual('OK'); - }) - )); - - it('should set set error to ERROR upon activation failure', inject( - [ActivateService], - fakeAsync((service: ActivateService) => { - spyOn(service, 'get').and.returnValue(throwError('ERROR')); - - comp.ngOnInit(); - tick(); - - expect(comp.error).toBe('ERROR'); - expect(comp.success).toEqual(null); - }) - )); - }); -}); diff --git a/src/test/javascript/spec/app/account/password-reset/finish/password-reset-finish.component.spec.ts b/src/test/javascript/spec/app/account/password-reset/finish/password-reset-finish.component.spec.ts deleted file mode 100644 index a4c88f46..00000000 --- a/src/test/javascript/spec/app/account/password-reset/finish/password-reset-finish.component.spec.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { ComponentFixture, TestBed, inject, tick, fakeAsync } from '@angular/core/testing'; -import { Observable, of, throwError } from 'rxjs'; -import { Renderer, ElementRef } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { HsadminNgTestModule } from '../../../../test.module'; -import { PasswordResetFinishComponent } from 'app/account/password-reset/finish/password-reset-finish.component'; -import { PasswordResetFinishService } from 'app/account/password-reset/finish/password-reset-finish.service'; -import { MockActivatedRoute } from '../../../../helpers/mock-route.service'; - -describe('Component Tests', () => { - describe('PasswordResetFinishComponent', () => { - let fixture: ComponentFixture; - let comp: PasswordResetFinishComponent; - - beforeEach(() => { - fixture = TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [PasswordResetFinishComponent], - providers: [ - { - provide: ActivatedRoute, - useValue: new MockActivatedRoute({ key: 'XYZPDQ' }) - }, - { - provide: Renderer, - useValue: { - invokeElementMethod(renderElement: any, methodName: string, args?: any[]) {} - } - }, - { - provide: ElementRef, - useValue: new ElementRef(null) - } - ] - }) - .overrideTemplate(PasswordResetFinishComponent, '') - .createComponent(PasswordResetFinishComponent); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(PasswordResetFinishComponent); - comp = fixture.componentInstance; - comp.ngOnInit(); - }); - - it('should define its initial state', () => { - comp.ngOnInit(); - - expect(comp.keyMissing).toBeFalsy(); - expect(comp.key).toEqual('XYZPDQ'); - expect(comp.resetAccount).toEqual({}); - }); - - it('sets focus after the view has been initialized', inject([ElementRef], (elementRef: ElementRef) => { - const element = fixture.nativeElement; - const node = { - focus() {} - }; - - elementRef.nativeElement = element; - spyOn(element, 'querySelector').and.returnValue(node); - spyOn(node, 'focus'); - - comp.ngAfterViewInit(); - - expect(element.querySelector).toHaveBeenCalledWith('#password'); - expect(node.focus).toHaveBeenCalled(); - })); - - it('should ensure the two passwords entered match', () => { - comp.resetAccount.password = 'password'; - comp.confirmPassword = 'non-matching'; - - comp.finishReset(); - - expect(comp.doNotMatch).toEqual('ERROR'); - }); - - it('should update success to OK after resetting password', inject( - [PasswordResetFinishService], - fakeAsync((service: PasswordResetFinishService) => { - spyOn(service, 'save').and.returnValue(of({})); - - comp.resetAccount.password = 'password'; - comp.confirmPassword = 'password'; - - comp.finishReset(); - tick(); - - expect(service.save).toHaveBeenCalledWith({ - key: 'XYZPDQ', - newPassword: 'password' - }); - expect(comp.success).toEqual('OK'); - }) - )); - - it('should notify of generic error', inject( - [PasswordResetFinishService], - fakeAsync((service: PasswordResetFinishService) => { - spyOn(service, 'save').and.returnValue(throwError('ERROR')); - - comp.resetAccount.password = 'password'; - comp.confirmPassword = 'password'; - - comp.finishReset(); - tick(); - - expect(service.save).toHaveBeenCalledWith({ - key: 'XYZPDQ', - newPassword: 'password' - }); - expect(comp.success).toBeNull(); - expect(comp.error).toEqual('ERROR'); - }) - )); - }); -}); diff --git a/src/test/javascript/spec/app/account/password-reset/init/password-reset-init.component.spec.ts b/src/test/javascript/spec/app/account/password-reset/init/password-reset-init.component.spec.ts deleted file mode 100644 index 3d188868..00000000 --- a/src/test/javascript/spec/app/account/password-reset/init/password-reset-init.component.spec.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { ComponentFixture, TestBed, inject } from '@angular/core/testing'; -import { Renderer, ElementRef } from '@angular/core'; -import { Observable, of, throwError } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../../test.module'; -import { PasswordResetInitComponent } from 'app/account/password-reset/init/password-reset-init.component'; -import { PasswordResetInitService } from 'app/account/password-reset/init/password-reset-init.service'; -import { EMAIL_NOT_FOUND_TYPE } from 'app/shared'; - -describe('Component Tests', () => { - describe('PasswordResetInitComponent', () => { - let fixture: ComponentFixture; - let comp: PasswordResetInitComponent; - - beforeEach(() => { - fixture = TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [PasswordResetInitComponent], - providers: [ - { - provide: Renderer, - useValue: { - invokeElementMethod(renderElement: any, methodName: string, args?: any[]) {} - } - }, - { - provide: ElementRef, - useValue: new ElementRef(null) - } - ] - }) - .overrideTemplate(PasswordResetInitComponent, '') - .createComponent(PasswordResetInitComponent); - comp = fixture.componentInstance; - comp.ngOnInit(); - }); - - it('should define its initial state', () => { - expect(comp.success).toBeUndefined(); - expect(comp.error).toBeUndefined(); - expect(comp.errorEmailNotExists).toBeUndefined(); - expect(comp.resetAccount).toEqual({}); - }); - - it('sets focus after the view has been initialized', inject([ElementRef], (elementRef: ElementRef) => { - const element = fixture.nativeElement; - const node = { - focus() {} - }; - - elementRef.nativeElement = element; - spyOn(element, 'querySelector').and.returnValue(node); - spyOn(node, 'focus'); - - comp.ngAfterViewInit(); - - expect(element.querySelector).toHaveBeenCalledWith('#email'); - expect(node.focus).toHaveBeenCalled(); - })); - - it('notifies of success upon successful requestReset', inject([PasswordResetInitService], (service: PasswordResetInitService) => { - spyOn(service, 'save').and.returnValue(of({})); - comp.resetAccount.email = 'user@domain.com'; - - comp.requestReset(); - - expect(service.save).toHaveBeenCalledWith('user@domain.com'); - expect(comp.success).toEqual('OK'); - expect(comp.error).toBeNull(); - expect(comp.errorEmailNotExists).toBeNull(); - })); - - it('notifies of unknown email upon email address not registered/400', inject( - [PasswordResetInitService], - (service: PasswordResetInitService) => { - spyOn(service, 'save').and.returnValue( - throwError({ - status: 400, - error: { type: EMAIL_NOT_FOUND_TYPE } - }) - ); - comp.resetAccount.email = 'user@domain.com'; - - comp.requestReset(); - - expect(service.save).toHaveBeenCalledWith('user@domain.com'); - expect(comp.success).toBeNull(); - expect(comp.error).toBeNull(); - expect(comp.errorEmailNotExists).toEqual('ERROR'); - } - )); - - it('notifies of error upon error response', inject([PasswordResetInitService], (service: PasswordResetInitService) => { - spyOn(service, 'save').and.returnValue( - throwError({ - status: 503, - data: 'something else' - }) - ); - comp.resetAccount.email = 'user@domain.com'; - - comp.requestReset(); - - expect(service.save).toHaveBeenCalledWith('user@domain.com'); - expect(comp.success).toBeNull(); - expect(comp.errorEmailNotExists).toBeNull(); - expect(comp.error).toEqual('ERROR'); - })); - }); -}); diff --git a/src/test/javascript/spec/app/account/password/password-strength-bar.component.spec.ts b/src/test/javascript/spec/app/account/password/password-strength-bar.component.spec.ts deleted file mode 100644 index 35e923ac..00000000 --- a/src/test/javascript/spec/app/account/password/password-strength-bar.component.spec.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { ComponentFixture, TestBed, async } from '@angular/core/testing'; - -import { PasswordStrengthBarComponent } from 'app/account/password/password-strength-bar.component'; - -describe('Component Tests', () => { - describe('PasswordStrengthBarComponent', () => { - let comp: PasswordStrengthBarComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [PasswordStrengthBarComponent] - }) - .overrideTemplate(PasswordStrengthBarComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(PasswordStrengthBarComponent); - comp = fixture.componentInstance; - }); - - describe('PasswordStrengthBarComponents', () => { - it('should initialize with default values', () => { - expect(comp.measureStrength('')).toBe(0); - expect(comp.colors).toEqual(['#F00', '#F90', '#FF0', '#9F0', '#0F0']); - expect(comp.getColor(0).idx).toBe(1); - expect(comp.getColor(0).col).toBe(comp.colors[0]); - }); - - it('should increase strength upon password value change', () => { - expect(comp.measureStrength('')).toBe(0); - expect(comp.measureStrength('aa')).toBeGreaterThanOrEqual(comp.measureStrength('')); - expect(comp.measureStrength('aa^6')).toBeGreaterThanOrEqual(comp.measureStrength('aa')); - expect(comp.measureStrength('Aa090(**)')).toBeGreaterThanOrEqual(comp.measureStrength('aa^6')); - expect(comp.measureStrength('Aa090(**)+-07365')).toBeGreaterThanOrEqual(comp.measureStrength('Aa090(**)')); - }); - - it('should change the color based on strength', () => { - expect(comp.getColor(0).col).toBe(comp.colors[0]); - expect(comp.getColor(11).col).toBe(comp.colors[1]); - expect(comp.getColor(22).col).toBe(comp.colors[2]); - expect(comp.getColor(33).col).toBe(comp.colors[3]); - expect(comp.getColor(44).col).toBe(comp.colors[4]); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/account/password/password.component.spec.ts b/src/test/javascript/spec/app/account/password/password.component.spec.ts deleted file mode 100644 index ab3656fc..00000000 --- a/src/test/javascript/spec/app/account/password/password.component.spec.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { ComponentFixture, TestBed, async } from '@angular/core/testing'; -import { HttpResponse } from '@angular/common/http'; -import { Observable, of, throwError } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { PasswordComponent } from 'app/account/password/password.component'; -import { PasswordService } from 'app/account/password/password.service'; - -describe('Component Tests', () => { - describe('PasswordComponent', () => { - let comp: PasswordComponent; - let fixture: ComponentFixture; - let service: PasswordService; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [PasswordComponent], - providers: [] - }) - .overrideTemplate(PasswordComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(PasswordComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(PasswordService); - }); - - it('should show error if passwords do not match', () => { - // GIVEN - comp.newPassword = 'password1'; - comp.confirmPassword = 'password2'; - // WHEN - comp.changePassword(); - // THEN - expect(comp.doNotMatch).toBe('ERROR'); - expect(comp.error).toBeNull(); - expect(comp.success).toBeNull(); - }); - - it('should call Auth.changePassword when passwords match', () => { - // GIVEN - const passwordValues = { - currentPassword: 'oldPassword', - newPassword: 'myPassword' - }; - - spyOn(service, 'save').and.returnValue(of(new HttpResponse({ body: true }))); - comp.currentPassword = passwordValues.currentPassword; - comp.newPassword = comp.confirmPassword = passwordValues.newPassword; - - // WHEN - comp.changePassword(); - - // THEN - expect(service.save).toHaveBeenCalledWith(passwordValues.newPassword, passwordValues.currentPassword); - }); - - it('should set success to OK upon success', function() { - // GIVEN - spyOn(service, 'save').and.returnValue(of(new HttpResponse({ body: true }))); - comp.newPassword = comp.confirmPassword = 'myPassword'; - - // WHEN - comp.changePassword(); - - // THEN - expect(comp.doNotMatch).toBeNull(); - expect(comp.error).toBeNull(); - expect(comp.success).toBe('OK'); - }); - - it('should notify of error if change password fails', function() { - // GIVEN - spyOn(service, 'save').and.returnValue(throwError('ERROR')); - comp.newPassword = comp.confirmPassword = 'myPassword'; - - // WHEN - comp.changePassword(); - - // THEN - expect(comp.doNotMatch).toBeNull(); - expect(comp.success).toBeNull(); - expect(comp.error).toBe('ERROR'); - }); - }); -}); diff --git a/src/test/javascript/spec/app/account/register/register.component.spec.ts b/src/test/javascript/spec/app/account/register/register.component.spec.ts deleted file mode 100644 index bec63e5a..00000000 --- a/src/test/javascript/spec/app/account/register/register.component.spec.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { ComponentFixture, TestBed, async, inject, tick, fakeAsync } from '@angular/core/testing'; -import { Observable, of, throwError } from 'rxjs'; - -import { JhiLanguageService } from 'ng-jhipster'; -import { MockLanguageService } from '../../../helpers/mock-language.service'; -import { HsadminNgTestModule } from '../../../test.module'; -import { EMAIL_ALREADY_USED_TYPE, LOGIN_ALREADY_USED_TYPE } from 'app/shared'; -import { Register } from 'app/account/register/register.service'; -import { RegisterComponent } from 'app/account/register/register.component'; - -describe('Component Tests', () => { - describe('RegisterComponent', () => { - let fixture: ComponentFixture; - let comp: RegisterComponent; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [RegisterComponent] - }) - .overrideTemplate(RegisterComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(RegisterComponent); - comp = fixture.componentInstance; - comp.ngOnInit(); - }); - - it('should ensure the two passwords entered match', () => { - comp.registerAccount.password = 'password'; - comp.confirmPassword = 'non-matching'; - - comp.register(); - - expect(comp.doNotMatch).toEqual('ERROR'); - }); - - it('should update success to OK after creating an account', inject( - [Register, JhiLanguageService], - fakeAsync((service: Register, mockTranslate: MockLanguageService) => { - spyOn(service, 'save').and.returnValue(of({})); - comp.registerAccount.password = comp.confirmPassword = 'password'; - - comp.register(); - tick(); - - expect(service.save).toHaveBeenCalledWith({ - password: 'password', - langKey: 'de' - }); - expect(comp.success).toEqual(true); - expect(comp.registerAccount.langKey).toEqual('de'); - expect(mockTranslate.getCurrentSpy).toHaveBeenCalled(); - expect(comp.errorUserExists).toBeNull(); - expect(comp.errorEmailExists).toBeNull(); - expect(comp.error).toBeNull(); - }) - )); - - it('should notify of user existence upon 400/login already in use', inject( - [Register], - fakeAsync((service: Register) => { - spyOn(service, 'save').and.returnValue( - throwError({ - status: 400, - error: { type: LOGIN_ALREADY_USED_TYPE } - }) - ); - comp.registerAccount.password = comp.confirmPassword = 'password'; - - comp.register(); - tick(); - - expect(comp.errorUserExists).toEqual('ERROR'); - expect(comp.errorEmailExists).toBeNull(); - expect(comp.error).toBeNull(); - }) - )); - - it('should notify of email existence upon 400/email address already in use', inject( - [Register], - fakeAsync((service: Register) => { - spyOn(service, 'save').and.returnValue( - throwError({ - status: 400, - error: { type: EMAIL_ALREADY_USED_TYPE } - }) - ); - comp.registerAccount.password = comp.confirmPassword = 'password'; - - comp.register(); - tick(); - - expect(comp.errorEmailExists).toEqual('ERROR'); - expect(comp.errorUserExists).toBeNull(); - expect(comp.error).toBeNull(); - }) - )); - - it('should notify of generic error', inject( - [Register], - fakeAsync((service: Register) => { - spyOn(service, 'save').and.returnValue( - throwError({ - status: 503 - }) - ); - comp.registerAccount.password = comp.confirmPassword = 'password'; - - comp.register(); - tick(); - - expect(comp.errorUserExists).toBeNull(); - expect(comp.errorEmailExists).toBeNull(); - expect(comp.error).toEqual('ERROR'); - }) - )); - }); -}); diff --git a/src/test/javascript/spec/app/account/settings/settings.component.spec.ts b/src/test/javascript/spec/app/account/settings/settings.component.spec.ts deleted file mode 100644 index af1a4fda..00000000 --- a/src/test/javascript/spec/app/account/settings/settings.component.spec.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { ComponentFixture, TestBed, async } from '@angular/core/testing'; -import { Observable, throwError } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { AccountService } from 'app/core'; -import { SettingsComponent } from 'app/account/settings/settings.component'; - -describe('Component Tests', () => { - describe('SettingsComponent', () => { - let comp: SettingsComponent; - let fixture: ComponentFixture; - let mockAuth: any; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [SettingsComponent], - providers: [] - }) - .overrideTemplate(SettingsComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(SettingsComponent); - comp = fixture.componentInstance; - mockAuth = fixture.debugElement.injector.get(AccountService); - }); - - it('should send the current identity upon save', () => { - // GIVEN - const accountValues = { - firstName: 'John', - lastName: 'Doe', - - activated: true, - email: 'john.doe@mail.com', - langKey: 'de', - login: 'john' - }; - mockAuth.setIdentityResponse(accountValues); - - // WHEN - comp.settingsAccount = accountValues; - comp.save(); - - // THEN - expect(mockAuth.identitySpy).toHaveBeenCalled(); - expect(mockAuth.saveSpy).toHaveBeenCalledWith(accountValues); - expect(comp.settingsAccount).toEqual(accountValues); - }); - - it('should notify of success upon successful save', () => { - // GIVEN - const accountValues = { - firstName: 'John', - lastName: 'Doe' - }; - mockAuth.setIdentityResponse(accountValues); - - // WHEN - comp.save(); - - // THEN - expect(comp.error).toBeNull(); - expect(comp.success).toBe('OK'); - }); - - it('should notify of error upon failed save', () => { - // GIVEN - mockAuth.saveSpy.and.returnValue(throwError('ERROR')); - - // WHEN - comp.save(); - - // THEN - expect(comp.error).toEqual('ERROR'); - expect(comp.success).toBeNull(); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/audits/audits.component.spec.ts b/src/test/javascript/spec/app/admin/audits/audits.component.spec.ts deleted file mode 100644 index da1b268c..00000000 --- a/src/test/javascript/spec/app/admin/audits/audits.component.spec.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { ComponentFixture, TestBed, async } from '@angular/core/testing'; -import { Observable, of } from 'rxjs'; -import { HttpHeaders, HttpResponse } from '@angular/common/http'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { AuditsComponent } from 'app/admin/audits/audits.component'; -import { AuditsService } from 'app/admin/audits/audits.service'; -import { Audit } from 'app/admin/audits/audit.model'; -import { ITEMS_PER_PAGE } from 'app/shared'; - -function build2DigitsDatePart(datePart: number) { - return `0${datePart}`.slice(-2); -} - -function getDate(isToday = true) { - let date: Date = new Date(); - if (isToday) { - // Today + 1 day - needed if the current day must be included - date.setDate(date.getDate() + 1); - } else { - // get last month - if (date.getMonth() === 0) { - date = new Date(date.getFullYear() - 1, 11, date.getDate()); - } else { - date = new Date(date.getFullYear(), date.getMonth() - 1, date.getDate()); - } - } - const monthString = build2DigitsDatePart(date.getMonth() + 1); - const dateString = build2DigitsDatePart(date.getDate()); - return `${date.getFullYear()}-${monthString}-${dateString}`; -} - -describe('Component Tests', () => { - describe('AuditsComponent', () => { - let comp: AuditsComponent; - let fixture: ComponentFixture; - let service: AuditsService; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [AuditsComponent], - providers: [AuditsService] - }) - .overrideTemplate(AuditsComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(AuditsComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(AuditsService); - }); - - describe('today function ', () => { - it('should set toDate to current date', () => { - comp.today(); - expect(comp.toDate).toBe(getDate()); - }); - }); - - describe('previousMonth function ', () => { - it('should set fromDate to current date', () => { - comp.previousMonth(); - expect(comp.fromDate).toBe(getDate(false)); - }); - }); - - describe('By default, on init', () => { - it('should set all default values correctly', () => { - fixture.detectChanges(); - expect(comp.toDate).toBe(getDate()); - expect(comp.fromDate).toBe(getDate(false)); - expect(comp.itemsPerPage).toBe(ITEMS_PER_PAGE); - expect(comp.page).toBe(10); - expect(comp.reverse).toBeFalsy(); - expect(comp.predicate).toBe('id'); - }); - }); - - describe('OnInit', () => { - it('Should call load all on init', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - const audit = new Audit({ remoteAddress: '127.0.0.1', sessionId: '123' }, 'user', '20140101', 'AUTHENTICATION_SUCCESS'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [audit], - headers - }) - ) - ); - - // WHEN - comp.ngOnInit(); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.audits[0]).toEqual(jasmine.objectContaining(audit)); - }); - }); - - describe('Create sort object', () => { - it('Should sort only by id asc', () => { - // GIVEN - comp.predicate = 'id'; - comp.reverse = false; - - // WHEN - const sort = comp.sort(); - - // THEN - expect(sort.length).toEqual(1); - expect(sort[0]).toEqual('id,desc'); - }); - - it('Should sort by timestamp asc then by id', () => { - // GIVEN - comp.predicate = 'timestamp'; - comp.reverse = true; - - // WHEN - const sort = comp.sort(); - - // THEN - expect(sort.length).toEqual(2); - expect(sort[0]).toEqual('timestamp,asc'); - expect(sort[1]).toEqual('id'); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/audits/audits.service.spec.ts b/src/test/javascript/spec/app/admin/audits/audits.service.spec.ts deleted file mode 100644 index 84ff79f6..00000000 --- a/src/test/javascript/spec/app/admin/audits/audits.service.spec.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { AuditsService } from 'app/admin/audits/audits.service'; -import { Audit } from 'app/admin/audits/audit.model'; -import { SERVER_API_URL } from 'app/app.constants'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; - -describe('Service Tests', () => { - describe('Audits Service', () => { - let service: AuditsService; - let httpMock; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule] - }); - - service = TestBed.get(AuditsService); - httpMock = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - httpMock.verify(); - }); - - describe('Service methods', () => { - it('should call correct URL', () => { - service.query({}).subscribe(() => {}); - - const req = httpMock.expectOne({ method: 'GET' }); - const resourceUrl = SERVER_API_URL + 'management/audits'; - expect(req.request.url).toEqual(resourceUrl); - }); - - it('should return Audits', () => { - const audit = new Audit({ remoteAddress: '127.0.0.1', sessionId: '123' }, 'user', '20140101', 'AUTHENTICATION_SUCCESS'); - - service.query({}).subscribe(received => { - expect(received.body[0]).toEqual(audit); - }); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush([audit]); - }); - - it('should propagate not found response', () => { - service.query({}).subscribe(null, (_error: any) => { - expect(_error.status).toEqual(404); - }); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush('Invalid request parameters', { - status: 404, - statusText: 'Bad Request' - }); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/configuration/configuration.component.spec.ts b/src/test/javascript/spec/app/admin/configuration/configuration.component.spec.ts deleted file mode 100644 index 175657e5..00000000 --- a/src/test/javascript/spec/app/admin/configuration/configuration.component.spec.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { ComponentFixture, TestBed, async } from '@angular/core/testing'; -import { of } from 'rxjs'; -import { HttpHeaders, HttpResponse } from '@angular/common/http'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { JhiConfigurationComponent } from 'app/admin/configuration/configuration.component'; -import { JhiConfigurationService } from 'app/admin/configuration/configuration.service'; -import { ITEMS_PER_PAGE } from 'app/shared'; -import { Log } from 'app/admin'; - -describe('Component Tests', () => { - describe('JhiConfigurationComponent', () => { - let comp: JhiConfigurationComponent; - let fixture: ComponentFixture; - let service: JhiConfigurationService; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [JhiConfigurationComponent], - providers: [JhiConfigurationService] - }) - .overrideTemplate(JhiConfigurationComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(JhiConfigurationComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(JhiConfigurationService); - }); - - describe('OnInit', () => { - it('should set all default values correctly', () => { - expect(comp.configKeys).toEqual([]); - expect(comp.filter).toBe(''); - expect(comp.orderProp).toBe('prefix'); - expect(comp.reverse).toBe(false); - }); - it('Should call load all on init', () => { - // GIVEN - const body = [{ config: 'test', properties: 'test' }, { config: 'test2' }]; - const envConfig = { envConfig: 'test' }; - spyOn(service, 'get').and.returnValue(of(body)); - spyOn(service, 'getEnv').and.returnValue(of(envConfig)); - - // WHEN - comp.ngOnInit(); - - // THEN - expect(service.get).toHaveBeenCalled(); - expect(service.getEnv).toHaveBeenCalled(); - expect(comp.configKeys).toEqual([['0', '1', '2', '3']]); - expect(comp.allConfiguration).toEqual(envConfig); - }); - }); - describe('keys method', () => { - it('should return the keys of an Object', () => { - // GIVEN - const data = { - key1: 'test', - key2: 'test2' - }; - - // THEN - expect(comp.keys(data)).toEqual(['key1', 'key2']); - expect(comp.keys(undefined)).toEqual([]); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/configuration/configuration.service.spec.ts b/src/test/javascript/spec/app/admin/configuration/configuration.service.spec.ts deleted file mode 100644 index 6039044b..00000000 --- a/src/test/javascript/spec/app/admin/configuration/configuration.service.spec.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { JhiConfigurationService } from 'app/admin/configuration/configuration.service'; -import { SERVER_API_URL } from 'app/app.constants'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { HttpResponse } from '@angular/common/http'; - -describe('Service Tests', () => { - describe('Logs Service', () => { - let service: JhiConfigurationService; - let httpMock; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule] - }); - - service = TestBed.get(JhiConfigurationService); - httpMock = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - httpMock.verify(); - }); - - describe('Service methods', () => { - it('should call correct URL', () => { - service.get().subscribe(() => {}); - - const req = httpMock.expectOne({ method: 'GET' }); - const resourceUrl = SERVER_API_URL + 'management/configprops'; - expect(req.request.url).toEqual(resourceUrl); - }); - - it('should get the config', () => { - const angularConfig = { - contexts: { - angular: { - beans: ['test2'] - } - } - }; - service.get().subscribe(received => { - expect(received.body[0]).toEqual(angularConfig); - }); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(angularConfig); - }); - - it('should get the env', () => { - const propertySources = new HttpResponse({ - body: [{ name: 'test1', properties: 'test1' }, { name: 'test2', properties: 'test2' }] - }); - service.get().subscribe(received => { - expect(received.body[0]).toEqual(propertySources); - }); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(propertySources); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/health/health.component.spec.ts b/src/test/javascript/spec/app/admin/health/health.component.spec.ts deleted file mode 100644 index 731a6089..00000000 --- a/src/test/javascript/spec/app/admin/health/health.component.spec.ts +++ /dev/null @@ -1,321 +0,0 @@ -import { ComponentFixture, TestBed, async } from '@angular/core/testing'; -import { HttpResponse, HttpErrorResponse } from '@angular/common/http'; -import { of, throwError } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { JhiHealthCheckComponent } from 'app/admin/health/health.component'; -import { JhiHealthService } from 'app/admin/health/health.service'; - -describe('Component Tests', () => { - describe('JhiHealthCheckComponent', () => { - let comp: JhiHealthCheckComponent; - let fixture: ComponentFixture; - let service: JhiHealthService; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [JhiHealthCheckComponent] - }) - .overrideTemplate(JhiHealthCheckComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(JhiHealthCheckComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(JhiHealthService); - }); - - describe('baseName and subSystemName', () => { - it('should return the basename when it has no sub system', () => { - expect(comp.baseName('base')).toBe('base'); - }); - - it('should return the basename when it has sub systems', () => { - expect(comp.baseName('base.subsystem.system')).toBe('base'); - }); - - it('should return the sub system name', () => { - expect(comp.subSystemName('subsystem')).toBe(''); - }); - - it('should return the subsystem when it has multiple keys', () => { - expect(comp.subSystemName('subsystem.subsystem.system')).toBe(' - subsystem.system'); - }); - }); - - describe('transformHealthData', () => { - it('should flatten empty health data', () => { - const data = {}; - const expected = []; - expect(service.transformHealthData(data)).toEqual(expected); - }); - - it('should flatten health data with no subsystems', () => { - const data = { - details: { - status: 'UP', - db: { - status: 'UP', - database: 'H2', - hello: '1' - }, - mail: { - status: 'UP', - error: 'mail.a.b.c' - } - } - }; - const expected = [ - { - name: 'db', - status: 'UP', - details: { - database: 'H2', - hello: '1' - } - }, - { - name: 'mail', - error: 'mail.a.b.c', - status: 'UP' - } - ]; - expect(service.transformHealthData(data)).toEqual(expected); - }); - - it('should flatten health data with subsystems at level 1, main system has no additional information', () => { - const data = { - details: { - status: 'UP', - db: { - status: 'UP', - database: 'H2', - hello: '1' - }, - mail: { - status: 'UP', - error: 'mail.a.b.c' - }, - system: { - status: 'DOWN', - subsystem1: { - status: 'UP', - property1: 'system.subsystem1.property1' - }, - subsystem2: { - status: 'DOWN', - error: 'system.subsystem1.error', - property2: 'system.subsystem2.property2' - } - } - } - }; - const expected = [ - { - name: 'db', - status: 'UP', - details: { - database: 'H2', - hello: '1' - } - }, - { - name: 'mail', - error: 'mail.a.b.c', - status: 'UP' - }, - { - name: 'system.subsystem1', - status: 'UP', - details: { - property1: 'system.subsystem1.property1' - } - }, - { - name: 'system.subsystem2', - error: 'system.subsystem1.error', - status: 'DOWN', - details: { - property2: 'system.subsystem2.property2' - } - } - ]; - expect(service.transformHealthData(data)).toEqual(expected); - }); - - it('should flatten health data with subsystems at level 1, main system has additional information', () => { - const data = { - details: { - status: 'UP', - db: { - status: 'UP', - database: 'H2', - hello: '1' - }, - mail: { - status: 'UP', - error: 'mail.a.b.c' - }, - system: { - status: 'DOWN', - property1: 'system.property1', - subsystem1: { - status: 'UP', - property1: 'system.subsystem1.property1' - }, - subsystem2: { - status: 'DOWN', - error: 'system.subsystem1.error', - property2: 'system.subsystem2.property2' - } - } - } - }; - const expected = [ - { - name: 'db', - status: 'UP', - details: { - database: 'H2', - hello: '1' - } - }, - { - name: 'mail', - error: 'mail.a.b.c', - status: 'UP' - }, - { - name: 'system', - status: 'DOWN', - details: { - property1: 'system.property1' - } - }, - { - name: 'system.subsystem1', - status: 'UP', - details: { - property1: 'system.subsystem1.property1' - } - }, - { - name: 'system.subsystem2', - error: 'system.subsystem1.error', - status: 'DOWN', - details: { - property2: 'system.subsystem2.property2' - } - } - ]; - expect(service.transformHealthData(data)).toEqual(expected); - }); - - it('should flatten health data with subsystems at level 1, main system has additional error', () => { - const data = { - details: { - status: 'UP', - db: { - status: 'UP', - database: 'H2', - hello: '1' - }, - mail: { - status: 'UP', - error: 'mail.a.b.c' - }, - system: { - status: 'DOWN', - error: 'show me', - subsystem1: { - status: 'UP', - property1: 'system.subsystem1.property1' - }, - subsystem2: { - status: 'DOWN', - error: 'system.subsystem1.error', - property2: 'system.subsystem2.property2' - } - } - } - }; - const expected = [ - { - name: 'db', - status: 'UP', - details: { - database: 'H2', - hello: '1' - } - }, - { - name: 'mail', - error: 'mail.a.b.c', - status: 'UP' - }, - { - name: 'system', - error: 'show me', - status: 'DOWN' - }, - { - name: 'system.subsystem1', - status: 'UP', - details: { - property1: 'system.subsystem1.property1' - } - }, - { - name: 'system.subsystem2', - error: 'system.subsystem1.error', - status: 'DOWN', - details: { - property2: 'system.subsystem2.property2' - } - } - ]; - expect(service.transformHealthData(data)).toEqual(expected); - }); - }); - - describe('getBadgeClass', () => { - it('should get badge class', () => { - const upBadgeClass = comp.getBadgeClass('UP'); - const downBadgeClass = comp.getBadgeClass('DOWN'); - expect(upBadgeClass).toEqual('badge-success'); - expect(downBadgeClass).toEqual('badge-danger'); - }); - }); - - describe('refresh', () => { - it('should call refresh on init', () => { - // GIVEN - spyOn(service, 'checkHealth').and.returnValue(of(new HttpResponse())); - spyOn(service, 'transformHealthData').and.returnValue(of({ data: 'test' })); - - // WHEN - comp.ngOnInit(); - - // THEN - expect(service.checkHealth).toHaveBeenCalled(); - expect(service.transformHealthData).toHaveBeenCalled(); - expect(comp.healthData.value).toEqual({ data: 'test' }); - }); - it('should handle a 503 on refreshing health data', () => { - // GIVEN - spyOn(service, 'checkHealth').and.returnValue(throwError(new HttpErrorResponse({ status: 503, error: 'Mail down' }))); - spyOn(service, 'transformHealthData').and.returnValue(of({ health: 'down' })); - - // WHEN - comp.refresh(); - - // THEN - expect(service.checkHealth).toHaveBeenCalled(); - expect(service.transformHealthData).toHaveBeenCalled(); - expect(comp.healthData.value).toEqual({ health: 'down' }); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/logs/logs.component.spec.ts b/src/test/javascript/spec/app/admin/logs/logs.component.spec.ts deleted file mode 100644 index da5a88a8..00000000 --- a/src/test/javascript/spec/app/admin/logs/logs.component.spec.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { ComponentFixture, TestBed, async } from '@angular/core/testing'; -import { of } from 'rxjs'; -import { HttpHeaders, HttpResponse } from '@angular/common/http'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { LogsComponent } from 'app/admin/logs/logs.component'; -import { LogsService } from 'app/admin/logs/logs.service'; -import { ITEMS_PER_PAGE } from 'app/shared'; -import { Log } from 'app/admin'; - -describe('Component Tests', () => { - describe('LogsComponent', () => { - let comp: LogsComponent; - let fixture: ComponentFixture; - let service: LogsService; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [LogsComponent], - providers: [LogsService] - }) - .overrideTemplate(LogsComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(LogsComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(LogsService); - }); - - describe('OnInit', () => { - it('should set all default values correctly', () => { - expect(comp.filter).toBe(''); - expect(comp.orderProp).toBe('name'); - expect(comp.reverse).toBe(false); - }); - it('Should call load all on init', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - const log = new Log('main', 'WARN'); - spyOn(service, 'findAll').and.returnValue( - of( - new HttpResponse({ - body: [log], - headers - }) - ) - ); - - // WHEN - comp.ngOnInit(); - - // THEN - expect(service.findAll).toHaveBeenCalled(); - expect(comp.loggers[0]).toEqual(jasmine.objectContaining(log)); - }); - }); - describe('change log level', () => { - it('should change log level correctly', () => { - // GIVEN - const log = new Log('main', 'ERROR'); - spyOn(service, 'changeLevel').and.returnValue(of(new HttpResponse())); - spyOn(service, 'findAll').and.returnValue(of(new HttpResponse({ body: [log] }))); - - // WHEN - comp.changeLevel('main', 'ERROR'); - - // THEN - expect(service.changeLevel).toHaveBeenCalled(); - expect(service.findAll).toHaveBeenCalled(); - expect(comp.loggers[0]).toEqual(jasmine.objectContaining(log)); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/logs/logs.service.spec.ts b/src/test/javascript/spec/app/admin/logs/logs.service.spec.ts deleted file mode 100644 index c3483392..00000000 --- a/src/test/javascript/spec/app/admin/logs/logs.service.spec.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { LogsService } from 'app/admin/logs/logs.service'; -import { Log } from 'app/admin/logs/log.model'; -import { SERVER_API_URL } from 'app/app.constants'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; - -describe('Service Tests', () => { - describe('Logs Service', () => { - let service: LogsService; - let httpMock; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule] - }); - - service = TestBed.get(LogsService); - httpMock = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - httpMock.verify(); - }); - - describe('Service methods', () => { - it('should call correct URL', () => { - service.findAll().subscribe(() => {}); - - const req = httpMock.expectOne({ method: 'GET' }); - const resourceUrl = SERVER_API_URL + 'management/logs'; - expect(req.request.url).toEqual(resourceUrl); - }); - - it('should return Logs', () => { - const log = new Log('main', 'ERROR'); - - service.findAll().subscribe(received => { - expect(received.body[0]).toEqual(log); - }); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush([log]); - }); - - it('should change log level', () => { - const log = new Log('main', 'ERROR'); - - service.changeLevel(log).subscribe(received => { - expect(received.body[0]).toEqual(log); - }); - - const req = httpMock.expectOne({ method: 'PUT' }); - req.flush([log]); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts b/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts deleted file mode 100644 index 94acaac1..00000000 --- a/src/test/javascript/spec/app/admin/metrics/metrics.component.spec.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { ComponentFixture, TestBed, async } from '@angular/core/testing'; -import { HttpResponse, HttpErrorResponse } from '@angular/common/http'; -import { of, throwError } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { JhiMetricsMonitoringComponent } from 'app/admin/metrics/metrics.component'; -import { JhiMetricsService } from 'app/admin/metrics/metrics.service'; - -describe('Component Tests', () => { - describe('JhiMetricsMonitoringComponent', () => { - let comp: JhiMetricsMonitoringComponent; - let fixture: ComponentFixture; - let service: JhiMetricsService; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [JhiMetricsMonitoringComponent] - }) - .overrideTemplate(JhiMetricsMonitoringComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(JhiMetricsMonitoringComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(JhiMetricsService); - }); - - describe('refresh', () => { - it('should call refresh on init', () => { - // GIVEN - const response = { - timers: { - service: 'test', - unrelatedKey: 'test' - }, - gauges: { - 'jcache.statistics': { - value: 2 - }, - unrelatedKey: 'test' - } - }; - spyOn(service, 'getMetrics').and.returnValue(of(response)); - - // WHEN - comp.ngOnInit(); - - // THEN - expect(service.getMetrics).toHaveBeenCalled(); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts b/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts deleted file mode 100644 index 2c3665b0..00000000 --- a/src/test/javascript/spec/app/admin/metrics/metrics.service.spec.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { JhiMetricsService } from 'app/admin/metrics/metrics.service'; -import { SERVER_API_URL } from 'app/app.constants'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; - -describe('Service Tests', () => { - describe('Logs Service', () => { - let service: JhiMetricsService; - let httpMock; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule] - }); - - service = TestBed.get(JhiMetricsService); - httpMock = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - httpMock.verify(); - }); - - describe('Service methods', () => { - it('should call correct URL', () => { - service.getMetrics().subscribe(() => {}); - - const req = httpMock.expectOne({ method: 'GET' }); - const resourceUrl = SERVER_API_URL + 'management/jhi-metrics'; - expect(req.request.url).toEqual(resourceUrl); - }); - - it('should return Metrics', () => { - const metrics = []; - - service.getMetrics().subscribe(received => { - expect(received.body[0]).toEqual(metrics); - }); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush([metrics]); - }); - - it('should return Thread Dump', () => { - const dump = [{ name: 'test1', threadState: 'RUNNABLE' }]; - - service.threadDump().subscribe(received => { - expect(received.body[0]).toEqual(dump); - }); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush([dump]); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/user-management/user-management-delete-dialog.component.spec.ts b/src/test/javascript/spec/app/admin/user-management/user-management-delete-dialog.component.spec.ts deleted file mode 100644 index 4108ebd2..00000000 --- a/src/test/javascript/spec/app/admin/user-management/user-management-delete-dialog.component.spec.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { ComponentFixture, TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { Observable, of } from 'rxjs'; -import { JhiEventManager } from 'ng-jhipster'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { UserMgmtDeleteDialogComponent } from 'app/admin/user-management/user-management-delete-dialog.component'; -import { UserService } from 'app/core'; - -describe('Component Tests', () => { - describe('User Management Delete Component', () => { - let comp: UserMgmtDeleteDialogComponent; - let fixture: ComponentFixture; - let service: UserService; - let mockEventManager: any; - let mockActiveModal: any; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [UserMgmtDeleteDialogComponent] - }) - .overrideTemplate(UserMgmtDeleteDialogComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(UserMgmtDeleteDialogComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(UserService); - mockEventManager = fixture.debugElement.injector.get(JhiEventManager); - mockActiveModal = fixture.debugElement.injector.get(NgbActiveModal); - }); - - describe('confirmDelete', () => { - it('Should call delete service on confirmDelete', inject( - [], - fakeAsync(() => { - // GIVEN - spyOn(service, 'delete').and.returnValue(of({})); - - // WHEN - comp.confirmDelete('user'); - tick(); - - // THEN - expect(service.delete).toHaveBeenCalledWith('user'); - expect(mockActiveModal.dismissSpy).toHaveBeenCalled(); - expect(mockEventManager.broadcastSpy).toHaveBeenCalled(); - }) - )); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/user-management/user-management-detail.component.spec.ts b/src/test/javascript/spec/app/admin/user-management/user-management-detail.component.spec.ts deleted file mode 100644 index cd3bc9bf..00000000 --- a/src/test/javascript/spec/app/admin/user-management/user-management-detail.component.spec.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { ComponentFixture, TestBed, async } from '@angular/core/testing'; -import { ActivatedRoute } from '@angular/router'; -import { of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { UserMgmtDetailComponent } from 'app/admin/user-management/user-management-detail.component'; -import { User } from 'app/core'; - -describe('Component Tests', () => { - describe('User Management Detail Component', () => { - let comp: UserMgmtDetailComponent; - let fixture: ComponentFixture; - const route = ({ - data: of({ user: new User(1, 'user', 'first', 'last', 'first@last.com', true, 'en', ['ROLE_USER'], 'admin', null, null, null) }) - } as any) as ActivatedRoute; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [UserMgmtDetailComponent], - providers: [ - { - provide: ActivatedRoute, - useValue: route - } - ] - }) - .overrideTemplate(UserMgmtDetailComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(UserMgmtDetailComponent); - comp = fixture.componentInstance; - }); - - describe('OnInit', () => { - it('Should call load all on init', () => { - // GIVEN - - // WHEN - comp.ngOnInit(); - - // THEN - expect(comp.user).toEqual( - jasmine.objectContaining({ - id: 1, - login: 'user', - firstName: 'first', - lastName: 'last', - email: 'first@last.com', - activated: true, - langKey: 'en', - authorities: ['ROLE_USER'], - createdBy: 'admin', - createdDate: null, - lastModifiedBy: null, - lastModifiedDate: null, - password: null - }) - ); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/user-management/user-management-update.component.spec.ts b/src/test/javascript/spec/app/admin/user-management/user-management-update.component.spec.ts deleted file mode 100644 index d95525af..00000000 --- a/src/test/javascript/spec/app/admin/user-management/user-management-update.component.spec.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { ComponentFixture, TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing'; -import { HttpResponse } from '@angular/common/http'; -import { ActivatedRoute } from '@angular/router'; -import { Observable, of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { UserMgmtUpdateComponent } from 'app/admin/user-management/user-management-update.component'; -import { UserService, User, JhiLanguageHelper } from 'app/core'; - -describe('Component Tests', () => { - describe('User Management Update Component', () => { - let comp: UserMgmtUpdateComponent; - let fixture: ComponentFixture; - let service: UserService; - let mockLanguageHelper: any; - const route = ({ - data: of({ user: new User(1, 'user', 'first', 'last', 'first@last.com', true, 'en', ['ROLE_USER'], 'admin', null, null, null) }) - } as any) as ActivatedRoute; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [UserMgmtUpdateComponent], - providers: [ - { - provide: ActivatedRoute, - useValue: route - } - ] - }) - .overrideTemplate(UserMgmtUpdateComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(UserMgmtUpdateComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(UserService); - mockLanguageHelper = fixture.debugElement.injector.get(JhiLanguageHelper); - }); - - describe('OnInit', () => { - it('Should load authorities and language on init', inject( - [], - fakeAsync(() => { - // GIVEN - spyOn(service, 'authorities').and.returnValue(of(['USER'])); - - // WHEN - comp.ngOnInit(); - - // THEN - expect(service.authorities).toHaveBeenCalled(); - expect(comp.authorities).toEqual(['USER']); - expect(mockLanguageHelper.getAllSpy).toHaveBeenCalled(); - }) - )); - }); - - describe('save', () => { - it('Should call update service on save for existing user', inject( - [], - fakeAsync(() => { - // GIVEN - const entity = new User(123); - spyOn(service, 'update').and.returnValue( - of( - new HttpResponse({ - body: entity - }) - ) - ); - comp.user = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.update).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - }) - )); - - it('Should call create service on save for new user', inject( - [], - fakeAsync(() => { - // GIVEN - const entity = new User(); - spyOn(service, 'create').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.user = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.create).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - }) - )); - }); - }); -}); diff --git a/src/test/javascript/spec/app/admin/user-management/user-management.component.spec.ts b/src/test/javascript/spec/app/admin/user-management/user-management.component.spec.ts deleted file mode 100644 index d30bf254..00000000 --- a/src/test/javascript/spec/app/admin/user-management/user-management.component.spec.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { ComponentFixture, TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing'; -import { Observable, of } from 'rxjs'; -import { HttpHeaders, HttpResponse } from '@angular/common/http'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { UserMgmtComponent } from 'app/admin/user-management/user-management.component'; -import { UserService, User } from 'app/core'; - -describe('Component Tests', () => { - describe('User Management Component', () => { - let comp: UserMgmtComponent; - let fixture: ComponentFixture; - let service: UserService; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [UserMgmtComponent] - }) - .overrideTemplate(UserMgmtComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(UserMgmtComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(UserService); - }); - - describe('OnInit', () => { - it('Should call load all on init', inject( - [], - fakeAsync(() => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new User(123)], - headers - }) - ) - ); - - // WHEN - comp.ngOnInit(); - tick(); // simulate async - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.users[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }) - )); - }); - - describe('setActive', () => { - it('Should update user and call load all', inject( - [], - fakeAsync(() => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - const user = new User(123); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [user], - headers - }) - ) - ); - spyOn(service, 'update').and.returnValue(of(new HttpResponse({ status: 200 }))); - - // WHEN - comp.setActive(user, true); - tick(); // simulate async - - // THEN - expect(service.update).toHaveBeenCalledWith(user); - expect(service.query).toHaveBeenCalled(); - expect(comp.users[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }) - )); - }); - }); -}); diff --git a/src/test/javascript/spec/app/core/user/account.service.spec.ts b/src/test/javascript/spec/app/core/user/account.service.spec.ts deleted file mode 100644 index 7ed772de..00000000 --- a/src/test/javascript/spec/app/core/user/account.service.spec.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { TestBed } from '@angular/core/testing'; -import { SERVER_API_URL } from 'app/app.constants'; -import { AccountService } from 'app/core'; -import { JhiDateUtils, JhiLanguageService } from 'ng-jhipster'; -import { SessionStorageService } from 'ngx-webstorage'; -import { MockLanguageService } from '../../../helpers/mock-language.service'; - -describe('Service Tests', () => { - describe('Account Service', () => { - let service: AccountService; - let httpMock; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule], - providers: [ - JhiDateUtils, - SessionStorageService, - { - provide: JhiLanguageService, - useClass: MockLanguageService - } - ] - }); - - service = TestBed.get(AccountService); - httpMock = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - httpMock.verify(); - }); - - describe('Service methods', () => { - it('should call /account if user is undefined', () => { - service.identity().then(() => {}); - const req = httpMock.expectOne({ method: 'GET' }); - const resourceUrl = SERVER_API_URL + 'api/account'; - - expect(req.request.url).toEqual(`${resourceUrl}`); - }); - - it('should call /account only once', () => { - service.identity().then(() => service.identity().then(() => {})); - const req = httpMock.expectOne({ method: 'GET' }); - const resourceUrl = SERVER_API_URL + 'api/account'; - - expect(req.request.url).toEqual(`${resourceUrl}`); - req.flush({ - firstName: 'John' - }); - }); - - describe('hasAuthority', () => { - it('should return false if user is not logged', async () => { - const hasAuthority = await service.hasAuthority('ROLE_USER'); - expect(hasAuthority).toBeFalsy(); - }); - - it('should return false if user is logged and has not authority', async () => { - service.authenticate({ - authorities: ['ROLE_USER'] - }); - - const hasAuthority = await service.hasAuthority('ROLE_ADMIN'); - - expect(hasAuthority).toBeFalsy(); - }); - - it('should return true if user is logged and has authority', async () => { - service.authenticate({ - authorities: ['ROLE_USER'] - }); - - const hasAuthority = await service.hasAuthority('ROLE_USER'); - - expect(hasAuthority).toBeTruthy(); - }); - }); - - describe('hasAnyAuthority', () => { - it('should return false if user is not logged', async () => { - const hasAuthority = await service.hasAnyAuthority(['ROLE_USER']); - expect(hasAuthority).toBeFalsy(); - }); - - it('should return false if user is logged and has not authority', async () => { - service.authenticate({ - authorities: ['ROLE_USER'] - }); - - const hasAuthority = await service.hasAnyAuthority(['ROLE_ADMIN']); - - expect(hasAuthority).toBeFalsy(); - }); - - it('should return true if user is logged and has authority', async () => { - service.authenticate({ - authorities: ['ROLE_USER'] - }); - - const hasAuthority = await service.hasAnyAuthority(['ROLE_USER', 'ROLE_ADMIN']); - - expect(hasAuthority).toBeTruthy(); - }); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/core/user/user.service.spec.ts b/src/test/javascript/spec/app/core/user/user.service.spec.ts deleted file mode 100644 index 9c05839a..00000000 --- a/src/test/javascript/spec/app/core/user/user.service.spec.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { TestBed } from '@angular/core/testing'; -import { JhiDateUtils } from 'ng-jhipster'; - -import { UserService, User } from 'app/core'; -import { SERVER_API_URL } from 'app/app.constants'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; - -describe('Service Tests', () => { - describe('User Service', () => { - let service: UserService; - let httpMock; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule], - providers: [JhiDateUtils] - }); - - service = TestBed.get(UserService); - httpMock = TestBed.get(HttpTestingController); - }); - - afterEach(() => { - httpMock.verify(); - }); - - describe('Service methods', () => { - it('should call correct URL', () => { - service.find('user').subscribe(() => {}); - - const req = httpMock.expectOne({ method: 'GET' }); - const resourceUrl = SERVER_API_URL + 'api/users'; - expect(req.request.url).toEqual(`${resourceUrl}/user`); - }); - it('should return User', () => { - service.find('user').subscribe(received => { - expect(received.body.login).toEqual('user'); - }); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(new User(1, 'user')); - }); - - it('should return Authorities', () => { - service.authorities().subscribe(_authorities => { - expect(_authorities).toEqual(['ROLE_USER', 'ROLE_ADMIN']); - }); - const req = httpMock.expectOne({ method: 'GET' }); - - req.flush(['ROLE_USER', 'ROLE_ADMIN']); - }); - - it('should propagate not found response', () => { - service.find('user').subscribe(null, (_error: any) => { - expect(_error.status).toEqual(404); - }); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush('Invalid request parameters', { - status: 404, - statusText: 'Bad Request' - }); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/asset/asset-delete-dialog.component.spec.ts b/src/test/javascript/spec/app/entities/asset/asset-delete-dialog.component.spec.ts deleted file mode 100644 index 26ab4fb0..00000000 --- a/src/test/javascript/spec/app/entities/asset/asset-delete-dialog.component.spec.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed, inject, fakeAsync, tick } from '@angular/core/testing'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { Observable, of } from 'rxjs'; -import { JhiEventManager } from 'ng-jhipster'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { AssetDeleteDialogComponent } from 'app/entities/asset/asset-delete-dialog.component'; -import { AssetService } from 'app/entities/asset/asset.service'; - -describe('Component Tests', () => { - describe('Asset Management Delete Component', () => { - let comp: AssetDeleteDialogComponent; - let fixture: ComponentFixture; - let service: AssetService; - let mockEventManager: any; - let mockActiveModal: any; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [AssetDeleteDialogComponent] - }) - .overrideTemplate(AssetDeleteDialogComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(AssetDeleteDialogComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(AssetService); - mockEventManager = fixture.debugElement.injector.get(JhiEventManager); - mockActiveModal = fixture.debugElement.injector.get(NgbActiveModal); - }); - - describe('confirmDelete', () => { - it('Should call delete service on confirmDelete', inject( - [], - fakeAsync(() => { - // GIVEN - spyOn(service, 'delete').and.returnValue(of({})); - - // WHEN - comp.confirmDelete(123); - tick(); - - // THEN - expect(service.delete).toHaveBeenCalledWith(123); - expect(mockActiveModal.dismissSpy).toHaveBeenCalled(); - expect(mockEventManager.broadcastSpy).toHaveBeenCalled(); - }) - )); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/asset/asset-detail.component.spec.ts b/src/test/javascript/spec/app/entities/asset/asset-detail.component.spec.ts deleted file mode 100644 index 8d176985..00000000 --- a/src/test/javascript/spec/app/entities/asset/asset-detail.component.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ActivatedRoute } from '@angular/router'; -import { of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { AssetDetailComponent } from 'app/entities/asset/asset-detail.component'; -import { Asset } from 'app/shared/model/asset.model'; - -describe('Component Tests', () => { - describe('Asset Management Detail Component', () => { - let comp: AssetDetailComponent; - let fixture: ComponentFixture; - const route = ({ data: of({ asset: new Asset(123) }) } as any) as ActivatedRoute; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [AssetDetailComponent], - providers: [{ provide: ActivatedRoute, useValue: route }] - }) - .overrideTemplate(AssetDetailComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(AssetDetailComponent); - comp = fixture.componentInstance; - }); - - describe('OnInit', () => { - it('Should call load all on init', () => { - // GIVEN - - // WHEN - comp.ngOnInit(); - - // THEN - expect(comp.asset).toEqual(jasmine.objectContaining({ id: 123 })); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/asset/asset-update.component.spec.ts b/src/test/javascript/spec/app/entities/asset/asset-update.component.spec.ts deleted file mode 100644 index 20bcdf53..00000000 --- a/src/test/javascript/spec/app/entities/asset/asset-update.component.spec.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; -import { HttpResponse } from '@angular/common/http'; -import { Observable, of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { AssetUpdateComponent } from 'app/entities/asset/asset-update.component'; -import { AssetService } from 'app/entities/asset/asset.service'; -import { Asset } from 'app/shared/model/asset.model'; - -describe('Component Tests', () => { - describe('Asset Management Update Component', () => { - let comp: AssetUpdateComponent; - let fixture: ComponentFixture; - let service: AssetService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [AssetUpdateComponent] - }) - .overrideTemplate(AssetUpdateComponent, '') - .compileComponents(); - - fixture = TestBed.createComponent(AssetUpdateComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(AssetService); - }); - - describe('save', () => { - it('Should call update service on save for existing entity', fakeAsync(() => { - // GIVEN - const entity = new Asset(123); - spyOn(service, 'update').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.asset = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.update).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - })); - - it('Should call create service on save for new entity', fakeAsync(() => { - // GIVEN - const entity = new Asset(); - spyOn(service, 'create').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.asset = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.create).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - })); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/asset/asset.component.spec.ts b/src/test/javascript/spec/app/entities/asset/asset.component.spec.ts deleted file mode 100644 index c8afd397..00000000 --- a/src/test/javascript/spec/app/entities/asset/asset.component.spec.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { Observable, of } from 'rxjs'; -import { HttpHeaders, HttpResponse } from '@angular/common/http'; -import { ActivatedRoute, Data } from '@angular/router'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { AssetComponent } from 'app/entities/asset/asset.component'; -import { AssetService } from 'app/entities/asset/asset.service'; -import { Asset } from 'app/shared/model/asset.model'; - -describe('Component Tests', () => { - describe('Asset Management Component', () => { - let comp: AssetComponent; - let fixture: ComponentFixture; - let service: AssetService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [AssetComponent], - providers: [ - { - provide: ActivatedRoute, - useValue: { - data: { - subscribe: (fn: (value: Data) => void) => - fn({ - pagingParams: { - predicate: 'id', - reverse: false, - page: 0 - } - }) - } - } - } - ] - }) - .overrideTemplate(AssetComponent, '') - .compileComponents(); - - fixture = TestBed.createComponent(AssetComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(AssetService); - }); - - it('Should call load all on init', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new Asset(123)], - headers - }) - ) - ); - - // WHEN - comp.ngOnInit(); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.assets[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - - it('should load a page', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new Asset(123)], - headers - }) - ) - ); - - // WHEN - comp.loadPage(1); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.assets[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - - it('should re-initialize the page', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new Asset(123)], - headers - }) - ) - ); - - // WHEN - comp.loadPage(1); - comp.reset(); - - // THEN - expect(comp.page).toEqual(0); - expect(service.query).toHaveBeenCalledTimes(2); - expect(comp.assets[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - it('should calculate the sort attribute for an id', () => { - // WHEN - const result = comp.sort(); - - // THEN - expect(result).toEqual(['id,asc']); - }); - - it('should calculate the sort attribute for a non-id attribute', () => { - // GIVEN - comp.predicate = 'name'; - - // WHEN - const result = comp.sort(); - - // THEN - expect(result).toEqual(['name,asc', 'id']); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/asset/asset.service.spec.ts b/src/test/javascript/spec/app/entities/asset/asset.service.spec.ts deleted file mode 100644 index 28250778..00000000 --- a/src/test/javascript/spec/app/entities/asset/asset.service.spec.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* tslint:disable max-line-length */ -import { TestBed, getTestBed } from '@angular/core/testing'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { of } from 'rxjs'; -import { take, map } from 'rxjs/operators'; -import * as moment from 'moment'; -import { DATE_FORMAT } from 'app/shared/constants/input.constants'; -import { AssetService } from 'app/entities/asset/asset.service'; -import { IAsset, Asset, AssetAction } from 'app/shared/model/asset.model'; - -describe('Service Tests', () => { - describe('Asset Service', () => { - let injector: TestBed; - let service: AssetService; - let httpMock: HttpTestingController; - let elemDefault: IAsset; - let currentDate: moment.Moment; - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule] - }); - injector = getTestBed(); - service = injector.get(AssetService); - httpMock = injector.get(HttpTestingController); - currentDate = moment(); - - elemDefault = new Asset(0, currentDate, currentDate, AssetAction.PAYMENT, 0, 'AAAAAAA'); - }); - - describe('Service methods', async () => { - it('should find an element', async () => { - const returnedFromService = Object.assign( - { - documentDate: currentDate.format(DATE_FORMAT), - valueDate: currentDate.format(DATE_FORMAT) - }, - elemDefault - ); - service - .find(123) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: elemDefault })); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should create a Asset', async () => { - const returnedFromService = Object.assign( - { - id: 0, - documentDate: currentDate.format(DATE_FORMAT), - valueDate: currentDate.format(DATE_FORMAT) - }, - elemDefault - ); - const expected = Object.assign( - { - documentDate: currentDate, - valueDate: currentDate - }, - returnedFromService - ); - service - .create(new Asset(null)) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: expected })); - const req = httpMock.expectOne({ method: 'POST' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should update a Asset', async () => { - const returnedFromService = Object.assign( - { - documentDate: currentDate.format(DATE_FORMAT), - valueDate: currentDate.format(DATE_FORMAT), - action: 'BBBBBB', - amount: 1, - remark: 'BBBBBB' - }, - elemDefault - ); - - const expected = Object.assign( - { - documentDate: currentDate, - valueDate: currentDate - }, - returnedFromService - ); - service - .update(expected) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: expected })); - const req = httpMock.expectOne({ method: 'PUT' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should return a list of Asset', async () => { - const returnedFromService = Object.assign( - { - documentDate: currentDate.format(DATE_FORMAT), - valueDate: currentDate.format(DATE_FORMAT), - action: 'BBBBBB', - amount: 1, - remark: 'BBBBBB' - }, - elemDefault - ); - const expected = Object.assign( - { - documentDate: currentDate, - valueDate: currentDate - }, - returnedFromService - ); - service - .query(expected) - .pipe( - take(1), - map(resp => resp.body) - ) - .subscribe(body => expect(body).toContainEqual(expected)); - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(JSON.stringify([returnedFromService])); - httpMock.verify(); - }); - - it('should delete a Asset', async () => { - const rxPromise = service.delete(123).subscribe(resp => expect(resp.ok)); - - const req = httpMock.expectOne({ method: 'DELETE' }); - req.flush({ status: 200 }); - }); - }); - - afterEach(() => { - httpMock.verify(); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/customer/customer-delete-dialog.component.spec.ts b/src/test/javascript/spec/app/entities/customer/customer-delete-dialog.component.spec.ts deleted file mode 100644 index 7b4f83cc..00000000 --- a/src/test/javascript/spec/app/entities/customer/customer-delete-dialog.component.spec.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed, inject, fakeAsync, tick } from '@angular/core/testing'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { Observable, of } from 'rxjs'; -import { JhiEventManager } from 'ng-jhipster'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { CustomerDeleteDialogComponent } from 'app/entities/customer/customer-delete-dialog.component'; -import { CustomerService } from 'app/entities/customer/customer.service'; - -describe('Component Tests', () => { - describe('Customer Management Delete Component', () => { - let comp: CustomerDeleteDialogComponent; - let fixture: ComponentFixture; - let service: CustomerService; - let mockEventManager: any; - let mockActiveModal: any; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [CustomerDeleteDialogComponent] - }) - .overrideTemplate(CustomerDeleteDialogComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(CustomerDeleteDialogComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(CustomerService); - mockEventManager = fixture.debugElement.injector.get(JhiEventManager); - mockActiveModal = fixture.debugElement.injector.get(NgbActiveModal); - }); - - describe('confirmDelete', () => { - it('Should call delete service on confirmDelete', inject( - [], - fakeAsync(() => { - // GIVEN - spyOn(service, 'delete').and.returnValue(of({})); - - // WHEN - comp.confirmDelete(123); - tick(); - - // THEN - expect(service.delete).toHaveBeenCalledWith(123); - expect(mockActiveModal.dismissSpy).toHaveBeenCalled(); - expect(mockEventManager.broadcastSpy).toHaveBeenCalled(); - }) - )); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/customer/customer-detail.component.spec.ts b/src/test/javascript/spec/app/entities/customer/customer-detail.component.spec.ts deleted file mode 100644 index 1e4506ac..00000000 --- a/src/test/javascript/spec/app/entities/customer/customer-detail.component.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ActivatedRoute } from '@angular/router'; -import { of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { CustomerDetailComponent } from 'app/entities/customer/customer-detail.component'; -import { Customer } from 'app/shared/model/customer.model'; - -describe('Component Tests', () => { - describe('Customer Management Detail Component', () => { - let comp: CustomerDetailComponent; - let fixture: ComponentFixture; - const route = ({ data: of({ customer: new Customer(123) }) } as any) as ActivatedRoute; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [CustomerDetailComponent], - providers: [{ provide: ActivatedRoute, useValue: route }] - }) - .overrideTemplate(CustomerDetailComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(CustomerDetailComponent); - comp = fixture.componentInstance; - }); - - describe('OnInit', () => { - it('Should call load all on init', () => { - // GIVEN - - // WHEN - comp.ngOnInit(); - - // THEN - expect(comp.customer).toEqual(jasmine.objectContaining({ id: 123 })); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/customer/customer-update.component.spec.ts b/src/test/javascript/spec/app/entities/customer/customer-update.component.spec.ts deleted file mode 100644 index e50a46df..00000000 --- a/src/test/javascript/spec/app/entities/customer/customer-update.component.spec.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; -import { HttpResponse } from '@angular/common/http'; -import { Observable, of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { CustomerUpdateComponent } from 'app/entities/customer/customer-update.component'; -import { CustomerService } from 'app/entities/customer/customer.service'; -import { Customer } from 'app/shared/model/customer.model'; - -describe('Component Tests', () => { - describe('Customer Management Update Component', () => { - let comp: CustomerUpdateComponent; - let fixture: ComponentFixture; - let service: CustomerService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [CustomerUpdateComponent] - }) - .overrideTemplate(CustomerUpdateComponent, '') - .compileComponents(); - - fixture = TestBed.createComponent(CustomerUpdateComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(CustomerService); - }); - - describe('save', () => { - it('Should call update service on save for existing entity', fakeAsync(() => { - // GIVEN - const entity = new Customer(123); - spyOn(service, 'update').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.customer = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.update).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - })); - - it('Should call create service on save for new entity', fakeAsync(() => { - // GIVEN - const entity = new Customer(); - spyOn(service, 'create').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.customer = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.create).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - })); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/customer/customer.component.spec.ts b/src/test/javascript/spec/app/entities/customer/customer.component.spec.ts deleted file mode 100644 index 414db92f..00000000 --- a/src/test/javascript/spec/app/entities/customer/customer.component.spec.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { Observable, of } from 'rxjs'; -import { HttpHeaders, HttpResponse } from '@angular/common/http'; -import { ActivatedRoute, Data } from '@angular/router'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { CustomerComponent } from 'app/entities/customer/customer.component'; -import { CustomerService } from 'app/entities/customer/customer.service'; -import { Customer } from 'app/shared/model/customer.model'; - -describe('Component Tests', () => { - describe('Customer Management Component', () => { - let comp: CustomerComponent; - let fixture: ComponentFixture; - let service: CustomerService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [CustomerComponent], - providers: [ - { - provide: ActivatedRoute, - useValue: { - data: { - subscribe: (fn: (value: Data) => void) => - fn({ - pagingParams: { - predicate: 'id', - reverse: false, - page: 0 - } - }) - } - } - } - ] - }) - .overrideTemplate(CustomerComponent, '') - .compileComponents(); - - fixture = TestBed.createComponent(CustomerComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(CustomerService); - }); - - it('Should call load all on init', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new Customer(123)], - headers - }) - ) - ); - - // WHEN - comp.ngOnInit(); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.customers[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - - it('should load a page', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new Customer(123)], - headers - }) - ) - ); - - // WHEN - comp.loadPage(1); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.customers[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - - it('should re-initialize the page', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new Customer(123)], - headers - }) - ) - ); - - // WHEN - comp.loadPage(1); - comp.reset(); - - // THEN - expect(comp.page).toEqual(0); - expect(service.query).toHaveBeenCalledTimes(2); - expect(comp.customers[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - it('should calculate the sort attribute for an id', () => { - // WHEN - const result = comp.sort(); - - // THEN - expect(result).toEqual(['id,asc']); - }); - - it('should calculate the sort attribute for a non-id attribute', () => { - // GIVEN - comp.predicate = 'name'; - - // WHEN - const result = comp.sort(); - - // THEN - expect(result).toEqual(['name,asc', 'id']); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/customer/customer.service.spec.ts b/src/test/javascript/spec/app/entities/customer/customer.service.spec.ts deleted file mode 100644 index 6d717639..00000000 --- a/src/test/javascript/spec/app/entities/customer/customer.service.spec.ts +++ /dev/null @@ -1,172 +0,0 @@ -/* tslint:disable max-line-length */ -import { getTestBed, TestBed } from '@angular/core/testing'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { map, take } from 'rxjs/operators'; -import * as moment from 'moment'; -import { DATE_FORMAT } from 'app/shared/constants/input.constants'; -import { CustomerService } from 'app/entities/customer/customer.service'; -import { Customer, CustomerKind, ICustomer, VatRegion } from 'app/shared/model/customer.model'; - -describe('Service Tests', () => { - describe('Customer Service', () => { - let injector: TestBed; - let service: CustomerService; - let httpMock: HttpTestingController; - let elemDefault: ICustomer; - let currentDate: moment.Moment; - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule] - }); - injector = getTestBed(); - service = injector.get(CustomerService); - httpMock = injector.get(HttpTestingController); - currentDate = moment(); - - elemDefault = new Customer( - 0, - 0, - 'AAAAAAA', - 'AAAAAAA', - CustomerKind.NATURAL, - currentDate, - 'AAAAAAA', - 'AAAAAAA', - 'AAAAAAA', - VatRegion.DOMESTIC, - 'AAAAAAA', - 'AAAAAAA', - 'AAAAAAA', - 'AAAAAAA', - 'AAAAAAA', - 'AAAAAAA' - ); - }); - - describe('Service methods', async () => { - it('should find an element', async () => { - const returnedFromService = Object.assign( - { - birthDate: currentDate.format(DATE_FORMAT) - }, - elemDefault - ); - service - .find(123) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: elemDefault })); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should create a Customer', async () => { - const returnedFromService = Object.assign( - { - id: 0, - birthDate: currentDate.format(DATE_FORMAT) - }, - elemDefault - ); - const expected = Object.assign( - { - birthDate: currentDate - }, - returnedFromService - ); - service - .create(new Customer(null)) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: expected })); - const req = httpMock.expectOne({ method: 'POST' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should update a Customer', async () => { - const returnedFromService = Object.assign( - { - reference: 1, - prefix: 'BBBBBB', - name: 'BBBBBB', - kind: 'BBBBBB', - birthDate: currentDate.format(DATE_FORMAT), - birthPlace: 'BBBBBB', - registrationCourt: 'BBBBBB', - registrationNumber: 'BBBBBB', - vatRegion: 'BBBBBB', - vatNumber: 'BBBBBB', - contractualSalutation: 'BBBBBB', - contractualAddress: 'BBBBBB', - billingSalutation: 'BBBBBB', - billingAddress: 'BBBBBB', - remark: 'BBBBBB' - }, - elemDefault - ); - - const expected = Object.assign( - { - birthDate: currentDate - }, - returnedFromService - ); - service - .update(expected) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: expected })); - const req = httpMock.expectOne({ method: 'PUT' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should return a list of Customer', async () => { - const returnedFromService = Object.assign( - { - reference: 1, - prefix: 'BBBBBB', - name: 'BBBBBB', - kind: 'BBBBBB', - birthDate: currentDate.format(DATE_FORMAT), - birthPlace: 'BBBBBB', - registrationCourt: 'BBBBBB', - registrationNumber: 'BBBBBB', - vatRegion: 'BBBBBB', - vatNumber: 'BBBBBB', - contractualSalutation: 'BBBBBB', - contractualAddress: 'BBBBBB', - billingSalutation: 'BBBBBB', - billingAddress: 'BBBBBB', - remark: 'BBBBBB' - }, - elemDefault - ); - const expected = Object.assign( - { - birthDate: currentDate - }, - returnedFromService - ); - service - .query(expected) - .pipe( - take(1), - map(resp => resp.body) - ) - .subscribe(body => expect(body).toContainEqual(expected)); - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(JSON.stringify([returnedFromService])); - httpMock.verify(); - }); - - it('should delete a Customer', async () => { - const rxPromise = service.delete(123).subscribe(resp => expect(resp.ok)); - - const req = httpMock.expectOne({ method: 'DELETE' }); - req.flush({ status: 200 }); - }); - }); - - afterEach(() => { - httpMock.verify(); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/membership/membership-delete-dialog.component.spec.ts b/src/test/javascript/spec/app/entities/membership/membership-delete-dialog.component.spec.ts deleted file mode 100644 index 9b396b77..00000000 --- a/src/test/javascript/spec/app/entities/membership/membership-delete-dialog.component.spec.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed, inject, fakeAsync, tick } from '@angular/core/testing'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { Observable, of } from 'rxjs'; -import { JhiEventManager } from 'ng-jhipster'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { MembershipDeleteDialogComponent } from 'app/entities/membership/membership-delete-dialog.component'; -import { MembershipService } from 'app/entities/membership/membership.service'; - -describe('Component Tests', () => { - describe('Membership Management Delete Component', () => { - let comp: MembershipDeleteDialogComponent; - let fixture: ComponentFixture; - let service: MembershipService; - let mockEventManager: any; - let mockActiveModal: any; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [MembershipDeleteDialogComponent] - }) - .overrideTemplate(MembershipDeleteDialogComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(MembershipDeleteDialogComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(MembershipService); - mockEventManager = fixture.debugElement.injector.get(JhiEventManager); - mockActiveModal = fixture.debugElement.injector.get(NgbActiveModal); - }); - - describe('confirmDelete', () => { - it('Should call delete service on confirmDelete', inject( - [], - fakeAsync(() => { - // GIVEN - spyOn(service, 'delete').and.returnValue(of({})); - - // WHEN - comp.confirmDelete(123); - tick(); - - // THEN - expect(service.delete).toHaveBeenCalledWith(123); - expect(mockActiveModal.dismissSpy).toHaveBeenCalled(); - expect(mockEventManager.broadcastSpy).toHaveBeenCalled(); - }) - )); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/membership/membership-detail.component.spec.ts b/src/test/javascript/spec/app/entities/membership/membership-detail.component.spec.ts deleted file mode 100644 index a66f96f5..00000000 --- a/src/test/javascript/spec/app/entities/membership/membership-detail.component.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ActivatedRoute } from '@angular/router'; -import { of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { MembershipDetailComponent } from 'app/entities/membership/membership-detail.component'; -import { Membership } from 'app/shared/model/membership.model'; - -describe('Component Tests', () => { - describe('Membership Management Detail Component', () => { - let comp: MembershipDetailComponent; - let fixture: ComponentFixture; - const route = ({ data: of({ membership: new Membership(123) }) } as any) as ActivatedRoute; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [MembershipDetailComponent], - providers: [{ provide: ActivatedRoute, useValue: route }] - }) - .overrideTemplate(MembershipDetailComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(MembershipDetailComponent); - comp = fixture.componentInstance; - }); - - describe('OnInit', () => { - it('Should call load all on init', () => { - // GIVEN - - // WHEN - comp.ngOnInit(); - - // THEN - expect(comp.membership).toEqual(jasmine.objectContaining({ id: 123 })); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/membership/membership-update.component.spec.ts b/src/test/javascript/spec/app/entities/membership/membership-update.component.spec.ts deleted file mode 100644 index abd5a5a2..00000000 --- a/src/test/javascript/spec/app/entities/membership/membership-update.component.spec.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; -import { HttpResponse } from '@angular/common/http'; -import { Observable, of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { MembershipUpdateComponent } from 'app/entities/membership/membership-update.component'; -import { MembershipService } from 'app/entities/membership/membership.service'; -import { Membership } from 'app/shared/model/membership.model'; - -describe('Component Tests', () => { - describe('Membership Management Update Component', () => { - let comp: MembershipUpdateComponent; - let fixture: ComponentFixture; - let service: MembershipService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [MembershipUpdateComponent] - }) - .overrideTemplate(MembershipUpdateComponent, '') - .compileComponents(); - - fixture = TestBed.createComponent(MembershipUpdateComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(MembershipService); - }); - - describe('save', () => { - it('Should call update service on save for existing entity', fakeAsync(() => { - // GIVEN - const entity = new Membership(123); - spyOn(service, 'update').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.membership = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.update).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - })); - - it('Should call create service on save for new entity', fakeAsync(() => { - // GIVEN - const entity = new Membership(); - spyOn(service, 'create').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.membership = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.create).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - })); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/membership/membership.component.spec.ts b/src/test/javascript/spec/app/entities/membership/membership.component.spec.ts deleted file mode 100644 index a43d6a1c..00000000 --- a/src/test/javascript/spec/app/entities/membership/membership.component.spec.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { Observable, of } from 'rxjs'; -import { HttpHeaders, HttpResponse } from '@angular/common/http'; -import { ActivatedRoute, Data } from '@angular/router'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { MembershipComponent } from 'app/entities/membership/membership.component'; -import { MembershipService } from 'app/entities/membership/membership.service'; -import { Membership } from 'app/shared/model/membership.model'; - -describe('Component Tests', () => { - describe('Membership Management Component', () => { - let comp: MembershipComponent; - let fixture: ComponentFixture; - let service: MembershipService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [MembershipComponent], - providers: [ - { - provide: ActivatedRoute, - useValue: { - data: { - subscribe: (fn: (value: Data) => void) => - fn({ - pagingParams: { - predicate: 'id', - reverse: false, - page: 0 - } - }) - } - } - } - ] - }) - .overrideTemplate(MembershipComponent, '') - .compileComponents(); - - fixture = TestBed.createComponent(MembershipComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(MembershipService); - }); - - it('Should call load all on init', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new Membership(123)], - headers - }) - ) - ); - - // WHEN - comp.ngOnInit(); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.memberships[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - - it('should load a page', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new Membership(123)], - headers - }) - ) - ); - - // WHEN - comp.loadPage(1); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.memberships[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - - it('should re-initialize the page', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new Membership(123)], - headers - }) - ) - ); - - // WHEN - comp.loadPage(1); - comp.reset(); - - // THEN - expect(comp.page).toEqual(0); - expect(service.query).toHaveBeenCalledTimes(2); - expect(comp.memberships[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - it('should calculate the sort attribute for an id', () => { - // WHEN - const result = comp.sort(); - - // THEN - expect(result).toEqual(['id,asc']); - }); - - it('should calculate the sort attribute for a non-id attribute', () => { - // GIVEN - comp.predicate = 'name'; - - // WHEN - const result = comp.sort(); - - // THEN - expect(result).toEqual(['name,asc', 'id']); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/membership/membership.service.spec.ts b/src/test/javascript/spec/app/entities/membership/membership.service.spec.ts deleted file mode 100644 index 1f5ced40..00000000 --- a/src/test/javascript/spec/app/entities/membership/membership.service.spec.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable max-line-length */ -import { getTestBed, TestBed } from '@angular/core/testing'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { map, take } from 'rxjs/operators'; -import * as moment from 'moment'; -import { DATE_FORMAT } from 'app/shared/constants/input.constants'; -import { MembershipService } from 'app/entities/membership/membership.service'; -import { IMembership, Membership } from 'app/shared/model/membership.model'; - -describe('Service Tests', () => { - describe('Membership Service', () => { - let injector: TestBed; - let service: MembershipService; - let httpMock: HttpTestingController; - let elemDefault: IMembership; - let currentDate: moment.Moment; - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule] - }); - injector = getTestBed(); - service = injector.get(MembershipService); - httpMock = injector.get(HttpTestingController); - currentDate = moment(); - - elemDefault = new Membership(0, currentDate, currentDate, currentDate, currentDate, 'AAAAAAA'); - }); - - describe('Service methods', async () => { - it('should find an element', async () => { - const returnedFromService = Object.assign( - { - admissionDocumentDate: currentDate.format(DATE_FORMAT), - cancellationDocumentDate: currentDate.format(DATE_FORMAT), - memberFromDate: currentDate.format(DATE_FORMAT), - memberUntilDate: currentDate.format(DATE_FORMAT) - }, - elemDefault - ); - service - .find(123) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: elemDefault })); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should create a Membership', async () => { - const returnedFromService = Object.assign( - { - id: 0, - admissionDocumentDate: currentDate.format(DATE_FORMAT), - cancellationDocumentDate: currentDate.format(DATE_FORMAT), - memberFromDate: currentDate.format(DATE_FORMAT), - memberUntilDate: currentDate.format(DATE_FORMAT) - }, - elemDefault - ); - const expected = Object.assign( - { - admissionDocumentDate: currentDate, - cancellationDocumentDate: currentDate, - memberFromDate: currentDate, - memberUntilDate: currentDate - }, - returnedFromService - ); - service - .create(new Membership(null)) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: expected })); - const req = httpMock.expectOne({ method: 'POST' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should update a Membership', async () => { - const returnedFromService = Object.assign( - { - admissionDocumentDate: currentDate.format(DATE_FORMAT), - cancellationDocumentDate: currentDate.format(DATE_FORMAT), - memberFromDate: currentDate.format(DATE_FORMAT), - memberUntilDate: currentDate.format(DATE_FORMAT), - remark: 'BBBBBB' - }, - elemDefault - ); - - const expected = Object.assign( - { - admissionDocumentDate: currentDate, - cancellationDocumentDate: currentDate, - memberFromDate: currentDate, - memberUntilDate: currentDate - }, - returnedFromService - ); - service - .update(expected) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: expected })); - const req = httpMock.expectOne({ method: 'PUT' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should return a list of Membership', async () => { - const returnedFromService = Object.assign( - { - admissionDocumentDate: currentDate.format(DATE_FORMAT), - cancellationDocumentDate: currentDate.format(DATE_FORMAT), - memberFromDate: currentDate.format(DATE_FORMAT), - memberUntilDate: currentDate.format(DATE_FORMAT), - remark: 'BBBBBB' - }, - elemDefault - ); - const expected = Object.assign( - { - admissionDocumentDate: currentDate, - cancellationDocumentDate: currentDate, - memberFromDate: currentDate, - memberUntilDate: currentDate - }, - returnedFromService - ); - service - .query(expected) - .pipe( - take(1), - map(resp => resp.body) - ) - .subscribe(body => expect(body).toContainEqual(expected)); - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(JSON.stringify([returnedFromService])); - httpMock.verify(); - }); - - it('should delete a Membership', async () => { - const rxPromise = service.delete(123).subscribe(resp => expect(resp.ok)); - - const req = httpMock.expectOne({ method: 'DELETE' }); - req.flush({ status: 200 }); - }); - }); - - afterEach(() => { - httpMock.verify(); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate-delete-dialog.component.spec.ts b/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate-delete-dialog.component.spec.ts deleted file mode 100644 index 6dec0e0e..00000000 --- a/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate-delete-dialog.component.spec.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed, inject, fakeAsync, tick } from '@angular/core/testing'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { Observable, of } from 'rxjs'; -import { JhiEventManager } from 'ng-jhipster'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { SepaMandateDeleteDialogComponent } from 'app/entities/sepa-mandate/sepa-mandate-delete-dialog.component'; -import { SepaMandateService } from 'app/entities/sepa-mandate/sepa-mandate.service'; - -describe('Component Tests', () => { - describe('SepaMandate Management Delete Component', () => { - let comp: SepaMandateDeleteDialogComponent; - let fixture: ComponentFixture; - let service: SepaMandateService; - let mockEventManager: any; - let mockActiveModal: any; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [SepaMandateDeleteDialogComponent] - }) - .overrideTemplate(SepaMandateDeleteDialogComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(SepaMandateDeleteDialogComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(SepaMandateService); - mockEventManager = fixture.debugElement.injector.get(JhiEventManager); - mockActiveModal = fixture.debugElement.injector.get(NgbActiveModal); - }); - - describe('confirmDelete', () => { - it('Should call delete service on confirmDelete', inject( - [], - fakeAsync(() => { - // GIVEN - spyOn(service, 'delete').and.returnValue(of({})); - - // WHEN - comp.confirmDelete(123); - tick(); - - // THEN - expect(service.delete).toHaveBeenCalledWith(123); - expect(mockActiveModal.dismissSpy).toHaveBeenCalled(); - expect(mockEventManager.broadcastSpy).toHaveBeenCalled(); - }) - )); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate-detail.component.spec.ts b/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate-detail.component.spec.ts deleted file mode 100644 index ba8ffcb2..00000000 --- a/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate-detail.component.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ActivatedRoute } from '@angular/router'; -import { of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { SepaMandateDetailComponent } from 'app/entities/sepa-mandate/sepa-mandate-detail.component'; -import { SepaMandate } from 'app/shared/model/sepa-mandate.model'; - -describe('Component Tests', () => { - describe('SepaMandate Management Detail Component', () => { - let comp: SepaMandateDetailComponent; - let fixture: ComponentFixture; - const route = ({ data: of({ sepaMandate: new SepaMandate(123) }) } as any) as ActivatedRoute; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [SepaMandateDetailComponent], - providers: [{ provide: ActivatedRoute, useValue: route }] - }) - .overrideTemplate(SepaMandateDetailComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(SepaMandateDetailComponent); - comp = fixture.componentInstance; - }); - - describe('OnInit', () => { - it('Should call load all on init', () => { - // GIVEN - - // WHEN - comp.ngOnInit(); - - // THEN - expect(comp.sepaMandate).toEqual(jasmine.objectContaining({ id: 123 })); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate-update.component.spec.ts b/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate-update.component.spec.ts deleted file mode 100644 index c2246524..00000000 --- a/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate-update.component.spec.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; -import { HttpResponse } from '@angular/common/http'; -import { Observable, of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { SepaMandateUpdateComponent } from 'app/entities/sepa-mandate/sepa-mandate-update.component'; -import { SepaMandateService } from 'app/entities/sepa-mandate/sepa-mandate.service'; -import { SepaMandate } from 'app/shared/model/sepa-mandate.model'; - -describe('Component Tests', () => { - describe('SepaMandate Management Update Component', () => { - let comp: SepaMandateUpdateComponent; - let fixture: ComponentFixture; - let service: SepaMandateService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [SepaMandateUpdateComponent] - }) - .overrideTemplate(SepaMandateUpdateComponent, '') - .compileComponents(); - - fixture = TestBed.createComponent(SepaMandateUpdateComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(SepaMandateService); - }); - - describe('save', () => { - it('Should call update service on save for existing entity', fakeAsync(() => { - // GIVEN - const entity = new SepaMandate(123); - spyOn(service, 'update').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.sepaMandate = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.update).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - })); - - it('Should call create service on save for new entity', fakeAsync(() => { - // GIVEN - const entity = new SepaMandate(); - spyOn(service, 'create').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.sepaMandate = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.create).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - })); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate.component.spec.ts b/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate.component.spec.ts deleted file mode 100644 index 66ce50bd..00000000 --- a/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate.component.spec.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { Observable, of } from 'rxjs'; -import { HttpHeaders, HttpResponse } from '@angular/common/http'; -import { ActivatedRoute, Data } from '@angular/router'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { SepaMandateComponent } from 'app/entities/sepa-mandate/sepa-mandate.component'; -import { SepaMandateService } from 'app/entities/sepa-mandate/sepa-mandate.service'; -import { SepaMandate } from 'app/shared/model/sepa-mandate.model'; - -describe('Component Tests', () => { - describe('SepaMandate Management Component', () => { - let comp: SepaMandateComponent; - let fixture: ComponentFixture; - let service: SepaMandateService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [SepaMandateComponent], - providers: [ - { - provide: ActivatedRoute, - useValue: { - data: { - subscribe: (fn: (value: Data) => void) => - fn({ - pagingParams: { - predicate: 'id', - reverse: false, - page: 0 - } - }) - } - } - } - ] - }) - .overrideTemplate(SepaMandateComponent, '') - .compileComponents(); - - fixture = TestBed.createComponent(SepaMandateComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(SepaMandateService); - }); - - it('Should call load all on init', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new SepaMandate(123)], - headers - }) - ) - ); - - // WHEN - comp.ngOnInit(); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.sepaMandates[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - - it('should load a page', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new SepaMandate(123)], - headers - }) - ) - ); - - // WHEN - comp.loadPage(1); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.sepaMandates[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - - it('should re-initialize the page', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new SepaMandate(123)], - headers - }) - ) - ); - - // WHEN - comp.loadPage(1); - comp.reset(); - - // THEN - expect(comp.page).toEqual(0); - expect(service.query).toHaveBeenCalledTimes(2); - expect(comp.sepaMandates[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - it('should calculate the sort attribute for an id', () => { - // WHEN - const result = comp.sort(); - - // THEN - expect(result).toEqual(['id,asc']); - }); - - it('should calculate the sort attribute for a non-id attribute', () => { - // GIVEN - comp.predicate = 'name'; - - // WHEN - const result = comp.sort(); - - // THEN - expect(result).toEqual(['name,asc', 'id']); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate.service.spec.ts b/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate.service.spec.ts deleted file mode 100644 index 89b1dc0b..00000000 --- a/src/test/javascript/spec/app/entities/sepa-mandate/sepa-mandate.service.spec.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* tslint:disable max-line-length */ -import { getTestBed, TestBed } from '@angular/core/testing'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { map, take } from 'rxjs/operators'; -import * as moment from 'moment'; -import { DATE_FORMAT } from 'app/shared/constants/input.constants'; -import { SepaMandateService } from 'app/entities/sepa-mandate/sepa-mandate.service'; -import { ISepaMandate, SepaMandate } from 'app/shared/model/sepa-mandate.model'; - -describe('Service Tests', () => { - describe('SepaMandate Service', () => { - let injector: TestBed; - let service: SepaMandateService; - let httpMock: HttpTestingController; - let elemDefault: ISepaMandate; - let currentDate: moment.Moment; - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule] - }); - injector = getTestBed(); - service = injector.get(SepaMandateService); - httpMock = injector.get(HttpTestingController); - currentDate = moment(); - - elemDefault = new SepaMandate( - 0, - 'AAAAAAA', - 'AAAAAAA', - 'AAAAAAA', - currentDate, - currentDate, - currentDate, - currentDate, - currentDate, - 'AAAAAAA' - ); - }); - - describe('Service methods', async () => { - it('should find an element', async () => { - const returnedFromService = Object.assign( - { - grantingDocumentDate: currentDate.format(DATE_FORMAT), - revokationDocumentDate: currentDate.format(DATE_FORMAT), - validFromDate: currentDate.format(DATE_FORMAT), - validUntilDate: currentDate.format(DATE_FORMAT), - lastUsedDate: currentDate.format(DATE_FORMAT) - }, - elemDefault - ); - service - .find(123) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: elemDefault })); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should create a SepaMandate', async () => { - const returnedFromService = Object.assign( - { - id: 0, - grantingDocumentDate: currentDate.format(DATE_FORMAT), - revokationDocumentDate: currentDate.format(DATE_FORMAT), - validFromDate: currentDate.format(DATE_FORMAT), - validUntilDate: currentDate.format(DATE_FORMAT), - lastUsedDate: currentDate.format(DATE_FORMAT) - }, - elemDefault - ); - const expected = Object.assign( - { - grantingDocumentDate: currentDate, - revokationDocumentDate: currentDate, - validFromDate: currentDate, - validUntilDate: currentDate, - lastUsedDate: currentDate - }, - returnedFromService - ); - service - .create(new SepaMandate(null)) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: expected })); - const req = httpMock.expectOne({ method: 'POST' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should update a SepaMandate', async () => { - const returnedFromService = Object.assign( - { - reference: 'BBBBBB', - iban: 'BBBBBB', - bic: 'BBBBBB', - grantingDocumentDate: currentDate.format(DATE_FORMAT), - revokationDocumentDate: currentDate.format(DATE_FORMAT), - validFromDate: currentDate.format(DATE_FORMAT), - validUntilDate: currentDate.format(DATE_FORMAT), - lastUsedDate: currentDate.format(DATE_FORMAT), - remark: 'BBBBBB' - }, - elemDefault - ); - - const expected = Object.assign( - { - grantingDocumentDate: currentDate, - revokationDocumentDate: currentDate, - validFromDate: currentDate, - validUntilDate: currentDate, - lastUsedDate: currentDate - }, - returnedFromService - ); - service - .update(expected) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: expected })); - const req = httpMock.expectOne({ method: 'PUT' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should return a list of SepaMandate', async () => { - const returnedFromService = Object.assign( - { - reference: 'BBBBBB', - iban: 'BBBBBB', - bic: 'BBBBBB', - grantingDocumentDate: currentDate.format(DATE_FORMAT), - revokationDocumentDate: currentDate.format(DATE_FORMAT), - validFromDate: currentDate.format(DATE_FORMAT), - validUntilDate: currentDate.format(DATE_FORMAT), - lastUsedDate: currentDate.format(DATE_FORMAT), - remark: 'BBBBBB' - }, - elemDefault - ); - const expected = Object.assign( - { - grantingDocumentDate: currentDate, - revokationDocumentDate: currentDate, - validFromDate: currentDate, - validUntilDate: currentDate, - lastUsedDate: currentDate - }, - returnedFromService - ); - service - .query(expected) - .pipe( - take(1), - map(resp => resp.body) - ) - .subscribe(body => expect(body).toContainEqual(expected)); - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(JSON.stringify([returnedFromService])); - httpMock.verify(); - }); - - it('should delete a SepaMandate', async () => { - const rxPromise = service.delete(123).subscribe(resp => expect(resp.ok)); - - const req = httpMock.expectOne({ method: 'DELETE' }); - req.flush({ status: 200 }); - }); - }); - - afterEach(() => { - httpMock.verify(); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/share/share-delete-dialog.component.spec.ts b/src/test/javascript/spec/app/entities/share/share-delete-dialog.component.spec.ts deleted file mode 100644 index 7e1c8acb..00000000 --- a/src/test/javascript/spec/app/entities/share/share-delete-dialog.component.spec.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed, inject, fakeAsync, tick } from '@angular/core/testing'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { Observable, of } from 'rxjs'; -import { JhiEventManager } from 'ng-jhipster'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { ShareDeleteDialogComponent } from 'app/entities/share/share-delete-dialog.component'; -import { ShareService } from 'app/entities/share/share.service'; - -describe('Component Tests', () => { - describe('Share Management Delete Component', () => { - let comp: ShareDeleteDialogComponent; - let fixture: ComponentFixture; - let service: ShareService; - let mockEventManager: any; - let mockActiveModal: any; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [ShareDeleteDialogComponent] - }) - .overrideTemplate(ShareDeleteDialogComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(ShareDeleteDialogComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(ShareService); - mockEventManager = fixture.debugElement.injector.get(JhiEventManager); - mockActiveModal = fixture.debugElement.injector.get(NgbActiveModal); - }); - - describe('confirmDelete', () => { - it('Should call delete service on confirmDelete', inject( - [], - fakeAsync(() => { - // GIVEN - spyOn(service, 'delete').and.returnValue(of({})); - - // WHEN - comp.confirmDelete(123); - tick(); - - // THEN - expect(service.delete).toHaveBeenCalledWith(123); - expect(mockActiveModal.dismissSpy).toHaveBeenCalled(); - expect(mockEventManager.broadcastSpy).toHaveBeenCalled(); - }) - )); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/share/share-detail.component.spec.ts b/src/test/javascript/spec/app/entities/share/share-detail.component.spec.ts deleted file mode 100644 index 69de2445..00000000 --- a/src/test/javascript/spec/app/entities/share/share-detail.component.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ActivatedRoute } from '@angular/router'; -import { of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { ShareDetailComponent } from 'app/entities/share/share-detail.component'; -import { Share } from 'app/shared/model/share.model'; - -describe('Component Tests', () => { - describe('Share Management Detail Component', () => { - let comp: ShareDetailComponent; - let fixture: ComponentFixture; - const route = ({ data: of({ share: new Share(123) }) } as any) as ActivatedRoute; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [ShareDetailComponent], - providers: [{ provide: ActivatedRoute, useValue: route }] - }) - .overrideTemplate(ShareDetailComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(ShareDetailComponent); - comp = fixture.componentInstance; - }); - - describe('OnInit', () => { - it('Should call load all on init', () => { - // GIVEN - - // WHEN - comp.ngOnInit(); - - // THEN - expect(comp.share).toEqual(jasmine.objectContaining({ id: 123 })); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/share/share-update.component.spec.ts b/src/test/javascript/spec/app/entities/share/share-update.component.spec.ts deleted file mode 100644 index 279be464..00000000 --- a/src/test/javascript/spec/app/entities/share/share-update.component.spec.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; -import { HttpResponse } from '@angular/common/http'; -import { Observable, of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { ShareUpdateComponent } from 'app/entities/share/share-update.component'; -import { ShareService } from 'app/entities/share/share.service'; -import { Share } from 'app/shared/model/share.model'; - -describe('Component Tests', () => { - describe('Share Management Update Component', () => { - let comp: ShareUpdateComponent; - let fixture: ComponentFixture; - let service: ShareService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [ShareUpdateComponent] - }) - .overrideTemplate(ShareUpdateComponent, '') - .compileComponents(); - - fixture = TestBed.createComponent(ShareUpdateComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(ShareService); - }); - - describe('save', () => { - it('Should call update service on save for existing entity', fakeAsync(() => { - // GIVEN - const entity = new Share(123); - spyOn(service, 'update').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.share = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.update).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - })); - - it('Should call create service on save for new entity', fakeAsync(() => { - // GIVEN - const entity = new Share(); - spyOn(service, 'create').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.share = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.create).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - })); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/share/share.component.spec.ts b/src/test/javascript/spec/app/entities/share/share.component.spec.ts deleted file mode 100644 index ab0e60bb..00000000 --- a/src/test/javascript/spec/app/entities/share/share.component.spec.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { Observable, of } from 'rxjs'; -import { HttpHeaders, HttpResponse } from '@angular/common/http'; -import { ActivatedRoute, Data } from '@angular/router'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { ShareComponent } from 'app/entities/share/share.component'; -import { ShareService } from 'app/entities/share/share.service'; -import { Share } from 'app/shared/model/share.model'; - -describe('Component Tests', () => { - describe('Share Management Component', () => { - let comp: ShareComponent; - let fixture: ComponentFixture; - let service: ShareService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [ShareComponent], - providers: [ - { - provide: ActivatedRoute, - useValue: { - data: { - subscribe: (fn: (value: Data) => void) => - fn({ - pagingParams: { - predicate: 'id', - reverse: false, - page: 0 - } - }) - } - } - } - ] - }) - .overrideTemplate(ShareComponent, '') - .compileComponents(); - - fixture = TestBed.createComponent(ShareComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(ShareService); - }); - - it('Should call load all on init', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new Share(123)], - headers - }) - ) - ); - - // WHEN - comp.ngOnInit(); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.shares[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - - it('should load a page', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new Share(123)], - headers - }) - ) - ); - - // WHEN - comp.loadPage(1); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.shares[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - - it('should re-initialize the page', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new Share(123)], - headers - }) - ) - ); - - // WHEN - comp.loadPage(1); - comp.reset(); - - // THEN - expect(comp.page).toEqual(0); - expect(service.query).toHaveBeenCalledTimes(2); - expect(comp.shares[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - it('should calculate the sort attribute for an id', () => { - // WHEN - const result = comp.sort(); - - // THEN - expect(result).toEqual(['id,asc']); - }); - - it('should calculate the sort attribute for a non-id attribute', () => { - // GIVEN - comp.predicate = 'name'; - - // WHEN - const result = comp.sort(); - - // THEN - expect(result).toEqual(['name,asc', 'id']); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/share/share.service.spec.ts b/src/test/javascript/spec/app/entities/share/share.service.spec.ts deleted file mode 100644 index 73bf3281..00000000 --- a/src/test/javascript/spec/app/entities/share/share.service.spec.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* tslint:disable max-line-length */ -import { TestBed, getTestBed } from '@angular/core/testing'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { of } from 'rxjs'; -import { take, map } from 'rxjs/operators'; -import * as moment from 'moment'; -import { DATE_FORMAT } from 'app/shared/constants/input.constants'; -import { ShareService } from 'app/entities/share/share.service'; -import { IShare, Share, ShareAction } from 'app/shared/model/share.model'; - -describe('Service Tests', () => { - describe('Share Service', () => { - let injector: TestBed; - let service: ShareService; - let httpMock: HttpTestingController; - let elemDefault: IShare; - let currentDate: moment.Moment; - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule] - }); - injector = getTestBed(); - service = injector.get(ShareService); - httpMock = injector.get(HttpTestingController); - currentDate = moment(); - - elemDefault = new Share(0, currentDate, currentDate, ShareAction.SUBSCRIPTION, 0, 'AAAAAAA'); - }); - - describe('Service methods', async () => { - it('should find an element', async () => { - const returnedFromService = Object.assign( - { - documentDate: currentDate.format(DATE_FORMAT), - valueDate: currentDate.format(DATE_FORMAT) - }, - elemDefault - ); - service - .find(123) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: elemDefault })); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should create a Share', async () => { - const returnedFromService = Object.assign( - { - id: 0, - documentDate: currentDate.format(DATE_FORMAT), - valueDate: currentDate.format(DATE_FORMAT) - }, - elemDefault - ); - const expected = Object.assign( - { - documentDate: currentDate, - valueDate: currentDate - }, - returnedFromService - ); - service - .create(new Share(null)) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: expected })); - const req = httpMock.expectOne({ method: 'POST' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should update a Share', async () => { - const returnedFromService = Object.assign( - { - documentDate: currentDate.format(DATE_FORMAT), - valueDate: currentDate.format(DATE_FORMAT), - action: 'BBBBBB', - quantity: 1, - remark: 'BBBBBB' - }, - elemDefault - ); - - const expected = Object.assign( - { - documentDate: currentDate, - valueDate: currentDate - }, - returnedFromService - ); - service - .update(expected) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: expected })); - const req = httpMock.expectOne({ method: 'PUT' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should return a list of Share', async () => { - const returnedFromService = Object.assign( - { - documentDate: currentDate.format(DATE_FORMAT), - valueDate: currentDate.format(DATE_FORMAT), - action: 'BBBBBB', - quantity: 1, - remark: 'BBBBBB' - }, - elemDefault - ); - const expected = Object.assign( - { - documentDate: currentDate, - valueDate: currentDate - }, - returnedFromService - ); - service - .query(expected) - .pipe( - take(1), - map(resp => resp.body) - ) - .subscribe(body => expect(body).toContainEqual(expected)); - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(JSON.stringify([returnedFromService])); - httpMock.verify(); - }); - - it('should delete a Share', async () => { - const rxPromise = service.delete(123).subscribe(resp => expect(resp.ok)); - - const req = httpMock.expectOne({ method: 'DELETE' }); - req.flush({ status: 200 }); - }); - }); - - afterEach(() => { - httpMock.verify(); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment-delete-dialog.component.spec.ts b/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment-delete-dialog.component.spec.ts deleted file mode 100644 index 359e218c..00000000 --- a/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment-delete-dialog.component.spec.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed, inject, fakeAsync, tick } from '@angular/core/testing'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { Observable, of } from 'rxjs'; -import { JhiEventManager } from 'ng-jhipster'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { UserRoleAssignmentDeleteDialogComponent } from 'app/entities/user-role-assignment/user-role-assignment-delete-dialog.component'; -import { UserRoleAssignmentService } from 'app/entities/user-role-assignment/user-role-assignment.service'; - -describe('Component Tests', () => { - describe('UserRoleAssignment Management Delete Component', () => { - let comp: UserRoleAssignmentDeleteDialogComponent; - let fixture: ComponentFixture; - let service: UserRoleAssignmentService; - let mockEventManager: any; - let mockActiveModal: any; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [UserRoleAssignmentDeleteDialogComponent] - }) - .overrideTemplate(UserRoleAssignmentDeleteDialogComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(UserRoleAssignmentDeleteDialogComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(UserRoleAssignmentService); - mockEventManager = fixture.debugElement.injector.get(JhiEventManager); - mockActiveModal = fixture.debugElement.injector.get(NgbActiveModal); - }); - - describe('confirmDelete', () => { - it('Should call delete service on confirmDelete', inject( - [], - fakeAsync(() => { - // GIVEN - spyOn(service, 'delete').and.returnValue(of({})); - - // WHEN - comp.confirmDelete(123); - tick(); - - // THEN - expect(service.delete).toHaveBeenCalledWith(123); - expect(mockActiveModal.dismissSpy).toHaveBeenCalled(); - expect(mockEventManager.broadcastSpy).toHaveBeenCalled(); - }) - )); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment-detail.component.spec.ts b/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment-detail.component.spec.ts deleted file mode 100644 index d2f85209..00000000 --- a/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment-detail.component.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { ActivatedRoute } from '@angular/router'; -import { of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { UserRoleAssignmentDetailComponent } from 'app/entities/user-role-assignment/user-role-assignment-detail.component'; -import { UserRoleAssignment } from 'app/shared/model/user-role-assignment.model'; - -describe('Component Tests', () => { - describe('UserRoleAssignment Management Detail Component', () => { - let comp: UserRoleAssignmentDetailComponent; - let fixture: ComponentFixture; - const route = ({ data: of({ userRoleAssignment: new UserRoleAssignment(123) }) } as any) as ActivatedRoute; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [UserRoleAssignmentDetailComponent], - providers: [{ provide: ActivatedRoute, useValue: route }] - }) - .overrideTemplate(UserRoleAssignmentDetailComponent, '') - .compileComponents(); - fixture = TestBed.createComponent(UserRoleAssignmentDetailComponent); - comp = fixture.componentInstance; - }); - - describe('OnInit', () => { - it('Should call load all on init', () => { - // GIVEN - - // WHEN - comp.ngOnInit(); - - // THEN - expect(comp.userRoleAssignment).toEqual(jasmine.objectContaining({ id: 123 })); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment-update.component.spec.ts b/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment-update.component.spec.ts deleted file mode 100644 index 0ca89214..00000000 --- a/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment-update.component.spec.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; -import { HttpResponse } from '@angular/common/http'; -import { Observable, of } from 'rxjs'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { UserRoleAssignmentUpdateComponent } from 'app/entities/user-role-assignment/user-role-assignment-update.component'; -import { UserRoleAssignmentService } from 'app/entities/user-role-assignment/user-role-assignment.service'; -import { UserRoleAssignment } from 'app/shared/model/user-role-assignment.model'; - -describe('Component Tests', () => { - describe('UserRoleAssignment Management Update Component', () => { - let comp: UserRoleAssignmentUpdateComponent; - let fixture: ComponentFixture; - let service: UserRoleAssignmentService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [UserRoleAssignmentUpdateComponent] - }) - .overrideTemplate(UserRoleAssignmentUpdateComponent, '') - .compileComponents(); - - fixture = TestBed.createComponent(UserRoleAssignmentUpdateComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(UserRoleAssignmentService); - }); - - describe('save', () => { - it('Should call update service on save for existing entity', fakeAsync(() => { - // GIVEN - const entity = new UserRoleAssignment(123); - spyOn(service, 'update').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.userRoleAssignment = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.update).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - })); - - it('Should call create service on save for new entity', fakeAsync(() => { - // GIVEN - const entity = new UserRoleAssignment(); - spyOn(service, 'create').and.returnValue(of(new HttpResponse({ body: entity }))); - comp.userRoleAssignment = entity; - // WHEN - comp.save(); - tick(); // simulate async - - // THEN - expect(service.create).toHaveBeenCalledWith(entity); - expect(comp.isSaving).toEqual(false); - })); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment.component.spec.ts b/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment.component.spec.ts deleted file mode 100644 index 82e6923c..00000000 --- a/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment.component.spec.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable max-line-length */ -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { Observable, of } from 'rxjs'; -import { HttpHeaders, HttpResponse } from '@angular/common/http'; -import { ActivatedRoute, Data } from '@angular/router'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { UserRoleAssignmentComponent } from 'app/entities/user-role-assignment/user-role-assignment.component'; -import { UserRoleAssignmentService } from 'app/entities/user-role-assignment/user-role-assignment.service'; -import { UserRoleAssignment } from 'app/shared/model/user-role-assignment.model'; - -describe('Component Tests', () => { - describe('UserRoleAssignment Management Component', () => { - let comp: UserRoleAssignmentComponent; - let fixture: ComponentFixture; - let service: UserRoleAssignmentService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [UserRoleAssignmentComponent], - providers: [ - { - provide: ActivatedRoute, - useValue: { - data: { - subscribe: (fn: (value: Data) => void) => - fn({ - pagingParams: { - predicate: 'id', - reverse: false, - page: 0 - } - }) - } - } - } - ] - }) - .overrideTemplate(UserRoleAssignmentComponent, '') - .compileComponents(); - - fixture = TestBed.createComponent(UserRoleAssignmentComponent); - comp = fixture.componentInstance; - service = fixture.debugElement.injector.get(UserRoleAssignmentService); - }); - - it('Should call load all on init', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new UserRoleAssignment(123)], - headers - }) - ) - ); - - // WHEN - comp.ngOnInit(); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.userRoleAssignments[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - - it('should load a page', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new UserRoleAssignment(123)], - headers - }) - ) - ); - - // WHEN - comp.loadPage(1); - - // THEN - expect(service.query).toHaveBeenCalled(); - expect(comp.userRoleAssignments[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - - it('should re-initialize the page', () => { - // GIVEN - const headers = new HttpHeaders().append('link', 'link;link'); - spyOn(service, 'query').and.returnValue( - of( - new HttpResponse({ - body: [new UserRoleAssignment(123)], - headers - }) - ) - ); - - // WHEN - comp.loadPage(1); - comp.reset(); - - // THEN - expect(comp.page).toEqual(0); - expect(service.query).toHaveBeenCalledTimes(2); - expect(comp.userRoleAssignments[0]).toEqual(jasmine.objectContaining({ id: 123 })); - }); - it('should calculate the sort attribute for an id', () => { - // WHEN - const result = comp.sort(); - - // THEN - expect(result).toEqual(['id,asc']); - }); - - it('should calculate the sort attribute for a non-id attribute', () => { - // GIVEN - comp.predicate = 'name'; - - // WHEN - const result = comp.sort(); - - // THEN - expect(result).toEqual(['name,asc', 'id']); - }); - }); -}); diff --git a/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment.service.spec.ts b/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment.service.spec.ts deleted file mode 100644 index 5bcb7987..00000000 --- a/src/test/javascript/spec/app/entities/user-role-assignment/user-role-assignment.service.spec.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* tslint:disable max-line-length */ -import { TestBed, getTestBed } from '@angular/core/testing'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { HttpClient, HttpResponse } from '@angular/common/http'; -import { of } from 'rxjs'; -import { take, map } from 'rxjs/operators'; -import { UserRoleAssignmentService } from 'app/entities/user-role-assignment/user-role-assignment.service'; -import { IUserRoleAssignment, UserRoleAssignment, UserRole } from 'app/shared/model/user-role-assignment.model'; - -describe('Service Tests', () => { - describe('UserRoleAssignment Service', () => { - let injector: TestBed; - let service: UserRoleAssignmentService; - let httpMock: HttpTestingController; - let elemDefault: IUserRoleAssignment; - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule] - }); - injector = getTestBed(); - service = injector.get(UserRoleAssignmentService); - httpMock = injector.get(HttpTestingController); - - elemDefault = new UserRoleAssignment(0, 'AAAAAAA', 0, UserRole.HOSTMASTER); - }); - - describe('Service methods', async () => { - it('should find an element', async () => { - const returnedFromService = Object.assign({}, elemDefault); - service - .find(123) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: elemDefault })); - - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should create a UserRoleAssignment', async () => { - const returnedFromService = Object.assign( - { - id: 0 - }, - elemDefault - ); - const expected = Object.assign({}, returnedFromService); - service - .create(new UserRoleAssignment(null)) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: expected })); - const req = httpMock.expectOne({ method: 'POST' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should update a UserRoleAssignment', async () => { - const returnedFromService = Object.assign( - { - entityTypeId: 'BBBBBB', - entityObjectId: 1, - assignedRole: 'BBBBBB' - }, - elemDefault - ); - - const expected = Object.assign({}, returnedFromService); - service - .update(expected) - .pipe(take(1)) - .subscribe(resp => expect(resp).toMatchObject({ body: expected })); - const req = httpMock.expectOne({ method: 'PUT' }); - req.flush(JSON.stringify(returnedFromService)); - }); - - it('should return a list of UserRoleAssignment', async () => { - const returnedFromService = Object.assign( - { - entityTypeId: 'BBBBBB', - entityObjectId: 1, - assignedRole: 'BBBBBB' - }, - elemDefault - ); - const expected = Object.assign({}, returnedFromService); - service - .query(expected) - .pipe( - take(1), - map(resp => resp.body) - ) - .subscribe(body => expect(body).toContainEqual(expected)); - const req = httpMock.expectOne({ method: 'GET' }); - req.flush(JSON.stringify([returnedFromService])); - httpMock.verify(); - }); - - it('should delete a UserRoleAssignment', async () => { - const rxPromise = service.delete(123).subscribe(resp => expect(resp.ok)); - - const req = httpMock.expectOne({ method: 'DELETE' }); - req.flush({ status: 200 }); - }); - }); - - afterEach(() => { - httpMock.verify(); - }); - }); -}); diff --git a/src/test/javascript/spec/app/shared/alert/alert-error.component.spec.ts b/src/test/javascript/spec/app/shared/alert/alert-error.component.spec.ts deleted file mode 100644 index d15e9622..00000000 --- a/src/test/javascript/spec/app/shared/alert/alert-error.component.spec.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { ComponentFixture, TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing'; -import { HttpErrorResponse, HttpHeaders } from '@angular/common/http'; -import { JhiAlertService, JhiEventManager } from 'ng-jhipster'; -import { TranslateModule } from '@ngx-translate/core'; - -import { HsadminNgTestModule } from '../../../test.module'; -import { JhiAlertErrorComponent } from 'app/shared/alert/alert-error.component'; -import { MockAlertService } from '../../../helpers/mock-alert.service'; - -describe('Component Tests', () => { - describe('Alert Error Component', () => { - let comp: JhiAlertErrorComponent; - let fixture: ComponentFixture; - let eventManager: JhiEventManager; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule, TranslateModule.forRoot()], - declarations: [JhiAlertErrorComponent], - providers: [ - JhiEventManager, - { - provide: JhiAlertService, - useClass: MockAlertService - } - ] - }) - .overrideTemplate(JhiAlertErrorComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(JhiAlertErrorComponent); - comp = fixture.componentInstance; - eventManager = fixture.debugElement.injector.get(JhiEventManager); - }); - - describe('Error Handling', () => { - it('Should display an alert on status 0', () => { - // GIVEN - eventManager.broadcast({ name: 'hsadminNgApp.httpError', content: { status: 0 } }); - // THEN - expect(comp.alerts.length).toBe(1); - expect(comp.alerts[0].msg).toBe('error.server.not.reachable'); - }); - it('Should display an alert on status 404', () => { - // GIVEN - eventManager.broadcast({ name: 'hsadminNgApp.httpError', content: { status: 404 } }); - // THEN - expect(comp.alerts.length).toBe(1); - expect(comp.alerts[0].msg).toBe('error.url.not.found'); - }); - it('Should display an alert on generic error', () => { - // GIVEN - eventManager.broadcast({ name: 'hsadminNgApp.httpError', content: { error: { message: 'Error Message' } } }); - eventManager.broadcast({ name: 'hsadminNgApp.httpError', content: { error: 'Second Error Message' } }); - // THEN - expect(comp.alerts.length).toBe(2); - expect(comp.alerts[0].msg).toBe('Error Message'); - expect(comp.alerts[1].msg).toBe('Second Error Message'); - }); - it('Should display an alert on status 400 for generic error', () => { - // GIVEN - const response = new HttpErrorResponse({ - url: 'http://localhost:8080/api/foos', - headers: new HttpHeaders(), - status: 400, - statusText: 'Bad Request', - error: { - type: 'https://www.jhipster.tech/problem/constraint-violation', - title: 'Bad Request', - status: 400, - path: '/api/foos', - message: 'error.validation' - } - }); - eventManager.broadcast({ name: 'hsadminNgApp.httpError', content: response }); - // THEN - expect(comp.alerts.length).toBe(1); - expect(comp.alerts[0].msg).toBe('error.validation'); - }); - it('Should display an alert on status 400 for generic error without message', () => { - // GIVEN - const response = new HttpErrorResponse({ - url: 'http://localhost:8080/api/foos', - headers: new HttpHeaders(), - status: 400, - error: 'Bad Request' - }); - eventManager.broadcast({ name: 'hsadminNgApp.httpError', content: response }); - // THEN - expect(comp.alerts.length).toBe(1); - expect(comp.alerts[0].msg).toBe('Bad Request'); - }); - it('Should display an alert on status 400 for invalid parameters', () => { - // GIVEN - const response = new HttpErrorResponse({ - url: 'http://localhost:8080/api/foos', - headers: new HttpHeaders(), - status: 400, - statusText: 'Bad Request', - error: { - type: 'https://www.jhipster.tech/problem/constraint-violation', - title: 'Method argument not valid', - status: 400, - path: '/api/foos', - message: 'error.validation', - fieldErrors: [{ objectName: 'foo', field: 'minField', message: 'Min' }] - } - }); - eventManager.broadcast({ name: 'hsadminNgApp.httpError', content: response }); - // THEN - expect(comp.alerts.length).toBe(1); - expect(comp.alerts[0].msg).toBe('error.Size'); - }); - it('Should display an alert on status 400 for error headers', () => { - // GIVEN - const response = new HttpErrorResponse({ - url: 'http://localhost:8080/api/foos', - headers: new HttpHeaders().append('app-error', 'Error Message').append('app-params', 'foo'), - status: 400, - statusText: 'Bad Request', - error: { - status: 400, - message: 'error.validation' - } - }); - eventManager.broadcast({ name: 'hsadminNgApp.httpError', content: response }); - // THEN - expect(comp.alerts.length).toBe(1); - expect(comp.alerts[0].msg).toBe('Error Message'); - }); - }); - }); -}); diff --git a/src/test/javascript/spec/app/shared/login/login.component.spec.ts b/src/test/javascript/spec/app/shared/login/login.component.spec.ts deleted file mode 100644 index f1bcfb71..00000000 --- a/src/test/javascript/spec/app/shared/login/login.component.spec.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { ComponentFixture, TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing'; -import { Router } from '@angular/router'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { JhiEventManager } from 'ng-jhipster'; - -import { LoginService } from 'app/core/login/login.service'; -import { JhiLoginModalComponent } from 'app/shared/login/login.component'; -import { StateStorageService } from 'app/core/auth/state-storage.service'; -import { HsadminNgTestModule } from '../../../test.module'; -import { MockLoginService } from '../../../helpers/mock-login.service'; -import { MockStateStorageService } from '../../../helpers/mock-state-storage.service'; - -describe('Component Tests', () => { - describe('LoginComponent', () => { - let comp: JhiLoginModalComponent; - let fixture: ComponentFixture; - let mockLoginService: any; - let mockStateStorageService: any; - let mockRouter: any; - let mockEventManager: any; - let mockActiveModal: any; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [HsadminNgTestModule], - declarations: [JhiLoginModalComponent], - providers: [ - { - provide: LoginService, - useClass: MockLoginService - }, - { - provide: StateStorageService, - useClass: MockStateStorageService - } - ] - }) - .overrideTemplate(JhiLoginModalComponent, '') - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(JhiLoginModalComponent); - comp = fixture.componentInstance; - mockLoginService = fixture.debugElement.injector.get(LoginService); - mockStateStorageService = fixture.debugElement.injector.get(StateStorageService); - mockRouter = fixture.debugElement.injector.get(Router); - mockEventManager = fixture.debugElement.injector.get(JhiEventManager); - mockActiveModal = fixture.debugElement.injector.get(NgbActiveModal); - }); - - it('should authenticate the user upon login when previous state was set', inject( - [], - fakeAsync(() => { - // GIVEN - const credentials = { - username: 'admin', - password: 'admin', - rememberMe: true - }; - comp.username = 'admin'; - comp.password = 'admin'; - comp.rememberMe = true; - comp.credentials = credentials; - mockLoginService.setResponse({}); - mockStateStorageService.setResponse({ redirect: 'dummy' }); - - // WHEN/ - comp.login(); - tick(); // simulate async - - // THEN - expect(comp.authenticationError).toEqual(false); - expect(mockActiveModal.dismissSpy).toHaveBeenCalledWith('login success'); - expect(mockEventManager.broadcastSpy).toHaveBeenCalledTimes(1); - expect(mockLoginService.loginSpy).toHaveBeenCalledWith(credentials); - expect(mockStateStorageService.getUrlSpy).toHaveBeenCalledTimes(1); - expect(mockStateStorageService.storeUrlSpy).toHaveBeenCalledWith(null); - expect(mockRouter.navigateSpy).toHaveBeenCalledWith([{ redirect: 'dummy' }]); - }) - )); - - it('should authenticate the user upon login when previous state was not set', inject( - [], - fakeAsync(() => { - // GIVEN - const credentials = { - username: 'admin', - password: 'admin', - rememberMe: true - }; - comp.username = 'admin'; - comp.password = 'admin'; - comp.rememberMe = true; - comp.credentials = credentials; - mockLoginService.setResponse({}); - mockStateStorageService.setResponse(null); - - // WHEN - comp.login(); - tick(); // simulate async - - // THEN - expect(comp.authenticationError).toEqual(false); - expect(mockActiveModal.dismissSpy).toHaveBeenCalledWith('login success'); - expect(mockEventManager.broadcastSpy).toHaveBeenCalledTimes(1); - expect(mockLoginService.loginSpy).toHaveBeenCalledWith(credentials); - expect(mockStateStorageService.getUrlSpy).toHaveBeenCalledTimes(1); - expect(mockStateStorageService.storeUrlSpy).not.toHaveBeenCalled(); - expect(mockRouter.navigateSpy).not.toHaveBeenCalled(); - }) - )); - - it('should empty the credentials upon cancel', () => { - // GIVEN - const credentials = { - username: 'admin', - password: 'admin', - rememberMe: true - }; - - const expected = { - username: null, - password: null, - rememberMe: true - }; - - comp.credentials = credentials; - - // WHEN - comp.cancel(); - - // THEN - expect(comp.authenticationError).toEqual(false); - expect(comp.credentials).toEqual(expected); - expect(mockActiveModal.dismissSpy).toHaveBeenCalledWith('cancel'); - }); - - it('should redirect user when register', () => { - // WHEN - comp.register(); - - // THEN - expect(mockActiveModal.dismissSpy).toHaveBeenCalledWith('to state register'); - expect(mockRouter.navigateSpy).toHaveBeenCalledWith(['/register']); - }); - - it('should redirect user when request password', () => { - // WHEN - comp.requestResetPassword(); - - // THEN - expect(mockActiveModal.dismissSpy).toHaveBeenCalledWith('to state requestReset'); - expect(mockRouter.navigateSpy).toHaveBeenCalledWith(['/reset', 'request']); - }); - }); -}); diff --git a/src/test/javascript/spec/app/shared/util/linebreaks-pipe.spec.ts b/src/test/javascript/spec/app/shared/util/linebreaks-pipe.spec.ts deleted file mode 100644 index 28e20578..00000000 --- a/src/test/javascript/spec/app/shared/util/linebreaks-pipe.spec.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { LinebreaksPipe } from 'app/shared/util/linebreaks-pipe'; - -/* To run these tests in IntelliJ IDEA, you need a run configuration with - Configuration File: - ~/Projekte/Hostsharing/hsadmin-ng/src/test/javascript/jest.conf.js - and a Node Interpreter, e.g. if installed with nvm, this could be: - ~/.nvm/versions/node/v10.15.3/bin/node - */ -describe('LinebreaksPipe Tests', () => { - describe('LinebreaksPipe', () => { - let pipe: LinebreaksPipe; - - beforeEach(() => { - pipe = new LinebreaksPipe(); - }); - - it('converts null to null', () => { - expect(pipe.transform(null)).toBe(null); - }); - - it('converts empty string to empty string', () => { - expect(pipe.transform('')).toBe(''); - }); - - it('converts string not containing line breaks to identical string', () => { - expect(pipe.transform('no linebreak here')).toBe('no linebreak here'); - }); - - it('converts string containing line breaks to string containing
by default', () => { - expect(pipe.transform('some\nlinebreaks\nhere')).toBe('some
linebreaks
here'); - }); - - it('converts string containing line breaks string containing specified replacement', () => { - expect(pipe.transform('some\nlinebreaks\nhere', ' | ')).toBe('some | linebreaks | here'); - }); - }); -}); diff --git a/src/test/javascript/spec/app/shared/util/tablefilter.spec.ts b/src/test/javascript/spec/app/shared/util/tablefilter.spec.ts deleted file mode 100644 index 8f523776..00000000 --- a/src/test/javascript/spec/app/shared/util/tablefilter.spec.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { queryContains, queryEquals, queryYearAsDateRange, TableFilter } from 'app/shared/util/tablefilter'; - -/* To run these tests in IntelliJ IDEA, you need a run configuration with - Configuration File: - ~/Projekte/Hostsharing/hsadmin-ng/src/test/javascript/jest.conf.js - and a Node Interpreter, e.g. if installed with nvm, this could be: - ~/.nvm/versions/node/v10.15.3/bin/node - */ -describe('TableFilter Tests', () => { - describe('TableFilter', () => { - const TEST_DEBOUNCE_MILLIS = 100; - - let filter: TableFilter<{ name?: string; number?: string; date?: string }>; - let asynchronously: () => void; - - beforeEach(() => { - filter = new TableFilter( - { - name: queryContains, - number: queryEquals, - date: queryYearAsDateRange - }, - TEST_DEBOUNCE_MILLIS, - () => { - asynchronously(); - } - ); - }); - - it('trigger() asynchronously calls the reload-handler', done => { - // given - filter.criteria.name = 'Test Filter Value'; - - // when - filter.trigger({ target: { valid: true } }); - const triggerStartedAtMillis = Date.now(); - - // then - asynchronously = () => { - expect(Date.now()).toBeGreaterThan(triggerStartedAtMillis); - done(); - }; - }); - - it('if trigger() is called multiple times during debounce, debounce period ands after last trigger()', done => { - // given - filter.criteria.name = 'Test Filter Value'; - - // when - filter.trigger({ target: { valid: true } }); - let triggerStartedAtMillis = null; - setTimeout(() => { - filter.trigger({ target: { valid: true } }); - triggerStartedAtMillis = Date.now(); - }, 50); - - // then - asynchronously = () => { - expect(triggerStartedAtMillis).not.toBeNull(); - expect(Date.now()).toBeGreaterThan(triggerStartedAtMillis); - done(); - }; - }); - - it('when filter "name" is set, buildQueryCriteria() returns a name.contains query', () => { - // given - filter.criteria.name = 'test value'; - - // when - const actual = filter.buildQueryCriteria(); - - // then - expect(filter.buildQueryCriteria()).toEqual({ 'name.contains': 'test value' }); - }); - - it('when filter "name" is set to "--", buildQueryCriteria() returns a name.specified=false query', () => { - // given - filter.criteria.name = '--'; - - // when - const actual = filter.buildQueryCriteria(); - - // then - expect(filter.buildQueryCriteria()).toEqual({ 'name.specified': false }); - }); - - it('when filter "name" is set to "++", buildQueryCriteria() returns a name.specified=true query', () => { - // given - filter.criteria.name = '++'; - - // when - const actual = filter.buildQueryCriteria(); - - // then - expect(filter.buildQueryCriteria()).toEqual({ 'name.specified': true }); - }); - - it('when filter "number" is set, buildQueryCriteria() returns a number.equals query', () => { - // given - filter.criteria.number = '-42'; - - // when - const actual = filter.buildQueryCriteria(); - - // then - expect(filter.buildQueryCriteria()).toEqual({ 'number.equals': '-42' }); - }); - - it('when filter "date" is set to "2019", buildQueryCriteria() returns a date range query', () => { - // given - filter.criteria.date = '2019'; - - // when - const actual = filter.buildQueryCriteria(); - - // then - expect(filter.buildQueryCriteria()).toEqual({ 'date.greaterOrEqualThan': '2019-01-01', 'date.lessOrEqualThan': '2019-12-31' }); - }); - - it('queryYearAsDateRange() returns null if year is not 4-digit', () => { - expect(queryYearAsDateRange('date', '201')).toBeNull(); - expect(queryYearAsDateRange('date', '20191')).toBeNull(); - }); - - it('reset() clears criteria and calls reload-handler, considering debounce period', done => { - // given - filter.criteria.name = 'Test Filter Value'; - - // when - filter.trigger({ target: { valid: true } }); - let triggerStartedAtMillis = null; - setTimeout(() => { - filter.reset(); - triggerStartedAtMillis = Date.now(); - }, TEST_DEBOUNCE_MILLIS / 2); - - // then - asynchronously = () => { - expect(triggerStartedAtMillis).not.toBeNull(); - expect(Date.now()).toBeGreaterThan(triggerStartedAtMillis); - done(); - }; - }); - }); -}); diff --git a/src/test/javascript/spec/helpers/mock-account.service.ts b/src/test/javascript/spec/helpers/mock-account.service.ts deleted file mode 100644 index 659bf4d3..00000000 --- a/src/test/javascript/spec/helpers/mock-account.service.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { SpyObject } from './spyobject'; -import { AccountService } from 'app/core/auth/account.service'; -import Spy = jasmine.Spy; - -export class MockAccountService extends SpyObject { - getSpy: Spy; - saveSpy: Spy; - fakeResponse: any; - identitySpy: Spy; - - constructor() { - super(AccountService); - - this.fakeResponse = null; - this.getSpy = this.spy('get').andReturn(this); - this.saveSpy = this.spy('save').andReturn(this); - this.setIdentitySpy({}); - } - - subscribe(callback: any) { - callback(this.fakeResponse); - } - - setResponse(json: any): void { - this.fakeResponse = json; - } - - setIdentitySpy(json: any): any { - this.identitySpy = this.spy('identity').andReturn(Promise.resolve(json)); - } - - setIdentityResponse(json: any): void { - this.setIdentitySpy(json); - } -} diff --git a/src/test/javascript/spec/helpers/mock-active-modal.service.ts b/src/test/javascript/spec/helpers/mock-active-modal.service.ts deleted file mode 100644 index 8bf0cc96..00000000 --- a/src/test/javascript/spec/helpers/mock-active-modal.service.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { SpyObject } from './spyobject'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import Spy = jasmine.Spy; - -export class MockActiveModal extends SpyObject { - dismissSpy: Spy; - - constructor() { - super(NgbActiveModal); - this.dismissSpy = this.spy('dismiss').andReturn(this); - } -} diff --git a/src/test/javascript/spec/helpers/mock-alert.service.ts b/src/test/javascript/spec/helpers/mock-alert.service.ts deleted file mode 100644 index 87f36c71..00000000 --- a/src/test/javascript/spec/helpers/mock-alert.service.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { SpyObject } from './spyobject'; -import { JhiAlertService, JhiAlert } from 'ng-jhipster'; - -export class MockAlertService extends SpyObject { - constructor() { - super(JhiAlertService); - } - addAlert(alertOptions: JhiAlert) { - return alertOptions; - } -} diff --git a/src/test/javascript/spec/helpers/mock-event-manager.service.ts b/src/test/javascript/spec/helpers/mock-event-manager.service.ts deleted file mode 100644 index a71b5d93..00000000 --- a/src/test/javascript/spec/helpers/mock-event-manager.service.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { SpyObject } from './spyobject'; -import { JhiEventManager } from 'ng-jhipster'; -import Spy = jasmine.Spy; - -export class MockEventManager extends SpyObject { - broadcastSpy: Spy; - - constructor() { - super(JhiEventManager); - this.broadcastSpy = this.spy('broadcast').andReturn(this); - } -} diff --git a/src/test/javascript/spec/helpers/mock-language.service.ts b/src/test/javascript/spec/helpers/mock-language.service.ts deleted file mode 100644 index e10db075..00000000 --- a/src/test/javascript/spec/helpers/mock-language.service.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { SpyObject } from './spyobject'; -import { JhiLanguageService } from 'ng-jhipster'; -import { JhiLanguageHelper } from 'app/core/language/language.helper'; -import Spy = jasmine.Spy; - -export class MockLanguageService extends SpyObject { - getCurrentSpy: Spy; - fakeResponse: any; - - constructor() { - super(JhiLanguageService); - - this.fakeResponse = 'de'; - this.getCurrentSpy = this.spy('getCurrent').andReturn(Promise.resolve(this.fakeResponse)); - } - - init() {} - - changeLanguage(languageKey: string) {} - - setLocations(locations: string[]) {} - - addLocation(location: string) {} - - reload() {} -} - -export class MockLanguageHelper extends SpyObject { - getAllSpy: Spy; - - constructor() { - super(JhiLanguageHelper); - - this.getAllSpy = this.spy('getAll').andReturn(Promise.resolve(['en', 'fr'])); - } -} diff --git a/src/test/javascript/spec/helpers/mock-login.service.ts b/src/test/javascript/spec/helpers/mock-login.service.ts deleted file mode 100644 index 93a8ca57..00000000 --- a/src/test/javascript/spec/helpers/mock-login.service.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { SpyObject } from './spyobject'; -import { LoginService } from 'app/core/login/login.service'; -import Spy = jasmine.Spy; - -export class MockLoginService extends SpyObject { - loginSpy: Spy; - logoutSpy: Spy; - registerSpy: Spy; - requestResetPasswordSpy: Spy; - cancelSpy: Spy; - - constructor() { - super(LoginService); - - this.setLoginSpy({}); - this.logoutSpy = this.spy('logout').andReturn(this); - this.registerSpy = this.spy('register').andReturn(this); - this.requestResetPasswordSpy = this.spy('requestResetPassword').andReturn(this); - this.cancelSpy = this.spy('cancel').andReturn(this); - } - - setLoginSpy(json: any) { - this.loginSpy = this.spy('login').andReturn(Promise.resolve(json)); - } - - setResponse(json: any): void { - this.setLoginSpy(json); - } -} diff --git a/src/test/javascript/spec/helpers/mock-route.service.ts b/src/test/javascript/spec/helpers/mock-route.service.ts deleted file mode 100644 index 3465e055..00000000 --- a/src/test/javascript/spec/helpers/mock-route.service.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { ActivatedRoute, Router } from '@angular/router'; -import { SpyObject } from './spyobject'; -import { Observable, of } from 'rxjs'; -import Spy = jasmine.Spy; - -export class MockActivatedRoute extends ActivatedRoute { - constructor(parameters?: any) { - super(); - this.queryParams = of(parameters); - this.params = of(parameters); - this.data = of({ - ...parameters, - pagingParams: { - page: 10, - ascending: false, - predicate: 'id' - } - }); - } -} - -export class MockRouter extends SpyObject { - navigateSpy: Spy; - - constructor() { - super(Router); - this.navigateSpy = this.spy('navigate'); - } -} diff --git a/src/test/javascript/spec/helpers/mock-state-storage.service.ts b/src/test/javascript/spec/helpers/mock-state-storage.service.ts deleted file mode 100644 index 1398c7b2..00000000 --- a/src/test/javascript/spec/helpers/mock-state-storage.service.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { SpyObject } from './spyobject'; -import { StateStorageService } from 'app/core/auth/state-storage.service'; -import Spy = jasmine.Spy; - -export class MockStateStorageService extends SpyObject { - getUrlSpy: Spy; - storeUrlSpy: Spy; - - constructor() { - super(StateStorageService); - this.setUrlSpy({}); - this.storeUrlSpy = this.spy('storeUrl').andReturn(this); - } - - setUrlSpy(json) { - this.getUrlSpy = this.spy('getUrl').andReturn(json); - } - - setResponse(json: any): void { - this.setUrlSpy(json); - } -} diff --git a/src/test/javascript/spec/helpers/spyobject.ts b/src/test/javascript/spec/helpers/spyobject.ts deleted file mode 100644 index 949e067e..00000000 --- a/src/test/javascript/spec/helpers/spyobject.ts +++ /dev/null @@ -1,69 +0,0 @@ -export interface GuinessCompatibleSpy extends jasmine.Spy { - /** By chaining the spy with and.returnValue, all calls to the function will return a specific - * value. */ - andReturn(val: any): void; - /** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied - * function. */ - andCallFake(fn: Function): GuinessCompatibleSpy; - /** removes all recorded calls */ - reset(); -} - -export class SpyObject { - static stub(object = null, config = null, overrides = null) { - if (!(object instanceof SpyObject)) { - overrides = config; - config = object; - object = new SpyObject(); - } - - const m = {}; - Object.keys(config).forEach(key => (m[key] = config[key])); - Object.keys(overrides).forEach(key => (m[key] = overrides[key])); - Object.keys(m).forEach(key => { - object.spy(key).andReturn(m[key]); - }); - return object; - } - - constructor(type = null) { - if (type) { - Object.keys(type.prototype).forEach(prop => { - let m = null; - try { - m = type.prototype[prop]; - } catch (e) { - // As we are creating spys for abstract classes, - // these classes might have getters that throw when they are accessed. - // As we are only auto creating spys for methods, this - // should not matter. - } - if (typeof m === 'function') { - this.spy(prop); - } - }); - } - } - - spy(name) { - if (!this[name]) { - this[name] = this._createGuinnessCompatibleSpy(name); - } - return this[name]; - } - - prop(name, value) { - this[name] = value; - } - - /** @internal */ - _createGuinnessCompatibleSpy(name): GuinessCompatibleSpy { - const newSpy: GuinessCompatibleSpy = jasmine.createSpy(name); - newSpy.andCallFake = newSpy.and.callFake; - newSpy.andReturn = newSpy.and.returnValue; - newSpy.reset = newSpy.calls.reset; - // revisit return null here (previously needed for rtts_assert). - newSpy.and.returnValue(null); - return newSpy; - } -} diff --git a/src/test/javascript/spec/test.module.ts b/src/test/javascript/spec/test.module.ts deleted file mode 100644 index 1eb01806..00000000 --- a/src/test/javascript/spec/test.module.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { DatePipe } from '@angular/common'; -import { ActivatedRoute, Router } from '@angular/router'; -import { NgModule, ElementRef, Renderer } from '@angular/core'; -import { HttpClientTestingModule } from '@angular/common/http/testing'; -import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { JhiLanguageService, JhiDataUtils, JhiDateUtils, JhiEventManager, JhiAlertService, JhiParseLinks } from 'ng-jhipster'; - -import { MockLanguageService, MockLanguageHelper } from './helpers/mock-language.service'; -import { JhiLanguageHelper, AccountService, LoginModalService } from 'app/core'; -import { MockAccountService } from './helpers/mock-account.service'; -import { MockActivatedRoute, MockRouter } from './helpers/mock-route.service'; -import { MockActiveModal } from './helpers/mock-active-modal.service'; -import { MockEventManager } from './helpers/mock-event-manager.service'; - -@NgModule({ - providers: [ - DatePipe, - JhiDataUtils, - JhiDateUtils, - JhiParseLinks, - { - provide: JhiLanguageService, - useClass: MockLanguageService - }, - { - provide: JhiLanguageHelper, - useClass: MockLanguageHelper - }, - { - provide: JhiEventManager, - useClass: MockEventManager - }, - { - provide: NgbActiveModal, - useClass: MockActiveModal - }, - { - provide: ActivatedRoute, - useValue: new MockActivatedRoute({ id: 123 }) - }, - { - provide: Router, - useClass: MockRouter - }, - { - provide: AccountService, - useClass: MockAccountService - }, - { - provide: LoginModalService, - useValue: null - }, - { - provide: ElementRef, - useValue: null - }, - { - provide: Renderer, - useValue: null - }, - { - provide: JhiAlertService, - useValue: null - }, - { - provide: NgbModal, - useValue: null - } - ], - imports: [HttpClientTestingModule] -}) -export class HsadminNgTestModule {} diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml new file mode 100644 index 00000000..694e2d74 --- /dev/null +++ b/src/test/resources/application.yml @@ -0,0 +1,31 @@ +spring: + sql: + init: + platform: postgres + + datasource: + url: jdbc:tc:postgresql:13.7-bullseye:///spring_boot_testcontainers + url-local: jdbc:postgresql://localhost:5432/postgres + username: postgres + password: password + + jpa: + properties: + hibernate: + default_schema: public + dialect: net.hostsharing.hsadminng.config.PostgreSQL95CustomDialect + hibernate: + ddl-auto: none + show-sql: true + + test: + database: + replace: none + + liquibase: + change-log: classpath:/db/changelog/db.changelog-master.yaml + contexts: tc,test,dev + +logging: + level: + liquibase: INFO diff --git a/src/test/resources/config/application.yml b/src/test/resources/config/application.yml deleted file mode 100644 index 47b64299..00000000 --- a/src/test/resources/config/application.yml +++ /dev/null @@ -1,107 +0,0 @@ -# =================================================================== -# Spring Boot configuration. -# -# This configuration is used for unit/integration tests. -# -# More information on profiles: https://www.jhipster.tech/profiles/ -# More information on configuration properties: https://www.jhipster.tech/common-application-properties/ -# =================================================================== - -# =================================================================== -# Standard Spring Boot properties. -# Full reference is available at: -# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html -# =================================================================== - - -spring: - application: - name: hsadminNg - cache: - type: simple - datasource: - type: com.zaxxer.hikari.HikariDataSource - url: jdbc:h2:mem:hsadminNg;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE - name: - username: - password: - hikari: - auto-commit: false - jpa: - database-platform: io.github.jhipster.domain.util.FixedH2Dialect - database: H2 - open-in-view: false - show-sql: false - hibernate: - ddl-auto: none - naming: - physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy - implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy - properties: - hibernate.id.new_generator_mappings: true - hibernate.connection.provider_disables_autocommit: true - hibernate.cache.use_second_level_cache: false - hibernate.cache.use_query_cache: false - hibernate.generate_statistics: false - hibernate.hbm2ddl.auto: validate - hibernate.jdbc.time_zone: UTC - liquibase: - contexts: test - mail: - host: localhost - messages: - basename: i18n/messages - mvc: - favicon: - enabled: false - thymeleaf: - mode: HTML - - -server: - port: 10344 - address: localhost - -# =================================================================== -# JHipster specific properties -# -# Full reference is available at: https://www.jhipster.tech/common-application-properties/ -# =================================================================== - -jhipster: - async: - core-pool-size: 1 - max-pool-size: 50 - queue-capacity: 10000 - # To test logstash appender - logging: - logstash: - enabled: true - host: localhost - port: 5000 - queue-size: 512 - mail: - from: test@localhost - base-url: http://127.0.0.1:8080 - security: - authentication: - jwt: - # This token must be encoded using Base64 (you can type `echo 'secret-key'|base64` on your command line) - base64-secret: ZDFlMDUzODIzMTUzZDEwZjExN2E5ZjAzY2VhZmYzNDE1YjhlYWUxZGRhMGU3ODZiNjRkNjVlNzEwZjExYWY4YzczM2NlYzI5YWE1OTRkNWM0YThlYjZjZjA5Zjc5YWJkOTgzYjdhZjQxZWQyZGUyYjFlYjI5ZDE3NmE4M2UzYjQ= - # Token is valid 24 hours - token-validity-in-seconds: 86400 - metrics: - logs: # Reports metrics in the logs - enabled: true - report-frequency: 60 # in seconds - -# =================================================================== -# Application specific properties -# Add your own application properties here, see the ApplicationProperties class -# to have type-safe configuration, like in the JHipsterProperties above -# -# More documentation is available at: -# https://www.jhipster.tech/common-application-properties/ -# =================================================================== - -# application: diff --git a/src/test/resources/i18n/messages_en.properties b/src/test/resources/i18n/messages_en.properties deleted file mode 100644 index f19db869..00000000 --- a/src/test/resources/i18n/messages_en.properties +++ /dev/null @@ -1 +0,0 @@ -email.test.title=test title diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml deleted file mode 100644 index ed3ff9d7..00000000 --- a/src/test/resources/logback.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/test/resources/templates/mail/testEmail.html b/src/test/resources/templates/mail/testEmail.html deleted file mode 100644 index a4ca16a7..00000000 --- a/src/test/resources/templates/mail/testEmail.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tsconfig-aot.json b/tsconfig-aot.json deleted file mode 100644 index be204eb4..00000000 --- a/tsconfig-aot.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "es2015", - "moduleResolution": "node", - "sourceMap": false, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "removeComments": false, - "noImplicitAny": false, - "suppressImplicitAnyIndexErrors": true, - "skipLibCheck": true, - "outDir": "build/www/app", - "lib": ["es7", "dom"], - "typeRoots": ["node_modules/@types"], - "baseUrl": "./", - "paths": { - "app/*": ["src/main/webapp/app/*"] - }, - "importHelpers": true - }, - "angularCompilerOptions": { - "genDir": "build/aot", - "skipMetadataEmit": true, - "fullTemplateTypeCheck": true, - "preserveWhitespaces": true - } -} diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 7bc3ab32..00000000 --- a/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "removeComments": false, - "noImplicitAny": false, - "skipLibCheck": true, - "suppressImplicitAnyIndexErrors": true, - "outDir": "build/www/app", - "lib": ["es7", "dom"], - "typeRoots": ["node_modules/@types"], - "baseUrl": "./", - "paths": { - "app/*": ["src/main/webapp/app/*"] - }, - "importHelpers": true, - "allowJs": true - }, - "include": ["src/main/webapp/app", "src/test/javascript/"], - "exclude": ["node_modules"] -} diff --git a/tslint.json b/tslint.json deleted file mode 100644 index 85362d0f..00000000 --- a/tslint.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "rulesDirectory": ["node_modules/codelyzer"], - "extends": ["tslint-config-prettier"], - "rules": { - "class-name": true, - "comment-format": [true, "check-space"], - "curly": true, - "eofline": true, - "forin": true, - "indent": [true, "spaces"], - "label-position": true, - "member-access": false, - "member-ordering": [true, "static-before-instance", "variables-before-functions"], - "no-arg": true, - "no-bitwise": true, - "no-console": [true, "debug", "info", "time", "timeEnd", "trace"], - "no-construct": true, - "no-debugger": true, - "no-duplicate-variable": true, - "no-empty": false, - "no-eval": true, - "no-inferrable-types": [true, "ignore-params", "ignore-properties"], - "no-shadowed-variable": true, - "no-string-literal": false, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unused-expression": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [true, "check-open-brace", "check-catch", "check-else", "check-whitespace"], - "quotemark": [true, "single", "avoid-escape"], - "radix": true, - "semicolon": [true, "always", "ignore-bound-class-methods"], - "triple-equals": [true, "allow-null-check"], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "variable-name": false, - "whitespace": [true, "check-branch", "check-decl", "check-operator", "check-separator", "check-type"], - "prefer-const": true, - "arrow-parens": [true, "ban-single-arg-parens"], - "arrow-return-shorthand": [true], - "import-spacing": true, - "no-consecutive-blank-lines": [true], - "object-literal-shorthand": true, - "space-before-function-paren": [ - true, - { - "asyncArrow": "always", - "anonymous": "never", - "constructor": "never", - "method": "never", - "named": "never" - } - ], - - "directive-selector": [true, "attribute", "jhi", "camelCase"], - "component-selector": [true, "element", "jhi", "kebab-case"], - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, - "no-input-rename": true, - "no-output-rename": true, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": false, - "component-class-suffix": true, - "directive-class-suffix": true - } -} diff --git a/vue/.gitignore b/vue/.gitignore deleted file mode 100644 index 185e6631..00000000 --- a/vue/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -.DS_Store -node_modules -/dist - -# local env files -.env.local -.env.*.local - -# Log files -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw* diff --git a/vue/README.md b/vue/README.md deleted file mode 100644 index c3767b9f..00000000 --- a/vue/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# hsadmin-vue - -## Project setup -``` -npm install -``` - -### Compiles and hot-reloads for development -``` -npm run serve -``` - -Change the port Vue binds to via the `--port` parameter. -Use the `VUE_APP_API_PORT` environment variable to point Vue to the JHipster API port. -For example, to specify both settings: - -``` -VUE_APP_API_PORT=45678 npm run serve -- --port=2345 -``` - -### Compiles and minifies for production -``` -npm run build -``` - -### Run your tests -``` -npm run test -``` - -### Lints and fixes files -``` -npm run lint -``` - -### Customize configuration -See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/vue/babel.config.js b/vue/babel.config.js deleted file mode 100644 index fd1df2a3..00000000 --- a/vue/babel.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - presets: [ - '@vue/app' - ] -}; diff --git a/vue/package-lock.json b/vue/package-lock.json deleted file mode 100644 index 52804c1e..00000000 --- a/vue/package-lock.json +++ /dev/null @@ -1,11184 +0,0 @@ -{ - "name": "hsadmin-vue", - "version": "0.1.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/core": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.3.tgz", - "integrity": "sha512-oDpASqKFlbspQfzAE7yaeTmdljSH2ADIvBlb0RwbStltTuWa0+7CCI1fYVINNv9saHPa1W7oaKeuNuKj+RQCvA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", - "@babel/helpers": "^7.4.3", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "convert-source-map": "^1.1.0", - "debug": "^4.1.0", - "json5": "^2.1.0", - "lodash": "^4.17.11", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - } - }, - "@babel/generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.0.tgz", - "integrity": "sha512-/v5I+a1jhGSKLgZDcmAUZ4K/VePi43eRkUs3yePW1HB1iANOD5tqJXwGSG4BZhSksP8J9ejSlwGeTiiOFZOrXQ==", - "dev": true, - "requires": { - "@babel/types": "^7.4.0", - "jsesc": "^2.5.1", - "lodash": "^4.17.11", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - } - }, - "@babel/helper-annotate-as-pure": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", - "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz", - "integrity": "sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w==", - "dev": true, - "requires": { - "@babel/helper-explode-assignable-expression": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-call-delegate": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.4.0.tgz", - "integrity": "sha512-SdqDfbVdNQCBp3WhK2mNdDvHd3BD6qbmIc43CAyjnsfCmgHMeqgDcM3BzY2lchi7HBJGJ2CVdynLWbezaE4mmQ==", - "dev": true, - "requires": { - "@babel/helper-hoist-variables": "^7.4.0", - "@babel/traverse": "^7.4.0", - "@babel/types": "^7.4.0" - } - }, - "@babel/helper-create-class-features-plugin": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.3.tgz", - "integrity": "sha512-UMl3TSpX11PuODYdWGrUeW6zFkdYhDn7wRLrOuNVM6f9L+S9CzmDXYyrp3MTHcwWjnzur1f/Op8A7iYZWya2Yg==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-member-expression-to-functions": "^7.0.0", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.4.0", - "@babel/helper-split-export-declaration": "^7.4.0" - } - }, - "@babel/helper-define-map": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.4.0.tgz", - "integrity": "sha512-wAhQ9HdnLIywERVcSvX40CEJwKdAa1ID4neI9NXQPDOHwwA+57DqwLiPEVy2AIyWzAk0CQ8qx4awO0VUURwLtA==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/types": "^7.4.0", - "lodash": "^4.17.11" - } - }, - "@babel/helper-explode-assignable-expression": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz", - "integrity": "sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA==", - "dev": true, - "requires": { - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-function-name": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.0.tgz", - "integrity": "sha512-/NErCuoe/et17IlAQFKWM24qtyYYie7sFIrW/tIQXpck6vAu2hhtYYsKLBWQV+BQZMbcIYPU/QMYuTufrY4aQw==", - "dev": true, - "requires": { - "@babel/types": "^7.4.0" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz", - "integrity": "sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-module-imports": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", - "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-module-transforms": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.4.3.tgz", - "integrity": "sha512-H88T9IySZW25anu5uqyaC1DaQre7ofM+joZtAaO2F8NBdFfupH0SZ4gKjgSFVcvtx/aAirqA9L9Clio2heYbZA==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/template": "^7.2.2", - "@babel/types": "^7.2.2", - "lodash": "^4.17.11" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz", - "integrity": "sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", - "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", - "dev": true - }, - "@babel/helper-regex": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.4.3.tgz", - "integrity": "sha512-hnoq5u96pLCfgjXuj8ZLX3QQ+6nAulS+zSgi6HulUwFbEruRAKwbGLU5OvXkE14L8XW6XsQEKsIDfgthKLRAyA==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, - "@babel/helper-remap-async-to-generator": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz", - "integrity": "sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-wrap-function": "^7.1.0", - "@babel/template": "^7.1.0", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-replace-supers": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.4.0.tgz", - "integrity": "sha512-PVwCVnWWAgnal+kJ+ZSAphzyl58XrFeSKSAJRiqg5QToTsjL+Xu1f9+RJ+d+Q0aPhPfBGaYfkox66k86thxNSg==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.0.0", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.4.0", - "@babel/types": "^7.4.0" - } - }, - "@babel/helper-simple-access": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz", - "integrity": "sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w==", - "dev": true, - "requires": { - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.0.tgz", - "integrity": "sha512-7Cuc6JZiYShaZnybDmfwhY4UYHzI6rlqhWjaIqbsJGsIqPimEYy5uh3akSRLMg65LSdSEnJ8a8/bWQN6u2oMGw==", - "dev": true, - "requires": { - "@babel/types": "^7.4.0" - } - }, - "@babel/helper-wrap-function": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz", - "integrity": "sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/template": "^7.1.0", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.2.0" - } - }, - "@babel/helpers": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.3.tgz", - "integrity": "sha512-BMh7X0oZqb36CfyhvtbSmcWc3GXocfxv3yNsAEuM0l+fAqSO22rQrUpijr3oE/10jCTrB6/0b9kzmG4VetCj8Q==", - "dev": true, - "requires": { - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.3.tgz", - "integrity": "sha512-gxpEUhTS1sGA63EGQGuA+WESPR/6tz6ng7tSHFCmaTJK/cGK8y37cBTspX+U2xCAue2IQVvF6Z0oigmjwD8YGQ==", - "dev": true - }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz", - "integrity": "sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.1.0", - "@babel/plugin-syntax-async-generators": "^7.2.0" - } - }, - "@babel/plugin-proposal-class-properties": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.4.0.tgz", - "integrity": "sha512-t2ECPNOXsIeK1JxJNKmgbzQtoG27KIlVE61vTqX0DKR9E9sZlVVxWUtEW9D5FlZ8b8j7SBNCHY47GgPKCKlpPg==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.4.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-proposal-decorators": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.4.0.tgz", - "integrity": "sha512-d08TLmXeK/XbgCo7ZeZ+JaeZDtDai/2ctapTRsWWkkmy7G/cqz8DQN/HlWG7RR4YmfXxmExsbU3SuCjlM7AtUg==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.4.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-decorators": "^7.2.0" - } - }, - "@babel/plugin-proposal-json-strings": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz", - "integrity": "sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-json-strings": "^7.2.0" - } - }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.3.tgz", - "integrity": "sha512-xC//6DNSSHVjq8O2ge0dyYlhshsH4T7XdCVoxbi5HzLYWfsC5ooFlJjrXk8RcAT+hjHAK9UjBXdylzSoDK3t4g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0" - } - }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz", - "integrity": "sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.2.0" - } - }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.0.tgz", - "integrity": "sha512-h/KjEZ3nK9wv1P1FSNb9G079jXrNYR0Ko+7XkOx85+gM24iZbPn0rh4vCftk+5QKY7y1uByFataBTmX7irEF1w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0", - "regexpu-core": "^4.5.4" - } - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz", - "integrity": "sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-decorators": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.2.0.tgz", - "integrity": "sha512-38QdqVoXdHUQfTpZo3rQwqQdWtCn5tMv4uV6r2RMfTqNBuv4ZBhz79SfaQWKTVmxHjeFv/DnXVC/+agHCklYWA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-dynamic-import": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz", - "integrity": "sha512-mVxuJ0YroI/h/tbFTPGZR8cv6ai+STMKNBq0f8hFxsxWjl94qqhsb+wXbpNMDPU3cfR1TIsVFzU3nXyZMqyK4w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz", - "integrity": "sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-jsx": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.2.0.tgz", - "integrity": "sha512-VyN4QANJkRW6lDBmENzRszvZf3/4AXaj9YR7GwrWeeN9tEBPuXbmDYVU9bYBN0D70zCWVwUy0HWq2553VCb6Hw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", - "integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz", - "integrity": "sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz", - "integrity": "sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.0.tgz", - "integrity": "sha512-EeaFdCeUULM+GPFEsf7pFcNSxM7hYjoj5fiYbyuiXobW4JhFnjAv9OWzNwHyHcKoPNpAfeRDuW6VyaXEDUBa7g==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.1.0" - } - }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz", - "integrity": "sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-block-scoping": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.0.tgz", - "integrity": "sha512-AWyt3k+fBXQqt2qb9r97tn3iBwFpiv9xdAiG+Gr2HpAZpuayvbL55yWrsV3MyHvXk/4vmSiedhDRl1YI2Iy5nQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "lodash": "^4.17.11" - } - }, - "@babel/plugin-transform-classes": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.3.tgz", - "integrity": "sha512-PUaIKyFUDtG6jF5DUJOfkBdwAS/kFFV3XFk7Nn0a6vR7ZT8jYw5cGtIlat77wcnd0C6ViGqo/wyNf4ZHytF/nQ==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-define-map": "^7.4.0", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.4.0", - "@babel/helper-split-export-declaration": "^7.4.0", - "globals": "^11.1.0" - } - }, - "@babel/plugin-transform-computed-properties": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz", - "integrity": "sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-destructuring": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.3.tgz", - "integrity": "sha512-rVTLLZpydDFDyN4qnXdzwoVpk1oaXHIvPEOkOLyr88o7oHxVc/LyrnDx+amuBWGOwUb7D1s/uLsKBNTx08htZg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.3.tgz", - "integrity": "sha512-9Arc2I0AGynzXRR/oPdSALv3k0rM38IMFyto7kOCwb5F9sLUt2Ykdo3V9yUPR+Bgr4kb6bVEyLkPEiBhzcTeoA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.3", - "regexpu-core": "^4.5.4" - } - }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz", - "integrity": "sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz", - "integrity": "sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==", - "dev": true, - "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-for-of": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.3.tgz", - "integrity": "sha512-UselcZPwVWNSURnqcfpnxtMehrb8wjXYOimlYQPBnup/Zld426YzIhNEvuRsEWVHfESIECGrxoI6L5QqzuLH5Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-function-name": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.3.tgz", - "integrity": "sha512-uT5J/3qI/8vACBR9I1GlAuU/JqBtWdfCrynuOkrWG6nCDieZd5przB1vfP59FRHBZQ9DC2IUfqr/xKqzOD5x0A==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz", - "integrity": "sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-modules-amd": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz", - "integrity": "sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.3.tgz", - "integrity": "sha512-sMP4JqOTbMJMimqsSZwYWsMjppD+KRyDIUVW91pd7td0dZKAvPmhCaxhOzkzLParKwgQc7bdL9UNv+rpJB0HfA==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.4.3", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-simple-access": "^7.1.0" - } - }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.0.tgz", - "integrity": "sha512-gjPdHmqiNhVoBqus5qK60mWPp1CmYWp/tkh11mvb0rrys01HycEGD7NvvSoKXlWEfSM9TcL36CpsK8ElsADptQ==", - "dev": true, - "requires": { - "@babel/helper-hoist-variables": "^7.4.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-modules-umd": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz", - "integrity": "sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.1.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.2.tgz", - "integrity": "sha512-NsAuliSwkL3WO2dzWTOL1oZJHm0TM8ZY8ZSxk2ANyKkt5SQlToGA4pzctmq1BEjoacurdwZ3xp2dCQWJkME0gQ==", - "dev": true, - "requires": { - "regexp-tree": "^0.1.0" - } - }, - "@babel/plugin-transform-new-target": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.0.tgz", - "integrity": "sha512-6ZKNgMQmQmrEX/ncuCwnnw1yVGoaOW5KpxNhoWI7pCQdA0uZ0HqHGqenCUIENAnxRjy2WwNQ30gfGdIgqJXXqw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-object-super": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz", - "integrity": "sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.1.0" - } - }, - "@babel/plugin-transform-parameters": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.3.tgz", - "integrity": "sha512-ULJYC2Vnw96/zdotCZkMGr2QVfKpIT/4/K+xWWY0MbOJyMZuk660BGkr3bEKWQrrciwz6xpmft39nA4BF7hJuA==", - "dev": true, - "requires": { - "@babel/helper-call-delegate": "^7.4.0", - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-regenerator": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.3.tgz", - "integrity": "sha512-kEzotPuOpv6/iSlHroCDydPkKYw7tiJGKlmYp6iJn4a6C/+b2FdttlJsLKYxolYHgotTJ5G5UY5h0qey5ka3+A==", - "dev": true, - "requires": { - "regenerator-transform": "^0.13.4" - } - }, - "@babel/plugin-transform-runtime": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.4.3.tgz", - "integrity": "sha512-7Q61bU+uEI7bCUFReT1NKn7/X6sDQsZ7wL1sJ9IYMAO7cI+eg6x9re1cEw2fCRMbbTVyoeUKWSV1M6azEfKCfg==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "resolve": "^1.8.1", - "semver": "^5.5.1" - } - }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz", - "integrity": "sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-spread": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz", - "integrity": "sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz", - "integrity": "sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0" - } - }, - "@babel/plugin-transform-template-literals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz", - "integrity": "sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz", - "integrity": "sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0" - } - }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.3.tgz", - "integrity": "sha512-lnSNgkVjL8EMtnE8eSS7t2ku8qvKH3eqNf/IwIfnSPUqzgqYmRwzdsQWv4mNQAN9Nuo6Gz1Y0a4CSmdpu1Pp6g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.4.3", - "regexpu-core": "^4.5.4" - } - }, - "@babel/preset-env": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.3.4.tgz", - "integrity": "sha512-2mwqfYMK8weA0g0uBKOt4FE3iEodiHy9/CW0b+nWXcbL+pGzLx8ESYc+j9IIxr6LTDHWKgPm71i9smo02bw+gA==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-async-generator-functions": "^7.2.0", - "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.3.4", - "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", - "@babel/plugin-syntax-async-generators": "^7.2.0", - "@babel/plugin-syntax-json-strings": "^7.2.0", - "@babel/plugin-syntax-object-rest-spread": "^7.2.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", - "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.3.4", - "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.3.4", - "@babel/plugin-transform-classes": "^7.3.4", - "@babel/plugin-transform-computed-properties": "^7.2.0", - "@babel/plugin-transform-destructuring": "^7.2.0", - "@babel/plugin-transform-dotall-regex": "^7.2.0", - "@babel/plugin-transform-duplicate-keys": "^7.2.0", - "@babel/plugin-transform-exponentiation-operator": "^7.2.0", - "@babel/plugin-transform-for-of": "^7.2.0", - "@babel/plugin-transform-function-name": "^7.2.0", - "@babel/plugin-transform-literals": "^7.2.0", - "@babel/plugin-transform-modules-amd": "^7.2.0", - "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "@babel/plugin-transform-modules-systemjs": "^7.3.4", - "@babel/plugin-transform-modules-umd": "^7.2.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0", - "@babel/plugin-transform-new-target": "^7.0.0", - "@babel/plugin-transform-object-super": "^7.2.0", - "@babel/plugin-transform-parameters": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.3.4", - "@babel/plugin-transform-shorthand-properties": "^7.2.0", - "@babel/plugin-transform-spread": "^7.2.0", - "@babel/plugin-transform-sticky-regex": "^7.2.0", - "@babel/plugin-transform-template-literals": "^7.2.0", - "@babel/plugin-transform-typeof-symbol": "^7.2.0", - "@babel/plugin-transform-unicode-regex": "^7.2.0", - "browserslist": "^4.3.4", - "invariant": "^2.2.2", - "js-levenshtein": "^1.1.3", - "semver": "^5.3.0" - } - }, - "@babel/runtime": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.3.tgz", - "integrity": "sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.2" - } - }, - "@babel/runtime-corejs2": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.4.3.tgz", - "integrity": "sha512-anTLTF7IK8Hd5f73zpPzt875I27UaaTWARJlfMGgnmQhvEe1uNHQRKBUbXL0Gc0VEYiVzsHsTPso5XdK8NGvFg==", - "dev": true, - "requires": { - "core-js": "^2.6.5", - "regenerator-runtime": "^0.13.2" - } - }, - "@babel/template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.0.tgz", - "integrity": "sha512-SOWwxxClTTh5NdbbYZ0BmaBVzxzTh2tO/TeLTbF6MO6EzVhHTnff8CdBXx3mEtazFBoysmEM6GU/wF+SuSx4Fw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.0", - "@babel/types": "^7.4.0" - } - }, - "@babel/traverse": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.3.tgz", - "integrity": "sha512-HmA01qrtaCwwJWpSKpA948cBvU5BrmviAief/b3AVw936DtcdsTexlbyzNuDnthwhOQ37xshn7hvQaEQk7ISYQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.4.0", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/types": "^7.4.0", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.11" - } - }, - "@babel/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.0.tgz", - "integrity": "sha512-aPvkXyU2SPOnztlgo8n9cEiXW755mgyvueUPcpStqdzoSPm0fjO0vQBjLkt3JKJW7ufikfcnMTTPsN1xaTsBPA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.11", - "to-fast-properties": "^2.0.0" - } - }, - "@intervolga/optimize-cssnano-plugin": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@intervolga/optimize-cssnano-plugin/-/optimize-cssnano-plugin-1.0.6.tgz", - "integrity": "sha512-zN69TnSr0viRSU6cEDIcuPcP67QcpQ6uHACg58FiN9PDrU6SLyGW3MR4tiISbYxy1kDWAVPwD+XwQTWE5cigAA==", - "dev": true, - "requires": { - "cssnano": "^4.0.0", - "cssnano-preset-default": "^4.0.0", - "postcss": "^7.0.0" - } - }, - "@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", - "dev": true, - "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" - } - }, - "@nodelib/fs.stat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", - "dev": true - }, - "@soda/friendly-errors-webpack-plugin": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.7.1.tgz", - "integrity": "sha512-cWKrGaFX+rfbMrAxVv56DzhPNqOJPZuNIS2HGMELtgGzb+vsMzyig9mml5gZ/hr2BGtSLV+dP2LUEuAL8aG2mQ==", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "error-stack-parser": "^2.0.0", - "string-width": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "@types/events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", - "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", - "dev": true - }, - "@types/glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", - "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", - "dev": true, - "requires": { - "@types/events": "*", - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true - }, - "@types/node": { - "version": "11.13.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.0.tgz", - "integrity": "sha512-rx29MMkRdVmzunmiA4lzBYJNnXsW/PhG4kMBy2ATsYaDjGGR75dCFEVVROKpNwlVdcUX3xxlghKQOeDPBJobng==", - "dev": true - }, - "@types/q": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", - "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==", - "dev": true - }, - "@vue/babel-helper-vue-jsx-merge-props": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.0.0-beta.3.tgz", - "integrity": "sha512-cbFQnd3dDPsfWuxbWW2phynX2zsckwC4GfAkcE1QH1lZL2ZAD2V97xY3BmvTowMkjeFObRKQt1P3KKA6AoB0hQ==", - "dev": true - }, - "@vue/babel-plugin-transform-vue-jsx": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@vue/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-1.0.0-beta.3.tgz", - "integrity": "sha512-yn+j2B/2aEagaxXrMSK3qcAJnlidfXg9v+qmytqrjUXc4zfi8QVC/b4zCev1FDmTip06/cs/csENA4law6Xhpg==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0-beta.3", - "html-tags": "^2.0.0", - "lodash.kebabcase": "^4.1.1", - "svg-tags": "^1.0.0" - } - }, - "@vue/babel-preset-app": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/@vue/babel-preset-app/-/babel-preset-app-3.5.5.tgz", - "integrity": "sha512-kK2DkQ+uGOjDnVjgn8A3Rczic55rI42nMESmwWfrfjssPeFQLGqiJixk9eQccHNBjyHcl3D+UOWx+EHQbpPByg==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-decorators": "^7.1.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.4.0", - "@babel/preset-env": "^7.0.0 < 7.4.0", - "@babel/runtime": "^7.0.0", - "@babel/runtime-corejs2": "^7.2.0", - "@vue/babel-preset-jsx": "^1.0.0-beta.2", - "babel-plugin-dynamic-import-node": "^2.2.0", - "core-js": "^2.6.5" - } - }, - "@vue/babel-preset-jsx": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@vue/babel-preset-jsx/-/babel-preset-jsx-1.0.0-beta.3.tgz", - "integrity": "sha512-qMKGRorTI/0nE83nLEM7MyQiBZUqc62sZyjkBdVaaU7S61MHI8RKHPtbLMMZlWXb2NCJ0fQci8xJWUK5JE+TFA==", - "dev": true, - "requires": { - "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0-beta.3", - "@vue/babel-plugin-transform-vue-jsx": "^1.0.0-beta.3", - "@vue/babel-sugar-functional-vue": "^1.0.0-beta.3", - "@vue/babel-sugar-inject-h": "^1.0.0-beta.3", - "@vue/babel-sugar-v-model": "^1.0.0-beta.3", - "@vue/babel-sugar-v-on": "^1.0.0-beta.3" - } - }, - "@vue/babel-sugar-functional-vue": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-functional-vue/-/babel-sugar-functional-vue-1.0.0-beta.3.tgz", - "integrity": "sha512-CBIa0sQWn3vfBS2asfTgv0WwdyKvNTKtE/cCfulZ7MiewLBh0RlvvSmdK9BIMTiHErdeZNSGUGlU6JuSHLyYkQ==", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@vue/babel-sugar-inject-h": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-inject-h/-/babel-sugar-inject-h-1.0.0-beta.3.tgz", - "integrity": "sha512-HKMBMmFfdK9GBp3rX2bHIwILBdgc5F3ahmCB72keJxzaAQrgDAnD+ho70exUge+inAGlNF34WsQcGPElTf9QZg==", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0" - } - }, - "@vue/babel-sugar-v-model": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-model/-/babel-sugar-v-model-1.0.0-beta.3.tgz", - "integrity": "sha512-et39eTEh7zW4wfZoSl9Jf0/n2r9OTT8U02LtSbXsjgYcqaDQFusN0+n7tw4bnOqvnnSVjEp7bVsQCWwykC3Wgg==", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0-beta.3", - "@vue/babel-plugin-transform-vue-jsx": "^1.0.0-beta.3", - "camelcase": "^5.0.0", - "html-tags": "^2.0.0", - "svg-tags": "^1.0.0" - } - }, - "@vue/babel-sugar-v-on": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@vue/babel-sugar-v-on/-/babel-sugar-v-on-1.0.0-beta.3.tgz", - "integrity": "sha512-F+GapxCiy50jf2Q2B4exw+KYBzlGdeKMAMW1Dbvb0Oa59SA0CH6tsUOIAsXb0A05jwwg/of0LaVeo+4aLefVxQ==", - "dev": true, - "requires": { - "@babel/plugin-syntax-jsx": "^7.2.0", - "@vue/babel-plugin-transform-vue-jsx": "^1.0.0-beta.3", - "camelcase": "^5.0.0" - } - }, - "@vue/cli-overlay": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-3.5.1.tgz", - "integrity": "sha512-DqzfkbKJfuzcNbJouA7ZaLX77xn7FCcVUJaPYVH8qm3pNhIz2tmbfN6WVBLU8XC5FNFFWzLjHmg9rpaEBq7RCA==", - "dev": true - }, - "@vue/cli-plugin-babel": { - "version": "3.5.5", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-babel/-/cli-plugin-babel-3.5.5.tgz", - "integrity": "sha512-ew+EWL2ur234wqQfI1AvWcghjWQ2PlSVpUAfnDlejplDzXSHz7455IIwN7Auhs7siEbls3EVd/bl/ieKGjwY5g==", - "dev": true, - "requires": { - "@babel/core": "^7.0.0", - "@vue/babel-preset-app": "^3.5.5", - "@vue/cli-shared-utils": "^3.5.1", - "babel-loader": "^8.0.5", - "webpack": ">=4 < 4.29" - } - }, - "@vue/cli-plugin-eslint": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-eslint/-/cli-plugin-eslint-3.5.1.tgz", - "integrity": "sha512-0RSF3LPOXUIgArrg06HK1Yg6wcR348wssVX3pG41zxDAGTmfe8TpL2XPiP/KinrYwQLSUBPbr8zdf9Hb1+Tv2w==", - "dev": true, - "requires": { - "@vue/cli-shared-utils": "^3.5.1", - "babel-eslint": "^10.0.1", - "eslint": "^4.19.1", - "eslint-loader": "^2.1.2", - "eslint-plugin-vue": "^4.7.1", - "globby": "^9.0.0", - "webpack": ">=4 < 4.29" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true, - "optional": true - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "optional": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "eslint": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", - "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", - "dev": true, - "optional": true, - "requires": { - "ajv": "^5.3.0", - "babel-code-frame": "^6.22.0", - "chalk": "^2.1.0", - "concat-stream": "^1.6.0", - "cross-spawn": "^5.1.0", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^3.7.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.4", - "esquery": "^1.0.0", - "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.0.1", - "ignore": "^3.3.3", - "imurmurhash": "^0.1.4", - "inquirer": "^3.0.6", - "is-resolvable": "^1.0.0", - "js-yaml": "^3.9.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.4", - "minimatch": "^3.0.2", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^1.0.1", - "require-uncached": "^1.0.3", - "semver": "^5.3.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "~2.0.1", - "table": "4.0.2", - "text-table": "~0.2.0" - } - }, - "eslint-plugin-vue": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-4.7.1.tgz", - "integrity": "sha512-esETKhVMI7Vdli70Wt4bvAwnZBJeM0pxVX9Yb0wWKxdCJc2EADalVYK/q2FzMw8oKN0wPMdqVCKS8kmR89recA==", - "dev": true, - "optional": true, - "requires": { - "vue-eslint-parser": "^2.0.3" - } - }, - "eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", - "dev": true, - "optional": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true, - "optional": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true, - "optional": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "optional": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true, - "optional": true - } - } - }, - "@vue/cli-service": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/@vue/cli-service/-/cli-service-3.5.3.tgz", - "integrity": "sha512-28MDRVZe+yebtiSJHfYS6fOvPN1P8DX4BIsDp4rLqZxc7l8yoG6pBWyv9ENT4WO9gAXRGzEsKcJ5qLtXLvQeYQ==", - "dev": true, - "requires": { - "@intervolga/optimize-cssnano-plugin": "^1.0.5", - "@soda/friendly-errors-webpack-plugin": "^1.7.1", - "@vue/cli-overlay": "^3.5.1", - "@vue/cli-shared-utils": "^3.5.1", - "@vue/component-compiler-utils": "^2.6.0", - "@vue/preload-webpack-plugin": "^1.1.0", - "@vue/web-component-wrapper": "^1.2.0", - "acorn": "^6.1.0", - "acorn-walk": "^6.1.1", - "address": "^1.0.3", - "autoprefixer": "^9.4.8", - "cache-loader": "^2.0.1", - "case-sensitive-paths-webpack-plugin": "^2.2.0", - "chalk": "^2.4.2", - "clipboardy": "^1.2.3", - "cliui": "^4.1.0", - "copy-webpack-plugin": "^4.6.0", - "css-loader": "^1.0.1", - "cssnano": "^4.1.10", - "debug": "^4.1.1", - "dotenv": "^6.2.0", - "dotenv-expand": "^4.2.0", - "escape-string-regexp": "^1.0.5", - "file-loader": "^3.0.1", - "fs-extra": "^7.0.1", - "globby": "^9.0.0", - "hash-sum": "^1.0.2", - "html-webpack-plugin": "^3.2.0", - "launch-editor-middleware": "^2.2.1", - "lodash.defaultsdeep": "^4.6.0", - "lodash.mapvalues": "^4.6.0", - "lodash.transform": "^4.6.0", - "mini-css-extract-plugin": "^0.5.0", - "minimist": "^1.2.0", - "ora": "^3.1.0", - "portfinder": "^1.0.20", - "postcss-loader": "^3.0.0", - "read-pkg": "^4.0.1", - "semver": "^5.6.0", - "slash": "^2.0.0", - "source-map-url": "^0.4.0", - "ssri": "^6.0.1", - "string.prototype.padend": "^3.0.0", - "terser-webpack-plugin": "^1.2.2", - "thread-loader": "^2.1.2", - "url-loader": "^1.1.2", - "vue-loader": "^15.6.4", - "webpack": ">=4 < 4.29", - "webpack-bundle-analyzer": "^3.0.4", - "webpack-chain": "^4.11.0", - "webpack-dev-server": "^3.2.0", - "webpack-merge": "^4.2.1", - "yorkie": "^2.0.0" - }, - "dependencies": { - "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", - "dev": true - } - } - }, - "@vue/cli-shared-utils": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-3.5.1.tgz", - "integrity": "sha512-hCB7UbKeeC41w2Q8+Q7jmw3gHdq+ltRqp80S3uDRRGxwiOhxrSmdBHMzKUjh01L8bXOBRgvLey+BERi1Nj9n6Q==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "execa": "^1.0.0", - "joi": "^14.3.0", - "launch-editor": "^2.2.1", - "lru-cache": "^5.1.1", - "node-ipc": "^9.1.1", - "opn": "^5.3.0", - "ora": "^3.1.0", - "request": "^2.87.0", - "request-promise-native": "^1.0.7", - "semver": "^5.5.0", - "string.prototype.padstart": "^3.0.0" - } - }, - "@vue/component-compiler-utils": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-2.6.0.tgz", - "integrity": "sha512-IHjxt7LsOFYc0DkTncB7OXJL7UzwOLPPQCfEUNyxL2qt+tF12THV+EO33O1G2Uk4feMSWua3iD39Itszx0f0bw==", - "dev": true, - "requires": { - "consolidate": "^0.15.1", - "hash-sum": "^1.0.2", - "lru-cache": "^4.1.2", - "merge-source-map": "^1.1.0", - "postcss": "^7.0.14", - "postcss-selector-parser": "^5.0.0", - "prettier": "1.16.3", - "source-map": "~0.6.1", - "vue-template-es2015-compiler": "^1.9.0" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "@vue/preload-webpack-plugin": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.0.tgz", - "integrity": "sha512-rcn2KhSHESBFMPj5vc5X2pI9bcBNQQixvJXhD5gZ4rN2iym/uH2qfDSQfUS5+qwiz0a85TCkeUs6w6jxFDudbw==", - "dev": true - }, - "@vue/web-component-wrapper": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@vue/web-component-wrapper/-/web-component-wrapper-1.2.0.tgz", - "integrity": "sha512-Xn/+vdm9CjuC9p3Ae+lTClNutrVhsXpzxvoTXXtoys6kVRX9FkueSUAqSWAyZntmVLlR4DosBV4pH8y5Z/HbUw==", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.11.tgz", - "integrity": "sha512-ZEzy4vjvTzScC+SH8RBssQUawpaInUdMTYwYYLh54/s8TuT0gBLuyUnppKsVyZEi876VmmStKsUs28UxPgdvrA==", - "dev": true, - "requires": { - "@webassemblyjs/helper-module-context": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/wast-parser": "1.7.11" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.11.tgz", - "integrity": "sha512-zY8dSNyYcgzNRNT666/zOoAyImshm3ycKdoLsyDw/Bwo6+/uktb7p4xyApuef1dwEBo/U/SYQzbGBvV+nru2Xg==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.11.tgz", - "integrity": "sha512-7r1qXLmiglC+wPNkGuXCvkmalyEstKVwcueZRP2GNC2PAvxbLYwLLPr14rcdJaE4UtHxQKfFkuDFuv91ipqvXg==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.11.tgz", - "integrity": "sha512-MynuervdylPPh3ix+mKZloTcL06P8tenNH3sx6s0qE8SLR6DdwnfgA7Hc9NSYeob2jrW5Vql6GVlsQzKQCa13w==", - "dev": true - }, - "@webassemblyjs/helper-code-frame": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.11.tgz", - "integrity": "sha512-T8ESC9KMXFTXA5urJcyor5cn6qWeZ4/zLPyWeEXZ03hj/x9weSokGNkVCdnhSabKGYWxElSdgJ+sFa9G/RdHNw==", - "dev": true, - "requires": { - "@webassemblyjs/wast-printer": "1.7.11" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.11.tgz", - "integrity": "sha512-nsAQWNP1+8Z6tkzdYlXT0kxfa2Z1tRTARd8wYnc/e3Zv3VydVVnaeePgqUzFrpkGUyhUUxOl5ML7f1NuT+gC0A==", - "dev": true - }, - "@webassemblyjs/helper-module-context": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.11.tgz", - "integrity": "sha512-JxfD5DX8Ygq4PvXDucq0M+sbUFA7BJAv/GGl9ITovqE+idGX+J3QSzJYz+LwQmL7fC3Rs+utvWoJxDb6pmC0qg==", - "dev": true - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.11.tgz", - "integrity": "sha512-cMXeVS9rhoXsI9LLL4tJxBgVD/KMOKXuFqYb5oCJ/opScWpkCMEz9EJtkonaNcnLv2R3K5jIeS4TRj/drde1JQ==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.11.tgz", - "integrity": "sha512-8ZRY5iZbZdtNFE5UFunB8mmBEAbSI3guwbrsCl4fWdfRiAcvqQpeqd5KHhSWLL5wuxo53zcaGZDBU64qgn4I4Q==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.7.11.tgz", - "integrity": "sha512-Mmqx/cS68K1tSrvRLtaV/Lp3NZWzXtOHUW2IvDvl2sihAwJh4ACE0eL6A8FvMyDG9abes3saB6dMimLOs+HMoQ==", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.7.11.tgz", - "integrity": "sha512-vuGmgZjjp3zjcerQg+JA+tGOncOnJLWVkt8Aze5eWQLwTQGNgVLcyOTqgSCxWTR4J42ijHbBxnuRaL1Rv7XMdw==", - "dev": true, - "requires": { - "@xtuc/long": "4.2.1" - } - }, - "@webassemblyjs/utf8": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.7.11.tgz", - "integrity": "sha512-C6GFkc7aErQIAH+BMrIdVSmW+6HSe20wg57HEC1uqJP8E/xpMjXqQUxkQw07MhNDSDcGpxI9G5JSNOQCqJk4sA==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.11.tgz", - "integrity": "sha512-FUd97guNGsCZQgeTPKdgxJhBXkUbMTY6hFPf2Y4OedXd48H97J+sOY2Ltaq6WGVpIH8o/TGOVNiVz/SbpEMJGg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/helper-wasm-section": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11", - "@webassemblyjs/wasm-opt": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11", - "@webassemblyjs/wast-printer": "1.7.11" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.11.tgz", - "integrity": "sha512-U/KDYp7fgAZX5KPfq4NOupK/BmhDc5Kjy2GIqstMhvvdJRcER/kUsMThpWeRP8BMn4LXaKhSTggIJPOeYHwISA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/ieee754": "1.7.11", - "@webassemblyjs/leb128": "1.7.11", - "@webassemblyjs/utf8": "1.7.11" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.11.tgz", - "integrity": "sha512-XynkOwQyiRidh0GLua7SkeHvAPXQV/RxsUeERILmAInZegApOUAIJfRuPYe2F7RcjOC9tW3Cb9juPvAC/sCqvg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.11.tgz", - "integrity": "sha512-6lmXRTrrZjYD8Ng8xRyvyXQJYUQKYSXhJqXOBLw24rdiXsHAOlvw5PhesjdcaMadU/pyPQOJ5dHreMjBxwnQKg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-api-error": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/ieee754": "1.7.11", - "@webassemblyjs/leb128": "1.7.11", - "@webassemblyjs/utf8": "1.7.11" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.7.11.tgz", - "integrity": "sha512-lEyVCg2np15tS+dm7+JJTNhNWq9yTZvi3qEhAIIOaofcYlUp0UR5/tVqOwa/gXYr3gjwSZqw+/lS9dscyLelbQ==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/floating-point-hex-parser": "1.7.11", - "@webassemblyjs/helper-api-error": "1.7.11", - "@webassemblyjs/helper-code-frame": "1.7.11", - "@webassemblyjs/helper-fsm": "1.7.11", - "@xtuc/long": "4.2.1" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.7.11.tgz", - "integrity": "sha512-m5vkAsuJ32QpkdkDOUPGSltrg8Cuk3KBx4YrmAGQwCZPRdUHXxG4phIOuuycLemHFr74sWL9Wthqss4fzdzSwg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/wast-parser": "1.7.11", - "@xtuc/long": "4.2.1" - } - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.1.tgz", - "integrity": "sha512-FZdkNBDqBRHKQ2MEbSC17xnPFOhZxeJ2YGSfr2BKf3sujG49Qe3bB+rGCwQfIaA7WHnGeGkSijX4FuBCdrzW/g==", - "dev": true - }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "dev": true, - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true - }, - "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "^5.0.0" - } - }, - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", - "dev": true, - "optional": true, - "requires": { - "acorn": "^3.0.4" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true, - "optional": true - } - } - }, - "acorn-walk": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", - "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==", - "dev": true - }, - "address": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/address/-/address-1.0.3.tgz", - "integrity": "sha512-z55ocwKBRLryBs394Sm3ushTtBeg6VAeuku7utSoSnsJKvKcnXFIyC6vh27n3rXyxSgkJBBCAvyOn7gSUcTYjg==", - "dev": true - }, - "ajv": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", - "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true - }, - "ajv-keywords": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", - "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", - "dev": true - }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", - "dev": true - }, - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true - }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-html": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", - "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=", - "dev": true - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "arch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", - "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-filter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", - "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", - "dev": true - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "array-map": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", - "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", - "dev": true - }, - "array-reduce": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", - "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "async-each": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.2.tgz", - "integrity": "sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg==", - "dev": true - }, - "async-limiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "autoprefixer": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.5.0.tgz", - "integrity": "sha512-hMKcyHsZn5+qL6AUeP3c8OyuteZ4VaUlg+fWbyl8z7PqsKHF/Bf8/px3K6AT8aMzDkBo8Bc11245MM+itDBOxQ==", - "dev": true, - "requires": { - "browserslist": "^4.4.2", - "caniuse-lite": "^1.0.30000947", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.14", - "postcss-value-parser": "^3.3.1" - } - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, - "axios": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", - "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", - "requires": { - "follow-redirects": "^1.3.0", - "is-buffer": "^1.1.5" - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "babel-eslint": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.1.tgz", - "integrity": "sha512-z7OT1iNV+TjOwHNLLyJk+HN+YVWX+CLE6fPD2SymJZOZQBs+QIexFjhm4keGTm8MW9xr4EC9Q0PbaLB24V5GoQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.0.0", - "@babel/traverse": "^7.0.0", - "@babel/types": "^7.0.0", - "eslint-scope": "3.7.1", - "eslint-visitor-keys": "^1.0.0" - }, - "dependencies": { - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - } - } - }, - "babel-loader": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.5.tgz", - "integrity": "sha512-NTnHnVRd2JnRqPC0vW+iOQWU5pchDbYXsG2E6DMXEpMfUcQKclF9gmf3G3ZMhzG7IG9ji4coL0cm+FxeWxDpnw==", - "dev": true, - "requires": { - "find-cache-dir": "^2.0.0", - "loader-utils": "^1.0.2", - "mkdirp": "^0.5.1", - "util.promisify": "^1.0.0" - } - }, - "babel-plugin-dynamic-import-node": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.2.0.tgz", - "integrity": "sha512-fP899ELUnTaBcIzmrW7nniyqqdYWrWuJUyPWHxFa/c7r7hS6KC8FscNfLlBNIoPSc55kYMGEEKjPjJGCLbE1qA==", - "dev": true, - "requires": { - "object.assign": "^4.1.0" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bfj": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/bfj/-/bfj-6.1.1.tgz", - "integrity": "sha512-+GUNvzHR4nRyGybQc2WpNJL4MJazMuvf92ueIyA0bIkPRwhhQu3IfZQ2PSoVPpCBJfmoSdOxu5rnotfFLlvYRQ==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "check-types": "^7.3.0", - "hoopy": "^0.1.2", - "tryer": "^1.0.0" - } - }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true - }, - "bluebird": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", - "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", - "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", - "dev": true, - "requires": { - "array-flatten": "^2.1.0", - "deep-equal": "^1.0.1", - "dns-equal": "^1.0.0", - "dns-txt": "^2.0.2", - "multicast-dns": "^6.0.1", - "multicast-dns-service-types": "^1.1.0" - }, - "dependencies": { - "array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", - "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", - "dev": true - } - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } - }, - "browserslist": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.4.tgz", - "integrity": "sha512-rAjx494LMjqKnMPhFkuLmLp8JWEX0o8ADTGeAbOqaF+XCvYLreZrG5uVjnPBlAQ8REZK4pzXGvp0bWgrFtKaag==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000955", - "electron-to-chromium": "^1.3.122", - "node-releases": "^1.1.13" - } - }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "buffer-indexof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "cacache": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", - "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", - "dev": true, - "requires": { - "bluebird": "^3.5.3", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.3", - "graceful-fs": "^4.1.15", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "cache-loader": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-2.0.1.tgz", - "integrity": "sha512-V99T3FOynmGx26Zom+JrVBytLBsmUCzVG2/4NnUKgvXN4bEV42R1ERl1IyiH/cvFIDA1Ytq2lPZ9tXDSahcQpQ==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "mkdirp": "^0.5.1", - "neo-async": "^2.6.0", - "normalize-path": "^3.0.0", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - }, - "dependencies": { - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - } - } - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "optional": true, - "requires": { - "callsites": "^0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", - "dev": true, - "optional": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "camelcase": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.0.tgz", - "integrity": "sha512-Y05ICatFYPAfykDIB7VdwSJ0LUl1yq/BwO2OpyGGLjiRe1fgzTwVypPiWnzkGFOVFHXrCXUNBl86bpjBhZWSJg==", - "dev": true - }, - "caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", - "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, - "caniuse-lite": { - "version": "1.0.30000957", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000957.tgz", - "integrity": "sha512-8wxNrjAzyiHcLXN/iunskqQnJquQQ6VX8JHfW5kLgAPRSiSuKZiNfmIkP5j7jgyXqAQBSoXyJxfnbCFS0ThSiQ==", - "dev": true - }, - "case-sensitive-paths-webpack-plugin": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.2.0.tgz", - "integrity": "sha512-u5ElzokS8A1pm9vM3/iDgTcI3xqHxuCao94Oz8etI3cf0Tio0p8izkDYbTIn09uP3yUUr6+veaE6IkjnTYS46g==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true, - "optional": true - }, - "check-types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/check-types/-/check-types-7.4.0.tgz", - "integrity": "sha512-YbulWHdfP99UfZ73NcUDlNJhEIDgm9Doq9GhpyXbF+7Aegi3CVV7qqMCKTTqJxlvEvnQBp9IA+dxsGN6xK/nSg==", - "dev": true - }, - "chokidar": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz", - "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - } - }, - "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", - "dev": true - }, - "chrome-trace-event": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz", - "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", - "dev": true, - "optional": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "clean-css": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", - "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", - "dev": true, - "requires": { - "source-map": "~0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-spinners": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.0.0.tgz", - "integrity": "sha512-yiEBmhaKPPeBj7wWm4GEdtPZK940p9pl3EANIrnJ3JnvWyrPjcFcsEq6qRUuQ7fzB0+Y82ld3p6B34xo95foWw==", - "dev": true - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "clipboardy": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-1.2.3.tgz", - "integrity": "sha512-2WNImOvCRe6r63Gk9pShfkwXsVtKCroMAevIbiae021mS850UkWPbevxsBz3tnvjZIEGvlwaqCPsw+4ulzNgJA==", - "dev": true, - "requires": { - "arch": "^2.1.0", - "execa": "^0.8.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "coa": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", - "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", - "dev": true, - "requires": { - "@types/q": "^1.5.1", - "chalk": "^2.4.1", - "q": "^1.1.2" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/color/-/color-3.1.0.tgz", - "integrity": "sha512-CwyopLkuRYO5ei2EpzpIh6LqJMt6Mt+jZhO5VI5f/wJLZriXQE32/SSqzmrh+QB+AZT81Cj8yv+7zwToW8ahZg==", - "dev": true, - "requires": { - "color-convert": "^1.9.1", - "color-string": "^1.5.2" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", - "dev": true, - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "compressible": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.16.tgz", - "integrity": "sha512-JQfEOdnI7dASwCuSPWIeVYwc/zMsu/+tRhoUvEfXz2gxOA2DNjmG5vhtFdBlhWPPGo+RdT9S3tgc/uH5qgDiiA==", - "dev": true, - "requires": { - "mime-db": ">= 1.38.0 < 2" - } - }, - "compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "connect-history-api-fallback": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", - "dev": true - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "consolidate": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz", - "integrity": "sha512-DW46nrsMJgy9kqAbPt5rKaCr7uFtpo4mSUvLHIUbJEjm0vo+aY5QLwBUq3FK4tRnJr/X0Psc0C4jf/h+HtXSMw==", - "dev": true, - "requires": { - "bluebird": "^3.1.1" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "dev": true - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-webpack-plugin": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.6.0.tgz", - "integrity": "sha512-Y+SQCF+0NoWQryez2zXn5J5knmr9z/9qSQt7fbL78u83rxmigOy8X5+BFn8CFSuX+nKT8gpYwJX68ekqtQt6ZA==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "globby": "^7.1.1", - "is-glob": "^4.0.0", - "loader-utils": "^1.1.0", - "minimatch": "^3.0.4", - "p-limit": "^1.0.0", - "serialize-javascript": "^1.4.0" - }, - "dependencies": { - "cacache": { - "version": "10.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", - "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - } - }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", - "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^2.0.1", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, - "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", - "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cosmiconfig": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.0.tgz", - "integrity": "sha512-nxt+Nfc3JAqf4WIWd0jXLjTJZmsPLrA9DDc4nRw2KFJQJK7DNooqSXrNI7tzLG50CF8axczly5UV929tBmh/7g==", - "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.0", - "parse-json": "^4.0.0" - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", - "dev": true - }, - "css-declaration-sorter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz", - "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", - "dev": true, - "requires": { - "postcss": "^7.0.1", - "timsort": "^0.3.0" - } - }, - "css-loader": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-1.0.1.tgz", - "integrity": "sha512-+ZHAZm/yqvJ2kDtPne3uX0C+Vr3Zn5jFn2N4HywtS5ujwvsVkyg0VArEXpl3BgczDA8anieki1FIzhchX4yrDw==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "css-selector-tokenizer": "^0.7.0", - "icss-utils": "^2.1.0", - "loader-utils": "^1.0.2", - "lodash": "^4.17.11", - "postcss": "^6.0.23", - "postcss-modules-extract-imports": "^1.2.0", - "postcss-modules-local-by-default": "^1.2.0", - "postcss-modules-scope": "^1.1.0", - "postcss-modules-values": "^1.3.0", - "postcss-value-parser": "^3.3.0", - "source-list-map": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "css-select": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.0.2.tgz", - "integrity": "sha512-dSpYaDVoWaELjvZ3mS6IKZM/y2PMPa/XYoEfYNZePL4U/XgyxZNroHEHReDx/d+VgXh9VbCTtFqLkFbmeqeaRQ==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^2.1.2", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" - } - }, - "css-select-base-adapter": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", - "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", - "dev": true - }, - "css-selector-tokenizer": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz", - "integrity": "sha512-xYL0AMZJ4gFzJQsHUKa5jiWWi2vH77WVNg7JYRyewwj6oPh4yb/y6Y9ZCw9dsj/9UauMhtuxR+ogQd//EdEVNA==", - "dev": true, - "requires": { - "cssesc": "^0.1.0", - "fastparse": "^1.1.1", - "regexpu-core": "^1.0.0" - }, - "dependencies": { - "cssesc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", - "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", - "dev": true - }, - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - }, - "regexpu-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", - "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - } - } - } - }, - "css-tree": { - "version": "1.0.0-alpha.28", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.28.tgz", - "integrity": "sha512-joNNW1gCp3qFFzj4St6zk+Wh/NBv0vM5YbEreZk0SD4S23S+1xBKb6cLDg2uj4P4k/GUMlIm6cKIDqIG+vdt0w==", - "dev": true, - "requires": { - "mdn-data": "~1.1.0", - "source-map": "^0.5.3" - } - }, - "css-unit-converter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.1.tgz", - "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=", - "dev": true - }, - "css-url-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/css-url-regex/-/css-url-regex-1.1.0.tgz", - "integrity": "sha1-g4NCMMyfdMRX3lnuvRVD/uuDt+w=", - "dev": true - }, - "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", - "dev": true - }, - "cssesc": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz", - "integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==", - "dev": true - }, - "cssnano": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz", - "integrity": "sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ==", - "dev": true, - "requires": { - "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.7", - "is-resolvable": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "cssnano-preset-default": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz", - "integrity": "sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA==", - "dev": true, - "requires": { - "css-declaration-sorter": "^4.0.1", - "cssnano-util-raw-cache": "^4.0.1", - "postcss": "^7.0.0", - "postcss-calc": "^7.0.1", - "postcss-colormin": "^4.0.3", - "postcss-convert-values": "^4.0.1", - "postcss-discard-comments": "^4.0.2", - "postcss-discard-duplicates": "^4.0.2", - "postcss-discard-empty": "^4.0.1", - "postcss-discard-overridden": "^4.0.1", - "postcss-merge-longhand": "^4.0.11", - "postcss-merge-rules": "^4.0.3", - "postcss-minify-font-values": "^4.0.2", - "postcss-minify-gradients": "^4.0.2", - "postcss-minify-params": "^4.0.2", - "postcss-minify-selectors": "^4.0.2", - "postcss-normalize-charset": "^4.0.1", - "postcss-normalize-display-values": "^4.0.2", - "postcss-normalize-positions": "^4.0.2", - "postcss-normalize-repeat-style": "^4.0.2", - "postcss-normalize-string": "^4.0.2", - "postcss-normalize-timing-functions": "^4.0.2", - "postcss-normalize-unicode": "^4.0.1", - "postcss-normalize-url": "^4.0.1", - "postcss-normalize-whitespace": "^4.0.2", - "postcss-ordered-values": "^4.1.2", - "postcss-reduce-initial": "^4.0.3", - "postcss-reduce-transforms": "^4.0.2", - "postcss-svgo": "^4.0.2", - "postcss-unique-selectors": "^4.0.1" - } - }, - "cssnano-util-get-arguments": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz", - "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", - "dev": true - }, - "cssnano-util-get-match": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz", - "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", - "dev": true - }, - "cssnano-util-raw-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz", - "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "cssnano-util-same-parent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz", - "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==", - "dev": true - }, - "csso": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/csso/-/csso-3.5.1.tgz", - "integrity": "sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg==", - "dev": true, - "requires": { - "css-tree": "1.0.0-alpha.29" - }, - "dependencies": { - "css-tree": { - "version": "1.0.0-alpha.29", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz", - "integrity": "sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==", - "dev": true, - "requires": { - "mdn-data": "~1.1.0", - "source-map": "^0.5.3" - } - } - } - }, - "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", - "dev": true - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "de-indent": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", - "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=", - "dev": true - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", - "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", - "dev": true, - "requires": { - "xregexp": "4.0.0" - } - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "deepmerge": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz", - "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==", - "dev": true - }, - "default-gateway": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", - "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "ip-regex": "^2.1.0" - } - }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "dev": true, - "requires": { - "clone": "^1.0.2" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "dev": true, - "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" - }, - "dependencies": { - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", - "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dir-glob": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", - "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", - "dev": true, - "requires": { - "path-type": "^3.0.0" - } - }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", - "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", - "dev": true, - "requires": { - "ip": "^1.1.0", - "safe-buffer": "^5.0.1" - } - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true, - "requires": { - "buffer-indexof": "^1.0.0" - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "optional": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-converter": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", - "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", - "dev": true, - "requires": { - "utila": "~0.4" - } - }, - "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", - "dev": true, - "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, - "dotenv": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz", - "integrity": "sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==", - "dev": true - }, - "dotenv-expand": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-4.2.0.tgz", - "integrity": "sha1-3vHxyl1gWdJKdm5YeULCEQbOEnU=", - "dev": true - }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", - "dev": true - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "easy-stack": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/easy-stack/-/easy-stack-1.0.0.tgz", - "integrity": "sha1-EskbMIWjfwuqM26UhurEv5Tj54g=", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "ejs": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", - "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.122", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.122.tgz", - "integrity": "sha512-3RKoIyCN4DhP2dsmleuFvpJAIDOseWH88wFYBzb22CSwoFDSWRc4UAMfrtc9h8nBdJjTNIN3rogChgOy6eFInw==", - "dev": true - }, - "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "enhanced-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", - "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "tapable": "^1.0.0" - } - }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "error-stack-parser": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.2.tgz", - "integrity": "sha512-E1fPutRDdIj/hohG0UpT5mayXNCxXP9d+snxFsPU9X0XgccOumKraa3juDMwTUyi7+Bu5+mCGagjg4IYeNbOdw==", - "dev": true, - "requires": { - "stackframe": "^1.0.4" - } - }, - "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" - } - }, - "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", - "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" - }, - "dependencies": { - "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", - "dev": true - }, - "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", - "dev": true - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "espree": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", - "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", - "dev": true, - "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, - "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", - "dev": true, - "requires": { - "flat-cache": "^2.0.1" - } - }, - "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", - "dev": true, - "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - } - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "import-fresh": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", - "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "inquirer": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.2.tgz", - "integrity": "sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA==", - "dev": true, - "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.11", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", - "dev": true - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - } - } - }, - "table": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/table/-/table-5.2.3.tgz", - "integrity": "sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ==", - "dev": true, - "requires": { - "ajv": "^6.9.1", - "lodash": "^4.17.11", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "dependencies": { - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - } - } - }, - "eslint-loader": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-2.1.2.tgz", - "integrity": "sha512-rA9XiXEOilLYPOIInvVH5S/hYfyTPyxag6DZhoQOduM+3TkghAEQ3VcFO8VnX4J4qg/UIBzp72aOf/xvYmpmsg==", - "dev": true, - "requires": { - "loader-fs-cache": "^1.0.0", - "loader-utils": "^1.0.2", - "object-assign": "^4.0.1", - "object-hash": "^1.1.4", - "rimraf": "^2.6.1" - } - }, - "eslint-plugin-vue": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-5.2.2.tgz", - "integrity": "sha512-CtGWH7IB0DA6BZOwcV9w9q3Ri6Yuo8qMjx05SmOGJ6X6E0Yo3y9E/gQ5tuNxg2dEt30tRnBoFTbvtmW9iEoyHA==", - "dev": true, - "requires": { - "vue-eslint-parser": "^5.0.0" - }, - "dependencies": { - "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", - "dev": true - }, - "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", - "dev": true - }, - "espree": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", - "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", - "dev": true, - "requires": { - "acorn": "^6.0.2", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "vue-eslint-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-5.0.0.tgz", - "integrity": "sha512-JlHVZwBBTNVvzmifwjpZYn0oPWH2SgWv5dojlZBsrhablDu95VFD+hriB1rQGwbD+bms6g+rAFhQHk6+NyiS6g==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "eslint-scope": "^4.0.0", - "eslint-visitor-keys": "^1.0.0", - "espree": "^4.1.0", - "esquery": "^1.0.1", - "lodash": "^4.17.11" - } - } - } - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", - "dev": true - }, - "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", - "dev": true - }, - "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", - "dev": true, - "optional": true, - "requires": { - "acorn": "^5.5.0", - "acorn-jsx": "^3.0.0" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", - "dev": true, - "requires": { - "estraverse": "^4.0.0" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "event-pubsub": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/event-pubsub/-/event-pubsub-4.3.0.tgz", - "integrity": "sha512-z7IyloorXvKbFx9Bpie2+vMJKKx1fH1EN5yiTfp8CiLOTptSYy1g8H4yDpGlEdshL1PBiFtBHepF2cNsqeEeFQ==", - "dev": true - }, - "eventemitter3": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", - "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", - "dev": true - }, - "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", - "dev": true - }, - "eventsource": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz", - "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==", - "dev": true, - "requires": { - "original": "^1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "optional": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-glob": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.6.tgz", - "integrity": "sha512-0BvMaZc1k9F+MeWWMe8pL6YltFzZYcJsYU7D4JyDA6PAczaXvxqQQ/z+mDF7/4Mw01DeUc+i3CTKajnkANkV4w==", - "dev": true, - "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.1.2", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.3", - "micromatch": "^3.1.10" - } - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastparse": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", - "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", - "dev": true - }, - "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - }, - "figgy-pudding": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "dev": true, - "optional": true, - "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" - } - }, - "file-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-3.0.1.tgz", - "integrity": "sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw==", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "filesize": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", - "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==", - "dev": true - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flat-cache": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", - "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", - "dev": true, - "optional": true, - "requires": { - "circular-json": "^0.3.1", - "graceful-fs": "^4.1.2", - "rimraf": "~2.6.2", - "write": "^0.2.1" - } - }, - "flatted": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", - "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", - "dev": true - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, - "follow-redirects": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", - "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", - "requires": { - "debug": "^3.2.6" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "iferr": "^0.1.5", - "imurmurhash": "^0.1.4", - "readable-stream": "1 || 2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", - "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true - }, - "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", - "dev": true - }, - "globby": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", - "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^1.0.2", - "dir-glob": "^2.2.2", - "fast-glob": "^2.2.6", - "glob": "^7.1.3", - "ignore": "^4.0.3", - "pify": "^4.0.1", - "slash": "^2.0.0" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - } - } - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "gzip-size": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.0.0.tgz", - "integrity": "sha512-5iI7omclyqrnWw4XbXAmGhPsABkSIDQonv2K0h61lybgofWa6iZyvrI3r2zsJH4P8Nb64fFVzlvfhs0g7BBxAA==", - "dev": true, - "requires": { - "duplexer": "^0.1.1", - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "handle-thing": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", - "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==", - "dev": true - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "dev": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", - "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", - "dev": true - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hex-color-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", - "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hoek": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-6.1.3.tgz", - "integrity": "sha512-YXXAAhmF9zpQbC7LEcREFtXfGq5K1fmd+4PHkBq8NUqmzW3G+Dq10bI/i0KucLRwss3YYFQ0fSfoxBZYiGUqtQ==", - "dev": true - }, - "hoopy": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", - "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==", - "dev": true - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "hsl-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz", - "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", - "dev": true - }, - "hsla-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz", - "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", - "dev": true - }, - "html-comment-regex": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", - "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==", - "dev": true - }, - "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", - "dev": true - }, - "html-minifier": { - "version": "3.5.21", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz", - "integrity": "sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==", - "dev": true, - "requires": { - "camel-case": "3.0.x", - "clean-css": "4.2.x", - "commander": "2.17.x", - "he": "1.2.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.4.x" - }, - "dependencies": { - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true - } - } - }, - "html-tags": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", - "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=", - "dev": true - }, - "html-webpack-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", - "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", - "dev": true, - "requires": { - "html-minifier": "^3.2.3", - "loader-utils": "^0.2.16", - "lodash": "^4.17.3", - "pretty-error": "^2.0.2", - "tapable": "^1.0.0", - "toposort": "^1.0.0", - "util.promisify": "1.0.0" - }, - "dependencies": { - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - } - } - }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "dev": true, - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", - "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=", - "dev": true - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "http-parser-js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.0.tgz", - "integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==", - "dev": true - }, - "http-proxy": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", - "dev": true, - "requires": { - "eventemitter3": "^3.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-proxy-middleware": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", - "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", - "dev": true, - "requires": { - "http-proxy": "^1.17.0", - "is-glob": "^4.0.0", - "lodash": "^4.17.11", - "micromatch": "^3.1.10" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "icss-replace-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", - "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", - "dev": true - }, - "icss-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-2.1.0.tgz", - "integrity": "sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=", - "dev": true, - "requires": { - "postcss": "^6.0.1" - }, - "dependencies": { - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", - "dev": true - }, - "iferr": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", - "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", - "dev": true - }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, - "import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", - "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", - "dev": true, - "requires": { - "import-from": "^2.1.0" - } - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - }, - "dependencies": { - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - } - } - }, - "import-from": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", - "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - } - } - }, - "import-local": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", - "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", - "dev": true, - "requires": { - "pkg-dir": "^3.0.0", - "resolve-cwd": "^2.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "dev": true, - "optional": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "internal-ip": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.2.0.tgz", - "integrity": "sha512-ZY8Rk+hlvFeuMmG5uH1MXhhdeMntmIaxaInvAmzMq/SHV8rv4Kh+6GiQNNDQd0wZFrcO+FiTBo8lui/osKOyJw==", - "dev": true, - "requires": { - "default-gateway": "^4.0.1", - "ipaddr.js": "^1.9.0" - }, - "dependencies": { - "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==", - "dev": true - } - } - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", - "dev": true - }, - "ipaddr.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", - "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=", - "dev": true - }, - "is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-ci": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", - "dev": true, - "requires": { - "ci-info": "^1.5.0" - } - }, - "is-color-stop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", - "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", - "dev": true, - "requires": { - "css-color-names": "^0.0.4", - "hex-color-regex": "^1.1.0", - "hsl-regex": "^1.0.0", - "hsla-regex": "^1.0.0", - "rgb-regex": "^1.0.1", - "rgba-regex": "^1.0.0" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-svg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", - "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==", - "dev": true, - "requires": { - "html-comment-regex": "^1.1.0" - } - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.0" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", - "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isemail": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.2.0.tgz", - "integrity": "sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg==", - "dev": true, - "requires": { - "punycode": "2.x.x" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "javascript-stringify": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-1.6.0.tgz", - "integrity": "sha1-FC0RHzpuPa6PSpr9d9RYVbWpzOM=", - "dev": true - }, - "joi": { - "version": "14.3.1", - "resolved": "https://registry.npmjs.org/joi/-/joi-14.3.1.tgz", - "integrity": "sha512-LQDdM+pkOrpAn4Lp+neNIFV3axv1Vna3j38bisbQhETPMANYRbFJFUyOZcOClYvM/hppMhGWuKSFEK9vjrB+bQ==", - "dev": true, - "requires": { - "hoek": "6.x.x", - "isemail": "3.x.x", - "topo": "3.x.x" - } - }, - "js-levenshtein": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", - "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", - "dev": true - }, - "js-message": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/js-message/-/js-message-1.0.5.tgz", - "integrity": "sha1-IwDSSxrwjondCVvBpMnJz8uJLRU=", - "dev": true - }, - "js-queue": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/js-queue/-/js-queue-2.0.0.tgz", - "integrity": "sha1-NiITz4YPRo8BJfxslqvBdCUx+Ug=", - "dev": true, - "requires": { - "easy-stack": "^1.0.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz", - "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", - "dev": true - }, - "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "killable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", - "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "launch-editor": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.2.1.tgz", - "integrity": "sha512-On+V7K2uZK6wK7x691ycSUbLD/FyKKelArkbaAMSSJU8JmqmhwN2+mnJDNINuJWSrh2L0kDk+ZQtbC/gOWUwLw==", - "dev": true, - "requires": { - "chalk": "^2.3.0", - "shell-quote": "^1.6.1" - } - }, - "launch-editor-middleware": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/launch-editor-middleware/-/launch-editor-middleware-2.2.1.tgz", - "integrity": "sha512-s0UO2/gEGiCgei3/2UN3SMuUj1phjQN8lcpnvgLSz26fAzNWPQ6Nf/kF5IFClnfU2ehp6LrmKdMU/beveO+2jg==", - "dev": true, - "requires": { - "launch-editor": "^2.2.1" - } - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "loader-fs-cache": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/loader-fs-cache/-/loader-fs-cache-1.0.2.tgz", - "integrity": "sha512-70IzT/0/L+M20jUlEqZhZyArTU6VKLRTYRDAYN26g4jfzpJqjipLL3/hgYpySqI9PwsVRHHFja0LfEmsx9X2Cw==", - "dev": true, - "requires": { - "find-cache-dir": "^0.1.1", - "mkdirp": "0.5.1" - }, - "dependencies": { - "find-cache-dir": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz", - "integrity": "sha1-yN765XyKUqinhPnjHFfHQumToLk=", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "mkdirp": "^0.5.1", - "pkg-dir": "^1.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "pkg-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", - "dev": true, - "requires": { - "find-up": "^1.0.0" - } - } - } - }, - "loader-runner": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", - "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", - "dev": true - }, - "loader-utils": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", - "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^2.0.0", - "json5": "^1.0.1" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - } - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true - }, - "lodash.defaultsdeep": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.0.tgz", - "integrity": "sha1-vsECT4WxvZbL6kBbI8FK1kQ6b4E=", - "dev": true - }, - "lodash.kebabcase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", - "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=", - "dev": true - }, - "lodash.mapvalues": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", - "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", - "dev": true - }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "lodash.transform": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.transform/-/lodash.transform-4.6.0.tgz", - "integrity": "sha1-EjBkIvYzJK7YSD0/ODMrX2cFR6A=", - "dev": true - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "loglevel": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", - "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mdn-data": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz", - "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==", - "dev": true - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - } - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge-source-map": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", - "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "merge2": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.3.tgz", - "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==", - "dev": true - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", - "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==", - "dev": true - }, - "mime-db": { - "version": "1.38.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", - "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", - "dev": true - }, - "mime-types": { - "version": "2.1.22", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", - "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", - "dev": true, - "requires": { - "mime-db": "~1.38.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "mini-css-extract-plugin": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.5.0.tgz", - "integrity": "sha512-IuaLjruM0vMKhUUT51fQdQzBYTX49dLj8w68ALEAe2A4iYNpIC4eMac67mt3NzycvjOlf07/kYxJDc0RTl1Wqw==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "schema-utils": "^1.0.0", - "webpack-sources": "^1.1.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, - "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "move-concurrently": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", - "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "copy-concurrently": "^1.0.0", - "fs-write-stream-atomic": "^1.0.8", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.3" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "multicast-dns": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", - "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", - "dev": true, - "requires": { - "dns-packet": "^1.3.1", - "thunky": "^1.0.2" - } - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", - "dev": true, - "optional": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", - "dev": true - }, - "neo-async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", - "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, - "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", - "dev": true - }, - "node-ipc": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/node-ipc/-/node-ipc-9.1.1.tgz", - "integrity": "sha512-FAyICv0sIRJxVp3GW5fzgaf9jwwRQxAKDJlmNFUL5hOy+W4X/I5AypyHoq0DXXbo9o/gt79gj++4cMr4jVWE/w==", - "dev": true, - "requires": { - "event-pubsub": "4.3.0", - "js-message": "1.0.5", - "js-queue": "2.0.0" - } - }, - "node-libs-browser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", - "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, - "node-releases": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.13.tgz", - "integrity": "sha512-fKZGviSXR6YvVPyc011NHuJDSD8gFQvLPmc2d2V3BS4gr52ycyQ1Xzs7a8B+Ax3Ni/W+5h1h4SqmzeoA8WZRmA==", - "dev": true, - "requires": { - "semver": "^5.3.0" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", - "dev": true - }, - "normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", - "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", - "dev": true - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-hash": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", - "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", - "dev": true - }, - "object-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz", - "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "object.values": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", - "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.12.0", - "function-bind": "^1.1.1", - "has": "^1.0.3" - } - }, - "obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "opener": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", - "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", - "dev": true - }, - "opn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", - "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", - "dev": true, - "requires": { - "is-wsl": "^1.1.0" - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - } - }, - "ora": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-3.4.0.tgz", - "integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-spinners": "^2.0.0", - "log-symbols": "^2.2.0", - "strip-ansi": "^5.2.0", - "wcwidth": "^1.0.1" - } - }, - "original": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", - "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", - "dev": true, - "requires": { - "url-parse": "^1.4.3" - } - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", - "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", - "dev": true - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", - "dev": true - }, - "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", - "dev": true, - "requires": { - "cyclist": "~0.2.2", - "inherits": "^2.0.3", - "readable-stream": "^2.1.5" - } - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - }, - "dependencies": { - "callsites": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", - "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", - "dev": true - } - } - }, - "parse-asn1": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", - "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true, - "optional": true - }, - "portfinder": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz", - "integrity": "sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==", - "dev": true, - "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", - "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-calc": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.1.tgz", - "integrity": "sha512-oXqx0m6tb4N3JGdmeMSc/i91KppbYsFZKdH0xMOqK8V1rJlzrKlTdokz8ozUXLVejydRN6u2IddxpcijRj2FqQ==", - "dev": true, - "requires": { - "css-unit-converter": "^1.1.1", - "postcss": "^7.0.5", - "postcss-selector-parser": "^5.0.0-rc.4", - "postcss-value-parser": "^3.3.1" - } - }, - "postcss-colormin": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz", - "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "color": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-convert-values": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz", - "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-discard-comments": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz", - "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-duplicates": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz", - "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-empty": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz", - "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-discard-overridden": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz", - "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-load-config": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.0.0.tgz", - "integrity": "sha512-V5JBLzw406BB8UIfsAWSK2KSwIJ5yoEIVFb4gVkXci0QdKgA24jLmHZ/ghe/GgX0lJ0/D1uUK1ejhzEY94MChQ==", - "dev": true, - "requires": { - "cosmiconfig": "^4.0.0", - "import-cwd": "^2.0.0" - }, - "dependencies": { - "cosmiconfig": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-4.0.0.tgz", - "integrity": "sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ==", - "dev": true, - "requires": { - "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^4.0.0", - "require-from-string": "^2.0.1" - } - } - } - }, - "postcss-loader": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-3.0.0.tgz", - "integrity": "sha512-cLWoDEY5OwHcAjDnkyRQzAXfs2jrKjXpO/HQFcc5b5u/r7aa471wdmChmwfnv7x2u840iat/wi0lQ5nbRgSkUA==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "postcss": "^7.0.0", - "postcss-load-config": "^2.0.0", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "postcss-merge-longhand": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz", - "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==", - "dev": true, - "requires": { - "css-color-names": "0.0.4", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "stylehacks": "^4.0.0" - } - }, - "postcss-merge-rules": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz", - "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "cssnano-util-same-parent": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0", - "vendors": "^1.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "dev": true, - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-minify-font-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz", - "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-minify-gradients": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz", - "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "is-color-stop": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-minify-params": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz", - "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "browserslist": "^4.0.0", - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "uniqs": "^2.0.0" - } - }, - "postcss-minify-selectors": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz", - "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "dev": true, - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "postcss-modules-extract-imports": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.1.tgz", - "integrity": "sha512-6jt9XZwUhwmRUhb/CkyJY020PYaPJsCyt3UjbaWo6XEbH/94Hmv6MP7fG2C5NDU/BcHzyGYxNtHvM+LTf9HrYw==", - "dev": true, - "requires": { - "postcss": "^6.0.1" - }, - "dependencies": { - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "postcss-modules-local-by-default": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz", - "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", - "dev": true, - "requires": { - "css-selector-tokenizer": "^0.7.0", - "postcss": "^6.0.1" - }, - "dependencies": { - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "postcss-modules-scope": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz", - "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", - "dev": true, - "requires": { - "css-selector-tokenizer": "^0.7.0", - "postcss": "^6.0.1" - }, - "dependencies": { - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "postcss-modules-values": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz", - "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", - "dev": true, - "requires": { - "icss-replace-symbols": "^1.1.0", - "postcss": "^6.0.1" - }, - "dependencies": { - "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "postcss-normalize-charset": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz", - "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", - "dev": true, - "requires": { - "postcss": "^7.0.0" - } - }, - "postcss-normalize-display-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz", - "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-positions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz", - "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-repeat-style": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz", - "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-string": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz", - "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==", - "dev": true, - "requires": { - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-timing-functions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz", - "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-unicode": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", - "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-url": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz", - "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==", - "dev": true, - "requires": { - "is-absolute-url": "^2.0.0", - "normalize-url": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-normalize-whitespace": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz", - "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", - "dev": true, - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-ordered-values": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz", - "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==", - "dev": true, - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-reduce-initial": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz", - "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0" - } - }, - "postcss-reduce-transforms": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz", - "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==", - "dev": true, - "requires": { - "cssnano-util-get-match": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - } - }, - "postcss-selector-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz", - "integrity": "sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ==", - "dev": true, - "requires": { - "cssesc": "^2.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - }, - "postcss-svgo": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.2.tgz", - "integrity": "sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==", - "dev": true, - "requires": { - "is-svg": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "svgo": "^1.0.0" - } - }, - "postcss-unique-selectors": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz", - "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==", - "dev": true, - "requires": { - "alphanum-sort": "^1.0.0", - "postcss": "^7.0.0", - "uniqs": "^2.0.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "prettier": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.3.tgz", - "integrity": "sha512-kn/GU6SMRYPxUakNXhpP0EedT/KmaPzr0H5lIsDogrykbaxOpOfAFfk5XA7DZrJyMAv1wlMV3CPcZruGXVVUZw==", - "dev": true - }, - "pretty-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", - "dev": true, - "requires": { - "renderkid": "^2.0.1", - "utila": "~0.4" - } - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", - "dev": true - }, - "proxy-addr": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", - "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", - "dev": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.8.0" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.1.31", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", - "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "querystringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", - "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", - "dev": true - }, - "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", - "dev": true, - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", - "unpipe": "1.0.0" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } - } - }, - "read-pkg": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", - "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=", - "dev": true, - "requires": { - "normalize-package-data": "^2.3.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerate-unicode-properties": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.0.2.tgz", - "integrity": "sha512-SbA/iNrBUf6Pv2zU8Ekv1Qbhv92yxL4hiDa2siuxs4KKn4oOoMDHXjAf7+Nz9qinUQ46B1LcWEi/PhJfPWpZWQ==", - "dev": true, - "requires": { - "regenerate": "^1.4.0" - } - }, - "regenerator-runtime": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", - "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==", - "dev": true - }, - "regenerator-transform": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.13.4.tgz", - "integrity": "sha512-T0QMBjK3J0MtxjPmdIMXm72Wvj2Abb0Bd4HADdfijwMdoIsyQZ6fWC7kDFhk2YinBBEMZDL7Y7wh0J1sGx3S4A==", - "dev": true, - "requires": { - "private": "^0.1.6" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexp-tree": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.5.tgz", - "integrity": "sha512-nUmxvfJyAODw+0B13hj8CFVAxhe7fDEAgJgaotBu3nnR+IgGgZq59YedJP5VYTlkEfqjuK6TuRpnymKdatLZfQ==", - "dev": true - }, - "regexpp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", - "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", - "dev": true, - "optional": true - }, - "regexpu-core": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", - "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==", - "dev": true, - "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.0.2", - "regjsgen": "^0.5.0", - "regjsparser": "^0.6.0", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.1.0" - } - }, - "regjsgen": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz", - "integrity": "sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA==", - "dev": true - }, - "regjsparser": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz", - "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "renderkid": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.3.tgz", - "integrity": "sha512-z8CLQp7EZBPCwCnncgf9C4XAi3WR0dv+uWu/PjIyhhAb5d6IJ/QZqlHFprHeKT+59//V6BNUsLbvN8+2LarxGA==", - "dev": true, - "requires": { - "css-select": "^1.1.0", - "dom-converter": "^0.2", - "htmlparser2": "^3.3.0", - "strip-ansi": "^3.0.0", - "utila": "^0.4.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "request-promise-core": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", - "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, - "request-promise-native": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", - "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", - "dev": true, - "requires": { - "request-promise-core": "1.1.2", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "optional": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - } - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - } - } - }, - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", - "dev": true, - "optional": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "rgb-regex": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", - "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", - "dev": true - }, - "rgba-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz", - "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", - "dev": true - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "run-queue": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", - "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", - "dev": true, - "requires": { - "aproba": "^1.1.1" - } - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "dev": true, - "optional": true, - "requires": { - "rx-lite": "*" - } - }, - "rxjs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", - "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - }, - "select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", - "dev": true - }, - "selfsigned": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.4.tgz", - "integrity": "sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw==", - "dev": true, - "requires": { - "node-forge": "0.7.5" - } - }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - }, - "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "serialize-javascript": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", - "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", - "dev": true - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shell-quote": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", - "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", - "dev": true, - "requires": { - "array-filter": "~0.0.0", - "array-map": "~0.0.0", - "array-reduce": "~0.0.0", - "jsonify": "~0.0.0" - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "dev": true, - "requires": { - "is-arrayish": "^0.3.1" - }, - "dependencies": { - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "dev": true - } - } - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", - "dev": true, - "optional": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0" - } - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", - "dev": true, - "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" - } - }, - "sockjs-client": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.3.0.tgz", - "integrity": "sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg==", - "dev": true, - "requires": { - "debug": "^3.2.5", - "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "faye-websocket": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", - "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } - } - } - }, - "source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.11", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.11.tgz", - "integrity": "sha512-//sajEx/fGL3iw6fltKMdPvy8kL3kJ2O3iuYlRoT3k9Kb4BjOoZ+BZzaNHeuaruSt+Kf3Zk9tnfAQg9/AJqUVQ==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", - "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", - "dev": true - }, - "spdy": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.0.tgz", - "integrity": "sha512-ot0oEGT/PGUpzf/6uk4AWLqkq+irlqHXkrdbk51oWONh3bxQmBuljxPNl66zlRRcIJStWq0QkLUCPOPjgjvU0Q==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - } - }, - "spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", - "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - }, - "dependencies": { - "readable-stream": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", - "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, - "stable": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", - "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", - "dev": true - }, - "stackframe": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.0.4.tgz", - "integrity": "sha512-to7oADIniaYwS3MhtCa/sQhrxidCCQiF/qp4/m5iN3ipf0Y7Xlri0f6eG29r08aL7JYl8n32AF3Q5GYBZ7K8vw==", - "dev": true - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", - "dev": true - }, - "stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", - "dev": true - }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-each": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "stream-shift": "^1.0.0" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "string.prototype.padend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz", - "integrity": "sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.4.3", - "function-bind": "^1.0.2" - } - }, - "string.prototype.padstart": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.padstart/-/string.prototype.padstart-3.0.0.tgz", - "integrity": "sha1-W8+tOfRkm7LQMSkuGbzwtRDUskI=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.4.3", - "function-bind": "^1.0.2" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", - "dev": true - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "stylehacks": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", - "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==", - "dev": true, - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "dev": true, - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - } - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "svg-tags": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", - "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", - "dev": true - }, - "svgo": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.2.0.tgz", - "integrity": "sha512-xBfxJxfk4UeVN8asec9jNxHiv3UAMv/ujwBWGYvQhhMb2u3YTGKkiybPcLFDLq7GLLWE9wa73e0/m8L5nTzQbw==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "coa": "^2.0.2", - "css-select": "^2.0.0", - "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.28", - "css-url-regex": "^1.1.0", - "csso": "^3.5.1", - "js-yaml": "^3.12.0", - "mkdirp": "~0.5.1", - "object.values": "^1.1.0", - "sax": "~1.2.4", - "stable": "^0.1.8", - "unquote": "~1.1.1", - "util.promisify": "~1.0.0" - } - }, - "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", - "dev": true, - "optional": true, - "requires": { - "ajv": "^5.2.3", - "ajv-keywords": "^2.1.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "optional": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", - "dev": true, - "optional": true - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true, - "optional": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true, - "optional": true - } - } - }, - "tapable": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz", - "integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA==", - "dev": true - }, - "terser": { - "version": "3.17.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", - "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==", - "dev": true, - "requires": { - "commander": "^2.19.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.10" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "terser-webpack-plugin": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.3.tgz", - "integrity": "sha512-GOK7q85oAb/5kE12fMuLdn2btOS9OBZn4VsecpHDywoUC/jLhSAKOiYo0ezx7ss2EXPMzyEWFoE0s1WLE+4+oA==", - "dev": true, - "requires": { - "cacache": "^11.0.2", - "find-cache-dir": "^2.0.0", - "schema-utils": "^1.0.0", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "terser": "^3.16.1", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "thread-loader": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thread-loader/-/thread-loader-2.1.2.tgz", - "integrity": "sha512-7xpuc9Ifg6WU+QYw/8uUqNdRwMD+N5gjwHKMqETrs96Qn+7BHwECpt2Brzr4HFlf4IAkZsayNhmGdbkBsTJ//w==", - "dev": true, - "requires": { - "loader-runner": "^2.3.1", - "loader-utils": "^1.1.0", - "neo-async": "^2.6.0" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "thunky": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz", - "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==", - "dev": true - }, - "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "timsort": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", - "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "topo": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/topo/-/topo-3.0.3.tgz", - "integrity": "sha512-IgpPtvD4kjrJ7CRA3ov2FhWQADwv+Tdqbsf1ZnPUSAtCJ9e1Z44MmoSGDXGk4IppoZA7jd/QRkNddlLJWlUZsQ==", - "dev": true, - "requires": { - "hoek": "6.x.x" - } - }, - "toposort": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", - "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", - "dev": true - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "tryer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz", - "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==", - "dev": true - }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "dev": true - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "uglify-js": { - "version": "3.4.10", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", - "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", - "dev": true, - "requires": { - "commander": "~2.19.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", - "dev": true - }, - "unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", - "dev": true, - "requires": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" - } - }, - "unicode-match-property-value-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", - "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==", - "dev": true - }, - "unicode-property-aliases-ecmascript": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", - "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", - "dev": true - }, - "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } - } - }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, - "uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", - "dev": true - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", - "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "unquote": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", - "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "upath": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", - "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", - "dev": true - }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-loader": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.1.2.tgz", - "integrity": "sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "mime": "^2.0.3", - "schema-utils": "^1.0.0" - }, - "dependencies": { - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - } - } - }, - "url-parse": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.4.tgz", - "integrity": "sha512-/92DTTorg4JjktLNLe6GPS2/RvAd/RGr6LuktmWSMLEOa6rjnlrFXNgSbSmkNvCoL2T028A0a1JaJLzRMlFoHg==", - "dev": true, - "requires": { - "querystringify": "^2.0.0", - "requires-port": "^1.0.0" - } - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "vendors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz", - "integrity": "sha512-w/hry/368nO21AN9QljsaIhb9ZiZtZARoVH5f3CsFbawdLdayCgKRPup7CggujvySMxx0I91NOyxdVENohprLQ==", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "vue": { - "version": "2.6.10", - "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.10.tgz", - "integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ==" - }, - "vue-eslint-parser": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz", - "integrity": "sha512-ZezcU71Owm84xVF6gfurBQUGg8WQ+WZGxgDEQu1IHFBZNx7BFZg3L1yHxrCBNNwbwFtE1GuvfJKMtb6Xuwc/Bw==", - "dev": true, - "optional": true, - "requires": { - "debug": "^3.1.0", - "eslint-scope": "^3.7.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^3.5.2", - "esquery": "^1.0.0", - "lodash": "^4.17.4" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", - "dev": true, - "optional": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - } - } - }, - "vue-hot-reload-api": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.3.tgz", - "integrity": "sha512-KmvZVtmM26BQOMK1rwUZsrqxEGeKiYSZGA7SNWE6uExx8UX/cj9hq2MRV/wWC3Cq6AoeDGk57rL9YMFRel/q+g==", - "dev": true - }, - "vue-loader": { - "version": "15.7.0", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.7.0.tgz", - "integrity": "sha512-x+NZ4RIthQOxcFclEcs8sXGEWqnZHodL2J9Vq+hUz+TDZzBaDIh1j3d9M2IUlTjtrHTZy4uMuRdTi8BGws7jLA==", - "dev": true, - "requires": { - "@vue/component-compiler-utils": "^2.5.1", - "hash-sum": "^1.0.2", - "loader-utils": "^1.1.0", - "vue-hot-reload-api": "^2.3.0", - "vue-style-loader": "^4.1.0" - } - }, - "vue-router": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.0.2.tgz", - "integrity": "sha512-opKtsxjp9eOcFWdp6xLQPLmRGgfM932Tl56U9chYTnoWqKxQ8M20N7AkdEbM5beUh6wICoFGYugAX9vQjyJLFg==" - }, - "vue-style-loader": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz", - "integrity": "sha512-0ip8ge6Gzz/Bk0iHovU9XAUQaFt/G2B61bnWa2tCcqqdgfHs1lF9xXorFbE55Gmy92okFT+8bfmySuUOu13vxQ==", - "dev": true, - "requires": { - "hash-sum": "^1.0.2", - "loader-utils": "^1.0.2" - } - }, - "vue-template-compiler": { - "version": "2.6.10", - "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.10.tgz", - "integrity": "sha512-jVZkw4/I/HT5ZMvRnhv78okGusqe0+qH2A0Em0Cp8aq78+NK9TII263CDVz2QXZsIT+yyV/gZc/j/vlwa+Epyg==", - "dev": true, - "requires": { - "de-indent": "^1.0.2", - "he": "^1.1.0" - } - }, - "vue-template-es2015-compiler": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz", - "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", - "dev": true - }, - "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", - "dev": true, - "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" - } - }, - "wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "requires": { - "minimalistic-assert": "^1.0.0" - } - }, - "wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", - "dev": true, - "requires": { - "defaults": "^1.0.3" - } - }, - "webpack": { - "version": "4.28.4", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.28.4.tgz", - "integrity": "sha512-NxjD61WsK/a3JIdwWjtIpimmvE6UrRi3yG54/74Hk9rwNj5FPkA4DJCf1z4ByDWLkvZhTZE+P3C/eh6UD5lDcw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-module-context": "1.7.11", - "@webassemblyjs/wasm-edit": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11", - "acorn": "^5.6.2", - "acorn-dynamic-import": "^3.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chrome-trace-event": "^1.0.0", - "enhanced-resolve": "^4.1.0", - "eslint-scope": "^4.0.0", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "micromatch": "^3.1.8", - "mkdirp": "~0.5.0", - "neo-async": "^2.5.0", - "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", - "tapable": "^1.1.0", - "terser-webpack-plugin": "^1.1.0", - "watchpack": "^1.5.0", - "webpack-sources": "^1.3.0" - } - }, - "webpack-bundle-analyzer": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.1.0.tgz", - "integrity": "sha512-nyDyWEs7C6DZlgvu1pR1zzJfIWSiGPbtaByZr8q+Fd2xp70FuM/8ngCJzj3Er1TYRLSFmp1F1OInbEm4DZH8NA==", - "dev": true, - "requires": { - "acorn": "^6.0.7", - "acorn-walk": "^6.1.1", - "bfj": "^6.1.1", - "chalk": "^2.4.1", - "commander": "^2.18.0", - "ejs": "^2.6.1", - "express": "^4.16.3", - "filesize": "^3.6.1", - "gzip-size": "^5.0.0", - "lodash": "^4.17.10", - "mkdirp": "^0.5.1", - "opener": "^1.5.1", - "ws": "^6.0.0" - }, - "dependencies": { - "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", - "dev": true - } - } - }, - "webpack-chain": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/webpack-chain/-/webpack-chain-4.12.1.tgz", - "integrity": "sha512-BCfKo2YkDe2ByqkEWe1Rw+zko4LsyS75LVr29C6xIrxAg9JHJ4pl8kaIZ396SUSNp6b4815dRZPSTAS8LlURRQ==", - "dev": true, - "requires": { - "deepmerge": "^1.5.2", - "javascript-stringify": "^1.6.0" - } - }, - "webpack-dev-middleware": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.6.1.tgz", - "integrity": "sha512-XQmemun8QJexMEvNFbD2BIg4eSKrmSIMrTfnl2nql2Sc6OGAYFyb8rwuYrCjl/IiEYYuyTEiimMscu7EXji/Dw==", - "dev": true, - "requires": { - "memory-fs": "^0.4.1", - "mime": "^2.3.1", - "range-parser": "^1.0.3", - "webpack-log": "^2.0.0" - } - }, - "webpack-dev-server": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.2.1.tgz", - "integrity": "sha512-sjuE4mnmx6JOh9kvSbPYw3u/6uxCLHNWfhWaIPwcXWsvWOPN+nc5baq4i9jui3oOBRXGonK9+OI0jVkaz6/rCw==", - "dev": true, - "requires": { - "ansi-html": "0.0.7", - "bonjour": "^3.5.0", - "chokidar": "^2.0.0", - "compression": "^1.5.2", - "connect-history-api-fallback": "^1.3.0", - "debug": "^4.1.1", - "del": "^3.0.0", - "express": "^4.16.2", - "html-entities": "^1.2.0", - "http-proxy-middleware": "^0.19.1", - "import-local": "^2.0.0", - "internal-ip": "^4.2.0", - "ip": "^1.1.5", - "killable": "^1.0.0", - "loglevel": "^1.4.1", - "opn": "^5.1.0", - "portfinder": "^1.0.9", - "schema-utils": "^1.0.0", - "selfsigned": "^1.9.1", - "semver": "^5.6.0", - "serve-index": "^1.7.2", - "sockjs": "0.3.19", - "sockjs-client": "1.3.0", - "spdy": "^4.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^6.1.0", - "url": "^0.11.0", - "webpack-dev-middleware": "^3.5.1", - "webpack-log": "^2.0.0", - "yargs": "12.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", - "ajv-keywords": "^3.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "webpack-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz", - "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==", - "dev": true, - "requires": { - "ansi-colors": "^3.0.0", - "uuid": "^3.3.2" - } - }, - "webpack-merge": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.1.tgz", - "integrity": "sha512-4p8WQyS98bUJcCvFMbdGZyZmsKuWjWVnVHnAS3FFg0HDaRVrPbkivx2RYCre8UiemD67RsiFFLfn4JhLAin8Vw==", - "dev": true, - "requires": { - "lodash": "^4.17.5" - } - }, - "webpack-sources": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", - "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", - "dev": true, - "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "websocket-driver": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", - "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", - "dev": true, - "requires": { - "http-parser-js": ">=0.4.0", - "websocket-extensions": ">=0.1.1" - } - }, - "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "worker-farm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", - "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", - "dev": true, - "requires": { - "errno": "~0.1.7" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "dev": true, - "optional": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, - "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - }, - "xregexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", - "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true - }, - "yargs": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz", - "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^2.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^10.1.0" - } - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - } - } - }, - "yorkie": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yorkie/-/yorkie-2.0.0.tgz", - "integrity": "sha512-jcKpkthap6x63MB4TxwCyuIGkV0oYP/YRyuQU5UO0Yz/E/ZAu+653/uov+phdmO54n6BcvFRyyt0RRrWdN2mpw==", - "dev": true, - "requires": { - "execa": "^0.8.0", - "is-ci": "^1.0.10", - "normalize-path": "^1.0.0", - "strip-indent": "^2.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "normalize-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", - "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - } - } -} diff --git a/vue/package.json b/vue/package.json deleted file mode 100644 index 67270852..00000000 --- a/vue/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "hsadmin-vue", - "version": "0.1.0", - "private": true, - "scripts": { - "serve": "vue-cli-service serve", - "build": "vue-cli-service build", - "lint": "vue-cli-service lint" - }, - "dependencies": { - "axios": "^0.18.0", - "core-js": "^2.6.5", - "vue": "^2.6.6", - "vue-router": "^3.0.1" - }, - "devDependencies": { - "@vue/cli-plugin-babel": "^3.5.0", - "@vue/cli-plugin-eslint": "^3.5.0", - "@vue/cli-service": "^3.5.0", - "babel-eslint": "^10.0.1", - "eslint": "^5.8.0", - "eslint-plugin-vue": "^5.0.0", - "vue-template-compiler": "^2.5.21" - }, - "eslintConfig": { - "root": true, - "env": { - "node": true - }, - "extends": [ - "plugin:vue/essential", - "eslint:recommended" - ], - "rules": {}, - "parserOptions": { - "parser": "babel-eslint" - } - }, - "postcss": { - "plugins": { - "autoprefixer": {} - } - }, - "browserslist": [ - "> 1%", - "last 2 versions", - "not ie <= 8" - ] -} diff --git a/vue/public/favicon.ico b/vue/public/favicon.ico deleted file mode 100644 index c7b9a43c..00000000 Binary files a/vue/public/favicon.ico and /dev/null differ diff --git a/vue/public/index.html b/vue/public/index.html deleted file mode 100644 index c7a0cb1a..00000000 --- a/vue/public/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - hsadmin-vue - - - -

- - - diff --git a/vue/src/App.vue b/vue/src/App.vue deleted file mode 100644 index d6ffee19..00000000 --- a/vue/src/App.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - diff --git a/vue/src/assets/logo.png b/vue/src/assets/logo.png deleted file mode 100644 index f8748ba0..00000000 Binary files a/vue/src/assets/logo.png and /dev/null differ diff --git a/vue/src/components/EntityList.vue b/vue/src/components/EntityList.vue deleted file mode 100644 index 9f258473..00000000 --- a/vue/src/components/EntityList.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - diff --git a/vue/src/components/HelloWorld.vue b/vue/src/components/HelloWorld.vue deleted file mode 100644 index 879051a2..00000000 --- a/vue/src/components/HelloWorld.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - diff --git a/vue/src/hsadmin.js b/vue/src/hsadmin.js deleted file mode 100644 index 37e5d6e8..00000000 --- a/vue/src/hsadmin.js +++ /dev/null @@ -1,28 +0,0 @@ -import axios from "axios" - -export default class HSAdmin { - constructor(options = {}) { - this._ax = axios.create({ - baseURL: options.baseURL || "http://localhost:45678/api", // TODO: change to production URL - }); - } - - get token() { return this._token; } - - async get(endpoint, config = {}) { - return this._ax.get(endpoint, config); - } - - async post(endpoint, data) { - return this._ax.post(endpoint, data); - } - - async authenticate(user = "admin", pass = "admin") { - const res = await this.post("authenticate", { username: user, password: pass}); - if (!res.data.id_token) { - throw new Error("authentication response is missing id_token value"); - } - this._token = res.data.id_token; - this._ax.defaults.headers.common["Authorization"] = "Bearer " + this._token; - } -} diff --git a/vue/src/main.js b/vue/src/main.js deleted file mode 100644 index 89739e29..00000000 --- a/vue/src/main.js +++ /dev/null @@ -1,10 +0,0 @@ -import Vue from 'vue' -import App from './App.vue' -import router from './router' - -Vue.config.productionTip = false; - -new Vue({ - router, - render: h => h(App) -}).$mount('#app'); diff --git a/vue/src/router.js b/vue/src/router.js deleted file mode 100644 index 70064e57..00000000 --- a/vue/src/router.js +++ /dev/null @@ -1,45 +0,0 @@ -import Vue from 'vue' -import Router from 'vue-router' -import Home from './views/Home.vue' -import HSAdmin from "./hsadmin.js" - -Vue.use(Router); - -const hsa = new HSAdmin({ - baseURL: `http://localhost:${process.env.VUE_APP_API_PORT || 8080}/api`, -}); -const routeProps = (route) => { - return Object.assign({}, route.params,{ - hsadmin: hsa - }); -}; - -export default new Router({ - mode: 'history', - base: process.env.BASE_URL, - routes: [ - { - path: '/', - name: 'home', - component: Home - }, - { - path: "/login", - name: "login", - component: () => import(/* webpackChunkName: "login" */ "./views/Login.vue"), - props: routeProps, - }, - { - path: "/customers", - name: "customers", - component: () => import(/* webpackChunkName: "customers" */ "./views/Customers.vue"), - props: routeProps, - }, - { - path: "/customers/:id", - name: "customer", - component: () => import(/* webpackChunkName: "customers" */ "./views/Customer.vue"), - props: routeProps, - }, - ] -}) diff --git a/vue/src/views/About.vue b/vue/src/views/About.vue deleted file mode 100644 index 3fa28070..00000000 --- a/vue/src/views/About.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/vue/src/views/Customer.vue b/vue/src/views/Customer.vue deleted file mode 100644 index 8bd7b534..00000000 --- a/vue/src/views/Customer.vue +++ /dev/null @@ -1,55 +0,0 @@ - - - diff --git a/vue/src/views/Customers.vue b/vue/src/views/Customers.vue deleted file mode 100644 index 9a81f6d8..00000000 --- a/vue/src/views/Customers.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/vue/src/views/Home.vue b/vue/src/views/Home.vue deleted file mode 100644 index fc2e9402..00000000 --- a/vue/src/views/Home.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/vue/src/views/Login.vue b/vue/src/views/Login.vue deleted file mode 100644 index 3d63616e..00000000 --- a/vue/src/views/Login.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - diff --git a/webpack/logo-jhipster.png b/webpack/logo-jhipster.png deleted file mode 100644 index d8eb48da..00000000 Binary files a/webpack/logo-jhipster.png and /dev/null differ diff --git a/webpack/utils.js b/webpack/utils.js deleted file mode 100644 index 42be7304..00000000 --- a/webpack/utils.js +++ /dev/null @@ -1,30 +0,0 @@ -const fs = require('fs'); -const path = require('path'); - -module.exports = { - parseVersion, - root, - isExternalLib -}; - -// Returns the second occurrence of the version number from `build.gradle` file -function parseVersion() { - const versionRegex = /^version\s*=\s*[',"]([^',"]*)[',"]/gm; // Match and group the version number - const buildGradle = fs.readFileSync('build.gradle', 'utf8'); - return versionRegex.exec(buildGradle)[1]; -} - -const _root = path.resolve(__dirname, '..'); - -function root(args) { - args = Array.prototype.slice.call(arguments, 0); - return path.join.apply(path, [_root].concat(args)); -} - -function isExternalLib(module, check = /node_modules/) { - const req = module.userRequest; - if (typeof req !== 'string') { - return false; - } - return req.search(check) >= 0; -} diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js deleted file mode 100644 index d1402c74..00000000 --- a/webpack/webpack.common.js +++ /dev/null @@ -1,96 +0,0 @@ -const webpack = require('webpack'); -const CopyWebpackPlugin = require('copy-webpack-plugin'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); -const rxPaths = require('rxjs/_esm5/path-mapping'); -const MergeJsonWebpackPlugin = require("merge-jsons-webpack-plugin"); - -const utils = require('./utils.js'); - -module.exports = (options) => ({ - resolve: { - extensions: ['.ts', '.js'], - modules: ['node_modules'], - alias: { - app: utils.root('src/main/webapp/app/'), - ...rxPaths() - } - }, - stats: { - children: false - }, - module: { - rules: [ - { - test: /\.html$/, - loader: 'html-loader', - options: { - minimize: true, - caseSensitive: true, - removeAttributeQuotes:false, - minifyJS:false, - minifyCSS:false - }, - exclude: /(src\/main\/webapp\/index.html)/ - }, - { - test: /\.(jpe?g|png|gif|svg|woff2?|ttf|eot)$/i, - loader: 'file-loader', - options: { - digest: 'hex', - hash: 'sha512', - name: 'content/[hash].[ext]' - } - }, - { - test: /manifest.webapp$/, - loader: 'file-loader', - options: { - name: 'manifest.webapp' - } - }, - // Ignore warnings about System.import in Angular - { test: /[\/\\]@angular[\/\\].+\.js$/, parser: { system: true } }, - ] - }, - plugins: [ - new webpack.DefinePlugin({ - 'process.env': { - NODE_ENV: `'${options.env}'`, - BUILD_TIMESTAMP: `'${new Date().getTime()}'`, - VERSION: `'${utils.parseVersion()}'`, - DEBUG_INFO_ENABLED: options.env === 'development', - // The root URL for API calls, ending with a '/' - for example: `"https://www.jhipster.tech:8081/myservice/"`. - // If this URL is left empty (""), then it will be relative to the current context. - // If you use an API server, in `prod` mode, you will need to enable CORS - // (see the `jhipster.cors` common JHipster property in the `application-*.yml` configurations) - SERVER_API_URL: `''` - } - }), - new CopyWebpackPlugin([ - { from: './node_modules/swagger-ui/dist/css', to: 'swagger-ui/dist/css' }, - { from: './node_modules/swagger-ui/dist/lib', to: 'swagger-ui/dist/lib' }, - { from: './node_modules/swagger-ui/dist/swagger-ui.min.js', to: 'swagger-ui/dist/swagger-ui.min.js' }, - { from: './src/main/webapp/swagger-ui/', to: 'swagger-ui' }, - { from: './src/main/webapp/content/', to: 'content' }, - { from: './src/main/webapp/favicon.ico', to: 'favicon.ico' }, - { from: './src/main/webapp/manifest.webapp', to: 'manifest.webapp' }, - // jhipster-needle-add-assets-to-webpack - JHipster will add/remove third-party resources in this array - { from: './src/main/webapp/robots.txt', to: 'robots.txt' } - ]), - new MergeJsonWebpackPlugin({ - output: { - groupBy: [ - { pattern: "./src/main/webapp/i18n/de/*.json", fileName: "./i18n/de.json" }, - { pattern: "./src/main/webapp/i18n/en/*.json", fileName: "./i18n/en.json" } - // jhipster-needle-i18n-language-webpack - JHipster will add/remove languages in this array - ] - } - }), - new HtmlWebpackPlugin({ - template: './src/main/webapp/index.html', - chunks: ['vendors', 'polyfills', 'main', 'global'], - chunksSortMode: 'manual', - inject: 'body' - }) - ] -}); diff --git a/webpack/webpack.dev.js b/webpack/webpack.dev.js deleted file mode 100644 index 34050138..00000000 --- a/webpack/webpack.dev.js +++ /dev/null @@ -1,132 +0,0 @@ -const webpack = require('webpack'); -const writeFilePlugin = require('write-file-webpack-plugin'); -const webpackMerge = require('webpack-merge'); -const BrowserSyncPlugin = require('browser-sync-webpack-plugin'); -const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); -const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin'); -const SimpleProgressWebpackPlugin = require('simple-progress-webpack-plugin'); -const WebpackNotifierPlugin = require('webpack-notifier'); -const path = require('path'); - -const utils = require('./utils.js'); -const commonConfig = require('./webpack.common.js'); - -const ENV = 'development'; - -module.exports = (options) => webpackMerge(commonConfig({ env: ENV }), { - devtool: 'eval-source-map', - devServer: { - contentBase: './build/www', - proxy: [{ - context: [ - /* jhipster-needle-add-entity-to-webpack - JHipster will add entity api paths here */ - '/api', - '/management', - '/swagger-resources', - '/v2/api-docs', - '/h2-console', - '/auth' - ], - target: `http${options.tls ? 's' : ''}://127.0.0.1:8080`, - secure: false, - changeOrigin: options.tls, - headers: { host: 'localhost:9000' } - }], - stats: options.stats, - watchOptions: { - ignored: /node_modules/ - } - }, - entry: { - polyfills: './src/main/webapp/app/polyfills', - global: './src/main/webapp/content/css/global.css', - main: './src/main/webapp/app/app.main' - }, - output: { - path: utils.root('build/www'), - filename: 'app/[name].bundle.js', - chunkFilename: 'app/[id].chunk.js' - }, - module: { - rules: [{ - test: /\.ts$/, - enforce: 'pre', - loader: 'tslint-loader', - exclude: [/(node_modules)/, new RegExp('reflect-metadata\\' + path.sep + 'Reflect\\.ts')] - }, - { - test: /\.ts$/, - use: [ - 'angular2-template-loader', - { - loader: 'cache-loader', - options: { - cacheDirectory: path.resolve('build/cache-loader') - } - }, - { - loader: 'thread-loader', - options: { - // there should be 1 cpu for the fork-ts-checker-webpack-plugin - workers: require('os').cpus().length - 1 - } - }, - { - loader: 'ts-loader', - options: { - transpileOnly: true, - happyPackMode: true - } - }, - 'angular-router-loader' - ], - exclude: /(node_modules)/ - }, - { - test: /\.css$/, - use: ['to-string-loader', 'css-loader'], - exclude: /(vendor\.css|global\.css)/ - }, - { - test: /(vendor\.css|global\.css)/, - use: ['style-loader', 'css-loader'] - }] - }, - stats: process.env.JHI_DISABLE_WEBPACK_LOGS ? 'none' : options.stats, - plugins: [ - process.env.JHI_DISABLE_WEBPACK_LOGS - ? null - : new SimpleProgressWebpackPlugin({ - format: options.stats === 'minimal' ? 'compact' : 'expanded' - }), - new FriendlyErrorsWebpackPlugin(), - new ForkTsCheckerWebpackPlugin(), - new BrowserSyncPlugin({ - host: 'localhost', - port: 9000, - proxy: { - target: 'http://localhost:9060' - }, - socket: { - clients: { - heartbeatTimeout: 60000 - } - } - }, { - reload: false - }), - new webpack.ContextReplacementPlugin( - /angular(\\|\/)core(\\|\/)/, - path.resolve(__dirname, './src/main/webapp') - ), - new writeFilePlugin(), - new webpack.WatchIgnorePlugin([ - utils.root('src/test'), - ]), - new WebpackNotifierPlugin({ - title: 'JHipster', - contentImage: path.join(__dirname, 'logo-jhipster.png') - }) - ].filter(Boolean), - mode: 'development' -}); diff --git a/webpack/webpack.prod.js b/webpack/webpack.prod.js deleted file mode 100644 index f0be1e74..00000000 --- a/webpack/webpack.prod.js +++ /dev/null @@ -1,125 +0,0 @@ -const webpack = require('webpack'); -const webpackMerge = require('webpack-merge'); -const MiniCssExtractPlugin = require('mini-css-extract-plugin'); -const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); -const Visualizer = require('webpack-visualizer-plugin'); -const MomentLocalesPlugin = require('moment-locales-webpack-plugin'); -const TerserPlugin = require('terser-webpack-plugin'); -const WorkboxPlugin = require('workbox-webpack-plugin'); -const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin; -const path = require('path'); - -const utils = require('./utils.js'); -const commonConfig = require('./webpack.common.js'); - -const ENV = 'production'; - -module.exports = webpackMerge(commonConfig({ env: ENV }), { - // Enable source maps. Please note that this will slow down the build. - // You have to enable it in UglifyJSPlugin config below and in tsconfig-aot.json as well - // devtool: 'source-map', - entry: { - polyfills: './src/main/webapp/app/polyfills', - global: './src/main/webapp/content/css/global.css', - main: './src/main/webapp/app/app.main' - }, - output: { - path: utils.root('build/www'), - filename: 'app/[name].[hash].bundle.js', - chunkFilename: 'app/[id].[hash].chunk.js' - }, - module: { - rules: [{ - test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/, - loader: '@ngtools/webpack' - }, - { - test: /\.css$/, - use: ['to-string-loader', 'css-loader'], - exclude: /(vendor\.css|global\.css)/ - }, - { - test: /(vendor\.css|global\.css)/, - use: [ - MiniCssExtractPlugin.loader, - 'css-loader', - 'postcss-loader' - ] - }] - }, - optimization: { - runtimeChunk: false, - splitChunks: { - cacheGroups: { - commons: { - test: /[\\/]node_modules[\\/]/, - name: 'vendors', - chunks: 'all' - } - } - }, - minimizer: [ - new TerserPlugin({ - parallel: true, - cache: true, - terserOptions: { - ie8: false, - // sourceMap: true, // Enable source maps. Please note that this will slow down the build - compress: { - dead_code: true, - warnings: false, - properties: true, - drop_debugger: true, - conditionals: true, - booleans: true, - loops: true, - unused: true, - toplevel: true, - if_return: true, - inline: true, - join_vars: true - }, - output: { - comments: false, - beautify: false, - indent_level: 2 - } - } - }), - new OptimizeCSSAssetsPlugin({}) - ] - }, - plugins: [ - new MiniCssExtractPlugin({ - // Options similar to the same options in webpackOptions.output - // both options are optional - filename: '[name].[contenthash].css', - chunkFilename: '[id].css' - }), - new MomentLocalesPlugin({ - localesToKeep: [ - 'de', - 'en' - // jhipster-needle-i18n-language-moment-webpack - JHipster will add/remove languages in this array - ] - }), - new Visualizer({ - // Webpack statistics in target folder - filename: '../stats.html' - }), - new AngularCompilerPlugin({ - mainPath: utils.root('src/main/webapp/app/app.main.ts'), - tsConfigPath: utils.root('tsconfig-aot.json'), - sourceMap: true - }), - new webpack.LoaderOptionsPlugin({ - minimize: true, - debug: false - }), - new WorkboxPlugin.GenerateSW({ - clientsClaim: true, - skipWaiting: true, - }) - ], - mode: 'production' -});