diff --git a/CHANGELOG.md b/CHANGELOG.md index 992f2416b2..03e15875c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased ### Added +- Detect renamed files in git and hg diffs ([#1157](https://github.com/scm-manager/scm-manager/pull/1157)) +- ClassLoader and Adapter parameters to typed store apis ([#1111](https://github.com/scm-manager/scm-manager/pull/1111)) + + +### Fixed +- Correctly resolve Links in markdown files ([#1152](https://github.com/scm-manager/scm-manager/pull/1152)) +- Missing copy on write in the data store ([#1155](https://github.com/scm-manager/scm-manager/pull/1155)) +- Resolved conflicting dependencies for scm-webapp ([#1159](https://github.com/scm-manager/scm-manager/pull/1159)) + +## [2.0.0-rc8] - 2020-05-08 +### Added - Add iconStyle + onClick option and story shot for icon component ([#1100](https://github.com/scm-manager/scm-manager/pull/1100)) - Making WebElements (Servlet or Filter) optional by using the `@Requires` annotation ([#1101](https://github.com/scm-manager/scm-manager/pull/1101)) -- ClassLoader and Adapter parameters to typed store apis ([#1111](https://github.com/scm-manager/scm-manager/pull/1111)) +- Add class to manually validate rest data transfer objects with javax validation annotations ([#1114](https://github.com/scm-manager/scm-manager/pull/1114)) +- Missing stories for ui-components ([#1140](https://github.com/scm-manager/scm-manager/pull/1140)) ### Changed - Removed the `requires` attribute on the `@Extension` annotation and instead create a new `@Requires` annotation ([#1097](https://github.com/scm-manager/scm-manager/pull/1097)) +- Update guide to prevent common pitfalls in ui development ([#1107](https://github.com/scm-manager/scm-manager/pull/1107)) +- Use os specific locations for scm home directory ([#1109](https://github.com/scm-manager/scm-manager/pull/1109)) +- Use Library/Logs/SCM-Manager on OSX for logging ([#1109](https://github.com/scm-manager/scm-manager/pull/1109)) +- Cleanup outdated jaxb annotation in scm-core ([#1136](https://github.com/scm-manager/scm-manager/pull/1136)) + +### Fixed +- Protocol URI for git commands under windows ([#1108](https://github.com/scm-manager/scm-manager/pull/1108)) +- Fix usage of invalid cipher algorithm on newer java versions ([#1110](https://github.com/scm-manager/scm-manager/issues/1110),[#1112](https://github.com/scm-manager/scm-manager/pull/1112)) +- Handle obscure line breaks in diff viewer ([#1129](https://github.com/scm-manager/scm-manager/pull/1129)) +- Validate subversion client checksum ([#1113](https://github.com/scm-manager/scm-manager/issues/1113)) +- Fix plugin manage permission ([#1135](https://github.com/scm-manager/scm-manager/pull/1135)) ## [2.0.0-rc7] - 2020-04-09 ### Added diff --git a/Jenkinsfile b/Jenkinsfile index c7dff42e68..0444974f34 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,7 +2,7 @@ // switch back to a stable tag, after pr 22 is mreged an the next version is released // see https://github.com/cloudogu/ces-build-lib/pull/22 -@Library('github.com/cloudogu/ces-build-lib@8e9194e8') +@Library('github.com/cloudogu/ces-build-lib@7a14da6') import com.cloudogu.ces.cesbuildlib.* node('docker') { @@ -81,123 +81,115 @@ node('docker') { ) stage('SonarQube') { - - analyzeWith(mvn) + def sonarQube = new SonarCloud(this, [sonarQubeEnv: 'sonarcloud.io-scm', sonarOrganization: 'scm-manager', integrationBranch: 'develop']) + sonarQube.analyzeWith(mvn) if (!waitForQualityGateWebhookToBeCalled()) { currentBuild.result = 'UNSTABLE' } } - if (isMainBranch() || isReleaseBranch()) { + if (isBuildSuccessful() && (isMainBranch() || isReleaseBranch())) { + def commitHash = git.getCommitHash() - stage('Lifecycle') { - try { - // failBuildOnNetworkError -> so we can catch the exception and neither fail nor make our build unstable - nexusPolicyEvaluation iqApplication: selectedApplication('scm'), iqScanPatterns: [[scanPattern: 'scm-server/target/scm-server-app.zip']], iqStage: 'build', failBuildOnNetworkError: true - } catch (Exception e) { - echo "ERROR: iQ Server policy eval failed. Not marking build unstable for now." - echo "ERROR: iQ Server Exception: ${e.getMessage()}" + def imageVersion = mvn.getVersion() + if (imageVersion.endsWith('-SNAPSHOT')) { + imageVersion = imageVersion.replace('-SNAPSHOT', "-${commitHash.substring(0,7)}-${BUILD_NUMBER}") + } + + stage('Archive') { + archiveArtifacts 'scm-webapp/target/scm-webapp.war' + archiveArtifacts 'scm-server/target/scm-server-app.*' + } + + stage('Maven Deployment') { + // TODO why is the server recreated + // delete appassembler target, because the maven plugin fails to recreate the tar + sh "rm -rf scm-server/target/appassembler" + + // deploy java artifacts + mvn.useDeploymentRepository([ + id: 'packages.scm-manager.org', + url: 'https://packages.scm-manager.org', + credentialsId: 'maven.scm-manager.org', + snapshotRepository: '/repository/snapshots/', + releaseRepository: '/repository/releases/', + type: 'Configurable' + ]) + mvn.deployToNexusRepository() + + // deploy frontend bits + withCredentials([string(credentialsId: 'cesmarvin_npm_token', variable: 'NPM_TOKEN')]) { + writeFile encoding: 'UTF-8', file: '.npmrc', text: "//registry.npmjs.org/:_authToken='${NPM_TOKEN}'" + writeFile encoding: 'UTF-8', file: '.yarnrc', text: ''' + registry "https://registry.npmjs.org/" + always-auth true + email cesmarvin@cloudogu.com + '''.trim() + + // we are tricking lerna by pretending that we are not a git repository + sh "mv .git .git.disabled" + try { + mvn "-pl :scm-ui buildfrontend:run@deploy" + } finally { + sh "mv .git.disabled .git" + } } } - if (isBuildSuccessful()) { - - def commitHash = git.getCommitHash() - - def imageVersion = mvn.getVersion() - if (imageVersion.endsWith('-SNAPSHOT')) { - imageVersion = imageVersion.replace('-SNAPSHOT', "-${commitHash.substring(0,7)}-${BUILD_NUMBER}") - } - - stage('Archive') { - archiveArtifacts 'scm-webapp/target/scm-webapp.war' - archiveArtifacts 'scm-server/target/scm-server-app.*' - } - - stage('Maven Deployment') { - // TODO why is the server recreated - // delete appassembler target, because the maven plugin fails to recreate the tar - sh "rm -rf scm-server/target/appassembler" - - // deploy java artifacts - mvn.useRepositoryCredentials([id: 'maven.scm-manager.org', url: 'https://maven.scm-manager.org/nexus', credentialsId: 'maven.scm-manager.org', type: 'Nexus2']) - mvn.deployToNexusRepository() - - // deploy frontend bits - withCredentials([string(credentialsId: 'cesmarvin_npm_token', variable: 'NPM_TOKEN')]) { - writeFile encoding: 'UTF-8', file: '.npmrc', text: "//registry.npmjs.org/:_authToken='${NPM_TOKEN}'" - writeFile encoding: 'UTF-8', file: '.yarnrc', text: ''' - registry "https://registry.npmjs.org/" - always-auth true - email cesmarvin@cloudogu.com - '''.trim() - - // we are tricking lerna by pretending that we are not a git repository - sh "mv .git .git.disabled" - try { - mvn "-pl :scm-ui buildfrontend:run@deploy" - } finally { - sh "mv .git.disabled .git" - } - } - } - - stage('Docker') { - docker.withRegistry('', 'hub.docker.com-cesmarvin') { - // push to cloudogu repository for internal usage - def image = docker.build('cloudogu/scm-manager') + stage('Docker') { + docker.withRegistry('', 'hub.docker.com-cesmarvin') { + // push to cloudogu repository for internal usage + def image = docker.build('cloudogu/scm-manager') + image.push(imageVersion) + image.push("latest") + if (isReleaseBranch()) { + // push to official repository + image = docker.build('scmmanager/scm-manager') image.push(imageVersion) - image.push("latest") - if (isReleaseBranch()) { - // push to official repository - image = docker.build('scmmanager/scm-manager') - image.push(imageVersion) - } } } + } - stage('Presentation Environment') { - build job: 'scm-manager/next-scm.cloudogu.com', propagate: false, wait: false, parameters: [ - string(name: 'changeset', value: commitHash), - string(name: 'imageTag', value: imageVersion) - ] - } + stage('Presentation Environment') { + build job: 'scm-manager/next-scm.cloudogu.com', propagate: false, wait: false, parameters: [ + string(name: 'changeset', value: commitHash), + string(name: 'imageTag', value: imageVersion) + ] + } - if (isReleaseBranch()) { - stage('Update Repository') { + if (isReleaseBranch()) { + stage('Update Repository') { - // merge changes into develop - sh "git checkout develop" - // TODO what if we have a conflict - // e.g.: someone has edited the changelog during the release - sh "git merge master" + // merge changes into develop + sh "git checkout develop" + // TODO what if we have a conflict + // e.g.: someone has edited the changelog during the release + sh "git merge master" - // set versions for maven packages - mvn "build-helper:parse-version versions:set -DgenerateBackupPoms=false -DnewVersion='\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.0-SNAPSHOT'" + // set versions for maven packages + mvn "build-helper:parse-version versions:set -DgenerateBackupPoms=false -DnewVersion='\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.0-SNAPSHOT'" - // set versions for ui packages - mvn "-pl :scm-ui buildfrontend:run@set-version" + // set versions for ui packages + mvn "-pl :scm-ui buildfrontend:run@set-version" - // stage pom changes - sh "git status --porcelain | sed s/^...// | grep pom.xml | xargs git add" - // stage package.json changes - sh "git status --porcelain | sed s/^...// | grep package.json | xargs git add" - // stage lerna.json changes - sh "git add lerna.json" + // stage pom changes + sh "git status --porcelain | sed s/^...// | grep pom.xml | xargs git add" + // stage package.json changes + sh "git status --porcelain | sed s/^...// | grep package.json | xargs git add" + // stage lerna.json changes + sh "git add lerna.json" - // commit changes - sh "git -c user.name='CES Marvin' -c user.email='cesmarvin@cloudogu.com' commit -m 'prepare for next development iteration'" + // commit changes + sh "git -c user.name='CES Marvin' -c user.email='cesmarvin@cloudogu.com' commit -m 'prepare for next development iteration'" - // push changes back to remote repository - withCredentials([usernamePassword(credentialsId: 'cesmarvin-github', usernameVariable: 'GIT_AUTH_USR', passwordVariable: 'GIT_AUTH_PSW')]) { - sh "git -c credential.helper=\"!f() { echo username='\$GIT_AUTH_USR'; echo password='\$GIT_AUTH_PSW'; }; f\" push origin master --tags" - sh "git -c credential.helper=\"!f() { echo username='\$GIT_AUTH_USR'; echo password='\$GIT_AUTH_PSW'; }; f\" push origin develop --tags" - sh "git -c credential.helper=\"!f() { echo username='\$GIT_AUTH_USR'; echo password='\$GIT_AUTH_PSW'; }; f\" push origin :${env.BRANCH_NAME}" - } + // push changes back to remote repository + withCredentials([usernamePassword(credentialsId: 'cesmarvin-github', usernameVariable: 'GIT_AUTH_USR', passwordVariable: 'GIT_AUTH_PSW')]) { + sh "git -c credential.helper=\"!f() { echo username='\$GIT_AUTH_USR'; echo password='\$GIT_AUTH_PSW'; }; f\" push origin master --tags" + sh "git -c credential.helper=\"!f() { echo username='\$GIT_AUTH_USR'; echo password='\$GIT_AUTH_PSW'; }; f\" push origin develop --tags" + sh "git -c credential.helper=\"!f() { echo username='\$GIT_AUTH_USR'; echo password='\$GIT_AUTH_PSW'; }; f\" push origin :${env.BRANCH_NAME}" } } - } } } @@ -214,6 +206,7 @@ Maven setupMavenBuild() { def logConf = "scm-webapp/src/main/resources/logback.ci.xml" mvn.additionalArgs += " -Dlogback.configurationFile=${logConf}" mvn.additionalArgs += " -Dscm-it.logbackConfiguration=${logConf}" + mvn.additionalArgs += " -Dsonar.coverage.exclusions=**/*.test.ts,**/*.test.tsx,**/*.stories.tsx" if (isMainBranch() || isReleaseBranch()) { // Release starts javadoc, which takes very long, so do only for certain branches @@ -224,34 +217,6 @@ Maven setupMavenBuild() { return mvn } -void analyzeWith(Maven mvn) { - - withSonarQubeEnv('sonarcloud.io-scm') { - - String mvnArgs = "${env.SONAR_MAVEN_GOAL} " + - "-Dsonar.host.url=${env.SONAR_HOST_URL} " + - "-Dsonar.login=${env.SONAR_AUTH_TOKEN} " - - if (isPullRequest()) { - echo "Analysing SQ in PR mode" - mvnArgs += "-Dsonar.pullrequest.base=${env.CHANGE_TARGET} " + - "-Dsonar.pullrequest.branch=${env.CHANGE_BRANCH} " + - "-Dsonar.pullrequest.key=${env.CHANGE_ID} " + - "-Dsonar.pullrequest.provider=bitbucketcloud " + - "-Dsonar.pullrequest.bitbucketcloud.owner=sdorra " + - "-Dsonar.pullrequest.bitbucketcloud.repository=scm-manager " + - "-Dsonar.cpd.exclusions=**/*StoreFactory.java,**/*UserPassword.js " - } else { - mvnArgs += " -Dsonar.branch.name=${env.BRANCH_NAME} " - if (!isMainBranch()) { - // Avoid exception "The main branch must not have a target" on main branch - mvnArgs += " -Dsonar.branch.target=${mainBranch} " - } - } - mvn "${mvnArgs}" - } -} - boolean isReleaseBranch() { return env.BRANCH_NAME.startsWith("release/"); } @@ -266,7 +231,7 @@ boolean isMainBranch() { boolean waitForQualityGateWebhookToBeCalled() { boolean isQualityGateSucceeded = true - timeout(time: 5, unit: 'MINUTES') { // Needed when there is no webhook for example + timeout(time: 10, unit: 'MINUTES') { // Needed when there is no webhook for example def qGate = waitForQualityGate() echo "SonarQube Quality Gate status: ${qGate.status}" if (qGate.status != 'OK') { diff --git a/docs/ExtensionPoints.md b/docs/ExtensionPoints.md deleted file mode 100644 index 1c740fd772..0000000000 --- a/docs/ExtensionPoints.md +++ /dev/null @@ -1,18 +0,0 @@ -# Extension Points - -- [AuthenticationHandler](http://docs.scm-manager.org/apidocs/latest/sonia/scm/web/security/AuthenticationHandler.html) -- [AuthenticationListener](http://docs.scm-manager.org/apidocs/latest/sonia/scm/web/security/AuthenticationListener.html) -- [ChangesetPreProcessor](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/ChangesetPreProcessor.html) -- [ChangesetPreProcessorFactory](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/ChangesetPreProcessorFactory.html) -- [FileObjectPreProcessor](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/FileObjectPreProcessor.html) -- [FileObjectPreProcessorFactory](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/FileObjectPreProcessorFactory.html) -- [FileSystem](http://docs.scm-manager.org/apidocs/latest/sonia/scm/io/FileSystem.html) -- [GroupListener](http://docs.scm-manager.org/apidocs/latest/sonia/scm/group/GroupListener.html) -- [Module](http://google-guice.googlecode.com/svn/tags/3.0/javadoc/com/google/inject/Module.html) -- [RepositoryHandler](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/RepositoryHandler.html) -- [RepositoryHook](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/RepositoryHook.html) -- [RepositoryListener](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/RepositoryListener.html) -- [RepositoryRequestListener](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/RepositoryRequestListener.html) -- [ResourceHandler](http://docs.scm-manager.org/apidocs/latest/sonia/scm/resources/ResourceHandler.html) -- [ServletModule](http://google-guice.googlecode.com/svn/tags/3.0/javadoc/com/google/inject/servlet/ServletModule.html) -- [UserListener](http://docs.scm-manager.org/apidocs/latest/sonia/scm/user/UserListener.html) diff --git a/docs/Home.md b/docs/Home.md deleted file mode 100644 index 6028e50499..0000000000 --- a/docs/Home.md +++ /dev/null @@ -1,103 +0,0 @@ -The easiest way to share and manage your Git, Mercurial and Subversion -repositories over http. - -- Very easy installation -- No need to hack configuration files, SCM-Manager is completely - configureable from its Web-Interface -- No Apache and no database installation is required -- Central user, group and permission management -- Out of the box support for Git, Mercurial and Subversion -- Full RESTFul Web Service API (JSON and XML) -- Rich User Interface -- Simple Plugin API -- Useful plugins available ( f.e. Ldap-, ActiveDirectory-, - PAM-Authentication) -- Licensed under the MIT-License - -### News - -- **2018-09-25** - [SCM-Manager 2 gets a boost by Cloudogu GmbH](https://www.scm-manager.org/scm-manager-2/scm-manager-2-gets-a-boost-by-cloudogu-gmbh/) -- **2018-05-04** - SCM-Manager 1.60 released ([download](http://www.scm-manager.org/download/) \| - [release notes](release-notes.md)) -- **2018-04-11** - SCM-Manager 1.59 released - -[All news](http://www.scm-manager.org/news/) - -### Mailing List - -- - - [archive](http://groups.google.com/group/scmmanager) \| - [subscribe](mailto:scmmanager+subscribe@googlegroups.com) - \| - [unsubscribe](mailto:scmmanager+unsubscribe@googlegroups.com) - -### Use SCM-Manager - -- [Getting started](getting-started.md) -- [Download latest version](http://www.scm-manager.org/download/) -- [Frequently Asked Questions](faq.md) -- [Upgrade SCM-Manager to a newer version](upgrade.md) -- [Download latest snapshot release](download-snapshot-release.md) -- [Download Archive](download-archive.md) -- [Command line client](command-line-client.md) -- [SCM-Server SSL](scm-server-ssl.md) -- [ApplicationServer (Tomcat/Glassfish/Jetty)](applicationserver.md) -- [Using SCM-Manager with Apache mod\_proxy](apache/apache-mod_proxy.md) -- [Using SCM-Manager with Nginx](nginx.md) -- [Using SCM-Manager with IIS (Helicon)](iis-helicon.md) -- [Permissions](Permissions.md) -- [Plugins](http://plugins.scm-manager.org/scm-plugin-backend/page/index.html) -- [Revision Control Plugin Comparison](rv-plugin-comparison.md) -- [Screenshots](http://www.scm-manager.org/screenshots/) -- [Mercurial Subrepositories](subrepositories.md) -- [Unix Daemons and Windows Services](daemons.md) -- [RPM and DEB packages](RPM%20and%20DEB%20packages.md) -- [Build windows mercurial packages for SCM-Manager](https://bitbucket.org/sdorra/build-win-hg-packages) - -### Plugin documentation - -- [Active Directory Plugin](active-directory-plugin.md) -- [Branch Write Protect Plugin](branchwp-plugin.md) -- [Jenkins Plugin](jenkins-plugin.md) -- [Jira Plugin](jira-plugin.md) -- [Mail Plugin](mail-plugin.md) -- [Path Write Protect Plugin](pathwp-plugin.md) -- [Redmine Plugin](redmine-plugin.md) -- [Scheduler Plugin](scheduler-plugin.md) -- [Trac Plugin](trac-plugin.md) -- [WebHook Plugin](webhook-plugin.md) - -### Development - -- [Building SCM-Manager from source](build-from-source.md) -- [Java Client API](java-client-api.md) -- [Code Snippets](code-snippets.md) -- [Configuring Eclipse projects for SCM-Manager](configure-eclipse.md) -- [Plugin Descriptor](plugin-descriptor.md) -- [ExtensionPoints](ExtensionPoints.md) -- [How to create your own plugin](howto-create-a-plugin.md) -- [Injection Objects](injectionObjects.md) -- [API documentation](http://docs.scm-manager.org/apidocs/latest/) -- [WebService documentation](http://docs.scm-manager.org/restdocs/current/) - -### SCM Manager 2 - -- [Getting started](v2/getting-started.md) -- [Configuration for Intellij IDEA](v2/intellij-idea-configuration.md) -- [SCM v2 Test Cases](v2/test-cases.md) -- [Table of decisions made during development](v2/decision-table.md) -- [Definition of done](definition-of-done.md) -- [Style Guide](v2/style-guide.md) -- [Error Handling in REST, Java, UI](v2/error-handling.md) -- [Create a new Plugin](v2/create-plugin.md) -- [Migration Wizard](v2/migration-wizard.md) -- [Plugin Development](v2/plugin-development.md) -- [i18n for Plugins](v2/i18n-for-plugins.md) -- [Extension Points](v2/extension-points.md) -- [Migrate Plugin from v1](v2/migrate-plugin-from-v1.md) -- [API changes](v2/api-changes.md) -- [Permission concept](v2/permission-concept.md) -- [Vulnerabilities](v2/vulnerabilities.md) -- [Common pitfall](v2/common-pitfall.md) -- [Release process](v2/release-process.md) -- [Known Issues](v2/known-issues.md) diff --git a/docs/Notes and considerations for 2.0.md b/docs/Notes and considerations for 2.0.md deleted file mode 100644 index 208dd5651e..0000000000 --- a/docs/Notes and considerations for 2.0.md +++ /dev/null @@ -1 +0,0 @@ -Moved to [State of SCM-Manager 2 development](State of SCM-Manager 2 development.md) diff --git a/docs/Permissions.md b/docs/Permissions.md deleted file mode 100644 index a001b4c9a8..0000000000 --- a/docs/Permissions.md +++ /dev/null @@ -1,29 +0,0 @@ -## Permissions - -SCM-Manager knows three different types of repository permissions: - -Type | Description ------ | ---------- -READ | The user is able to read -WRITE | The user is able to read and write -OWNER | The user is able to read, write and to manager permissions - -Repository permissions can be assigned to users and groups. The permissions can be assigned -to only one repository or to each repository. Administrators have owner permissions on every repository. - -### Repository permissions - -Repository permissions can be managed by administrators and by repository owners. -The permissions can be managed on the permission tab of each repository. - -![repository permissions](screenshots/permissions_repository.png "repository permissions") - -### Global permissions - -Global permissions are only manageable by administrators. They can be managed at *Security -> Users* or *Security -> Groups*. - -![global permissions](screenshots/permissions_global.png "global permissions") - -### Administrators - -Administrators can mark other users as administrators at *Security -> Users*. diff --git a/docs/RPM and DEB packages.md b/docs/RPM and DEB packages.md deleted file mode 100644 index 03ccd1b940..0000000000 --- a/docs/RPM and DEB packages.md +++ /dev/null @@ -1,71 +0,0 @@ -# RPM and DEB packages - -Since version 1.39, SCM-Manager is delivered as RPM and DEB package. The package are generated with the [nativepkg-maven-plugin](https://github.com/sdorra/nativepkg-maven-plugin). The following table shows the directory structure which will be created by the packages: - -File | Description ---- | --- -/opt/scm-server | Main directory for scm-server installation -/etc/default/scm-server | Default settings for scm-server -/etc/init.d/scm-server | Start script for scm-server -/var/cache/scm/work | Cache directory -/var/log/scm | Logging directory -/var/lib/scm | SCM-Manager home directory - -The package will create a user and group which are called scm. The scm user will be the owner of the process. The init script uses jsvc to start the scm-server process, which makes it possible to run scm-server on port 80 without running it as root user. The main settings for the server process are stored at /etc/default/scm-server. - -## Installation - -### RPM - -The RPM package is tested with Fedora and Centos. Create a new files at /etc/yum.repos.d/SCM-Manager.repo with the following content to install the scm-manager repository: - -```text -[scm-releases] -name=SCM-Manager Releases -baseurl=http://maven.scm-manager.org/nexus/content/repositories/releases -enabled=1 -protect=0 -gpgcheck=0 -metadata_expire=30s -autorefresh=1 -type=rpm-md -``` - -After file creation execute the following command to install scm-server: - - -```bash -# install the scm-server package -sudo yum install scm-server -``` - -### DEB - -The DEB package is tested with Debian and Ubuntu. Execute the following commands to install scm-server: - -```bash -# add the scm-manager repository -echo "echo 'deb http://maven.scm-manager.org/nexus/content/repositories/releases ./' >> /etc/apt/sources.list" | sudo sh - -# install gpg key for the scm-manager repository -sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 D742B261 - -# update -sudo apt-get update - -# install scm-server -sudo apt-get install scm-server -``` - -## Migration from ApplicationServer or Standalone version - -To migrate from an existing installation, you have to the following steps: - -* Stop the old service -* Move the folder /opt/scm-server, if it exists -* Install the package -* Copy the content of your existing scm home directory to /var/lib/scm -* Change the owner of the directory and all containing files to scm:scm (chown -R scm:scm /var/lib/scm) -* Verify *repositoryDirectory* in /var/lib/scm/config/[git|hg|svn].xml], make sure they point to respective /var/lib/scm/repositories/[git|hg|svn] and not your old location. Otherwise the repository health check will fail. -* Optional: Reapply changes to /opt/scm-server/conf/server-config.xml and /opt/scm-server/conf/logging.xml -* Start scm-server (/etc/init.d/scm-server start) diff --git a/docs/active-directory-plugin.md b/docs/active-directory-plugin.md deleted file mode 100644 index 3d9bd09685..0000000000 --- a/docs/active-directory-plugin.md +++ /dev/null @@ -1,9 +0,0 @@ -### Active Directory Plugin - -- Connect your Windows machine to your local Active Directory -- Log in as a user of that directory -- Run the scm-server batch file -- Install the active-directory plugin -- Restart the scm-server - -**Note**: Since version 1.7 of the plugin 64bit is supported. diff --git a/docs/applicationserver.md b/docs/applicationserver.md deleted file mode 100644 index fb30079a04..0000000000 --- a/docs/applicationserver.md +++ /dev/null @@ -1,75 +0,0 @@ -# Applicationserver - -## Tomcat - -Mercurial uses very large http headers for branch and head informations. -You have to increase the maxHttpHeaderSize parameter on the connector -configuration. Open the conf/server.xml and add the parameter to your -connector e.g.: - -```xml - -``` - -After changing the configuration you have to restart the tomcat. - -Source: - -**Note**: If you have problems with big mercurial pushes on instances which are newer than tomcat 7.0.55, -you have to increase/disable the maxSwallowSize (see issue [#691](https://github.com/scm-manager/scm-manager/issues/691)). - -#### Access Log - -If you wan\'t like to print the current user in tomcats access log you -could use a valve like the following: - -```xml - -``` - -The pattern **%{principal}r** is responsible for logging the -username to the access log (see issue [#877](https://github.com/scm-manager/scm-manager/issues/877)). - -## GlassFish - -To use SCM-Manager 1.6 and above with GlassFish 3 you have to add a -JVM-Option to the GlassFish configuration to override the jax-rs -packages. Please execute the following commands. - -```bash -# override jax-rs packages -$ bin/asadmin create-jvm-options -Dcom.sun.enterprise.overrideablejavaxpackages=javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext -# increase http header size -$ bin/asadmin set configs.config.default-config.network-config.protocols.protocol.http-listener-1.http.header-buffer-length-bytes=16384 -$ bin/asadmin set configs.config.default-config.network-config.protocols.protocol.http-listener-2.http.header-buffer-length-bytes=16384 -``` - -**Note** Glassfish 3.1.2 and above seems not to work with SCM-Manager. -Please have a look at [QeO-QVX6wmsJ](https://groups.google.com/forum/#!searchin/scmmanager/glassfish/scmmanager/SEbuEU8H-qo/QeO-QVX6wmsJ "Exception deploying to Glassfish 3.1.2"). - -Restart the GlassFish-Server. - -Source: - -## Jetty - -If Jetty returns a HTTP \"413 FULL head\" status, you may want to -further increase the maximum header size. You can configure the limit by -setting the headerBufferSize for the connector you\'re using in the -jetty.xml file: - -```xml - - - - [...] - 32768 - - - -``` diff --git a/docs/architecture/architecture.001.graphml b/docs/architecture/architecture.001.graphml deleted file mode 100644 index 95773ab2cd..0000000000 --- a/docs/architecture/architecture.001.graphml +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Security Filter / Apache Shiro - - - - - - - - - - - - - - - - - - - - Git/Svn/HG - - - - - - - - - - - - - - - - - - - - XML JAXB - - - - - - - - - - - - - - - - - - - - Smart Http -WebDAV DeltaV -CGI - - - - - - - - - - - - - - - - - - - - Browser - - - - - - - - - - - - - - - - - - - - ExtJS - - - - - - - - - - - - - - - - - - - - RestAPI Client - - - - - - - - - - - - - - - - - - - - XML/JSON JAXB - - - - - - - - - - - - - - - - - - - - JAXRS - - - - - - - - - - - - - - - - - - - - RepositoryService - - - - - - - - - - - - - - - - - - - - Manager - - - - - - - - - - - - - - - - - - - - DAO - - - - - - - - - - - - - - - - - - - - Security Filter / Apache Shiro - - - - - - - - - - - - - - - - - - - - Store API - - - - - - - - - - - - - - - - - - - - JGit/Svnkit/JavaHG - - - - - - - - - - - - - - - - - diff --git a/docs/artwork/scm-header.psd b/docs/artwork/scm-header.psd deleted file mode 100644 index 230713ae8c..0000000000 Binary files a/docs/artwork/scm-header.psd and /dev/null differ diff --git a/docs/branchwp-plugin.md b/docs/branchwp-plugin.md deleted file mode 100644 index 9af0d90f65..0000000000 --- a/docs/branchwp-plugin.md +++ /dev/null @@ -1,40 +0,0 @@ -# Branch Write Protect Plugin - -### Installation - -- Login in as administrator -- Open Plugins -- Install scm-branchwp-plugin -- Restart your applicationserver - -### Usage - -After the restart you should see a \"Branch write protect\" tab for each -repository. On this tab you are able to set branch write protections for -users and groups. Here are some rules for the usage of the branchwp -plugin: - -- Administrators and repository owner have always write access. -- Grant write permissions on the \"Permission\" tab for every user or - group who should write to any branch in the repository. -- If the branchwp plugin is enabled, nobody can write to the - repository expect administrators, repository owners and the - specified rules. - -### Notes - -The branchwp plugin works only for Git and Mercurial, for Subversion -have a look at the -[pathwp-plugin](http://plugins.scm-manager.org/scm-plugin-backend/page/detail/sonia.scm.plugins/scm-pathwp-plugin.html). - -Since version 1.2 of the plugin it is possible to define deny -permissions and placeholders for branch names. Deny permissions are -handled always before allow permissions. At the state of version 1.2 the -following placeholders are available: - -- {username} - will be replaced with the username of the current user -- {mail} - will be replaced with the e-mail address of the current - user - -### Known issues -- [#235](https://github.com/scm-manager/scm-manager/issues/235 "branchwp plugin can not use on git") diff --git a/docs/code-snippets.md b/docs/code-snippets.md deleted file mode 100644 index 29e621ec14..0000000000 --- a/docs/code-snippets.md +++ /dev/null @@ -1,11 +0,0 @@ -# Code Snippets - -### User Interface - -- [extend navigation](snippet-extend-navigation.md) -- [add tab to repository configuration](snippet-repository-tab.md) -- [extend global configuration](snippet-config-group.md) - -### Backend - -- [Authentication](snippet-authentication.md) diff --git a/docs/configure-eclipse.md b/docs/configure-eclipse.md deleted file mode 100644 index 8a8d15861d..0000000000 --- a/docs/configure-eclipse.md +++ /dev/null @@ -1,75 +0,0 @@ -# Configure Eclipse - -There are multiple approaches to using Maven projects within Eclipse. If -you use an approach that isn\'t listed here, feel free to add it. - -## Use Maven to generate Eclipse project files - -1. First, [build scm-manager from source](build-from-source.md). -2. Open a shell to the root of your scm-manager source. -3. Run the following command:\ - `mvn eclipse:configure-workspace -Declipse.workspace=YOUR_WORKSPACE_PATH` -4. Run the following command:\ - `mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true` -5. Open Eclipse using the specified workspace. -6. In Eclipse, select the \"File\", \"Import\...\" menu. -7. Select the \"General\", \"Existing Projects into Workspace\" item - and click \"Next\". -8. Click \"Browse\" and select the root of your scm-manager source. -9. All projects will be selected by default. Click \"Finish\". - -### Troubleshooting - -You may encounter an error during the \"eclipse:eclipse\" step that -looks like this: -``` -[INFO] Request to merge when 'filtering' is not identical. Original=resource src -/main/resources: output=target/classes, include=[META-INF/scm/plugin.xml], exclu -de=[**/*.java], test=false, filtering=true, merging with=resource src/main/resou -rces: output=target/classes, include=[], exclude=[META-INF/scm/plugin.xml|**/*.j -ava], test=false, filtering=false -``` - -This error is caused by a bug in version 2.7 and 2.8 of the Maven -eclipse plugin. See below for one workaround. Other discussion of this -issue can be found -[here](http://forums.atlassian.com/thread.jspa?threadID=34952&tstart=1). - -1. Add the following line within the element of your /.m2/settings.xml file:\ - `true` - -1. Add the file /.m2/plugin-registry.xml with the following contents: -```xml - - - - - org.apache.maven.plugins - maven-eclipse-plugin - 2.6 - - 2.7 - 2.8 - - - - -``` - -If you have .project files in any parent directory, the Eclipse import -step will not search beneath that parent for any further projects. -Delete the .project file in the parent and try the import again. - -If you get errors in Eclipse about not finding M2\_REPO, it means that -the eclipse:configure-workspace step didn't work. One cause for this -could be using \"\~\" or other special characters in your workspace path -that the plugin doesn't resolve properly. Either re-run -eclipse:configure-workspace, or manually create a classpath variable -named M2\_REPO pointing to the root of your local maven repository -directory. - -If you get compilation errors on JAXB or ServiceLoader, your Eclipse may -not be configured to use Java 6. diff --git a/docs/daemons.md b/docs/daemons.md deleted file mode 100644 index f17a3d67a6..0000000000 --- a/docs/daemons.md +++ /dev/null @@ -1,33 +0,0 @@ -# Unix Daemons and Windows Services - -**Note**: If you are using a 64Bit operating system you should use a 64Bit JavaVirtualMachine as well -([#74](https://github.com/scm-manager/scm-manager/issues/74) or -[rOL1nJ9DnfI](https://groups.google.com/forum/?fromgroups#!topic/scmmanager/rOL1nJ9DnfI "Can't start scm windows service")). - -### Unix Daemons - -You could run scm-server in background as unix daemon with one simple command: - -```bash -scm-server start -``` - -If you would like to stop the running daemon instance just call: - -```bash -scm-server stop -``` - -### Windows Services - -Register scm-server as Windows service open a console (cmd) as Administrator and execute the following command: - -```bash -scm-server.bat install -``` - -The service is no available in the service control center. You could uninstall the service with the command below: - -```bash -scm-server.bat uninstall -``` diff --git a/docs/download-archive.md b/docs/download-archive.md deleted file mode 100644 index 6f32c556bd..0000000000 --- a/docs/download-archive.md +++ /dev/null @@ -1,769 +0,0 @@ -# Download Archive - -### SCM-Server 1.59 (standalone) - -- [scm-server-1.59-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.59/scm-server-1.59-app.zip) -- [scm-server-1.59-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.59/scm-server-1.59-app.tar.gz) - -### SCM-WebApp 1.59 (Web application archive) - -- [scm-webapp-1.59.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.59/scm-webapp-1.59.war) - -### SCM-Cli-Client 1.59 (Java application archive) - -- [scm-cli-client-1.59-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.59/scm-cli-client-1.59-jar-with-dependencies.jar) - -### SCM-Server 1.58 (standalone) - -- [scm-server-1.58-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.58/scm-server-1.58-app.zip) -- [scm-server-1.58-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.58/scm-server-1.58-app.tar.gz) - -### SCM-WebApp 1.58 (Web application archive) - -- [scm-webapp-1.58.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.58/scm-webapp-1.58.war) - -### SCM-Cli-Client 1.58 (Java application archive) - -- [scm-cli-client-1.58-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.58/scm-cli-client-1.58-jar-with-dependencies.jar) - -### SCM-Server 1.57 (standalone) - -- [scm-server-1.57-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.57/scm-server-1.57-app.zip) -- [scm-server-1.57-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.57/scm-server-1.57-app.tar.gz) - -### SCM-WebApp 1.57 (Web application archive) - -- [scm-webapp-1.57.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.57/scm-webapp-1.57.war) - -### SCM-Cli-Client 1.57 (Java application archive) - -- [scm-cli-client-1.57-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.57/scm-cli-client-1.57-jar-with-dependencies.jar) - -### SCM-Server 1.56 (standalone) - -- [scm-server-1.56-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.56/scm-server-1.56-app.zip) -- [scm-server-1.56-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.56/scm-server-1.56-app.tar.gz) - -### SCM-WebApp 1.56 (Web application archive) - -- [scm-webapp-1.56.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.56/scm-webapp-1.56.war) - -### SCM-Cli-Client 1.56 (Java application archive) - -- [scm-cli-client-1.56-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.56/scm-cli-client-1.56-jar-with-dependencies.jar) - -### SCM-Server 1.55 (standalone) - -- [scm-server-1.55-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.55/scm-server-1.55-app.zip) -- [scm-server-1.55-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.55/scm-server-1.55-app.tar.gz) - -### SCM-WebApp 1.55 (Web application archive) - -- [scm-webapp-1.55.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.55/scm-webapp-1.55.war) - -### SCM-Cli-Client 1.55 (Java application archive) - -- [scm-cli-client-1.55-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.55/scm-cli-client-1.55-jar-with-dependencies.jar) - -### SCM-Server 1.54 (standalone) - -- [scm-server-1.54-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.54/scm-server-1.54-app.zip) -- [scm-server-1.54-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.54/scm-server-1.54-app.tar.gz) - -### SCM-WebApp 1.54 (Web application archive) - -- [scm-webapp-1.54.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.54/scm-webapp-1.54.war) - -### SCM-Cli-Client 1.54 (Java application archive) - -- [scm-cli-client-1.54-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.54/scm-cli-client-1.54-jar-with-dependencies.jar) - -### SCM-Server 1.53 (standalone) - -- [scm-server-1.53-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.53/scm-server-1.53-app.zip) -- [scm-server-1.53-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.53/scm-server-1.53-app.tar.gz) - -### SCM-WebApp 1.53 (Web application archive) - -- [scm-webapp-1.53.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.53/scm-webapp-1.53.war) - -### SCM-Cli-Client 1.53 (Java application archive) - -- [scm-cli-client-1.53-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.53/scm-cli-client-1.53-jar-with-dependencies.jar) - -### SCM-Server 1.52 (standalone) - -- [scm-server-1.52-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.52/scm-server-1.52-app.zip) -- [scm-server-1.52-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.52/scm-server-1.52-app.tar.gz) - -### SCM-WebApp 1.52 (Web application archive) - -- [scm-webapp-1.52.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.52/scm-webapp-1.52.war) - -### SCM-Cli-Client 1.52 (Java application archive) - -- [scm-cli-client-1.52-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.52/scm-cli-client-1.52-jar-with-dependencies.jar) - -### SCM-Server 1.51 (standalone) - -- [scm-server-1.51-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.51/scm-server-1.51-app.zip) -- [scm-server-1.51-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.51/scm-server-1.51-app.tar.gz) - -### SCM-WebApp 1.51 (Web application archive) - -- [scm-webapp-1.51.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.51/scm-webapp-1.51.war) - -### SCM-Cli-Client 1.51 (Java application archive) - -- [scm-cli-client-1.51-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.51/scm-cli-client-1.51-jar-with-dependencies.jar) - -### SCM-Server 1.50 (standalone) - -- [scm-server-1.50-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.50/scm-server-1.50-app.zip) -- [scm-server-1.50-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.50/scm-server-1.50-app.tar.gz) - -### SCM-WebApp 1.50 (Web application archive) - -- [scm-webapp-1.50.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.50/scm-webapp-1.50.war) - -### SCM-Cli-Client 1.50 (Java application archive) - -- [scm-cli-client-1.50-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.50/scm-cli-client-1.50-jar-with-dependencies.jar) - -### SCM-Server 1.49 (standalone) - -- [scm-server-1.49-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.49/scm-server-1.49-app.zip) -- [scm-server-1.49-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.49/scm-server-1.49-app.tar.gz) - -### SCM-WebApp 1.49 (Web application archive) - -- [scm-webapp-1.49.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.49/scm-webapp-1.49.war) - -### SCM-Cli-Client 1.49 (Java application archive) - -- [scm-cli-client-1.49-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.49/scm-cli-client-1.49-jar-with-dependencies.jar) - -### SCM-Server 1.48 (standalone) - -- [scm-server-1.48-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.48/scm-server-1.48-app.zip) -- [scm-server-1.48-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.48/scm-server-1.48-app.tar.gz) - -### SCM-WebApp 1.48 (Web application archive) - -- [scm-webapp-1.48.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.48/scm-webapp-1.48.war) - -### SCM-Cli-Client 1.48 (Java application archive) - -- [scm-cli-client-1.48-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.48/scm-cli-client-1.48-jar-with-dependencies.jar) - -### SCM-Server 1.47 (standalone) - -- [scm-server-1.47-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.47/scm-server-1.47-app.zip) -- [scm-server-1.47-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.47/scm-server-1.47-app.tar.gz) - -### SCM-WebApp 1.47 (Web application archive) - -- [scm-webapp-1.47.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.47/scm-webapp-1.47.war) - -### SCM-Cli-Client 1.47 (Java application archive) - -- [scm-cli-client-1.47-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.47/scm-cli-client-1.47-jar-with-dependencies.jar) - -### SCM-Server 1.46 (standalone) - -- [scm-server-1.46-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.46/scm-server-1.46-app.zip) -- [scm-server-1.46-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.46/scm-server-1.46-app.tar.gz) - -### SCM-WebApp 1.46 (Web application archive) - -- [scm-webapp-1.46.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.46/scm-webapp-1.46.war) - -### SCM-Cli-Client 1.46 (Java application archive) - -- [scm-cli-client-1.46-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.46/scm-cli-client-1.46-jar-with-dependencies.jar) - -### SCM-Server 1.45 (standalone) - -- [scm-server-1.45-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.45/scm-server-1.45-app.zip) -- [scm-server-1.45-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.45/scm-server-1.45-app.tar.gz) - -### SCM-WebApp 1.45 (Web application archive) - -- [scm-webapp-1.45.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.45/scm-webapp-1.45.war) - -### SCM-Cli-Client 1.45 (Java application archive) - -- [scm-cli-client-1.45-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.45/scm-cli-client-1.45-jar-with-dependencies.jar) - -### SCM-Server 1.44 (standalone) - -- [scm-server-1.44-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.44/scm-server-1.44-app.zip) -- [scm-server-1.44-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.44/scm-server-1.44-app.tar.gz) - -### SCM-WebApp 1.44 (Web application archive) - -- [scm-webapp-1.44.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.44/scm-webapp-1.44.war) - -### SCM-Cli-Client 1.44 (Java application archive) - -- [scm-cli-client-1.44-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.44/scm-cli-client-1.44-jar-with-dependencies.jar) - -### SCM-Server 1.43 (standalone) - -- [scm-server-1.43-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.43/scm-server-1.43-app.zip) -- [scm-server-1.43-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.43/scm-server-1.43-app.tar.gz) - -### SCM-WebApp 1.43 (Web application archive) - -- [scm-webapp-1.43.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.43/scm-webapp-1.43.war) - -### SCM-Cli-Client 1.43 (Java application archive) - -- [scm-cli-client-1.43-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.43/scm-cli-client-1.43-jar-with-dependencies.jar) - -### SCM-Server 1.42 (standalone) - -- [scm-server-1.42-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.42/scm-server-1.42-app.zip) -- [scm-server-1.42-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.42/scm-server-1.42-app.tar.gz) - -### SCM-WebApp 1.42 (Web application archive) - -- [scm-webapp-1.42.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.42/scm-webapp-1.42.war) - -### SCM-Cli-Client 1.42 (Java application archive) - -- [scm-cli-client-1.42-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.42/scm-cli-client-1.42-jar-with-dependencies.jar) - -### SCM-Server 1.41 (standalone) - -- [scm-server-1.41-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.41/scm-server-1.41-app.zip) -- [scm-server-1.41-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.41/scm-server-1.41-app.tar.gz) - -### SCM-WebApp 1.41 (Web application archive) - -- [scm-webapp-1.41.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.41/scm-webapp-1.41.war) - -### SCM-Cli-Client 1.41 (Java application archive) - -- [scm-cli-client-1.41-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.41/scm-cli-client-1.41-jar-with-dependencies.jar) - -### SCM-Server 1.40 (standalone) - -- [scm-server-1.40-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.40/scm-server-1.40-app.zip) -- [scm-server-1.40-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.40/scm-server-1.40-app.tar.gz) - -### SCM-WebApp 1.40 (Web application archive) - -- [scm-webapp-1.40.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.40/scm-webapp-1.40.war) - -### SCM-Cli-Client 1.40 (Java application archive) - -- [scm-cli-client-1.40-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.40/scm-cli-client-1.40-jar-with-dependencies.jar) - -### SCM-Server 1.39 (standalone) - -- [scm-server-1.39-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.39/scm-server-1.39-app.zip) -- [scm-server-1.39-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.39/scm-server-1.39-app.tar.gz) - -### SCM-WebApp 1.39 (Web application archive) - -- [scm-webapp-1.39.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.39/scm-webapp-1.39.war) - -### SCM-Cli-Client 1.39 (Java application archive) - -- [scm-cli-client-1.39-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.39/scm-cli-client-1.39-jar-with-dependencies.jar) - -### SCM-Server 1.38 (standalone) - -- [scm-server-1.38-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.38/scm-server-1.38-app.zip) -- [scm-server-1.38-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.38/scm-server-1.38-app.tar.gz) - -### SCM-WebApp 1.38 (Web application archive) - -- [scm-webapp-1.38.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.38/scm-webapp-1.38.war) - -### SCM-Cli-Client 1.38 (Java application archive) - -- [scm-cli-client-1.38-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.38/scm-cli-client-1.38-jar-with-dependencies.jar) - -### SCM-Server 1.37 (standalone) - -- [scm-server-1.37-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.37/scm-server-1.37-app.zip) -- [scm-server-1.37-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.37/scm-server-1.37-app.tar.gz) - -### SCM-WebApp 1.37 (Web application archive) - -- [scm-webapp-1.37.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.37/scm-webapp-1.37.war) - -### SCM-Cli-Client 1.37 (Java application archive) - -- [scm-cli-client-1.37-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.37/scm-cli-client-1.37-jar-with-dependencies.jar) - -### SCM-Server 1.36 (standalone) - -- [scm-server-1.36-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.36/scm-server-1.36-app.zip) -- [scm-server-1.36-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.36/scm-server-1.36-app.tar.gz) - -### SCM-WebApp 1.36 (Web application archive) - -- [scm-webapp-1.36.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.36/scm-webapp-1.36.war) - -### SCM-Cli-Client 1.36 (Java application archive) - -- [scm-cli-client-1.36-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.36/scm-cli-client-1.36-jar-with-dependencies.jar) - -### SCM-Server 1.35 (standalone) - -- [scm-server-1.35-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.35/scm-server-1.35-app.zip) -- [scm-server-1.35-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.35/scm-server-1.35-app.tar.gz) - -### SCM-WebApp 1.35 (Web application archive) - -- [scm-webapp-1.35.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.35/scm-webapp-1.35.war) - -### SCM-Cli-Client 1.35 (Java application archive) - -- [scm-cli-client-1.35-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.35/scm-cli-client-1.35-jar-with-dependencies.jar) - -### SCM-Server 1.34 (standalone) - -- [scm-server-1.34-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.34/scm-server-1.34-app.zip) -- [scm-server-1.34-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.34/scm-server-1.34-app.tar.gz) - -### SCM-WebApp 1.34 (Web application archive) - -- [scm-webapp-1.34.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.34/scm-webapp-1.34.war) - -### SCM-Cli-Client 1.34 (Java application archive) - -- [scm-cli-client-1.34-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.34/scm-cli-client-1.34-jar-with-dependencies.jar) - -### SCM-Server 1.33 (standalone) - -- [scm-server-1.33-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.33/scm-server-1.33-app.zip) -- [scm-server-1.33-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.33/scm-server-1.33-app.tar.gz) - -### SCM-WebApp 1.33 (Web application archive) - -- [scm-webapp-1.33.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.33/scm-webapp-1.33.war) - -### SCM-Cli-Client 1.33 (Java application archive) - -- [scm-cli-client-1.33-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.33/scm-cli-client-1.33-jar-with-dependencies.jar) - -### SCM-Server 1.32 (standalone) - -- [scm-server-1.32-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.32/scm-server-1.32-app.zip) -- [scm-server-1.32-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.32/scm-server-1.32-app.tar.gz) - -### SCM-WebApp 1.32 (Web application archive) - -- [scm-webapp-1.32.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.32/scm-webapp-1.32.war) - -### SCM-Cli-Client 1.32 (Java application archive) - -- [scm-cli-client-1.32-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.32/scm-cli-client-1.32-jar-with-dependencies.jar) - -### SCM-Server 1.31 (standalone) - -- [scm-server-1.31-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.31/scm-server-1.31-app.zip) -- [scm-server-1.31-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.31/scm-server-1.31-app.tar.gz) - -### SCM-WebApp 1.31 (Web application archive) - -- [scm-webapp-1.31.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.31/scm-webapp-1.31.war) - -### SCM-Cli-Client 1.31 (Java application archive) - -- [scm-cli-client-1.31-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.31/scm-cli-client-1.31-jar-with-dependencies.jar) - -### SCM-Server 1.30 (standalone) - -- [scm-server-1.30-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.30/scm-server-1.30-app.zip) -- [scm-server-1.30-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.30/scm-server-1.30-app.tar.gz) - -### SCM-WebApp 1.30 (Web application archive) - -- [scm-webapp-1.30.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.30/scm-webapp-1.30.war) - -### SCM-Cli-Client 1.30 (Java application archive) - -- [scm-cli-client-1.30-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.30/scm-cli-client-1.30-jar-with-dependencies.jar) - -### SCM-Server 1.29 (standalone) - -- [scm-server-1.29-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.29/scm-server-1.29-app.zip) -- [scm-server-1.29-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.29/scm-server-1.29-app.tar.gz) - -### SCM-WebApp 1.29 (Web application archive) - -- [scm-webapp-1.29.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.29/scm-webapp-1.29.war) - -### SCM-Cli-Client 1.29 (Java application archive) - -- [scm-cli-client-1.29-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.29/scm-cli-client-1.29-jar-with-dependencies.jar) - -### SCM-Server 1.28 (standalone) - -- [scm-server-1.28-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.28/scm-server-1.28-app.zip) -- [scm-server-1.28-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.28/scm-server-1.28-app.tar.gz) - -### SCM-WebApp 1.28 (Web application archive) - -- [scm-webapp-1.28.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.28/scm-webapp-1.28.war) - -### SCM-Cli-Client 1.28 (Java application archive) - -- [scm-cli-client-1.28-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.28/scm-cli-client-1.28-jar-with-dependencies.jar) - -### SCM-Server 1.27 (standalone) - -- [scm-server-1.27-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.27/scm-server-1.27-app.zip) -- [scm-server-1.27-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.27/scm-server-1.27-app.tar.gz) - -### SCM-WebApp 1.27 (Web application archive) - -- [scm-webapp-1.27.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.27/scm-webapp-1.27.war) - -### SCM-Cli-Client 1.27 (Java application archive) - -- [scm-cli-client-1.27-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.27/scm-cli-client-1.27-jar-with-dependencies.jar) - -### SCM-Server 1.26 (standalone) - -- [scm-server-1.26-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.26/scm-server-1.26-app.zip) -- [scm-server-1.26-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.26/scm-server-1.26-app.tar.gz) - -### SCM-WebApp 1.26 (Web application archive) - -- [scm-webapp-1.26.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.26/scm-webapp-1.26.war) - -### SCM-Cli-Client 1.26 (Java application archive) - -- [scm-cli-client-1.26-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.26/scm-cli-client-1.26-jar-with-dependencies.jar) - -### SCM-Server 1.25 (standalone) - -- [scm-server-1.25-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.25/scm-server-1.25-app.zip) -- [scm-server-1.25-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.25/scm-server-1.25-app.tar.gz) - -### SCM-WebApp 1.25 (Web application archive) - -- [scm-webapp-1.25.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.25/scm-webapp-1.25.war) - -### SCM-Cli-Client 1.25 (Java application archive) - -- [scm-cli-client-1.25-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.25/scm-cli-client-1.25-jar-with-dependencies.jar) - -### SCM-Server 1.24 (standalone) - -- [scm-server-1.24-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.24/scm-server-1.24-app.zip) -- [scm-server-1.24-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.24/scm-server-1.24-app.tar.gz) - -### SCM-WebApp 1.24 (Web application archive) - -- [scm-webapp-1.24.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.24/scm-webapp-1.24.war) - -### SCM-Cli-Client 1.24 (Java application archive) - -- [scm-cli-client-1.24-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.24/scm-cli-client-1.24-jar-with-dependencies.jar) - -### SCM-Server 1.23 (standalone) - -- [scm-server-1.23-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.23/scm-server-1.23-app.zip) -- [scm-server-1.23-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.23/scm-server-1.23-app.tar.gz) - -### SCM-WebApp 1.23 (Web application archive) - -- [scm-webapp-1.23.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.23/scm-webapp-1.23.war) - -### SCM-Cli-Client 1.23 (Java application archive) - -- [scm-cli-client-1.23-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.23/scm-cli-client-1.23-jar-with-dependencies.jar) - -### SCM-Server 1.22 (standalone) - -- [scm-server-1.22-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.22/scm-server-1.22-app.zip) -- [scm-server-1.22-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.22/scm-server-1.22-app.tar.gz) - -### SCM-WebApp 1.22 (Web application archive) - -- [scm-webapp-1.22.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.22/scm-webapp-1.22.war) - -### SCM-Cli-Client 1.22 (Java application archive) - -- [scm-cli-client-1.22-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.22/scm-cli-client-1.22-jar-with-dependencies.jar) - -### SCM-Server 1.21 (standalone) - -- [scm-server-1.21-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.21/scm-server-1.21-app.zip) -- [scm-server-1.21-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.21/scm-server-1.21-app.tar.gz) - -### SCM-WebApp 1.21 (Web application archive) - -- [scm-webapp-1.21.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.21/scm-webapp-1.21.war) - -### SCM-Cli-Client 1.21 (Java application archive) - -- [scm-cli-client-1.21-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.21/scm-cli-client-1.21-jar-with-dependencies.jar) - -### SCM-Server 1.20 (standalone) - -- [scm-server-1.20-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.20/scm-server-1.20-app.zip) -- [scm-server-1.20-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.20/scm-server-1.20-app.tar.gz) - -### SCM-WebApp 1.20 (Web application archive) - -- [scm-webapp-1.20.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.20/scm-webapp-1.20.war) - -### SCM-Cli-Client 1.20 (Java application archive) - -- [scm-cli-client-1.20-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.20/scm-cli-client-1.20-jar-with-dependencies.jar) - -### SCM-Server 1.19 (standalone) - -- [scm-server-1.19-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.19/scm-server-1.19-app.zip) -- [scm-server-1.19-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.19/scm-server-1.19-app.tar.gz) - -### SCM-WebApp 1.19 (Web application archive) - -- [scm-webapp-1.19.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.19/scm-webapp-1.19.war) - -### SCM-Cli-Client 1.19 (Java application archive) - -- [scm-cli-client-1.19-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.19/scm-cli-client-1.19-jar-with-dependencies.jar) - -### SCM-Server 1.18 (standalone) - -- [scm-server-1.18-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.18/scm-server-1.18-app.zip) -- [scm-server-1.18-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.18/scm-server-1.18-app.tar.gz) - -### SCM-WebApp 1.18 (Web application archive) - -- [scm-webapp-1.18.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.18/scm-webapp-1.18.war) - -### SCM-Cli-Client 1.18 (Java application archive) - -- [scm-cli-client-1.18-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.18/scm-cli-client-1.18-jar-with-dependencies.jar) - -### SCM-Server 1.17 (standalone) - -- [scm-server-1.17-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.17/scm-server-1.17-app.zip) -- [scm-server-1.17-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.17/scm-server-1.17-app.tar.gz) - -### SCM-WebApp 1.17 (Web application archive) - -- [scm-webapp-1.17.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.17/scm-webapp-1.17.war) - -### SCM-Cli-Client 1.17 (Java application archive) - -- [scm-cli-client-1.17-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.17/scm-cli-client-1.17-jar-with-dependencies.jar) - -### SCM-Server 1.16 (standalone) - -- [scm-server-1.16-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.16/scm-server-1.16-app.zip) -- [scm-server-1.16-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.16/scm-server-1.16-app.tar.gz) - -### SCM-WebApp 1.16 (Web application archive) - -- [scm-webapp-1.16.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.16/scm-webapp-1.16.war) - -### SCM-Cli-Client 1.16 (Java application archive) - -- [scm-cli-client-1.16-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.16/scm-cli-client-1.16-jar-with-dependencies.jar) - -### SCM-Server 1.15 (standalone) - -- [scm-server-1.15-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.15/scm-server-1.15-app.zip) -- [scm-server-1.15-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.15/scm-server-1.15-app.tar.gz) - -### SCM-WebApp 1.15 (Web application archive) - -- [scm-webapp-1.15.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.15/scm-webapp-1.15.war) - -### SCM-Cli-Client 1.15 (Java application archive) - -- [scm-cli-client-1.15-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.15/scm-cli-client-1.15-jar-with-dependencies.jar) - -### SCM-Server 1.14 (standalone) - -- [scm-server-1.14-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.14/scm-server-1.14-app.zip) -- [scm-server-1.14-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.14/scm-server-1.14-app.tar.gz) - -### SCM-WebApp 1.14 (Web application archive) - -- [scm-webapp-1.14.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.14/scm-webapp-1.14.war) - -### SCM-Cli-Client 1.14 (Java application archive) - -- [scm-cli-client-1.14-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.14/scm-cli-client-1.14-jar-with-dependencies.jar) - -### SCM-Server 1.13 (standalone) - -- [scm-server-1.13-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.13/scm-server-1.13-app.zip) -- [scm-server-1.13-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.13/scm-server-1.13-app.tar.gz) - -### SCM-WebApp 1.13 (Web application archive) - -- [scm-webapp-1.13.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.13/scm-webapp-1.13.war) - -### SCM-Cli-Client 1.13 (Java application archive) - -- [scm-cli-client-1.13-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.13/scm-cli-client-1.13-jar-with-dependencies.jar) - -### SCM-Server 1.12 (standalone) - -- [scm-server-1.12-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.12/scm-server-1.12-app.zip) -- [scm-server-1.12-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.12/scm-server-1.12-app.tar.gz) - -### SCM-WebApp 1.12 (Web application archive) - -- [scm-webapp-1.12.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.12/scm-webapp-1.12.war) - -### SCM-Cli-Client 1.12 (Java application archive) - -- [scm-cli-client-1.12-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.12/scm-cli-client-1.12-jar-with-dependencies.jar) - -### SCM-Server 1.11 (standalone) - -- [scm-server-1.11-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.11/scm-server-1.11-app.zip) -- [scm-server-1.11-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.11/scm-server-1.11-app.tar.gz) - -### SCM-WebApp 1.11 (Web application archive) - -- [scm-webapp-1.11.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.11/scm-webapp-1.11.war) - -### SCM-Cli-Client 1.11 (Java application archive) - -- [scm-cli-client-1.11-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.11/scm-cli-client-1.11-jar-with-dependencies.jar) - -### SCM-Server 1.10 (standalone) - -- [scm-server-1.10-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.10/scm-server-1.10-app.zip) -- [scm-server-1.10-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.10/scm-server-1.10-app.tar.gz) - -### SCM-WebApp 1.10 (Web application archive) - -- [scm-webapp-1.10.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.10/scm-webapp-1.10.war) - -### SCM-Cli-Client 1.10 (Java application archive) - -- [scm-cli-client-1.10-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.10/scm-cli-client-1.10-jar-with-dependencies.jar) - -### SCM-Server 1.9 (standalone) - -- [scm-server-1.9-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.9/scm-server-1.9-app.zip) -- [scm-server-1.9-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.9/scm-server-1.9-app.tar.gz) - -### SCM-WebApp 1.9 (Web application archive) - -- [scm-webapp-1.9.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.9/scm-webapp-1.9.war) - -### SCM-Cli-Client 1.9 (Java application archive) - -- [scm-cli-client-1.9-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.9/scm-cli-client-1.9-jar-with-dependencies.jar) - -### SCM-Server 1.8 (standalone) - -- [scm-server-1.8-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.8/scm-server-1.8-app.zip) -- [scm-server-1.8-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.8/scm-server-1.8-app.tar.gz) - -### SCM-WebApp 1.8 (Web application archive) - -- [scm-webapp-1.8.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.8/scm-webapp-1.8.war) - -### SCM-Cli-Client 1.8 (Java application archive) - -- [scm-cli-client-1.8-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.8/scm-cli-client-1.8-jar-with-dependencies.jar) - -### SCM-Server 1.7 (standalone) - -- [scm-server-1.7-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.7/scm-server-1.7-app.zip) -- [scm-server-1.7-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.7/scm-server-1.7-app.tar.gz) - -### SCM-WebApp 1.7 (Web application archive) - -- [scm-webapp-1.7.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.7/scm-webapp-1.7.war) - -### SCM-Cli-Client 1.7 (Java application archive) - -- [scm-cli-client-1.7-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.7/scm-cli-client-1.7-jar-with-dependencies.jar) - -### SCM-Server 1.6 (standalone) - -- [scm-server-1.6-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.6/scm-server-1.6-app.zip) -- [scm-server-1.6-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.6/scm-server-1.6-app.tar.gz) - -### SCM-WebApp 1.6 (Web application archive) - -- [scm-webapp-1.6.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.6/scm-webapp-1.6.war) - -### SCM-Cli-Client 1.6 (Java application archive) - -- [scm-cli-client-1.6-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.6/scm-cli-client-1.6-jar-with-dependencies.jar) - -### SCM-Server 1.5 (standalone) - -- [scm-server-1.5-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.5/scm-server-1.5-app.zip) -- [scm-server-1.5-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.5/scm-server-1.5-app.tar.gz) - -### SCM-WebApp 1.5 (Web application archive) - -- [scm-webapp-1.5.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.5/scm-webapp-1.5.war) - -### SCM-Cli-Client 1.5 (Java application archive) - -- [scm-cli-client-1.5-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.5/scm-cli-client-1.5-jar-with-dependencies.jar) - -### SCM-Server 1.4 (standalone) - -- [scm-server-1.4-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.4/scm-server-1.4-app.zip) -- [scm-server-1.4-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.4/scm-server-1.4-app.tar.gz) - -### SCM-WebApp 1.4 (Web application archive) - -- [scm-webapp-1.4.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.4/scm-webapp-1.4.war) - -### SCM-Cli-Client 1.4 (Java application archive) - -- [scm-cli-client-1.4-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.4/scm-cli-client-1.4-jar-with-dependencies.jar) - -### SCM-Server 1.3 (standalone) - -- [scm-server-1.3-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.3/scm-server-1.3-app.zip) -- [scm-server-1.3-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.3/scm-server-1.3-app.tar.gz) - -### SCM-WebApp 1.3 (Web application archive) - -- [scm-webapp-1.3.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.3/scm-webapp-1.3.war) - -### SCM-Cli-Client 1.3 (Java application archive) - -- [scm-cli-client-1.3-jar-with-dependencies.jar](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/clients/scm-cli-client/1.3/scm-cli-client-1.3-jar-with-dependencies.jar) - -### SCM-Server 1.2 (standalone) - -- [scm-server-1.2-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.2/scm-server-1.2-app.zip) -- [scm-server-1.2-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.2/scm-server-1.2-app.tar.gz) - -### SCM-WebApp 1.2 (Web application archive) - -- [scm-webapp-1.2.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.2/scm-webapp-1.2.war) - -### SCM-Server 1.1 (standalone) - -- [scm-server-1.1-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.1/scm-server-1.1-app.zip) -- [scm-server-1.1-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.1/scm-server-1.1-app.tar.gz) - -### SCM-WebApp 1.1 (Web application archive) - -- [scm-webapp-1.1.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.1/scm-webapp-1.1.war) - -### SCM-Server 1.0 (standalone) - -- [scm-server-1.0-app.zip](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.0/scm-server-1.0-app.zip) -- [scm-server-1.0-app.tar.gz](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-server/1.0/scm-server-1.0-app.tar.gz) - -### SCM-WebApp 1.0 (Web application archive) - -- [scm-webapp-1.0.war](http://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-webapp/1.0/scm-webapp-1.0.war) diff --git a/docs/download-snapshot-release.md b/docs/download-snapshot-release.md deleted file mode 100644 index dfba15b96b..0000000000 --- a/docs/download-snapshot-release.md +++ /dev/null @@ -1,13 +0,0 @@ -# Download latest Snapshot release - -### SCM-Server 1.61 SNAPSHOT (standalone) - -- [scm-server](https://repository-scm-manager.forge.cloudbees.com/snapshot/sonia/scm/scm-server/1.61-SNAPSHOT/) - -### SCM-WebApp 1.61 SNAPSHOT (Web application archive) - -- [scm-webapp](https://repository-scm-manager.forge.cloudbees.com/snapshot/sonia/scm/scm-webapp/1.61-SNAPSHOT) - -### SCM-Cli-Client 1.61 SNAPSHOT (Java application archive) - -- [scm-cli-client](https://repository-scm-manager.forge.cloudbees.com/snapshot/sonia/scm/clients/scm-cli-client/1.61-SNAPSHOT/) diff --git a/docs/download.md b/docs/download.md deleted file mode 100644 index 23cd737cb5..0000000000 --- a/docs/download.md +++ /dev/null @@ -1,3 +0,0 @@ -# Download - -The download page has moved to diff --git a/docs/State of SCM-Manager 2 development.md b/docs/en/State of SCM-Manager 2 development.md similarity index 96% rename from docs/State of SCM-Manager 2 development.md rename to docs/en/State of SCM-Manager 2 development.md index b7d2429584..38823de474 100644 --- a/docs/State of SCM-Manager 2 development.md +++ b/docs/en/State of SCM-Manager 2 development.md @@ -1,4 +1,6 @@ -# State of SCM-Manager 2 development +--- +title: State of SCM-Manager 2 development +--- The development of SCM-Manager 2.0.0 is organised in [Trello Boards](https://trello.com/scmmanager). ## [Milestone 1](https://trello.com/b/oit1MD92/scm-manager-2-0-0-milestone-1) diff --git a/docs/command-line-client.md b/docs/en/administration/command-line-client.md similarity index 98% rename from docs/command-line-client.md rename to docs/en/administration/command-line-client.md index 352070bd17..86c4c29671 100644 --- a/docs/command-line-client.md +++ b/docs/en/administration/command-line-client.md @@ -1,4 +1,6 @@ -# Command line client +--- +title: Command line client +--- You can download the command line client from [here](http://www.scm-manager.org/download/) (the scm-cli-client). diff --git a/docs/en/administration/logging.md b/docs/en/administration/logging.md new file mode 100644 index 0000000000..fd371e3bf5 --- /dev/null +++ b/docs/en/administration/logging.md @@ -0,0 +1,17 @@ +--- +title: Logging +--- + +SCM-Manager logs information which can be useful, if the system does not behave as expected. +The logging behavior depends on your operating system and installation. + +| Type of Installation | Logging | +|----------------------|---------| +| Docker | stdout | +| RPM | /var/log/scm | +| DEB | /var/log/scm | +| Unix | $BASEDIR/logs | +| Mac OS X | ~/Library/Logs/SCM-Manager | +| Windows | $BASEDIR\logs | + +The location of the **$BASEDIR** can be found [here](basedirectory). diff --git a/docs/v2/permission-concept.md b/docs/en/administration/permission-concept.md similarity index 98% rename from docs/v2/permission-concept.md rename to docs/en/administration/permission-concept.md index 0ce1ec00e2..cf19bb2fa2 100644 --- a/docs/v2/permission-concept.md +++ b/docs/en/administration/permission-concept.md @@ -1,4 +1,6 @@ -# Permission Concept +--- +title: Permission Concept +--- This documents describes a concept for a fine-grained permission managing via the SCMMv2 UI. @@ -119,11 +121,11 @@ In order to fulfill the requirements, this concept describes The global permission component can be reached from **either user and groups** components navigations. The following mockup shows this in the user component: -![Permissions mockup user](../resources/permissions-mockup-user.jpg) +![Permissions mockup user](docs/en/resources/permissions-mockup-user.jpg) The layout of the permission component UI could look like this: -![Permissions mockup global permissions](../resources/permissions-mockup-global-permissions.jpg) +![Permissions mockup global permissions](docs/en/resources/permissions-mockup-global-permissions.jpg) The UI * queries all available global permissions from the REST API (shiro strings), @@ -139,7 +141,7 @@ permissions (see `PermissionType`). The UI is extended like so: -![Permissions mockup repository permissions](../resources/permissions-mockup-repository-permissions.jpg) +![Permissions mockup repository permissions](docs/en/resources/permissions-mockup-repository-permissions.jpg) #### Existing repository dialog @@ -395,7 +397,7 @@ and write. That is, Internationalization can be handled using the following conventions: -* All permission i18n are described in `plugins.json` (also for core), see [i18n for Plugins](i18n-for-plugins.md) +* All permission i18n are described in `plugins.json` (also for core), see [i18n for Plugins](docs/en/i18n-for-plugins.mdugins.md) * That way the UI for users and groups can find all the translation in the same file * Convention for i18n keys: `permissions.`, containing `displayName` and `description` each. diff --git a/docs/scm-server-ssl.md b/docs/en/administration/scm-server-ssl.md similarity index 99% rename from docs/scm-server-ssl.md rename to docs/en/administration/scm-server-ssl.md index 4f91468cc8..55444d2379 100644 --- a/docs/scm-server-ssl.md +++ b/docs/en/administration/scm-server-ssl.md @@ -1,4 +1,6 @@ -# SCM-Server SSL +--- +title: SCM-Server SSL +--- **Note**: This document describes a ssl configuration with a self-signed certificate diff --git a/docs/apache/apache-mod_jk.md b/docs/en/configuration/apache/apache-mod_jk.md similarity index 93% rename from docs/apache/apache-mod_jk.md rename to docs/en/configuration/apache/apache-mod_jk.md index 5604dd118e..a30d656fd3 100644 --- a/docs/apache/apache-mod_jk.md +++ b/docs/en/configuration/apache/apache-mod_jk.md @@ -1,4 +1,6 @@ -# SCM-Server and Apache mod\_jk +--- +title: SCM-Server and Apache mod_jk +--- ### Apache Configuration ```apache diff --git a/docs/apache/apache-mod_proxy.md b/docs/en/configuration/apache/apache-mod_proxy.md similarity index 97% rename from docs/apache/apache-mod_proxy.md rename to docs/en/configuration/apache/apache-mod_proxy.md index 16e8eaf14d..2913b433ba 100644 --- a/docs/apache/apache-mod_proxy.md +++ b/docs/en/configuration/apache/apache-mod_proxy.md @@ -1,4 +1,6 @@ -# SCM-Server and Apache mod\_proxy +--- +title: SCM-Server and Apache mod_proxy +--- ### Apache configuration diff --git a/docs/apache/config-mod_proxy.png b/docs/en/configuration/apache/config-mod_proxy.png similarity index 100% rename from docs/apache/config-mod_proxy.png rename to docs/en/configuration/apache/config-mod_proxy.png diff --git a/docs/en/configuration/basedirectory.md b/docs/en/configuration/basedirectory.md new file mode 100644 index 0000000000..13d67903f3 --- /dev/null +++ b/docs/en/configuration/basedirectory.md @@ -0,0 +1,47 @@ +--- +title: Base Directory +--- + +The SCM-Manager base directory aka. home directory, +contains all data which is created by SCM-Manager such as repositories and configurations. +The location of the base directory depends on your operating system and type of installation. + +| Type of Installation | Base directory | +|----------------------|----------------| +| Docker | /var/lib/scm | +| RPM | /var/lib/scm | +| DEB | /var/lib/scm | +| Unix | ~/.scm | +| Mac OS X | ~/Library/Application Support/SCM-Manager | +| Windows | %APPDATA%\SCM-Manager | + +## Change base directory location + +The location of the base directory can be changed by using one of the following ways. +The preferences are the following: Properties file over system property over environment variable. + +### Environment variable + +By setting the environment variable **SCM_HOME** e.g.: + +```bash +export SCM_HOME=/home/scm +/opt/scm-server/bin/scm-server +``` + +For rpm and deb installations the variable can be changed via the file `/etc/default/scm-server`. + +## System property + +The path can be changed by setting the system property **scm.home** e.g.: + +```bash +-Dscm.home=/home/scm +``` +## Properties file + +If SCM-Manager finds a file called `scm.properties` on the class path it reads the property `scm.home` e.g.: + +```properties +scm.home=/home/scm +``` diff --git a/docs/en/configuration/index.md b/docs/en/configuration/index.md new file mode 100644 index 0000000000..c858522ba5 --- /dev/null +++ b/docs/en/configuration/index.md @@ -0,0 +1,9 @@ +--- +title: Configuration +partiallyActive: true +--- + +* [Base Directory](basedirectory/) +* [Logging](logging/) +* [SCM-Server and Apache mod\_proxy](apache/apache-mod_proxy/) +* [SCM-Server and Apache mod\_jk](apache/apache-mod_jk/) diff --git a/docs/en/configuration/logging.md b/docs/en/configuration/logging.md new file mode 100644 index 0000000000..8fa707f016 --- /dev/null +++ b/docs/en/configuration/logging.md @@ -0,0 +1,14 @@ +The logging behaviour of SCM-Manager can be configured via an xml file. +The syntax and properties can be found [here](http://logback.qos.ch/manual/configuration.html). +The location of the file depends also on the type of installation. + +| Type of Installation | Path | +|----------------------|---------| +| Docker | /opt/scm-server/conf/logging.xml | +| RPM | /etc/scm/logging.xml | +| DEB | /etc/scm/logging.xml | +| Unix | $EXTRACT_PATH/scm-server/conf/logging.xml | +| Mac OS X | $EXTRACT_PATH/scm-server/conf/logging.xml | +| Windows | $EXTRACT_PATH/scm-server/conf/logging.xml | + +**$EXTRACT_PATH** is the path were you etract the content of the package. diff --git a/docs/v2/decision-table.md b/docs/en/decision-table.md similarity index 99% rename from docs/v2/decision-table.md rename to docs/en/decision-table.md index c38d6cc5dc..b4e5c9ab12 100644 --- a/docs/v2/decision-table.md +++ b/docs/en/decision-table.md @@ -1,4 +1,6 @@ -# Decision Table +--- +title: Decision Table +--- ### Lombok diff --git a/docs/build-from-source.md b/docs/en/development/build-from-source.md similarity index 54% rename from docs/build-from-source.md rename to docs/en/development/build-from-source.md index 4ad9fa7fdd..dd770f0323 100644 --- a/docs/build-from-source.md +++ b/docs/en/development/build-from-source.md @@ -1,18 +1,20 @@ -# Building SCM-Manager from source +--- +title: Building SCM-Manager from source +--- ### Software Requirements -- JDK 1.7 or higher - ([download](http://www.oracle.com/technetwork/java/index.html)) +- JDK 1.8 or higher + ([download](https://openjdk.java.net/install/)) - Maven 3 or higher ([download](http://maven.apache.org/)) - Mercurial ([download](https://www.mercurial-scm.org/)) -### Build SCM-Manager 1.x from source +### Build SCM-Manager 2.x from source ```bash -hg clone https://bitbucket.org/sdorra/scm-manager +hg clone https://github.com/scm-manager/scm-manager.git cd scm-manager -hg update 1.x +git checkout develop mvn clean install ``` @@ -26,15 +28,3 @@ located at **scm-server/target/scm-server-app**. You can also start a dev server using `mvn jetty:run-war -f scm-webapp`. SCM-Manager is served at . - -### REST - -Docs: - -- Create the documentation: `mvn -f scm-webapp compile -P doc` -- The documentation can be found at scm-webapp/target/restdocs - -Note that if using jetty (see above) you have to access - once, to trigger creation of the -`scmadmin` user. Then you can access the REST api directly - diff --git a/docs/definition-of-done.md b/docs/en/development/definition-of-done.md similarity index 95% rename from docs/definition-of-done.md rename to docs/en/development/definition-of-done.md index d5763df698..c37cd0a883 100644 --- a/docs/definition-of-done.md +++ b/docs/en/development/definition-of-done.md @@ -1,4 +1,6 @@ -# Definition of Done +--- +title: Definition of Done +--- * Acceptance criteria are checked manually (from the user's perspective) * Code coverage is checked manually (>= 80% on new code) ([sonarcloud](https://sonarcloud.io/dashboard?id=sonia.scm%3Ascm)) diff --git a/docs/v2/error-handling.md b/docs/en/development/error-handling.md similarity index 99% rename from docs/v2/error-handling.md rename to docs/en/development/error-handling.md index b249ca9f5f..518bd58fad 100644 --- a/docs/v2/error-handling.md +++ b/docs/en/development/error-handling.md @@ -1,4 +1,6 @@ -# Error Handling +--- +title: Error Handling +--- As a highly extensible product, SCM-Manager offers at least three ways to interact with: diff --git a/docs/en/development/i18n.md b/docs/en/development/i18n.md new file mode 100644 index 0000000000..6910f03174 --- /dev/null +++ b/docs/en/development/i18n.md @@ -0,0 +1,121 @@ +--- +title: I18n +subtitle: Howto do internationalization +displayToc: false +--- +SCM-Manager uses [react-i18next](https://react.i18next.com) for internationalization. +The keys for the translation are stored in json files called `plugins.json` at `src/main/resources/locales/`, +followed by a folder for each language (e.g.: en for English, de for German). +The keys should be prefixed with the name of the plugin to avoid collisions e.g.: + +`.../locales/en/plugins.json`: + +```json +{ + "scm-sample-plugin": { + "title": "Sample Title" + } +} +``` + +`.../locales/de/plugins.json`: + +```json +{ + "scm-sample-plugin": { + "title": "Beispiel Titel" + } +} +``` + +The translations keys can now be used with in the frontend. + +**Function Component**: + +```tsx +import React from "react"; +// import hook from react-i18next library +import { useTranslation } from "react-i18next"; + +const Title = () => { + // use hook to obtain translate function for the namespace plugins + const { t } = useTranslation("plugins"); + // use translate function to translate key scm-sample-plugin.title + return

{t("scm-sample-plugin.title")}

; +}; + +export default Title; +``` + +**Class Component**: + +```tsx +import React from "react"; +// import higher order component and types for out Props +import { WithTranslation, withTranslation } from "react-i18next"; + +// extend our props with WithTranslation +type Props = WithTranslation & {}; + +class Title extends React.Component { + + render() { + // get translate function from props + const { t } = this.props; + // use translate function to translate key scm-sample-plugin.title + return

{t("scm-sample-plugin.title")}

; + } + +}; + +// wrap our component with withTranslation for the namespace plugins +export default withTranslation("plugins")(Title); +``` + +If it is required to replace values in the content the `Trans` component can be used. +To achieve this goal we have to add placeholders to our translations e.g.: + +`.../locales/en/plugins.json`: + +```json +{ + "scm-sample-plugin": { + "title": "Sample Title", + "greetings": "<0/> at <1/>" + } +} +``` + +`.../locales/de/plugins.json`: + +```json +{ + "scm-sample-plugin": { + "title": "Beispiel Titel", + "greetings": "<0/> um <1/>" + } +} +``` + +Now we can use the `Trans` component, not we have to specified the namespace with in the key: + +```tsx + +``` + +We can also replace the placeholders with react components: + +```tsx +import {DateFromNow} from "@scm-manager/ui-components"; +... +"Bob"

, + + ]} +/> +``` diff --git a/docs/v2/intellij-idea-configuration.md b/docs/en/development/intellij-idea-configuration.md similarity index 94% rename from docs/v2/intellij-idea-configuration.md rename to docs/en/development/intellij-idea-configuration.md index 8ee624ec5b..f1bdbe155f 100644 --- a/docs/v2/intellij-idea-configuration.md +++ b/docs/en/development/intellij-idea-configuration.md @@ -1,4 +1,6 @@ -# Intellij IDEA Configuration +--- +title: Intellij IDEA Configuration +--- ## Backend @@ -13,7 +15,7 @@ * Add Maven * Name: run-backend * Working directory: ../scm-webapp - * Command line: -DskipTests package jetty:run-war + * Command line: -DskipTests -Dlivereload package jetty:run-war * Editor / Code Style / Java * Tab Imports * Class count to use import with '*': diff --git a/docs/en/development/plugins/architecture.jpg b/docs/en/development/plugins/architecture.jpg new file mode 100644 index 0000000000..8fd77c73b4 Binary files /dev/null and b/docs/en/development/plugins/architecture.jpg differ diff --git a/docs/en/development/plugins/create.md b/docs/en/development/plugins/create.md new file mode 100644 index 0000000000..755f39c509 --- /dev/null +++ b/docs/en/development/plugins/create.md @@ -0,0 +1,22 @@ +--- +title: Create a plugin +subtitle: Create a plugin from Maven Archetype +displayToc: true +--- + +# Requirements + +Be sure you have installed the following software: + +* [Java 8](https://java.com/de/download/) +* [Apache Maven](http://maven.apache.org/) + +# Create the plugin structure + +There is a service which is able to create a skeleton for a new plugin: + +https://create-plugin.scm-manager.org/ + +# Implement your plugin + +... draw the rest of the owl diff --git a/docs/v2/extension-points.md b/docs/en/development/plugins/extension-points.md similarity index 98% rename from docs/v2/extension-points.md rename to docs/en/development/plugins/extension-points.md index 519647cbd6..43492a2931 100644 --- a/docs/v2/extension-points.md +++ b/docs/en/development/plugins/extension-points.md @@ -1,4 +1,6 @@ -# Extension Points +--- +title: Extension Points +--- The following extension points are provided for the frontend: diff --git a/docs/v2/i18n-for-plugins.md b/docs/en/development/plugins/i18n-for-plugins.md similarity index 98% rename from docs/v2/i18n-for-plugins.md rename to docs/en/development/plugins/i18n-for-plugins.md index 12fc8fd28e..2387783a8d 100644 --- a/docs/v2/i18n-for-plugins.md +++ b/docs/en/development/plugins/i18n-for-plugins.md @@ -1,4 +1,6 @@ -# i18n for Plugins +--- +title: i18n for Plugins +--- How to internationalize your own plugin ### Create the plugins.json file diff --git a/docs/v2/migrate-plugin-from-v1.md b/docs/en/development/plugins/migrate-plugin-from-v1.md similarity index 94% rename from docs/v2/migrate-plugin-from-v1.md rename to docs/en/development/plugins/migrate-plugin-from-v1.md index 54c3b7aa44..d05570e6d4 100644 --- a/docs/v2/migrate-plugin-from-v1.md +++ b/docs/en/development/plugins/migrate-plugin-from-v1.md @@ -1,6 +1,8 @@ -# Migrate an v1 plugin +--- +title: Migrate a v1 plugin +--- -Before starting, make sure to read the [Plugin Development](plugin-development.md). +Before starting, make sure to read the [Plugin Development](docs/en/plugin-development.mdpment.md). To migrate an existing SCM-Manager 1.x Plugin, you have to do the following steps: @@ -162,10 +164,10 @@ Some more hints: * For Configuration UIs use [`ConfigurationBinder`](https://github.com/scm-manager/scm-manager/blob/develop/scm-ui/ui-components/src/config/ConfigurationBinder.tsx) - See core plugins Git, Hg, Svn, e.g. [scm-git-plugin/index.ts](https://github.com/scm-manager/scm-manager/blob/develop/scm-plugins/scm-git-plugin/src/main/js/index.ts). Note that `readOnly` property checks if update link is returned by REST resource - * Don't forget [i18n for Plugins](i18n-for-plugins.md) + * Don't forget [i18n for Plugins](docs/en/i18n-for-plugins.mdugins.md) # Further reading -* [scm-manager/ui-extensions README](../../scm-ui/ui-extensions/README.md) - Extension Points within SCM-Manager +* [scm-manager/ui-extensions README](scm-ui/ui-extensions/README.md) - Extension Points within SCM-Manager * [scm-manager/ui-components](https://github.com/scm-manager/scm-manager/tree/develop/scm-ui/ui-components) - Reusable UI components within SCM-Manager * [smp-maven-plugin](https://github.com/scm-manager/smp-maven-plugin) - Plugin that facilitates efficient plugin development for SCMM diff --git a/docs/plugin-descriptor.md b/docs/en/development/plugins/plugin-descriptor.md similarity index 98% rename from docs/plugin-descriptor.md rename to docs/en/development/plugins/plugin-descriptor.md index 53631fa739..8f1a1d26f0 100644 --- a/docs/plugin-descriptor.md +++ b/docs/en/development/plugins/plugin-descriptor.md @@ -1,4 +1,6 @@ -# Plugin Descriptor +--- +title: Plugin Descriptor +--- The plugin descriptor contains informations and instructions for the scm-manager to integrate the plugin. The descriptor is located at diff --git a/docs/v2/plugin-development.md b/docs/en/development/plugins/plugin-development.md similarity index 99% rename from docs/v2/plugin-development.md rename to docs/en/development/plugins/plugin-development.md index 3af76e710f..71aef89591 100644 --- a/docs/v2/plugin-development.md +++ b/docs/en/development/plugins/plugin-development.md @@ -1,4 +1,6 @@ -# SCM-Manager v2 Plugin Development +--- +title: SCM-Manager v2 Plugin Development +--- ## Build and testing diff --git a/docs/en/development/plugins/publish.md b/docs/en/development/plugins/publish.md new file mode 100644 index 0000000000..b485e3ed7d --- /dev/null +++ b/docs/en/development/plugins/publish.md @@ -0,0 +1,42 @@ +--- +title: Publish +subtitle: Publish your Plugin +--- + +If you want to share your plugin with SCM-Manager users, you can publish it to the SCM-Manager Plugin Center by following the steps below. + +* Create a or Git repository for your plugin +* Develop your plugin as described in [Create a plugin](../create/) +* Fork the [Plugin Center Repository](https://github.com/scm-manager/plugin-center) +* Create a folder with the name of your plugin under the `src/plugins` directory +* Put a `index.md` which starts with frontmatter metadata, which describes your plugin e.g.: + +```yaml +--- +name: scm-cas-plugin +displayName: CAS +description: CAS Authentication plugin for version 2.x of SCM-Manager +category: authentication +author: Cloudogu GmbH +--- +``` + +* Document your plugin with [markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) below the frontmatter header +* Commit your work and open a pull request. Put the url to your plugin repository into the description of the pull request. + +After you have opened the pull request. +We will do a few steps to integrate your plugin into the plugin center: + +* We will create a fork of your plugin under the [SCM-Manager Team](https://github.com/scm-manager/) and give your account write permissions +* After that we will create a Jenkins job for your plugin on [oss.cloudogu.com](https://oss.cloudogu.com/jenkins/job/scm-manager/job/scm-manager-bitbucket/) +* At the end we will accept your pull request + +From now on you can work with the repository in the [SCM-Manager Team](https://github.com/scm-manager/). +Every time you release your plugin (push a tag to the repository) the Jenkins job will build your plugin and release it to the plugin center. + + +# Architecture + +The following picture shows the architecture of the involved systems. + +![Architecture](architecture.jpg "Plugin Center Architecture") diff --git a/docs/v2/style-guide.md b/docs/en/development/style-guide.md similarity index 90% rename from docs/v2/style-guide.md rename to docs/en/development/style-guide.md index 41387ae712..9e6f6c4237 100644 --- a/docs/v2/style-guide.md +++ b/docs/en/development/style-guide.md @@ -1,4 +1,6 @@ -# Style Guide +--- +title: Style Guide +--- Starting with version 2 of SCM-Manager we have decided to change the code style and conform to more common rules. Furthermore we abandon the rule, that everything needs to have a javadoc description. Nonetheless we have decided against a "big bang" adaption of the new rule, because this would have lead to enourmous problems for merges from 1.x to 2.x. @@ -8,7 +10,7 @@ Also it is a good guide line to adapt Postel's law: *Be conservative in what you ## Java -Please mind the [EditorConfig](https://editorconfig.org/) file `.editorconfig` in the root of the SCM-Manager and the [configuration guide](intellij-idea-configuration.md) for IntelliJ IDEA. There are plugins for a lot of IDEs and text editors. +Please mind the [EditorConfig](https://editorconfig.org/) file `.editorconfig` in the root of the SCM-Manager and the [configuration guide](docs/en/intellij-idea-configuration.mdation.md) for IntelliJ IDEA. There are plugins for a lot of IDEs and text editors. - Indentation with 2 spaces and no tabs (we have kept this rule from 1.x) - Order of members: diff --git a/docs/en/development/ui-common-pitfall.md b/docs/en/development/ui-common-pitfall.md new file mode 100644 index 0000000000..f9b74cfc41 --- /dev/null +++ b/docs/en/development/ui-common-pitfall.md @@ -0,0 +1,113 @@ +--- +title: Common pitfall occurred while developing the SCM V2 +--- + +## Introduction +There are quite some common pitfalls which can cause an inconsistent or broken ui. +You can avoid most ugly ui glitches and broken surfaces or just improve your frontend code +by asking yourself some questions while building the components. + +## Design +There exists a scm styleguide which can support you build fitting and beautiful ui components. +Find the styleguide in "scm-ui/ui-styles". + +- Have I used the colors from the scm styleguide? +- Have I used familiar fonts which are already in use on this surface? +- Is my component scalable / resizeable? +- What happens if I insert very long / short content? +- Is my component mobile friendly (tablet / smartphone)? +- Does my component fit into the existing surface? +- Does the ui become confusing / overcrowded / ugly because of my component? +- Can I reduce the shown texts and use icons (tooltips) instead? +- Are there enough whitespaces in my component / around my component? +- Have I used translation keys and translated my content at least in german and english? + +## Small, reuseable components +The SCM-Manager provides a storybook which tests many reuseable components with usage examples. +You can also find some more ui components which doesn't have stories yet in "scm-ui/ui-components". +If a component which can be reused is missing, feel free to add it to ui-components. + +- Have I checked ui-components before creating an entirely new component? +- If creating a new component should it be added to ui-components? +- Have I written one or more stories which tests my new component in the storybook? +- Does my component have too much code / logic? Can it be cut down in some smaller components? +- Have I created the new component as a react functional component? + +## Other common errors +### React Component is loaded unexpectedly + +#### Bug + +A react component is updated without any changes in the props or states. + +#### Fix + +Use the [why-did-you-update](https://github.com/maicki/why-did-you-update) library to analyze the causes of the updates. + +A common cause is the definition of [new functions in render()](https://github.com/maicki/why-did-you-update#changes-are-in-functions-only). + +#### Example + +```javascript +class Main extends React.Component { + render() { + const { authenticated, links } = this.props; + const redirectUrlFactory = binder.getExtension("main.redirect", this.props); + + ... + + const ActivityRoute = ({ authenticated, links }: RouteProps) => { + return ( + } + authenticated={authenticated && links.activity.href} + /> + ); + }; + } +} + +binder.bind("main.route", ActivityRoute); +``` + +the definition of the Component like this: + +```javascript +component={() => } +``` + +triggers a re-render because: + +```javascript +() => !== () => +``` + +You can avoid it by binding this function in advance and then reusing it on all renders + +```javascript +class ActivityRoute extends React.Component { + constructor(props: Props) { + super(props); + } + + renderActivity = () => { + const { links } = this.props; + return ; + }; + + render() { + const { authenticated, links } = this.props; + + return ( + + ); + } +} + +binder.bind("main.route", ActivityRoute); +``` diff --git a/docs/v2/ui-dod.md b/docs/en/development/ui-dod.md similarity index 81% rename from docs/v2/ui-dod.md rename to docs/en/development/ui-dod.md index 9b3c0d908b..0f569ba71b 100644 --- a/docs/v2/ui-dod.md +++ b/docs/en/development/ui-dod.md @@ -1,4 +1,6 @@ -# DOD for UI development +--- +title: DOD for UI development +--- Use this as a kind of a checklist whenever you develop something in the UI of SCM-Manager 2.x., regardless whether you are developing core features or plugins. @@ -10,4 +12,4 @@ Use this as a kind of a checklist whenever you develop something in the UI of SC | ☐ | add help icons to input components | | ☐ | not use colors directly, but refer to `is-primary` or `is-warning` | | ☐ | make sure your view works on mobile devices | -| ☐ | document [extension points in wiki](extension-points.md) | +| ☐ | document [extension points in wiki](docs/en/extension-points.mdoints.md) | diff --git a/docs/dtd/plugin/2.0.0-01.dtd b/docs/en/dtd/plugin/2.0.0-01.dtd similarity index 100% rename from docs/dtd/plugin/2.0.0-01.dtd rename to docs/en/dtd/plugin/2.0.0-01.dtd diff --git a/docs/faq.md b/docs/en/faq.md similarity index 98% rename from docs/faq.md rename to docs/en/faq.md index 29aa799bff..5f07c61257 100644 --- a/docs/faq.md +++ b/docs/en/faq.md @@ -1,4 +1,6 @@ -# Frequently Asked Questions +--- +title: Frequently Asked Questions +--- ### What are the username and the password in the default installation? diff --git a/docs/en/index.md b/docs/en/index.md new file mode 100644 index 0000000000..0c9a03bd07 --- /dev/null +++ b/docs/en/index.md @@ -0,0 +1,11 @@ +--- +title: Documentation +subtitle: SCM-Managert Documentation +--- + +This documentation describes the administration and usage of SCM-Manager. + +## Version and language + +The documentation belongs to a specific language and version of SCM-Manager. +You can choose your version and language on the menu to the right. diff --git a/docs/en/installation/docker.md b/docs/en/installation/docker.md new file mode 100644 index 0000000000..75a64d46a2 --- /dev/null +++ b/docs/en/installation/docker.md @@ -0,0 +1,35 @@ +--- +title: Docker +subtitle: Install scm-manager with docker +displayToc: true +--- + +## Quickstart + +```text +docker run --name scm -p 8080:8080 -v scm-home:/var/lib/scm scmmanager/scm-manager:2.0.0-rc5 +``` + +## Persistence + +It is recommended to create a persistent volume for the scm-manager home directory. +This allows scm-manager updates and recreation of the container without lose of data. +The home directory is located at `/var/lib/scm`. +It is recommended to use a volume managed by docker. +If it is required to use a host directory, keep in mind that the scm-manager process is executed with a user which has the id 1000. +So ensure that the user with the uid 1000 can write to the directory e.g.: + +```text +mkdir /scm_home +chown 1000:1000 /scm_home +docker run --name scm -p 8080:8080 -v /scm_home:/var/lib/scm scmmanager/scm-manager:2.0.0-rc5 +``` + +## Exposed Ports + +SCM-Manager exposes its http port on port 8080. +If you want to use the ssh plugin, keep in mind that this plugin requires an extra port (default is 2222). + +```text +docker run --name scm -p 2222:2222 -p 8080:8080 -v scm-home:/var/lib/scm scmmanager/scm-manager:2.0.0-rc5 +``` diff --git a/docs/en/installation/index.md b/docs/en/installation/index.md new file mode 100644 index 0000000000..952c1bd178 --- /dev/null +++ b/docs/en/installation/index.md @@ -0,0 +1,13 @@ +--- +title: Installation +subtitle: Installation of scm-manager +partiallyActive: true +--- + +* [Docker](docker/) +* Kubernetes +* Debian based +* Red Hat based +* [Linux General](linux/) +* Mac OS X +* Windows diff --git a/docs/en/installation/linux.md b/docs/en/installation/linux.md new file mode 100644 index 0000000000..d1cd4a93a8 --- /dev/null +++ b/docs/en/installation/linux.md @@ -0,0 +1,43 @@ +--- +title: Linux +subtitle: General linux installation +displayToc: true +--- +## Requirements + +Ensure that Java JRE is installed at least in version 8. +Recommended is Java 11. + +If you want to use [Mercurial](https://www.mercurial-scm.org/), ensure it is installed on your machine. + +## Installation + +Download [scm-server-2.0.0-rc8-app.tar.gz](https://packages.scm-manager.org/repository/releases/content/sonia/scm/scm-server/2.0.0-rc8/scm-server-2.0.0-rc8-app.tar.gz) +and verify the checksum (sha1: 8bf465525d5a8c5907d1f74096af1783bc0b2fa7). + +```bash +wget https://packages.scm-manager.org/repository/releases/content/sonia/scm/scm-server/2.0.0-rc8/scm-server-2.0.0-rc8-app.tar.gz +echo "8bf465525d5a8c5907d1f74096af1783bc0b2fa7 *scm-server-2.0.0-rc8-app.tar.gz" | sha1sum -c - +``` + +Extract the archive: + +```bash +tar xvfz scm-server-2.0.0-rc8-app.tar.gz -C /opt +``` + +## Start + +The application can be started by using the scm-server script. + +```bash +/opt/scm-server/bin/scm-server +``` + +## Daemonize + +To start the application in background, we can use the `start` parameter. + +```bash +/opt/scm-server/bin/scm-server start +``` diff --git a/docs/nginx.md b/docs/en/installation/nginx.md similarity index 96% rename from docs/nginx.md rename to docs/en/installation/nginx.md index 5b14695c40..b4f68714a0 100644 --- a/docs/nginx.md +++ b/docs/en/installation/nginx.md @@ -1,4 +1,6 @@ -# SCM-Server and Nginx +--- +title: SCM-Server and Nginx +--- ## Nginx configuration diff --git a/docs/v2/known-issues.md b/docs/en/known-issues.md similarity index 98% rename from docs/v2/known-issues.md rename to docs/en/known-issues.md index 7e09dd8ef5..d7fd0f4cec 100644 --- a/docs/v2/known-issues.md +++ b/docs/en/known-issues.md @@ -1,4 +1,6 @@ -# Known Issues +--- +title: Known Issues +--- ## Asnychronous PreReceiveRepositoryHooks do not work with subversion diff --git a/docs/licenses/netbeans/license-SCM-MIT.txt b/docs/en/licenses/netbeans/license-SCM-MIT.txt similarity index 100% rename from docs/licenses/netbeans/license-SCM-MIT.txt rename to docs/en/licenses/netbeans/license-SCM-MIT.txt diff --git a/docs/logo/favicon_16x16px.ico b/docs/en/logo/favicon_16x16px.ico similarity index 100% rename from docs/logo/favicon_16x16px.ico rename to docs/en/logo/favicon_16x16px.ico diff --git a/docs/logo/favicon_16x16px_transparent.ico b/docs/en/logo/favicon_16x16px_transparent.ico similarity index 100% rename from docs/logo/favicon_16x16px_transparent.ico rename to docs/en/logo/favicon_16x16px_transparent.ico diff --git a/docs/logo/scm-manager_logo.ai b/docs/en/logo/scm-manager_logo.ai similarity index 100% rename from docs/logo/scm-manager_logo.ai rename to docs/en/logo/scm-manager_logo.ai diff --git a/docs/logo/scm-manager_logo.jpg b/docs/en/logo/scm-manager_logo.jpg similarity index 100% rename from docs/logo/scm-manager_logo.jpg rename to docs/en/logo/scm-manager_logo.jpg diff --git a/docs/logo/scm-manager_logo.png b/docs/en/logo/scm-manager_logo.png similarity index 100% rename from docs/logo/scm-manager_logo.png rename to docs/en/logo/scm-manager_logo.png diff --git a/docs/logo/scm-manager_logo_img.jpg b/docs/en/logo/scm-manager_logo_img.jpg similarity index 100% rename from docs/logo/scm-manager_logo_img.jpg rename to docs/en/logo/scm-manager_logo_img.jpg diff --git a/docs/logo/scm-manager_logo_img.png b/docs/en/logo/scm-manager_logo_img.png similarity index 100% rename from docs/logo/scm-manager_logo_img.png rename to docs/en/logo/scm-manager_logo_img.png diff --git a/docs/logo/scm-manager_logo_img_neg.jpg b/docs/en/logo/scm-manager_logo_img_neg.jpg similarity index 100% rename from docs/logo/scm-manager_logo_img_neg.jpg rename to docs/en/logo/scm-manager_logo_img_neg.jpg diff --git a/docs/logo/scm-manager_logo_img_neg.png b/docs/en/logo/scm-manager_logo_img_neg.png similarity index 100% rename from docs/logo/scm-manager_logo_img_neg.png rename to docs/en/logo/scm-manager_logo_img_neg.png diff --git a/docs/logo/scm-manager_logo_neg.jpg b/docs/en/logo/scm-manager_logo_neg.jpg similarity index 100% rename from docs/logo/scm-manager_logo_neg.jpg rename to docs/en/logo/scm-manager_logo_neg.jpg diff --git a/docs/logo/scm-manager_logo_neg.png b/docs/en/logo/scm-manager_logo_neg.png similarity index 100% rename from docs/logo/scm-manager_logo_neg.png rename to docs/en/logo/scm-manager_logo_neg.png diff --git a/docs/logo/scm-manager_logo_neg1.jpg b/docs/en/logo/scm-manager_logo_neg1.jpg similarity index 100% rename from docs/logo/scm-manager_logo_neg1.jpg rename to docs/en/logo/scm-manager_logo_neg1.jpg diff --git a/docs/logo/scm-manager_logo_neg1.png b/docs/en/logo/scm-manager_logo_neg1.png similarity index 100% rename from docs/logo/scm-manager_logo_neg1.png rename to docs/en/logo/scm-manager_logo_neg1.png diff --git a/docs/logo/scm-manager_logo_pos1.jpg b/docs/en/logo/scm-manager_logo_pos1.jpg similarity index 100% rename from docs/logo/scm-manager_logo_pos1.jpg rename to docs/en/logo/scm-manager_logo_pos1.jpg diff --git a/docs/logo/scm-manager_logo_pos1.png b/docs/en/logo/scm-manager_logo_pos1.png similarity index 100% rename from docs/logo/scm-manager_logo_pos1.png rename to docs/en/logo/scm-manager_logo_pos1.png diff --git a/docs/mercurial/clone-empty.md b/docs/en/mercurial/clone-empty.md similarity index 98% rename from docs/mercurial/clone-empty.md rename to docs/en/mercurial/clone-empty.md index 44a81de20c..ce1c2fae66 100644 --- a/docs/mercurial/clone-empty.md +++ b/docs/en/mercurial/clone-empty.md @@ -1,4 +1,6 @@ -# Clone empty repository +--- +title: Clone empty repository +--- ```http GET /scm/hg/hgtest?cmd=capabilities HTTP/1.1. diff --git a/docs/mercurial/push-bookmark.md b/docs/en/mercurial/push-bookmark.md similarity index 99% rename from docs/mercurial/push-bookmark.md rename to docs/en/mercurial/push-bookmark.md index 9ed591f9f4..bdb2c09aac 100644 --- a/docs/mercurial/push-bookmark.md +++ b/docs/en/mercurial/push-bookmark.md @@ -1,4 +1,6 @@ -# Push bookmark +--- +title: Push bookmark +--- ```http GET /scm/hg/hgtest?cmd=capabilities HTTP/1.1. diff --git a/docs/mercurial/push-multiple-branches-to-new.md b/docs/en/mercurial/push-multiple-branches-to-new.md similarity index 99% rename from docs/mercurial/push-multiple-branches-to-new.md rename to docs/en/mercurial/push-multiple-branches-to-new.md index 734c479fef..060cac73a6 100644 --- a/docs/mercurial/push-multiple-branches-to-new.md +++ b/docs/en/mercurial/push-multiple-branches-to-new.md @@ -1,4 +1,6 @@ -# Push multiple branches to new repository +--- +title: Push multiple branches to new repository +--- ```http GET /scm/hg/hgtest?cmd=capabilities HTTP/1.1. diff --git a/docs/mercurial/push-multiple-branches.md b/docs/en/mercurial/push-multiple-branches.md similarity index 99% rename from docs/mercurial/push-multiple-branches.md rename to docs/en/mercurial/push-multiple-branches.md index 5827cb0ceb..16b8a4b494 100644 --- a/docs/mercurial/push-multiple-branches.md +++ b/docs/en/mercurial/push-multiple-branches.md @@ -1,4 +1,6 @@ -# Push multiple branches +--- +title: Push multiple branches +--- ```http GET /scm/hg/hgtest?cmd=capabilities HTTP/1.1. diff --git a/docs/mercurial/push-single-changeset.md b/docs/en/mercurial/push-single-changeset.md similarity index 99% rename from docs/mercurial/push-single-changeset.md rename to docs/en/mercurial/push-single-changeset.md index 499b4c21c3..d7ad480bcd 100644 --- a/docs/mercurial/push-single-changeset.md +++ b/docs/en/mercurial/push-single-changeset.md @@ -1,4 +1,6 @@ -# Push single changeset +--- +title: Push single changeset +--- ```http GET /scm/hg/hgtest?cmd=capabilities HTTP/1.1. diff --git a/docs/v2/migration-wizard.md b/docs/en/migrate-scm-manager-from-v1.md similarity index 97% rename from docs/v2/migration-wizard.md rename to docs/en/migrate-scm-manager-from-v1.md index 199f6d0bcb..84eebb5ead 100644 --- a/docs/v2/migration-wizard.md +++ b/docs/en/migrate-scm-manager-from-v1.md @@ -1,4 +1,7 @@ -# Migration-Wizard +--- +title: Migrate from v1 to v2 +subtitle: How to use the Migration-Wizard +--- To upgrade an SCM-Manager from version 1 to version 2, some changes have to be made according the home directory of the SCM-Manager. So before you start, **make sure that you have an up to date backup of your SCM home folder!** @@ -20,7 +23,7 @@ To specify the new names (and namespaces), the SCM-Manager version 2 starts a mi You can open this wizard in an internet browser using the URL of your installation (eg. http://localhost:8080/scm/). -![Migration Wizard](../screenshots/migration-wizard.png) +![Migration Wizard](screenshots/migration-wizard.png) In the figure you can see an example of the page. We tried to guess meaningful names, but for sure you want to make some changes here. Beside choosing new namespaces and names you have to select a migration strategy for each repository. The strategies are described on the page as follows: diff --git a/docs/en/navigation.yml b/docs/en/navigation.yml new file mode 100644 index 0000000000..045f97f29e --- /dev/null +++ b/docs/en/navigation.yml @@ -0,0 +1,34 @@ +- section: Getting started + entries: + - /installation/ + - /configuration/ + - /migrate-scm-manager-from-v1/ + - /faq/ + - /known-issues/ + +- section: Administration + entries: + - /administration/scm-server-ssl/ + - /administration/logging/ + - /administration/command-line-client/ + +- section: Development + entries: + - /development/intellij-idea-configuration/ + - /development/build-from-source/ + - /development/ui-common-pitfall/ + - /administration/permission-concept/ + - /development/error-handling/ + - /development/i18n/ + - /development/definition-of-done/ + - /development/ui-dod/ + +- section: Plugin Development + entries: + - /development/plugins/create/ + - /development/plugins/migrate-plugin-from-v1/ + - /development/plugins/extension-points/ + - /development/plugins/i18n-for-plugins/ + - /development/plugins/plugin-descriptor/ + - /development/plugins/plugin-development/ + - /development/plugins/publish/ diff --git a/docs/notes/svn.txt b/docs/en/notes/svn.txt similarity index 100% rename from docs/notes/svn.txt rename to docs/en/notes/svn.txt diff --git a/docs/notes/ubuntu.txt b/docs/en/notes/ubuntu.txt similarity index 100% rename from docs/notes/ubuntu.txt rename to docs/en/notes/ubuntu.txt diff --git a/docs/v2/release-process.md b/docs/en/release-process.md similarity index 96% rename from docs/v2/release-process.md rename to docs/en/release-process.md index d30b0d6289..2d1beac082 100644 --- a/docs/v2/release-process.md +++ b/docs/en/release-process.md @@ -1,5 +1,6 @@ # How to release SCM-Manager v2 core + To release a new version of SCM-Manager v2 you have to do the following steps (replace placeholders `` accordingly, eg. with `2.1.0`): ## Check out default branch @@ -68,6 +69,10 @@ git commit -m "Update to new version of SCM-Manager" git push ``` +## Plugin dependencies + +Check if all plugin dependencies are proper versions and not SNAPSHOT! + Wait for Jenkins to be green. ## Create release branch diff --git a/docs/resources/permissions-mockup-global-permissions.jpg b/docs/en/resources/permissions-mockup-global-permissions.jpg similarity index 100% rename from docs/resources/permissions-mockup-global-permissions.jpg rename to docs/en/resources/permissions-mockup-global-permissions.jpg diff --git a/docs/resources/permissions-mockup-repository-permissions.jpg b/docs/en/resources/permissions-mockup-repository-permissions.jpg similarity index 100% rename from docs/resources/permissions-mockup-repository-permissions.jpg rename to docs/en/resources/permissions-mockup-repository-permissions.jpg diff --git a/docs/resources/permissions-mockup-user.jpg b/docs/en/resources/permissions-mockup-user.jpg similarity index 100% rename from docs/resources/permissions-mockup-user.jpg rename to docs/en/resources/permissions-mockup-user.jpg diff --git a/docs/resources/scm-manager_logo.jpg b/docs/en/resources/scm-manager_logo.jpg similarity index 100% rename from docs/resources/scm-manager_logo.jpg rename to docs/en/resources/scm-manager_logo.jpg diff --git a/docs/rv-plugin-comparison.md b/docs/en/rv-plugin-comparison.md similarity index 89% rename from docs/rv-plugin-comparison.md rename to docs/en/rv-plugin-comparison.md index c81899961d..a0b954b33c 100644 --- a/docs/rv-plugin-comparison.md +++ b/docs/en/rv-plugin-comparison.md @@ -1,4 +1,6 @@ -# Revision Control Plugin Comparison +--- +title: Revision Control Plugin Comparison +--- | Plugin Name | Name | Core-Plugin | Requirements | Url | | --- | --- | --- | --- | --- | diff --git a/docs/screenshots/migration-wizard.png b/docs/en/screenshots/migration-wizard.png similarity index 100% rename from docs/screenshots/migration-wizard.png rename to docs/en/screenshots/migration-wizard.png diff --git a/docs/v2/state-of-development.md b/docs/en/state-of-development.md similarity index 96% rename from docs/v2/state-of-development.md rename to docs/en/state-of-development.md index 57892a4d01..ad448a7423 100644 --- a/docs/v2/state-of-development.md +++ b/docs/en/state-of-development.md @@ -1,4 +1,6 @@ -# State of SCM-Manager 2 development +--- +title: State of SCM-Manager 2 development +--- The development of SCM-Manager 2.0.0 is organised in [Trello Boards](https://trello.com/scmmanager). diff --git a/docs/v2/test-cases.md b/docs/en/test-cases.md similarity index 99% rename from docs/v2/test-cases.md rename to docs/en/test-cases.md index a3a91b5ca2..b434de2407 100644 --- a/docs/v2/test-cases.md +++ b/docs/en/test-cases.md @@ -1,4 +1,6 @@ -# SCM-Manager v2 Test Cases +--- +title: SCM-Manager v2 Test Cases +--- Describes the expected behaviour for SCMM v2 REST Resources using manual tests. diff --git a/docs/v2/vulnerabilities.md b/docs/en/vulnerabilities.md similarity index 82% rename from docs/v2/vulnerabilities.md rename to docs/en/vulnerabilities.md index 28c6b06e1f..96a67fe951 100644 --- a/docs/v2/vulnerabilities.md +++ b/docs/en/vulnerabilities.md @@ -1,6 +1,8 @@ -# Vulnerabilities +--- +title: Vulnerabilities +--- ## Not applicable * **CVE-2014-0114**: BeanUtils is transitive dependency of Apache Shiro. It is only used to wire shiro components. -* **SONATYPE-2016-0026**: We disabled the "remember me" feature completly. \ No newline at end of file +* **SONATYPE-2016-0026**: We disabled the "remember me" feature completly. diff --git a/docs/getting-started.md b/docs/getting-started.md deleted file mode 100644 index 623070f5b9..0000000000 --- a/docs/getting-started.md +++ /dev/null @@ -1,63 +0,0 @@ -# Getting started - -### Install Java - -SCM-Manager needs an installed Java 1.7 or newer. It is recommended to use the [oracle jre](http://java.oracle.com/). -How to check which version of Java is installed: - -```bash -java -version -``` - -Download java from [here](http://java.oracle.com/) and follow the install instructions. - -### Install SCM-Manager - -Download the latest version of SCM-Manager from -[here](http://www.scm-manager.org/download/), unpack the .zip -or .tar.gz package and start SCM-Manager with - -```bash -scm-server/bin/scm-server -``` - -### First access - -| | | -| ------------ | ----------------------- | -| **URL** | | -| **Username** | scmadmin | -| **Password** | scmadmin | - -### Mercurial - -Subversion and Git will work out of the box, but if you want to use -mercurial with SCM-Manager you have to install mercurial version -**1.9** or newer. - -#### Mercurial on Windows - -The installation of mercurial for SCM-Manager is very complicated on -windows, have a look at: - -- [#1](https://bitbucket.org/sdorra/scm-manager/issues/1/no-ability-to-rename-repository) -- [xeFcruG70s8J](https://groups.google.com/d/msg/scmmanager/zOigMIn2RiE/xeFcruG70s8J "Python/Hg Package Build Process") -- [build-win-hg-packages](https://bitbucket.org/sdorra/build-win-hg-packages) - -SCM-Manager comes with the option to install packages for windows to -simplify this setup. To use such a package just login as Administrator, -goto \"Repository Types\", click the \"Start Configuration Wizard\" and -Choose \"Download and install\". - -If you see an error like the following: - -```text -sonia.scm.repository.RepositoryException: command exit with error 14001 and message: 'The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.' -``` - -Then you have to install [Microsoft Visual C++ 2008 SP1 Redistributable Package -(x86)](http://www.microsoft.com/en-us/download/details.aspx?id=5582). -Note you have to use the x86 package and not the x64 package, because we -use 32bit python in SCM-Manager on Windows. For more informations have a -look at -[#522](https://bitbucket.org/sdorra/scm-manager/issue/552/hg-repo-creation-failed). diff --git a/docs/glassfish.md b/docs/glassfish.md deleted file mode 100644 index 1797731015..0000000000 --- a/docs/glassfish.md +++ /dev/null @@ -1,18 +0,0 @@ -# SCM-Manager with GlassFish - -To use SCM-Manager 1.6 and above with GlassFish 3.x you have to add a -JVM-Option to the GlassFish configuration. Please follow the steps -below. - -Open the GlassFish Admin-Console (http://yourserver:4848), login as -admin user, goto Configuration-\>JVM Settings, switch to the JVM Options -tab and add the following JVM-Option: - -```bash --Dcom.sun.enterprise.overrideablejavaxpackages=javax.ws.rs,javax.ws.rs.core,javax.ws.rs.ext -``` - -Restart the GlassFish-Server. - -Source: - diff --git a/docs/healthchecks/svn-incompatible-dbformat.md b/docs/healthchecks/svn-incompatible-dbformat.md deleted file mode 100644 index 50f91d4946..0000000000 --- a/docs/healthchecks/svn-incompatible-dbformat.md +++ /dev/null @@ -1,21 +0,0 @@ -# Incompatible subversion db format - -SCM-Manager versions prior to 1.36 are creating incompatible subversion repositories, if the subversion option "with 1.7 Compatible" is enabled. This subversion repositories are neither compatible with svn 1.7 nor svn 1.8. These repositories are marked as unhealthy by SCM-Manager version 1.36 and above. - -This incompatible repositories must be converted, before they can be used with SCM-Manager 1.36 and above. Note the convert process can take some time and need some space, because it creates a backup for each converted repository. Follow the steps below to convert all incompatible subversion repositories of one SCM-Manager instance. - -* stop SCM-Manager -* create a full backup of your scm home directory -* download the convert util from [here](https://maven.scm-manager.org/nexus/content/repositories/releases/sonia/scm/scm-fixsvndb5-cli/1.0.1/scm-fixsvndb5-cli-1.0.1-jar-with-dependencies.jar) -* execute the convert util with your scm home directory as parameter e.g.: - -```bash -java -jar scm-fixsvndb5-cli-1.0.1-jar-with-dependencies.jar /path/to/.scm -``` - -* start SCM-Manager - -For more informations have a look at: - -* [Issue #519](https://github.com/scm-manager/scm-manager/issues/519) -* [Subversion release notes](https://subversion.apache.org/docs/release-notes/1.7.html#revprop-packing) diff --git a/docs/howto-create-a-plugin.md b/docs/howto-create-a-plugin.md deleted file mode 100644 index 32336524d4..0000000000 --- a/docs/howto-create-a-plugin.md +++ /dev/null @@ -1,39 +0,0 @@ -# How to create your own plugin - -### Software Requirements - -- JDK 1.7 or higher - ([download](http://www.oracle.com/technetwork/java/index.html)) -- Maven 3 or higher ([download](http://maven.apache.org/)) - -### Create plugin - -```bash -mvn archetype:generate\ - -DarchetypeGroupId=sonia.scm.maven\ - -DarchetypeArtifactId=scm-plugin-archetype\ - -DarchetypeVersion=1.60\ - -DarchetypeRepository=http://maven.scm-manager.org/nexus/content/groups/public/ -``` -### Test the plugin - -```bash -mvn scmp:run -``` - -### Samples - -- [Hello World](https://bitbucket.org/sdorra/scm-manager/src/1.x/scm-samples/scm-sample-hello/) -- [Authentication Plugin](https://bitbucket.org/sdorra/scm-manager/src/1.x/scm-samples/scm-sample-auth/) - -### Further reading - -- [Injection framework - Google Guice](http://code.google.com/p/google-guice/) -- [Restful WebService - Jersey](http://jersey.java.net/nonav/documentation/latest/user-guide.html) -- [ XML transformation - JAXB](http://jaxb.java.net/guide/) -- [User interface - Ext JS](http://www.sencha.com/products/extjs3/) - -### Questions/Help - -If you have questions or you need help, please write to the mailing -list: diff --git a/docs/iis-helicon.md b/docs/iis-helicon.md deleted file mode 100644 index f248c1bd05..0000000000 --- a/docs/iis-helicon.md +++ /dev/null @@ -1,53 +0,0 @@ -# SCM-Manager on IIS Helicon -First of all this setup is not recommended, because there were a lot of problems with it and it was never tested by the development team of SCM-Manager. However there are several working installation out there. But there some pitfalls: - -**Problem description:** - -When moving of copying files in SVN, the commit fails with the following message: - -```bash -MyWorkstation:MyRepo user$ svn mv A.cs B.cs -A B.cs -D A.cs -MyWorkstation:MyRepo user$ svn commit -m "Renamed A.cs to B.cs" -Deleting A.cs -Adding B.cs -svn: E175002: Commit failed (details follow): -svn: E175002: The COPY request returned invalid XML in the response: XML parse error at line 1: no element found (/svn/MyRepo/!svn/bc/4/A.cs) -MyWorkstation:MyRepo user$ - -``` - -This problem only occurs when accessing the repository via https, not http. - -**Solution:** - -1. Add the following rewrite rule to the web.config of the SCM application: - -```xml - - - - - - - - - - - - - - - - - - - -``` - -2. Add HTTP_Destination to the Allowed Server Variables using IIS: - -![Helicon: Allowed Server Variables](screenshots/helicon-server-vars.png) - -For more information, see issue [#624](https://bitbucket.org/sdorra/scm-manager/issue/624/svn-400-bad-request-on-copy-or-move-when). diff --git a/docs/injectionObjects.md b/docs/injectionObjects.md deleted file mode 100644 index 4dcccb0215..0000000000 --- a/docs/injectionObjects.md +++ /dev/null @@ -1,23 +0,0 @@ -# Injection Objects - -- [AdministrationContext](http://docs.scm-manager.org/apidocs/latest/sonia/scm/web/security/AdministrationContext.html) -- [AuthenticationManager](http://docs.scm-manager.org/apidocs/latest/sonia/scm/web/security/AuthenticationManager.html) -- [CGIExecutorFactory](http://docs.scm-manager.org/apidocs/latest/sonia/scm/web/cgi/CGIExecutorFactory.html) -- [CacheManager](http://docs.scm-manager.org/apidocs/latest/sonia/scm/cache/CacheManager.html) -- [ChangesetViewerUtil](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/ChangesetViewerUtil.html) -- [CipherHandler](http://docs.scm-manager.org/apidocs/latest/sonia/scm/security/CipherHandler.html) -- [EncryptionHandler](http://docs.scm-manager.org/apidocs/latest/sonia/scm/security/EncryptionHandler.html) -- [FileSystem](http://docs.scm-manager.org/apidocs/latest/sonia/scm/io/FileSystem.html) -- [GroupManager](http://docs.scm-manager.org/apidocs/latest/sonia/scm/group/GroupManager.html) -- [HttpClient](http://docs.scm-manager.org/apidocs/latest/sonia/scm/net/HttpClient.html) -- [HttpServletRequest](http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html) -- [HttpServletResponse](http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletResponse.html) -- [HttpSession](http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSession.html) -- [KeyGenerator](http://docs.scm-manager.org/apidocs/latest/sonia/scm/security/KeyGenerator.html) -- [RepositoryBrowserUtil](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/RepositoryBrowserUtil.html) -- [RepositoryManager](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/RepositoryManager.html) -- [RepositoryRequestListenerUtil](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/RepositoryRequestListenerUtil.html) -- [ScmConfiguration](http://docs.scm-manager.org/apidocs/latest/sonia/scm/config/ScmConfiguration.html) -- [StoreFactory](http://docs.scm-manager.org/apidocs/latest/sonia/scm/store/StoreFactory.html) -- [UserManager](http://docs.scm-manager.org/apidocs/latest/sonia/scm/user/UserManager.html) -- [WebSecurityContext](http://docs.scm-manager.org/apidocs/latest/sonia/scm/web/security/WebSecurityContext.html) diff --git a/docs/java-client-api.md b/docs/java-client-api.md deleted file mode 100644 index f3229cc63c..0000000000 --- a/docs/java-client-api.md +++ /dev/null @@ -1,129 +0,0 @@ -# Java Client API - -### Maven - -To use the SCM-Manager Java Client API you have to configure the -SCM-Manager maven repository in your pom.xml: - -```xml - - - - maven.scm-manager.org - scm-manager release repository - http://maven.scm-manager.org/nexus/content/groups/public - - - -``` - -And you have to define the dependency to the api and one implementation: - -```xml - - - - sonia.scm.clients - scm-client-api - 1.60 - - - - sonia.scm.clients - scm-client-impl - 1.60 - - - -``` - -### Usage - -First you have to create a session to your SCM-Manager instance: - -```java -String url = "http://localhost:8080/scm"; -String username = "scmadmin"; -String password = "scmadmin"; -ScmClientSession session = ScmClient.createSession(url, username, password); -``` - -After you have successfully created a client session you can nearly -execute every action which is available from the web interface. But do -not forget to close the session after you have finished your work: - -```java -session.close(); -``` - -### Examples - -Create a new repository: - -```java -Repository repository = new Repository(); -repository.setName("scm-manager"); -repository.setType("hg"); -repository.setDescription("The easiest way to share and manage your Git, Mercurial and Subversion repositories over http."); - -// set permissions for user sdorra to owner -List permissions = new ArrayList(); -permissions.add(new Permission("sdorra", PermissionType.OWNER)); -repository.setPermissions(permissions); - -session.getRepositoryHandler().create(repository); -``` - -Get the last 20 commits of a repository: - -```java -RepositoryClientHandler repositoryHandler = session.getRepositoryHandler(); -// get the mercurial (hg) repository scm-manager -Repository repository = repositoryHandler.get("hg", "scm-manager"); -ClientChangesetHandler changesetHandler = repositoryHandler.getChangesetHandler(repository); -// get 20 changesets started by 0 -ChangesetPagingResult changesets = changesetHandler.getChangesets(0, 20); -for ( Changeset c : changesets ){ - System.out.println( c.getId() + ": " + c.getDescription() ); -``` - -Print the content of a file in a repository: - -```java -RepositoryClientHandler repositoryHandler = session.getRepositoryHandler(); -// get the mercurial (hg) repository scm-manager -Repository repository = repositoryHandler.get("hg", "scm-manager"); -ClientRepositoryBrowser browser = repositoryHandler.getRepositoryBrowser(repository); -BufferedReader reader = null; -try { - // get the content of the file pom.xml at revision tip - reader = new BufferedReader(new InputStreamReader(browser.getContent("tip", "pom.xml"))); - String line = reader.readLine(); - while ( line != null ){ - System.out.println( line ); - line = reader.readLine(); - } -} finally { - if ( reader != null ){ - reader.close(); - } -} -``` - -Create a new user: - -```java -User user = new User("tuser", "Test User", "test.user@test.net"); -user.setPassword("test123"); - -session.getUserHandler().create( user ); -``` - -Add a user to an existing group: - -```java -GroupClientHandler groupHandler = session.getGroupHandler(); -Group group = groupHandler.get("developers"); -group.getMembers().add("tuser"); -groupHandler.modify(group); -``` diff --git a/docs/jenkins-plugin.md b/docs/jenkins-plugin.md deleted file mode 100644 index c63911fe23..0000000000 --- a/docs/jenkins-plugin.md +++ /dev/null @@ -1,56 +0,0 @@ -# scm-jenkins-plugin - -The jenkins plugin will ping your Jenkins CI server when a new commit is -pushed to SCM-Manager. In SCM-Manager exists two differnt methods to -trigger jenkins builds. - -### Per repository configuration - -The \"per repository configuration\" method requires a configuration for -each repository. The following parameters must be configured: - -- The url of the jenkins server inclusive the context path e.g.: - -- The name of the jenkins job -- Jenkins trigger authentication token -- Username of the jenkins user. This option is only required if your - jenkins job does not allow anonymous access -- API Token of the jenkins user. This token is used for - authentication. You could get your API Token from your jenkins - server at - - -Note for this setup the jenkins job have to be configured for remote -trigger (Trigger builds remotely). - -### Global configuration - -The global configuration has only support for git and mercurial. If you -want to use the jenkins plugin with subversion repositories, you have to -use the \"per repository configuration\". The global configuration -method uses push notifications from the git-plugin and mercurial-plugin -for jenkins. SCM-Manager will send the url of the changed repository -after each successful push, jenkins will build each repository which -this scm url and enabled polling. - -To use the \"global configuration\" method, you have to note a few -things: - -- You have to insert the url to your jenkins server - (Config-\>General-\>Jenkins Configuration-\>Url) the url must - conatin the context path of jenkins e.g.: - . -- Be sure the base url contains the full qualified hostname to your - scm-manager server (Config-\>General-\>General Settings-\>Base Url). -- All jenkins repositories have to be configured for polling (the - interval does not matter, a good value would be once a day). -- If you are using \"Matrix based security\" on jenkins, be sure you - use at least version 1.43 of the mercurial-plugin for jenkins. - -#### Links - -- -- -- -- -- diff --git a/docs/jira-plugin.md b/docs/jira-plugin.md deleted file mode 100644 index f0651861df..0000000000 --- a/docs/jira-plugin.md +++ /dev/null @@ -1,47 +0,0 @@ -# scm-jira-plugin - -The plugin enables the following features to integrate Atlassian JIRA to -SCM-Manager: - -- Turn issue keys in changeset descriptions to links for jira -- Updates a Jira issue if the issue key is found in a changeset - description -- Close a Jira issue if the issue key and a auto close (close, fix, - resolve, \...) word is found in the changeset description - -### Installation and configuration - -1. Enable remote api calls in jira - (https://developer.atlassian.com/display/JIRADEV/JIRA+XML-RPC+Overview) -2. Install scm-jira-plugin over the plugin center in scm-manager -3. Be sure that your jira installation accepts remote calls - ([Screenshot](screenshots/scm-jira-plugin/jira-plugin-01.png)) -4. Configure the plugin, select a repository to enable the - scm-jira-plugin for this repository - ([Screenshot](screenshots/scm-jira-plugin/jira-plugin-02.png)) -5. **Note**: For the auto close and update feature it is necessary - that users have the same names and passwords in SCM-Manager and Jira - -### Auto Close Words (Since v. 1.17) - -From version 1.17 the plugin offers the possibility of mapping auto -close words with transition that are configured in JIRA. - -- Auto Close Words are a comma separated list -- Auto Close Words are not case sensitive -- Auto Close Words can contain spaces -- If the Auto Close Word is identical to the transition name, just add - the transition name to the list (e.g. transition name = start - progress \--\> Auto Close Word = start progress) -- If the Auto Close Word is different from the transition name you - have to use the mapping function (e.g. transition name = start - progress, Auto Close Word = begin \--\> you have to add \'begin = - start progress\' to the configuration of the plugin. - -### Screenshots - -![](screenshots/scm-jira-plugin/jira-plugin-01.png) -![](screenshots/scm-jira-plugin/jira-plugin-02.png) -![](screenshots/scm-jira-plugin/jira-plugin-03.png) -![](screenshots/scm-jira-plugin/jira-plugin-04.png) -![](screenshots/scm-jira-plugin/jira-plugin-05.png) diff --git a/docs/mail-plugin.md b/docs/mail-plugin.md deleted file mode 100644 index ff46a773ec..0000000000 --- a/docs/mail-plugin.md +++ /dev/null @@ -1,83 +0,0 @@ -# scm-mail-plugin - -The mail plugin provides an central api for sending e-mails. This api -can be used by other plugins. - -## Configuration - -The scm-mail-plugin provides a single place for the mail server -configurations at Config-\>General-\>Mail Settings. - -## API Usage - -First you have to add the dependency to your pom.xml e.g.: - -```xml - - sonia.scm.plugins - scm-mail-plugin - 1.4 - -``` - -But note you should use at least version 1.15 of scm-plugins as parent. - -Now you can use the MailService class via injection e.g.: - -```java -import com.google.inject.Inject; -import javax.mail.Message.RecipientType; -import org.codemonkey.simplejavamail.Email; -import sonia.scm.mail.api.MailService; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Service for e-mail notifications. - * @author Sebastian Sdorra - */ -public class NotificationService -{ - /** logger for NotificationService */ - private static final Logger logger = LoggerFactory.getLogger( - NotificationService.class); - - private MailService mailService; - - /** - * Constructs a new NotificationService. - * - * @param mailService injected mail service - */ - @Inject - public NotificationService(MailService mailService) - { - this.mailService = mailService; - } - - /** - * Sends a mail from admin@scm-manager.org to test.user@scm-manager.org, - * if the mail service is configured. - * - * @throws MailSendBatchException - */ - public void sendNotification() throws MailSendBatchException { - // check if the mail service is configured - if ( mailService.isConfigured() ){ - // create a new e-mail - Email mail = new Email(); - mail.setFromAddress("SCM-Administrator", "admin@scm-manager.org"); - mail.addRecipient("Test User", "test.user@scm-manager.org", RecipientType.TO); - mail.setSubject("SCM-Manager notification"); - mail.setText("Notification from SCM-Manager"); - - // send the e-mail - mailService.send(mail); - } else { - // log that the mail service is not configured - logger.warn("mail service is not configured"); - } - } -} -``` diff --git a/docs/mantisbt-plugin.md b/docs/mantisbt-plugin.md deleted file mode 100644 index 160c5a0726..0000000000 --- a/docs/mantisbt-plugin.md +++ /dev/null @@ -1,9 +0,0 @@ -# scm-mantisbt-plugin - -The plugin enables the following features to integrate [MantisBT](https://www.mantisbt.org/) to SCM-Manager: - -* Turn issue keys in changeset descriptions to links for MantisBT -* Updates a MantisBT issue if the issue key is found in a changeset description -* Change status of a MantisBT issue if the issue key and a status (e.g. resolved) word is found in the changeset description - -**Note**: The issue keys must be defined with a 7 digit number (e.g. 0000001) diff --git a/docs/pathwp-plugin.md b/docs/pathwp-plugin.md deleted file mode 100644 index 0e7563e9fb..0000000000 --- a/docs/pathwp-plugin.md +++ /dev/null @@ -1,30 +0,0 @@ -# Path Write Protect Plugin - -### Installation - -- Login in as administrator -- Open Plugins -- Install scm-pathwp-plugin -- Restart your applicationserver - -### Usage - -After the restart you should see a \"Path write protect\" tab for each -repository. On this tab you are able to set path write protection for -users and groups. Here are some rules for the usage of the pathwp -plugin: - -- Administrators and repository owner have always write access. -- Grant write permissions on the \"Permission\" tab for every user or - group who should write to any file or folder in the repository. -- If the pathwp plugin is enabled, nobody can write to the repository - expect administrators, repository owners and the specified rules. -- To protect a complete folder use a star at the end of the path (e.g.: trunk/\*) - -### Examples - -| Path | Name | Group Permission | Description | -| ------------- | ----------- | ---------------- | ---------------------- | -| * | scmadmin | false | user scmadmin has write access to the whole repository | -| trunk/\* | development | true | group development has write access to the trunk directory | -| trunk/joe.txt | joe | false | user joe has write access to the file trunk/joe.txt | diff --git a/docs/redmine-plugin.md b/docs/redmine-plugin.md deleted file mode 100644 index db1fa21ae8..0000000000 --- a/docs/redmine-plugin.md +++ /dev/null @@ -1,25 +0,0 @@ -# Redmine Plugin - -Is based on [scm-jira-plugin](jira-plugin.md). - -The plugin enables the following features to integrate SCM-Manager to -[Redmine](http://www.redmine.org/): - -- Turn issue keys in changeset descriptions to links for redmine -- Updates a redmine issue if the issue key is found in a changeset description -- Close a Redmine issue if the issue key and a auto close (close, fix, resolve, \...) - word is found in the changeset description - -### Installation and configuration - -1. Enable [Redmine rest authentication](https://www.redmine.org/projects/redmine/wiki/Rest_api#Authentication), basically - \'you have to check Enable REST API in Administration -\> Settings - -\> Authentication\' -2. Install redmine-plugin over the plugin center in scm-manager -3. Configure the plugin, select a repository to enable the - redmine-plugin for this repository -4. To link issues commit must be match the following: \'(\#issue\_id) - your commit message\' -5. **Note**: For the auto close and update feature it is necessary - that users have the same names and passwords in SCM-Manager and - Redmine diff --git a/docs/release notes 1.19 - 1.0.md b/docs/release notes 1.19 - 1.0.md deleted file mode 100644 index e67ad3d0d0..0000000000 --- a/docs/release notes 1.19 - 1.0.md +++ /dev/null @@ -1,528 +0,0 @@ -# Release Notes 1.19 - 1.0 - -## SCM-Manager 1.19 - -**improvements** - -- implement new template api which uses mustache as default engine -- display error on startup if home directory is not writable -- use cached thread pool for async hooks to improve memory consumption -- added support for jersey viewables -- do not show browser basic authentication dialog on session timeout - -**fixed bugs** - -- fix npe on windows startup, see \<\\> - -**library updates** - -- update javahg to version 0.4 -- update enunciate to version 1.26 - -## SCM-Manager 1.18 - -**improvements** - -- use javahg for mercurial commit, source, blame, content and diff - views -- support for tags in source view -- support for branches in commit view -- improve svnkit logging, see \<\\> -- improve mercurial error messages, see \<\\> -- allow configuration of mercurial repository encoding -- warn if plugin artifact checksum not match - -**fixed bugs** - -- fix wrong cache result in blame command -- fix wrong escaped subversion commit messages, see \<\\> -- fix wrong directory content in source browser, see \<\\> -- fix missing error messages for some json stores -- fix missing localizations -- fix wrong unarchive message -- added missing dtd to server-config.xml - -**library updates** - -- update ehcache to version 2.6.0 -- update jetty to version 7.6.5.v20120716 -- update google guava to version 13.0 -- update jersey to version 1.13 - -## SCM-Manager 1.17 - -**improvements** - -- new repository api -- log scm-manager version on boot -- use copy on read for repository api caches to fix reference problems - with pre processor api -- added api for blame line pre processor -- added compatibility modes for svn 1.7, see \<\\> -- added warning message if javascript is disabled, see \<\\> -- fix ugly login error message, see \<\\> -- Repository links should use relative paths, see \<\\> -- Added locale and timezone to support informations - -**fixed bugs** - -- fix detection of scm-server servlet container -- fix svn version informations -- fix mercurial version informations -- fix mercurial import with non valid mail address in contact field, - see \<\\> -- disable ssl validation for mercurial hook detection, see \<\\> -- fix basic authentication for systems with turkish locale, see - \<\\> - -**library updates** - -- update jgit to version 2.0.0.201206130900-r -- update svnkit to version 1.7.5-1 -- update logback to version 1.0.6 -- update slf4j to version 1.6.6 - -## SCM-Manager 1.16 - -**improvements** - -- improve mercurial hook error handling -- mercurial hook url auto detection -- cleanup empty directories during repository delete, see \<\\> -- use urllib2 for urlopen to be more campatible to different python - versions, see \<\\> -- redirect to repository root help when accessing repository type root - url, see \<\\> -- Add a way to deactivate users, see \<\\> -- small performance improvements -- store svn uuid as property on repository creation -- allow basic authentication for rest endpoint - /api/rest/authentication -- added api for store listeners -- added option to encode svn responses with gzip - -**fixed bugs** - -- do not encode changeset author name, see \<\\> -- pass shell environment to mercurial cgi process, see \<\\> -- fix mercurial encoding problem on windows, see \<\\> -- fix changing resource order for plugins -- fix repository name validation, see \<\\> - -**library updates** - -- update jetty to version 7.6.4.v20120524 -- update logback to version 1.0.4 -- update jersey-client to version 1.12 -- update args4j to version 2.0.21 -- update svnkit to version 1.7.4-1.v1 - -## SCM-Manager 1.15 - -**improvements** - -- added information page for service requests -- templates can be loaded from webapp context or classpath -- allow sourcing in /etc/default/scm-server when available, see - \<\\> -- display user informations on the bottom of the page, see \<\\> -- improve mercurial error messages, see \<\\> -- improve logging for plugin loading -- added public and archived option to modify-repository sub command of - scm-cli-client - -**fixed bugs** - -- disable jsvc arch call to fix wrong cpu problem on darwin i386 - daemon -- fix wrong german localization, see \<\\> -- fix build with jdk7 -- fix bug in repository name validation, see \<\\> and - \<\\> -- fix subversion path not found on merge, see \<\\> -- fix subversion lock results in NoSuchMethodError, see \<\\> -- fix possible xss in Acitivities View, Repository Commits, see - \<\\> -- fix plugin installation failed with enabled proxy server, see - \<\\> -- fix wrong changeset url in ui url provider - -**library updates** - -- update google guava to version 12.0 -- update logback to version 1.0.3 - -## SCM-Manager 1.14 - -**improvements** - -- archive for repositories, see \<\\> -- simpler api to create other backend as the default xml version -- api for overriding core components -- extensionpoint for ServletContextListener -- improved error dialog in user interface, see \<\\> -- improve german locale - -**fixed bugs** - -- fix wrong log messages -- fix repository creation failure leaves empty directory, see - \<\\> -- fix mercurial repository source does not display with - subrepositories, see \<\\> -- fix history repository selection - -**library updates** - -- update jetty to version 7.6.3.v20120416 -- update logback to version 1.0.1 -- update ehcache to version 2.5.2 -- update commons-daemon to version 1.0.10, see \<\\> - -## SCM-Manager 1.13 - -**improvements** - -- more robust python modules to access mercurial resources -- added disable option to each core plugin - -**fixed bugs** - -- fix changing etags for collections -- fix missing hooks of mercurial repository import, see \<\\> -- fix anonymous push to public mercurial repositories, see \<\\> -- execute \"hg init\" in the scm home directory instead of current - working directory, see \<\\> -- use repository directory as working directory for git repository - hooks, see \<\\> -- do not fail on non basic authorization header -- fix mercurial encoding problem, see \<\\> -- fix issue-94 can\'t edit users, see \<\\> - -**library updates** - -- update freemarker to version 2.3.19 -- update jetty to version 7.6.1.v20120215 -- update jgit to version 1.3.0.201202151440-r -- update jersey to version 1.12 - -## SCM-Manager 1.12 - -**improvements** - -- new theme -- support for mercurial 2.1 -- import of existing repositories, see \<\\> -- new changeset view -- show categories in plugin overview -- added api for project stages -- added api to fetch a single changeset - -**fixed bugs** - -- allow usernames \< 3 chars, see pull request 2 -- git: use author ident instead of commit ident -- fix plugin resource caching bug -- mercurial: fix getChangesets of post receive hooks -- fix history bug during repository selection - -**library updates** - -- update jetty to version 7.6.0.v20120127 -- update maven for aether to version 3.0.4 -- update ehcache to version 2.5.1 - -##SCM-Manager 1.11 - -**improvements** - -- allow to fetch repositories by type and name -- added icon for tags -- show parent revision in changeset viewer -- added repository browser support for external git submodules - -**fixed bugs** - -- fix wrong svn diff -- fix wrong revision for sub module repository browser -- fix basic authentication access with a colon in the user password, - see \<\\> -- fix git hooks for repository structures -- fix subversion hooks on windows with repository structure -- fix mercurial hooks on windows with repository structure -- fix wrong mercurial revisions in urls -- fix svn hooks for repositories located on soft links -- fix bug in appendParameter method of UrlBuilder -- truncate long svn status lines, see \<\\> - -## SCM-Manager 1.10 - -**improvements** - -- small performance improvements -- added basic support for external mercurial subrepositories -- added repository request listener api -- added file object pre processor api - -**fixed bugs** - -- fix vertical scrollbar in webkit based browsers -- fix mercurial push with symbolic links, see \<\\> -- fix wrong decoding in hgweb, see \<\\> -- fix plugin installation with a proxy server, see \<\\> -- fix \"Allow anonymous access\" breaks access to private - repositories, see \<\\> - -**library updates** - -- update args4j to version 2.0.19 -- update aether to version 1.13.1 -- update jersey to version 1.11 -- update jgit to version 1.2.0.201112221803-r -- update svnkit to version 1.3.7.1 - -## SCM-Manager 1.9 - -**improvements** - -- Support for directory structure, see \<\\> -- Added webservice method to fetch repository by its type and name -- Mercurial auto configuration support for homebrew installations -- Improve httpclient api to support headers and authentication -- Reimplemented browser history functions -- SCM-Manager is now complete bookmark-able -- Added api to create urls for the interface or the webservice -- Improve interface performance by reducing Ext.getCmp calls -- Added history panel for a single file, see pull request 1 -- Added wiki categories, wiki and screenshots to plugin descriptor -- Added version and server-version to scm-cli-client -- Improve performance by better repository caching - -**fixed bugs** - -- fix bug in get method of repository resource -- fix issue \"Administrator flag is disabled after login\", see - \<\\> -- Allow usernames with spaces, see \<\\> -- fix rolling file policy of scm-manager logging -- fix mercurial hooks with configured force base url -- fix mercurial hooks with apache mod\_proxy, see \<\\> - -**library updates** - -- update jersey to version 1.10 -- update slf4j to verion 1.6.4 -- update logback to version 1.0.0 -- update jetty to version 7.5.4.v20111024 - -## SCM-Manager 1.8 - -**improvements** - -- support for pre receive hooks, see \<\\> -- scm-maven-plugin are now useable for integration tests -- added readme file to server bundles -- support for mercurial 1.9 -- improve mercurial performance -- support for blame/annotation view, special thanks to narva.com -- support for Diff views of changesets -- added basic authentication support to restful webservice -- generate webservice documentation -- improve javadoc -- download for single files from repository - -**fixed bugs** - -- Fixed bug in git repositories without head - -**library updates** - -- update jetty to version 7.5.1.v20110908 -- update aether to version 1.13 -- update ehcache to version 2.4.5 -- update logback to version 0.9.30 -- update jgit to version 1.1.0.201109151100-r -- update jersey to version 1.9 - -## SCM-Manager 1.7 - -**improvements** - -- added repository search and repository type filter to user - interface, see \<\\> -- handle browser back and forward buttons -- improve output of mercurial hooks -- added injection support for authentication, group, repository, user - and hook listeners -- added cipher api -- select new repository after creation -- added option to configure the scm home directory with a classpath - resource, see \<\\> -- support for proxyservers with authentication, see - [ko7eGU88rB4](https://groups.google.com/forum/#!topic/scmmanager/ko7eGU88rB4 "Plugins through http auth proxy?") -- improve changeset pre processor api -- improve support for repository, group and user properties - -**fixed bugs** - -- show installed plugins without internet connection, see \<\\> -- fix git svn clone, see \<\\> -- fix wron chanllenge bug in mercurial hook management -- fix jdk7 build bug -- fix a classloading problem in scmp:run maven goal -- fix bug in property xml serialization - -**library updates** - -- update ehcache to version 2.4.4 -- update slf4j to version 1.6.2 -- update junit to version 4.9 - -## SCM-Manager 1.6 - -**note** - -- GlassFish 3.x users have to change their GlassFish configuration, - see [SCM-Manager with GlassFish](glassfish.md) - -**improvements** - -- added an api for repository hooks -- support for git post-receive hook -- improved performance for source and commit viewer -- added loading mask of commit viewer -- added run as admin api -- improved validaton of user, group and repository names -- simplify plugin development -- added icons to member and permission grid -- added properties to repositories, users and groups - -**fixed bugs** - -- fixed deployment bug on some tomcat configurations, \<\\> -- fixed NullPointerException with empty git repositories, \<\\> -- fixed source and commit browser for git repositories without HEAD - ref -- fixed missing updates in plugin overview -- fixed plugin update -- fixed xml representation of changeset webservice resource -- fixed error 500 in mercurial repository browser with configured - python path - -**library updates** - -- upgraded jetty to version 7.4.5.v20110725 -- upgraded wagon to version 1.0 -- upgraded ehcache to version 2.4.3 -- upgraded aether to version 1.12 - -## SCM-Manager 1.5 - -**note** - -- mod\_proxy users have to change their configuration, see [mod\_proxy configuration](apache/apache-mod_proxy.md) - -**improvements** - -- added a \"repositorybrowser\" -- added missing error messages on session timeout -- support for mod\_proxy forward with ssl, see \<\\> -- added toolbar icons for add, remove and refresh action - -**fixed bugs** - -- fixed javascript error on loginwindow cancelbutton click -- fixed bug with non default git repository directory, see \<\\> - -**library updates** - -- upgraded jersey to version 1.8 -- upgraded jgit to version 1.0.0.201106090707-r - -## SCM-Manager 1.4 - -**improvements** - -- support for IE 9 -- using tabs for group details - -**fixed bugs** - -- fixed svn move command, see \<\\> -- fixed svn log command, see \<\\> - -**library updates** - -- upgraded jersey-ahc-client to version 1.0.2 -- upgraded jersey-client to version 1.7 -- upgraded logback to version 0.9.29 -- upgraded extjs to version 3.4.0 - -## SCM-Manager 1.3 - -**improvements** - -- added a client api -- added a commandline client -- added support for proxy servers, see \<\\> -- improved plugin page -- improved session timeout handling, see \<\\> -- move logging configuration to \"conf\" folder of scm-server - -**fixed bugs** - -- svn: fixed wrong content-length in DAVServlet, see \<\\> -- svn: fixed wrong encoding, see \<\\> - -**library updates** - -- upgraded jetty to version 7.4.2.v20110526 -- upgraded google guice to version 3.0 -- upgraded ehcache to version 2.4.2 -- upgraded freemarker to version 2.3.18 -- upgraded jersey to version 1.7 - -## SCM-Manager 1.2 - -**improvements** - -- added a \"changesetviewer\" -- using tabs for repository configuration -- added a configuration wizard for mercurial -- the date format is now configurable -- added a repository information panel -- new cgi api -- added subversion compatibility switches, see \<\\> - -**fixed bugs** - -- fixed ssl support in scm-server, see \<\\> -- fixed ssl support in mercurial cgi servlet, see \<\\> -- fixed a browser window resize bug, see \<\\> -- fixed bug with spaces in the scm home path, see \<\\> - -**library updates** - -- upgrade freemarker to version 2.3.16 -- upgrade jersey to version 1.6 -- upgrade ehcache to version 2.4.1 -- upgrade jgit to version 0.12.1 - -## SCM-Manager 1.1 - -- Support for Unix-Daemons and Windows-Services -- Support for localization -- German localization -- Help tooltips -- New Plugin-Backend diff --git a/docs/release notes 1.39 - 1.20.md b/docs/release notes 1.39 - 1.20.md deleted file mode 100644 index 7ddf77a5b7..0000000000 --- a/docs/release notes 1.39 - 1.20.md +++ /dev/null @@ -1,642 +0,0 @@ -# Release Notes 1.39 - 1.20 - -SCM-Manager 1.39 ----------------- - -**improvements** - -- created rpm and deb packages for scm-server -- improve error handling of permission system -- set DefaultCGIExecutor logger level to debug instead of trace -- added tcpip dependency for scm-server windows service -- implemented health checks for mercurial and git repositories -- implemented marker interface for plugin class loaders to make it - easier to find class loader leaks - - - -**fixed bugs** - -- fix mailto links -- fix automatic start as service on windows server 2012, see \<\\> -- fix open webserver port \< 1024 as non privileged user -- encode user and group names for rest requests, see \<\\> -- translate path for scmp plugin installation, see \<\\> -- remove antiJARLocking attribute from context.xml, because it is no - longer supported by tomcat 8 -- fix possible class loader leak -- fix IndentXMLStreamWriterTest on windows -- fix marshalling exception on plugin installation with rest api, see - \<\\> - - - -**library updates** - -- update mustache to version 0.8.15 -- update jgit to version 3.4.0.201406110918-r -- update commons-beanutils to version 1.9.2 -- update commons-daemon to version 1.0.15 - -SCM-Manager 1.38 ----------------- - -**fixed bugs** - -- fix NoClassDefFoundError in scm-cli-client, see issue \<\\> -- escape backslash in checkout url, see \<\\> -- fixed a circular guice dependency -- do not use subject \"run as\" for administration context, because it - could affect other threads -- fix a linkage error on Util.nonNull, see \<\\> -- fix wrong date format in logging configuration - -SCM-Manager 1.37 ----------------- - -**improvements** - -- improved git error messages for failed authentication and not enough - permissions -- improve error handling for failed authentication and not enough - privileges -- added date to log pattern -- update last modified date of a repository after each push -- added hidden last modified column to repository grid - - - -**fixed bugs** - -- resolve dependency resolution conflicts, see \<\\>, - \<\\> and \<\\> -- fix basic authentication for urls which contain a username but - without password, see \<\\> -- subversion repositories are not closed correctly, see \<\\> -- use a more robust check if html5 localStorage is available, see - \<\\> -- subversion cannot delete properties, see \<\\> - - - -**library updates** - -- update jetty to version 7.6.15.v20140411 -- update svnkit to version 1.8.5-scm1 -- update jgit to version 3.3.2.201404171909-r -- update logback to version 1.1.2 -- update slf4j to version 1.7.7 -- update commons-code to version 1.9 - -SCM-Manager 1.36 ----------------- - -**improvements** - -- added feature to set custom realm description, see [PR - 16](https://bitbucket.org/sdorra/scm-manager/pull-request/16/add-feature-to-set-custom-realm) -- added option to skip failed authenticators -- cli-client: allow retrieving repositories by using type/name instead - of repository id -- implemented repository health checks - - - -**fixed bugs** - -- solve classloading issues for plugin classes -- fix changing passwords which a shorter than 5 chars, see issue - \<\\> -- fix possible npe on authentication, see issue \<\\> -- fix exception on login, if an external authenticator returns a - changed user object -- basic auth filter should return 403 instead of 401 for wrong - credentials, see issue \<\\> -- fix bug with passwords which contains a colon, see \<\\> -- fix double slash for append and getCompleteUrl of HttpUtil -- fix bug with some special chars in SearchUtil -- fix mercurial out of scope exception on startup - - - -**library updates** - -- update args4j 2.0.26 -- update svnkit to version 1.8.4-scm1 -- update jgit to 3.3.0.201403021825-r -- update shiro to version 1.2.3 -- update jersey to version 1.18.1 -- update logback to version 1.1.1 -- update slf4j to version 1.7.6 -- update commons-beanutils to version 1.9.1 - -SCM-Manager 1.35 ----------------- - -**improvements** - -- Spanish translation, see [PR - 9](https://bitbucket.org/sdorra/scm-manager/pull-request/9/spanish-translation) - thanks to [Ángel L. - García](https://bitbucket.org/algarcia) -- added auto-login filter system, see [PR - 4](https://bitbucket.org/sdorra/scm-manager/pull-request/4/modifications-for-auto-login) - thanks to [Clemens Rabe](https://bitbucket.org/seeraven) -- added property to disable escaping for blame, browse, log command - and hooks, see \<\\> -- remove cancel button on login window if anonymous access is - disabled, see \<\\> -- syntax highlighting for c, h, hh and cc files, see [PR - 11](https://bitbucket.org/sdorra/scm-manager/pull-request/11/c-java-extensions-added-to) - thanks to [pankaj azad](https://bitbucket.org/pankajazad) -- custom subversion collection renderer -- use full message instead of short message for git commits, see - \<\\> -- improved german translation, see [PR - 5](https://bitbucket.org/sdorra/scm-manager/pull-request/5/german-translation-adjusted/diff) - thanks to [Ahmed Saad](https://bitbucket.org/saadous) -- use same validation rules for user and group names, see \<\\> -- added brushes for applescript and sass - - - -**fixed bugs** - -- fixed file leak, see \<\\> -- fixed double escaping, see \<\\> -- fixed python path for scm mercurial packages, see \<\\> -- remove setContentLength with -1 to fix CGI on jetty 9, see \<\\> -- retry delete up to 5 sec to fix problem with windows locking, see - \<\\> -- fix wrong commit and source url on git repositories with reverse - proxy, see \<\\> -- use work directory instead of temp directory for scm-manager webapp, - see \<\\> -- fix wrong sql brush filename, see \<\\> - - - -**library updates** - -- update jetty to 7.6.14.v20131031 -- update jersey to 1.18 -- update svnkit to 1.7.10-scm4 -- update jgit to 3.2.0.201312181205-r -- update enunciate to 1.28 -- update mustasche to 0.8.14 -- update javahg to 0.7 - -SCM-Manager 1.34 ----------------- - -**improvements** - -- allow multi line mercurial messages -- change order of permission column and use a more robust cell editor - check -- added api for changing diff output format -- added support for glassfish 4, see \<\\> -- added configuration changed event -- implement login attempt handler to handle failed authentications - - - -**fixed bugs** - -- fix bug with user events and decorated user managers -- fix hg push fails with \'URLError\' object has no attribute - \'read\', see \<\\> -- fix CommandNotSupportedException for git outgoing command -- fix detection of non bare repositories as pull source -- fix scm behind reverse proxy on root: svn not working, see \<\\> -- fix permission caching for logged in users -- fix possible npe with unpacked war files, see \<\\> -- fix escaping bug in SearchUtil, see \<\\> -- avoid duplicate members in groups, see \<\\> -- fix store and load method of xml configuration entry store -- fix out of scope exception on access hgcontext, see \<\\> - - - -**library updates** - -- update jetty to 7.6.13.v20130916 -- update guava to version 15.0 - -SCM-Manager 1.33 ----------------- - -**improvements** - -- added api to bypass changeset pre processors during hook -- added api to send messages back to scm client during hook -- create scm-client-impl jar with all dependencies -- introduce Event annotation to mark event classes which are - receiveable over the event system - - - -**fixed bugs** - -- fix login window scrollbars on linux with firefox 21, see \<\\> -- fix name resolution for git repositories with working copy, see - \<\\> -- fix handling of \"svn lock\", see \<\\> -- fix handling of \"svn copy\", see \<\\> -- clear authorization cache, when a group has changed, see \<\\> -- fix wrong svn hook error messages -- fix wrong sytem account e-mails, use scm-manager.org instead of - scm-manager.com -- implement svn cat during pre receive repository hooks -- fix handling of pending changesets during pre receive repository - hooks - - - -**library updates** - -- update jgit to 3.0.0.201306101825-r -- update args4j to version 2.0.25 -- update freemarker to version 2.3.20 -- update enunciate to version 1.27 -- update ehcache to version 2.6.6 -- update to svnkit 1.7.10-scm3 -- update mustache to version 0.8.13 - -SCM-Manager 1.32 ----------------- - -**improvements** - -- added support for subversion 1.8 and ra\_serf (\<\\>, - \<\\>) -- added detection eclipse jetty (standalone) to - ServletContainerDetector (pull request 3) - - - -**fixed bugs** - -- fix loading of cache configurations from plugins -- resolve conflicts for plugins and plugin dependencies -- fix parsing of security.xml on older jre\'s (\<\\>) -- fix source, commit, etc. views of mercurial on systems were the home - directory is not writable (\<\\>) -- fix wrong python path on mercurial homebrew installations - -SCM-Manager 1.31 ----------------- - -**improvements** - -- added first access url and credentials to readme -- option to assign global access permissions to users and groups - (\<\\>) -- store api for multiple configuration entries -- added group for all authenticated users -- implementation of a remember me system (\<\\>) -- implment incoming, outgoing, push and pull command for git and - mercurial -- display repository access permissions on info panel (\<\\>)) -- improve plugin archetype and use version 1.23 of scm-manager as - parent -- create and deploy package for rest documentation - - - -**fixed bugs** - -- fix wrong message for deleting repositories (\<\\>) -- fix button handling on repository grid with enabled archive mode - (\<\\>) -- fix missing git index view (\<\\>) -- ignore global proxy settings for mercurial callback hooks (\<\\>) -- fix registration of synchronous event handlers -- fix classpath generation with manually installed plugins (\<\\>) -- fix daemon mode on some operating systems (\<\\>) - - - -**library updates** - -- update logback to version 1.0.13 -- update svnkit to version 1.7.9-scm1 -- update jetty to 7.6.11.v20130520 -- update web-compressor to version 1.5 -- update mustache to version 0.8.12 -- update javahg to version 0.6 -- update apache shiro to version 1.2.2 - -SCM-Manager 1.30 ----------------- - -**fixed bugs** - -- fix missing copy strategy in guava cache configuration - -SCM-Manager 1.29 ----------------- - -**improvements** - -- use guava as default cache implementation (\<\\>) -- merge cache configuration from default location, config directory - and plugins (\<\\>) -- create a copy of tag collections to reduce memory on caching - (\<\\>) -- added configuration for authorization cache (\<\\>) -- default authentication handler should always be the first in the - authentication chain -- improve logging of BootstrapUtil -- implemented a child first plugin classloader strategy -- use template engine and repository service for git repository page - (\<\\>) - - - -**fixed bugs** - -- synchronize getCache method of cache manager implementations - (\<\\>) -- create a copy of search result collection to reduce memory of caches - (\<\\>) -- send mercurial hook error messages to client (\<\\>) -- use content type text/html for mercurial error messages, if the - client accept it (\<\\>) -- scm-svn-plugin does not handle modified paths on pre-receive hooks - (\<\\>) -- use a initial capacity of one for subversion hook changesets -- fix wrong handling of git file hooks (\<\\>) -- sonia.scm.net.HttpRequest.appendValues() adds parameter values twice - (\<\\>) - - - -**library updates** - -- update ehcache to version 2.6.5 -- update jersey to version 1.17.1 -- update guava to version 14.0.1 -- update logback to version 1.0.11 -- update slf4j to version 1.7.5 -- update mustache to version 0.8.11 -- update jgit to version 2.3.1.201302201838-r -- update maven-aether-provider to version 3.0.5 - -SCM-Manager 1.28 ----------------- - -**improvements** - -- added scm.home example for windows, see \<\\> -- disable directory listings on default scm-server configuration -- respect subscriber annotation on event bus registration -- register every injectable object to event bus -- enable tab scrolling for repository setting tabs -- use async cache for scm realm -- improve manager exception handling - - - -**fixed bugs** - -- fix path traversal vulnerability in git changelog api, see \<\\> -- fix possible crlf injections, see \<\\> -- fix admin access vulnerability in user repository creation, see - \<\\> -- fix circular proxy error on binding -- protect mustache resources -- fix eager singleton loading - -SCM-Manager 1.27 ----------------- - -**improvements** - -- exclude commons-logging and use jcl-over-slf4j instead -- icons of repository browser should be clickable -- post authentication events to the new event system - - - -**fixed bugs** - -- fix binding of extensions with eager singleton scope -- fix bug with registration of multiple authentication listeners -- fix localStorage detection for ie 6 and 7 -- fix hover links for ie \>= 8, see \<\\> - -SCM-Manager 1.26 ----------------- - -**improvements** - -- use localStorage to store state of the user interface -- improve logging of plugin installer -- find and bind extension points automatically -- added option to disable the last commit for browse command -- added recursive option to browse command -- added option to disable sub repository detection of browse command - - - -**fixed bugs** - -- normalize urls for BaseUrlFilter to prevent redirect loops, see - \<\\> -- fix privileged action is not executed, if the user is already an - admin -- added missing id for security navigation section -- synchronize getChangeset method of hook events and call registered - pre processors before the changesets are returned to hook - - - -**library updates** - -- update jersey to version 1.17 - -SCM-Manager 1.25 ----------------- - -**improvements** - -- added feature api for specific repository types -- improve logging of plugin installer - - - -**fixed bugs** - -- fix svn make and put with Polish characters in path, see \<\\> -- fix bookmarkable support for ie, see \<\\> -- call ui repository open listener, no matter which permission the - user has -- fix IllegalArgumentException with nested privileged actions -- fix installing plugin package breaks classpath.xml, see \<\\> - - - -**library updates** - -- update svnkit to version 1.7.8-scm1 -- update ehcache to version 2.6.3 -- update mustache to version 0.8.9 -- update jgit to version 2.2.0.201212191850-r -- update enunciate to version 1.26.2 - -SCM-Manager 1.24 ----------------- - -**fixed bugs** - -- fix wrong default date format - -SCM-Manager 1.23 ----------------- - -**improvements** - -- new event api based on guavas EventBus -- added option to exclude hosts from proxy, see \<\\> -- set name for different Threads to simplify debugging -- added eager singleton scope for injection -- added blob store api, to store unstructured data -- added data store api, to store structured data -- added decorator api for manager objets -- use moment.js to format dates in ui -- use javahg to retrieve changesets from a mercurial hook -- prepare server-config.xml for request logging -- improve javadoc - - - -**fixed bugs** - -- use system environment when executing \"hg create\" -- fix build from source, see \<\\> -- svn mergeinfo returns wrong results, see \<\\> -- svn diff fails if the path contains spaces, see \<\\> - and \<\\> -- BasicPropertiesAware should be implement Serializable -- changeset.id for mercurial changesets should always return a - complete node id, \<\\> -- fix mercurial sub repository detection in source browser -- fix non closing client response - - - -**library updates** - -- update selenium to version 2.28.0 -- update svnkit to version 1.7.6-scm3 -- update logback to version 1.0.9 -- update junit to 4.11 -- update jetty to version 7.6.8.v20121106 -- update ehcache to version 2.6.2 -- update javahg to version 0.5 -- update jersey to version 1.16 - -SCM-Manager 1.22 ----------------- - -**improvements** - -- store expanded/collapsed state of groupingviews across sessions, see - \<\\> -- added favicon and new logo -- added method to read templates from a reader -- added repository type icons to grid - - - -**fixed bugs** - -- fix permission autocomplete, see \<\\> - - - -**library updates** - -- update mustache.java to version 0.8.8 -- update mockito to version 1.9.5 - -SCM-Manager 1.21 ----------------- - -**improvements** - -- reimplment the complete security model on top of apache shiro -- allow execution of administration tasks without an active http - session -- use shorter repository ids -- added option to install plugin packages -- added option to display mercurial revisions as part of the node id, - see \<\\> -- improve performance and memory consumption of svn log command -- do not log sensitive cgi env variables - - - -**fixed bugs** - -- fix freezing configuration form on ie, see \<\\> -- fix wrong branch informations of git repository hooks, \<\\> and \<\\> -- fix bug in history of subversion repositories -- fix wrong mercurial changeset ids during hooks - - - -**library updates** - -- update google guava to version 13.0.1 -- update jetty to version 7.6.7.v20120910 -- update jersey to version 1.14 -- update args4j to version 2.0.22 -- update jgit to 2.1.0.201209190230-r -- update enunciate to version 1.26.1 -- update mustache to version 0.8.7 -- update slf4j to version 1.7.2 - -SCM-Manager 1.20 ----------------- - -**improvements** - -- added java.awt.headless system property to server startup scripts -- strip changeset ids to 12 chars -- use eternal caches for new repository api -- added placeholder to commit view - - - -**fixed bugs** - -- fix non closing \"hg serve\" processes -- fix error on changing branches in commit viewer -- fix wrong file modifications on git changeset overview - - - -**library updates** - -- update logback to version 1.0.7 - -[Release 1.19 - 1.0](release%20notes%201.19%20-%201.0.md) diff --git a/docs/release-notes.md b/docs/release-notes.md deleted file mode 100644 index 8b60230ace..0000000000 --- a/docs/release-notes.md +++ /dev/null @@ -1,528 +0,0 @@ -**note** - -- Versions prior to 1.36 are creating incompatible subversion - repositories, if the subversion option \"with 1.7 Compatible\" is - enabled. [read more](healthchecks/svn-incompatible-dbformat.md) -- since version 1.18 scm-manager requires mercurial 1.9 or newer -- since version 1.49 Java 7 or newer is required -- version 1.58 and 1.59 are not working on java 7, but version 1.60 - restored java 7 support -- java 9 and 10 are supported since 1.60 - -SCM-Manager 1.60 ----------------- - -**fixed bugs** - -- restored java 7 compatibility (broken since 1.58), see \<\\> and \<\\> -- fixed build on java 9 -- fixed execution on java 9 and 10 - - - -**improvements** - -- encrypt cli configuration with aes instead of pbe, see \<\\> and \<\\> - - - -**library updates** - -- update commons-daemon to version 1.1.0 - -SCM-Manager 1.59 ----------------- - -**fixed bugs** - -- mercurial: fix hgweb execution for mercurial versions prior 4.1, see - [\#976](https://bitbucket.org/sdorra/scm-manager/issues/976/issue-with-158-and-mercurial) -- mercurial: make {extras} work on old versions of Hg, see [PR - \#41](https://bitbucket.org/sdorra/scm-manager/pull-requests/41/make-extras-work-on-old-versions-of-hg/diff) - and - [\#971](https://bitbucket.org/sdorra/scm-manager/issues/971/commit-listening-requires-at-least) - -SCM-Manager 1.58 ----------------- - -**improvements** - -- mercurial: support for httppostargs protocol, see \<\\> -- mercurial: prevent - [CVE-2018-1000132](https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-1000132), - see \<\\> -- mercurial: dded option to disable ssl validation for scm hooks, see - \<\\> -- removed never released scm-dao-orientdb module - - - -**library updates** - -- update javahg to 0.13 -- update commons-beanutils to 1.9.3 -- update commons-collections to 3.2.2 -- update httpclient to 4.5.5 -- update slf4j to 1.7.25 -- update logback to 1.2.3 -- update jackson to 1.9.13 -- update apache shiro to version 1.3.2 -- update from sonatype aether to eclipse aether version 1.1.0 - -SCM-Manager 1.57 ----------------- - -**improvements** - -- treat update of a git tag as delete and create for hooks - - - -**fixed bugs** - -- fixed handling of resources with spaces in its id, see \<\\> - - - -**library updates** - -- update svnkit to version 1.9.0-scm3 - -SCM-Manager 1.56 ----------------- - -**fixed bugs** - -- fixed high cpu load after subversion client connection abort, see - \<\\> -- fix integer overflow of request with body larger than 4gb, see - \<\\> - -SCM-Manager 1.55 ----------------- - -**improvements** - -- added option to disallow non fast-forward git pushes - - - -**fixed bugs** - -- fixes usage of named cache configurations, see \<\\> -- fixed update of git repositories with empty git default branch, see - issue \<\\> -- remove work directory after package upgrade, see \<\\> -- prevent binary data in mercurial {extras} from interfering with - UTF-8 decoding, see - [\#PR-39](https://bitbucket.org/sdorra/scm-manager/pull-requests/39) - - - -**library updates** - -- update jgit to version v4.5.3.201708160445-r-scm1 -- update svnkit to version 1.9.0-scm1 - -SCM-Manager 1.54 ----------------- - -**improvements** - -- added experimetal support for git-lfs, - [\#PR-27](https://bitbucket.org/sdorra/scm-manager/pull-requests/27) -- improve git client detection to include jgit -- git repositories are now accessible with the \".git\" suffix - - - -**fixed bugs** - -- fix repository browsing with mercurial 4.x -- fixing test execution on german / windows machines - - - -**library updates** - -- update jgit to v4.5.2.201704071617-r-scm1 -- update javahg to 0.8-scm1 -- update jetty to version 1.19.4 -- update jetty to version 7.6.21.v20160908 - -SCM-Manager 1.53 ----------------- - -**fixed bugs** - -- fix jax-rs classpath conflict, see \<\\> - - - -**library updates** - -- update nativepkg-maven-plugin to version 1.1.4 - -SCM-Manager 1.52 ----------------- - -**improvements** - -- added support for gtld email domains, see \<\\> -- improved performance by creating an adapter between scm and shiro - caches, see \<\\> -- improved rest api documentation, see - - - - -**library updates** - -- update svnkit to version 1.8.15-scm1 -- update enunciate to version 2.9.1 - -SCM-Manager 1.51 ----------------- - -**improvements** - -- update svnkit to version 1.8.14-scm1 in order to support subversion - 1.9 new fsfs repository format, see \<\\> - - - -**fixed bugs** - -- fix wrong subversion urls behind a reverse proxy, see \<\\> -- svn: fix wrong error message during commit on a locked file, see - \<\\> -- fix wrong key usage during encoding in DefaultCipherHandler, see - \<\\> - - - -**library updates** - -- update jersey to version 1.19.3 -- update slf4j to version 1.7.22 -- update logback to version 1.1.10 -- updated jgit v4.5.0.201609210915-r-scm1 -- fix wrong subversion urls behind a reverse proxy, see \<\\> - -SCM-Manager 1.50 ----------------- - -**improvements** - -- added reusable components for branch and tag combo boxes -- option to define default branch for git repositories \<\\> -- added primary principal as request attribute to allow subject - logging for access logs, see \<\\> -- treat HEAD, OPTIONS and TRACE as mercurial read requests not only - GET, see issue \<\\> -- added new hook context api for tags - - - -**fixed bugs** - -- send http status code 401 unauthorized on failed git authentication, - see issue \<\\> -- fix npe when GitHookBranchProvider tries to collect a tag as branch, - see issue \<\\> - -SCM-Manager 1.49 ----------------- - -**improvements** - -- reduce event bus logging -- added RepositoryHookITCase to test repository post receive hooks - - - -**fixed bugs** - -- escape url parameters ub UrlBuilder in order to fix \<\\> -- assign revision field in constructor FileObjectWrapper, fix - \<\\> -- IE: Web Interface Only Showing Border and no Login Prompt, see - \<\\> -- fix guice javadoc link - - - -**library updates** - -- update apache shiro to version 1.3.0 -- updated jgit 4.4.0.201606070830-r-scm1, see \<\\> - - - -**breaking changes** - -- SCM-Manager 1.49 requires at least Java 7 - -SCM-Manager 1.48 ----------------- - -**improvements** - -- added request uri to mdc logging context -- added request method to mdc filter -- log authorization summary to trace level -- improve logging of AuthorizationCollector -- improved authorization cache invalidation -- improve modification events to pass the item before it was modified - to the subscriber - - - -**fixed bugs** - -- fixed bug in equals method of Permission object -- fixed syntax highlight for bash/sh, see issue \<\\> -- added missing name of repository to access denied exceptions - - - -**library updates** - -- update apache shiro to version 1.2.5 - -SCM-Manager 1.47 ----------------- - -**improvements** - -- added implmentation for running git gc in an configurable interval, - see \<\\> -- implemented small scheduler engine -- focus same repository tab as was selected previously, see \<\\> -- added experimental XSRF protection, see \<\\> -- Add Jetty host interface variable. Allows to run a specific - interface or locahost instead of just all interfaces. -- added option for plugins to change ssl context -- case insensitive sorting the of name column, see - [\#PR-25](https://bitbucket.org/sdorra/scm-manager/pull-requests/25/case-insensitive-sorting-of-the-name) - - - -**fixed bugs** - -- removed broken maven repositories -- do not swallow the ScmSecurityException in PermissionFilter -- fix order of script resources in production stage, see \<\\> -- JsonContentTransformer should not fail on unknown json properties -- getCompleteUrl of HttpUtil should now respect forwarding headers, - see issue \<\\> -- fix wrong file permissions as mentioned in \<\\> -- update commons-daemon-native to version 1.0.15.1 to fix scm-server - start on macos - - - -**library updates** - -- update enunciate to version 1.31 -- update jetty to version 7.6.19.v20160209 -- update jersey to version 1.19.1 -- update logback to version 1.1.7 -- update slf4j to version 1.7.21 -- update shiro to version 1.2.4 - -SCM-Manager 1.46 ----------------- - -**improvements** - -- link modification to files on commit panel, see \<\\> -- added to branch switcher to repository browser, see \<\\> -- expose latest changeset id of branch in rest api -- use cached thread pool to process mercurial process error streams -- new advanced http client, see \<\\> - - - -**fixed bugs** - -- fix rendering of bottom toolbar in repository browser, if path is - null -- do not show error message for syntax highliting on txt and cs files, - see \<\\> -- fix a bug in git submodule detection -- fix wrong uft-8 filenames on raw download, see \<\\> -- fix missing separator char for post values with same name in http - client api -- set content-length header on post requests, see \<\\> - - - -**library updates** - -- update enunciate to version 1.30.1 -- update jgit to version 3.7.1.201504261725-r-scm1 -- update logback to version 1.1.3 -- update slf4j to version 1.7.12 - -SCM-Manager 1.45 ----------------- - -**improvements** - -- improve remove repository confirmation dialog -- introducing HookBranchProvider to get informations about changed - branches during a hook, see \<\\> -- return a changeset property for closed mercurial branches -- avoid receiving duplicate git commits, during a push with multiple - new branches -- retrieve only new git commits, do not collect commits from existing - branches, see \<\\> -- usability of init script improved. - - - -**fixed bugs** - -- added missing shebang statement in create user script, see \<\\> -- increase timeout for directory import from 30 seconds to 5 minutes, - to fix \<\\> -- fixed basic authentication with non ascii passwords, see \<\\> - - - -**library updates** - -- update jersey to version 1.19 -- update slf4j to version 1.7.10 - -SCM-Manager 1.44 ----------------- - -**library updates** - -- update jgit to version 3.5.3.201412180710-r in order to fix - [CVE-2014-9390](http://article.gmane.org/gmane.linux.kernel/1853266) -- update jersey to version 1.18.3 -- update slf4j to version 1.7.9 - -SCM-Manager 1.43 ----------------- - -**improvements** - -- new repository import wizard -- added support for remote urls to push and pull apis (implemented by - git and hg) -- added api for bundle/unbundle command to repository apis - (implemented by svn) -- implemented AdvancedImportHandler which gives more control over the - import result than ImportHandler - - - -**fixed bugs** - -- create default accounts only, if no other user exists in the dao -- do not try to convert git changesets from a receive command of type - delete, see \<\\> -- added utf-8 response encoding for git quick commit view, - [\#PR-17](https://bitbucket.org/sdorra/scm-manager/pull-request/17/utf-8-response-encoding-for-git-quick) -- load advanced plugin configuration from plugin directory and from - root of scm home -- fix wrong changeset count for git push and pull commands - - - -**library updates** - -- update jersey to version 1.18.2 - -SCM-Manager 1.42 ----------------- - -**improvements** - -- added comment about POODLE vulnerability to https configuration -- added extension point for HttpSessionListener -- implement util class for AutoLoginModules to mark request as - completed or send redirects from an AutoLoginModule - - - -**fixed bugs** - -- use base uri from request for git quick repository view, see - \<\\> - - - -**library updates** - -- update mustache to version 0.8.17 -- update mockito to version 1.10.8 - -SCM-Manager 1.41 ----------------- - -**improvements** - -- improve performance for simple subversion changeset paging, see - \<\\> -- added cli sub command to generate unique keys -- added cli sub command to encrypt passwords -- added mdc logging variables username, client\_ip and client\_host -- use default jersey client implementation instead of ahc - - - -**fixed bugs** - -- subversion fails to commit filenames containing url-encoded - character \"/\", see \<\\> -- fix some missing file extensions for syntax highlighter -- fix scm-server stop method on windows, see \<\\> - - - -**library updates** - -- update jetty to version 7.6.16.v20140903 -- update jgit to version 3.4.1.201406201815-r -- update mustache to version 0.8.16 -- update svnkit to version 1.8.5-scm2 - -SCM-Manager 1.40 ----------------- - -**improvements** - -- added display name to web.xml - - - -**fixed bugs** - -- remove url parameters before building base url -- fixed wrong directory permissions on rpm installations -- fixed missing preinstall scripts in rpm and deb packages - - - -**library updates** - -- update args4j to version 2.0.28 - -[Release 1.39 - 1.20](release%20notes%201.39%20-%201.20.md) diff --git a/docs/scheduler-plugin.md b/docs/scheduler-plugin.md deleted file mode 100644 index e7cf622f30..0000000000 --- a/docs/scheduler-plugin.md +++ /dev/null @@ -1,89 +0,0 @@ -# scm-scheduler-plugin - -The scheduler plugin provides an api for other plugins to execute scheduled jobs. The plugin is based on the [quartz project](http://quartz-scheduler.org/). - -## Configuration - -The plugin needs no further configuration. - -## API Usage - -First you have to add the dependency to your pom.xml e.g.: - -```xml - - sonia.scm.plugins - scm-scheduler-plugin - 1.0 - -``` - -But note you should use at least version 1.22 of scm-plugins as parent for your plugin. - -Now you can get a [SchedulerFactory](http://www.quartz-scheduler.org/api/2.0.0/org/quartz/SchedulerFactory.html) via injection. - -For Example: - -```java -public class ReportHandler { - - private final SchedulerFactory schedulerFactory; - - @Inject - public ReportContextListener(SchedulerFactory schedulerFactory){ - this.schedulerFactory = schedulerFactory; - } - -} -``` - -With the SchedulerFactory [SchedulerFactory](http://www.quartz-scheduler.org/api/2.0.0/org/quartz/SchedulerFactory.html) you can schedule [Jobs](http://www.quartz-scheduler.org/api/2.0.0/org/quartz/Job.html). To simplify the steps to schedule a job, the scm-scheduler-plugin comes with a helper class called Schedulers. - -### Notes - -* Schedulers must always be executed by an administrator or in an administrative context. Jobs which are executed by a scheduler are executed with administrator privileges. -* Each job is able to get dependencies via injection. - -### Further reading - -* [Quartz Overview](http://www.quartz-scheduler.org/overview) -* [Quartz Cron Trigger](http://www.quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/crontrigger) -* [Quartz Examples](http://www.quartz-scheduler.org/documentation/quartz-2.1.x/examples) - -### Complete Example - -In the following example a ReportJob is executed every minute since the start of scm-manager. - -```java -@Extension -public class ReportContextListener implements ServletContextListener { - - private final AdministrationContext adminContext; - private final SchedulerFactory schedulerFactory; - - @Inject - public ReportContextListener(AdministrationContext adminContext, - SchedulerFactory schedulerFactory){ - this.adminContext = adminContext; - this.schedulerFactory = schedulerFactory; - } - - @Override - public void contextDestroyed(ServletContextEvent sce) {} - - @Override - public void contextInitialized(ServletContextEvent sce){ - Schedulers.schedule(adminContext, schedulerFactory, - SimpleScheduleBuilder.repeatMinutelyForever(), ReportJob.class); - } - - private static class ReportJob implements Job { - - @Override - public void execute(JobExecutionContext context) throws JobExecutionException { - // do something minutely - System.out.println(new Date()); - } - } -} -``` diff --git a/docs/scm-plugins.md b/docs/scm-plugins.md deleted file mode 100644 index 1d672d3edb..0000000000 --- a/docs/scm-plugins.md +++ /dev/null @@ -1,47 +0,0 @@ -# Plugins - -### Authentication - -| Plugin Name | Description | Core-Plugin | Repository | -| --- | --- | --- | --- | -| scm-activedirectory-auth-plugin | Plugin for using Active Directory as an authentication handler. Currently only supports running on Windows in a 32-bit JVM. | | | -| scm-auth-ldap-plugin | Plugin for using LDAP as an authentication handler. | | | -| scm-pam-plugin | This plugin enables PAM-Authentication for SCM-Manager. | | | -| scm-crowd-plugin | Plugin for using Atlassian Crowd as an authentication handler. | | | - -### Continuous Integration - -| Plugin Name | Description | Core-Plugin | Repository | -| --- | --- | --- | --- | -| scm-bamboo-plugin | Post receive hook for Atlassian Bamboo. | | | -| scm-jenkins-plugin | This plugin will ping your Jenkins CI server when a new commit is pushed to SCM-Manager. | | | - -### Development - -| Plugin Name | Description | Core-Plugin | Repository | -| --- | --- | --- | --- | -| scm-graph-plugin | Creates a Google Guice injection graph. | | | - -### Issue-Tracking - -| Plugin Name | Description | Core-Plugin | Repository | -| --- | --- | --- | --- | -| scm-jira-plugin | This plugin integrates Atlassian JIRA to SCM-Manager. | | | - -### Miscellaneous - -| Plugin Name | Description | Core-Plugin | Repository | -| --- | --- | --- | --- | -| scm-activity-plugin | Shows the latest activity from your repositories. || | -| scm-gravatar-plugin | Gravatar icons for the changesetviewer. | | | -| scm-pathwp-plugin | This plugin adds path write protection for repositories. || | -| scm-userrepo-plugin | This plugin allows regular users to create repositories. || | - -### Version Control Systems - -| Plugin Name | Description | Core-Plugin | Repository | -| --- | --- | --- | --- | -| scm-hg-plugin | Support for the version control system Mercurial. | X | | -| scm-git-plugin | Support for the version control system Git. | X | | -| scm-svn-plugin | Support for the version control system Subversion. | X | | -| scm-bzr-plugin | Support for the version control system Bazaar. | | | diff --git a/docs/screens.md b/docs/screens.md deleted file mode 100644 index f220b343de..0000000000 --- a/docs/screens.md +++ /dev/null @@ -1,32 +0,0 @@ -# Screenshots - - - -## Screenshots pre 1.12 - -[![Login](screenshots/login.thumb.png)\ -*Login*](screenshots/login.png "Login") - -[![Change Password](screenshots/change-password.thumb.png)\ -*Change Password*](screenshots/change-password.png "Change Password") - -[![Repository Configuration](screenshots/repository-config.thumb.png)\ -*Repository Configuration*](screenshots/repository-config.png "Repository Configuration") - -[![Repository Details](screenshots/repository-details.thumb.png)\ -*Repository Details*](screenshots/repository-details.png "Repository Details") - -[![Repository Overview](screenshots/repository-overview.thumb.png)\ -*Repository Overview*](screenshots/repository-overview.png "Repository Overview") - -[![User Overview](screenshots/user-overview.thumb.png)\ -*User Overview*](screenshots/user-overview.png "User Overview") - -[![Plugin Overview](screenshots/plugin-overview.thumb.png)\ -*Plugin Overview*](screenshots/plugin-overview.png "Plugin Overview") - -[![Mercurial Configuration Wizard](screenshots/mercurial-wizard.thumb.png)\ -*Mercurial Configuration Wizard*](screenshots/mercurial-wizard.thumb.png "Mercurial Configuration Wizard") - -[![Changesetviewer (with Gravatar Plugin)](screenshots/changesetviewer-gravatar-plugin.thumb.png)\ -*Changesetviewer (with Gravatar Plugin)*](screenshots/changesetviewer-gravatar-plugin.png "Changesetviewer (with Gravatar Plugin)") diff --git a/docs/screenshots/change-password.png b/docs/screenshots/change-password.png deleted file mode 100644 index 83e87e8d11..0000000000 Binary files a/docs/screenshots/change-password.png and /dev/null differ diff --git a/docs/screenshots/change-password.thumb.png b/docs/screenshots/change-password.thumb.png deleted file mode 100644 index 9d095001a1..0000000000 Binary files a/docs/screenshots/change-password.thumb.png and /dev/null differ diff --git a/docs/screenshots/changesetviewer-gravatar-plugin.png b/docs/screenshots/changesetviewer-gravatar-plugin.png deleted file mode 100644 index a275487f69..0000000000 Binary files a/docs/screenshots/changesetviewer-gravatar-plugin.png and /dev/null differ diff --git a/docs/screenshots/changesetviewer-gravatar-plugin.thumb.png b/docs/screenshots/changesetviewer-gravatar-plugin.thumb.png deleted file mode 100644 index 280ea3cbd8..0000000000 Binary files a/docs/screenshots/changesetviewer-gravatar-plugin.thumb.png and /dev/null differ diff --git a/docs/screenshots/helicon-server-vars.png b/docs/screenshots/helicon-server-vars.png deleted file mode 100644 index ff7f198e67..0000000000 Binary files a/docs/screenshots/helicon-server-vars.png and /dev/null differ diff --git a/docs/screenshots/login.png b/docs/screenshots/login.png deleted file mode 100644 index a7f958eb02..0000000000 Binary files a/docs/screenshots/login.png and /dev/null differ diff --git a/docs/screenshots/login.thumb.png b/docs/screenshots/login.thumb.png deleted file mode 100644 index 9b4e8e2797..0000000000 Binary files a/docs/screenshots/login.thumb.png and /dev/null differ diff --git a/docs/screenshots/mercurial-wizard.png b/docs/screenshots/mercurial-wizard.png deleted file mode 100644 index a9a1a1c832..0000000000 Binary files a/docs/screenshots/mercurial-wizard.png and /dev/null differ diff --git a/docs/screenshots/mercurial-wizard.thumb.png b/docs/screenshots/mercurial-wizard.thumb.png deleted file mode 100644 index 0d8006a791..0000000000 Binary files a/docs/screenshots/mercurial-wizard.thumb.png and /dev/null differ diff --git a/docs/screenshots/permission_global.jpg b/docs/screenshots/permission_global.jpg deleted file mode 100644 index 1d49bcaffc..0000000000 Binary files a/docs/screenshots/permission_global.jpg and /dev/null differ diff --git a/docs/screenshots/permissions_global.png b/docs/screenshots/permissions_global.png deleted file mode 100644 index 79e8389676..0000000000 Binary files a/docs/screenshots/permissions_global.png and /dev/null differ diff --git a/docs/screenshots/permissions_repository.jpg b/docs/screenshots/permissions_repository.jpg deleted file mode 100644 index 9663a66776..0000000000 Binary files a/docs/screenshots/permissions_repository.jpg and /dev/null differ diff --git a/docs/screenshots/permissions_repository.png b/docs/screenshots/permissions_repository.png deleted file mode 100644 index 029204a597..0000000000 Binary files a/docs/screenshots/permissions_repository.png and /dev/null differ diff --git a/docs/screenshots/plugin-overview.png b/docs/screenshots/plugin-overview.png deleted file mode 100644 index e2fc05e694..0000000000 Binary files a/docs/screenshots/plugin-overview.png and /dev/null differ diff --git a/docs/screenshots/plugin-overview.thumb.png b/docs/screenshots/plugin-overview.thumb.png deleted file mode 100644 index e33a086190..0000000000 Binary files a/docs/screenshots/plugin-overview.thumb.png and /dev/null differ diff --git a/docs/screenshots/repository-config.png b/docs/screenshots/repository-config.png deleted file mode 100644 index 2f4c274c1d..0000000000 Binary files a/docs/screenshots/repository-config.png and /dev/null differ diff --git a/docs/screenshots/repository-config.thumb.png b/docs/screenshots/repository-config.thumb.png deleted file mode 100644 index b875acaeec..0000000000 Binary files a/docs/screenshots/repository-config.thumb.png and /dev/null differ diff --git a/docs/screenshots/repository-create.png b/docs/screenshots/repository-create.png deleted file mode 100644 index 4f8e1afe38..0000000000 Binary files a/docs/screenshots/repository-create.png and /dev/null differ diff --git a/docs/screenshots/repository-create.thumb.png b/docs/screenshots/repository-create.thumb.png deleted file mode 100644 index c3cbd76ad7..0000000000 Binary files a/docs/screenshots/repository-create.thumb.png and /dev/null differ diff --git a/docs/screenshots/repository-details.png b/docs/screenshots/repository-details.png deleted file mode 100644 index 6d0e7016c9..0000000000 Binary files a/docs/screenshots/repository-details.png and /dev/null differ diff --git a/docs/screenshots/repository-details.thumb.png b/docs/screenshots/repository-details.thumb.png deleted file mode 100644 index d0e73d03ff..0000000000 Binary files a/docs/screenshots/repository-details.thumb.png and /dev/null differ diff --git a/docs/screenshots/repository-overview.png b/docs/screenshots/repository-overview.png deleted file mode 100644 index 8d58b9dc32..0000000000 Binary files a/docs/screenshots/repository-overview.png and /dev/null differ diff --git a/docs/screenshots/repository-overview.thumb.png b/docs/screenshots/repository-overview.thumb.png deleted file mode 100644 index cb1e07f1ce..0000000000 Binary files a/docs/screenshots/repository-overview.thumb.png and /dev/null differ diff --git a/docs/screenshots/scm-hgnested-plugin.png b/docs/screenshots/scm-hgnested-plugin.png deleted file mode 100644 index f4588c95e8..0000000000 Binary files a/docs/screenshots/scm-hgnested-plugin.png and /dev/null differ diff --git a/docs/screenshots/scm-jira-plugin/jira-plugin-01.png b/docs/screenshots/scm-jira-plugin/jira-plugin-01.png deleted file mode 100644 index 7e4d488157..0000000000 Binary files a/docs/screenshots/scm-jira-plugin/jira-plugin-01.png and /dev/null differ diff --git a/docs/screenshots/scm-jira-plugin/jira-plugin-01.thumb.png b/docs/screenshots/scm-jira-plugin/jira-plugin-01.thumb.png deleted file mode 100644 index d66e38a3e8..0000000000 Binary files a/docs/screenshots/scm-jira-plugin/jira-plugin-01.thumb.png and /dev/null differ diff --git a/docs/screenshots/scm-jira-plugin/jira-plugin-02.png b/docs/screenshots/scm-jira-plugin/jira-plugin-02.png deleted file mode 100644 index 7c455b7b0e..0000000000 Binary files a/docs/screenshots/scm-jira-plugin/jira-plugin-02.png and /dev/null differ diff --git a/docs/screenshots/scm-jira-plugin/jira-plugin-02.thumb.png b/docs/screenshots/scm-jira-plugin/jira-plugin-02.thumb.png deleted file mode 100644 index 2987c1ae2b..0000000000 Binary files a/docs/screenshots/scm-jira-plugin/jira-plugin-02.thumb.png and /dev/null differ diff --git a/docs/screenshots/scm-jira-plugin/jira-plugin-03.png b/docs/screenshots/scm-jira-plugin/jira-plugin-03.png deleted file mode 100644 index c478ed7c96..0000000000 Binary files a/docs/screenshots/scm-jira-plugin/jira-plugin-03.png and /dev/null differ diff --git a/docs/screenshots/scm-jira-plugin/jira-plugin-03.thumb.png b/docs/screenshots/scm-jira-plugin/jira-plugin-03.thumb.png deleted file mode 100644 index 6be7e198da..0000000000 Binary files a/docs/screenshots/scm-jira-plugin/jira-plugin-03.thumb.png and /dev/null differ diff --git a/docs/screenshots/scm-jira-plugin/jira-plugin-04.png b/docs/screenshots/scm-jira-plugin/jira-plugin-04.png deleted file mode 100644 index cd2db62276..0000000000 Binary files a/docs/screenshots/scm-jira-plugin/jira-plugin-04.png and /dev/null differ diff --git a/docs/screenshots/scm-jira-plugin/jira-plugin-04.thumb.png b/docs/screenshots/scm-jira-plugin/jira-plugin-04.thumb.png deleted file mode 100644 index 12b2c00c3b..0000000000 Binary files a/docs/screenshots/scm-jira-plugin/jira-plugin-04.thumb.png and /dev/null differ diff --git a/docs/screenshots/scm-jira-plugin/jira-plugin-05.png b/docs/screenshots/scm-jira-plugin/jira-plugin-05.png deleted file mode 100644 index a3b08a6e6f..0000000000 Binary files a/docs/screenshots/scm-jira-plugin/jira-plugin-05.png and /dev/null differ diff --git a/docs/screenshots/scm-jira-plugin/jira-plugin-05.thumb.png b/docs/screenshots/scm-jira-plugin/jira-plugin-05.thumb.png deleted file mode 100644 index 29b775a7c8..0000000000 Binary files a/docs/screenshots/scm-jira-plugin/jira-plugin-05.thumb.png and /dev/null differ diff --git a/docs/screenshots/ssl-redirect.png b/docs/screenshots/ssl-redirect.png deleted file mode 100644 index 811c5bce92..0000000000 Binary files a/docs/screenshots/ssl-redirect.png and /dev/null differ diff --git a/docs/screenshots/user-overview.png b/docs/screenshots/user-overview.png deleted file mode 100644 index 8ee29e6d25..0000000000 Binary files a/docs/screenshots/user-overview.png and /dev/null differ diff --git a/docs/screenshots/user-overview.thumb.png b/docs/screenshots/user-overview.thumb.png deleted file mode 100644 index e1f3b5143b..0000000000 Binary files a/docs/screenshots/user-overview.thumb.png and /dev/null differ diff --git a/docs/snippet-authentication.md b/docs/snippet-authentication.md deleted file mode 100644 index 278f8d1d0a..0000000000 --- a/docs/snippet-authentication.md +++ /dev/null @@ -1,117 +0,0 @@ -# Snippet: Authentication - -```java -package sonia.scm.snippets; - -//~--- non-JDK imports -------------------------------------------------------- - -import sonia.scm.SCMContextProvider; -import sonia.scm.plugin.ext.Extension; -import sonia.scm.user.User; -import sonia.scm.web.security.AuthenticationHandler; -import sonia.scm.web.security.AuthenticationResult; -import sonia.scm.web.security.AuthenticationState; - -//~--- JDK imports ------------------------------------------------------------ - -import java.io.IOException; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Simple {@link AuthenticationHandler} example. - * - * @author Sebastian Sdorra - */ -@Extension -public class SnippetAuthentication implements AuthenticationHandler -{ - - /** Type of the {@link AuthenticationHandler} */ - public static final String TYPE = "snippet"; - - //~--- methods -------------------------------------------------------------- - - /** - * Authenticate the user by username and password. - * - * - * @param request current http request - * @param response current http response - * @param username username of the user - * @param password password of the password - * - * @return - */ - @Override - public AuthenticationResult authenticate(HttpServletRequest request, - HttpServletResponse response, String username, String password) - { - AuthenticationResult result = AuthenticationResult.NOT_FOUND; - - if ("scm".equals(username)) - { - // user found - if ("scmpwd".equals(password)) - { - // authentication success - // create a user object - User user = new User(username); - - // create the authentication result - result = new AuthenticationResult(user, AuthenticationState.SUCCESS); - } - else - { - // user found but authentication failed - result = AuthenticationResult.FAILED; - } - } - - return result; - } - - /** - * Close database connections or something else. - * - * - * @throws IOException - */ - @Override - public void close() throws IOException - { - - // do nothing - } - - /** - * Init database connections or something else. - * - * - * @param context the context of the current SCM-Manager instance. - */ - @Override - public void init(SCMContextProvider context) - { - - // do nothing - } - - //~--- get methods ---------------------------------------------------------- - - /** - * Returns the type of the {@link AuthenticationHandler} - * - * - * @return type of the {@link AuthenticationHandler} - */ - @Override - public String getType() - { - return TYPE; - } -} -``` - -[Complete source](https://bitbucket.org/sdorra/scm-code-snippets/src/tip/004-authentication) diff --git a/docs/snippet-config-group.md b/docs/snippet-config-group.md deleted file mode 100644 index d93ffadca3..0000000000 --- a/docs/snippet-config-group.md +++ /dev/null @@ -1,46 +0,0 @@ -# Snippet: Extend global configuration - -```javascript -// register the new configuration form -registerGeneralConfigPanel({ - // the xtype of the form should be configForm - xtype : 'configForm', - // title of the form - title : 'My Configuration', - // array of formular fields - items : [{ - /** - * xtype of the formular field. For a - * list of the xtype's have a look at - * http://docs.sencha.com/ext-js/3-4/#!/api/Ext.Component - **/ - xtype : 'textfield', - // label of the field - fieldLabel : 'Config name', - // name of the field - name : 'fomular-field-name', - // help for this field - helpText: 'Help for this field.', - // allow blank values - allowBlank : true - }], - - /** - * this method is called when the form is submitted. - * values - the values of the formular - **/ - onSubmit: function(values){ - // do something - }, - - /** - * this method is called when the form is load - * el - the element of the formular - **/ - onLoad: function(el){ - // do something - } -}); -``` - -[Complete source](https://bitbucket.org/sdorra/scm-code-snippets/src/tip/003-extend-global-config) diff --git a/docs/snippet-extend-navigation.md b/docs/snippet-extend-navigation.md deleted file mode 100644 index 13071b6615..0000000000 --- a/docs/snippet-extend-navigation.md +++ /dev/null @@ -1,27 +0,0 @@ -### Snippet: Extend Navigation - -```javascript -// add login callback -loginCallbacks.push(function(){ - // get the main navigation - var navPanel = Ext.getCmp('navigationPanel'); - // insert the new navigation section at the - // second position - navPanel.insertSection(1, { - title: 'My Links', - links: [{ - label: 'Link 1', - fn: function(){ - alert('Link 1'); - } - },{ - label: 'Link 2', - fn: function(){ - alert('Link 2'); - } - }] - }); -}); -``` - -[Complete source](https://bitbucket.org/sdorra/scm-code-snippets/src/tip/001-extend-navigation) diff --git a/docs/snippet-repository-tab.md b/docs/snippet-repository-tab.md deleted file mode 100644 index 2bf7567d5a..0000000000 --- a/docs/snippet-repository-tab.md +++ /dev/null @@ -1,53 +0,0 @@ -# Snippet: Add tab to repository configuration - -```javascript -/** - * Register extjs namespace for the plugin. - * http://docs.sencha.com/ext-js/3-4/#!/api/Ext-method-ns - */ -Ext.ns('Sonia.snippets'); - -Sonia.snippets.MyPanel = Ext.extend(Ext.Panel, { - - initComponent: function(){ - var config = { - // Title of the panel - title: 'My Panel' - } - - /** - * The apply method merges the initialConfig object with the config object. - * The initialConfig object is the config object from the parent panel - * (in this case Ext.Panel). - * http://docs.sencha.com/ext-js/3-4/#!/api/Ext-method-apply - */ - Ext.apply(this, Ext.apply(this.initialConfig, config)); - Sonia.snippets.MyPanel.superclass.initComponent.apply(this, arguments); - } - -}); - -/** - * Register xtype of the panel for later use and lazy initialization. - * http://docs.sencha.com/ext-js/3-4/#!/api/Ext-method-reg - */ -Ext.reg("myPanel", Sonia.snippets.MyPanel); - -/** - * Register a listener which is called, after repository is selected in the - * web interface. The listener passes the selected repository and an array - * of panels as argument. - */ -Sonia.repository.openListeners.push(function(repository, panels){ - - /** - * Append the new panel to the panels array - */ - panels.push({ - // registerd xtype for the panel - xtype: 'myPanel' - }); -}); -``` - -[Complete source](https://bitbucket.org/sdorra/scm-code-snippets/src/tip/002-repository-tab) diff --git a/docs/subrepositories.md b/docs/subrepositories.md deleted file mode 100644 index 7920b9b36a..0000000000 --- a/docs/subrepositories.md +++ /dev/null @@ -1,42 +0,0 @@ -# Mercurial Subrepositories - -In the following examples i will use the [scm-cli-client](command-line-client.md) -to create the repositories, but you can also use the web interface to -create the repositories. - -The best way to use subrepositories with scm-manager is the following. -Create a main repository and for each subrepository a mercurial -repository in scm-manager. Than add the subrepositories with the -complete url to the .hgsub file. - -```bash -java -jar scm-cli-client.jar create-repository -t hg -n main -java -jar scm-cli-client.jar create-repository -t hg -n module-1 -java -jar scm-cli-client.jar create-repository -t hg -n module-2 -hg clone http://localhost:8081/scm/hg/main -cd main -echo 'module-1 = http://localhost:8081/scm/hg/module-1' > .hgsub -echo 'module-2 = http://localhost:8081/scm/hg/module-2' >> .hgsub -hg add .hgsub -hg commit -m 'added module-1 and module-2 as subrepositories' -hg push -``` - -### Mercurial nested repositories - -If you already have nested repositories, you have to redirect the nested -repository to a real scm-manager repository. This work is done by the -[scm-hgnested-plugin](https://bitbucket.org/sdorra/scm-hgnested-plugin). -Install the -[scm-hgnested-plugin](https://bitbucket.org/sdorra/scm-hgnested-plugin) -from the plugin-center (requires scm-manager version 1.10 or higher). -Create a repository for the main repository and for each nested -repository. Configure the -[scm-hgnested-plugin](https://bitbucket.org/sdorra/scm-hgnested-plugin) -like [this](screenshots/scm-hgnested-plugin.png). - -### Further reading - -- -- -- diff --git a/docs/trac-plugin.md b/docs/trac-plugin.md deleted file mode 100644 index ebcb05d867..0000000000 --- a/docs/trac-plugin.md +++ /dev/null @@ -1,10 +0,0 @@ -# Trac Plugin - -The plugin enables the following features to integrate SCM-Manager to [Trac](http://trac.edgewall.org/): - -* Turn ticket ids in changeset descriptions to links for [Trac](http://trac.edgewall.org/) -* Updates a [Trac](http://trac.edgewall.org/) ticket if the ticket id is found in a changeset description -* Close a [Trac](http://trac.edgewall.org/) ticket if the ticket id and a resolution key word (fixed, invalid, wontfix, duplicate and worksforme) is found in the changeset description - -The plugin needs an installed [Trac XML-RPC Plugin](http://trac-hacks.org/wiki/XmlRpcPlugin) and each user which should be able to update tickets via SCM-Manager needs the XML_RPC permission in Trac. - diff --git a/docs/upgrade.md b/docs/upgrade.md deleted file mode 100644 index 60e83a070f..0000000000 --- a/docs/upgrade.md +++ /dev/null @@ -1,28 +0,0 @@ -# Upgrade to a new Version - -If you would like to update SCM-Manager, you have to do the following -steps. - -- Update all plugins: Goto the plugins panel and click every update link - -The next steps depends on the version you use. - -## Upgrade the Standalone version - -- Stop the old instance -- Rename your old version -- Download the latest version of the scm-server bundle -- Extract the new version -- If you have changed bin/scm-server or one of the files from the conf - directory, you have to make the same changes for the new version -- If you use a windows service you have to reinstall the service - (uninstallService and installService) - -## Upgrade the WebArchive (war) version - -- Download the latest version of the war bundle -- Deploy the new version -- If you have changed the WEB-INF/scm.properties or the - WEB-INF/classes/logback.xml, you have to make the same changes for - the new version. After you have done the changes you have to restart - your applicationserver. diff --git a/docs/v2/api-changes.md b/docs/v2/api-changes.md deleted file mode 100644 index ed47915261..0000000000 --- a/docs/v2/api-changes.md +++ /dev/null @@ -1,3 +0,0 @@ -# API and concepts changes from SCM-Manger v1 to v2 - -*TODO:* document api and concept changes while we're migrating plugins diff --git a/docs/v2/common-pitfall.md b/docs/v2/common-pitfall.md deleted file mode 100644 index 4026a894dd..0000000000 --- a/docs/v2/common-pitfall.md +++ /dev/null @@ -1,79 +0,0 @@ -# Common pitfall occurred while developing the SCM V2 - -## React Component is loaded unexpectedly - -### Bug - -A react component is updated without any changes in the props or states. - -### Fix - -Use the [why-did-you-update](https://github.com/maicki/why-did-you-update) library to analyze the causes of the updates. - -A common cause is the definition of [new functions in render()](https://github.com/maicki/why-did-you-update#changes-are-in-functions-only). - -### Example - -```javascript -class Main extends React.Component { - render() { - const { authenticated, links } = this.props; - const redirectUrlFactory = binder.getExtension("main.redirect", this.props); - - ... - - const ActivityRoute = ({ authenticated, links }: RouteProps) => { - return ( - } - authenticated={authenticated && links.activity.href} - /> - ); - }; - } -} - -binder.bind("main.route", ActivityRoute); -``` - -the definition of the Component like this: - -```javascript -component={() => } -``` - -triggers a re-render because: - -```javascript -() => !== () => -``` - -You can avoid it by binding this function in advance and then reusing it on all renders - -```javascript -class ActivityRoute extends React.Component { - constructor(props: Props) { - super(props); - } - - renderActivity = () => { - const { links } = this.props; - return ; - }; - - render() { - const { authenticated, links } = this.props; - - return ( - - ); - } -} - -binder.bind("main.route", ActivityRoute); -``` diff --git a/docs/v2/create-plugin.md b/docs/v2/create-plugin.md deleted file mode 100644 index a825375ee5..0000000000 --- a/docs/v2/create-plugin.md +++ /dev/null @@ -1,5 +0,0 @@ -# Create a new plugin - -There is a service which is able to create a skeleton for a new plugin: - -https://create-plugin.scm-manager.org/ diff --git a/docs/v2/getting-started.md b/docs/v2/getting-started.md deleted file mode 100644 index 34d3cea06b..0000000000 --- a/docs/v2/getting-started.md +++ /dev/null @@ -1,47 +0,0 @@ -# Getting started - -### Install Java - -SCM-Manager needs an installed Java 1.8 or newer. It is recommended to use the [oracle jre](http://java.oracle.com/). -How to check which version of Java is installed: - -```bash -java -version -``` - -Download java from [here](http://java.oracle.com/) and follow the install instructions. - -### Install SCM-Manager - -#### Standalone Server - -Download the latest version of SCM-Manager from -[Nexus](https://maven.scm-manager.org/nexus/#nexus-search;gav~sonia.scm~scm-server~2.*~~), -extract the downloaded .zip or .tar.gz archive and start SCM-Manager 2 with - -```bash -scm-server/bin/scm-server -``` - -or - -```bash -scm-server\bin\scm-server.bat -``` - -#### Docker - -To start SCM-Manager with a persistent volume on port 8080 run the following command: - -```bash -docker run -p 8080:8080 -v scm-home:/var/lib/scm --name scm scmmanager/scm-manager:2.0.0-rc6 -``` - -### First access - -Your SCM-Manager should be running on port 8080. You can access it locally via . - -| | | -| ------------ | ----------------------- | -| **Username** | scmadmin | -| **Password** | scmadmin | diff --git a/docs/webhook-plugin.md b/docs/webhook-plugin.md deleted file mode 100644 index 3d15311ba7..0000000000 --- a/docs/webhook-plugin.md +++ /dev/null @@ -1,38 +0,0 @@ -# WebHook Plugin - -### Installation - -- Login in as administrator -- Open Plugins -- Install scm-webhook-plugin -- Restart your applicationserver - -### Usage - -After the restart you should see a \"Webhooks\" tab for each repository. -You could now insert a new webhook for a repository. The url pattern is -the url of the remote webserver. It is possible to use placeholders in -the url: - -- `${repository.id}` - the id of the current repository -- `${repository.name}` - the name of the current repository -- `${first.id}` - the if of the first changeset in the push -- `${last.author.name}` - the name of the author of the last changeset in the commit - -If you enable the \"Execute on every commit\" checkbox the last and -first patterns are not available, but you could use the commit pattern -e.g: - -- `${changeset.id}` - The id of the current changeset -- `${changeset.author.name}` - The name of the author of the current changeset - -If you need more informations about the available patterns have a look -at the javadoc. Ever method which starts with a get could be used in a -pattern (Repository.getName() would be \${repository.name}): - -- [repository](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/Repository.html) -- [changeset, first and last](http://docs.scm-manager.org/apidocs/latest/sonia/scm/repository/Changeset.html) - -Since version 1.4 of the webhook-plugin there is also a global -configuration at \"Config-\>General\". Global WebHooks are executed for -every repository. diff --git a/package.json b/package.json index 6c3b45c9ca..f5194ee536 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "resolutions": { "babel-core": "7.0.0-bridge.0", - "gitdiff-parser": "https://github.com/scm-manager/gitdiff-parser#ed3fe7de73dbb0a06c3e6adbbdf22dbae6e66351", + "gitdiff-parser": "https://github.com/scm-manager/gitdiff-parser#617747460280bf4522bb84d217a9064ac8eb6d3d", "lowlight": "1.13.1" }, "babel": { diff --git a/pom.xml b/pom.xml index 8a62210a26..243a5df816 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,6 @@ https://github.com/scm-manager/scm-manager - MIT License @@ -82,7 +81,7 @@ Jenkins - https://scm-manager.ci.cloudbees.com/ + https://oss.cloudogu.com/jenkins/ @@ -105,9 +104,9 @@ - maven.scm-manager.org - scm-manager release repository - http://maven.scm-manager.org/nexus/content/groups/public + packages.scm-manager.org + scm-manager public repository + https://packages.scm-manager.org/repository/public/ @@ -115,9 +114,9 @@ - maven.scm-manager.org - scm-manager release repository - http://maven.scm-manager.org/nexus/content/groups/public + packages.scm-manager.org + scm-manager public repository + https://packages.scm-manager.org/repository/public/ true @@ -152,11 +151,6 @@ junit-vintage-engine - - org.junit-pioneer - junit-pioneer - - org.hamcrest hamcrest-core @@ -241,6 +235,16 @@ org.jboss.resteasy resteasy-core ${resteasy.version} + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.1_spec + + + org.jboss.spec.javax.xml.bind + jboss-jaxb-api_2.3_spec + + @@ -253,6 +257,12 @@ org.jboss.resteasy resteasy-jaxb-provider ${resteasy.version} + + + org.jboss.spec.javax.xml.bind + jboss-jaxb-api_2.3_spec + + @@ -267,6 +277,30 @@ ${resteasy.version} + + org.jboss.resteasy + resteasy-client-api + ${resteasy.version} + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.1_spec + + + + + + org.jboss.resteasy + resteasy-client + ${resteasy.version} + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.1_spec + + + + org.jboss.resteasy resteasy-guice @@ -277,6 +311,12 @@ org.jboss.resteasy resteasy-servlet-initializer ${resteasy.version} + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.1_spec + + @@ -437,8 +476,8 @@ - javax.xml.bind - jaxb-api + jakarta.xml.bind + jakarta.xml.bind-api ${jaxb.version} @@ -448,12 +487,6 @@ ${jaxb.version} - - javax.activation - activation - 1.1.1 - - @@ -678,7 +711,7 @@ mvnw.cmd yarn.lock **/logback.ci.xml - **/scm-hg-plugin/pkg/ourPackage/scm-source.properties + **/pkg/ourPackage/scm-source.properties SLASHSTAR_STYLE @@ -885,15 +918,15 @@ - maven.scm-manager.org + packages.scm-manager.org scm-manager release repository - http://maven.scm-manager.org/nexus/content/repositories/releases + https://packages.scm-manager.org/repository/releases/ - maven.scm-manager.org + packages.scm-manager.org scm-manager snapshot repository - http://maven.scm-manager.org/nexus/content/repositories/snapshots + https://packages.scm-manager.org/repository/snapshots/ @@ -901,36 +934,36 @@ 2.28.2 - 1.3 - 5.6.1 + 2.1 + 5.6.2 1.7.30 1.2.3 - 3.0.1 + 3.1.0 2.1.1 4.5.3.Final 1.19.4 - 2.10.3 + 2.11.0 4.2.3 - 2.3.1 - 6.1.2.Final + 2.3.3 + 6.1.4.Final 1.6.2 - 9.4.27.v20200227 + 9.4.28.v20200408 9.4.22.v20191022 1.2.0 - 1.5.2 + 1.5.3 5.6.1.202002131546-r-scm1 - 1.10.1-scm1 + 1.10.1-scm2 26.0-jre diff --git a/scm-core/pom.xml b/scm-core/pom.xml index ac86a33f4d..7d78979d96 100644 --- a/scm-core/pom.xml +++ b/scm-core/pom.xml @@ -173,8 +173,8 @@ - javax.xml.bind - jaxb-api + jakarta.xml.bind + jakarta.xml.bind-api @@ -182,11 +182,6 @@ jaxb-runtime - - javax.activation - activation - - @@ -194,6 +189,20 @@ hibernate-validator + + javax.el + javax.el-api + 3.0.0 + test + + + + org.glassfish + javax.el + 3.0.1-b11 + test + + diff --git a/scm-core/src/main/java/sonia/scm/BaseDirectory.java b/scm-core/src/main/java/sonia/scm/BaseDirectory.java new file mode 100644 index 0000000000..b8b59e5726 --- /dev/null +++ b/scm-core/src/main/java/sonia/scm/BaseDirectory.java @@ -0,0 +1,142 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm; + +import com.google.common.base.Strings; +import sonia.scm.util.SystemUtil; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Map; +import java.util.Properties; + +/** + * Determines the base directory for SCM-Manager. + * This class should not be used directory, use {@link SCMContextProvider#getBaseDirectory()} instead. + * + * @since 2.0.0 + */ +final class BaseDirectory { + + /** Environment variable for the SCM-Manager base directory */ + static final String ENVIRONMENT_VARIABLE = "SCM_HOME"; + + /** Java system property for the SCM-Manager base directory */ + static final String SYSTEM_PROPERTY = "scm.home"; + + /** Classpath resource for the SCM-Manager base directory */ + @SuppressWarnings("java:S1075") // it is already configurable + static final String CLASSPATH_RESOURCE = "/scm.properties"; + + /** Property name in resource file */ + static final String RESOURCE_PROPERTY = "scm.home"; + + private final Platform platform; + private final String classPathResource; + private final Map environment; + private final Properties systemProperties; + + BaseDirectory(Platform platform, String classPathResource, Map environment, Properties systemProperties) { + this.platform = platform; + this.classPathResource = classPathResource; + this.environment = environment; + this.systemProperties = systemProperties; + } + + /** + * Returns the determined base directory. + * + * @return base directory + */ + @SuppressWarnings("java:S5304") // it is safe to use environment in this case + static Path get() { + return new BaseDirectory( + SystemUtil.getPlatform(), + CLASSPATH_RESOURCE, + System.getenv(), + System.getProperties() + ).find(); + } + + Path find() { + String directory = getFromResource(); + if (Strings.isNullOrEmpty(directory)) { + directory = getFromSystemProperty(); + } + if (Strings.isNullOrEmpty(directory)) { + directory = getFromEnvironmentVariable(); + } + if (Strings.isNullOrEmpty(directory)) { + directory = getOsSpecificDefault(); + } + + return Paths.get(directory); + } + + private String getFromResource() { + try (InputStream input = BasicContextProvider.class.getResourceAsStream(classPathResource)) + { + if (input != null) + { + Properties properties = new Properties(); + properties.load(input); + return properties.getProperty(RESOURCE_PROPERTY); + } + } + catch (IOException ex) + { + throw new ConfigurationException("could not load properties form resource " + CLASSPATH_RESOURCE, ex); + } + return null; + } + + private String getFromEnvironmentVariable() { + return environment.get(ENVIRONMENT_VARIABLE); + } + + private String getFromSystemProperty() { + return systemProperties.getProperty(SYSTEM_PROPERTY); + } + + private String getOsSpecificDefault() { + if (platform.isMac()) { + return getOsxDefault(); + } else if (platform.isWindows()) { + return getWindowsDefault(); + } + return systemProperties.getProperty("user.home") + "/.scm"; + } + + private String getOsxDefault() { + return systemProperties.getProperty("user.home") + "/Library/Application Support/SCM-Manager"; + } + + private String getWindowsDefault() { + return environment.get("APPDATA") + "\\SCM-Manager"; + } + +} diff --git a/scm-core/src/main/java/sonia/scm/BasicContextProvider.java b/scm-core/src/main/java/sonia/scm/BasicContextProvider.java index 465c001490..301b437c53 100644 --- a/scm-core/src/main/java/sonia/scm/BasicContextProvider.java +++ b/scm-core/src/main/java/sonia/scm/BasicContextProvider.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm; //~--- non-JDK imports -------------------------------------------------------- @@ -30,21 +30,21 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Strings; import sonia.scm.util.Util; -//~--- JDK imports ------------------------------------------------------------ - import java.io.File; import java.io.IOException; import java.io.InputStream; - import java.nio.file.Path; import java.util.Locale; import java.util.Properties; +//~--- JDK imports ------------------------------------------------------------ + /** * The default implementation of {@link SCMContextProvider}. * * @author Sebastian Sdorra */ +@SuppressWarnings("java:S106") // we can not use logger until base directory is not determined public class BasicContextProvider implements SCMContextProvider { @@ -174,58 +174,29 @@ public class BasicContextProvider implements SCMContextProvider * * @return base directory SCM-Manager */ - private File findBaseDirectory() - { - String path = getPathFromResource(); + private File findBaseDirectory() { + File directory = BaseDirectory.get().toFile(); - if (Util.isEmpty(path)) - { - path = System.getProperty(DIRECTORY_PROPERTY); - - if (Util.isEmpty(path)) - { - path = System.getenv(DIRECTORY_ENVIRONMENT); - - if (Util.isEmpty(path)) - { - path = System.getProperty("user.home").concat(File.separator).concat( - DIRECTORY_DEFAULT); - } - } - } - - File directory = new File(path); - - if (!directory.exists() &&!directory.mkdirs()) - { - String msg = "could not create home directory at ".concat( - directory.getAbsolutePath()); - - // do not use logger - // http://www.slf4j.org/codes.html#substituteLogger - System.err.println("==================================================="); - System.err.append("Error: ").println(msg); - System.err.println("==================================================="); - - throw new IllegalStateException(msg); - } - else if (directory.exists() && !directory.canWrite()) - { - String msg = "could not modify home directory at ".concat( - directory.getAbsolutePath()); - - // do not use logger - // http://www.slf4j.org/codes.html#substituteLogger - System.err.println("==================================================="); - System.err.append("Error: ").println(msg); - System.err.println("==================================================="); - - throw new IllegalStateException(msg); + if (!directory.exists() &&!directory.mkdirs()) { + error("could not create home directory at " + directory.getAbsolutePath()); + } else if (directory.exists() && !directory.canWrite()) { + error("could not modify home directory at " + directory.getAbsolutePath()); } return directory; } + + private void error(String msg) { + // do not use logger + // http://www.slf4j.org/codes.html#substituteLogger + System.err.println("==================================================="); + System.err.append("Error: ").println(msg); + System.err.println("==================================================="); + + throw new IllegalStateException(msg); + } + /** * Find the current stage. * @@ -256,11 +227,11 @@ public class BasicContextProvider implements SCMContextProvider } private String determineVersion() { - String version = System.getProperty(VERSION_PROPERTY); - if (Strings.isNullOrEmpty(version)) { - version = loadVersion(); + String v = System.getProperty(VERSION_PROPERTY); + if (Strings.isNullOrEmpty(v)) { + v = loadVersion(); } - return version; + return v; } /** @@ -304,59 +275,6 @@ public class BasicContextProvider implements SCMContextProvider return properties.getProperty(MAVEN_PROPERTY_VERSION, VERSION_DEFAULT); } - //~--- get methods ---------------------------------------------------------- - - /** - * Load path from classpath resource. - * - * - * @return path from classpath resource or null - */ - private String getPathFromResource() - { - String path = null; - InputStream input = null; - - try - { - input = - BasicContextProvider.class.getResourceAsStream(DIRECTORY_RESOURCE); - - if (input != null) - { - Properties properties = new Properties(); - - properties.load(input); - path = properties.getProperty(DIRECTORY_PROPERTY); - } - } - catch (IOException ex) - { - throw new ConfigurationException( - "could not load properties form resource ".concat(DIRECTORY_RESOURCE), - ex); - } - finally - { - - // do not use logger or IOUtil, - // http://www.slf4j.org/codes.html#substituteLogger - if (input != null) - { - try - { - input.close(); - } - catch (IOException ex) - { - ex.printStackTrace(System.err); - } - } - } - - return path; - } - //~--- fields --------------------------------------------------------------- /** The base directory of the SCM-Manager */ diff --git a/scm-core/src/main/java/sonia/scm/filter/GZipResponseStream.java b/scm-core/src/main/java/sonia/scm/filter/GZipResponseStream.java index e99ccf9b80..2693fdf3b0 100644 --- a/scm-core/src/main/java/sonia/scm/filter/GZipResponseStream.java +++ b/scm-core/src/main/java/sonia/scm/filter/GZipResponseStream.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.filter; //~--- non-JDK imports -------------------------------------------------------- @@ -39,6 +39,7 @@ import java.io.IOException; import java.util.zip.GZIPOutputStream; import javax.servlet.ServletOutputStream; +import javax.servlet.WriteListener; import javax.servlet.http.HttpServletResponse; /** @@ -245,6 +246,20 @@ public class GZipResponseStream extends ServletOutputStream return closed; } + @Override + public boolean isReady() { + return true; + } + + @Override + public void setWriteListener(WriteListener writeListener) { + try { + writeListener.onWritePossible(); + } catch (IOException e) { + logger.debug("could not call writeListener.onWritePossible()", e); + } + } + //~--- fields --------------------------------------------------------------- /** Field description */ diff --git a/scm-core/src/main/java/sonia/scm/plugin/PluginInformation.java b/scm-core/src/main/java/sonia/scm/plugin/PluginInformation.java index bd89156071..20f3751070 100644 --- a/scm-core/src/main/java/sonia/scm/plugin/PluginInformation.java +++ b/scm-core/src/main/java/sonia/scm/plugin/PluginInformation.java @@ -47,7 +47,7 @@ import java.io.Serializable; value = "plugin", generatedClass = "PluginPermissions", permissions = {}, - globalPermissions = {"read", "manage"}, + globalPermissions = {"read", "write"}, custom = true, customGlobal = true ) @XmlAccessorType(XmlAccessType.FIELD) diff --git a/scm-core/src/main/java/sonia/scm/repository/Added.java b/scm-core/src/main/java/sonia/scm/repository/Added.java new file mode 100644 index 0000000000..c61c82fd03 --- /dev/null +++ b/scm-core/src/main/java/sonia/scm/repository/Added.java @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.repository; + +import lombok.Value; + +import java.util.stream.Stream; + +import static java.util.stream.Stream.of; + +@Value +public class Added extends Modification { + private final String path; + + @Override + Stream getEffectedPaths() { + return of(path); + } +} diff --git a/scm-core/src/main/java/sonia/scm/repository/BlameResult.java b/scm-core/src/main/java/sonia/scm/repository/BlameResult.java index 5002dfc34e..8a997041f6 100644 --- a/scm-core/src/main/java/sonia/scm/repository/BlameResult.java +++ b/scm-core/src/main/java/sonia/scm/repository/BlameResult.java @@ -21,216 +21,58 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -//~--- non-JDK imports -------------------------------------------------------- - -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; import com.google.common.collect.Lists; +import lombok.EqualsAndHashCode; +import lombok.ToString; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; import java.util.Iterator; import java.util.List; -//~--- JDK imports ------------------------------------------------------------ - /** * Changeset information by line for a given file. * * @author Sebastian Sdorra * @since 1.8 */ -@XmlRootElement(name = "blame-result") -@XmlAccessorType(XmlAccessType.FIELD) -public class BlameResult implements Serializable, Iterable -{ +@EqualsAndHashCode +@ToString +public class BlameResult implements Serializable, Iterable { - /** Field description */ private static final long serialVersionUID = -8606237881465520606L; - //~--- constructors --------------------------------------------------------- + private List blameLines; + private int total; - /** - * Constructs ... - * - */ - public BlameResult() {} - - /** - * Constructs ... - * - * - * @param blameLines - */ - public BlameResult(List blameLines) - { - this.blameLines = blameLines; - this.total = blameLines.size(); + public BlameResult(List blameLines) { + this(blameLines.size(), blameLines); } - /** - * Constructs ... - * - * - * @param total - * @param blameLines - */ - public BlameResult(int total, List blameLines) - { + public BlameResult(int total, List blameLines) { this.total = total; this.blameLines = blameLines; } - //~--- methods -------------------------------------------------------------- - - /** - * {@inheritDoc} - * - * - * @param obj - * - * @return - */ @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - final BlameResult other = (BlameResult) obj; - - return Objects.equal(total, other.total) - && Objects.equal(blameLines, other.blameLines); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public int hashCode() - { - return Objects.hashCode(total, blameLines); - } - - /** - * Method description - * - * - * @return - * - * @since 1.17 - */ - @Override - public Iterator iterator() - { + public Iterator iterator() { return getBlameLines().iterator(); } - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public String toString() - { - //J- - return MoreObjects.toStringHelper(this) - .add("total", total) - .add("blameLines", blameLines) - .toString(); - //J+ - } - - //~--- get methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @return - */ - public List getBlameLines() - { - if ( blameLines == null ){ + public List getBlameLines() { + if (blameLines == null) { blameLines = Lists.newArrayList(); } return blameLines; } - /** - * Method description - * - * - * @param i - * - * @return - */ - public BlameLine getLine(int i) - { + public BlameLine getLine(int i) { return blameLines.get(i); } - /** - * Method description - * - * - * @return - */ - public int getTotal() - { + public int getTotal() { return total; } - - //~--- set methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @param blameLines - */ - public void setBlameLines(List blameLines) - { - this.blameLines = blameLines; - } - - /** - * Method description - * - * - * @param total - */ - public void setTotal(int total) - { - this.total = total; - } - - //~--- fields --------------------------------------------------------------- - - /** Field description */ - @XmlElement(name = "blameline") - @XmlElementWrapper(name = "blamelines") - private List blameLines; - - /** Field description */ - private int total; } diff --git a/scm-core/src/main/java/sonia/scm/repository/Branches.java b/scm-core/src/main/java/sonia/scm/repository/Branches.java index 54b285d143..ed4ead7dc2 100644 --- a/scm-core/src/main/java/sonia/scm/repository/Branches.java +++ b/scm-core/src/main/java/sonia/scm/repository/Branches.java @@ -21,166 +21,55 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -//~--- non-JDK imports -------------------------------------------------------- - -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; import com.google.common.collect.Lists; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.util.Iterator; import java.util.List; -//~--- JDK imports ------------------------------------------------------------ - /** * Represents all branches of a repository. * * @author Sebastian Sdorra * @since 1.18 */ -@XmlRootElement(name="branches") -@XmlAccessorType(XmlAccessType.FIELD) -public final class Branches implements Iterable -{ +@EqualsAndHashCode +@ToString +@Setter +public final class Branches implements Iterable { - /** - * Constructs a new instance of branches. - * This constructor should only be called from JAXB. - * - */ - public Branches() {} + private List branches; - /** - * Constructs a new instance of branches. - * - * - * @param branches list of branches. - */ - public Branches(Branch... branches) - { + public Branches() { + } + + public Branches(Branch... branches) { this.branches = Lists.newArrayList(branches); } - /** - * Constructs a new instance of branches. - * - * - * @param branches list of branches. - */ - public Branches(List branches) - { + public Branches(List branches) { this.branches = branches; } - //~--- methods -------------------------------------------------------------- - - /** - * {@inheritDoc} - * - * - * @param obj - * - * @return - */ @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - final Branches other = (Branches) obj; - - return Objects.equal(branches, other.branches); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public int hashCode() - { - return Objects.hashCode(branches); - } - - /** - * Method description - * - * - * @return - */ - @Override - public Iterator iterator() - { + public Iterator iterator() { return getBranches().iterator(); } - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public String toString() - { - //J- - return MoreObjects.toStringHelper(this) - .add("branches", branches) - .toString(); - //J+ - } - - //~--- get methods ---------------------------------------------------------- - - /** - * Returns all branches of a repository. - * - * - * @return all branches - */ - public List getBranches() - { - if (branches == null) - { + public List getBranches() { + if (branches == null) { branches = Lists.newArrayList(); } return branches; } - //~--- set methods ---------------------------------------------------------- - - /** - * Sets all branches. - * - * - * @param branches branches - */ - public void setBranches(List branches) - { + public void setBranches(List branches) { this.branches = branches; } - - //~--- fields --------------------------------------------------------------- - - /** branches */ - @XmlElement(name="branch") - private List branches; } diff --git a/scm-core/src/main/java/sonia/scm/repository/BrowserResult.java b/scm-core/src/main/java/sonia/scm/repository/BrowserResult.java index 2c5a041189..afd77b5625 100644 --- a/scm-core/src/main/java/sonia/scm/repository/BrowserResult.java +++ b/scm-core/src/main/java/sonia/scm/repository/BrowserResult.java @@ -21,28 +21,16 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -//~--- non-JDK imports -------------------------------------------------------- +import lombok.EqualsAndHashCode; +import lombok.ToString; -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; -//~--- JDK imports ------------------------------------------------------------ - -/** - * - * @author Sebastian Sdorra - * @since 1.5 - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "browser-result") +@EqualsAndHashCode +@ToString public class BrowserResult implements Serializable { private String revision; @@ -73,36 +61,4 @@ public class BrowserResult implements Serializable { public FileObject getFile() { return file; } - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - - if (getClass() != obj.getClass()) { - return false; - } - - final BrowserResult other = (BrowserResult) obj; - - return Objects.equal(revision, other.revision) - && Objects.equal(file, other.file); - } - - @Override - public int hashCode() { - return Objects.hashCode(revision, file); - } - - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("revision", revision) - .add("files", file) - .toString(); - } - - } diff --git a/scm-core/src/main/java/sonia/scm/repository/Changeset.java b/scm-core/src/main/java/sonia/scm/repository/Changeset.java index 654739fa25..6e770139df 100644 --- a/scm-core/src/main/java/sonia/scm/repository/Changeset.java +++ b/scm-core/src/main/java/sonia/scm/repository/Changeset.java @@ -21,30 +21,25 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -import com.google.common.base.Objects; +import lombok.EqualsAndHashCode; import sonia.scm.BasicPropertiesAware; import sonia.scm.ModelObject; import sonia.scm.util.Util; import sonia.scm.util.ValidationUtil; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; import java.util.ArrayList; import java.util.Date; import java.util.List; - /** * Represents a changeset/commit of a repository. * * @author Sebastian Sdorra */ -@XmlRootElement(name = "changeset") -@XmlAccessorType(XmlAccessType.FIELD) +@EqualsAndHashCode(callSuper = true) public class Changeset extends BasicPropertiesAware implements ModelObject { private static final long serialVersionUID = -8373308448928993039L; @@ -91,8 +86,7 @@ public class Changeset extends BasicPropertiesAware implements ModelObject { this(id, date, author, null); } - public Changeset(String id, Long date, Person author, String description) - { + public Changeset(String id, Long date, Person author, String description) { this.id = id; this.date = date; this.author = author; @@ -100,66 +94,18 @@ public class Changeset extends BasicPropertiesAware implements ModelObject { } @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) { - return false; - } - - final Changeset other = (Changeset) obj; - - //J- - return Objects.equal(id, other.id) - && Objects.equal(date, other.date) - && Objects.equal(author, other.author) - && Objects.equal(description, other.description) - && Objects.equal(parents, other.parents) - && Objects.equal(tags, other.tags) - && Objects.equal(branches, other.branches) - && Objects.equal(properties, other.properties); - //J+ - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public int hashCode() - { - return Objects.hashCode(id, date, author, description, parents, tags, - branches, properties); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public String toString() - { + public String toString() { StringBuilder out = new StringBuilder("changeset: "); out.append(id).append("\n"); - if (parents != null) - { + if (parents != null) { out.append("parents: ").append(Util.toString(parents)).append("\n"); } out.append("author: ").append(author).append("\n"); - if (date != null) - { + if (date != null) { out.append("date: ").append(Util.formatDate(new Date(date))).append("\n"); } @@ -170,7 +116,6 @@ public class Changeset extends BasicPropertiesAware implements ModelObject { return out.toString(); } - /** * Returns a timestamp of the creation date of the {@link Changeset}. * @@ -185,11 +130,9 @@ public class Changeset extends BasicPropertiesAware implements ModelObject { this.setDate(timestamp); } - /** * Returns the author of the changeset. * - * * @return author of the changeset */ public Person getAuthor() { @@ -201,14 +144,11 @@ public class Changeset extends BasicPropertiesAware implements ModelObject { * only related to one branch, but in the case of receive hooks it is possible * that a changeset is related to more than a branch. * - * * @return branches of the changeset */ - public List getBranches() - { - if (branches == null) - { - branches = new ArrayList(); + public List getBranches() { + if (branches == null) { + branches = new ArrayList<>(); } return branches; @@ -217,29 +157,24 @@ public class Changeset extends BasicPropertiesAware implements ModelObject { /** * Returns the creation date of the changeset. * - * * @return date of the changeset */ - public Long getDate() - { + public Long getDate() { return date; } /** * Return the description (commit message) of the changeset. * - * * @return description of the changeset */ - public String getDescription() - { + public String getDescription() { return description; } /** * Returns the id of the changeset. * - * * @return id of the changeset */ @Override @@ -263,19 +198,15 @@ public class Changeset extends BasicPropertiesAware implements ModelObject { } - /** * Return the ids of the parent changesets. * - * * @return * @since 1.11 */ - public List getParents() - { - if (parents == null) - { - parents = new ArrayList(); + public List getParents() { + if (parents == null) { + parents = new ArrayList<>(); } return parents; @@ -284,14 +215,11 @@ public class Changeset extends BasicPropertiesAware implements ModelObject { /** * Returns tags associated with this changeset. * - * * @return tags of the changeset */ - public List getTags() - { - if (tags == null) - { - tags = new ArrayList(); + public List getTags() { + if (tags == null) { + tags = new ArrayList<>(); } return tags; @@ -300,91 +228,75 @@ public class Changeset extends BasicPropertiesAware implements ModelObject { /** * Returns true if the changeset is valid. * - * * @return true if the changeset is valid */ @Override - public boolean isValid() - { + public boolean isValid() { return Util.isNotEmpty(id) && ValidationUtil.isValid(author) - && (date != null); + && (date != null); } /** * Sets the author of the changeset. * - * * @param author author of the changeset */ - public void setAuthor(Person author) - { + public void setAuthor(Person author) { this.author = author; } /** * Sets the branches of the changeset. * - * * @param branches branches of the changeset */ - public void setBranches(List branches) - { + public void setBranches(List branches) { this.branches = branches; } /** * Sets the date of the changeset. * - * * @param date date of the changeset */ - public void setDate(Long date) - { + public void setDate(Long date) { this.date = date; } /** * Sets the description (commit message) of the changeset. * - * * @param description description of the changeset */ - public void setDescription(String description) - { + public void setDescription(String description) { this.description = description; } /** * Sets the id of the changeset. * - * * @param id id of the changeset */ - public void setId(String id) - { + public void setId(String id) { this.id = id; } /** * Sets the parents of the changeset. * - * * @param parents parents of the changeset * @since 1.11 */ - public void setParents(List parents) - { + public void setParents(List parents) { this.parents = parents; } /** * Sets the tags of the changeset * - * * @param tags tags of the changeset */ - public void setTags(List tags) - { + public void setTags(List tags) { this.tags = tags; } diff --git a/scm-core/src/main/java/sonia/scm/repository/ChangesetPagingResult.java b/scm-core/src/main/java/sonia/scm/repository/ChangesetPagingResult.java index 4bbe54ba54..ca74b7dacf 100644 --- a/scm-core/src/main/java/sonia/scm/repository/ChangesetPagingResult.java +++ b/scm-core/src/main/java/sonia/scm/repository/ChangesetPagingResult.java @@ -21,56 +21,39 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -//~--- non-JDK imports -------------------------------------------------------- +import lombok.EqualsAndHashCode; +import lombok.ToString; -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; import java.util.Iterator; import java.util.List; -//~--- JDK imports ------------------------------------------------------------ - /** * The changeset paging result is used to do a paging over the * {@link Changeset}s of a {@link Repository}. * * @author Sebastian Sdorra */ -@XmlRootElement(name = "changeset-paging") -@XmlAccessorType(XmlAccessType.FIELD) -public class ChangesetPagingResult implements Iterable, Serializable -{ +@EqualsAndHashCode +@ToString +public class ChangesetPagingResult implements Iterable, Serializable { - /** Field description */ private static final long serialVersionUID = -8678755403658841733L; - //~--- constructors --------------------------------------------------------- + private List changesets; + private int total; + private String branchName; /** * Constructs a new changeset paging result. * - */ - public ChangesetPagingResult() {} - - /** - * Constructs a new changeset paging result. - * - * - * @param total total number of changesets + * @param total total number of changesets * @param changesets current list of fetched changesets */ - public ChangesetPagingResult(int total, List changesets) - { + public ChangesetPagingResult(int total, List changesets) { this.total = total; this.changesets = changesets; this.branchName = null; @@ -79,121 +62,59 @@ public class ChangesetPagingResult implements Iterable, Serializable /** * Constructs a new changeset paging result for a specific branch. * - * - * @param total total number of changesets + * @param total total number of changesets * @param changesets current list of fetched changesets * @param branchName branch name this result was created for */ - public ChangesetPagingResult(int total, List changesets, String branchName) - { + public ChangesetPagingResult(int total, List changesets, String branchName) { this.total = total; this.changesets = changesets; this.branchName = branchName; } - //~--- methods -------------------------------------------------------------- - - /** - * Method description - * - * - * @param obj - * - * @return - */ - @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - final ChangesetPagingResult other = (ChangesetPagingResult) obj; - - return Objects.equal(changesets, other.changesets) - && Objects.equal(total, other.total); - } - - /** - * Method description - * - * - * @return - */ - @Override - public int hashCode() - { - return Objects.hashCode(changesets, total); - } - /** * Returns an iterator which can iterate over the current list of changesets. * - * * @return iterator for current list of changesets * @since 1.8 */ @Override - public Iterator iterator() - { + public Iterator iterator() { Iterator it = null; - if (changesets != null) - { + if (changesets != null) { it = changesets.iterator(); } return it; } - /** - * Method description - * - * - * @return - */ - @Override - public String toString() - { - //J- - return MoreObjects.toStringHelper(this) - .add("changesets", changesets) - .add("total", total) - .add("branch", branchName) - .toString(); - //J+ - } - - //~--- get methods ---------------------------------------------------------- - /** * Returns the current list of changesets. * - * * @return current list of changesets */ - public List getChangesets() - { + public List getChangesets() { return changesets; } /** * Returns the total number of changesets. * - * * @return total number of changesets */ - public int getTotal() - { + public int getTotal() { return total; } + /** + * Returns the branch name this result was created for. This can either be an explicit branch ("give me all + * changesets for branch xyz") or an implicit one ("give me the changesets for the default"). + */ + public String getBranchName() { + return branchName; + } + void setChangesets(List changesets) { this.changesets = changesets; @@ -208,21 +129,4 @@ public class ChangesetPagingResult implements Iterable, Serializable this.branchName = branchName; } - /** - * Returns the branch name this result was created for. This can either be an explicit branch ("give me all - * changesets for branch xyz") or an implicit one ("give me the changesets for the default"). - */ - public String getBranchName() { - return branchName; - } - - //~--- fields --------------------------------------------------------------- - - @XmlElement(name = "changeset") - @XmlElementWrapper(name = "changesets") - private List changesets; - - private int total; - - private String branchName; } diff --git a/scm-core/src/main/java/sonia/scm/repository/Copied.java b/scm-core/src/main/java/sonia/scm/repository/Copied.java new file mode 100644 index 0000000000..45153cb91e --- /dev/null +++ b/scm-core/src/main/java/sonia/scm/repository/Copied.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.repository; + +import lombok.Value; + +import java.util.stream.Stream; + +import static java.util.stream.Stream.of; + +@Value +public class Copied extends Modification { + private final String sourcePath; + private final String targetPath; + + @Override + Stream getEffectedPaths() { + return of(targetPath); + } +} diff --git a/scm-core/src/main/java/sonia/scm/repository/EffectedPath.java b/scm-core/src/main/java/sonia/scm/repository/EffectedPath.java new file mode 100644 index 0000000000..e591a47ac5 --- /dev/null +++ b/scm-core/src/main/java/sonia/scm/repository/EffectedPath.java @@ -0,0 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.repository; + +import java.util.stream.Stream; + +abstract class EffectedPath { + abstract Stream getEffectedPaths(); +} diff --git a/scm-core/src/main/java/sonia/scm/repository/FileObject.java b/scm-core/src/main/java/sonia/scm/repository/FileObject.java index 6cc65d69ea..82d6bed205 100644 --- a/scm-core/src/main/java/sonia/scm/repository/FileObject.java +++ b/scm-core/src/main/java/sonia/scm/repository/FileObject.java @@ -21,18 +21,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; import com.google.common.base.Strings; +import lombok.EqualsAndHashCode; +import lombok.ToString; import sonia.scm.LastModifiedAware; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; @@ -49,98 +46,70 @@ import static java.util.Optional.ofNullable; * @author Sebastian Sdorra * @since 1.5 */ -@XmlRootElement(name = "file") -@XmlAccessorType(XmlAccessType.FIELD) -public class FileObject implements LastModifiedAware, Serializable -{ +@EqualsAndHashCode +@ToString +public class FileObject implements LastModifiedAware, Serializable { - /** serial version uid */ private static final long serialVersionUID = -5562537629609891499L; - //~--- methods -------------------------------------------------------------- + private String description; /** - * {@inheritDoc} + * directory indicator */ - @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - final FileObject other = (FileObject) obj; - - //J- - return Objects.equal(name, other.name) - && Objects.equal(path, other.path) - && Objects.equal(directory, other.directory) - && Objects.equal(description, other.description) - && Objects.equal(length, other.length) - && Objects.equal(subRepository, other.subRepository) - && Objects.equal(commitDate, other.commitDate) - && Objects.equal(partialResult, other.partialResult) - && Objects.equal(computationAborted, other.computationAborted); - //J+ - } + private boolean directory; /** - * {@inheritDoc} + * commit date */ - @Override - public int hashCode() - { - return Objects.hashCode( - name, - path, - directory, - description, - length, - subRepository, - commitDate, - partialResult, - computationAborted); - } + private Long commitDate; /** - * {@inheritDoc} + * file length */ - @Override - public String toString() - { - //J- - return MoreObjects.toStringHelper(this) - .add("name", name) - .add("path", path) - .add("directory", directory) - .add("description", description) - .add("length", length) - .add("subRepository", subRepository) - .add("commitDate", commitDate) - .add("partialResult", partialResult) - .add("computationAborted", computationAborted) - .toString(); - //J+ - } + private Long length; - //~--- get methods ---------------------------------------------------------- + /** + * filename + */ + private String name; + + /** + * file path + */ + private String path; + + /** + * Marker for partial result. + */ + private boolean partialResult = false; + + /** + * Marker for aborted computation. + */ + private boolean computationAborted = false; + + /** + * sub repository informations + */ + @XmlElement(name = "subrepository") + private SubRepository subRepository; + + /** + * Children of this file (aka directory). + */ + private Collection children = new ArrayList<>(); + + private boolean truncated; /** * Returns the last commit message for this file. The method will return null, * if the repository provider is not able to get the last commit for the path. * - * * @return Last commit message or null, when this value has not been computed * (see {@link #isPartialResult()}). */ - public Optional getDescription() - { + public Optional getDescription() { return ofNullable(description); } @@ -149,12 +118,11 @@ public class FileObject implements LastModifiedAware, Serializable * if the repository provider is not able to get the last commit for the path * or it has not been computed. * - * * @return last commit date */ @Override public Long getLastModified() { - return this.isPartialResult()? null: this.commitDate; + return this.isPartialResult() ? null : this.commitDate; } /** @@ -162,39 +130,33 @@ public class FileObject implements LastModifiedAware, Serializable * if the repository provider is not able to get the last commit for the path or if this value has not been computed * (see {@link #isPartialResult()} and {@link #isComputationAborted()}). */ - public OptionalLong getCommitDate() - { - return commitDate == null? OptionalLong.empty(): OptionalLong.of(commitDate); + public OptionalLong getCommitDate() { + return commitDate == null ? OptionalLong.empty() : OptionalLong.of(commitDate); } /** * Returns the length of the file or {@link OptionalLong#empty()}, when this value has not been computed * (see {@link #isPartialResult()} and {@link #isComputationAborted()}). */ - public OptionalLong getLength() - { - return length == null? OptionalLong.empty(): OptionalLong.of(length); + public OptionalLong getLength() { + return length == null ? OptionalLong.empty() : OptionalLong.of(length); } /** * Returns the name of the file. * - * * @return name of file */ - public String getName() - { + public String getName() { return name; } /** * Returns the path of the file. * - * * @return path of file */ - public String getPath() - { + public String getPath() { return path; } @@ -218,22 +180,19 @@ public class FileObject implements LastModifiedAware, Serializable * Return sub repository information or null if the file is not * sub repository. * - * @since 1.10 * @return sub repository informations or null + * @since 1.10 */ - public SubRepository getSubRepository() - { + public SubRepository getSubRepository() { return subRepository; } /** * Returns true if the file is a directory. * - * * @return true if file is a directory */ - public boolean isDirectory() - { + public boolean isDirectory() { return directory; } @@ -243,7 +202,7 @@ public class FileObject implements LastModifiedAware, Serializable * @return The children of this file if it is a directory. */ public Collection getChildren() { - return children == null? null: unmodifiableCollection(children); + return children == null ? null : unmodifiableCollection(children); } /** @@ -252,9 +211,8 @@ public class FileObject implements LastModifiedAware, Serializable * will return {@link Optional#empty()} (or {@link OptionalLong#empty()} respectively), unless they are computed. * There may be an asynchronous task running, that will set these values in the future. * - * @since 2.0.0 - * * @return true, whenever some values of this object have not been computed, yet. + * @since 2.0.0 */ public boolean isPartialResult() { return partialResult; @@ -265,9 +223,8 @@ public class FileObject implements LastModifiedAware, Serializable * values (like {@link #getLength()}, {@link #getDescription()} or {@link #getCommitDate()}) * will return {@link Optional#empty()} (or {@link OptionalLong#empty()} respectively), unless they are computed. * - * @since 2.0.0 - * * @return true, whenever some values of this object finally are not computed. + * @since 2.0.0 */ public boolean isComputationAborted() { return computationAborted; @@ -282,87 +239,72 @@ public class FileObject implements LastModifiedAware, Serializable /** * Sets the description of the file. * - * * @param description description of file */ - public void setDescription(String description) - { + public void setDescription(String description) { this.description = description; } /** * Set to true to indicate that the file is a directory. * - * * @param directory true for directory */ - public void setDirectory(boolean directory) - { + public void setDirectory(boolean directory) { this.directory = directory; } /** * Sets the commit date of the file. * - * * @param commitDate commit date */ - public void setCommitDate(Long commitDate) - { + public void setCommitDate(Long commitDate) { this.commitDate = commitDate; } /** * Sets the length of the file. * - * * @param length file length */ - public void setLength(Long length) - { + public void setLength(Long length) { this.length = length; } /** * Sets the name of the file. * - * * @param name filename */ - public void setName(String name) - { + public void setName(String name) { this.name = name; } /** * Sets the path of the file. * - * * @param path file path */ - public void setPath(String path) - { + public void setPath(String path) { this.path = path; } /** * Set sub repository information for the file. * - * @since 1.10 - * * @param subRepository sub repository informations + * @since 1.10 */ - public void setSubRepository(SubRepository subRepository) - { + public void setSubRepository(SubRepository subRepository) { this.subRepository = subRepository; } /** * Set marker, that some values for this object are not computed, yet. * - * @since 2.0.0 - * * @param partialResult Set this to true, whenever some values of this object are not computed, yet. + * @since 2.0.0 */ public void setPartialResult(boolean partialResult) { this.partialResult = partialResult; @@ -371,10 +313,9 @@ public class FileObject implements LastModifiedAware, Serializable /** * Set marker, that computation of some values for this object has been aborted. * - * @since 2.0.0 - * * @param computationAborted Set this to true, whenever some values of this object are not computed and * will not be computed in the future. + * @since 2.0.0 */ public void setComputationAborted(boolean computationAborted) { this.computationAborted = computationAborted; @@ -401,39 +342,4 @@ public class FileObject implements LastModifiedAware, Serializable public void setTruncated(boolean truncated) { this.truncated = truncated; } - - //~--- fields --------------------------------------------------------------- - - /** file description */ - private String description; - - /** directory indicator */ - private boolean directory; - - /** commit date */ - private Long commitDate; - - /** file length */ - private Long length; - - /** filename */ - private String name; - - /** file path */ - private String path; - - /** Marker for partial result. */ - private boolean partialResult = false; - - /** Marker for aborted computation. */ - private boolean computationAborted = false; - - /** sub repository informations */ - @XmlElement(name = "subrepository") - private SubRepository subRepository; - - /** Children of this file (aka directory). */ - private Collection children = new ArrayList<>(); - - private boolean truncated; } diff --git a/scm-core/src/main/java/sonia/scm/repository/ImportResult.java b/scm-core/src/main/java/sonia/scm/repository/ImportResult.java index 39c102959b..d86c4b4e96 100644 --- a/scm-core/src/main/java/sonia/scm/repository/ImportResult.java +++ b/scm-core/src/main/java/sonia/scm/repository/ImportResult.java @@ -21,166 +21,74 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -//~--- non-JDK imports -------------------------------------------------------- - -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.ToString; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; import java.util.List; import static com.google.common.base.Preconditions.checkNotNull; -//~--- JDK imports ------------------------------------------------------------ - /** * Import result of the {@link AdvancedImportHandler}. * * @author Sebastian Sdorra * @since 1.43 */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "import-result") -public final class ImportResult -{ +@EqualsAndHashCode +@ToString +@Getter +public final class ImportResult { /** - * Constructs ... - * + * failed directories */ - ImportResult() {} + private List failedDirectories; /** - * Constructs a new import result. - * - * - * @param importedDirectories imported directories - * @param failedDirectories failed directories + * successfully imported directories */ + private List importedDirectories; + public ImportResult(List importedDirectories, - List failedDirectories) - { + List failedDirectories) { this.importedDirectories = checkNotNull(importedDirectories, "list of imported directories is required"); this.failedDirectories = checkNotNull(failedDirectories, "list of failed directories is required"); } - //~--- methods -------------------------------------------------------------- - - /** - * Returns a import result builder. - * - * - * @return import result builder - */ - public static Builder builder() - { + public static Builder builder() { return new Builder(); } - /** - * {@inheritDoc} - */ - @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - final ImportResult other = (ImportResult) obj; - - return Objects.equal(importedDirectories, other.importedDirectories) - && Objects.equal(failedDirectories, other.failedDirectories); - } - - /** - * {@inheritDoc} - */ - @Override - public int hashCode() - { - return Objects.hashCode(importedDirectories, failedDirectories); - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() - { - //J- - return MoreObjects.toStringHelper(this) - .add("importedDirectories", importedDirectories) - .add("failedDirectories", failedDirectories) - .toString(); - //J+ - } - - //~--- get methods ---------------------------------------------------------- - - /** - * Returns list of failed directories. - * - * - * @return list of failed directories - */ - public List getFailedDirectories() - { - return failedDirectories; - } - - /** - * Returns list of successfully imported directories. - * - * - * @return list of successfully imported directories - */ - public List getImportedDirectories() - { - return importedDirectories; - } - - //~--- inner classes -------------------------------------------------------- - /** * Builder for {@link ImportResult}. */ - public static class Builder - { + public static class Builder { /** - * Constructs ... - * + * successfully imported directories */ - private Builder() {} + private final List importedDirectories = Lists.newArrayList(); - //~--- methods ------------------------------------------------------------ + /** + * failed directories + */ + private final List failedDirectories = Lists.newArrayList(); /** * Adds a failed directory to the import result. * - * * @param name name of the directory - * * @return {@code this} */ - public Builder addFailedDirectory(String name) - { + public Builder addFailedDirectory(String name) { this.failedDirectories.add(name); return this; @@ -189,13 +97,10 @@ public final class ImportResult /** * Adds a successfully imported directory to the import result. * - * * @param name name of the directory - * * @return {@code this} */ - public Builder addImportedDirectory(String name) - { + public Builder addImportedDirectory(String name) { this.importedDirectories.add(name); return this; @@ -204,30 +109,11 @@ public final class ImportResult /** * Builds the final import result. * - * * @return final import result */ - public ImportResult build() - { + public ImportResult build() { return new ImportResult(ImmutableList.copyOf(importedDirectories), ImmutableList.copyOf(failedDirectories)); } - - //~--- fields ------------------------------------------------------------- - - /** successfully imported directories */ - private final List importedDirectories = Lists.newArrayList(); - - /** failed directories */ - private final List failedDirectories = Lists.newArrayList(); } - - - //~--- fields --------------------------------------------------------------- - - /** failed directories */ - private List failedDirectories; - - /** successfully imported directories */ - private List importedDirectories; } diff --git a/scm-core/src/main/java/sonia/scm/repository/Modification.java b/scm-core/src/main/java/sonia/scm/repository/Modification.java new file mode 100644 index 0000000000..7bb41e0573 --- /dev/null +++ b/scm-core/src/main/java/sonia/scm/repository/Modification.java @@ -0,0 +1,30 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.repository; + +import java.io.Serializable; + +public abstract class Modification extends EffectedPath implements Serializable { +} diff --git a/scm-core/src/main/java/sonia/scm/repository/Modifications.java b/scm-core/src/main/java/sonia/scm/repository/Modifications.java index f2e08048ef..42f1d85aef 100644 --- a/scm-core/src/main/java/sonia/scm/repository/Modifications.java +++ b/scm-core/src/main/java/sonia/scm/repository/Modifications.java @@ -21,254 +21,81 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -//~--- non-JDK imports -------------------------------------------------------- +import com.google.common.collect.ImmutableList; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.ToString; -import com.google.common.base.Objects; -import com.google.common.collect.Lists; -import sonia.scm.util.Util; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; +import java.util.Collection; import java.util.List; +import java.util.stream.Stream; -//~--- JDK imports ------------------------------------------------------------ +import static java.util.Arrays.asList; +import static java.util.stream.Collectors.toList; -/** - * - * @author Sebastian Sdorra - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlRootElement(name = "modifications") -public class Modifications implements Serializable -{ +@EqualsAndHashCode +@ToString +@Getter +public class Modifications implements Serializable { - /** Field description */ private static final long serialVersionUID = -8902033326668658140L; - //~--- constructors --------------------------------------------------------- + private final String revision; + private final Collection modifications; - /** - * Constructs ... - * - */ - public Modifications() { + public Modifications(String revision, Modification... modifications) { + this(revision, asList(modifications)); } - /** - * Constructs ... - * - * - * @param added - */ - public Modifications(List added) - { - this(added, null, null); - } - - /** - * Constructs ... - * - * - * @param added - * @param modified - */ - public Modifications(List added, List modified) - { - this(added, modified, null); - } - - /** - * Constructs ... - * - * - * @param added - * @param modified - * @param removed - */ - public Modifications(List added, List modified, - List removed) - { - this.added = added; - this.modified = modified; - this.removed = removed; - } - - //~--- methods -------------------------------------------------------------- - - /** - * {@inheritDoc} - * - * - * @param obj - * - * @return - */ - @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - final Modifications other = (Modifications) obj; - - return Objects.equal(added, other.added) - && Objects.equal(modified, other.modified) - && Objects.equal(removed, other.removed); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public int hashCode() - { - return Objects.hashCode(added, modified, removed); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public String toString() - { - StringBuilder out = new StringBuilder(); - - out.append("added:").append(Util.toString(added)).append("\n"); - out.append("modified:").append(Util.toString(modified)).append("\n"); - out.append("removed:").append(Util.toString(removed)).append("\n"); - - return out.toString(); - } - - //~--- get methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @return - */ - public List getAdded() - { - if (added == null) - { - added = Lists.newArrayList(); - } - - return added; - } - - /** - * Method description - * - * - * @return - */ - public List getModified() - { - if (modified == null) - { - modified = Lists.newArrayList(); - } - - return modified; - } - - /** - * Method description - * - * - * @return - */ - public List getRemoved() - { - if (removed == null) - { - removed = Lists.newArrayList(); - } - - return removed; - } - - public String getRevision() { - return revision; - } - - //~--- set methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @param added - */ - public void setAdded(List added) - { - this.added = added; - } - - /** - * Method description - * - * - * @param modified - */ - public void setModified(List modified) - { - this.modified = modified; - } - - /** - * Method description - * - * - * @param removed - */ - public void setRemoved(List removed) - { - this.removed = removed; - } - - public void setRevision(String revision) { + public Modifications(String revision, Collection modifications) { this.revision = revision; + this.modifications = ImmutableList.copyOf(modifications); } - //~--- fields --------------------------------------------------------------- + public List getEffectedPaths() { + return effectedPathsStream().collect(toList()); + } - private String revision; + public Stream effectedPathsStream() { + return modifications.stream().flatMap(Modification::getEffectedPaths); + } - /** list of added files */ - @XmlElement(name = "added") - @XmlElementWrapper(name = "added") - private List added; + public List getAdded() { + return modifications.stream() + .filter(m -> m instanceof Added) + .map(m -> (Added) m) + .collect(toList()); + } - /** list of modified files */ - @XmlElement(name = "modified") - @XmlElementWrapper(name = "modified") - private List modified; + public List getRemoved() { + return modifications.stream() + .filter(m -> m instanceof Removed) + .map(m -> (Removed) m) + .collect(toList()); + } - /** list of removed files */ - @XmlElement(name = "removed") - @XmlElementWrapper(name = "removed") - private List removed; + public List getModified() { + return modifications.stream() + .filter(m -> m instanceof Modified) + .map(m -> (Modified) m) + .collect(toList()); + } + + public List getRenamed() { + return modifications.stream() + .filter(m -> m instanceof Renamed) + .map(m -> (Renamed) m) + .collect(toList()); + } + + public List getCopied() { + return modifications.stream() + .filter(m -> m instanceof Copied) + .map(m -> (Copied) m) + .collect(toList()); + } } diff --git a/scm-core/src/main/java/sonia/scm/repository/Modified.java b/scm-core/src/main/java/sonia/scm/repository/Modified.java new file mode 100644 index 0000000000..38f50ef2c0 --- /dev/null +++ b/scm-core/src/main/java/sonia/scm/repository/Modified.java @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.repository; + +import lombok.Value; + +import java.util.stream.Stream; + +import static java.util.stream.Stream.of; + +@Value +public class Modified extends Modification { + private final String path; + + @Override + Stream getEffectedPaths() { + return of(path); + } +} diff --git a/scm-core/src/main/java/sonia/scm/repository/Person.java b/scm-core/src/main/java/sonia/scm/repository/Person.java index 7068271e00..503108e076 100644 --- a/scm-core/src/main/java/sonia/scm/repository/Person.java +++ b/scm-core/src/main/java/sonia/scm/repository/Person.java @@ -21,94 +21,70 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -//~--- non-JDK imports -------------------------------------------------------- - -import com.google.common.base.Objects; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; import sonia.scm.Validateable; import sonia.scm.util.Util; import sonia.scm.util.ValidationUtil; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; -//~--- JDK imports ------------------------------------------------------------ - /** * The {@link Person} (author) of a changeset. * * @person Sebastian Sdorra */ -@XmlRootElement(name = "person") -@XmlAccessorType(XmlAccessType.FIELD) -public class Person implements Validateable, Serializable -{ +@EqualsAndHashCode +@Getter +@Setter +public class Person implements Validateable, Serializable { - /** Field description */ private static final long serialVersionUID = -4675080650527063196L; - //~--- constructors --------------------------------------------------------- + /** + * mail address of the person + */ + private String mail; /** - * Constructs a new {@link Person}. - * This constructor is used by JAXB. - * + * name of the person */ - public Person() {} + private String name; - /** - * Constructs a new {@link Person}. - * - * - * @param name name of {@link Person} - */ - public Person(String name) - { + public Person() { + } + + public Person(String name) { this.name = name; } - /** - * Constructs a new {@link Person} with name and mail address. - * - * - * @param name name of the {@link Person} - * @param mail mail address of the {@link Person} - */ - public Person(String name, String mail) - { + public Person(String name, String mail) { this.name = name; this.mail = mail; } - //~--- methods -------------------------------------------------------------- - /** * Parses the given string and returns a {@link Person} object. The string * should be in the format "name >mail<". if the string contains no * "><" the whole string is handled as the name of the {@link Person}. * - * * @param value string representation of a {@link Person} object - * * @return {@link Person} object which is generated from the given string */ - public static Person toPerson(String value) - { + public static Person toPerson(String value) { Person person = null; - if (Util.isNotEmpty(value)) - { + if (Util.isNotEmpty(value)) { String name = value; String mail = null; int s = value.indexOf('<'); int e = value.indexOf('>'); - if ((s > 0) && (e > 0)) - { + if ((s > 0) && (e > 0)) { name = value.substring(0, s).trim(); mail = value.substring(s + 1, e).trim(); } @@ -119,56 +95,17 @@ public class Person implements Validateable, Serializable return person; } - /** - * {@inheritDoc} - * - * @param obj - * - * @return - */ - @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - Person other = (Person) obj; - - return Objects.equal(name, other.name) && Objects.equal(mail, other.mail); - } - - /** - * {@inheritDoc} - * - * @return - */ - @Override - public int hashCode() - { - return Objects.hashCode(name, mail); - } - /** * Returns a string representation of the {@link Person} object, * in the format "name >mail<". * - * * @return string representation of {@link Person} object */ @Override - public String toString() - { + public String toString() { String out = name; - if (mail != null) - { + if (mail != null) { out = out.concat(" <").concat(mail).concat(">"); } @@ -180,71 +117,30 @@ public class Person implements Validateable, Serializable /** * Returns the mail address of the changeset author. * - * - * @return mail address of the changeset author - * * @return */ - public String getMail() - { + public String getMail() { return mail; } /** * Returns the name of the changeset author. * - * * @return name of the changeset person */ - public String getName() - { + public String getName() { return name; } + /** * Returns true if the person is valid. * - * * @return true if the person is valid */ @Override - public boolean isValid() - { + public boolean isValid() { return Util.isNotEmpty(name) - && (Util.isEmpty(mail) || ValidationUtil.isMailAddressValid(mail)); + && (Util.isEmpty(mail) || ValidationUtil.isMailAddressValid(mail)); } - - //~--- set methods ---------------------------------------------------------- - - /** - * Sets the mail address of the changeset author. - * - * - * @param mail mail address of the author - */ - public void setMail(String mail) - { - this.mail = mail; - } - - /** - * Sets the name of the changeset author. - * - * - * @param name name of the author - */ - public void setName(String name) - { - this.name = name; - } - - //~--- fields --------------------------------------------------------------- - - /** mail address of the person */ - private String mail; - - /** - * name of the person - */ - private String name; } diff --git a/scm-core/src/main/java/sonia/scm/repository/Removed.java b/scm-core/src/main/java/sonia/scm/repository/Removed.java new file mode 100644 index 0000000000..4cc7ba8800 --- /dev/null +++ b/scm-core/src/main/java/sonia/scm/repository/Removed.java @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.repository; + +import lombok.Value; + +import java.util.stream.Stream; + +import static java.util.stream.Stream.of; + +@Value +public class Removed extends Modification { + private final String path; + + @Override + Stream getEffectedPaths() { + return of(path); + } +} diff --git a/scm-core/src/main/java/sonia/scm/repository/Renamed.java b/scm-core/src/main/java/sonia/scm/repository/Renamed.java new file mode 100644 index 0000000000..3535b8bf9b --- /dev/null +++ b/scm-core/src/main/java/sonia/scm/repository/Renamed.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.repository; + +import lombok.Value; + +import java.util.stream.Stream; + +import static java.util.stream.Stream.of; + +@Value +public class Renamed extends Modification { + private final String oldPath; + private final String newPath; + + @Override + Stream getEffectedPaths() { + return of(oldPath, newPath); + } +} diff --git a/scm-core/src/main/java/sonia/scm/repository/SubRepository.java b/scm-core/src/main/java/sonia/scm/repository/SubRepository.java index e9ee839e23..1c0622dadb 100644 --- a/scm-core/src/main/java/sonia/scm/repository/SubRepository.java +++ b/scm-core/src/main/java/sonia/scm/repository/SubRepository.java @@ -21,221 +21,43 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -//~--- non-JDK imports -------------------------------------------------------- +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; -//~--- JDK imports ------------------------------------------------------------ +@EqualsAndHashCode +@ToString +@Getter +@Setter +public class SubRepository implements Serializable { -/** - * @since 1.10 - * @author Sebastian Sdorra - */ -@XmlRootElement(name = "subrepository") -@XmlAccessorType(XmlAccessType.FIELD) -public class SubRepository implements Serializable -{ - - /** Field description */ private static final long serialVersionUID = 6960065820378492531L; - //~--- constructors --------------------------------------------------------- - - /** - * Constructs ... - * - */ - public SubRepository() {} - - /** - * Constructs ... - * - * - * @param repositoryUrl - */ - public SubRepository(String repositoryUrl) - { - this.repositoryUrl = repositoryUrl; - } - - /** - * Constructs ... - * - * - * @param revision - * @param repositoryUrl - */ - public SubRepository(String repositoryUrl, String revision) - { - this.repositoryUrl = repositoryUrl; - this.revision = revision; - } - - /** - * Constructs ... - * - * - * @param revision - * @param repositoryUrl - * @param browserUrl - */ - public SubRepository(String repositoryUrl, String browserUrl, String revision) - { - this.repositoryUrl = repositoryUrl; - this.browserUrl = browserUrl; - this.revision = revision; - } - - //~--- methods -------------------------------------------------------------- - - /** - * {@inheritDoc} - * - * - * @param obj - * - * @return - */ - @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - SubRepository other = (SubRepository) obj; - - return Objects.equal(repositoryUrl, other.repositoryUrl) - && Objects.equal(browserUrl, other.browserUrl) - && Objects.equal(revision, other.revision); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public int hashCode() - { - return Objects.hashCode(repositoryUrl, browserUrl, revision); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public String toString() - { - //J- - return MoreObjects.toStringHelper(this) - .add("repositoryUrl", repositoryUrl) - .add("browserUrl", browserUrl) - .add("revision", revision) - .toString(); - //J+ - } - - //~--- get methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @return - */ - public String getBrowserUrl() - { - return browserUrl; - } - - /** - * Method description - * - * - * @return - */ - public String getRepositoryUrl() - { - return repositoryUrl; - } - - /** - * Method description - * - * - * @return - */ - public String getRevision() - { - return revision; - } - - //~--- set methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @param browserUrl - */ - public void setBrowserUrl(String browserUrl) - { - this.browserUrl = browserUrl; - } - - /** - * Method description - * - * - * @param repositoryUrl - */ - public void setRepositoryUrl(String repositoryUrl) - { - this.repositoryUrl = repositoryUrl; - } - - /** - * Method description - * - * - * @param revision - */ - public void setRevision(String revision) - { - this.revision = revision; - } - - //~--- fields --------------------------------------------------------------- - - /** Field description */ - @XmlElement(name = "browser-url") private String browserUrl; - - /** Field description */ - @XmlElement(name = "repository-url") private String repositoryUrl; - - /** Field description */ private String revision; + + public SubRepository() { + } + + public SubRepository(String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + } + + public SubRepository(String repositoryUrl, String revision) { + this.repositoryUrl = repositoryUrl; + this.revision = revision; + } + + public SubRepository(String repositoryUrl, String browserUrl, String revision) { + this.repositoryUrl = repositoryUrl; + this.browserUrl = browserUrl; + this.revision = revision; + } } diff --git a/scm-core/src/main/java/sonia/scm/repository/Tag.java b/scm-core/src/main/java/sonia/scm/repository/Tag.java index c66876d0c3..3c40c2f38a 100644 --- a/scm-core/src/main/java/sonia/scm/repository/Tag.java +++ b/scm-core/src/main/java/sonia/scm/repository/Tag.java @@ -21,19 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -//~--- non-JDK imports -------------------------------------------------------- - -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; - -//~--- JDK imports ------------------------------------------------------------ +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.ToString; /** * Represents a tag in a repository. @@ -41,118 +34,22 @@ import javax.xml.bind.annotation.XmlRootElement; * @author Sebastian Sdorra * @since 1.18 */ -@XmlRootElement(name = "tag") -@XmlAccessorType(XmlAccessType.FIELD) -public final class Tag -{ +@EqualsAndHashCode +@ToString +@Getter +public final class Tag { - /** - * Constructs a new instance of tag. - * This constructor should only be called from JAXB. - * - */ - public Tag() {} + private final String name; + private final String revision; /** * Constructs a new tag. * - * - * @param name name of the tag + * @param name name of the tag * @param revision tagged revision */ - public Tag(String name, String revision) - { + public Tag(String name, String revision) { this.name = name; this.revision = revision; } - - //~--- methods -------------------------------------------------------------- - - /** - * {@inheritDoc} - * - * - * @param obj - * - * @return - */ - @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - final Tag other = (Tag) obj; - - return Objects.equal(name, other.name) - && Objects.equal(revision, other.revision); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public int hashCode() - { - return Objects.hashCode(name, revision); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public String toString() - { - //J- - return MoreObjects.toStringHelper(this) - .add("name", name) - .add("revision", revision) - .toString(); - //J+ - } - - //~--- get methods ---------------------------------------------------------- - - /** - * Returns the name of the tag. - * - * - * @return name of the tag - */ - public String getName() - { - return name; - } - - /** - * Id of the tagged revision. - * - * - * @return tagged revision id - */ - public String getRevision() - { - return revision; - } - - //~--- fields --------------------------------------------------------------- - - /** Field description */ - private String name; - - /** Field description */ - private String revision; } diff --git a/scm-core/src/main/java/sonia/scm/repository/Tags.java b/scm-core/src/main/java/sonia/scm/repository/Tags.java index 85642eb400..d1be764c20 100644 --- a/scm-core/src/main/java/sonia/scm/repository/Tags.java +++ b/scm-core/src/main/java/sonia/scm/repository/Tags.java @@ -21,139 +21,53 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -//~--- non-JDK imports -------------------------------------------------------- - -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; import com.google.common.collect.Lists; +import lombok.EqualsAndHashCode; +import lombok.Setter; +import lombok.ToString; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.util.Iterator; import java.util.List; -//~--- JDK imports ------------------------------------------------------------ - /** * Represents all tags of a repository. * * @author Sebastian Sdorra * @since 1.18 */ -@XmlRootElement(name = "tags") -@XmlAccessorType(XmlAccessType.FIELD) -public final class Tags implements Iterable -{ +@EqualsAndHashCode +@ToString +@Setter +public final class Tags implements Iterable { - /** - * Constructs a new instance of tags. - * This constructor should only be called from JAXB. - * - */ - public Tags() {} + private List tags; - /** - * Constructs a new instance of tags. - * - * - * @param tags list of tags. - */ - public Tags(List tags) - { + public Tags() { + } + + public Tags(List tags) { this.tags = tags; } - //~--- methods -------------------------------------------------------------- - - /** - * {@inheritDoc} - * - * - * @param obj - * - * @return - */ @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - final Tags other = (Tags) obj; - - return Objects.equal(tags, other.tags); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public int hashCode() - { - return Objects.hashCode(tags); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public Iterator iterator() - { + public Iterator iterator() { return getTags().iterator(); } - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public String toString() - { - //J- - return MoreObjects.toStringHelper(this) - .add("tags", tags) - .toString(); - //J+ - } - - //~--- get methods ---------------------------------------------------------- - /** * Returns the {@link Tag} with the given name or null. * - * * @param name name of the tag - * * @return {@link Tag} with the given name or null */ - public Tag getTagByName(String name) - { + public Tag getTagByName(String name) { Tag tag = null; - for (Tag t : getTags()) - { - if (name.equals(t.getName())) - { + for (Tag t : getTags()) { + if (name.equals(t.getName())) { tag = t; break; @@ -166,19 +80,14 @@ public final class Tags implements Iterable /** * Returns the {@link Tag} with the given revision or null. * - * * @param revision revision of the tag - * * @return {@link Tag} with the given revision or null */ - public Tag getTagByRevision(String revision) - { + public Tag getTagByRevision(String revision) { Tag tag = null; - for (Tag t : getTags()) - { - if (revision.equals(t.getRevision())) - { + for (Tag t : getTags()) { + if (revision.equals(t.getRevision())) { tag = t; break; @@ -191,35 +100,13 @@ public final class Tags implements Iterable /** * Returns all tags of a repository. * - * * @return all tags */ - public List getTags() - { - if (tags == null) - { + public List getTags() { + if (tags == null) { tags = Lists.newArrayList(); } return tags; } - - //~--- set methods ---------------------------------------------------------- - - /** - * Sets all tags. - * - * - * @param tags tags - */ - public void setTags(List tags) - { - this.tags = tags; - } - - //~--- fields --------------------------------------------------------------- - - /** Field description */ - @XmlElement(name = "tag") - private List tags; } diff --git a/scm-core/src/main/java/sonia/scm/repository/api/DiffFile.java b/scm-core/src/main/java/sonia/scm/repository/api/DiffFile.java index b5cbd08ec7..fb1d102846 100644 --- a/scm-core/src/main/java/sonia/scm/repository/api/DiffFile.java +++ b/scm-core/src/main/java/sonia/scm/repository/api/DiffFile.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.api; public interface DiffFile extends Iterable { @@ -33,4 +33,10 @@ public interface DiffFile extends Iterable { String getOldPath(); String getNewPath(); + + ChangeType getChangeType(); + + enum ChangeType { + ADD, MODIFY, DELETE, RENAME, COPY + } } diff --git a/scm-core/src/main/java/sonia/scm/repository/api/PushResponse.java b/scm-core/src/main/java/sonia/scm/repository/api/PushResponse.java index 077225b1e6..e639748cc3 100644 --- a/scm-core/src/main/java/sonia/scm/repository/api/PushResponse.java +++ b/scm-core/src/main/java/sonia/scm/repository/api/PushResponse.java @@ -21,39 +21,25 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.api; -//~--- JDK imports ------------------------------------------------------------ - -import javax.xml.bind.annotation.XmlRootElement; - /** - * The {@link PushResponse} is the result of the + * The {@link PushResponse} is the result of the * {@link PushCommandBuilder#push(sonia.scm.repository.Repository)} method and * contains informations over the executed push command. - * + * * @author Sebastian Sdorra * @since 1.31 */ -@XmlRootElement(name = "push-response") -public final class PushResponse extends AbstractPushOrPullResponse -{ +public final class PushResponse extends AbstractPushOrPullResponse { /** * Constructs a new PushResponse. * - */ - public PushResponse() {} - - /** - * Constructs a new PushResponse. - * - * * @param changesetCount count of pushed changesets */ - public PushResponse(long changesetCount) - { + public PushResponse(long changesetCount) { super(changesetCount); } } diff --git a/scm-core/src/main/java/sonia/scm/repository/api/RepositoryServiceFactory.java b/scm-core/src/main/java/sonia/scm/repository/api/RepositoryServiceFactory.java index e2b60dc935..15bc338ff0 100644 --- a/scm-core/src/main/java/sonia/scm/repository/api/RepositoryServiceFactory.java +++ b/scm-core/src/main/java/sonia/scm/repository/api/RepositoryServiceFactory.java @@ -21,13 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.api; //~--- non-JDK imports -------------------------------------------------------- import com.github.legman.ReferenceType; import com.github.legman.Subscribe; +import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.google.common.collect.Sets; @@ -126,7 +127,7 @@ public final class RepositoryServiceFactory * @param repositoryManager manager for repositories * @param resolvers a set of {@link RepositoryServiceResolver} * @param preProcessorUtil helper object for pre processor handling - * + * @param protocolProviders * @param workdirProvider * @since 1.21 */ @@ -135,6 +136,19 @@ public final class RepositoryServiceFactory CacheManager cacheManager, RepositoryManager repositoryManager, Set resolvers, PreProcessorUtil preProcessorUtil, Set protocolProviders, WorkdirProvider workdirProvider) + { + this( + configuration, cacheManager, repositoryManager, resolvers, + preProcessorUtil, protocolProviders, workdirProvider, ScmEventBus.getInstance() + ); + } + + @VisibleForTesting + RepositoryServiceFactory(ScmConfiguration configuration, + CacheManager cacheManager, RepositoryManager repositoryManager, + Set resolvers, PreProcessorUtil preProcessorUtil, + Set protocolProviders, WorkdirProvider workdirProvider, + ScmEventBus eventBus) { this.configuration = configuration; this.cacheManager = cacheManager; @@ -144,7 +158,7 @@ public final class RepositoryServiceFactory this.protocolProviders = protocolProviders; this.workdirProvider = workdirProvider; - ScmEventBus.getInstance().register(new CacheClearHook(cacheManager)); + eventBus.register(new CacheClearHook(cacheManager)); } //~--- methods -------------------------------------------------------------- @@ -232,7 +246,7 @@ public final class RepositoryServiceFactory Preconditions.checkNotNull(repository, "repository is required"); // check for read permissions of current user - RepositoryPermissions.read(repository); + RepositoryPermissions.read(repository).check(); RepositoryService service = null; @@ -271,7 +285,7 @@ public final class RepositoryServiceFactory */ private static class CacheClearHook { - + private final Set> caches = Sets.newHashSet(); /** @@ -293,14 +307,14 @@ public final class RepositoryServiceFactory /** * Clear caches on explicit repository cache clear event. - * + * * @param event clear event */ @Subscribe public void onEvent(ClearRepositoryCacheEvent event) { clearCaches(event.getRepository().getId()); } - + /** * Clear caches on repository push. * @@ -332,7 +346,7 @@ public final class RepositoryServiceFactory clearCaches(event.getItem().getId()); } } - + @SuppressWarnings("unchecked") private void clearCaches(final String repositoryId) { diff --git a/scm-core/src/main/java/sonia/scm/repository/spi/BlameCommandRequest.java b/scm-core/src/main/java/sonia/scm/repository/spi/BlameCommandRequest.java index ce215fa526..e208e3256a 100644 --- a/scm-core/src/main/java/sonia/scm/repository/spi/BlameCommandRequest.java +++ b/scm-core/src/main/java/sonia/scm/repository/spi/BlameCommandRequest.java @@ -21,14 +21,17 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; +import lombok.EqualsAndHashCode; + /** * * @author Sebastian Sdorra * @since 1.17 */ +@EqualsAndHashCode(callSuper = true) public final class BlameCommandRequest extends FileBaseCommandRequest { diff --git a/scm-core/src/main/java/sonia/scm/repository/spi/BrowseCommandRequest.java b/scm-core/src/main/java/sonia/scm/repository/spi/BrowseCommandRequest.java index 5075e83feb..c27400970f 100644 --- a/scm-core/src/main/java/sonia/scm/repository/spi/BrowseCommandRequest.java +++ b/scm-core/src/main/java/sonia/scm/repository/spi/BrowseCommandRequest.java @@ -21,13 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; -//~--- non-JDK imports -------------------------------------------------------- - -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; +import lombok.EqualsAndHashCode; +import lombok.ToString; import sonia.scm.repository.BrowserResult; import java.util.function.Consumer; @@ -37,6 +35,8 @@ import java.util.function.Consumer; * @author Sebastian Sdorra * @since 1.17 */ +@EqualsAndHashCode(callSuper = true) +@ToString public final class BrowseCommandRequest extends FileBaseCommandRequest { @@ -53,14 +53,6 @@ public final class BrowseCommandRequest extends FileBaseCommandRequest this.updater = updater; } - //~--- methods -------------------------------------------------------------- - - /** - * {@inheritDoc} - * - * - * @return - */ @Override public BrowseCommandRequest clone() { @@ -80,74 +72,6 @@ public final class BrowseCommandRequest extends FileBaseCommandRequest return clone; } - /** - * {@inheritDoc} - * - * - * @param obj - * - * @return - */ - @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - final BrowseCommandRequest other = (BrowseCommandRequest) obj; - - return super.equals(obj) - && Objects.equal(recursive, other.recursive) - && Objects.equal(disableLastCommit, other.disableLastCommit) - && Objects.equal(disableSubRepositoryDetection, other.disableSubRepositoryDetection) - && Objects.equal(offset, other.offset) - && Objects.equal(limit, other.limit); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public int hashCode() - { - return Objects.hashCode(super.hashCode(), recursive, disableLastCommit, - disableSubRepositoryDetection, offset, limit); - } - - /** - * {@inheritDoc} - * - * - * @return - */ - @Override - public String toString() - { - //J- - return MoreObjects.toStringHelper(this) - .add("path", getPath()) - .add("revision", getRevision()) - .add("recursive", recursive) - .add("disableLastCommit", disableLastCommit) - .add("disableSubRepositoryDetection", disableSubRepositoryDetection) - .add("limit", limit) - .add("offset", offset) - .toString(); - //J+ - } - - //~--- set methods ---------------------------------------------------------- - /** * True to disable the last commit. * @@ -292,5 +216,6 @@ public final class BrowseCommandRequest extends FileBaseCommandRequest // WARNING / TODO: This field creates a reverse channel from the implementation to the API. This will break // whenever the API runs in a different process than the SPI (for example to run explicit hosts for git repositories). + @EqualsAndHashCode.Exclude private final transient Consumer updater; } diff --git a/scm-core/src/main/java/sonia/scm/repository/spi/CatCommandRequest.java b/scm-core/src/main/java/sonia/scm/repository/spi/CatCommandRequest.java index 5c96c237cb..ed8424cfc4 100644 --- a/scm-core/src/main/java/sonia/scm/repository/spi/CatCommandRequest.java +++ b/scm-core/src/main/java/sonia/scm/repository/spi/CatCommandRequest.java @@ -21,14 +21,17 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; +import lombok.EqualsAndHashCode; + /** * * @author Sebastian Sdorra * @since 1.17 */ +@EqualsAndHashCode(callSuper = true) public final class CatCommandRequest extends FileBaseCommandRequest { diff --git a/scm-core/src/main/java/sonia/scm/repository/spi/DiffCommandRequest.java b/scm-core/src/main/java/sonia/scm/repository/spi/DiffCommandRequest.java index 58cea9bdb6..6f6443b83b 100644 --- a/scm-core/src/main/java/sonia/scm/repository/spi/DiffCommandRequest.java +++ b/scm-core/src/main/java/sonia/scm/repository/spi/DiffCommandRequest.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- import com.google.common.base.Strings; - +import lombok.EqualsAndHashCode; import sonia.scm.Validateable; import sonia.scm.repository.api.DiffFormat; @@ -36,21 +36,12 @@ import sonia.scm.repository.api.DiffFormat; * @author Sebastian Sdorra * @since 1.17 */ +@EqualsAndHashCode(callSuper = true) public final class DiffCommandRequest extends FileBaseCommandRequest - implements Validateable -{ + implements Validateable { - /** Field description */ private static final long serialVersionUID = 4026911212676859626L; - //~--- methods -------------------------------------------------------------- - - /** - * Method description - * - * - * @return - */ @Override public DiffCommandRequest clone() { @@ -70,14 +61,6 @@ public final class DiffCommandRequest extends FileBaseCommandRequest return clone; } - //~--- get methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @return - */ @Override public boolean isValid() { @@ -85,8 +68,6 @@ public final class DiffCommandRequest extends FileBaseCommandRequest ||!Strings.isNullOrEmpty(getRevision()); } - //~--- set methods ---------------------------------------------------------- - /** * Sets the diff format which should be used for the output. * @@ -103,7 +84,6 @@ public final class DiffCommandRequest extends FileBaseCommandRequest public void setAncestorChangeset(String ancestorChangeset) { this.ancestorChangeset = ancestorChangeset; } -//~--- get methods ---------------------------------------------------------- /** * Return the output format of the diff command. @@ -121,7 +101,6 @@ public final class DiffCommandRequest extends FileBaseCommandRequest public String getAncestorChangeset() { return ancestorChangeset; } -//~--- fields --------------------------------------------------------------- /** diff format */ private DiffFormat format = DiffFormat.NATIVE; diff --git a/scm-core/src/main/java/sonia/scm/repository/spi/FileBaseCommandRequest.java b/scm-core/src/main/java/sonia/scm/repository/spi/FileBaseCommandRequest.java index 8994db75a8..457c528694 100644 --- a/scm-core/src/main/java/sonia/scm/repository/spi/FileBaseCommandRequest.java +++ b/scm-core/src/main/java/sonia/scm/repository/spi/FileBaseCommandRequest.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; +import lombok.EqualsAndHashCode; +import lombok.ToString; import java.io.Serializable; @@ -38,54 +38,14 @@ import java.io.Serializable; * @author Sebastian Sdorra * @since 1.17 */ +@EqualsAndHashCode +@ToString public abstract class FileBaseCommandRequest - implements Resetable, Serializable, Cloneable -{ + implements Resetable, Serializable, Cloneable { /** Field description */ private static final long serialVersionUID = -3442101119408346165L; - //~--- methods -------------------------------------------------------------- - - /** - * Method description - * - * - * @param obj - * - * @return - */ - @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - final FileBaseCommandRequest other = (FileBaseCommandRequest) obj; - - return Objects.equal(path, other.path) - && Objects.equal(revision, other.revision); - } - - /** - * Method description - * - * - * @return - */ - @Override - public int hashCode() - { - return Objects.hashCode(path, revision); - } - /** * Method description * @@ -97,81 +57,26 @@ public abstract class FileBaseCommandRequest revision = null; } - /** - * Method description - * - * - * @return - */ - @Override - public String toString() - { - //J- - return MoreObjects.toStringHelper(this) - .add("path", path) - .add("revision", revision) - .toString(); - //J+ - } - - //~--- set methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @param path - */ public void setPath(String path) { this.path = path; } - /** - * Method description - * - * - * @param revision - */ public void setRevision(String revision) { this.revision = revision; } - //~--- get methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @return - */ public String getPath() { return path; } - /** - * Method description - * - * - * @return - */ public String getRevision() { return revision; } - //~--- methods -------------------------------------------------------------- - - /** - * Method description - * - * - * @return - * - * @throws CloneNotSupportedException - */ @Override protected FileBaseCommandRequest clone() throws CloneNotSupportedException { @@ -192,11 +97,7 @@ public abstract class FileBaseCommandRequest return clone; } - //~--- fields --------------------------------------------------------------- - - /** Field description */ private String path; - /** Field description */ private String revision; } diff --git a/scm-core/src/main/java/sonia/scm/security/DefaultCipherHandler.java b/scm-core/src/main/java/sonia/scm/security/DefaultCipherHandler.java index 8250c91a44..77e08ac0d5 100644 --- a/scm-core/src/main/java/sonia/scm/security/DefaultCipherHandler.java +++ b/scm-core/src/main/java/sonia/scm/security/DefaultCipherHandler.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.security; //~--- non-JDK imports -------------------------------------------------------- @@ -42,6 +42,8 @@ import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.security.GeneralSecurityException; import java.security.MessageDigest; @@ -51,27 +53,38 @@ import java.security.SecureRandom; import java.util.Arrays; import java.util.Base64; +import javax.crypto.Cipher; import javax.crypto.SecretKey; +import javax.crypto.spec.GCMParameterSpec; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; /** - * Default implementation of the {@link CipherHandler}, which uses AES for + * Default implementation of the {@link CipherHandler}, which uses AES for * encryption and decryption. - * + * * @author Sebastian Sdorra * @since 1.7 */ public class DefaultCipherHandler implements CipherHandler { - /** used cipher type */ - public static final String CIPHER_TYPE = "AES/CTR/PKCS5PADDING"; + /** + * Cipher type used before v2. + * @see Issue 1110 + */ + public static final String OLD_CIPHER_TYPE = "AES/CTR/PKCS5PADDING"; + + /** used cipher type for format v2 */ + public static final String CIPHER_TYPE = "AES/GCM/NoPadding"; + + /** prefix to detect new format */ + public static final String PREFIX_FORMAT_V2 = "v2:"; /** digest type for key generation */ public static final String DIGEST_TYPE = "SHA-512"; /** string encoding */ - public static final String ENCODING = "UTF-8"; + public static final Charset ENCODING = StandardCharsets.UTF_8; /** default key length */ public static final int KEY_LENGTH = 16; @@ -92,12 +105,12 @@ public class DefaultCipherHandler implements CipherHandler { private static final String KEY_TYPE = "AES"; /** the logger for DefaultCipherHandler */ - private static final Logger logger = LoggerFactory.getLogger(DefaultCipherHandler.class); - + private static final Logger LOG = LoggerFactory.getLogger(DefaultCipherHandler.class); + private final SecureRandom random = new SecureRandom(); - + private final char[] key; - + /** * Constructs a new DefaultCipherHandler. Note this constructor is only for * unit tests. @@ -112,7 +125,7 @@ public class DefaultCipherHandler implements CipherHandler { } /** - * Constructs a new instance and reads the default key from the scm home directory, + * Constructs a new instance and reads the default key from the scm home directory, * if the key file does not exists it will be generated with the {@link KeyGenerator}. * * @param context SCM-Manager context provider @@ -161,25 +174,26 @@ public class DefaultCipherHandler implements CipherHandler { } private String decode(char[] plainKey, String value, Base64.Decoder decoder) { + CipherFactory cipherFactory = oldCipherFactor; + if (value.startsWith(PREFIX_FORMAT_V2)) { + cipherFactory = v2CipherFactor; + value = value.substring(PREFIX_FORMAT_V2.length()); + } else { + LOG.warn("found encrypted data in old format, the data should be stored again to ensure the new format is used"); + } + try { byte[] encodedInput = decoder.decode(value); byte[] salt = new byte[SALT_LENGTH]; byte[] encoded = new byte[encodedInput.length - SALT_LENGTH]; System.arraycopy(encodedInput, 0, salt, 0, SALT_LENGTH); - System.arraycopy(encodedInput, SALT_LENGTH, encoded, 0, - encodedInput.length - SALT_LENGTH); - - IvParameterSpec iv = new IvParameterSpec(salt); - SecretKey secretKey = buildSecretKey(plainKey); - javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance(CIPHER_TYPE); - - cipher.init(javax.crypto.Cipher.DECRYPT_MODE, secretKey, iv); + System.arraycopy(encodedInput, SALT_LENGTH, encoded, 0, encodedInput.length - SALT_LENGTH); + Cipher cipher = cipherFactory.create(plainKey, salt, Cipher.DECRYPT_MODE); byte[] decoded = cipher.doFinal(encoded); - return new String(decoded, ENCODING); - } catch (IOException | GeneralSecurityException ex) { + } catch (GeneralSecurityException ex) { throw new CipherException("could not decode string", ex); } } @@ -204,11 +218,7 @@ public class DefaultCipherHandler implements CipherHandler { random.nextBytes(salt); - IvParameterSpec iv = new IvParameterSpec(salt); - SecretKey secretKey = buildSecretKey(plainKey); - javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance(CIPHER_TYPE); - - cipher.init(javax.crypto.Cipher.ENCRYPT_MODE, secretKey, iv); + Cipher cipher = v2CipherFactor.create(plainKey, salt, Cipher.ENCRYPT_MODE); byte[] inputBytes = value.getBytes(ENCODING); byte[] encodedInput = cipher.doFinal(inputBytes); @@ -217,15 +227,15 @@ public class DefaultCipherHandler implements CipherHandler { System.arraycopy(salt, 0, result, 0, SALT_LENGTH); System.arraycopy(encodedInput, 0, result, SALT_LENGTH, result.length - SALT_LENGTH); - res = new String(Base64.getUrlEncoder().encode(result), ENCODING); - } catch (IOException | GeneralSecurityException ex) { + res = PREFIX_FORMAT_V2 + new String(Base64.getUrlEncoder().encode(result), ENCODING); + } catch (GeneralSecurityException ex) { throw new CipherException("could not encode string", ex); } return res; } - private SecretKey buildSecretKey(char[] plainKey) throws IOException, NoSuchAlgorithmException { + private SecretKey buildSecretKey(char[] plainKey) throws NoSuchAlgorithmException { byte[] raw = new String(plainKey).getBytes(ENCODING); MessageDigest digest = MessageDigest.getInstance(DIGEST_TYPE); @@ -237,16 +247,50 @@ public class DefaultCipherHandler implements CipherHandler { private char[] loadKey(File cipherKeyFile) throws IOException { try (BufferedReader reader = new BufferedReader(new FileReader(cipherKeyFile))) { - String line = reader.readLine(); + String encodedKey = reader.readLine(); - return decode(KEY_BASE, line).toCharArray(); + char[] decodedKey = decode(KEY_BASE, encodedKey).toCharArray(); + + // rewrite key in new format, if the stored key uses the old format + if (!encodedKey.startsWith(PREFIX_FORMAT_V2)) { + LOG.info("found default key in old format, rewrite with new format"); + storeKey(cipherKeyFile, decodedKey); + } + + return decodedKey; } } private void storeKey(File cipherKeyFile) throws FileNotFoundException { + storeKey(cipherKeyFile, key); + } + + private void storeKey(File cipherKeyFile, char[] key) throws FileNotFoundException { String storeKey = encode(KEY_BASE, new String(key)); try (PrintWriter output = new PrintWriter(cipherKeyFile)) { output.write(storeKey); } } + + @FunctionalInterface + private interface CipherFactory { + Cipher create(char[] plainKey, byte[] salt, int mode) throws GeneralSecurityException; + + } + + private final CipherFactory v2CipherFactor = (char[] plainKey, byte[] salt, int mode) -> { + Cipher cipher = Cipher.getInstance(CIPHER_TYPE); + SecretKey secretKey = buildSecretKey(plainKey); + GCMParameterSpec parameterSpec = new GCMParameterSpec(128, salt); + cipher.init(mode, secretKey, parameterSpec); + return cipher; + }; + + private final CipherFactory oldCipherFactor = (char[] plainKey, byte[] salt, int mode) -> { + Cipher cipher = Cipher.getInstance(OLD_CIPHER_TYPE); + SecretKey secretKey = buildSecretKey(plainKey); + IvParameterSpec iv = new IvParameterSpec(salt); + cipher.init(Cipher.DECRYPT_MODE, secretKey, iv); + return cipher; + }; } diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/EdisonHalAppender.java b/scm-core/src/main/java/sonia/scm/web/EdisonHalAppender.java similarity index 92% rename from scm-webapp/src/main/java/sonia/scm/api/v2/resources/EdisonHalAppender.java rename to scm-core/src/main/java/sonia/scm/web/EdisonHalAppender.java index 688010d1ef..8df9b4a683 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/EdisonHalAppender.java +++ b/scm-core/src/main/java/sonia/scm/web/EdisonHalAppender.java @@ -22,22 +22,23 @@ * SOFTWARE. */ -package sonia.scm.api.v2.resources; +package sonia.scm.web; import de.otto.edison.hal.Embedded; import de.otto.edison.hal.HalRepresentation; import de.otto.edison.hal.Link; import de.otto.edison.hal.Links; +import sonia.scm.api.v2.resources.HalAppender; import java.util.ArrayList; import java.util.List; -class EdisonHalAppender implements HalAppender { +public final class EdisonHalAppender implements HalAppender { private final Links.Builder linkBuilder; private final Embedded.Builder embeddedBuilder; - EdisonHalAppender(Links.Builder linkBuilder, Embedded.Builder embeddedBuilder) { + public EdisonHalAppender(Links.Builder linkBuilder, Embedded.Builder embeddedBuilder) { this.linkBuilder = linkBuilder; this.embeddedBuilder = embeddedBuilder; } diff --git a/scm-core/src/main/java/sonia/scm/web/api/DtoValidator.java b/scm-core/src/main/java/sonia/scm/web/api/DtoValidator.java new file mode 100644 index 0000000000..2b81fe6c62 --- /dev/null +++ b/scm-core/src/main/java/sonia/scm/web/api/DtoValidator.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.web.api; + +import javax.validation.ConstraintViolation; +import javax.validation.ConstraintViolationException; +import javax.validation.Validation; +import javax.validation.Validator; +import javax.validation.ValidatorFactory; +import java.util.Set; + +public final class DtoValidator { + + private DtoValidator() { + } + + public static void validate(Object configuration) { + ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); + Validator validator = factory.getValidator(); + Set> violations = validator.validate(configuration); + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } +} diff --git a/scm-core/src/main/java/sonia/scm/web/filter/BufferedHttpServletRequest.java b/scm-core/src/main/java/sonia/scm/web/filter/BufferedHttpServletRequest.java index 04f725d4ed..e674d1d2e2 100644 --- a/scm-core/src/main/java/sonia/scm/web/filter/BufferedHttpServletRequest.java +++ b/scm-core/src/main/java/sonia/scm/web/filter/BufferedHttpServletRequest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.web.filter; //~--- non-JDK imports -------------------------------------------------------- @@ -36,6 +36,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; +import javax.servlet.ReadListener; import javax.servlet.ServletInputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; @@ -197,6 +198,25 @@ public class BufferedHttpServletRequest extends HttpServletRequestWrapper return bais.read(buf, off, len); } + @Override + public boolean isFinished() { + return bais.available() == 0; + } + + @Override + public boolean isReady() { + return bais.available() > 0; + } + + @Override + public void setReadListener(ReadListener readListener) { + try { + readListener.onDataAvailable(); + } catch (IOException e) { + logger.debug("could not call readListener.onDataAvailable()", e); + } + } + //~--- fields ------------------------------------------------------------- /** Field description */ diff --git a/scm-core/src/main/java/sonia/scm/web/filter/BufferedHttpServletResponse.java b/scm-core/src/main/java/sonia/scm/web/filter/BufferedHttpServletResponse.java index 5d647659e5..0d13ed752f 100644 --- a/scm-core/src/main/java/sonia/scm/web/filter/BufferedHttpServletResponse.java +++ b/scm-core/src/main/java/sonia/scm/web/filter/BufferedHttpServletResponse.java @@ -21,11 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.web.filter; //~--- JDK imports ------------------------------------------------------------ +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintWriter; @@ -37,6 +40,7 @@ import java.util.Map; import java.util.Set; import javax.servlet.ServletOutputStream; +import javax.servlet.WriteListener; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponseWrapper; @@ -48,6 +52,8 @@ import javax.servlet.http.HttpServletResponseWrapper; public class BufferedHttpServletResponse extends HttpServletResponseWrapper { + private static final Logger LOG = LoggerFactory.getLogger(BufferedHttpServletResponse.class); + /** * Constructs ... * @@ -445,6 +451,20 @@ public class BufferedHttpServletResponse extends HttpServletResponseWrapper baos.write(param); } + @Override + public boolean isReady() { + return true; + } + + @Override + public void setWriteListener(WriteListener writeListener) { + try { + writeListener.onWritePossible(); + } catch (IOException e) { + LOG.debug("could not call writeListener.onWritePossible()", e); + } + } + //~--- fields ------------------------------------------------------------- /** Field description */ diff --git a/scm-core/src/main/java/sonia/scm/xml/EncryptionUtil.java b/scm-core/src/main/java/sonia/scm/xml/EncryptionUtil.java new file mode 100644 index 0000000000..c1312d27b2 --- /dev/null +++ b/scm-core/src/main/java/sonia/scm/xml/EncryptionUtil.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.xml; + +import com.google.common.base.Strings; +import sonia.scm.security.CipherUtil; + +final class EncryptionUtil { + + private static final String PREFIX = "{enc}"; + + private EncryptionUtil() { + } + + static String decrypt(String value) { + if (!value.startsWith(PREFIX)) { + //Return value if not encrypted yet + return value; + } + + return CipherUtil.getInstance().decode(value.substring(PREFIX.length())); + } + + static String encrypt(String value) { + return PREFIX.concat(CipherUtil.getInstance().encode(value)); + } + + static boolean isEncrypted(String value) { + return !Strings.isNullOrEmpty(value) && value.startsWith(PREFIX); + } +} diff --git a/scm-core/src/main/java/sonia/scm/xml/XmlEncryptionAdapter.java b/scm-core/src/main/java/sonia/scm/xml/XmlEncryptionAdapter.java new file mode 100644 index 0000000000..f24a9ce589 --- /dev/null +++ b/scm-core/src/main/java/sonia/scm/xml/XmlEncryptionAdapter.java @@ -0,0 +1,48 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.xml; + +import javax.xml.bind.annotation.adapters.XmlAdapter; + +public class XmlEncryptionAdapter extends XmlAdapter { + + @Override + public String marshal(String v) { + if (!EncryptionUtil.isEncrypted(v)) { + v = EncryptionUtil.encrypt(v); + } + + return v; + } + + @Override + public String unmarshal(String v) { + if (EncryptionUtil.isEncrypted(v)) { + v = EncryptionUtil.decrypt(v); + } + + return v; + } +} diff --git a/scm-core/src/test/java/sonia/scm/BaseDirectoryTest.java b/scm-core/src/test/java/sonia/scm/BaseDirectoryTest.java new file mode 100644 index 0000000000..b9342db32d --- /dev/null +++ b/scm-core/src/test/java/sonia/scm/BaseDirectoryTest.java @@ -0,0 +1,124 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm; + +import com.google.common.collect.ImmutableMap; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.util.Map; +import java.util.Properties; + +import static org.assertj.core.api.Assertions.assertThat; + +class BaseDirectoryTest { + + @Test + void shouldGetFromClassPathResource() { + BaseDirectory directory = builder().withClassPathResource("/sonia/scm/basedirectory.properties").create(); + assertThat(directory.find().toString()).isEqualTo("/tmp/scm_home"); + } + + @Test + void shouldGetFromSystemProperty() { + BaseDirectory directory = builder().withSystemProperty(BaseDirectory.SYSTEM_PROPERTY, "/tmp/scm_home").create(); + assertThat(directory.find().toString()).isEqualTo("/tmp/scm_home"); + } + + @Test + void shouldGetFromEnvironmentVariable() { + BaseDirectory directory = builder().withEnvironment(BaseDirectory.ENVIRONMENT_VARIABLE, "/tmp/scm_home").create(); + assertThat(directory.find().toString()).isEqualTo("/tmp/scm_home"); + } + + @Nested + class OsSpecificDefaults { + + @Test + void linux() { + BaseDirectory directory = builder().withSystemProperty("user.home", "/tmp").create(); + assertThat(directory.find().toString()).isEqualTo("/tmp/.scm"); + } + + @Test + void osx() { + BaseDirectory directory = builder().withOsx().withSystemProperty("user.home", "/tmp").create(); + assertThat(directory.find().toString()).isEqualTo("/tmp/Library/Application Support/SCM-Manager"); + } + + @Test + void windows() { + BaseDirectory directory = builder().withWindows().withEnvironment("APPDATA", "/tmp").create(); + assertThat(directory.find().toString()).isEqualTo("/tmp\\SCM-Manager"); + } + + } + + private BaseDirectoryBuilder builder() { + return new BaseDirectoryBuilder(); + } + + static class BaseDirectoryBuilder { + + private Platform platform = platform("Linux"); + private String classPathResource = "/scm.properties"; + private Map environment = ImmutableMap.of(); + private Properties systemProperties = new Properties(); + + public BaseDirectoryBuilder withOsx() { + this.platform = platform("Mac OS X"); + return this; + } + + public BaseDirectoryBuilder withWindows() { + this.platform = platform("Windows"); + return this; + } + + private Platform platform(String osName) { + return new Platform(osName, "64", "x86_64"); + } + + public BaseDirectoryBuilder withClassPathResource(String classPathResource) { + this.classPathResource = classPathResource; + return this; + } + + public BaseDirectoryBuilder withEnvironment(String key, String value) { + this.environment = ImmutableMap.of(key, value); + return this; + } + + public BaseDirectoryBuilder withSystemProperty(String key, String value) { + systemProperties.put(key, value); + return this; + } + + public BaseDirectory create() { + return new BaseDirectory(platform, classPathResource, environment, systemProperties); + } + } + +} diff --git a/scm-core/src/test/java/sonia/scm/BasicContextProviderTest.java b/scm-core/src/test/java/sonia/scm/BasicContextProviderTest.java index efd5c2c2c4..babba7dd3d 100644 --- a/scm-core/src/test/java/sonia/scm/BasicContextProviderTest.java +++ b/scm-core/src/test/java/sonia/scm/BasicContextProviderTest.java @@ -21,21 +21,19 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import java.nio.file.Path; import java.nio.file.Paths; import static org.assertj.core.api.Assertions.assertThat; -@ExtendWith(TempDirectory.class) class BasicContextProviderTest { @Nested @@ -68,13 +66,13 @@ class BasicContextProviderTest { private BasicContextProvider context; @BeforeEach - void setUpContext(@TempDirectory.TempDir Path baseDirectory) { + void setUpContext(@TempDir Path baseDirectory) { this.baseDirectory = baseDirectory; context = new BasicContextProvider(baseDirectory.toFile(), "x.y.z", Stage.PRODUCTION); } @Test - void shouldReturnAbsolutePathAsIs(@TempDirectory.TempDir Path path) { + void shouldReturnAbsolutePathAsIs(@TempDir Path path) { Path absolutePath = path.toAbsolutePath(); Path resolved = context.resolve(absolutePath); diff --git a/scm-core/src/test/java/sonia/scm/repository/ModificationsTest.java b/scm-core/src/test/java/sonia/scm/repository/ModificationsTest.java new file mode 100644 index 0000000000..f6023248e4 --- /dev/null +++ b/scm-core/src/test/java/sonia/scm/repository/ModificationsTest.java @@ -0,0 +1,71 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.repository; + +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +class ModificationsTest { + + public static final Modifications MODIFICATIONS = new Modifications("123", + new Added("added"), + new Removed("removed"), + new Modified("modified"), + new Renamed("rename from", "rename to"), + new Copied("copy from", "copy to") + ); + + @Test + void shouldFindAddedFilesAsEffected() { + assertThat(MODIFICATIONS.getEffectedPaths()) + .contains("added"); + } + + @Test + void shouldFindRemovedFilesAsEffected() { + assertThat(MODIFICATIONS.getEffectedPaths()) + .contains("removed"); + } + + @Test + void shouldFindModifiedFilesAsEffected() { + assertThat(MODIFICATIONS.getEffectedPaths()) + .contains("modified"); + } + + @Test + void shouldFindRenamedFilesAsEffected() { + assertThat(MODIFICATIONS.getEffectedPaths()) + .contains("rename from", "rename to"); + } + + @Test + void shouldFindTargetOfCopiedFilesAsEffected() { + assertThat(MODIFICATIONS.getEffectedPaths()) + .contains("copy to") + .doesNotContain("copy from"); + } +} diff --git a/scm-core/src/test/java/sonia/scm/repository/api/ModifyCommandBuilderTest.java b/scm-core/src/test/java/sonia/scm/repository/api/ModifyCommandBuilderTest.java index abbfd0a638..a374a2272c 100644 --- a/scm-core/src/test/java/sonia/scm/repository/api/ModifyCommandBuilderTest.java +++ b/scm-core/src/test/java/sonia/scm/repository/api/ModifyCommandBuilderTest.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.api; import com.google.common.io.ByteSource; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.invocation.InvocationOnMock; @@ -57,7 +57,6 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) -@ExtendWith(TempDirectory.class) class ModifyCommandBuilderTest { @Mock @@ -71,7 +70,7 @@ class ModifyCommandBuilderTest { Path workdir; @BeforeEach - void initWorkdir(@TempDirectory.TempDir Path temp) throws IOException { + void initWorkdir(@TempDir Path temp) throws IOException { workdir = Files.createDirectory(temp.resolve("workdir")); lenient().when(workdirProvider.createNewWorkdir()).thenReturn(workdir.toFile()); commandBuilder = new ModifyCommandBuilder(command, workdirProvider); @@ -207,7 +206,7 @@ class ModifyCommandBuilderTest { } @Test - void shouldDeleteTemporaryFiles(@TempDirectory.TempDir Path temp) throws IOException { + void shouldDeleteTemporaryFiles(@TempDir Path temp) throws IOException { ArgumentCaptor nameCaptor = ArgumentCaptor.forClass(String.class); ArgumentCaptor fileCaptor = ArgumentCaptor.forClass(File.class); doNothing().when(worker).modify(nameCaptor.capture(), fileCaptor.capture()); diff --git a/scm-core/src/test/java/sonia/scm/repository/api/RepositoryServiceFactoryTest.java b/scm-core/src/test/java/sonia/scm/repository/api/RepositoryServiceFactoryTest.java new file mode 100644 index 0000000000..d908321bb6 --- /dev/null +++ b/scm-core/src/test/java/sonia/scm/repository/api/RepositoryServiceFactoryTest.java @@ -0,0 +1,144 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.repository.api; + +import com.google.common.collect.ImmutableSet; +import org.apache.shiro.authz.AuthorizationException; +import org.apache.shiro.subject.Subject; +import org.apache.shiro.util.ThreadContext; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Answers; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import sonia.scm.NotFoundException; +import sonia.scm.cache.CacheManager; +import sonia.scm.config.ScmConfiguration; +import sonia.scm.event.ScmEventBus; +import sonia.scm.repository.NamespaceAndName; +import sonia.scm.repository.PreProcessorUtil; +import sonia.scm.repository.Repository; +import sonia.scm.repository.RepositoryManager; +import sonia.scm.repository.spi.RepositoryServiceProvider; +import sonia.scm.repository.spi.RepositoryServiceResolver; +import sonia.scm.repository.util.WorkdirProvider; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.mockito.Mockito.*; + +@ExtendWith(MockitoExtension.class) +class RepositoryServiceFactoryTest { + + @Mock + private ScmConfiguration configuration; + + @Mock(answer = Answers.RETURNS_MOCKS) + private CacheManager cacheManager; + + @Mock + private RepositoryManager repositoryManager; + + @Mock + private WorkdirProvider workdirProvider; + + @Mock + private PreProcessorUtil preProcessorUtil; + + @Mock + private ScmEventBus eventBus; + + private RepositoryServiceFactory factory; + + @Mock + private Subject subject; + + private final Repository repository = new Repository( + "AmRy34KFi1", "git", "hitchhiker", "heart-of-gold" + ); + + @BeforeEach + void setUpFactory() { + factory = createFactory(null); + } + + private RepositoryServiceFactory createFactory(RepositoryServiceResolver repositoryServiceResolver) { + ImmutableSet.Builder builder = ImmutableSet.builder(); + if (repositoryServiceResolver != null) { + builder.add(repositoryServiceResolver); + } + return new RepositoryServiceFactory( + configuration, cacheManager, repositoryManager, builder.build(), + preProcessorUtil, ImmutableSet.of(), workdirProvider, eventBus + ); + } + + @BeforeEach + void bindSubject() { + ThreadContext.bind(subject); + } + + @AfterEach + void unbindSubject() { + ThreadContext.unbindSubject(); + } + + @Test + void shouldThrowAuthorizationException() { + doThrow(AuthorizationException.class).when(subject).checkPermission("repository:read:AmRy34KFi1"); + assertThrows(AuthorizationException.class, () -> factory.create(repository)); + } + + @Test + void shouldThrowNotFoundExceptionForId() { + assertThrows(NotFoundException.class, () -> factory.create("AmRy34KFi1")); + } + + @Test + void shouldThrowNotFoundExceptionForNamespaceAndName() { + NamespaceAndName namespaceAndName = new NamespaceAndName("hitchhiker", "heart-of-gold"); + assertThrows(NotFoundException.class, () -> factory.create(namespaceAndName)); + } + + @Test + void shouldThrowRepositoryServiceNotFoundException() { + when(repositoryManager.get("AmRy34KFi1")).thenReturn(repository); + assertThrows(RepositoryServiceNotFoundException.class, () -> factory.create("AmRy34KFi1")); + } + + @Test + void shouldCreateRepositoryService() { + RepositoryServiceResolver repositoryServiceResolver = mock(RepositoryServiceResolver.class); + factory = createFactory(repositoryServiceResolver); + RepositoryServiceProvider repositoryServiceProvider = mock(RepositoryServiceProvider.class); + when(repositoryServiceResolver.resolve(repository)).thenReturn(repositoryServiceProvider); + + RepositoryService repositoryService = factory.create(repository); + assertThat(repositoryService).isNotNull(); + } + +} diff --git a/scm-core/src/test/java/sonia/scm/repository/spi/ModifyWorkerHelperTest.java b/scm-core/src/test/java/sonia/scm/repository/spi/ModifyWorkerHelperTest.java index a4fbc1770b..1d675e0743 100644 --- a/scm-core/src/test/java/sonia/scm/repository/spi/ModifyWorkerHelperTest.java +++ b/scm-core/src/test/java/sonia/scm/repository/spi/ModifyWorkerHelperTest.java @@ -21,12 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import sonia.scm.repository.Repository; import java.io.File; @@ -36,11 +35,10 @@ import java.nio.file.Path; import static org.assertj.core.api.Assertions.assertThat; -@ExtendWith(TempDirectory.class) class ModifyWorkerHelperTest { @Test - void shouldKeepExecutableFlag(@TempDirectory.TempDir Path temp) throws IOException { + void shouldKeepExecutableFlag(@TempDir Path temp) throws IOException { File target = createFile(temp, "executable.sh"); File newFile = createFile(temp, "other"); diff --git a/scm-core/src/test/java/sonia/scm/security/DefaultCipherHandlerTest.java b/scm-core/src/test/java/sonia/scm/security/DefaultCipherHandlerTest.java index 844c23a945..6f88f71597 100644 --- a/scm-core/src/test/java/sonia/scm/security/DefaultCipherHandlerTest.java +++ b/scm-core/src/test/java/sonia/scm/security/DefaultCipherHandlerTest.java @@ -21,83 +21,122 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.security; +import com.google.common.io.Files; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.api.io.TempDir; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import sonia.scm.SCMContextProvider; + import java.io.File; import java.io.IOException; -import org.junit.Test; -import static org.junit.Assert.*; -import org.junit.Rule; -import org.junit.rules.TemporaryFolder; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import static org.mockito.Mockito.*; -import org.mockito.junit.MockitoJUnitRunner; -import sonia.scm.SCMContextProvider; +import java.nio.charset.StandardCharsets; +import java.nio.file.Path; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.when; /** * Unit tests for {@link DefaultCipherHandler}. - * + * * @author Sebastian Sdorra */ -@RunWith(MockitoJUnitRunner.class) +@ExtendWith({MockitoExtension.class}) public class DefaultCipherHandlerTest { - + @Mock private SCMContextProvider context; - + @Mock private KeyGenerator keyGenerator; - - @Rule - public TemporaryFolder tempFolder = new TemporaryFolder(); - + /** * Tests loading and storing default key. - * - * @throws IOException */ @Test - public void testLoadingAndStoringDefaultKey() throws IOException { - File baseDirectory = tempFolder.newFolder(); + void shouldLoadAndStoreDefaultKey(@TempDir Path tempDir) throws IOException { + File baseDirectory = tempDir.toFile(); + when(context.getBaseDirectory()).thenReturn(baseDirectory); when(keyGenerator.createKey()).thenReturn("secret"); - + DefaultCipherHandler cipher = new DefaultCipherHandler(context, keyGenerator); File configDirectory = new File(baseDirectory, "config"); - assertTrue(new File(configDirectory, DefaultCipherHandler.CIPHERKEY_FILENAME).exists()); - + File defaultKeyFile = new File(configDirectory, DefaultCipherHandler.CIPHERKEY_FILENAME); + assertThat(defaultKeyFile).exists(); + // plain text for assertion String plain = "hallo123"; - + // encrypt value with new generated key String encrypted = cipher.encode(plain); - + // load key from disk cipher = new DefaultCipherHandler(context, keyGenerator); - + // decrypt with loaded key - assertEquals(plain, cipher.decode(encrypted)); + assertThat(cipher.decode(encrypted)).isEqualTo(plain); + } + + @Test + @SuppressWarnings("UnstableApiUsage") // is ok for unit test + void shouldReEncodeOldFormattedDefaultKey(@TempDir Path tempDir) throws IOException { + String oldKey = "17eXopruTtX3S4dJ9KTEmbZ-vfZztw=="; + String encryptedValue = "A11kQF7wytpWCkjPflxJB-zUWJ1CVKU3qhwhRFq4Pvl6XqiS9V2w-gqNktqMX6YNDw=="; + String plainValue = "Marvin The Paranoid Android - RAM"; + + File baseDirectory = tempDir.toFile(); + + when(context.getBaseDirectory()).thenReturn(baseDirectory); + + File configDirectory = new File(baseDirectory, "config"); + configDirectory.mkdirs(); + File defaultKeyFile = new File(configDirectory, DefaultCipherHandler.CIPHERKEY_FILENAME); + Files.write(oldKey.getBytes(StandardCharsets.UTF_8), defaultKeyFile); + + + DefaultCipherHandler cipher = new DefaultCipherHandler(context, keyGenerator); + + String newKey = Files.readLines(defaultKeyFile, StandardCharsets.UTF_8).get(0); + assertThat(newKey).startsWith(DefaultCipherHandler.PREFIX_FORMAT_V2); + assertThat(cipher.decode(encryptedValue)).isEqualTo(plainValue); } /** * Test encode and decode method with a separate key. */ @Test - public void testEncodeDecodeWithSeparateKey(){ + void shouldEncodeAndDecodeWithSeparateKey(){ char[] key = "testkey".toCharArray(); DefaultCipherHandler cipher = new DefaultCipherHandler("somekey"); - assertEquals("hallo123", cipher.decode(key, cipher.encode(key, "hallo123"))); + assertThat(cipher.decode(key, cipher.encode(key, "hallo123"))).isEqualTo("hallo123"); } /** * Test encode and decode method with the default key. - */ + */ @Test - public void testEncodeDecodeWithDefaultKey() { + void shouldEncodeAndDecodeWithDefaultKey() { DefaultCipherHandler cipher = new DefaultCipherHandler("testkey"); - assertEquals("hallo123", cipher.decode(cipher.encode("hallo123"))); + assertThat(cipher.decode(cipher.encode("hallo123"))).isEqualTo("hallo123"); + } + + @Test + void shouldDecodeOldCipherFormat() { + DefaultCipherHandler cipher = new DefaultCipherHandler("hitchhiker-secrets"); + String oldFormat = "zhoCMoApolM3cMPRqXHjcGBd-gDQN0JHwWBxvyh3xnCWzj5V"; + assertThat(cipher.decode(oldFormat)).isEqualTo("Arthur Dent's Secret"); + } + + @Test + void shouldAddPrefixToEncodedValue() { + DefaultCipherHandler cipher = new DefaultCipherHandler("hitchhiker-secrets"); + String encoded = cipher.encode("Trillian's Secret Dairy"); + assertThat(encoded).startsWith(DefaultCipherHandler.PREFIX_FORMAT_V2); } } diff --git a/scm-webapp/src/test/java/sonia/scm/api/v2/resources/EdisonHalAppenderTest.java b/scm-core/src/test/java/sonia/scm/web/EdisonHalAppenderTest.java similarity index 97% rename from scm-webapp/src/test/java/sonia/scm/api/v2/resources/EdisonHalAppenderTest.java rename to scm-core/src/test/java/sonia/scm/web/EdisonHalAppenderTest.java index ff2a15b97a..0abb1c209c 100644 --- a/scm-webapp/src/test/java/sonia/scm/api/v2/resources/EdisonHalAppenderTest.java +++ b/scm-core/src/test/java/sonia/scm/web/EdisonHalAppenderTest.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package sonia.scm.api.v2.resources; +package sonia.scm.web; import de.otto.edison.hal.Embedded; import de.otto.edison.hal.HalRepresentation; @@ -30,6 +30,7 @@ import de.otto.edison.hal.Link; import de.otto.edison.hal.Links; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import sonia.scm.web.EdisonHalAppender; import java.util.List; diff --git a/scm-core/src/test/java/sonia/scm/web/api/DtoValidatorTest.java b/scm-core/src/test/java/sonia/scm/web/api/DtoValidatorTest.java new file mode 100644 index 0000000000..f3370bd252 --- /dev/null +++ b/scm-core/src/test/java/sonia/scm/web/api/DtoValidatorTest.java @@ -0,0 +1,59 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.web.api; + +import org.junit.jupiter.api.Test; + +import javax.validation.ValidationException; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +class DtoValidatorTest { + + @Test + void shouldValidateInvalidBean() { + assertThrows( + ValidationException.class, + () -> DtoValidator.validate(new AnyQuestion(43)) + ); + } + + @Test + void shouldValidateValidBean() { + DtoValidator.validate(new AnyQuestion(42)); + } + + static class AnyQuestion { + @Min(42) + @Max(42) + int answer; + + public AnyQuestion(int answer) { + this.answer = answer; + } + } +} diff --git a/scm-core/src/test/java/sonia/scm/xml/EncryptionUtilTest.java b/scm-core/src/test/java/sonia/scm/xml/EncryptionUtilTest.java new file mode 100644 index 0000000000..57db6b8075 --- /dev/null +++ b/scm-core/src/test/java/sonia/scm/xml/EncryptionUtilTest.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.xml; + +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +class EncryptionUtilTest { + + private final static String API_TOKEN = "113bb79d12c179301b93e9ff1ad32181a0"; + + @Test + void shouldEncrypt() { + String encryptedToken = EncryptionUtil.encrypt(API_TOKEN); + + assertThat(API_TOKEN).isNotEqualTo(encryptedToken); + assertThat(encryptedToken).startsWith("{enc}"); + } + + @Test + void shouldReturnDecryptedApiToken() { + String encryptedToken = EncryptionUtil.encrypt(API_TOKEN); + String decryptedToken = EncryptionUtil.decrypt(encryptedToken); + + assertThat(decryptedToken).isEqualTo(API_TOKEN); + } + + @Test + void shouldReturnApiTokenIfNotEncrypted() { + String token = EncryptionUtil.decrypt(API_TOKEN); + + assertThat(token).isEqualTo(API_TOKEN); + } + + @Test + void shouldCheckIfTokenIsEncrypted() { + String encryptedToken = EncryptionUtil.encrypt(API_TOKEN); + boolean encrypted = EncryptionUtil.isEncrypted(encryptedToken); + boolean notEncrypted = EncryptionUtil.isEncrypted(API_TOKEN); + + assertThat(encrypted).isEqualTo(true); + assertThat(notEncrypted).isEqualTo(false); + } +} diff --git a/scm-core/src/test/java/sonia/scm/xml/XmlEncryptionAdapterTest.java b/scm-core/src/test/java/sonia/scm/xml/XmlEncryptionAdapterTest.java new file mode 100644 index 0000000000..a185878151 --- /dev/null +++ b/scm-core/src/test/java/sonia/scm/xml/XmlEncryptionAdapterTest.java @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.xml; + +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +class XmlEncryptionAdapterTest { + + private final static String API_TOKEN = "113bb79d12c179301b93e9ff1ad32181a0"; + + private final XmlEncryptionAdapter xmlEncryptionAdapter = new XmlEncryptionAdapter(); + + @Test + void shouldEncryptTokenOnMarshalling() { + String marshalledToken = xmlEncryptionAdapter.marshal(API_TOKEN); + + assertThat(marshalledToken).isNotEqualTo(API_TOKEN); + assertThat(marshalledToken).startsWith("{enc}"); + } + + @Test + void shouldUnmarshallEncryptedToken() { + String marshalledToken = xmlEncryptionAdapter.marshal(API_TOKEN); + + String unmarshalledToken = xmlEncryptionAdapter.unmarshal(marshalledToken); + + assertThat(unmarshalledToken).isEqualTo(API_TOKEN); + } + + @Test + void shouldUnmarshallNotEncryptedToken() { + String unmarshalledToken = xmlEncryptionAdapter.unmarshal(API_TOKEN); + + assertThat(unmarshalledToken).isEqualTo(API_TOKEN); + } +} diff --git a/scm-core/src/test/java/sonia/scm/xml/XmlInstantAdapterTest.java b/scm-core/src/test/java/sonia/scm/xml/XmlInstantAdapterTest.java index 917022c42e..3abac6c132 100644 --- a/scm-core/src/test/java/sonia/scm/xml/XmlInstantAdapterTest.java +++ b/scm-core/src/test/java/sonia/scm/xml/XmlInstantAdapterTest.java @@ -21,12 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.xml; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import javax.xml.bind.JAXB; import javax.xml.bind.annotation.XmlAccessType; @@ -36,13 +35,12 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import java.nio.file.Path; import java.time.Instant; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; -@ExtendWith(TempDirectory.class) class XmlInstantAdapterTest { @Test - void shouldMarshalAndUnmarshalInstant(@TempDirectory.TempDir Path tempDirectory) { + void shouldMarshalAndUnmarshalInstant(@TempDir Path tempDirectory) { Path path = tempDirectory.resolve("instant.xml"); Instant instant = Instant.now(); diff --git a/scm-core/src/test/resources/META-INF/validation.xml b/scm-core/src/test/resources/META-INF/validation.xml new file mode 100644 index 0000000000..521ef2b195 --- /dev/null +++ b/scm-core/src/test/resources/META-INF/validation.xml @@ -0,0 +1,34 @@ + + + + org.hibernate.validator.parameternameprovider.ReflectionParameterNameProvider + + diff --git a/scm-core/src/test/resources/sonia/scm/basedirectory.properties b/scm-core/src/test/resources/sonia/scm/basedirectory.properties new file mode 100644 index 0000000000..1f05dc7743 --- /dev/null +++ b/scm-core/src/test/resources/sonia/scm/basedirectory.properties @@ -0,0 +1,25 @@ +# +# MIT License +# +# Copyright (c) 2020-present Cloudogu GmbH and Contributors +# +# 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. +# + +scm.home = /tmp/scm_home diff --git a/scm-dao-xml/src/main/java/sonia/scm/store/JAXBDataStore.java b/scm-dao-xml/src/main/java/sonia/scm/store/JAXBDataStore.java index 2fbadadf45..e963c58983 100644 --- a/scm-dao-xml/src/main/java/sonia/scm/store/JAXBDataStore.java +++ b/scm-dao-xml/src/main/java/sonia/scm/store/JAXBDataStore.java @@ -30,6 +30,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import sonia.scm.security.KeyGenerator; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Marshaller; import java.io.File; import java.util.Map; @@ -60,7 +62,22 @@ public class JAXBDataStore extends FileBasedStore implements DataStore @Override public void put(String id, T item) { LOG.debug("put item {} to store", id); - context.marshal(item, getFile(id)); + + File file = getFile(id); + + try { + Marshaller marshaller = context.createMarshaller(); + + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); + CopyOnWrite.withTemporaryFile( + temp -> marshaller.marshal(item, temp.toFile()), + file.toPath() + ); + } + catch (JAXBException ex) { + throw new StoreException("could not write object with id ".concat(id), + ex); + } } @Override diff --git a/scm-dao-xml/src/main/java/sonia/scm/store/TypedStoreContext.java b/scm-dao-xml/src/main/java/sonia/scm/store/TypedStoreContext.java index b5627c1b06..58e3e1efdc 100644 --- a/scm-dao-xml/src/main/java/sonia/scm/store/TypedStoreContext.java +++ b/scm-dao-xml/src/main/java/sonia/scm/store/TypedStoreContext.java @@ -93,7 +93,7 @@ final class TypedStoreContext { } } - private Marshaller createMarshaller() { + Marshaller createMarshaller() { try { Marshaller marshaller = jaxbContext.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); diff --git a/scm-dao-xml/src/test/java/sonia/scm/repository/xml/PathBasedRepositoryLocationResolverTest.java b/scm-dao-xml/src/test/java/sonia/scm/repository/xml/PathBasedRepositoryLocationResolverTest.java index 019c4de862..7c474ea95c 100644 --- a/scm-dao-xml/src/test/java/sonia/scm/repository/xml/PathBasedRepositoryLocationResolverTest.java +++ b/scm-dao-xml/src/test/java/sonia/scm/repository/xml/PathBasedRepositoryLocationResolverTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.xml; import com.google.common.base.Charsets; @@ -29,7 +29,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoSettings; @@ -52,7 +52,6 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) -@ExtendWith(TempDirectory.class) @MockitoSettings(strictness = Strictness.LENIENT) class PathBasedRepositoryLocationResolverTest { @@ -74,7 +73,7 @@ class PathBasedRepositoryLocationResolverTest { private PathBasedRepositoryLocationResolver resolver; @BeforeEach - void beforeEach(@TempDirectory.TempDir Path temp) { + void beforeEach(@TempDir Path temp) { this.basePath = temp; when(contextProvider.getBaseDirectory()).thenReturn(temp.toFile()); when(contextProvider.resolve(any(Path.class))).thenAnswer(invocation -> invocation.getArgument(0)); diff --git a/scm-dao-xml/src/test/java/sonia/scm/repository/xml/XmlRepositoryDAOTest.java b/scm-dao-xml/src/test/java/sonia/scm/repository/xml/XmlRepositoryDAOTest.java index c90a61d874..4b7bce2093 100644 --- a/scm-dao-xml/src/test/java/sonia/scm/repository/xml/XmlRepositoryDAOTest.java +++ b/scm-dao-xml/src/test/java/sonia/scm/repository/xml/XmlRepositoryDAOTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.xml; @@ -31,7 +31,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.Mock; import org.mockito.invocation.InvocationOnMock; import org.mockito.junit.jupiter.MockitoExtension; @@ -61,7 +61,7 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@ExtendWith({MockitoExtension.class, TempDirectory.class}) +@ExtendWith({MockitoExtension.class}) @MockitoSettings(strictness = Strictness.LENIENT) class XmlRepositoryDAOTest { @@ -76,7 +76,7 @@ class XmlRepositoryDAOTest { private XmlRepositoryDAO dao; @BeforeEach - void createDAO(@TempDirectory.TempDir Path basePath) { + void createDAO(@TempDir Path basePath) { when(locationResolver.create(Path.class)).thenReturn( new RepositoryLocationResolver.RepositoryLocationResolverInstance() { @Override @@ -103,7 +103,7 @@ class XmlRepositoryDAOTest { when(locationResolver.remove(anyString())).thenAnswer(invocation -> basePath.resolve(invocation.getArgument(0).toString())); } - private Path createMockedRepoPath(@TempDirectory.TempDir Path basePath, InvocationOnMock invocation) { + private Path createMockedRepoPath(@TempDir Path basePath, InvocationOnMock invocation) { Path resolvedPath = basePath.resolve(invocation.getArgument(0).toString()); try { Files.createDirectories(resolvedPath); @@ -337,7 +337,7 @@ class XmlRepositoryDAOTest { private Path repositoryPath; @BeforeEach - void createMetadataFileForRepository(@TempDirectory.TempDir Path basePath) throws IOException { + void createMetadataFileForRepository(@TempDir Path basePath) throws IOException { repositoryPath = basePath.resolve("existing"); Files.createDirectories(repositoryPath); diff --git a/scm-dao-xml/src/test/java/sonia/scm/store/CopyOnWriteTest.java b/scm-dao-xml/src/test/java/sonia/scm/store/CopyOnWriteTest.java index e66fcd5b60..b2d9143655 100644 --- a/scm-dao-xml/src/test/java/sonia/scm/store/CopyOnWriteTest.java +++ b/scm-dao-xml/src/test/java/sonia/scm/store/CopyOnWriteTest.java @@ -21,13 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.store; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import java.io.FileOutputStream; import java.io.IOException; @@ -38,11 +37,10 @@ import java.nio.file.Paths; import static org.junit.jupiter.api.Assertions.assertThrows; import static sonia.scm.store.CopyOnWrite.withTemporaryFile; -@ExtendWith(TempDirectory.class) class CopyOnWriteTest { @Test - void shouldCreateNewFile(@TempDirectory.TempDir Path tempDir) { + void shouldCreateNewFile(@TempDir Path tempDir) { Path expectedFile = tempDir.resolve("toBeCreated.txt"); withTemporaryFile( @@ -53,7 +51,7 @@ class CopyOnWriteTest { } @Test - void shouldOverwriteExistingFile(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldOverwriteExistingFile(@TempDir Path tempDir) throws IOException { Path expectedFile = tempDir.resolve("toBeOverwritten.txt"); Files.createFile(expectedFile); @@ -65,7 +63,7 @@ class CopyOnWriteTest { } @Test - void shouldFailForDirectory(@TempDirectory.TempDir Path tempDir) { + void shouldFailForDirectory(@TempDir Path tempDir) { assertThrows(IllegalArgumentException.class, () -> withTemporaryFile( file -> new FileOutputStream(file.toFile()).write("should not be written".getBytes()), @@ -82,7 +80,7 @@ class CopyOnWriteTest { } @Test - void shouldKeepBackupIfTemporaryFileCouldNotBeWritten(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldKeepBackupIfTemporaryFileCouldNotBeWritten(@TempDir Path tempDir) throws IOException { Path unchangedOriginalFile = tempDir.resolve("notToBeDeleted.txt"); new FileOutputStream(unchangedOriginalFile.toFile()).write("this should be kept".getBytes()); @@ -98,7 +96,7 @@ class CopyOnWriteTest { } @Test - void shouldNotWrapRuntimeExceptions(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldNotWrapRuntimeExceptions(@TempDir Path tempDir) throws IOException { Path someFile = tempDir.resolve("something.txt"); assertThrows( @@ -111,7 +109,7 @@ class CopyOnWriteTest { } @Test - void shouldKeepBackupIfTemporaryFileIsMissing(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldKeepBackupIfTemporaryFileIsMissing(@TempDir Path tempDir) throws IOException { Path backedUpFile = tempDir.resolve("notToBeDeleted.txt"); new FileOutputStream(backedUpFile.toFile()).write("this should be kept".getBytes()); @@ -125,7 +123,7 @@ class CopyOnWriteTest { } @Test - void shouldDeleteExistingFile(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldDeleteExistingFile(@TempDir Path tempDir) throws IOException { Path expectedFile = tempDir.resolve("toBeReplaced.txt"); new FileOutputStream(expectedFile.toFile()).write("this should be removed".getBytes()); diff --git a/scm-dao-xml/src/test/java/sonia/scm/store/JAXBPropertyFileAccessTest.java b/scm-dao-xml/src/test/java/sonia/scm/store/JAXBPropertyFileAccessTest.java index bc498a9e04..0c6f4ac982 100644 --- a/scm-dao-xml/src/test/java/sonia/scm/store/JAXBPropertyFileAccessTest.java +++ b/scm-dao-xml/src/test/java/sonia/scm/store/JAXBPropertyFileAccessTest.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.store; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import sonia.scm.SCMContextProvider; @@ -48,7 +48,6 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.lenient; -@ExtendWith(TempDirectory.class) @ExtendWith(MockitoExtension.class) class JAXBPropertyFileAccessTest { @@ -63,7 +62,7 @@ class JAXBPropertyFileAccessTest { JAXBPropertyFileAccess fileAccess; @BeforeEach - void initTempDir(@TempDirectory.TempDir Path tempDir) { + void initTempDir(@TempDir Path tempDir) { lenient().when(contextProvider.getBaseDirectory()).thenReturn(tempDir.toFile()); lenient().when(contextProvider.resolve(any())).thenAnswer(invocation -> tempDir.resolve(invocation.getArgument(0).toString())); @@ -99,7 +98,7 @@ class JAXBPropertyFileAccessTest { } @Test - void shouldMoveStoreFileToRepositoryBasedLocation(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldMoveStoreFileToRepositoryBasedLocation(@TempDir Path tempDir) throws IOException { createV1StoreFile(tempDir, "myStore.xml"); fileAccess.forStoreName(STORE_NAME).moveAsRepositoryStore(Paths.get("myStore.xml"), REPOSITORY_ID); @@ -108,7 +107,7 @@ class JAXBPropertyFileAccessTest { } @Test - void shouldMoveAllStoreFilesToRepositoryBasedLocations(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldMoveAllStoreFilesToRepositoryBasedLocations(@TempDir Path tempDir) throws IOException { locationResolver.forClass(Path.class).createLocation("repoId2"); createV1StoreFile(tempDir, REPOSITORY_ID + ".xml"); @@ -122,7 +121,7 @@ class JAXBPropertyFileAccessTest { } } - private void createV1StoreFile(@TempDirectory.TempDir Path tempDir, String name) throws IOException { + private void createV1StoreFile(@TempDir Path tempDir, String name) throws IOException { Path v1Dir = tempDir.resolve("var").resolve("data").resolve(STORE_NAME); IOUtil.mkdirs(v1Dir.toFile()); Files.createFile(v1Dir.resolve(name)); @@ -132,7 +131,7 @@ class JAXBPropertyFileAccessTest { class ForMissingRepository { @Test - void shouldIgnoreStoreFile(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldIgnoreStoreFile(@TempDir Path tempDir) throws IOException { createV1StoreFile(tempDir, "myStore.xml"); fileAccess.forStoreName(STORE_NAME).moveAsRepositoryStore(Paths.get("myStore.xml"), REPOSITORY_ID); diff --git a/scm-it/pom.xml b/scm-it/pom.xml index 146a7b33b2..bf9b4e6d78 100644 --- a/scm-it/pom.xml +++ b/scm-it/pom.xml @@ -102,7 +102,7 @@ io.rest-assured rest-assured - 3.1.0 + 4.3.0 test diff --git a/scm-it/src/test/java/sonia/scm/it/AnonymousAccessITCase.java b/scm-it/src/test/java/sonia/scm/it/AnonymousAccessITCase.java index afda4475fd..0994ca0dcb 100644 --- a/scm-it/src/test/java/sonia/scm/it/AnonymousAccessITCase.java +++ b/scm-it/src/test/java/sonia/scm/it/AnonymousAccessITCase.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.it; import io.restassured.RestAssured; @@ -31,14 +31,9 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.extension.ExtensionContext; +import org.junit.jupiter.api.io.TempDir; import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.Arguments; -import org.junit.jupiter.params.provider.ArgumentsProvider; import org.junit.jupiter.params.provider.ArgumentsSource; -import org.junit.jupiter.params.provider.MethodSource; -import org.junitpioneer.jupiter.TempDirectory; import sonia.scm.it.utils.RepositoryUtil; import sonia.scm.it.utils.RestUtil; import sonia.scm.it.utils.ScmRequests; @@ -50,12 +45,10 @@ import sonia.scm.repository.client.api.RepositoryClientException; import javax.json.Json; import javax.json.JsonArray; import javax.servlet.http.HttpServletResponse; - import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.Objects; -import java.util.stream.Stream; import static java.util.Collections.emptyMap; import static org.junit.Assert.assertEquals; @@ -65,7 +58,6 @@ import static sonia.scm.it.utils.TestData.USER_ANONYMOUS; import static sonia.scm.it.utils.TestData.WRITE; import static sonia.scm.it.utils.TestData.getDefaultRepositoryUrl; -@ExtendWith(TempDirectory.class) class AnonymousAccessITCase { @Test @@ -118,7 +110,7 @@ class AnonymousAccessITCase { @ParameterizedTest @ArgumentsSource(ScmTypes.class) - void shouldNotCloneRepository(String type, @TempDirectory.TempDir Path temporaryFolder) { + void shouldNotCloneRepository(String type, @TempDir Path temporaryFolder) { assertThrows(RepositoryClientException.class, () -> RepositoryUtil.createAnonymousRepositoryClient(type, Files.createDirectories(temporaryFolder).toFile())); } } @@ -142,7 +134,7 @@ class AnonymousAccessITCase { @ParameterizedTest @ArgumentsSource(ScmTypes.class) - void shouldCloneRepository(String type, @TempDirectory.TempDir Path temporaryFolder) throws IOException { + void shouldCloneRepository(String type, @TempDir Path temporaryFolder) throws IOException { RepositoryClient client = RepositoryUtil.createAnonymousRepositoryClient(type, Files.createDirectories(temporaryFolder).toFile()); assertEquals(1, Objects.requireNonNull(client.getWorkingCopy().list()).length); } diff --git a/scm-it/src/test/java/sonia/scm/it/RoleITCase.java b/scm-it/src/test/java/sonia/scm/it/RoleITCase.java index e6b8ad5932..21f4c391ee 100644 --- a/scm-it/src/test/java/sonia/scm/it/RoleITCase.java +++ b/scm-it/src/test/java/sonia/scm/it/RoleITCase.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.it; import org.apache.http.HttpStatus; @@ -66,7 +66,7 @@ public class RoleITCase { given(VndMediaType.REPOSITORY_ROLE) .when() - .content("{" + + .body("{" + "\"name\": \"" + ROLE_NAME + "\"," + "\"verbs\": [\"read\",\"permissionRead\"]" + "}") @@ -84,7 +84,7 @@ public class RoleITCase { given(VndMediaType.REPOSITORY_PERMISSION) .when() - .content("{\n" + + .body("{\n" + "\t\"role\": \"" + ROLE_NAME + "\",\n" + "\t\"name\": \"" + USER + "\",\n" + "\t\"groupPermission\": false\n" + diff --git a/scm-it/src/test/java/sonia/scm/it/utils/TestData.java b/scm-it/src/test/java/sonia/scm/it/utils/TestData.java index 0df93cc2bd..14265c0052 100644 --- a/scm-it/src/test/java/sonia/scm/it/utils/TestData.java +++ b/scm-it/src/test/java/sonia/scm/it/utils/TestData.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.it.utils; import io.restassured.response.ValidatableResponse; @@ -86,7 +86,7 @@ public class TestData { String admin = isAdmin ? "true" : "false"; given(VndMediaType.USER) .when() - .content(new StringBuilder() + .body(new StringBuilder() .append(" {\n") .append(" \"active\": true,\n") .append(" \"admin\": ").append(admin).append(",\n") @@ -124,7 +124,7 @@ public class TestData { LOG.info("create group with group name: {} and description {}", groupName, desc); given(VndMediaType.GROUP) .when() - .content(getGroupJson(groupName,desc)) + .body(getGroupJson(groupName,desc)) .post(getGroupsUrl()) .then() .statusCode(HttpStatus.SC_CREATED) @@ -136,7 +136,7 @@ public class TestData { LOG.info("create permission with name {} and verbs {} using the endpoint: {}", username, verbs, defaultPermissionUrl); given(VndMediaType.REPOSITORY_PERMISSION) .when() - .content("{\n" + + .body("{\n" + "\t\"verbs\": " + verbs.stream().collect(Collectors.joining("\",\"", "[\"", "\"]")) + ",\n" + "\t\"name\": \"" + username + "\",\n" + "\t\"groupPermission\": false\n" + diff --git a/scm-plugins/scm-git-plugin/pom.xml b/scm-plugins/scm-git-plugin/pom.xml index 6a3e2235cc..fbfd5ff62f 100644 --- a/scm-plugins/scm-git-plugin/pom.xml +++ b/scm-plugins/scm-git-plugin/pom.xml @@ -103,16 +103,4 @@ - - - - - - maven.scm-manager.org - scm-manager release repository - http://maven.scm-manager.org/nexus/content/groups/public - - - - diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/AbstractGitCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/AbstractGitCommand.java index 8319260f53..4f3e31f4d7 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/AbstractGitCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/AbstractGitCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -77,14 +77,12 @@ class AbstractGitCommand /** * Constructs ... * + * @param context * - * @param context - * @param repository */ - AbstractGitCommand(GitContext context, - sonia.scm.repository.Repository repository) + AbstractGitCommand(GitContext context) { - this.repository = repository; + this.repository = context.getRepository(); this.context = context; } diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/AbstractGitIncomingOutgoingCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/AbstractGitIncomingOutgoingCommand.java index c524191ddd..1b03a5a55e 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/AbstractGitIncomingOutgoingCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/AbstractGitIncomingOutgoingCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -63,15 +63,12 @@ public abstract class AbstractGitIncomingOutgoingCommand /** * Constructs ... * - * - * @param handler + * @param handler * @param context - * @param repository */ - AbstractGitIncomingOutgoingCommand(GitRepositoryHandler handler, - GitContext context, Repository repository) + AbstractGitIncomingOutgoingCommand(GitRepositoryHandler handler, GitContext context) { - super(context, repository); + super(context); this.handler = handler; } diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/AbstractGitPushOrPullCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/AbstractGitPushOrPullCommand.java index e7ce671a08..4ebc288608 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/AbstractGitPushOrPullCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/AbstractGitPushOrPullCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -67,15 +67,12 @@ public abstract class AbstractGitPushOrPullCommand extends AbstractGitCommand /** * Constructs ... * - * - * @param handler + * @param handler * @param context - * @param repository */ - protected AbstractGitPushOrPullCommand(GitRepositoryHandler handler, - GitContext context, sonia.scm.repository.Repository repository) + protected AbstractGitPushOrPullCommand(GitRepositoryHandler handler, GitContext context) { - super(context, repository); + super(context); this.handler = handler; } diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/Differ.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/Differ.java index 6bba6a331e..aa539b978c 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/Differ.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/Differ.java @@ -21,17 +21,19 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.google.common.base.Strings; import org.eclipse.jgit.diff.DiffEntry; +import org.eclipse.jgit.diff.DiffFormatter; import org.eclipse.jgit.errors.MissingObjectException; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevTree; import org.eclipse.jgit.revwalk.RevWalk; +import org.eclipse.jgit.treewalk.AbstractTreeIterator; import org.eclipse.jgit.treewalk.EmptyTreeIterator; import org.eclipse.jgit.treewalk.TreeWalk; import org.eclipse.jgit.treewalk.filter.PathFilter; @@ -48,16 +50,18 @@ final class Differ implements AutoCloseable { private final RevWalk walk; private final TreeWalk treeWalk; private final RevCommit commit; + private final PathFilter pathFilter; - private Differ(RevCommit commit, RevWalk walk, TreeWalk treeWalk) { + private Differ(RevCommit commit, RevWalk walk, TreeWalk treeWalk, PathFilter pathFilter) { this.commit = commit; this.walk = walk; this.treeWalk = treeWalk; + this.pathFilter = pathFilter; } static Diff diff(Repository repository, DiffCommandRequest request) throws IOException { try (Differ differ = create(repository, request)) { - return differ.diff(); + return differ.diff(repository); } } @@ -81,11 +85,11 @@ final class Differ implements AutoCloseable { treeWalk.reset(); treeWalk.setRecursive(true); + PathFilter pathFilter = null; if (Util.isNotEmpty(request.getPath())) { - treeWalk.setFilter(PathFilter.create(request.getPath())); + pathFilter = PathFilter.create(request.getPath()); } - if (!Strings.isNullOrEmpty(request.getAncestorChangeset())) { ObjectId otherRevision = repository.resolve(request.getAncestorChangeset()); ObjectId ancestorId = GitUtil.computeCommonAncestor(repository, revision, otherRevision); @@ -105,14 +109,29 @@ final class Differ implements AutoCloseable { treeWalk.addTree(commit.getTree()); - return new Differ(commit, walk, treeWalk); + return new Differ(commit, walk, treeWalk, pathFilter); } - private Diff diff() throws IOException { - List entries = DiffEntry.scan(treeWalk); + private Diff diff(Repository repository) throws IOException { + List entries = scanWithRename(repository, pathFilter, treeWalk); return new Diff(commit, entries); } + static List scanWithRename(Repository repository, PathFilter pathFilter, TreeWalk treeWalk) throws IOException { + List entries; + try (DiffFormatter diffFormatter = new DiffFormatter(null)) { + diffFormatter.setRepository(repository); + diffFormatter.setDetectRenames(true); + if (pathFilter != null) { + diffFormatter.setPathFilter(pathFilter); + } + entries = diffFormatter.scan( + treeWalk.getTree(0, AbstractTreeIterator.class), + treeWalk.getTree(1, AbstractTreeIterator.class)); + } + return entries; + } + @Override public void close() { GitUtil.release(walk); diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBlameCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBlameCommand.java index 41dacb4301..5c1f074a90 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBlameCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBlameCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -40,7 +40,6 @@ import sonia.scm.repository.BlameResult; import sonia.scm.repository.GitUtil; import sonia.scm.repository.InternalRepositoryException; import sonia.scm.repository.Person; -import sonia.scm.repository.Repository; import java.io.IOException; import java.util.ArrayList; @@ -65,9 +64,9 @@ public class GitBlameCommand extends AbstractGitCommand implements BlameCommand //~--- constructors --------------------------------------------------------- - public GitBlameCommand(GitContext context, Repository repository) + public GitBlameCommand(GitContext context) { - super(context, repository); + super(context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBranchCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBranchCommand.java index c70fadf9ac..506580d5a9 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBranchCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBranchCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.eclipse.jgit.api.Git; @@ -34,7 +34,6 @@ import sonia.scm.repository.GitUtil; import sonia.scm.repository.InternalRepositoryException; import sonia.scm.repository.PostReceiveRepositoryHookEvent; import sonia.scm.repository.PreReceiveRepositoryHookEvent; -import sonia.scm.repository.Repository; import sonia.scm.repository.RepositoryHookEvent; import sonia.scm.repository.RepositoryHookType; import sonia.scm.repository.api.BranchRequest; @@ -57,8 +56,8 @@ public class GitBranchCommand extends AbstractGitCommand implements BranchComman private final HookContextFactory hookContextFactory; private final ScmEventBus eventBus; - GitBranchCommand(GitContext context, Repository repository, HookContextFactory hookContextFactory, ScmEventBus eventBus) { - super(context, repository); + GitBranchCommand(GitContext context, HookContextFactory hookContextFactory, ScmEventBus eventBus) { + super(context); this.hookContextFactory = hookContextFactory; this.eventBus = eventBus; } diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBranchesCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBranchesCommand.java index f4855d7c99..cd7892461b 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBranchesCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBranchesCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -37,7 +37,6 @@ import org.slf4j.LoggerFactory; import sonia.scm.repository.Branch; import sonia.scm.repository.GitUtil; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import java.io.IOException; import java.util.List; @@ -54,9 +53,9 @@ public class GitBranchesCommand extends AbstractGitCommand implements BranchesCo private static final Logger LOG = LoggerFactory.getLogger(GitBranchesCommand.class); - public GitBranchesCommand(GitContext context, Repository repository) + public GitBranchesCommand(GitContext context) { - super(context, repository); + super(context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBrowseCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBrowseCommand.java index 79e23f4ec5..ab5a7d33b4 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBrowseCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitBrowseCommand.java @@ -51,7 +51,6 @@ import sonia.scm.repository.FileObject; import sonia.scm.repository.GitSubModuleParser; import sonia.scm.repository.GitUtil; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.repository.SubRepository; import sonia.scm.store.Blob; import sonia.scm.store.BlobStore; @@ -112,8 +111,8 @@ public class GitBrowseCommand extends AbstractGitCommand private int resultCount = 0; - public GitBrowseCommand(GitContext context, Repository repository, LfsBlobStoreFactory lfsBlobStoreFactory, SyncAsyncExecutor executor) { - super(context, repository); + public GitBrowseCommand(GitContext context, LfsBlobStoreFactory lfsBlobStoreFactory, SyncAsyncExecutor executor) { + super(context); this.lfsBlobStoreFactory = lfsBlobStoreFactory; this.executor = executor; } @@ -326,8 +325,7 @@ public class GitBrowseCommand extends AbstractGitCommand logger.debug("read submodules of {} at {}", repository.getName(), revId); try ( ByteArrayOutputStream baos = new ByteArrayOutputStream() ) { - new GitCatCommand(context, repository, lfsBlobStoreFactory).getContent(repo, revId, - PATH_MODULES, baos); + new GitCatCommand(context, lfsBlobStoreFactory).getContent(repo, revId, PATH_MODULES, baos); return GitSubModuleParser.parse(baos.toString()); } catch (NotFoundException ex) { logger.trace("could not find .gitmodules: {}", ex.getMessage()); diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitCatCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitCatCommand.java index f4d3350219..4629e4bce2 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitCatCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitCatCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.eclipse.jgit.errors.MissingObjectException; @@ -61,8 +61,8 @@ public class GitCatCommand extends AbstractGitCommand implements CatCommand { private final LfsBlobStoreFactory lfsBlobStoreFactory; - public GitCatCommand(GitContext context, sonia.scm.repository.Repository repository, LfsBlobStoreFactory lfsBlobStoreFactory) { - super(context, repository); + public GitCatCommand(GitContext context, LfsBlobStoreFactory lfsBlobStoreFactory) { + super(context); this.lfsBlobStoreFactory = lfsBlobStoreFactory; } diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitDiffCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitDiffCommand.java index 85e837904a..adb7a7bd0e 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitDiffCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitDiffCommand.java @@ -21,13 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.eclipse.jgit.diff.DiffEntry; import org.eclipse.jgit.diff.DiffFormatter; import org.eclipse.jgit.util.QuotedString; -import sonia.scm.repository.Repository; import sonia.scm.repository.api.DiffCommandBuilder; import java.io.BufferedOutputStream; @@ -42,8 +41,8 @@ import static java.nio.charset.StandardCharsets.UTF_8; */ public class GitDiffCommand extends AbstractGitCommand implements DiffCommand { - GitDiffCommand(GitContext context, Repository repository) { - super(context, repository); + GitDiffCommand(GitContext context) { + super(context); } @Override @@ -58,7 +57,7 @@ public class GitDiffCommand extends AbstractGitCommand implements DiffCommand { formatter.setRepository(repository); for (DiffEntry e : diff.getEntries()) { - if (!e.getOldId().equals(e.getNewId())) { + if (idOrPathChanged(e)) { formatter.format(e); } } @@ -68,6 +67,10 @@ public class GitDiffCommand extends AbstractGitCommand implements DiffCommand { }; } + private boolean idOrPathChanged(DiffEntry e) { + return !e.getOldId().equals(e.getNewId()) || !e.getNewPath().equals(e.getOldPath()); + } + static class DequoteOutputStream extends OutputStream { private static final String[] DEQUOTE_STARTS = { diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitDiffResultCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitDiffResultCommand.java index 703c0f9682..fed865c576 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitDiffResultCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitDiffResultCommand.java @@ -21,14 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.eclipse.jgit.diff.DiffEntry; import org.eclipse.jgit.diff.DiffFormatter; import sonia.scm.repository.GitUtil; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.repository.api.DiffFile; import sonia.scm.repository.api.DiffResult; import sonia.scm.repository.api.Hunk; @@ -40,8 +39,8 @@ import java.util.stream.Collectors; public class GitDiffResultCommand extends AbstractGitCommand implements DiffResultCommand { - GitDiffResultCommand(GitContext context, Repository repository) { - super(context, repository); + GitDiffResultCommand(GitContext context) { + super(context); } public DiffResult getDiffResult(DiffCommandRequest diffCommandRequest) throws IOException { @@ -109,6 +108,24 @@ public class GitDiffResultCommand extends AbstractGitCommand implements DiffResu return diffEntry.getNewPath(); } + @Override + public ChangeType getChangeType() { + switch (diffEntry.getChangeType()) { + case ADD: + return ChangeType.ADD; + case MODIFY: + return ChangeType.MODIFY; + case RENAME: + return ChangeType.RENAME; + case DELETE: + return ChangeType.DELETE; + case COPY: + return ChangeType.COPY; + default: + throw new IllegalArgumentException("Unknown change type: " + diffEntry.getChangeType()); + } + } + @Override public Iterator iterator() { String content = format(repository, diffEntry); diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitHunkParser.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitHunkParser.java index 88eae483cf..197c1ed03a 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitHunkParser.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitHunkParser.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import sonia.scm.repository.api.DiffLine; @@ -49,9 +49,9 @@ final class GitHunkParser { public List parse(String content) { List hunks = new ArrayList<>(); - try (Scanner scanner = new Scanner(content)) { - while (scanner.hasNextLine()) { - String line = scanner.nextLine(); + try (Scanner scanner = new Scanner(content).useDelimiter("[\n\r\u2028\u2029\u0085]+")) { + while (scanner.hasNext()) { + String line = scanner.next(); if (line.startsWith("@@")) { parseHeader(hunks, line); } else if (currentGitHunk != null) { diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitIncomingCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitIncomingCommand.java index a41d1af21f..f6e818bcdb 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitIncomingCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitIncomingCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -30,7 +30,6 @@ import org.eclipse.jgit.api.LogCommand; import org.eclipse.jgit.lib.ObjectId; import sonia.scm.repository.ChangesetPagingResult; import sonia.scm.repository.GitRepositoryHandler; -import sonia.scm.repository.Repository; import java.io.IOException; @@ -47,15 +46,12 @@ public class GitIncomingCommand extends AbstractGitIncomingOutgoingCommand /** * Constructs ... * - * - * @param handler + * @param handler * @param context - * @param repository */ - GitIncomingCommand(GitRepositoryHandler handler, GitContext context, - Repository repository) + GitIncomingCommand(GitRepositoryHandler handler, GitContext context) { - super(handler, context, repository); + super(handler, context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitLogCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitLogCommand.java index 406abd56e8..da00ba451b 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitLogCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitLogCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -77,13 +77,12 @@ public class GitLogCommand extends AbstractGitCommand implements LogCommand * Constructs ... * * + * @param context * - * @param context - * @param repository */ - GitLogCommand(GitContext context, sonia.scm.repository.Repository repository) + GitLogCommand(GitContext context) { - super(context, repository); + super(context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitMergeCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitMergeCommand.java index a5914cb533..5f915535b1 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitMergeCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitMergeCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.google.common.collect.ImmutableSet; @@ -61,8 +61,8 @@ public class GitMergeCommand extends AbstractGitCommand implements MergeCommand MergeStrategy.SQUASH ); - GitMergeCommand(GitContext context, sonia.scm.repository.Repository repository, GitWorkdirFactory workdirFactory) { - super(context, repository); + GitMergeCommand(GitContext context, GitWorkdirFactory workdirFactory) { + super(context); this.workdirFactory = workdirFactory; } diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitModificationsCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitModificationsCommand.java index 57c916116c..918d276148 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitModificationsCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitModificationsCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import lombok.extern.slf4j.Slf4j; @@ -32,13 +32,19 @@ import org.eclipse.jgit.revwalk.RevTree; import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.treewalk.EmptyTreeIterator; import org.eclipse.jgit.treewalk.TreeWalk; +import sonia.scm.repository.Added; import sonia.scm.repository.GitUtil; import sonia.scm.repository.InternalRepositoryException; +import sonia.scm.repository.Modification; import sonia.scm.repository.Modifications; -import sonia.scm.repository.Repository; +import sonia.scm.repository.Modified; +import sonia.scm.repository.Removed; +import sonia.scm.repository.Renamed; import java.io.IOException; import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.Collection; import java.util.List; import static sonia.scm.ContextEntry.ContextBuilder.entity; @@ -47,8 +53,8 @@ import static sonia.scm.ContextEntry.ContextBuilder.entity; @Slf4j public class GitModificationsCommand extends AbstractGitCommand implements ModificationsCommand { - protected GitModificationsCommand(GitContext context, Repository repository) { - super(context, repository); + protected GitModificationsCommand(GitContext context) { + super(context); } private Modifications createModifications(TreeWalk treeWalk, RevCommit commit, RevWalk revWalk, String revision) @@ -73,15 +79,14 @@ public class GitModificationsCommand extends AbstractGitCommand implements Modif treeWalk.addTree(new EmptyTreeIterator()); } treeWalk.addTree(commit.getTree()); - List entries = DiffEntry.scan(treeWalk); - Modifications modifications = new Modifications(); + List entries = Differ.scanWithRename(context.open(), null, treeWalk); + Collection modifications = new ArrayList<>(); for (DiffEntry e : entries) { - if (!e.getOldId().equals(e.getNewId())) { - appendModification(modifications, e); + if (!e.getOldId().equals(e.getNewId()) || !e.getOldPath().equals(e.getNewPath())) { + modifications.add(asModification(e)); } } - modifications.setRevision(revision); - return modifications; + return new Modifications(revision, modifications); } @Override @@ -112,16 +117,19 @@ public class GitModificationsCommand extends AbstractGitCommand implements Modif return getModifications(request.getRevision()); } - private void appendModification(Modifications modifications, DiffEntry entry) throws UnsupportedModificationTypeException { + private Modification asModification(DiffEntry entry) throws UnsupportedModificationTypeException { DiffEntry.ChangeType type = entry.getChangeType(); - if (type == DiffEntry.ChangeType.ADD) { - modifications.getAdded().add(entry.getNewPath()); - } else if (type == DiffEntry.ChangeType.MODIFY) { - modifications.getModified().add(entry.getNewPath()); - } else if (type == DiffEntry.ChangeType.DELETE) { - modifications.getRemoved().add(entry.getOldPath()); - } else { - throw new UnsupportedModificationTypeException(entity(repository), MessageFormat.format("The modification type: {0} is not supported.", type)); + switch (type) { + case ADD: + return new Added(entry.getNewPath()); + case MODIFY: + return new Modified(entry.getNewPath()); + case DELETE: + return new Removed(entry.getOldPath()); + case RENAME: + return new Renamed(entry.getOldPath(), entry.getNewPath()); + default: + throw new UnsupportedModificationTypeException(entity(repository), MessageFormat.format("The modification type: {0} is not supported.", type)); } } } diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitModifyCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitModifyCommand.java index 90abc418fa..d808434c1d 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitModifyCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitModifyCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.google.common.util.concurrent.Striped; @@ -53,8 +53,8 @@ public class GitModifyCommand extends AbstractGitCommand implements ModifyComman private final GitWorkdirFactory workdirFactory; private final LfsBlobStoreFactory lfsBlobStoreFactory; - GitModifyCommand(GitContext context, Repository repository, GitWorkdirFactory workdirFactory, LfsBlobStoreFactory lfsBlobStoreFactory) { - super(context, repository); + GitModifyCommand(GitContext context, GitWorkdirFactory workdirFactory, LfsBlobStoreFactory lfsBlobStoreFactory) { + super(context); this.workdirFactory = workdirFactory; this.lfsBlobStoreFactory = lfsBlobStoreFactory; } diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitOutgoingCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitOutgoingCommand.java index 69eb25bfda..03acf9e914 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitOutgoingCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitOutgoingCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -30,7 +30,6 @@ import org.eclipse.jgit.api.LogCommand; import org.eclipse.jgit.lib.ObjectId; import sonia.scm.repository.ChangesetPagingResult; import sonia.scm.repository.GitRepositoryHandler; -import sonia.scm.repository.Repository; import java.io.IOException; @@ -47,15 +46,12 @@ public class GitOutgoingCommand extends AbstractGitIncomingOutgoingCommand /** * Constructs ... * - * - * @param handler + * @param handler * @param context - * @param repository */ - GitOutgoingCommand(GitRepositoryHandler handler, GitContext context, - Repository repository) + GitOutgoingCommand(GitRepositoryHandler handler, GitContext context) { - super(handler, context, repository); + super(handler, context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitPullCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitPullCommand.java index 671920183d..53b7a59916 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitPullCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitPullCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -70,15 +70,12 @@ public class GitPullCommand extends AbstractGitPushOrPullCommand /** * Constructs ... * - * - * @param handler + * @param handler * @param context - * @param repository */ - public GitPullCommand(GitRepositoryHandler handler, GitContext context, - Repository repository) + public GitPullCommand(GitRepositoryHandler handler, GitContext context) { - super(handler, context, repository); + super(handler, context); } //~--- methods -------------------------------------------------------------- diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitPushCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitPushCommand.java index 0e6ee9a4b2..fd874524f4 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitPushCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitPushCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -29,7 +29,6 @@ package sonia.scm.repository.spi; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import sonia.scm.repository.GitRepositoryHandler; -import sonia.scm.repository.Repository; import sonia.scm.repository.api.PushResponse; import java.io.IOException; @@ -53,15 +52,12 @@ public class GitPushCommand extends AbstractGitPushOrPullCommand /** * Constructs ... * - * - * @param handler + * @param handler * @param context - * @param repository */ - public GitPushCommand(GitRepositoryHandler handler, GitContext context, - Repository repository) + public GitPushCommand(GitRepositoryHandler handler, GitContext context) { - super(handler, context, repository); + super(handler, context); this.handler = handler; } diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitRepositoryServiceProvider.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitRepositoryServiceProvider.java index 10b4303291..4aa6ab3a08 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitRepositoryServiceProvider.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitRepositoryServiceProvider.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.google.common.collect.ImmutableSet; @@ -58,7 +58,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider Command.LOG, Command.TAGS, Command.BRANCH, - Command.BRANCHES, + Command.BRANCHES, Command.INCOMING, Command.OUTGOING, Command.PUSH, @@ -73,7 +73,6 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider public GitRepositoryServiceProvider(GitRepositoryHandler handler, Repository repository, GitRepositoryConfigStoreProvider storeProvider, LfsBlobStoreFactory lfsBlobStoreFactory, HookContextFactory hookContextFactory, ScmEventBus eventBus, SyncAsyncExecutorProvider executorProvider) { this.handler = handler; - this.repository = repository; this.lfsBlobStoreFactory = lfsBlobStoreFactory; this.hookContextFactory = hookContextFactory; this.eventBus = eventBus; @@ -106,7 +105,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider @Override public BlameCommand getBlameCommand() { - return new GitBlameCommand(context, repository); + return new GitBlameCommand(context); } /** @@ -118,7 +117,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider @Override public BranchesCommand getBranchesCommand() { - return new GitBranchesCommand(context, repository); + return new GitBranchesCommand(context); } /** @@ -130,7 +129,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider @Override public BranchCommand getBranchCommand() { - return new GitBranchCommand(context, repository, hookContextFactory, eventBus); + return new GitBranchCommand(context, hookContextFactory, eventBus); } /** @@ -142,7 +141,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider @Override public BrowseCommand getBrowseCommand() { - return new GitBrowseCommand(context, repository, lfsBlobStoreFactory, executorProvider.createExecutorWithDefaultTimeout()); + return new GitBrowseCommand(context, lfsBlobStoreFactory, executorProvider.createExecutorWithDefaultTimeout()); } /** @@ -154,7 +153,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider @Override public CatCommand getCatCommand() { - return new GitCatCommand(context, repository, lfsBlobStoreFactory); + return new GitCatCommand(context, lfsBlobStoreFactory); } /** @@ -166,12 +165,12 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider @Override public DiffCommand getDiffCommand() { - return new GitDiffCommand(context, repository); + return new GitDiffCommand(context); } @Override public DiffResultCommand getDiffResultCommand() { - return new GitDiffResultCommand(context, repository); + return new GitDiffResultCommand(context); } /** @@ -183,7 +182,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider @Override public IncomingCommand getIncomingCommand() { - return new GitIncomingCommand(handler, context, repository); + return new GitIncomingCommand(handler, context); } /** @@ -195,12 +194,12 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider @Override public LogCommand getLogCommand() { - return new GitLogCommand(context, repository); + return new GitLogCommand(context); } @Override public ModificationsCommand getModificationsCommand() { - return new GitModificationsCommand(context,repository); + return new GitModificationsCommand(context); } /** @@ -212,7 +211,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider @Override public OutgoingCommand getOutgoingCommand() { - return new GitOutgoingCommand(handler, context, repository); + return new GitOutgoingCommand(handler, context); } /** @@ -224,7 +223,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider @Override public PullCommand getPullCommand() { - return new GitPullCommand(handler, context, repository); + return new GitPullCommand(handler, context); } /** @@ -236,7 +235,7 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider @Override public PushCommand getPushCommand() { - return new GitPushCommand(handler, context, repository); + return new GitPushCommand(handler, context); } /** @@ -260,17 +259,17 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider @Override public TagsCommand getTagsCommand() { - return new GitTagsCommand(context, repository); + return new GitTagsCommand(context); } @Override public MergeCommand getMergeCommand() { - return new GitMergeCommand(context, repository, handler.getWorkdirFactory()); + return new GitMergeCommand(context, handler.getWorkdirFactory()); } @Override public ModifyCommand getModifyCommand() { - return new GitModifyCommand(context, repository, handler.getWorkdirFactory(), lfsBlobStoreFactory); + return new GitModifyCommand(context, handler.getWorkdirFactory(), lfsBlobStoreFactory); } @Override @@ -285,9 +284,6 @@ public class GitRepositoryServiceProvider extends RepositoryServiceProvider /** Field description */ private final GitRepositoryHandler handler; - /** Field description */ - private final Repository repository; - private final LfsBlobStoreFactory lfsBlobStoreFactory; private final HookContextFactory hookContextFactory; diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitTagsCommand.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitTagsCommand.java index be97ce603e..208c931f63 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitTagsCommand.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/GitTagsCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -37,7 +37,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import sonia.scm.repository.GitUtil; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.repository.Tag; import java.io.IOException; @@ -55,13 +54,12 @@ public class GitTagsCommand extends AbstractGitCommand implements TagsCommand /** * Constructs ... * + * @param context * - * @param context - * @param repository */ - public GitTagsCommand(GitContext context, Repository repository) + public GitTagsCommand(GitContext context) { - super(context, repository); + super(context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/SimpleGitWorkdirFactory.java b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/SimpleGitWorkdirFactory.java index c13e6b5e19..ff0101f297 100644 --- a/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/SimpleGitWorkdirFactory.java +++ b/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/repository/spi/SimpleGitWorkdirFactory.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.eclipse.jgit.api.Git; @@ -34,6 +34,7 @@ import sonia.scm.repository.GitWorkdirFactory; import sonia.scm.repository.InternalRepositoryException; import sonia.scm.repository.util.SimpleWorkdirFactory; import sonia.scm.repository.util.WorkdirProvider; +import sonia.scm.util.SystemUtil; import javax.inject.Inject; import java.io.File; @@ -72,7 +73,11 @@ public class SimpleGitWorkdirFactory extends SimpleWorkdirFactory { cd {repository.name}
echo "# {repository.name} - " > README.md + " > README.md
git add README.md
diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBlameCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBlameCommandTest.java index d31104b590..8943be1867 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBlameCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBlameCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -40,7 +40,7 @@ import static org.junit.Assert.assertNotNull; /** * Unit tests for {@link GitBlameCommand}. - * + * * @author Sebastian Sdorra */ public class GitBlameCommandTest extends AbstractGitCommandTestBase @@ -48,7 +48,7 @@ public class GitBlameCommandTest extends AbstractGitCommandTestBase /** * Tests blame command with default branch. - * + * * @throws IOException * @ */ @@ -60,18 +60,18 @@ public class GitBlameCommandTest extends AbstractGitCommandTestBase BlameResult result = createCommand().getBlameResult(request); assertNotNull(result); - assertEquals(2, result.getTotal()); + assertEquals(2, result.getTotal()); assertEquals("435df2f061add3589cb326cc64be9b9c3897ceca", result.getLine(0).getRevision()); assertEquals("fcd0ef1831e4002ac43ea539f4094334c79ea9ec", result.getLine(1).getRevision()); - + // set default branch and test again createContext().setConfig(new GitRepositoryConfig("test-branch")); result = createCommand().getBlameResult(request); assertNotNull(result); - assertEquals(1, result.getTotal()); + assertEquals(1, result.getTotal()); assertEquals("3f76a12f08a6ba0dc988c68b7f0b2cd190efc3c4", result.getLine(0).getRevision()); } - + /** * Method description * @@ -156,6 +156,6 @@ public class GitBlameCommandTest extends AbstractGitCommandTestBase */ private GitBlameCommand createCommand() { - return new GitBlameCommand(createContext(), repository); + return new GitBlameCommand(createContext()); } } diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBranchCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBranchCommandTest.java index 3f3c49248d..020bde53c9 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBranchCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBranchCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.junit.Test; @@ -107,11 +107,11 @@ public class GitBranchCommandTest extends AbstractGitCommandTestBase { } private GitBranchCommand createCommand() { - return new GitBranchCommand(createContext(), repository, hookContextFactory, eventBus); + return new GitBranchCommand(createContext(), hookContextFactory, eventBus); } private List readBranches(GitContext context) throws IOException { - return new GitBranchesCommand(context, repository).getBranches(); + return new GitBranchesCommand(context).getBranches(); } @Test diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBranchesCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBranchesCommandTest.java index b2156d9a3e..967226012a 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBranchesCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBranchesCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.eclipse.jgit.api.Git; @@ -36,7 +36,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import sonia.scm.repository.Branch; import sonia.scm.repository.GitRepositoryConfig; -import sonia.scm.repository.Repository; import java.io.IOException; import java.util.List; @@ -73,7 +72,7 @@ class GitBranchesCommandTest { @BeforeEach void initCommand() { master = createRef("master", "0000"); - branchesCommand = new GitBranchesCommand(context, new Repository("1", "git", "space", "X")) { + branchesCommand = new GitBranchesCommand(context) { @Override Git createGit() { return git; diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBrowseCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBrowseCommandTest.java index 7429590a00..0ba57cbada 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBrowseCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBrowseCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.junit.Test; @@ -121,7 +121,7 @@ public class GitBrowseCommandTest extends AbstractGitCommandTestBase { @Test public void testAsynchronousBrowse() throws IOException { try (AsyncExecutorStepper executor = stepperAsynchronousExecutor()) { - GitBrowseCommand command = new GitBrowseCommand(createContext(), repository, null, executor); + GitBrowseCommand command = new GitBrowseCommand(createContext(), null, executor); List updatedResults = new LinkedList<>(); BrowseCommandRequest request = new BrowseCommandRequest(updatedResults::add); FileObject root = command.getBrowserResult(request).getFile(); @@ -354,6 +354,6 @@ public class GitBrowseCommandTest extends AbstractGitCommandTestBase { } private GitBrowseCommand createCommand() { - return new GitBrowseCommand(createContext(), repository, lfsBlobStoreFactory, synchronousExecutor()); + return new GitBrowseCommand(createContext(), lfsBlobStoreFactory, synchronousExecutor()); } } diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitCatCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitCatCommandTest.java index c35eab6767..5e9e716173 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitCatCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitCatCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.hamcrest.BaseMatcher; @@ -46,7 +46,7 @@ import static org.mockito.Mockito.when; /** * Unit tests for {@link GitCatCommand}. - * + * * TODO add not found test * * @author Sebastian Sdorra @@ -61,9 +61,9 @@ public class GitCatCommandTest extends AbstractGitCommandTestBase { // without default branch, the repository head should be used CatCommandRequest request = new CatCommandRequest(); request.setPath("a.txt"); - + assertEquals("a\nline for blame", execute(request)); - + // set default branch for repository and check again createContext().setConfig(new GitRepositoryConfig("test-branch")); assertEquals("a and b", execute(request)); @@ -134,7 +134,7 @@ public class GitCatCommandTest extends AbstractGitCommandTestBase { CatCommandRequest request = new CatCommandRequest(); request.setPath("b.txt"); - InputStream catResultStream = new GitCatCommand(createContext(), repository, null).getCatResultStream(request); + InputStream catResultStream = new GitCatCommand(createContext(), null).getCatResultStream(request); assertEquals('b', catResultStream.read()); assertEquals('\n', catResultStream.read()); @@ -157,7 +157,7 @@ public class GitCatCommandTest extends AbstractGitCommandTestBase { request.setRevision("lfs-test"); request.setPath("lfs-image.png"); - InputStream catResultStream = new GitCatCommand(createContext(), repository, lfsBlobStoreFactory) + InputStream catResultStream = new GitCatCommand(createContext(), lfsBlobStoreFactory) .getCatResultStream(request); assertEquals('i', catResultStream.read()); @@ -174,8 +174,7 @@ public class GitCatCommandTest extends AbstractGitCommandTestBase { try { - new GitCatCommand(createContext(), repository, null).getCatResult(request, - baos); + new GitCatCommand(createContext(), null).getCatResult(request, baos); } finally { diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitDiffCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitDiffCommandTest.java index 5f64c87ade..7a9e9f660e 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitDiffCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitDiffCommandTest.java @@ -21,14 +21,16 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; +import org.assertj.core.api.Assertions; import org.junit.Test; import java.io.ByteArrayOutputStream; import java.io.IOException; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; public class GitDiffCommandTest extends AbstractGitCommandTestBase { @@ -78,7 +80,7 @@ public class GitDiffCommandTest extends AbstractGitCommandTestBase { @Test public void diffForOneRevisionShouldCreateDiff() throws IOException { - GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext(), repository); + GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext()); DiffCommandRequest diffCommandRequest = new DiffCommandRequest(); diffCommandRequest.setRevision("3f76a12f08a6ba0dc988c68b7f0b2cd190efc3c4"); ByteArrayOutputStream output = new ByteArrayOutputStream(); @@ -88,7 +90,7 @@ public class GitDiffCommandTest extends AbstractGitCommandTestBase { @Test public void diffForOneBranchShouldCreateDiff() throws IOException { - GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext(), repository); + GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext()); DiffCommandRequest diffCommandRequest = new DiffCommandRequest(); diffCommandRequest.setRevision("test-branch"); ByteArrayOutputStream output = new ByteArrayOutputStream(); @@ -98,7 +100,7 @@ public class GitDiffCommandTest extends AbstractGitCommandTestBase { @Test public void diffForPathShouldCreateLimitedDiff() throws IOException { - GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext(), repository); + GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext()); DiffCommandRequest diffCommandRequest = new DiffCommandRequest(); diffCommandRequest.setRevision("test-branch"); diffCommandRequest.setPath("a.txt"); @@ -109,7 +111,7 @@ public class GitDiffCommandTest extends AbstractGitCommandTestBase { @Test public void diffBetweenTwoBranchesShouldCreateDiff() throws IOException { - GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext(), repository); + GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext()); DiffCommandRequest diffCommandRequest = new DiffCommandRequest(); diffCommandRequest.setRevision("master"); diffCommandRequest.setAncestorChangeset("test-branch"); @@ -120,7 +122,7 @@ public class GitDiffCommandTest extends AbstractGitCommandTestBase { @Test public void diffBetweenTwoBranchesForPathShouldCreateLimitedDiff() throws IOException { - GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext(), repository); + GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext()); DiffCommandRequest diffCommandRequest = new DiffCommandRequest(); diffCommandRequest.setRevision("master"); diffCommandRequest.setAncestorChangeset("test-branch"); @@ -132,7 +134,7 @@ public class GitDiffCommandTest extends AbstractGitCommandTestBase { @Test public void diffBetweenTwoBranchesWithMergedIntegrationBranchShouldCreateDiffOfAllIncomingChanges() throws IOException { - GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext(), repository); + GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext()); DiffCommandRequest diffCommandRequest = new DiffCommandRequest(); diffCommandRequest.setRevision("partially_merged"); diffCommandRequest.setAncestorChangeset("master"); @@ -140,4 +142,19 @@ public class GitDiffCommandTest extends AbstractGitCommandTestBase { gitDiffCommand.getDiffResult(diffCommandRequest).accept(output); assertEquals(DIFF_FILE_PARTIAL_MERGE, output.toString()); } + + @Test + public void diffBetweenTwoBranchesWithMovedFiles() throws IOException { + GitDiffCommand gitDiffCommand = new GitDiffCommand(createContext()); + DiffCommandRequest diffCommandRequest = new DiffCommandRequest(); + diffCommandRequest.setRevision("rename"); + ByteArrayOutputStream output = new ByteArrayOutputStream(); + gitDiffCommand.getDiffResult(diffCommandRequest).accept(output); + assertThat(output.toString()) + .contains("similarity index 100%") + .contains("rename from a.txt") + .contains("rename to a-copy.txt") + .contains("rename from b.txt") + .contains("rename to b-copy.txt"); + } } diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitDiffResultCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitDiffResultCommandTest.java index cfeacd2b5a..e2722b78ab 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitDiffResultCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitDiffResultCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.junit.Test; @@ -103,8 +103,24 @@ public class GitDiffResultCommandTest extends AbstractGitCommandTestBase { assertThat(hunk.getNewLineCount()).isEqualTo(2); } + @Test + public void shouldReturnRenames() throws IOException { + DiffResult diffResult = createDiffResult("rename"); + + Iterator fileIterator = diffResult.iterator(); + DiffFile renameA = fileIterator.next(); + assertThat(renameA.getOldPath()).isEqualTo("a.txt"); + assertThat(renameA.getNewPath()).isEqualTo("a-copy.txt"); + assertThat(renameA.iterator().hasNext()).isFalse(); + + DiffFile renameB = fileIterator.next(); + assertThat(renameB.getOldPath()).isEqualTo("b.txt"); + assertThat(renameB.getNewPath()).isEqualTo("b-copy.txt"); + assertThat(renameB.iterator().hasNext()).isFalse(); + } + private DiffResult createDiffResult(String s) throws IOException { - GitDiffResultCommand gitDiffResultCommand = new GitDiffResultCommand(createContext(), repository); + GitDiffResultCommand gitDiffResultCommand = new GitDiffResultCommand(createContext()); DiffCommandRequest diffCommandRequest = new DiffCommandRequest(); diffCommandRequest.setRevision(s); diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitHunkParserTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitHunkParserTest.java index 4bd56a0b1f..fda99ed7bf 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitHunkParserTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitHunkParserTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.junit.jupiter.api.Test; @@ -103,6 +103,15 @@ class GitHunkParserTest { "+added line\n" + "\\ No newline at end of file\n"; + private static final String MULTIPLE_LINE_BREAKS = "diff --git a/.editorconfig b/.editorconfig\n" + + "index ea2a3ba..2f02f32 100644\n" + + "--- a/.editorconfig\n" + + "+++ b/.editorconfig\n" + + "@@ -10,3 +10,4 @@\n" + + " indent_style = space\r\r\n" + + " indent_size = 2\r\r\n" + + " charset = utf-8\n"; + @Test void shouldParseHunks() { List hunks = new GitHunkParser().parse(DIFF_001); @@ -183,6 +192,24 @@ class GitHunkParserTest { assertThat(lastLine.getContent()).isEqualTo("added line"); } + @Test + void shouldHandleMultipleLineBreaks() { + List hunks = new GitHunkParser().parse(MULTIPLE_LINE_BREAKS); + + Hunk hunk = hunks.get(0); + + Iterator lines = hunk.iterator(); + + DiffLine line1 = lines.next(); + assertThat(line1.getOldLineNumber()).hasValue(10); + assertThat(line1.getNewLineNumber()).hasValue(10); + assertThat(line1.getContent()).isEqualTo("indent_style = space"); + + lines.next(); + lines.next(); + assertThat(lines.hasNext()).isFalse(); + } + private void assertHunk(Hunk hunk, int oldStart, int oldLineCount, int newStart, int newLineCount) { assertThat(hunk.getOldStart()).isEqualTo(oldStart); assertThat(hunk.getOldLineCount()).isEqualTo(oldLineCount); diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitIncomingCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitIncomingCommandTest.java index c2f39a0334..0ffa917a14 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitIncomingCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitIncomingCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -32,7 +32,6 @@ import org.junit.Ignore; import org.junit.Test; import sonia.scm.api.v2.resources.GitRepositoryConfigStoreProvider; import sonia.scm.repository.ChangesetPagingResult; -import sonia.scm.repository.Repository; import sonia.scm.store.InMemoryConfigurationStoreFactory; import java.io.IOException; @@ -82,7 +81,7 @@ public class GitIncomingCommandTest assertCommitsEquals(c1, cpr.getChangesets().get(0)); assertCommitsEquals(c2, cpr.getChangesets().get(1)); } - + /** * Method description * @@ -97,8 +96,8 @@ public class GitIncomingCommandTest write(outgoing, outgoingDirectory, "a.txt", "content of a.txt"); commit(outgoing, "added a"); - - GitPullCommand pull = new GitPullCommand(handler, new GitContext(incomingDirectory, null, new GitRepositoryConfigStoreProvider(new InMemoryConfigurationStoreFactory())), incomingRepository); + + GitPullCommand pull = new GitPullCommand(handler, new GitContext(incomingDirectory, incomingRepository, new GitRepositoryConfigStoreProvider(new InMemoryConfigurationStoreFactory()))); PullCommandRequest req = new PullCommandRequest(); req.setRemoteRepository(outgoingRepository); pull.pull(req); @@ -182,7 +181,6 @@ public class GitIncomingCommandTest */ private GitIncomingCommand createCommand() { - return new GitIncomingCommand(handler, new GitContext(incomingDirectory, incomingRepository, new GitRepositoryConfigStoreProvider(new InMemoryConfigurationStoreFactory())), - this.incomingRepository); + return new GitIncomingCommand(handler, new GitContext(incomingDirectory, incomingRepository, new GitRepositoryConfigStoreProvider(new InMemoryConfigurationStoreFactory()))); } } diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitLogCommandAncestorTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitLogCommandAncestorTest.java index d217da7532..6fcb9303cb 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitLogCommandAncestorTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitLogCommandAncestorTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.junit.Test; @@ -110,6 +110,6 @@ public class GitLogCommandAncestorTest extends AbstractGitCommandTestBase private GitLogCommand createCommand() { - return new GitLogCommand(createContext(), repository); + return new GitLogCommand(createContext()); } } diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitLogCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitLogCommandTest.java index 27c441bfca..61c2009405 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitLogCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitLogCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.google.common.io.Files; @@ -39,11 +39,11 @@ import java.io.File; import java.io.IOException; import static java.nio.charset.Charset.defaultCharset; +import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.contains; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.when; @@ -180,7 +180,7 @@ public class GitLogCommandTest extends AbstractGitCommandTestBase assertEquals("douglas.adams@hitchhiker.com", c.getAuthor().getMail()); assertEquals("added a and b files", c.getDescription()); - GitModificationsCommand gitModificationsCommand = new GitModificationsCommand(createContext(), repository); + GitModificationsCommand gitModificationsCommand = new GitModificationsCommand(createContext()); Modifications modifications = gitModificationsCommand.getModifications(revision); assertNotNull(modifications); @@ -188,7 +188,9 @@ public class GitLogCommandTest extends AbstractGitCommandTestBase assertTrue("removed list should be empty", modifications.getRemoved().isEmpty()); assertFalse("added list should not be empty", modifications.getAdded().isEmpty()); assertEquals(2, modifications.getAdded().size()); - assertThat(modifications.getAdded(), contains("a.txt", "b.txt")); + assertThat(modifications.getAdded()) + .extracting("path") + .containsExactly("a.txt", "b.txt"); } @Test @@ -198,14 +200,14 @@ public class GitLogCommandTest extends AbstractGitCommandTestBase GitLogCommand command = createCommand(); Changeset c = command.getChangeset("435df2f061add3589cb3", request); - Assertions.assertThat(c.getBranches()).containsOnly("master"); + assertThat(c.getBranches()).containsOnly("master"); } @Test public void shouldNotReturnCommitFromDifferentBranch() { when(request.getBranch()).thenReturn("master"); Changeset changeset = createCommand().getChangeset("3f76a12f08a6ba0dc988c68b7f0b2cd190efc3c4", request); - Assertions.assertThat(changeset).isNull(); + assertThat(changeset).isNull(); } @Test @@ -279,6 +281,6 @@ public class GitLogCommandTest extends AbstractGitCommandTestBase private GitLogCommand createCommand() { - return new GitLogCommand(createContext(), repository); + return new GitLogCommand(createContext()); } } diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitMergeCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitMergeCommandTest.java index 318b714de5..ed21f683fb 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitMergeCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitMergeCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.github.sdorra.shiro.ShiroRule; @@ -39,6 +39,7 @@ import org.junit.Test; import org.junit.jupiter.api.Assertions; import sonia.scm.NoChangesMadeException; import sonia.scm.NotFoundException; +import sonia.scm.repository.Added; import sonia.scm.repository.GitWorkdirFactory; import sonia.scm.repository.Person; import sonia.scm.repository.api.MergeCommandResult; @@ -317,8 +318,8 @@ public class GitMergeCommandTest extends AbstractGitCommandTestBase { assertThat(mergeAuthor.getName()).isEqualTo("Dirk Gently"); assertThat(message).isEqualTo("squash three commits"); - GitModificationsCommand modificationsCommand = new GitModificationsCommand(createContext(), repository); - List changes = modificationsCommand.getModifications("master").getAdded(); + GitModificationsCommand modificationsCommand = new GitModificationsCommand(createContext()); + List changes = modificationsCommand.getModifications("master").getAdded(); assertThat(changes.size()).isEqualTo(3); } @@ -423,7 +424,7 @@ public class GitMergeCommandTest extends AbstractGitCommandTestBase { } private GitMergeCommand createCommand(Consumer interceptor) { - return new GitMergeCommand(createContext(), repository, new SimpleGitWorkdirFactory(new WorkdirProvider())) { + return new GitMergeCommand(createContext(), new SimpleGitWorkdirFactory(new WorkdirProvider())) { @Override > R inClone(Function workerSupplier, GitWorkdirFactory workdirFactory, String initialBranch) { Function interceptedWorkerSupplier = git -> { diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitMergeCommand_Conflict_Test.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitMergeCommand_Conflict_Test.java index 1d5b6671bc..391ac2d762 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitMergeCommand_Conflict_Test.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitMergeCommand_Conflict_Test.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.junit.Rule; @@ -91,7 +91,7 @@ public class GitMergeCommand_Conflict_Test extends AbstractGitCommandTestBase { } private MergeConflictResult computeMergeConflictResult(String branchToMerge, String targetBranch) { - GitMergeCommand gitMergeCommand = new GitMergeCommand(createContext(), repository, new SimpleGitWorkdirFactory(new WorkdirProvider())); + GitMergeCommand gitMergeCommand = new GitMergeCommand(createContext(), new SimpleGitWorkdirFactory(new WorkdirProvider())); MergeCommandRequest mergeCommandRequest = new MergeCommandRequest(); mergeCommandRequest.setBranchToMerge(branchToMerge); mergeCommandRequest.setTargetBranch(targetBranch); diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModificationsCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModificationsCommandTest.java index 7ab82153d6..1657191d21 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModificationsCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModificationsCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.eclipse.jgit.revwalk.RevCommit; @@ -42,8 +42,8 @@ public class GitModificationsCommandTest extends AbstractRemoteCommandTestBase { @Before public void init() { - incomingModificationsCommand = new GitModificationsCommand(new GitContext(incomingDirectory, null, null), incomingRepository); - outgoingModificationsCommand = new GitModificationsCommand(new GitContext(outgoingDirectory, null, null), outgoingRepository); + incomingModificationsCommand = new GitModificationsCommand(new GitContext(incomingDirectory, incomingRepository, null)); + outgoingModificationsCommand = new GitModificationsCommand(new GitContext(outgoingDirectory, outgoingRepository, null)); } @Test @@ -86,14 +86,31 @@ public class GitModificationsCommandTest extends AbstractRemoteCommandTestBase { assertModifications.accept(outgoingModificationsCommand.getModifications(revision)); } + @Test + public void shouldReadRenamedFiles() throws Exception { + String originalFile = "a.txt"; + write(outgoing, outgoingDirectory, originalFile, "bal bla"); + commit(outgoing, "add file"); + write(outgoing, outgoingDirectory, "b.txt", "bal bla"); + File file = new File(outgoingDirectory, originalFile); + file.delete(); + outgoing.rm().addFilepattern(originalFile).call(); + + RevCommit modifiedFileCommit = commit(outgoing, "rename file"); + String revision = modifiedFileCommit.getName(); + + Consumer assertModifications = assertRenamedFiles("b.txt"); + assertModifications.accept(outgoingModificationsCommand.getModifications(revision)); + pushOutgoingAndPullIncoming(); + assertModifications.accept(incomingModificationsCommand.getModifications(revision)); + } + void pushOutgoingAndPullIncoming() throws IOException { - GitPushCommand cmd = new GitPushCommand(handler, new GitContext(outgoingDirectory, null, null), - outgoingRepository); + GitPushCommand cmd = new GitPushCommand(handler, new GitContext(outgoingDirectory, outgoingRepository, null)); PushCommandRequest request = new PushCommandRequest(); request.setRemoteRepository(incomingRepository); cmd.push(request); - GitPullCommand pullCommand = new GitPullCommand(handler, new GitContext(incomingDirectory, null, null), - incomingRepository); + GitPullCommand pullCommand = new GitPullCommand(handler, new GitContext(incomingDirectory, incomingRepository, null)); PullCommandRequest pullRequest = new PullCommandRequest(); pullRequest.setRemoteRepository(incomingRepository); pullCommand.pull(pullRequest); @@ -104,31 +121,62 @@ public class GitModificationsCommandTest extends AbstractRemoteCommandTestBase { assertThat(modifications).isNotNull(); assertThat(modifications.getAdded()) .as("added files modifications") - .hasSize(0); + .asList() + .isEmpty(); assertThat(modifications.getModified()) .as("modified files modifications") - .hasSize(0); + .asList() + .isEmpty(); assertThat(modifications.getRemoved()) .as("removed files modifications") + .asList() .hasSize(1) + .extracting("path") .containsOnly(fileName); }; } + Consumer assertRenamedFiles(String fileName) { + return (modifications) -> { + assertThat(modifications).isNotNull(); + assertThat(modifications.getAdded()) + .as("added files modifications") + .asList() + .isEmpty(); + assertThat(modifications.getModified()) + .as("modified files modifications") + .asList() + .isEmpty(); + assertThat(modifications.getRemoved()) + .as("removed files modifications") + .asList() + .isEmpty(); + assertThat(modifications.getRenamed()) + .as("renamed files modifications") + .asList() + .hasSize(1) + .extracting("newPath") + .containsOnly(fileName); + }; + } Consumer assertModifiedFiles(String file) { return (modifications) -> { assertThat(modifications).isNotNull(); assertThat(modifications.getAdded()) .as("added files modifications") - .hasSize(0); + .asList() + .isEmpty(); assertThat(modifications.getModified()) .as("modified files modifications") + .asList() + .extracting("path") .hasSize(1) .containsOnly(file); assertThat(modifications.getRemoved()) .as("removed files modifications") - .hasSize(0); + .asList() + .isEmpty(); }; } @@ -137,14 +185,18 @@ public class GitModificationsCommandTest extends AbstractRemoteCommandTestBase { assertThat(modifications).isNotNull(); assertThat(modifications.getAdded()) .as("added files modifications") + .asList() .hasSize(1) + .extracting("path") .containsOnly(file); assertThat(modifications.getModified()) .as("modified files modifications") - .hasSize(0); + .asList() + .isEmpty(); assertThat(modifications.getRemoved()) .as("removed files modifications") - .hasSize(0); + .asList() + .isEmpty(); }; } } diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModifyCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModifyCommandTest.java index fa3d6836cb..746f05f61c 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModifyCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModifyCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.github.sdorra.shiro.ShiroRule; @@ -323,7 +323,7 @@ public class GitModifyCommandTest extends AbstractGitCommandTestBase { } private GitModifyCommand createCommand() { - return new GitModifyCommand(createContext(), repository, new SimpleGitWorkdirFactory(new WorkdirProvider()), lfsBlobStoreFactory); + return new GitModifyCommand(createContext(), new SimpleGitWorkdirFactory(new WorkdirProvider()), lfsBlobStoreFactory); } @FunctionalInterface diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModifyCommand_LFSTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModifyCommand_LFSTest.java index 29914aef8e..bdad922b01 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModifyCommand_LFSTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModifyCommand_LFSTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.github.sdorra.shiro.ShiroRule; @@ -130,7 +130,7 @@ public class GitModifyCommand_LFSTest extends AbstractGitCommandTestBase { } private GitModifyCommand createCommand() { - return new GitModifyCommand(createContext(), repository, new SimpleGitWorkdirFactory(new WorkdirProvider()), lfsBlobStoreFactory); + return new GitModifyCommand(createContext(), new SimpleGitWorkdirFactory(new WorkdirProvider()), lfsBlobStoreFactory); } @Override diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModifyCommand_withEmptyRepositoryTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModifyCommand_withEmptyRepositoryTest.java index 2394cf144f..ae1c2fd854 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModifyCommand_withEmptyRepositoryTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitModifyCommand_withEmptyRepositoryTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.github.sdorra.shiro.ShiroRule; @@ -101,7 +101,7 @@ public class GitModifyCommand_withEmptyRepositoryTest extends AbstractGitCommand } private GitModifyCommand createCommand() { - return new GitModifyCommand(createContext(), repository, new SimpleGitWorkdirFactory(new WorkdirProvider()), lfsBlobStoreFactory); + return new GitModifyCommand(createContext(), new SimpleGitWorkdirFactory(new WorkdirProvider()), lfsBlobStoreFactory); } @FunctionalInterface diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitOutgoingCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitOutgoingCommandTest.java index 41863a91b3..5c7a491c72 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitOutgoingCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitOutgoingCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -31,7 +31,6 @@ import org.eclipse.jgit.revwalk.RevCommit; import org.junit.Test; import sonia.scm.api.v2.resources.GitRepositoryConfigStoreProvider; import sonia.scm.repository.ChangesetPagingResult; -import sonia.scm.repository.Repository; import sonia.scm.store.InMemoryConfigurationStoreFactory; import java.io.IOException; @@ -43,7 +42,7 @@ import static org.junit.Assert.assertNotNull; /** * Unit tests for {@link OutgoingCommand}. - * + * * @author Sebastian Sdorra */ public class GitOutgoingCommandTest extends AbstractRemoteCommandTestBase @@ -98,8 +97,8 @@ public class GitOutgoingCommandTest extends AbstractRemoteCommandTestBase commit(outgoing, "added a"); GitPushCommand push = new GitPushCommand(handler, - new GitContext(outgoingDirectory, null, null), - outgoingRepository); + new GitContext(outgoingDirectory, outgoingRepository, null) + ); PushCommandRequest req = new PushCommandRequest(); req.setRemoteRepository(incomingRepository); @@ -152,7 +151,6 @@ public class GitOutgoingCommandTest extends AbstractRemoteCommandTestBase */ private GitOutgoingCommand createCommand() { - return new GitOutgoingCommand(handler, new GitContext(outgoingDirectory, outgoingRepository, new GitRepositoryConfigStoreProvider(new InMemoryConfigurationStoreFactory())), - outgoingRepository); + return new GitOutgoingCommand(handler, new GitContext(outgoingDirectory, outgoingRepository, new GitRepositoryConfigStoreProvider(new InMemoryConfigurationStoreFactory()))); } } diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitPushCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitPushCommandTest.java index 40dc46ff16..1c5796a44f 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitPushCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitPushCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -89,7 +89,6 @@ public class GitPushCommandTest extends AbstractRemoteCommandTestBase */ private GitPushCommand createCommand() { - return new GitPushCommand(handler, new GitContext(outgoingDirectory, null, null), - outgoingRepository); + return new GitPushCommand(handler, new GitContext(outgoingDirectory, outgoingRepository, null)); } } diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/web/GitPermissionFilterTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/web/GitPermissionFilterTest.java index a3f3895770..486cffde8c 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/web/GitPermissionFilterTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/web/GitPermissionFilterTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.web; import org.junit.Test; @@ -33,6 +33,7 @@ import sonia.scm.repository.spi.ScmProviderHttpServlet; import sonia.scm.util.HttpUtil; import javax.servlet.ServletOutputStream; +import javax.servlet.WriteListener; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.ByteArrayOutputStream; @@ -47,40 +48,40 @@ import static org.mockito.Mockito.when; /** * Unit tests for {@link GitPermissionFilter}. - * + * * Created by omilke on 19.05.2017. */ @RunWith(MockitoJUnitRunner.class) public class GitPermissionFilterTest { private final GitPermissionFilter permissionFilter = new GitPermissionFilter(new ScmConfiguration(), mock(ScmProviderHttpServlet.class)); - + @Mock private HttpServletResponse response; - + @Test public void testIsWriteRequest() { HttpServletRequest request = mockRequestWithMethodAndRequestURI("POST", "/scm/git/fanzy-project/git-receive-pack"); assertThat(permissionFilter.isWriteRequest(request), is(true)); - + request = mockRequestWithMethodAndRequestURI("GET", "/scm/git/fanzy-project/info/refs?service=git-receive-pack"); assertThat(permissionFilter.isWriteRequest(request), is(true)); - + request = mockRequestWithMethodAndRequestURI("GET", "/scm/git/fanzy-project/info/refs?service=some-other-service"); assertThat(permissionFilter.isWriteRequest(request), is(false)); - + request = mockRequestWithMethodAndRequestURI( - "PUT", + "PUT", "/scm/git/git-lfs-demo.git/info/lfs/objects/8fcebeb5698230685f92028e560f8f1683ebc15ec82a620ffad5c12a3c19bdec" ); assertThat(permissionFilter.isWriteRequest(request), is(true)); - + request = mockRequestWithMethodAndRequestURI( - "GET", + "GET", "/scm/git/git-lfs-demo.git/info/lfs/objects/8fcebeb5698230685f92028e560f8f1683ebc15ec82a620ffad5c12a3c19bdec" ); assertThat(permissionFilter.isWriteRequest(request), is(false)); - + request = mockRequestWithMethodAndRequestURI("POST", "/scm/git/git-lfs-demo.git/info/lfs/objects/batch"); assertThat(permissionFilter.isWriteRequest(request), is(false)); } @@ -97,45 +98,45 @@ public class GitPermissionFilterTest { @Test public void testSendNotEnoughPrivilegesErrorAsBrowser() throws IOException { HttpServletRequest request = mockGitReceivePackServiceRequest(); - + permissionFilter.sendNotEnoughPrivilegesError(request, response); - + verify(response).sendError(HttpServletResponse.SC_FORBIDDEN); } - + @Test public void testSendNotEnoughPrivilegesErrorAsGitClient() throws IOException { verifySendNotEnoughPrivilegesErrorAsGitClient("git/2.9.3"); } - + @Test public void testSendNotEnoughPrivilegesErrorAsJGitClient() throws IOException { verifySendNotEnoughPrivilegesErrorAsGitClient("JGit/4.2"); } - + private void verifySendNotEnoughPrivilegesErrorAsGitClient(String userAgent) throws IOException { HttpServletRequest request = mockGitReceivePackServiceRequest(); when(request.getHeader(HttpUtil.HEADER_USERAGENT)).thenReturn(userAgent); - + CapturingServletOutputStream stream = new CapturingServletOutputStream(); when(response.getOutputStream()).thenReturn(stream); - + permissionFilter.sendNotEnoughPrivilegesError(request, response); - + verify(response).setStatus(HttpServletResponse.SC_OK); - assertThat(stream.toString(), containsString("privileges")); + assertThat(stream.toString(), containsString("privileges")); } - + private HttpServletRequest mockGitReceivePackServiceRequest() { HttpServletRequest request = mockRequestWithMethodAndRequestURI("GET", "/git/info/refs"); when(request.getParameter("service")).thenReturn("git-receive-pack"); return request; } - + private static class CapturingServletOutputStream extends ServletOutputStream { private final ByteArrayOutputStream baos = new ByteArrayOutputStream(); - + @Override public void write(int b) throws IOException { baos.write(b); @@ -145,11 +146,21 @@ public class GitPermissionFilterTest { public void close() throws IOException { baos.close(); } - + @Override public String toString() { return baos.toString(); } + + @Override + public boolean isReady() { + return true; + } + + @Override + public void setWriteListener(WriteListener writeListener) { + + } } - + } diff --git a/scm-plugins/scm-git-plugin/src/test/resources/sonia/scm/repository/spi/scm-git-spi-test.zip b/scm-plugins/scm-git-plugin/src/test/resources/sonia/scm/repository/spi/scm-git-spi-test.zip index da166155a7..80483d04d1 100644 Binary files a/scm-plugins/scm-git-plugin/src/test/resources/sonia/scm/repository/spi/scm-git-spi-test.zip and b/scm-plugins/scm-git-plugin/src/test/resources/sonia/scm/repository/spi/scm-git-spi-test.zip differ diff --git a/scm-plugins/scm-hg-plugin/pom.xml b/scm-plugins/scm-hg-plugin/pom.xml index 37da213210..4457eb202f 100644 --- a/scm-plugins/scm-hg-plugin/pom.xml +++ b/scm-plugins/scm-hg-plugin/pom.xml @@ -58,25 +58,6 @@ - - com.mycila.maven-license-plugin - maven-license-plugin - 1.9.0 - -
http://download.scm-manager.org/licenses/mvn-license.txt
- - src/** - **/test/** - - - target/** - .hg/** - **/fileview.py - - true -
-
- sonia.scm.maven smp-maven-plugin @@ -104,14 +85,4 @@
- - - - maven.scm-manager.org - scm-manager release repository - http://maven.scm-manager.org/nexus/content/groups/public - - - - diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgRepositoryHandler.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgRepositoryHandler.java index 60ec6f3242..386483a43a 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgRepositoryHandler.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgRepositoryHandler.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; //~--- non-JDK imports -------------------------------------------------------- @@ -56,55 +56,37 @@ import java.io.InputStream; import java.io.OutputStream; import java.text.MessageFormat; -//~--- JDK imports ------------------------------------------------------------ - -/** - * - * @author Sebastian Sdorra - */ @Singleton @Extension public class HgRepositoryHandler - extends AbstractSimpleRepositoryHandler -{ + extends AbstractSimpleRepositoryHandler { - /** Field description */ public static final String PATH_HOOK = ".hook-1.8"; - - /** Field description */ - public static final String RESOURCE_VERSION = - "sonia/scm/version/scm-hg-plugin"; - - /** Field description */ + public static final String RESOURCE_VERSION = "sonia/scm/version/scm-hg-plugin"; public static final String TYPE_DISPLAYNAME = "Mercurial"; - - /** Field description */ public static final String TYPE_NAME = "hg"; - - /** Field description */ public static final RepositoryType TYPE = new RepositoryType(TYPE_NAME, - TYPE_DISPLAYNAME, - HgRepositoryServiceProvider.COMMANDS, - HgRepositoryServiceProvider.FEATURES); + TYPE_DISPLAYNAME, + HgRepositoryServiceProvider.COMMANDS, + HgRepositoryServiceProvider.FEATURES); - /** the logger for HgRepositoryHandler */ - private static final Logger logger = - LoggerFactory.getLogger(HgRepositoryHandler.class); + private static final Logger logger = LoggerFactory.getLogger(HgRepositoryHandler.class); - /** Field description */ - public static final String PATH_HGRC = - ".hg".concat(File.separator).concat("hgrc"); + public static final String PATH_HGRC = ".hg".concat(File.separator).concat("hgrc"); private static final String CONFIG_SECTION_SCMM = "scmm"; private static final String CONFIG_KEY_REPOSITORY_ID = "repositoryid"; - //~--- constructors --------------------------------------------------------- + private final Provider hgContextProvider; + + private final HgWorkdirFactory workdirFactory; + + private final JAXBContext jaxbContext; @Inject public HgRepositoryHandler(ConfigurationStoreFactory storeFactory, Provider hgContextProvider, RepositoryLocationResolver repositoryLocationResolver, - PluginLoader pluginLoader, HgWorkdirFactory workdirFactory) - { + PluginLoader pluginLoader, HgWorkdirFactory workdirFactory) { super(storeFactory, repositoryLocationResolver, pluginLoader); this.hgContextProvider = hgContextProvider; this.workdirFactory = workdirFactory; @@ -121,22 +103,11 @@ public class HgRepositoryHandler } } - //~--- methods -------------------------------------------------------------- - - /** - * Method description - * - * - * @param autoConfig - */ - public void doAutoConfiguration(HgConfig autoConfig) - { + public void doAutoConfiguration(HgConfig autoConfig) { HgInstaller installer = HgInstallerFactory.createInstaller(); - try - { - if (logger.isDebugEnabled()) - { + try { + if (logger.isDebugEnabled()) { logger.debug("installing mercurial with {}", installer.getClass().getName()); } @@ -144,161 +115,85 @@ public class HgRepositoryHandler installer.install(baseDirectory, autoConfig); config = autoConfig; storeConfig(); - } - catch (IOException ioe) - { - if (logger.isErrorEnabled()) - { + } catch (IOException ioe) { + if (logger.isErrorEnabled()) { logger.error("Could not write Hg CGI for inital config. " + "HgWeb may not function until a new Hg config is set", ioe); } } } - /** - * Method description - * - * - * @param context - */ @Override - public void init(SCMContextProvider context) - { + public void init(SCMContextProvider context) { super.init(context); writePythonScripts(context); // fix wrong hg.bat from package installation - if (SystemUtil.isWindows()) - { + if (SystemUtil.isWindows()) { HgWindowsPackageFix.fixHgPackage(context, getConfig()); } } - /** - * Method description - * - */ @Override - public void loadConfig() - { + public void loadConfig() { super.loadConfig(); - if (config == null) - { + if (config == null) { doAutoConfiguration(new HgConfig()); } } - //~--- get methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @return - */ - public HgContext getHgContext() - { + public HgContext getHgContext() { HgContext context = hgContextProvider.get(); - if (context == null) - { + if (context == null) { context = new HgContext(); } return context; } - /** - * Method description - * - * - * @return - */ @Override - public ImportHandler getImportHandler() - { + public ImportHandler getImportHandler() { return new HgImportHandler(this); } - /** - * Method description - * - * - * @return - */ - public JAXBContext getJaxbContext() - { - return jaxbContext; - } - - /** - * Method description - * - * - * @return - */ @Override - public RepositoryType getType() - { + public RepositoryType getType() { return TYPE; } - /** - * Method description - * - * - * @return - */ @Override - public String getVersionInformation() - { + public String getVersionInformation() { String version = getStringFromResource(RESOURCE_VERSION, - DEFAULT_VERSION_INFORMATION); + DEFAULT_VERSION_INFORMATION); - try - { + try { HgVersion hgVersion = new HgVersionHandler(this, hgContextProvider.get(), - baseDirectory).getVersion(); + baseDirectory).getVersion(); - if (hgVersion != null) - { - if (logger.isDebugEnabled()) - { + if (hgVersion != null) { + if (logger.isDebugEnabled()) { logger.debug("mercurial/python informations: {}", hgVersion); } version = MessageFormat.format(version, hgVersion.getPython(), hgVersion.getMercurial()); - } - else if (logger.isWarnEnabled()) - { + } else if (logger.isWarnEnabled()) { logger.warn("could not retrieve version informations"); } - } - catch (Exception ex) - { + } catch (Exception ex) { logger.error("could not read version informations", ex); } return version; } - /** - * Method description - * - * - * @param repository - * @param directory - * - * @return - */ @Override protected ExtendedCommand buildCreateCommand(Repository repository, - File directory) - { + File directory) { ExtendedCommand cmd = new ExtendedCommand(config.getHgBinary(), "init", - directory.getAbsolutePath()); + directory.getAbsolutePath()); // copy system environment, because of the PATH variable cmd.setUseSystemEnvironment(true); @@ -315,13 +210,11 @@ public class HgRepositoryHandler * * @param repository * @param directory - * * @throws IOException */ @Override protected void postCreate(Repository repository, File directory) - throws IOException - { + throws IOException { File hgrcFile = new File(directory, PATH_HGRC); INIConfiguration hgrc = new INIConfiguration(); @@ -336,55 +229,30 @@ public class HgRepositoryHandler writer.write(hgrc, hgrcFile); } - //~--- get methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @return - */ @Override - protected Class getConfigClass() - { + protected Class getConfigClass() { return HgConfig.class; } - //~--- methods -------------------------------------------------------------- - - /** - * Method description - * - * - * @param context - */ - private void writePythonScripts(SCMContextProvider context) - { + private void writePythonScripts(SCMContextProvider context) { IOUtil.mkdirs(HgPythonScript.getScriptDirectory(context)); - for (HgPythonScript script : HgPythonScript.values()) - { - if (logger.isDebugEnabled()) - { + for (HgPythonScript script : HgPythonScript.values()) { + if (logger.isDebugEnabled()) { logger.debug("write python script {}", script.getName()); } InputStream content = null; OutputStream output = null; - try - { + try { content = HgRepositoryHandler.class.getResourceAsStream( script.getResourcePath()); output = new FileOutputStream(script.getFile(context)); IOUtil.copy(content, output); - } - catch (IOException ex) - { + } catch (IOException ex) { logger.error("could not write script", ex); - } - finally - { + } finally { IOUtil.close(content); IOUtil.close(output); } @@ -395,13 +263,7 @@ public class HgRepositoryHandler return workdirFactory; } - //~--- fields --------------------------------------------------------------- - - /** Field description */ - private final Provider hgContextProvider; - - /** Field description */ - private JAXBContext jaxbContext; - - private final HgWorkdirFactory workdirFactory; + public JAXBContext getJaxbContext() { + return jaxbContext; + } } diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgVersion.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgVersion.java index 7c35f91a28..36bd6abfa3 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgVersion.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgVersion.java @@ -21,138 +21,29 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; -//~--- non-JDK imports -------------------------------------------------------- - -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; -//~--- JDK imports ------------------------------------------------------------ - /** * * @author Sebastian Sdorra */ @XmlRootElement(name = "version") @XmlAccessorType(XmlAccessType.FIELD) -public class HgVersion -{ - - /** - * Method description - * - * - * @param obj - * - * @return - */ - @Override - public boolean equals(Object obj) - { - if (obj == null) - { - return false; - } - - if (getClass() != obj.getClass()) - { - return false; - } - - final HgVersion other = (HgVersion) obj; - - return Objects.equal(mercurial, other.mercurial) - && Objects.equal(python, other.python); - } - - /** - * Method description - * - * - * @return - */ - @Override - public int hashCode() - { - return Objects.hashCode(mercurial, python); - } - - /** - * Method description - * - * - * @return - */ - @Override - public String toString() - { - //J- - return MoreObjects.toStringHelper(this) - .add("mercurial", mercurial) - .add("python", python) - .toString(); - //J+ - } - - //~--- get methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @return - */ - public String getMercurial() - { - return mercurial; - } - - /** - * Method description - * - * - * @return - */ - public String getPython() - { - return python; - } - - //~--- set methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @param mercurial - */ - public void setMercurial(String mercurial) - { - this.mercurial = mercurial; - } - - /** - * Method description - * - * - * @param python - */ - public void setPython(String python) - { - this.python = python; - } - - //~--- fields --------------------------------------------------------------- - - /** Field description */ +@EqualsAndHashCode +@Getter +@Setter +@ToString +public class HgVersion { private String mercurial; - - /** Field description */ private String python; } diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/AbstractCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/AbstractCommand.java index c7bc579456..f7d33b8973 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/AbstractCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/AbstractCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -38,14 +38,13 @@ public class AbstractCommand /** * Constructs ... * + * @param context * - * @param context - * @param repository */ - public AbstractCommand(HgCommandContext context, Repository repository) + public AbstractCommand(HgCommandContext context) { this.context = context; - this.repository = repository; + this.repository = context.getScmRepository(); } //~--- methods -------------------------------------------------------------- diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/AbstractHgPushOrPullCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/AbstractHgPushOrPullCommand.java index 4c365d9d18..02c4ae1b1d 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/AbstractHgPushOrPullCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/AbstractHgPushOrPullCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -39,15 +39,12 @@ public class AbstractHgPushOrPullCommand extends AbstractCommand /** * Constructs ... * - * - * @param handler + * @param handler * @param context - * @param repository */ - protected AbstractHgPushOrPullCommand(HgRepositoryHandler handler, - HgCommandContext context, Repository repository) + protected AbstractHgPushOrPullCommand(HgRepositoryHandler handler, HgCommandContext context) { - super(context, repository); + super(context); this.handler = handler; } diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBlameCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBlameCommand.java index 144532c553..83732bb879 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBlameCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBlameCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -36,7 +36,6 @@ import org.slf4j.LoggerFactory; import sonia.scm.repository.BlameLine; import sonia.scm.repository.BlameResult; import sonia.scm.repository.Person; -import sonia.scm.repository.Repository; import sonia.scm.web.HgUtil; import java.io.IOException; @@ -62,13 +61,12 @@ public class HgBlameCommand extends AbstractCommand implements BlameCommand /** * Constructs ... * + * @param context * - * @param context - * @param repository */ - HgBlameCommand(HgCommandContext context, Repository repository) + HgBlameCommand(HgCommandContext context) { - super(context, repository); + super(context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBranchCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBranchCommand.java index 31987afe2b..408daedd81 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBranchCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBranchCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.aragost.javahg.Changeset; @@ -33,7 +33,6 @@ import org.slf4j.LoggerFactory; import sonia.scm.ContextEntry; import sonia.scm.repository.Branch; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.repository.api.BranchRequest; import sonia.scm.repository.util.WorkingCopy; import sonia.scm.user.User; @@ -48,8 +47,8 @@ public class HgBranchCommand extends AbstractCommand implements BranchCommand { private final HgWorkdirFactory workdirFactory; - HgBranchCommand(HgCommandContext context, Repository repository, HgWorkdirFactory workdirFactory) { - super(context, repository); + HgBranchCommand(HgCommandContext context, HgWorkdirFactory workdirFactory) { + super(context); this.workdirFactory = workdirFactory; } diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBranchesCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBranchesCommand.java index 43438ecc78..48b8ebc0a5 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBranchesCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBranchesCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -30,7 +30,6 @@ import com.aragost.javahg.Changeset; import com.google.common.base.Function; import com.google.common.collect.Lists; import sonia.scm.repository.Branch; -import sonia.scm.repository.Repository; import java.util.List; @@ -49,13 +48,12 @@ public class HgBranchesCommand extends AbstractCommand /** * Constructs ... * + * @param context * - * @param context - * @param repository */ - public HgBranchesCommand(HgCommandContext context, Repository repository) + public HgBranchesCommand(HgCommandContext context) { - super(context, repository); + super(context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBrowseCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBrowseCommand.java index 01471df442..6c83368cc4 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBrowseCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgBrowseCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -32,7 +32,6 @@ import com.google.common.base.MoreObjects; import com.google.common.base.Strings; import sonia.scm.repository.BrowserResult; import sonia.scm.repository.FileObject; -import sonia.scm.repository.Repository; import sonia.scm.repository.spi.javahg.HgFileviewCommand; import java.io.IOException; @@ -50,13 +49,12 @@ public class HgBrowseCommand extends AbstractCommand implements BrowseCommand /** * Constructs ... * + * @param context * - * @param context - * @param repository */ - public HgBrowseCommand(HgCommandContext context, Repository repository) + public HgBrowseCommand(HgCommandContext context) { - super(context, repository); + super(context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgCatCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgCatCommand.java index 93e201a99d..ee86e8a674 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgCatCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgCatCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.aragost.javahg.commands.ExecutionException; @@ -31,7 +31,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import sonia.scm.ContextEntry; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.web.HgUtil; import java.io.IOException; @@ -42,8 +41,8 @@ public class HgCatCommand extends AbstractCommand implements CatCommand { private static final Logger log = LoggerFactory.getLogger(HgCatCommand.class); - HgCatCommand(HgCommandContext context, Repository repository) { - super(context, repository); + HgCatCommand(HgCommandContext context) { + super(context); } @Override diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgDiffCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgDiffCommand.java index 7f6ef1a3b9..605ce5555a 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgDiffCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgDiffCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -29,7 +29,6 @@ package sonia.scm.repository.spi; import com.google.common.base.Strings; import com.google.common.io.ByteStreams; import com.google.common.io.Closeables; -import sonia.scm.repository.Repository; import sonia.scm.repository.api.DiffCommandBuilder; import sonia.scm.repository.api.DiffFormat; import sonia.scm.repository.spi.javahg.HgDiffInternalCommand; @@ -49,13 +48,12 @@ public class HgDiffCommand extends AbstractCommand implements DiffCommand /** * Constructs ... * + * @param context * - * @param context - * @param repository */ - HgDiffCommand(HgCommandContext context, Repository repository) + HgDiffCommand(HgCommandContext context) { - super(context, repository); + super(context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgIncomingCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgIncomingCommand.java index 4f587da1e2..27f2176392 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgIncomingCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgIncomingCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -31,7 +31,6 @@ import sonia.scm.repository.Changeset; import sonia.scm.repository.ChangesetPagingResult; import sonia.scm.repository.HgRepositoryHandler; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.repository.spi.javahg.HgIncomingChangesetCommand; import java.io.File; @@ -56,15 +55,12 @@ public class HgIncomingCommand extends AbstractCommand /** * Constructs ... * - * - * @param context - * @param repository + * @param context * @param handler */ - HgIncomingCommand(HgCommandContext context, Repository repository, - HgRepositoryHandler handler) + HgIncomingCommand(HgCommandContext context, HgRepositoryHandler handler) { - super(context, repository); + super(context); this.handler = handler; } diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgLogCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgLogCommand.java index f290e5d0ec..fabf364dc2 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgLogCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgLogCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -29,7 +29,6 @@ package sonia.scm.repository.spi; import com.google.common.base.Strings; import sonia.scm.repository.Changeset; import sonia.scm.repository.ChangesetPagingResult; -import sonia.scm.repository.Repository; import sonia.scm.repository.spi.javahg.HgLogChangesetCommand; import java.util.ArrayList; @@ -47,13 +46,12 @@ public class HgLogCommand extends AbstractCommand implements LogCommand /** * Constructs ... * + * @param context * - * @param context - * @param repository */ - HgLogCommand(HgCommandContext context, Repository repository) + HgLogCommand(HgCommandContext context) { - super(context, repository); + super(context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgModificationsCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgModificationsCommand.java index 0c8dd2f456..157529baf5 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgModificationsCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgModificationsCommand.java @@ -21,17 +21,19 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; +import sonia.scm.repository.Modification; import sonia.scm.repository.Modifications; -import sonia.scm.repository.Repository; import sonia.scm.repository.spi.javahg.HgLogChangesetCommand; +import java.util.Collection; + public class HgModificationsCommand extends AbstractCommand implements ModificationsCommand { - HgModificationsCommand(HgCommandContext context, Repository repository) { - super(context, repository); + HgModificationsCommand(HgCommandContext context) { + super(context); } @@ -39,9 +41,8 @@ public class HgModificationsCommand extends AbstractCommand implements Modificat public Modifications getModifications(String revision) { com.aragost.javahg.Repository repository = open(); HgLogChangesetCommand hgLogChangesetCommand = HgLogChangesetCommand.on(repository, getContext().getConfig()); - Modifications modifications = hgLogChangesetCommand.rev(revision).extractModifications(); - modifications.setRevision(revision); - return modifications; + Collection modifications = hgLogChangesetCommand.rev(revision).extractModifications(); + return new Modifications(revision, modifications); } @Override diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgOutgoingCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgOutgoingCommand.java index 8dc677c06b..c35de5bfc6 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgOutgoingCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgOutgoingCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -31,7 +31,6 @@ import sonia.scm.repository.Changeset; import sonia.scm.repository.ChangesetPagingResult; import sonia.scm.repository.HgRepositoryHandler; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.repository.spi.javahg.HgOutgoingChangesetCommand; import java.io.File; @@ -56,15 +55,12 @@ public class HgOutgoingCommand extends AbstractCommand /** * Constructs ... * - * - * @param context - * @param repository + * @param context * @param handler */ - public HgOutgoingCommand(HgCommandContext context, Repository repository, - HgRepositoryHandler handler) + public HgOutgoingCommand(HgCommandContext context, HgRepositoryHandler handler) { - super(context, repository); + super(context); this.handler = handler; } diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgPullCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgPullCommand.java index f7676f4764..e5cdbd957b 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgPullCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgPullCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -32,7 +32,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import sonia.scm.repository.HgRepositoryHandler; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.repository.api.PullResponse; import java.io.IOException; @@ -58,15 +57,12 @@ public class HgPullCommand extends AbstractHgPushOrPullCommand /** * Constructs ... * - * - * @param handler + * @param handler * @param context - * @param repository */ - public HgPullCommand(HgRepositoryHandler handler, HgCommandContext context, - Repository repository) + public HgPullCommand(HgRepositoryHandler handler, HgCommandContext context) { - super(handler, context, repository); + super(handler, context); } //~--- methods -------------------------------------------------------------- diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgPushCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgPushCommand.java index 6451bc234d..9b6581d3f3 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgPushCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgPushCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -32,7 +32,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import sonia.scm.repository.HgRepositoryHandler; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.repository.api.PushResponse; import java.io.IOException; @@ -58,15 +57,12 @@ public class HgPushCommand extends AbstractHgPushOrPullCommand /** * Constructs ... * - * - * @param handler + * @param handler * @param context - * @param repository */ - public HgPushCommand(HgRepositoryHandler handler, HgCommandContext context, - Repository repository) + public HgPushCommand(HgRepositoryHandler handler, HgCommandContext context) { - super(handler, context, repository); + super(handler, context); } //~--- methods -------------------------------------------------------------- diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgRepositoryServiceProvider.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgRepositoryServiceProvider.java index 176f674516..3995146e42 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgRepositoryServiceProvider.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgRepositoryServiceProvider.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.google.common.io.Closeables; @@ -48,9 +48,9 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider //J- public static final Set COMMANDS = EnumSet.of( Command.BLAME, - Command.BROWSE, + Command.BROWSE, Command.CAT, - Command.DIFF, + Command.DIFF, Command.LOG, Command.TAGS, Command.BRANCH, @@ -72,7 +72,6 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider HgRepositoryServiceProvider(HgRepositoryHandler handler, HgHookManager hookManager, Repository repository) { - this.repository = repository; this.handler = handler; this.repositoryDirectory = handler.getDirectory(repository.getId()); this.context = new HgCommandContext(hookManager, handler, repository, @@ -104,7 +103,7 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider @Override public HgBlameCommand getBlameCommand() { - return new HgBlameCommand(context, repository); + return new HgBlameCommand(context); } /** @@ -116,12 +115,12 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider @Override public BranchesCommand getBranchesCommand() { - return new HgBranchesCommand(context, repository); + return new HgBranchesCommand(context); } @Override public BranchCommand getBranchCommand() { - return new HgBranchCommand(context, repository, handler.getWorkdirFactory()); + return new HgBranchCommand(context, handler.getWorkdirFactory()); } /** @@ -133,7 +132,7 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider @Override public HgBrowseCommand getBrowseCommand() { - return new HgBrowseCommand(context, repository); + return new HgBrowseCommand(context); } /** @@ -145,7 +144,7 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider @Override public HgCatCommand getCatCommand() { - return new HgCatCommand(context, repository); + return new HgCatCommand(context); } /** @@ -157,7 +156,7 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider @Override public HgDiffCommand getDiffCommand() { - return new HgDiffCommand(context, repository); + return new HgDiffCommand(context); } /** @@ -169,7 +168,7 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider @Override public IncomingCommand getIncomingCommand() { - return new HgIncomingCommand(context, repository, handler); + return new HgIncomingCommand(context, handler); } /** @@ -181,7 +180,7 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider @Override public HgLogCommand getLogCommand() { - return new HgLogCommand(context, repository); + return new HgLogCommand(context); } /** @@ -192,7 +191,7 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider */ @Override public ModificationsCommand getModificationsCommand() { - return new HgModificationsCommand(context,repository); + return new HgModificationsCommand(context); } /** @@ -204,7 +203,7 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider @Override public OutgoingCommand getOutgoingCommand() { - return new HgOutgoingCommand(context, repository, handler); + return new HgOutgoingCommand(context, handler); } /** @@ -216,7 +215,7 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider @Override public PullCommand getPullCommand() { - return new HgPullCommand(handler, context, repository); + return new HgPullCommand(handler, context); } /** @@ -228,7 +227,7 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider @Override public PushCommand getPushCommand() { - return new HgPushCommand(handler, context, repository); + return new HgPushCommand(handler, context); } @Override @@ -269,7 +268,7 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider @Override public TagsCommand getTagsCommand() { - return new HgTagsCommand(context, repository); + return new HgTagsCommand(context); } //~--- fields --------------------------------------------------------------- @@ -280,9 +279,6 @@ public class HgRepositoryServiceProvider extends RepositoryServiceProvider /** Field description */ private HgRepositoryHandler handler; - /** Field description */ - private Repository repository; - /** Field description */ private File repositoryDirectory; } diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgTagsCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgTagsCommand.java index db4ad42506..20bdac4ec1 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgTagsCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgTagsCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -30,7 +30,6 @@ import com.google.common.base.Function; import com.google.common.base.Strings; import com.google.common.collect.Lists; -import sonia.scm.repository.Repository; import sonia.scm.repository.Tag; import sonia.scm.util.Util; @@ -48,13 +47,12 @@ public class HgTagsCommand extends AbstractCommand implements TagsCommand /** * Constructs ... * + * @param context * - * @param context - * @param repository */ - public HgTagsCommand(HgCommandContext context, Repository repository) + public HgTagsCommand(HgCommandContext context) { - super(context, repository); + super(context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/AbstractChangesetCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/AbstractChangesetCommand.java index 4de460d20a..5aea125875 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/AbstractChangesetCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/AbstractChangesetCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi.javahg; //~--- non-JDK imports -------------------------------------------------------- @@ -36,10 +36,11 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import sonia.scm.repository.Changeset; import sonia.scm.repository.HgConfig; -import sonia.scm.repository.Modifications; +import sonia.scm.repository.Modification; import sonia.scm.repository.Person; import java.io.IOException; +import java.util.Collection; import java.util.List; //~--- JDK imports ------------------------------------------------------------ @@ -251,7 +252,7 @@ public abstract class AbstractChangesetCommand extends AbstractCommand return changeset; } - protected Modifications readModificationsFromStream(HgInputStream in) { + protected Collection readModificationsFromStream(HgInputStream in) { try { boolean found = in.find(CHANGESET_PATTERN); if (found) { @@ -265,20 +266,14 @@ public abstract class AbstractChangesetCommand extends AbstractCommand return null; } - private Modifications extractModifications(HgInputStream in) throws IOException { - Modifications modifications = new Modifications(); + private Collection extractModifications(HgInputStream in) throws IOException { + HgModificationParser hgModificationParser = new HgModificationParser(); String line = in.textUpTo('\n'); while (line.length() > 0) { - if (line.startsWith("a ")) { - modifications.getAdded().add(line.substring(2)); - } else if (line.startsWith("m ")) { - modifications.getModified().add(line.substring(2)); - } else if (line.startsWith("d ")) { - modifications.getRemoved().add(line.substring(2)); - } + hgModificationParser.addLine(line); line = in.textUpTo('\n'); } - return modifications; + return hgModificationParser.getModifications(); } /** diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/HgLogChangesetCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/HgLogChangesetCommand.java index 418772b39f..923132fe07 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/HgLogChangesetCommand.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/HgLogChangesetCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi.javahg; import com.aragost.javahg.Repository; @@ -31,9 +31,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import sonia.scm.repository.Changeset; import sonia.scm.repository.HgConfig; -import sonia.scm.repository.Modifications; +import sonia.scm.repository.Modification; import java.io.IOException; +import java.util.Collection; import java.util.List; /** @@ -64,7 +65,7 @@ public class HgLogChangesetCommand extends AbstractChangesetCommand { return readListFromStream(getHgInputStream(files, CHANGESET_EAGER_STYLE_PATH)); } - public Modifications extractModifications(String... files) { + public Collection extractModifications(String... files) { HgInputStream hgInputStream = getHgInputStream(files, CHANGESET_EAGER_STYLE_PATH); try { return readModificationsFromStream(hgInputStream); diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/HgModificationParser.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/HgModificationParser.java new file mode 100644 index 0000000000..e57cab9279 --- /dev/null +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/HgModificationParser.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.repository.spi.javahg; + +import sonia.scm.repository.Added; +import sonia.scm.repository.Copied; +import sonia.scm.repository.Modification; +import sonia.scm.repository.Modified; +import sonia.scm.repository.Removed; +import sonia.scm.repository.Renamed; + +import java.util.Collection; +import java.util.LinkedHashSet; + +class HgModificationParser { + private final Collection modifications = new LinkedHashSet<>(); + + void addLine(String line) { + if (line.startsWith("a ")) { + modifications.add(new Added(line.substring(2))); + } else if (line.startsWith("m ")) { + modifications.add(new Modified(line.substring(2))); + } else if (line.startsWith("d ")) { + modifications.add(new Removed(line.substring(2))); + } else if (line.startsWith("c ")) { + String sourceTarget = line.substring(2); + int divider = sourceTarget.indexOf('\0'); + String source = sourceTarget.substring(0, divider); + String target = sourceTarget.substring(divider + 1); + modifications.remove(new Added(target)); + if (modifications.remove(new Removed(source))) { + modifications.add(new Renamed(source, target)); + } else { + modifications.add(new Copied(source, target)); + } + } + } + + Collection getModifications() { + return modifications; + } +} diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/web/HgServletInputStream.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/web/HgServletInputStream.java index 9262836d85..1f435703df 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/web/HgServletInputStream.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/web/HgServletInputStream.java @@ -21,11 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.web; import com.google.common.base.Preconditions; +import javax.servlet.ReadListener; import javax.servlet.ServletInputStream; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -76,4 +77,19 @@ public class HgServletInputStream extends ServletInputStream { public void close() throws IOException { original.close(); } + + @Override + public boolean isFinished() { + return original.isFinished(); + } + + @Override + public boolean isReady() { + return original.isReady(); + } + + @Override + public void setReadListener(ReadListener readListener) { + original.setReadListener(readListener); + } } diff --git a/scm-plugins/scm-hg-plugin/src/main/js/ProtocolInformation.tsx b/scm-plugins/scm-hg-plugin/src/main/js/ProtocolInformation.tsx index 9906947403..1a23cf5428 100644 --- a/scm-plugins/scm-hg-plugin/src/main/js/ProtocolInformation.tsx +++ b/scm-plugins/scm-hg-plugin/src/main/js/ProtocolInformation.tsx @@ -50,13 +50,13 @@ class ProtocolInformation extends React.Component {
cd {repository.name}
- echo "[paths]" > .hg/hgrc + echo "[paths]" > .hg/hgrc
echo "default = {href} - " > .hg/hgrc + " > .hg/hgrc
echo "# {repository.name} - " > README.md + " > README.md
hg add README.md
diff --git a/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/styles/changesets-eager.style b/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/styles/changesets-eager.style index 2185c47a05..07c31fd7ea 100644 --- a/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/styles/changesets-eager.style +++ b/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/styles/changesets-eager.style @@ -1,8 +1,9 @@ header = "%{pattern}" -changeset = "{rev}:{node}{author}\n{date|hgdate}\n{branch}\n{parents}{extras}\n{tags}{file_adds}{file_mods}{file_dels}\n{desc}\0" +changeset = "{rev}:{node}{author}\n{date|hgdate}\n{branch}\n{parents}{extras}\n{tags}{file_adds}{file_mods}{file_dels}{file_copies}\n{desc}\0" tag = "t {tag}\n" file_add = "a {file_add}\n" file_mod = "m {file_mod}\n" file_del = "d {file_del}\n" +file_copy = "c {source}\0{name}\n" extra = "{key}={value|stringescape}," -footer = "%{pattern}" \ No newline at end of file +footer = "%{pattern}" diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgBlameCommandTest.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgBlameCommandTest.java index 29f5bcb35a..7662867e13 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgBlameCommandTest.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgBlameCommandTest.java @@ -111,6 +111,6 @@ public class HgBlameCommandTest extends AbstractHgCommandTestBase */ private BlameCommand createCommand() { - return new HgBlameCommand(cmdContext, repository); + return new HgBlameCommand(cmdContext); } } diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgBranchCommandTest.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgBranchCommandTest.java index a081d97f3d..1d7f0ca627 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgBranchCommandTest.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgBranchCommandTest.java @@ -62,7 +62,7 @@ public class HgBranchCommandTest extends AbstractHgCommandTestBase { BranchRequest branchRequest = new BranchRequest(); branchRequest.setNewBranch("new_branch"); - Branch newBranch = new HgBranchCommand(cmdContext, repository, workdirFactory).branch(branchRequest); + Branch newBranch = new HgBranchCommand(cmdContext, workdirFactory).branch(branchRequest); assertThat(readBranches()).filteredOn(b -> b.getName().equals("new_branch")).isNotEmpty(); assertThat(cmdContext.open().changeset(newBranch.getRevision()).getParent1().getBranch()).isEqualTo("default"); @@ -74,7 +74,7 @@ public class HgBranchCommandTest extends AbstractHgCommandTestBase { branchRequest.setParentBranch("test-branch"); branchRequest.setNewBranch("new_branch"); - Branch newBranch = new HgBranchCommand(cmdContext, repository, workdirFactory).branch(branchRequest); + Branch newBranch = new HgBranchCommand(cmdContext, workdirFactory).branch(branchRequest); assertThat(readBranches()).filteredOn(b -> b.getName().equals("new_branch")).isNotEmpty(); assertThat(cmdContext.open().changeset(newBranch.getRevision()).getParent1().getBranch()).isEqualTo("test-branch"); @@ -84,7 +84,7 @@ public class HgBranchCommandTest extends AbstractHgCommandTestBase { public void shouldCloseBranch() { String branchToBeClosed = "test-branch"; - new HgBranchCommand(cmdContext, repository, workdirFactory).deleteOrClose(branchToBeClosed); + new HgBranchCommand(cmdContext, workdirFactory).deleteOrClose(branchToBeClosed); assertThat(readBranches()).filteredOn(b -> b.getName().equals(branchToBeClosed)).isEmpty(); } @@ -92,11 +92,11 @@ public class HgBranchCommandTest extends AbstractHgCommandTestBase { public void shouldThrowInternalRepositoryException() { String branchToBeClosed = "default"; - new HgBranchCommand(cmdContext, repository, workdirFactory).deleteOrClose(branchToBeClosed); - assertThrows(InternalRepositoryException.class, () -> new HgBranchCommand(cmdContext, repository, workdirFactory).deleteOrClose(branchToBeClosed)); + new HgBranchCommand(cmdContext, workdirFactory).deleteOrClose(branchToBeClosed); + assertThrows(InternalRepositoryException.class, () -> new HgBranchCommand(cmdContext, workdirFactory).deleteOrClose(branchToBeClosed)); } private List readBranches() { - return new HgBranchesCommand(cmdContext, repository).getBranches(); + return new HgBranchesCommand(cmdContext).getBranches(); } } diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgBrowseCommandTest.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgBrowseCommandTest.java index 30cab9185b..eb9b34828d 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgBrowseCommandTest.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgBrowseCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.aragost.javahg.commands.LogCommand; @@ -48,7 +48,7 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase { public void testBrowseWithFilePath() throws IOException { BrowseCommandRequest request = new BrowseCommandRequest(); request.setPath("a.txt"); - FileObject file = new HgBrowseCommand(cmdContext, repository).getBrowserResult(request).getFile(); + FileObject file = new HgBrowseCommand(cmdContext).getBrowserResult(request).getFile(); assertEquals("a.txt", file.getName()); assertFalse(file.isDirectory()); assertTrue(file.getChildren() == null || file.getChildren().isEmpty()); @@ -83,8 +83,7 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase { BrowseCommandRequest browseCommandRequest = new BrowseCommandRequest(); browseCommandRequest.setRevision("default"); - BrowserResult result = new HgBrowseCommand(cmdContext, - repository).getBrowserResult(browseCommandRequest); + BrowserResult result = new HgBrowseCommand(cmdContext).getBrowserResult(browseCommandRequest); assertThat(result.getRevision()).isEqualTo(defaultBranchRevision); } @@ -95,8 +94,7 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase { request.setPath("c"); - BrowserResult result = new HgBrowseCommand(cmdContext, - repository).getBrowserResult(request); + BrowserResult result = new HgBrowseCommand(cmdContext).getBrowserResult(request); assertNotNull(result); @@ -163,8 +161,7 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase { request.setRecursive(true); - BrowserResult result = new HgBrowseCommand(cmdContext, - repository).getBrowserResult(request); + BrowserResult result = new HgBrowseCommand(cmdContext).getBrowserResult(request); assertNotNull(result); @@ -185,7 +182,7 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase { BrowseCommandRequest request = new BrowseCommandRequest(); request.setLimit(1); - BrowserResult result = new HgBrowseCommand(cmdContext, repository).getBrowserResult(request); + BrowserResult result = new HgBrowseCommand(cmdContext).getBrowserResult(request); FileObject root = result.getFile(); Collection foList = root.getChildren(); @@ -200,7 +197,7 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase { request.setLimit(2); request.setOffset(1); - BrowserResult result = new HgBrowseCommand(cmdContext, repository).getBrowserResult(request); + BrowserResult result = new HgBrowseCommand(cmdContext).getBrowserResult(request); FileObject root = result.getFile(); Collection foList = root.getChildren(); @@ -217,7 +214,7 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase { request.setLimit(3); request.setRecursive(true); - FileObject root = new HgBrowseCommand(cmdContext, repository).getBrowserResult(request).getFile(); + FileObject root = new HgBrowseCommand(cmdContext).getBrowserResult(request).getFile(); Collection foList = root.getChildren(); @@ -240,7 +237,7 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase { request.setLimit(1); request.setRecursive(true); - FileObject root = new HgBrowseCommand(cmdContext, repository).getBrowserResult(request).getFile(); + FileObject root = new HgBrowseCommand(cmdContext).getBrowserResult(request).getFile(); Collection foList = root.getChildren(); @@ -263,7 +260,7 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase { request.setOffset(1); request.setRecursive(true); - FileObject root = new HgBrowseCommand(cmdContext, repository).getBrowserResult(request).getFile(); + FileObject root = new HgBrowseCommand(cmdContext).getBrowserResult(request).getFile(); Collection foList = root.getChildren(); @@ -299,8 +296,7 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase { } private Collection getRootFromTip(BrowseCommandRequest request) throws IOException { - BrowserResult result = new HgBrowseCommand(cmdContext, - repository).getBrowserResult(request); + BrowserResult result = new HgBrowseCommand(cmdContext).getBrowserResult(request); assertNotNull(result); diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgCatCommandTest.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgCatCommandTest.java index b27835f71a..e0a3538655 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgCatCommandTest.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgCatCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.junit.Ignore; @@ -77,7 +77,7 @@ public class HgCatCommandTest extends AbstractHgCommandTestBase { CatCommandRequest request = new CatCommandRequest(); request.setPath("b.txt"); - InputStream catResultStream = new HgCatCommand(cmdContext, repository).getCatResultStream(request); + InputStream catResultStream = new HgCatCommand(cmdContext).getCatResultStream(request); assertEquals('b', catResultStream.read()); assertEquals('\n', catResultStream.read()); @@ -88,7 +88,7 @@ public class HgCatCommandTest extends AbstractHgCommandTestBase { private String execute(CatCommandRequest request) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); - new HgCatCommand(cmdContext, repository).getCatResult(request, baos); + new HgCatCommand(cmdContext).getCatResult(request, baos); return baos.toString().trim(); } } diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgIncomingCommandTest.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgIncomingCommandTest.java index 263dbaee18..a128e23075 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgIncomingCommandTest.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgIncomingCommandTest.java @@ -121,6 +121,6 @@ public class HgIncomingCommandTest extends IncomingOutgoingTestBase return new HgIncomingCommand( new HgCommandContext( HgTestUtil.createHookManager(), handler, incomingRepository, - incomingDirectory), incomingRepository, handler); + incomingDirectory), handler); } } diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgLogCommandTest.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgLogCommandTest.java index 40af201511..d548ebf75e 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgLogCommandTest.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgLogCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -33,11 +33,10 @@ import sonia.scm.repository.Modifications; import java.io.IOException; -import static org.hamcrest.Matchers.contains; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; //~--- JDK imports ------------------------------------------------------------ @@ -154,7 +153,7 @@ public class HgLogCommandTest extends AbstractHgCommandTestBase assertEquals("Douglas Adams", c.getAuthor().getName()); assertEquals("douglas.adams@hitchhiker.com", c.getAuthor().getMail()); assertEquals("added a and b files", c.getDescription()); - ModificationsCommand modificationsCommand = new HgModificationsCommand(cmdContext, repository); + ModificationsCommand modificationsCommand = new HgModificationsCommand(cmdContext); Modifications modifications = modificationsCommand.getModifications(revision); assertNotNull(modifications); @@ -162,7 +161,9 @@ public class HgLogCommandTest extends AbstractHgCommandTestBase assertTrue("removed list should be empty", modifications.getRemoved().isEmpty()); assertFalse("added list should not be empty", modifications.getAdded().isEmpty()); assertEquals(2, modifications.getAdded().size()); - assertThat(modifications.getAdded(), contains("a.txt", "b.txt")); + assertThat(modifications.getAdded()) + .extracting("path") + .containsExactly("a.txt", "b.txt"); } @Test @@ -195,6 +196,6 @@ public class HgLogCommandTest extends AbstractHgCommandTestBase */ private HgLogCommand createComamnd() { - return new HgLogCommand(cmdContext, repository); + return new HgLogCommand(cmdContext); } } diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgModificationsCommandTest.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgModificationsCommandTest.java index 6b8c8faed0..914a063790 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgModificationsCommandTest.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgModificationsCommandTest.java @@ -21,11 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.aragost.javahg.Changeset; +import com.aragost.javahg.commands.CopyCommand; import com.aragost.javahg.commands.RemoveCommand; +import com.aragost.javahg.commands.RenameCommand; import org.junit.Before; import org.junit.Test; import sonia.scm.repository.HgTestUtil; @@ -34,7 +36,7 @@ import sonia.scm.repository.Modifications; import java.io.File; import java.util.function.Consumer; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class HgModificationsCommandTest extends IncomingOutgoingTestBase { @@ -44,7 +46,7 @@ public class HgModificationsCommandTest extends IncomingOutgoingTestBase { @Before public void init() { HgCommandContext outgoingContext = new HgCommandContext(HgTestUtil.createHookManager(), handler, outgoingRepository, outgoingDirectory); - outgoingModificationsCommand = new HgModificationsCommand(outgoingContext, outgoingRepository); + outgoingModificationsCommand = new HgModificationsCommand(outgoingContext); } @Test @@ -83,6 +85,31 @@ public class HgModificationsCommandTest extends IncomingOutgoingTestBase { assertModifications.accept(outgoingModificationsCommand.getModifications(revision)); } + @Test + public void shouldReadRenamedFiles() throws Exception { + String oldFileName = "a.txt"; + String newFileName = "b.txt"; + writeNewFile(outgoing, outgoingDirectory, oldFileName, "bal bla"); + commit(outgoing, "added a.txt"); + RenameCommand.on(outgoing).execute(oldFileName, newFileName); + Changeset changeset = commit(outgoing, "rename a.txt to b.txt"); + String revision = String.valueOf(changeset.getRevision()); + Consumer assertModifications = assertRenamedFiles(oldFileName, newFileName); + assertModifications.accept(outgoingModificationsCommand.getModifications(revision)); + } + + @Test + public void shouldReadCopiedFiles() throws Exception { + String srcFileName = "a.txt"; + String newFileName = "b.txt"; + writeNewFile(outgoing, outgoingDirectory, srcFileName, "bal bla"); + commit(outgoing, "added a.txt"); + CopyCommand.on(outgoing).execute(srcFileName, newFileName); + Changeset changeset = commit(outgoing, "copy a.txt to b.txt"); + String revision = String.valueOf(changeset.getRevision()); + Consumer assertModifications = assertCopiedFiles(srcFileName, newFileName); + assertModifications.accept(outgoingModificationsCommand.getModifications(revision)); + } Consumer assertRemovedFiles(String fileName) { return (modifications) -> { @@ -96,10 +123,66 @@ public class HgModificationsCommandTest extends IncomingOutgoingTestBase { assertThat(modifications.getRemoved()) .as("removed files modifications") .hasSize(1) + .extracting("path") .containsOnly(fileName); + assertThat(modifications.getRenamed()) + .as("renamed files modifications") + .isEmpty(); }; } + Consumer assertRenamedFiles(String oldFileName, String newFileName) { + return (modifications) -> { + assertThat(modifications).isNotNull(); + assertThat(modifications.getAdded()) + .as("added files modifications") + .hasSize(0); + assertThat(modifications.getModified()) + .as("modified files modifications") + .hasSize(0); + assertThat(modifications.getRemoved()) + .as("removed files modifications") + .isEmpty(); + assertThat(modifications.getRenamed()) + .as("renamed files modifications") + .hasSize(1) + .extracting("oldPath") + .containsOnly(oldFileName); + assertThat(modifications.getRenamed()) + .as("renamed files modifications") + .hasSize(1) + .extracting("newPath") + .containsOnly(newFileName); + }; + } + + Consumer assertCopiedFiles(String srcFileName, String newFileName) { + return (modifications) -> { + assertThat(modifications).isNotNull(); + assertThat(modifications.getAdded()) + .as("added files modifications") + .hasSize(0); + assertThat(modifications.getModified()) + .as("modified files modifications") + .hasSize(0); + assertThat(modifications.getRemoved()) + .as("removed files modifications") + .isEmpty(); + assertThat(modifications.getRenamed()) + .as("renamed files modifications") + .isEmpty(); + assertThat(modifications.getCopied()) + .as("copied files modifications") + .hasSize(1) + .extracting("sourcePath") + .containsOnly(srcFileName); + assertThat(modifications.getCopied()) + .as("copied files modifications") + .hasSize(1) + .extracting("targetPath") + .containsOnly(newFileName); + }; + } Consumer assertModifiedFiles(String file) { return (modifications) -> { @@ -110,10 +193,14 @@ public class HgModificationsCommandTest extends IncomingOutgoingTestBase { assertThat(modifications.getModified()) .as("modified files modifications") .hasSize(1) + .extracting("path") .containsOnly(file); assertThat(modifications.getRemoved()) .as("removed files modifications") .hasSize(0); + assertThat(modifications.getRenamed()) + .as("renamed files modifications") + .hasSize(0); }; } @@ -123,6 +210,7 @@ public class HgModificationsCommandTest extends IncomingOutgoingTestBase { assertThat(modifications.getAdded()) .as("added files modifications") .hasSize(1) + .extracting("path") .containsOnly(addedFile); assertThat(modifications.getModified()) .as("modified files modifications") @@ -130,6 +218,9 @@ public class HgModificationsCommandTest extends IncomingOutgoingTestBase { assertThat(modifications.getRemoved()) .as("removed files modifications") .hasSize(0); + assertThat(modifications.getRenamed()) + .as("renamed files modifications") + .hasSize(0); }; } } diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgOutgoingCommandTest.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgOutgoingCommandTest.java index 7e1a4513c4..192b425e6c 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgOutgoingCommandTest.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/HgOutgoingCommandTest.java @@ -117,6 +117,6 @@ public class HgOutgoingCommandTest extends IncomingOutgoingTestBase return new HgOutgoingCommand( new HgCommandContext( HgTestUtil.createHookManager(), handler, outgoingRepository, - outgoingDirectory), outgoingRepository, handler); + outgoingDirectory), handler); } } diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/IncomingOutgoingTestBase.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/IncomingOutgoingTestBase.java index fb026163ab..6162351148 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/IncomingOutgoingTestBase.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/IncomingOutgoingTestBase.java @@ -42,7 +42,6 @@ import sonia.scm.repository.HgConfig; import sonia.scm.repository.HgContext; import sonia.scm.repository.HgRepositoryHandler; import sonia.scm.repository.HgTestUtil; -import sonia.scm.repository.RepositoryPathNotFoundException; import sonia.scm.user.User; import sonia.scm.user.UserTestData; import sonia.scm.util.MockUtil; @@ -66,11 +65,10 @@ public abstract class IncomingOutgoingTestBase extends AbstractTestBase /** * Method description * - * * @throws IOException */ @Before - public void initHgHandler() throws IOException, RepositoryPathNotFoundException { + public void initHgHandler() throws IOException { HgRepositoryHandler temp = HgTestUtil.createHandler(tempFolder.newFolder()); HgTestUtil.checkForSkip(temp); diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/javahg/HgModificationParserTest.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/javahg/HgModificationParserTest.java new file mode 100644 index 0000000000..5c36134a0d --- /dev/null +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/repository/spi/javahg/HgModificationParserTest.java @@ -0,0 +1,82 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.repository.spi.javahg; + +import org.junit.jupiter.api.Test; +import sonia.scm.repository.Added; +import sonia.scm.repository.Copied; +import sonia.scm.repository.Modified; +import sonia.scm.repository.Removed; +import sonia.scm.repository.Renamed; + +import static org.assertj.core.api.Assertions.assertThat; + +class HgModificationParserTest { + + HgModificationParser parser = new HgModificationParser(); + + @Test + void shouldDetectAddedPath() { + parser.addLine("a added/file"); + + assertThat(parser.getModifications()) + .containsExactly(new Added("added/file")); + } + + @Test + void shouldDetectModifiedPath() { + parser.addLine("m modified/file"); + + assertThat(parser.getModifications()) + .containsExactly(new Modified("modified/file")); + } + + @Test + void shouldDetectRemovedPath() { + parser.addLine("d removed/file"); + + assertThat(parser.getModifications()) + .containsExactly(new Removed("removed/file")); + } + + @Test + void shouldDetectRenamedPath() { + parser.addLine("a new/path"); + parser.addLine("d old/path"); + parser.addLine("c old/path\0new/path"); + + assertThat(parser.getModifications()) + .containsExactly(new Renamed("old/path", "new/path")); + } + + @Test + void shouldCopiedRenamedPath() { + parser.addLine("a new/path"); + parser.addLine("c old/path\0new/path"); + + assertThat(parser.getModifications()) + .containsExactly(new Copied("old/path", "new/path")); + } +} diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/HgServletInputStreamTest.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/HgServletInputStreamTest.java index b1c2ed60cd..1f06ede4c1 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/HgServletInputStreamTest.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/HgServletInputStreamTest.java @@ -21,13 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.web; import com.google.common.base.Charsets; import com.google.common.io.ByteStreams; import org.junit.Test; +import javax.servlet.ReadListener; import javax.servlet.ServletInputStream; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -69,6 +70,20 @@ public class HgServletInputStreamTest { public int read() { return input.read(); } + + @Override + public boolean isFinished() { + return false; + } + + @Override + public boolean isReady() { + return false; + } + + @Override + public void setReadListener(ReadListener readListener) { + } } } diff --git a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/WireProtocolTest.java b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/WireProtocolTest.java index 80f4094d48..29bd1b41a2 100644 --- a/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/WireProtocolTest.java +++ b/scm-plugins/scm-hg-plugin/src/test/java/sonia/scm/web/WireProtocolTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.web; import com.google.common.base.Charsets; @@ -31,6 +31,7 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; +import javax.servlet.ReadListener; import javax.servlet.ServletInputStream; import javax.servlet.http.HttpServletRequest; import java.io.ByteArrayInputStream; @@ -181,6 +182,19 @@ public class WireProtocolTest { return input.read(); } + @Override + public boolean isFinished() { + return false; + } + + @Override + public boolean isReady() { + return false; + } + + @Override + public void setReadListener(ReadListener readListener) { + } } } diff --git a/scm-plugins/scm-legacy-plugin/pom.xml b/scm-plugins/scm-legacy-plugin/pom.xml index 46bc9d99f2..0010f81b11 100644 --- a/scm-plugins/scm-legacy-plugin/pom.xml +++ b/scm-plugins/scm-legacy-plugin/pom.xml @@ -36,9 +36,9 @@ Support migrated repository urls and v1 passwords 2.0.0-SNAPSHOT smp - + - + @@ -48,13 +48,6 @@ provided - - javax.ws.rs - jsr311-api - 1.1.1 - compile - - diff --git a/scm-plugins/scm-svn-plugin/pom.xml b/scm-plugins/scm-svn-plugin/pom.xml index 0a75769180..b8a011ef85 100644 --- a/scm-plugins/scm-svn-plugin/pom.xml +++ b/scm-plugins/scm-svn-plugin/pom.xml @@ -98,12 +98,6 @@ https://maven.tmatesoft.com/content/repositories/releases - - maven.scm-manager.org - scm-manager release repository - http://maven.scm-manager.org/nexus/content/groups/public - - diff --git a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/SvnUtil.java b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/SvnUtil.java index 58cc319e2a..26a851d1e2 100644 --- a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/SvnUtil.java +++ b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/SvnUtil.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository; //~--- non-JDK imports -------------------------------------------------------- @@ -49,7 +49,11 @@ import java.io.IOException; import java.io.PrintWriter; import java.util.List; import java.util.Map; +import java.util.Optional; +import java.util.stream.Collectors; +import static java.util.Collections.emptyList; +import static java.util.Optional.empty; import static sonia.scm.ContextEntry.ContextBuilder.entity; import static sonia.scm.NotFoundException.notFound; @@ -116,30 +120,23 @@ public final class SvnUtil public static Modifications createModifications(SVNLogEntry entry, String revision) { - Modifications modifications = new Modifications(); - modifications.setRevision(revision); Map changeMap = entry.getChangedPaths(); + List modificationList; if (Util.isNotEmpty(changeMap)) { - - for (SVNLogEntryPath e : changeMap.values()) { - appendModification(modifications, e.getType(), e.getPath()); - } + modificationList = changeMap.values().stream() + .map(e -> asModification(e.getType(), e.getPath())) + .filter(Optional::isPresent) + .map(Optional::get) + .collect(Collectors.toList()); + } else { + modificationList = emptyList(); } - return modifications; + + return new Modifications(revision, modificationList); } - /** - * Method description - * - * - * @param modifications - * @param type - * @param path - */ - public static void appendModification(Modifications modifications, char type, - String path) - { + public static Optional asModification(char type, String path) { if (path.startsWith("/")) { path = path.substring(1); @@ -148,23 +145,18 @@ public final class SvnUtil switch (type) { case SVNLogEntryPath.TYPE_ADDED : - modifications.getAdded().add(path); - - break; + return Optional.of(new Added(path)); case SVNLogEntryPath.TYPE_DELETED : - modifications.getRemoved().add(path); - - break; + return Optional.of(new Removed(path)); case TYPE_UPDATED : case SVNLogEntryPath.TYPE_MODIFIED : - modifications.getModified().add(path); - - break; + return Optional.of(new Modified(path)); default : logger.debug("unknown modification type {}", type); + return empty(); } } diff --git a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/AbstractSvnCommand.java b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/AbstractSvnCommand.java index e455b4eff3..3bf5dbcba5 100644 --- a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/AbstractSvnCommand.java +++ b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/AbstractSvnCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -44,13 +44,11 @@ public class AbstractSvnCommand * * * @param context - * @param repository - * @param repositoryDirectory */ - protected AbstractSvnCommand(SvnContext context, Repository repository) + protected AbstractSvnCommand(SvnContext context) { this.context = context; - this.repository = repository; + this.repository = context.getRepository(); } //~--- methods -------------------------------------------------------------- diff --git a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnBlameCommand.java b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnBlameCommand.java index 11e7d06876..b0361c7d04 100644 --- a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnBlameCommand.java +++ b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnBlameCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -37,7 +37,6 @@ import org.tmatesoft.svn.core.wc.SVNRevision; import sonia.scm.repository.BlameLine; import sonia.scm.repository.BlameResult; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.repository.SvnBlameHandler; import sonia.scm.util.Util; @@ -53,9 +52,9 @@ import java.util.List; public class SvnBlameCommand extends AbstractSvnCommand implements BlameCommand { - public SvnBlameCommand(SvnContext context, Repository repository) + public SvnBlameCommand(SvnContext context) { - super(context, repository); + super(context); } @Override diff --git a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnBrowseCommand.java b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnBrowseCommand.java index f4655fba5f..e96a933080 100644 --- a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnBrowseCommand.java +++ b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnBrowseCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -37,7 +37,6 @@ import org.tmatesoft.svn.core.SVNProperty; import org.tmatesoft.svn.core.io.SVNRepository; import sonia.scm.repository.BrowserResult; import sonia.scm.repository.FileObject; -import sonia.scm.repository.Repository; import sonia.scm.repository.SubRepository; import sonia.scm.repository.SvnUtil; import sonia.scm.util.Util; @@ -70,9 +69,9 @@ public class SvnBrowseCommand extends AbstractSvnCommand private int resultCount = 0; - SvnBrowseCommand(SvnContext context, Repository repository) + SvnBrowseCommand(SvnContext context) { - super(context, repository); + super(context); } @Override diff --git a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnBundleCommand.java b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnBundleCommand.java index d67e8b1423..9537bee326 100644 --- a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnBundleCommand.java +++ b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnBundleCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -32,7 +32,6 @@ import org.tmatesoft.svn.core.SVNException; import org.tmatesoft.svn.core.wc.SVNClientManager; import org.tmatesoft.svn.core.wc.SVNRevision; import org.tmatesoft.svn.core.wc.admin.SVNAdminClient; -import sonia.scm.repository.Repository; import sonia.scm.repository.SvnUtil; import sonia.scm.repository.api.BundleResponse; @@ -52,9 +51,9 @@ public class SvnBundleCommand extends AbstractSvnCommand implements BundleCommand { - public SvnBundleCommand(SvnContext context, Repository repository) + public SvnBundleCommand(SvnContext context) { - super(context, repository); + super(context); } private static void dump(SVNAdminClient adminClient, File repository, diff --git a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnCatCommand.java b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnCatCommand.java index e0676f130c..010fb7f73e 100644 --- a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnCatCommand.java +++ b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnCatCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -35,7 +35,6 @@ import org.tmatesoft.svn.core.io.SVNRepository; import org.tmatesoft.svn.core.wc.SVNClientManager; import org.tmatesoft.svn.core.wc.admin.SVNLookClient; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.repository.SvnUtil; import java.io.ByteArrayInputStream; @@ -63,9 +62,9 @@ public class SvnCatCommand extends AbstractSvnCommand implements CatCommand //~--- constructors --------------------------------------------------------- - SvnCatCommand(SvnContext context, Repository repository) + SvnCatCommand(SvnContext context) { - super(context, repository); + super(context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnDiffCommand.java b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnDiffCommand.java index 4f8ce79a95..e1746f0e1e 100644 --- a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnDiffCommand.java +++ b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnDiffCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -37,7 +37,6 @@ import org.tmatesoft.svn.core.wc.SVNClientManager; import org.tmatesoft.svn.core.wc.SVNDiffClient; import org.tmatesoft.svn.core.wc.SVNRevision; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.repository.SvnUtil; import sonia.scm.repository.api.DiffCommandBuilder; import sonia.scm.repository.api.DiffFormat; @@ -57,8 +56,8 @@ public class SvnDiffCommand extends AbstractSvnCommand implements DiffCommand { private static final Logger logger = LoggerFactory.getLogger(SvnDiffCommand.class); - public SvnDiffCommand(SvnContext context, Repository repository) { - super(context, repository); + public SvnDiffCommand(SvnContext context) { + super(context); } @Override diff --git a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnLogCommand.java b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnLogCommand.java index 8fe4b3f883..35f5ec1fec 100644 --- a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnLogCommand.java +++ b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnLogCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -37,7 +37,6 @@ import org.tmatesoft.svn.core.io.SVNRepository; import sonia.scm.repository.Changeset; import sonia.scm.repository.ChangesetPagingResult; import sonia.scm.repository.InternalRepositoryException; -import sonia.scm.repository.Repository; import sonia.scm.repository.SvnUtil; import sonia.scm.util.Util; @@ -57,9 +56,9 @@ public class SvnLogCommand extends AbstractSvnCommand implements LogCommand private static final Logger logger = LoggerFactory.getLogger(SvnLogCommand.class); - SvnLogCommand(SvnContext context, Repository repository) + SvnLogCommand(SvnContext context) { - super(context, repository); + super(context); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnModificationsCommand.java b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnModificationsCommand.java index 578a523d21..8daebf9245 100644 --- a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnModificationsCommand.java +++ b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnModificationsCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import lombok.extern.slf4j.Slf4j; @@ -31,18 +31,19 @@ import org.tmatesoft.svn.core.io.SVNRepository; import org.tmatesoft.svn.core.wc.SVNClientManager; import org.tmatesoft.svn.core.wc.admin.SVNLookClient; import sonia.scm.repository.InternalRepositoryException; +import sonia.scm.repository.Modification; import sonia.scm.repository.Modifications; -import sonia.scm.repository.Repository; import sonia.scm.repository.SvnUtil; import sonia.scm.util.Util; +import java.util.ArrayList; import java.util.Collection; @Slf4j public class SvnModificationsCommand extends AbstractSvnCommand implements ModificationsCommand { - SvnModificationsCommand(SvnContext context, Repository repository) { - super(context, repository); + SvnModificationsCommand(SvnContext context) { + super(context); } @Override @@ -79,12 +80,12 @@ public class SvnModificationsCommand extends AbstractSvnCommand implements Modif private Modifications getModificationsFromTransaction(String transaction) throws SVNException { log.debug("get svn modifications from transaction: {}", transaction); - final Modifications modifications = new Modifications(); SVNLookClient client = SVNClientManager.newInstance().getLookClient(); + Collection modificationList = new ArrayList<>(); client.doGetChanged(context.getDirectory(), transaction, - e -> SvnUtil.appendModification(modifications, e.getType(), e.getPath()), true); + e -> SvnUtil.asModification(e.getType(), e.getPath()).ifPresent(modificationList::add), true); - return modifications; + return new Modifications(null, modificationList); } @Override diff --git a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnModifyCommand.java b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnModifyCommand.java index 8df3f14de9..1c7b8db5e7 100644 --- a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnModifyCommand.java +++ b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnModifyCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.apache.shiro.SecurityUtils; @@ -46,9 +46,9 @@ public class SvnModifyCommand implements ModifyCommand { private SvnWorkDirFactory workDirFactory; private Repository repository; - SvnModifyCommand(SvnContext context, Repository repository, SvnWorkDirFactory workDirFactory) { + SvnModifyCommand(SvnContext context, SvnWorkDirFactory workDirFactory) { this.context = context; - this.repository = repository; + this.repository = context.getRepository(); this.workDirFactory = workDirFactory; } diff --git a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnRepositoryServiceProvider.java b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnRepositoryServiceProvider.java index 9043332b21..65879834aa 100644 --- a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnRepositoryServiceProvider.java +++ b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnRepositoryServiceProvider.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import com.google.common.collect.ImmutableSet; @@ -45,7 +45,7 @@ public class SvnRepositoryServiceProvider extends RepositoryServiceProvider /** Field description */ //J- public static final Set COMMANDS = ImmutableSet.of( - Command.BLAME, Command.BROWSE, Command.CAT, Command.DIFF, + Command.BLAME, Command.BROWSE, Command.CAT, Command.DIFF, Command.LOG, Command.BUNDLE, Command.UNBUNDLE, Command.MODIFY ); //J+ @@ -56,7 +56,6 @@ public class SvnRepositoryServiceProvider extends RepositoryServiceProvider SvnRepositoryServiceProvider(SvnRepositoryHandler handler, Repository repository, SvnWorkDirFactory workdirFactory) { - this.repository = repository; this.context = new SvnContext(repository, handler.getDirectory(repository.getId())); this.workDirFactory = workdirFactory; } @@ -86,7 +85,7 @@ public class SvnRepositoryServiceProvider extends RepositoryServiceProvider @Override public SvnBlameCommand getBlameCommand() { - return new SvnBlameCommand(context, repository); + return new SvnBlameCommand(context); } /** @@ -98,7 +97,7 @@ public class SvnRepositoryServiceProvider extends RepositoryServiceProvider @Override public SvnBrowseCommand getBrowseCommand() { - return new SvnBrowseCommand(context, repository); + return new SvnBrowseCommand(context); } /** @@ -110,7 +109,7 @@ public class SvnRepositoryServiceProvider extends RepositoryServiceProvider @Override public BundleCommand getBundleCommand() { - return new SvnBundleCommand(context, repository); + return new SvnBundleCommand(context); } /** @@ -122,7 +121,7 @@ public class SvnRepositoryServiceProvider extends RepositoryServiceProvider @Override public SvnCatCommand getCatCommand() { - return new SvnCatCommand(context, repository); + return new SvnCatCommand(context); } /** @@ -134,7 +133,7 @@ public class SvnRepositoryServiceProvider extends RepositoryServiceProvider @Override public SvnDiffCommand getDiffCommand() { - return new SvnDiffCommand(context, repository); + return new SvnDiffCommand(context); } /** @@ -146,15 +145,15 @@ public class SvnRepositoryServiceProvider extends RepositoryServiceProvider @Override public SvnLogCommand getLogCommand() { - return new SvnLogCommand(context, repository); + return new SvnLogCommand(context); } public ModificationsCommand getModificationsCommand() { - return new SvnModificationsCommand(context, repository); + return new SvnModificationsCommand(context); } public ModifyCommand getModifyCommand() { - return new SvnModifyCommand(context, repository, workDirFactory); + return new SvnModifyCommand(context, workDirFactory); } /** @@ -178,7 +177,7 @@ public class SvnRepositoryServiceProvider extends RepositoryServiceProvider @Override public UnbundleCommand getUnbundleCommand() { - return new SvnUnbundleCommand(context, repository); + return new SvnUnbundleCommand(context); } //~--- fields --------------------------------------------------------------- @@ -186,8 +185,5 @@ public class SvnRepositoryServiceProvider extends RepositoryServiceProvider /** Field description */ private final SvnContext context; - /** Field description */ - private final Repository repository; - private final SvnWorkDirFactory workDirFactory; } diff --git a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnUnbundleCommand.java b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnUnbundleCommand.java index f1213ba11a..973c93fea3 100644 --- a/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnUnbundleCommand.java +++ b/scm-plugins/scm-svn-plugin/src/main/java/sonia/scm/repository/spi/SvnUnbundleCommand.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -36,7 +36,6 @@ import org.tmatesoft.svn.core.SVNException; import org.tmatesoft.svn.core.wc.SVNClientManager; import org.tmatesoft.svn.core.wc.admin.SVNAdminClient; -import sonia.scm.repository.Repository; import sonia.scm.repository.SvnUtil; import sonia.scm.repository.api.UnbundleResponse; @@ -65,13 +64,12 @@ public class SvnUnbundleCommand extends AbstractSvnCommand /** * Constructs ... * + * @param context * - * @param context - * @param repository */ - public SvnUnbundleCommand(SvnContext context, Repository repository) + public SvnUnbundleCommand(SvnContext context) { - super(context, repository); + super(context); } //~--- methods -------------------------------------------------------------- diff --git a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnBlameCommandTest.java b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnBlameCommandTest.java index 9b87113b7d..e3b09899e1 100644 --- a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnBlameCommandTest.java +++ b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnBlameCommandTest.java @@ -110,6 +110,6 @@ public class SvnBlameCommandTest extends AbstractSvnCommandTestBase */ private SvnBlameCommand createCommand() { - return new SvnBlameCommand(createContext(), repository); + return new SvnBlameCommand(createContext()); } } diff --git a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnBrowseCommandTest.java b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnBrowseCommandTest.java index 50d3a03976..3d3a3131e5 100644 --- a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnBrowseCommandTest.java +++ b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnBrowseCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.junit.Test; @@ -268,7 +268,7 @@ public class SvnBrowseCommandTest extends AbstractSvnCommandTestBase */ private SvnBrowseCommand createCommand() { - return new SvnBrowseCommand(createContext(), repository); + return new SvnBrowseCommand(createContext()); } //~--- get methods ---------------------------------------------------------- diff --git a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnBundleCommandTest.java b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnBundleCommandTest.java index 12f23bdb9d..3c8e125165 100644 --- a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnBundleCommandTest.java +++ b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnBundleCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -57,8 +57,7 @@ public class SvnBundleCommandTest extends AbstractSvnCommandTestBase File file = temp.newFile(); ByteSink sink = Files.asByteSink(file); BundleCommandRequest req = new BundleCommandRequest(sink); - BundleResponse res = new SvnBundleCommand(createContext(), - repository).bundle(req); + BundleResponse res = new SvnBundleCommand(createContext()).bundle(req); assertThat(res, notNullValue()); assertThat(res.getChangesetCount(), is(5l)); diff --git a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnCatCommandTest.java b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnCatCommandTest.java index 1037939dc6..26616f53df 100644 --- a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnCatCommandTest.java +++ b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnCatCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.hamcrest.BaseMatcher; @@ -111,7 +111,7 @@ public class SvnCatCommandTest extends AbstractSvnCommandTestBase { request.setPath("a.txt"); request.setRevision("1"); - InputStream catResultStream = new SvnCatCommand(createContext(), repository).getCatResultStream(request); + InputStream catResultStream = new SvnCatCommand(createContext()).getCatResultStream(request); assertEquals('a', catResultStream.read()); assertEquals('\n', catResultStream.read()); @@ -126,8 +126,7 @@ public class SvnCatCommandTest extends AbstractSvnCommandTestBase { try { - new SvnCatCommand(createContext(), repository).getCatResult(request, - baos); + new SvnCatCommand(createContext()).getCatResult(request, baos); } finally { diff --git a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnLogCommandTest.java b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnLogCommandTest.java index 0c5a9a2483..cab001573b 100644 --- a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnLogCommandTest.java +++ b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnLogCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -136,15 +136,15 @@ public class SvnLogCommandTest extends AbstractSvnCommandTestBase checkDate(c.getDate()); assertEquals("perfect", c.getAuthor().getName()); assertNull("douglas.adams@hitchhiker.com", c.getAuthor().getMail()); - SvnModificationsCommand modificationsCommand = new SvnModificationsCommand(createContext(), repository); + SvnModificationsCommand modificationsCommand = new SvnModificationsCommand(createContext()); Modifications modifications = modificationsCommand.getModifications("3"); assertNotNull(modifications); assertEquals(1, modifications.getModified().size()); assertEquals(1, modifications.getRemoved().size()); assertTrue("added list should be empty", modifications.getAdded().isEmpty()); - assertEquals("a.txt", modifications.getModified().get(0)); - assertEquals("b.txt", modifications.getRemoved().get(0)); + assertEquals("a.txt", modifications.getModified().get(0).getPath()); + assertEquals("b.txt", modifications.getRemoved().get(0).getPath()); } @Test @@ -177,6 +177,6 @@ public class SvnLogCommandTest extends AbstractSvnCommandTestBase */ private SvnLogCommand createCommand() { - return new SvnLogCommand(createContext(), repository); + return new SvnLogCommand(createContext()); } } diff --git a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnModifyCommandTest.java b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnModifyCommandTest.java index 7f0f1eb00d..533e012dc3 100644 --- a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnModifyCommandTest.java +++ b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnModifyCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; import org.apache.shiro.subject.Subject; @@ -57,7 +57,7 @@ public class SvnModifyCommandTest extends AbstractSvnCommandTestBase { public void initSvnModifyCommand() { context = createContext(); workDirFactory = new SimpleSvnWorkDirFactory(new WorkdirProvider(context.getDirectory())); - svnModifyCommand = new SvnModifyCommand(context, createRepository(), workDirFactory); + svnModifyCommand = new SvnModifyCommand(context, workDirFactory); } @Before diff --git a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnUnbundleCommandTest.java b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnUnbundleCommandTest.java index 9556c7032c..6fc214eec8 100644 --- a/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnUnbundleCommandTest.java +++ b/scm-plugins/scm-svn-plugin/src/test/java/sonia/scm/repository/spi/SvnUnbundleCommandTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.repository.spi; //~--- non-JDK imports -------------------------------------------------------- @@ -57,13 +57,8 @@ public class SvnUnbundleCommandTest extends AbstractSvnCommandTestBase File bundle = bundle(); SvnContext ctx = createEmptyContext(); //J- - UnbundleResponse res = new SvnUnbundleCommand( - ctx, - repository - ).unbundle( - new UnbundleCommandRequest( - Files.asByteSource(bundle) - ) + UnbundleResponse res = new SvnUnbundleCommand(ctx) + .unbundle(new UnbundleCommandRequest(Files.asByteSource(bundle)) ); //J+ @@ -81,13 +76,8 @@ public class SvnUnbundleCommandTest extends AbstractSvnCommandTestBase File file = tempFolder.newFile(); //J- - new SvnBundleCommand( - createContext(), - repository - ).bundle( - new BundleCommandRequest( - Files.asByteSink(file) - ) + new SvnBundleCommand(createContext()) + .bundle(new BundleCommandRequest(Files.asByteSink(file)) ); //J+ diff --git a/scm-test/pom.xml b/scm-test/pom.xml index a24e048f55..f73082968f 100644 --- a/scm-test/pom.xml +++ b/scm-test/pom.xml @@ -87,6 +87,17 @@ ${resteasy.version}
+ + org.jboss.resteasy + resteasy-validator-provider + ${resteasy.version} + + + org.glassfish + javax.el + 3.0.1-b11 + + org.slf4j slf4j-simple diff --git a/scm-test/src/main/java/sonia/scm/store/SerializationTestUtil.java b/scm-test/src/main/java/sonia/scm/store/SerializationTestUtil.java new file mode 100644 index 0000000000..7f785186ab --- /dev/null +++ b/scm-test/src/main/java/sonia/scm/store/SerializationTestUtil.java @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.store; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import javax.xml.bind.JAXB; +import java.io.StringReader; +import java.io.StringWriter; + +public class SerializationTestUtil { + + public static T toAndFromJson(Class clazz, T input) throws JsonProcessingException { + final ObjectMapper objectMapper = new ObjectMapper(); + final String json = objectMapper.writeValueAsString(input); + return objectMapper.readValue(json, clazz); + } + + public static T toAndFromXml(Class clazz, T input) { + final StringWriter xmlWriter = new StringWriter(); + JAXB.marshal(input, xmlWriter); + final StringReader xmlReader = new StringReader(xmlWriter.toString()); + return JAXB.unmarshal(xmlReader, clazz); + } + + public static T toAndFromJsonAndXml(Class clazz, T input) throws JsonProcessingException { + return toAndFromXml(clazz, toAndFromJson(clazz, input)); + } +} diff --git a/scm-ui/ui-components/src/BranchSelector.stories.tsx b/scm-ui/ui-components/src/BranchSelector.stories.tsx new file mode 100644 index 0000000000..5abc1a2202 --- /dev/null +++ b/scm-ui/ui-components/src/BranchSelector.stories.tsx @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +import { storiesOf } from "@storybook/react"; +import { BranchSelector } from "./index"; +import { Branch } from "@scm-manager/ui-types/src"; +import * as React from "react"; +import styled from "styled-components"; + +const master = { name: "master", revision: "1", defaultBranch: true, _links: {} }; +const develop = { name: "develop", revision: "2", defaultBranch: false, _links: {} }; + +const branchSelected = (branch?: Branch) => {}; + +const branches = [master, develop]; + +const Wrapper = styled.div` + margin: 2rem; + max-width: 400px; +`; + +storiesOf("BranchSelector", module) + .addDecorator(storyFn => {storyFn()}) + .add("Default", () => ( + +)); diff --git a/scm-ui/ui-components/src/Breadcrumb.stories.tsx b/scm-ui/ui-components/src/Breadcrumb.stories.tsx new file mode 100644 index 0000000000..d832081d8d --- /dev/null +++ b/scm-ui/ui-components/src/Breadcrumb.stories.tsx @@ -0,0 +1,57 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +import { storiesOf } from "@storybook/react"; +import * as React from "react"; +import styled from "styled-components"; +import Breadcrumb from "./Breadcrumb"; +import repository from "./__resources__/repository"; +// @ts-ignore ignore unknown png +import Git from "./__resources__/git-logo.png"; +import { MemoryRouter } from "react-router-dom"; + +const Wrapper = styled.div` + margin: 2rem; + max-width: 800px; +`; + +const master = { name: "master", revision: "1", defaultBranch: true, _links: {} }; +const path = "src/main/java/com/cloudogu"; +const baseUrl = "scm-manager.org/scm/repo/hitchhiker/heartOfGold/sources"; +const sources = Git; + +storiesOf("BreadCrumb", module) + .addDecorator(story => {story()}) + .addDecorator(storyFn => {storyFn()}) + .add("Default", () => ( + + )); diff --git a/scm-ui/ui-components/src/Breadcrumb.tsx b/scm-ui/ui-components/src/Breadcrumb.tsx index 05fecaff99..75142a2af8 100644 --- a/scm-ui/ui-components/src/Breadcrumb.tsx +++ b/scm-ui/ui-components/src/Breadcrumb.tsx @@ -59,24 +59,23 @@ class Breadcrumb extends React.Component { if (path) { const paths = path.split("/"); - const map = paths.map((path, index) => { + return paths.map((pathFragment, index) => { const currPath = paths.slice(0, index + 1).join("/"); if (paths.length - 1 === index) { return (
  • - {path} + {pathFragment}
  • ); } return (
  • - {path} + {pathFragment}
  • ); }); - return map; } return null; } diff --git a/scm-ui/ui-components/src/MarkdownLinkRenderer.test.tsx b/scm-ui/ui-components/src/MarkdownLinkRenderer.test.tsx new file mode 100644 index 0000000000..7a5b8e68dc --- /dev/null +++ b/scm-ui/ui-components/src/MarkdownLinkRenderer.test.tsx @@ -0,0 +1,123 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ +import { isAnchorLink, isExternalLink, isLinkWithProtocol, createLocalLink } from "./MarkdownLinkRenderer"; + +describe("test isAnchorLink", () => { + it("should return true", () => { + expect(isAnchorLink("#some-thing")).toBe(true); + expect(isAnchorLink("#/some/more/complicated-link")).toBe(true); + }); + + it("should return false", () => { + expect(isAnchorLink("https://cloudogu.com")).toBe(false); + expect(isAnchorLink("/some/path/link")).toBe(false); + }); +}); + +describe("test isExternalLink", () => { + it("should return true", () => { + expect(isExternalLink("https://cloudogu.com")).toBe(true); + expect(isExternalLink("http://cloudogu.com")).toBe(true); + }); + + it("should return false", () => { + expect(isExternalLink("some/path/link")).toBe(false); + expect(isExternalLink("/some/path/link")).toBe(false); + expect(isExternalLink("#some-anchor")).toBe(false); + expect(isExternalLink("mailto:trillian@hitchhiker.com")).toBe(false); + }); +}); + +describe("test isLinkWithProtocol", () => { + it("should return true", () => { + expect(isLinkWithProtocol("ldap://[2001:db8::7]/c=GB?objectClass?one")).toBe(true); + expect(isLinkWithProtocol("mailto:trillian@hitchhiker.com")).toBe(true); + expect(isLinkWithProtocol("tel:+1-816-555-1212")).toBe(true); + expect(isLinkWithProtocol("urn:oasis:names:specification:docbook:dtd:xml:4.1.2")).toBe(true); + expect(isLinkWithProtocol("about:config")).toBe(true); + expect(isLinkWithProtocol("http://cloudogu.com")).toBe(true); + expect(isLinkWithProtocol("file:///srv/git/project.git")).toBe(true); + expect(isLinkWithProtocol("ssh://trillian@server/project.git")).toBe(true); + }); + it("should return false", () => { + expect(isLinkWithProtocol("some/path/link")).toBe(false); + expect(isLinkWithProtocol("/some/path/link")).toBe(false); + expect(isLinkWithProtocol("#some-anchor")).toBe(false); + }); +}); + +describe("test createLocalLink", () => { + it("should handle relative links", () => { + expectLocalLink("/src", "/src/README.md", "docs/Home.md", "/src/docs/Home.md"); + }); + + it("should handle absolute links", () => { + expectLocalLink("/src", "/src/README.md", "/docs/CHANGELOG.md", "/src/docs/CHANGELOG.md"); + }); + + it("should handle relative links from locations with trailing slash", () => { + expectLocalLink("/src", "/src/README.md/", "/docs/LICENSE.md", "/src/docs/LICENSE.md"); + }); + + it("should handle relative links from location outside of base", () => { + expectLocalLink("/src", "/info/readme", "docs/index.md", "/src/docs/index.md"); + }); + + it("should handle absolute links from location outside of base", () => { + expectLocalLink("/src", "/info/readme", "/info/index.md", "/src/info/index.md"); + }); + + it("should handle relative links from sub directories", () => { + expectLocalLink("/src", "/src/docs/index.md", "installation/linux.md", "/src/docs/installation/linux.md"); + }); + + it("should handle absolute links from sub directories", () => { + expectLocalLink("/src", "/src/docs/index.md", "/docs/CONTRIBUTIONS.md", "/src/docs/CONTRIBUTIONS.md"); + }); + + it("should resolve .. with in path", () => { + expectLocalLink("/src", "/src/docs/installation/index.md", "../../README.md", "/src/README.md"); + }); + + it("should resolve .. to / if we reached the end", () => { + expectLocalLink("/", "/index.md", "../../README.md", "/README.md"); + }); + + it("should resolve . with in path", () => { + expectLocalLink("/src", "/src/README.md", "./SHAPESHIPS.md", "/src/SHAPESHIPS.md"); + }); + + it("should resolve . with the current directory", () => { + expectLocalLink("/", "/README.md", "././HITCHHIKER.md", "/HITCHHIKER.md"); + }); + + it("should handle complex path", () => { + expectLocalLink("/src", "/src/docs/installation/index.md", "./.././../docs/index.md", "/src/docs/index.md"); + }); + + const expectLocalLink = (basePath: string, currentPath: string, link: string, expected: string) => { + const localLink = createLocalLink(basePath, currentPath, link); + expect(localLink).toBe(expected); + }; +}); diff --git a/scm-ui/ui-components/src/MarkdownLinkRenderer.tsx b/scm-ui/ui-components/src/MarkdownLinkRenderer.tsx new file mode 100644 index 0000000000..8ae1bc6135 --- /dev/null +++ b/scm-ui/ui-components/src/MarkdownLinkRenderer.tsx @@ -0,0 +1,125 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ +import React, {FC} from "react"; +import {Link, useLocation} from "react-router-dom"; +import ExternalLink from "./navigation/ExternalLink"; +import {withContextPath} from "./urls"; + +const externalLinkRegex = new RegExp("^http(s)?://"); +export const isExternalLink = (link: string) => { + return externalLinkRegex.test(link); +}; + +export const isAnchorLink = (link: string) => { + return link.startsWith("#"); +}; + +const linkWithProtcolRegex = new RegExp("^[a-z]+:"); +export const isLinkWithProtocol = (link: string) => { + return linkWithProtcolRegex.test(link); +}; + +const join = (left: string, right: string) => { + if (left.endsWith("/") && right.startsWith("/")) { + return left + right.substring(1); + } else if (!left.endsWith("/") && !right.startsWith("/")) { + return left + "/" + right; + } + return left + right; +}; + +const normalizePath = (path: string) => { + const stack = []; + const parts = path.split("/"); + for (const part of parts) { + if (part === "..") { + stack.pop(); + } else if (part !== ".") { + stack.push(part) + } + } + const normalizedPath = stack.join("/") + if (normalizedPath.startsWith("/")) { + return normalizedPath; + } + return "/" + normalizedPath; +}; + +const isAbsolute = (link: string) => { + return link.startsWith("/"); +}; + +const isSubDirectoryOf = (basePath: string, currentPath: string) => { + return currentPath.startsWith(basePath); +}; + +export const createLocalLink = (basePath: string, currentPath: string, link: string) => { + if (isAbsolute(link)) { + return join(basePath, link); + } + if (!isSubDirectoryOf(basePath, currentPath)) { + return join(basePath, link); + } + let path = currentPath; + if (currentPath.endsWith("/")) { + path = currentPath.substring(0, currentPath.length - 2); + } + const lastSlash = path.lastIndexOf("/"); + if (lastSlash < 0) { + path = ""; + } else { + path = path.substring(0, lastSlash); + } + return normalizePath(join(path, link)); +}; + +type LinkProps = { + href: string; +}; + +type Props = LinkProps & { + base: string; +}; + +const MarkdownLinkRenderer: FC = ({href, base, children}) => { + const location = useLocation(); + if (isExternalLink(href)) { + return {children}; + } else if (isLinkWithProtocol(href)) { + return {children}; + } else if (isAnchorLink(href)) { + return {children}; + } else { + const localLink = createLocalLink(base, location.pathname, href); + return {children}; + } +}; + +// we use a factory method, because react-markdown does not pass +// base as prop down to our link component. +export const create = (base: string): FC => { + return props => ; +}; + +export default MarkdownLinkRenderer; diff --git a/scm-ui/ui-components/src/MarkdownView.stories.tsx b/scm-ui/ui-components/src/MarkdownView.stories.tsx index e43f9afd75..2c2e1cc9f4 100644 --- a/scm-ui/ui-components/src/MarkdownView.stories.tsx +++ b/scm-ui/ui-components/src/MarkdownView.stories.tsx @@ -30,6 +30,7 @@ import TestPage from "./__resources__/test-page.md"; import MarkdownWithoutLang from "./__resources__/markdown-without-lang.md"; import MarkdownXmlCodeBlock from "./__resources__/markdown-xml-codeblock.md"; import MarkdownInlineXml from "./__resources__/markdown-inline-xml.md"; +import MarkdownLinks from "./__resources__/markdown-links.md"; import Title from "./layout/Title"; import { Subtitle } from "./layout"; import { MemoryRouter } from "react-router-dom"; @@ -50,4 +51,5 @@ storiesOf("MarkdownView", module) - )); + )) + .add("Links", () => ); diff --git a/scm-ui/ui-components/src/MarkdownView.tsx b/scm-ui/ui-components/src/MarkdownView.tsx index d1ef3008c2..546d1610a6 100644 --- a/scm-ui/ui-components/src/MarkdownView.tsx +++ b/scm-ui/ui-components/src/MarkdownView.tsx @@ -29,6 +29,7 @@ import { binder } from "@scm-manager/ui-extensions"; import ErrorBoundary from "./ErrorBoundary"; import SyntaxHighlighter from "./SyntaxHighlighter"; import MarkdownHeadingRenderer from "./MarkdownHeadingRenderer"; +import { create } from "./MarkdownLinkRenderer"; import { useTranslation } from "react-i18next"; import Notification from "./Notification"; @@ -38,6 +39,8 @@ type Props = RouteComponentProps & { renderers?: any; skipHtml?: boolean; enableAnchorHeadings?: boolean; + // basePath for markdown links + basePath?: string; }; const xmlMarkupSample = `\`\`\`xml @@ -97,7 +100,7 @@ class MarkdownView extends React.Component { } render() { - const { content, renderers, renderContext, enableAnchorHeadings, skipHtml } = this.props; + const { content, renderers, renderContext, enableAnchorHeadings, skipHtml, basePath } = this.props; const rendererFactory = binder.getExtension("markdown-renderer-factory"); let rendererList = renderers; @@ -114,6 +117,10 @@ class MarkdownView extends React.Component { rendererList.heading = MarkdownHeadingRenderer; } + if (basePath && !rendererList.link) { + rendererList.link = create(basePath); + } + if (!rendererList.code) { rendererList.code = SyntaxHighlighter; } diff --git a/scm-ui/ui-components/src/Notification.stories.tsx b/scm-ui/ui-components/src/Notification.stories.tsx new file mode 100644 index 0000000000..efce4ee6c5 --- /dev/null +++ b/scm-ui/ui-components/src/Notification.stories.tsx @@ -0,0 +1,71 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +import styled from "styled-components"; +import * as React from "react"; +import { ReactNode, useState } from "react"; +import { MemoryRouter } from "react-router-dom"; +import { storiesOf } from "@storybook/react"; +import Notification from "./Notification"; + +const Wrapper = styled.div` + margin: 2rem; + max-width: 400px; +`; + +const content = + "Cleverness nuclear genuine static irresponsibility invited President Zaphod\n" + + "Beeblebrox hyperspace ship. Another custard through computer-generated universe\n" + + "shapes field strong disaster parties Russell’s ancestors infinite colour\n" + + "imaginative generator sweep."; + +const RoutingDecorator = (story: () => ReactNode) => {story()}; + +storiesOf("Notification", module) + .addDecorator(RoutingDecorator) + .addDecorator(storyFn => {storyFn()}) + .add("Primary", () => {content}) + .add("Success", () => {content}) + .add("Info", () => {content}) + .add("Warning", () => {content}) + .add("Danger", () => {content}) + .add("Closeable", () => ); + +const Closeable = () => { + const [show, setShow] = useState(true); + + const hide = () => { + setShow(false); + }; + + if (!show) { + return null; + } + + return ( + hide()}> + {content} + + ); +}; diff --git a/scm-ui/ui-components/src/Tag.stories.tsx b/scm-ui/ui-components/src/Tag.stories.tsx new file mode 100644 index 0000000000..1c5c51497a --- /dev/null +++ b/scm-ui/ui-components/src/Tag.stories.tsx @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +import styled from "styled-components"; +import { storiesOf } from "@storybook/react"; +import * as React from "react"; +import Tag from "./Tag"; +import { ReactNode } from "react"; +import { MemoryRouter } from "react-router-dom"; + +const Wrapper = styled.div` + margin: 2rem; + max-width: 400px; +`; + +const Spacing = styled.div` + padding: 1em; +`; + +const colors = ["primary", "link", "info", "success", "warning", "danger"]; + +const RoutingDecorator = (story: () => ReactNode) => {story()}; + +storiesOf("Tag", module) + .addDecorator(RoutingDecorator) + .addDecorator(storyFn => {storyFn()}) + .add("Default", () => ) + .add("With Icon", () => ) + .add("Colors", () => ( +
    + {colors.map(color => ( + + + + ))} +
    + )) + .add("With title", () => ) + .add("Clickable", () => alert("Not so fast")}/>); diff --git a/scm-ui/ui-components/src/Tooltip.stories.tsx b/scm-ui/ui-components/src/Tooltip.stories.tsx new file mode 100644 index 0000000000..f6f4cbad5b --- /dev/null +++ b/scm-ui/ui-components/src/Tooltip.stories.tsx @@ -0,0 +1,61 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +import styled from "styled-components"; +import * as React from "react"; +import { ReactNode } from "react"; +import { MemoryRouter } from "react-router-dom"; +import { storiesOf } from "@storybook/react"; +import Tooltip from "./Tooltip"; +import Button from "./buttons/Button"; + +const Wrapper = styled.div` + margin: 2rem; + max-width: 400px; +`; + +const Spacing = styled.div` + padding: 2em 6em; +`; + +const positions = ["right", "top", "left", "bottom"]; + +const message = "Heart of Gold"; + +const RoutingDecorator = (story: () => ReactNode) => {story()}; + +storiesOf("Tooltip", module) + .addDecorator(RoutingDecorator) + .addDecorator(storyFn => {storyFn()}) + .add("Default", () => ( +
    + {positions.map(position => ( + + +
    + )); diff --git a/scm-ui/ui-components/src/__resources__/markdown-links.md.ts b/scm-ui/ui-components/src/__resources__/markdown-links.md.ts new file mode 100644 index 0000000000..46be993a3a --- /dev/null +++ b/scm-ui/ui-components/src/__resources__/markdown-links.md.ts @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +export default `# Links + +Show case for different style of markdown links. +Please note that some of the links may not work in storybook, +the story is mostly for checking if the links are rendered correct. + +## External + +External Links should be opened in a new tab: [external link](https://scm-manager.org) + +## Anchor + +Anchor Links should be rendered a simple a tag with an href: [anchor link](#sample) + +## Protocol + +Links with a protocol other than http should be rendered a simple a tag with an href e.g.: [mail link](mailto:marvin@hitchhiker.com) + +## Internal + +Internal links should be rendered by react-router: [internal link](/buttons) +`; diff --git a/scm-ui/ui-components/src/__resources__/repository.ts b/scm-ui/ui-components/src/__resources__/repository.ts index 8facf86e57..5f3cc930e1 100644 --- a/scm-ui/ui-components/src/__resources__/repository.ts +++ b/scm-ui/ui-components/src/__resources__/repository.ts @@ -22,12 +22,12 @@ * SOFTWARE. */ export default { - contact: "heart-of-gold@hitchhiher.com", + contact: "heart-of-gold@hitchhiker.com", creationDate: "2020-03-23T08:26:01.164Z", description: "The starship Heart of Gold was the first spacecraft to make use of the Infinite Improbability Drive", healthCheckFailures: [], lastModified: "2020-03-23T08:26:01.876Z", - namespace: "hitchhiher", + namespace: "hitchhiker", name: "heartOfGold", type: "git", _links: { diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index 963d715e57..0a056f61cb 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -1,5 +1,134 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Storyshots BranchSelector Default 1`] = ` +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +`; + +exports[`Storyshots BreadCrumb Default 1`] = ` +
    +
    + +
    +
    +
    +`; + exports[`Storyshots Buttons|AddButton Default 1`] = `
    SCM-Manager 2.0.0 @@ -32956,6 +33086,7 @@ exports[`Storyshots Layout|Footer Default 1`] = `
  • footer.support.community @@ -32964,6 +33095,7 @@ exports[`Storyshots Layout|Footer Default 1`] = `
  • footer.support.enterprise @@ -33053,6 +33185,7 @@ exports[`Storyshots Layout|Footer Full 1`] = `
  • SCM-Manager 2.0.0 @@ -33061,6 +33194,7 @@ exports[`Storyshots Layout|Footer Full 1`] = `
  • REST API @@ -33069,6 +33203,7 @@ exports[`Storyshots Layout|Footer Full 1`] = `
  • CLI @@ -33094,6 +33229,7 @@ exports[`Storyshots Layout|Footer Full 1`] = `
  • footer.support.community @@ -33102,6 +33238,7 @@ exports[`Storyshots Layout|Footer Full 1`] = `
  • footer.support.enterprise @@ -33110,6 +33247,7 @@ exports[`Storyshots Layout|Footer Full 1`] = `
  • FAQ @@ -33190,6 +33328,7 @@ exports[`Storyshots Layout|Footer With Avatar 1`] = `
  • SCM-Manager 2.0.0 @@ -33215,6 +33354,7 @@ exports[`Storyshots Layout|Footer With Avatar 1`] = `
  • footer.support.community @@ -33223,6 +33363,7 @@ exports[`Storyshots Layout|Footer With Avatar 1`] = `
  • footer.support.enterprise @@ -33307,6 +33448,7 @@ exports[`Storyshots Layout|Footer With Plugin Links 1`] = `
  • SCM-Manager 2.0.0 @@ -33315,6 +33457,7 @@ exports[`Storyshots Layout|Footer With Plugin Links 1`] = `
  • REST API @@ -33323,6 +33466,7 @@ exports[`Storyshots Layout|Footer With Plugin Links 1`] = `
  • CLI @@ -33348,6 +33492,7 @@ exports[`Storyshots Layout|Footer With Plugin Links 1`] = `
  • footer.support.community @@ -33356,6 +33501,7 @@ exports[`Storyshots Layout|Footer With Plugin Links 1`] = `
  • footer.support.enterprise @@ -33364,6 +33510,7 @@ exports[`Storyshots Layout|Footer With Plugin Links 1`] = `
  • FAQ @@ -34243,6 +34390,74 @@ exports[`Storyshots MarkdownView Inline Xml 1`] = `
  • `; +exports[`Storyshots MarkdownView Links 1`] = ` +
    +
    +
    +

    + Links +

    +

    + Show case for different style of markdown links. +Please note that some of the links may not work in storybook, +the story is mostly for checking if the links are rendered correct. +

    +

    + External +

    +

    + External Links should be opened in a new tab: + + external link + +

    +

    + Anchor +

    +

    + Anchor Links should be rendered a simple a tag with an href: + + anchor link + +

    +

    + Protocol +

    +

    + Links with a protocol other than http should be rendered a simple a tag with an href e.g.: + + mail link + +

    +

    + Internal +

    +

    + Internal links should be rendered by react-router: + + internal link + +

    +
    +
    +
    +`; + exports[`Storyshots MarkdownView Xml Code Block 1`] = `
    `; +exports[`Storyshots Modal|ConfirmAlert Default 1`] = ` +
    +
    +
    +
    +

    + Are you sure about that? +

    +
    +
    + Mind-paralyzing change needed improbability vortex machine sorts sought same theory upending job just allows + hostess’s really oblong Infinite Improbability thing into the starship against which behavior accordance with + Kakrafoon humanoid undergarment ship powered by GPP-guided bowl of petunias nothing was frequently away incredibly + ordinary mob. +
    + +
    +
    +`; + +exports[`Storyshots Modal|Modal Default 1`] = ` +
    +
    +
    +
    +

    + Hitchhiker Modal +

    +
    +
    +

    + Mind-paralyzing change needed improbability vortex machine sorts sought same theory upending job just allows hostess’s really oblong Infinite Improbability thing into the starship against which behavior accordance.with Kakrafoon humanoid undergarment ship powered by GPP-guided bowl of petunias nothing was frequently away incredibly ordinary mob. +

    +
    +
    +
    +`; + exports[`Storyshots Navigation|Secondary Default 1`] = `
    `; +exports[`Storyshots Notification Closeable 1`] = ` +
    +
    +
    +
    +`; + +exports[`Storyshots Notification Danger 1`] = ` +
    +
    + + Cleverness nuclear genuine static irresponsibility invited President Zaphod +Beeblebrox hyperspace ship. Another custard through computer-generated universe +shapes field strong disaster parties Russell’s ancestors infinite colour +imaginative generator sweep. +
    +
    +`; + +exports[`Storyshots Notification Info 1`] = ` +
    +
    + + Cleverness nuclear genuine static irresponsibility invited President Zaphod +Beeblebrox hyperspace ship. Another custard through computer-generated universe +shapes field strong disaster parties Russell’s ancestors infinite colour +imaginative generator sweep. +
    +
    +`; + +exports[`Storyshots Notification Primary 1`] = ` +
    +
    + + Cleverness nuclear genuine static irresponsibility invited President Zaphod +Beeblebrox hyperspace ship. Another custard through computer-generated universe +shapes field strong disaster parties Russell’s ancestors infinite colour +imaginative generator sweep. +
    +
    +`; + +exports[`Storyshots Notification Success 1`] = ` +
    +
    + + Cleverness nuclear genuine static irresponsibility invited President Zaphod +Beeblebrox hyperspace ship. Another custard through computer-generated universe +shapes field strong disaster parties Russell’s ancestors infinite colour +imaginative generator sweep. +
    +
    +`; + +exports[`Storyshots Notification Warning 1`] = ` +
    +
    + + Cleverness nuclear genuine static irresponsibility invited President Zaphod +Beeblebrox hyperspace ship. Another custard through computer-generated universe +shapes field strong disaster parties Russell’s ancestors infinite colour +imaginative generator sweep. +
    +
    +`; + exports[`Storyshots RepositoryEntry Avatar EP 1`] = `
    @@ -34989,7 +35402,7 @@ exports[`Storyshots RepositoryEntry Before Title EP 1`] = ` >
    `; +exports[`Storyshots Tag Clickable 1`] = ` +
    + + Click here + +
    +`; + +exports[`Storyshots Tag Colors 1`] = ` +
    +
    +
    + + primary + +
    +
    + + link + +
    +
    + + info + +
    +
    + + success + +
    +
    + + warning + +
    +
    + + danger + +
    +
    +
    +`; + +exports[`Storyshots Tag Default 1`] = ` +
    + + Default tag + +
    +`; + +exports[`Storyshots Tag With Icon 1`] = ` +
    + + +   + System + +
    +`; + +exports[`Storyshots Tag With title 1`] = ` +
    + + hover me + +
    +`; + exports[`Storyshots Toast Click to close 1`] = `null`; exports[`Storyshots Toast Danger 1`] = `null`; @@ -36513,3 +37043,84 @@ exports[`Storyshots Toast Primary 1`] = `null`; exports[`Storyshots Toast Success 1`] = `null`; exports[`Storyshots Toast Warning 1`] = `null`; + +exports[`Storyshots Tooltip Default 1`] = ` +
    +
    +
    + + + + +
    +
    + + + + +
    +
    + + + + +
    +
    + + + + +
    +
    +
    +`; diff --git a/scm-ui/ui-components/src/layout/Footer.stories.tsx b/scm-ui/ui-components/src/layout/Footer.stories.tsx index c25b618a87..d2b592a46e 100644 --- a/scm-ui/ui-components/src/layout/Footer.stories.tsx +++ b/scm-ui/ui-components/src/layout/Footer.stories.tsx @@ -32,7 +32,7 @@ import hitchhiker from "../__resources__/hitchhiker.png"; // @ts-ignore ignore unknown jpg import marvin from "../__resources__/marvin.jpg"; import NavLink from "../navigation/NavLink"; -import ExternalLink from "../navigation/ExternalLink"; +import ExternalNavLink from "../navigation/ExternalNavLink"; import { MemoryRouter } from "react-router-dom"; const trillian: Me = { @@ -50,9 +50,9 @@ const bindAvatar = (binder: Binder, avatar: string) => { }; const bindLinks = (binder: Binder) => { - binder.bind("footer.information", () => ); - binder.bind("footer.information", () => ); - binder.bind("footer.support", () => ); + binder.bind("footer.information", () => ); + binder.bind("footer.information", () => ); + binder.bind("footer.support", () => ); binder.bind("profile.setting", () => ); }; diff --git a/scm-ui/ui-components/src/layout/Footer.tsx b/scm-ui/ui-components/src/layout/Footer.tsx index 8f27e8042a..355a74c67e 100644 --- a/scm-ui/ui-components/src/layout/Footer.tsx +++ b/scm-ui/ui-components/src/layout/Footer.tsx @@ -29,7 +29,7 @@ import NavLink from "../navigation/NavLink"; import FooterSection from "./FooterSection"; import styled from "styled-components"; import { EXTENSION_POINT } from "../avatar/Avatar"; -import ExternalLink from "../navigation/ExternalLink"; +import ExternalNavLink from "../navigation/ExternalNavLink"; import { useTranslation } from "react-i18next"; type Props = { @@ -99,12 +99,15 @@ const Footer: FC = ({ me, version, links }) => { }> - + }> - - + +
    diff --git a/scm-ui/ui-components/src/modals/ConfirmAlert.stories.tsx b/scm-ui/ui-components/src/modals/ConfirmAlert.stories.tsx new file mode 100644 index 0000000000..b450153c3b --- /dev/null +++ b/scm-ui/ui-components/src/modals/ConfirmAlert.stories.tsx @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +import { storiesOf } from "@storybook/react"; +import { MemoryRouter } from "react-router-dom"; +import * as React from "react"; +import ConfirmAlert from "./ConfirmAlert"; + +const body = + "Mind-paralyzing change needed improbability vortex machine sorts sought same theory upending job just allows\n " + + "hostess’s really oblong Infinite Improbability thing into the starship against which behavior accordance with\n " + + "Kakrafoon humanoid undergarment ship powered by GPP-guided bowl of petunias nothing was frequently away incredibly\n " + + "ordinary mob."; + +const buttons = [ + { + className: "is-outlined", + label: "Cancel", + onClick: () => null + }, + { + label: "Submit", + onClick: () => {} + } +]; + +storiesOf("Modal|ConfirmAlert", module) + .addDecorator(story => {story()}) + .add("Default", () => ); diff --git a/scm-ui/ui-components/src/modals/Modal.stories.tsx b/scm-ui/ui-components/src/modals/Modal.stories.tsx new file mode 100644 index 0000000000..f620e7fd30 --- /dev/null +++ b/scm-ui/ui-components/src/modals/Modal.stories.tsx @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +import { storiesOf } from "@storybook/react"; +import { MemoryRouter } from "react-router-dom"; +import * as React from "react"; +import { useState } from "react"; +import Modal from "./Modal"; + +const body = ( +

    + Mind-paralyzing change needed improbability vortex machine sorts sought same theory upending job just allows + hostess’s really oblong Infinite Improbability thing into the starship against which behavior accordance.with + Kakrafoon humanoid undergarment ship powered by GPP-guided bowl of petunias nothing was frequently away incredibly + ordinary mob. +

    +); + +storiesOf("Modal|Modal", module) + .addDecorator(story => {story()}) + .add("Default", () => ); + +const CloseableModal = () => { + const [show, setShow] = useState(true); + + const toggleModal = () => { + setShow(!show); + }; + + return ; +}; diff --git a/scm-ui/ui-components/src/navigation/ExternalLink.tsx b/scm-ui/ui-components/src/navigation/ExternalLink.tsx index 1565f6fa79..bf1dbad5ea 100644 --- a/scm-ui/ui-components/src/navigation/ExternalLink.tsx +++ b/scm-ui/ui-components/src/navigation/ExternalLink.tsx @@ -22,34 +22,15 @@ * SOFTWARE. */ import React, { FC } from "react"; -import classNames from "classnames"; type Props = { to: string; - icon?: string; - label: string; }; -// TODO is it used in the menu? should it use MenuContext for collapse state? - -const ExternalLink: FC = ({ to, icon, label }) => { - let showIcon; - if (icon) { - showIcon = ( - <> - {" "} - - ); - } - - return ( -
  • - - {showIcon} - {label} - -
  • - ); -}; +const ExternalLink: FC = ({ to, children }) => ( + + {children} + +); export default ExternalLink; diff --git a/scm-ui/ui-components/src/navigation/ExternalNavLink.tsx b/scm-ui/ui-components/src/navigation/ExternalNavLink.tsx new file mode 100644 index 0000000000..3b88b495ae --- /dev/null +++ b/scm-ui/ui-components/src/navigation/ExternalNavLink.tsx @@ -0,0 +1,56 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ +import React, { FC } from "react"; +import classNames from "classnames"; +import ExternalLink from "./ExternalLink"; + +type Props = { + to: string; + icon?: string; + label: string; +}; + +// TODO is it used in the menu? should it use MenuContext for collapse state? + +const ExternalNavLink: FC = ({ to, icon, label }) => { + let showIcon; + if (icon) { + showIcon = ( + <> + {" "} + + ); + } + + return ( +
  • + + {showIcon} + {label} + +
  • + ); +}; + +export default ExternalNavLink; diff --git a/scm-ui/ui-components/src/navigation/index.ts b/scm-ui/ui-components/src/navigation/index.ts index 4dcce4321b..9ab01d755d 100644 --- a/scm-ui/ui-components/src/navigation/index.ts +++ b/scm-ui/ui-components/src/navigation/index.ts @@ -33,3 +33,5 @@ export { default as PrimaryNavigationLink } from "./PrimaryNavigationLink"; export { default as SecondaryNavigation } from "./SecondaryNavigation"; export { MenuContext, StateMenuContextProvider } from "./MenuContext"; export { default as SecondaryNavigationItem } from "./SecondaryNavigationItem"; +export { default as ExternalLink } from "./ExternalLink"; +export { default as ExternalNavLink } from "./ExternalNavLink"; diff --git a/scm-ui/ui-components/src/repos/RepositoryEntry.stories.tsx b/scm-ui/ui-components/src/repos/RepositoryEntry.stories.tsx index 4954d765ed..d10e7282cb 100644 --- a/scm-ui/ui-components/src/repos/RepositoryEntry.stories.tsx +++ b/scm-ui/ui-components/src/repos/RepositoryEntry.stories.tsx @@ -60,10 +60,10 @@ const bindQuickLink = (binder: Binder, extension: ReactNode) => { }); }; -const withBinder = (binder: Binder, repository: Repository) => { +const withBinder = (binder: Binder, repo: Repository) => { return ( - + ); }; @@ -87,7 +87,7 @@ storiesOf("RepositoryEntry", module) }) .add("Before Title EP", () => { const binder = new Binder("title"); - bindBeforeTitle(binder, ); + bindBeforeTitle(binder, ); return withBinder(binder, repository); }) .add("Quick Link EP", () => { diff --git a/scm-ui/ui-webapp/src/repos/containers/Changesets.tsx b/scm-ui/ui-webapp/src/repos/containers/Changesets.tsx index eded15c8c5..98601e86c1 100644 --- a/scm-ui/ui-webapp/src/repos/containers/Changesets.tsx +++ b/scm-ui/ui-webapp/src/repos/containers/Changesets.tsx @@ -66,7 +66,9 @@ class Changesets extends React.Component { } shouldComponentUpdate(nextProps: Readonly): boolean { - return this.props.changesets !== nextProps.changesets; + return this.props.changesets !== nextProps.changesets || + this.props.loading !== nextProps.loading || + this.props.error !== nextProps.error; } render() { diff --git a/scm-ui/ui-webapp/src/repos/sources/components/content/MarkdownViewer.tsx b/scm-ui/ui-webapp/src/repos/sources/components/content/MarkdownViewer.tsx index ce0eba4198..0ee70d5684 100644 --- a/scm-ui/ui-webapp/src/repos/sources/components/content/MarkdownViewer.tsx +++ b/scm-ui/ui-webapp/src/repos/sources/components/content/MarkdownViewer.tsx @@ -29,13 +29,14 @@ import styled from "styled-components"; type Props = { file: File; + basePath: string; }; const MarkdownContent = styled.div` padding: 0.5rem; `; -const MarkdownViewer: FC = ({ file }) => { +const MarkdownViewer: FC = ({ file, basePath }) => { const [loading, setLoading] = useState(true); const [error, setError] = useState(undefined); const [content, setContent] = useState(""); @@ -62,7 +63,7 @@ const MarkdownViewer: FC = ({ file }) => { return ( - + ); }; diff --git a/scm-ui/ui-webapp/src/repos/sources/components/content/SwitchableMarkdownViewer.tsx b/scm-ui/ui-webapp/src/repos/sources/components/content/SwitchableMarkdownViewer.tsx index 7a14bb75b4..e194667894 100644 --- a/scm-ui/ui-webapp/src/repos/sources/components/content/SwitchableMarkdownViewer.tsx +++ b/scm-ui/ui-webapp/src/repos/sources/components/content/SwitchableMarkdownViewer.tsx @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -import React, { FC, useState } from "react"; +import React, {FC, useState} from "react"; import styled from "styled-components"; import MarkdownViewer from "./MarkdownViewer"; import SourcecodeViewer from "./SourcecodeViewer"; -import { File } from "@scm-manager/ui-types"; -import { Button } from "@scm-manager/ui-components"; -import { useTranslation } from "react-i18next"; +import {File} from "@scm-manager/ui-types"; +import {Button} from "@scm-manager/ui-components"; +import {useTranslation} from "react-i18next"; const ToggleButton = styled(Button)` max-width: 1rem; @@ -43,10 +43,11 @@ const Container = styled.div` type Props = { file: File; + basePath: string; }; -const SwitchableMarkdownViewer: FC = ({ file }) => { - const { t } = useTranslation("repos"); +const SwitchableMarkdownViewer: FC = ({file, basePath}) => { + const {t} = useTranslation("repos"); const [renderMarkdown, setRenderMarkdown] = useState(true); const toggleMarkdown = () => { @@ -64,9 +65,10 @@ const SwitchableMarkdownViewer: FC = ({ file }) => { : t("sources.content.toggleButton.showMarkdown") } > - + - {renderMarkdown ? : } + {renderMarkdown ? : + } ); }; diff --git a/scm-ui/ui-webapp/src/repos/sources/containers/SourcesView.tsx b/scm-ui/ui-webapp/src/repos/sources/containers/SourcesView.tsx index 1b7b26479b..417525c5f6 100644 --- a/scm-ui/ui-webapp/src/repos/sources/containers/SourcesView.tsx +++ b/scm-ui/ui-webapp/src/repos/sources/containers/SourcesView.tsx @@ -76,13 +76,19 @@ class SourcesView extends React.Component { }); } + createBasePath() { + const { repository, revision } = this.props; + return `/repo/${repository.namespace}/${repository.name}/code/sources/${revision}/`; + } + showSources() { const { file, revision } = this.props; const { contentType, language } = this.state; + const basePath = this.createBasePath(); if (contentType.startsWith("image/")) { return ; } else if (contentType.includes("markdown")) { - return ; + return ; } else if (language) { return ; } else if (contentType.startsWith("text/")) { @@ -94,7 +100,8 @@ class SourcesView extends React.Component { props={{ file, contentType, - revision + revision, + basePath }} > diff --git a/scm-webapp/pom.xml b/scm-webapp/pom.xml index f0f576b02f..be6d7753c4 100644 --- a/scm-webapp/pom.xml +++ b/scm-webapp/pom.xml @@ -146,6 +146,12 @@ ${jackson.version} + + javax.ws.rs + javax.ws.rs-api + + + @@ -187,13 +193,13 @@ org.hibernate.validator hibernate-validator - 6.1.2.Final + 6.1.4.Final - javax.el - javax.el-api - 3.0.0 + jakarta.xml.bind + jakarta.xml.bind-api + ${jaxb.version} @@ -202,16 +208,10 @@ 3.0.1-b11 - - javax.xml.bind - jaxb-api - 2.3.1 - - org.glassfish.jaxb jaxb-runtime - 2.3.0 + ${jaxb.version} @@ -310,7 +310,7 @@ org.apache.tika tika-core - 1.24 + 1.24.1 @@ -438,13 +438,6 @@ - - commons-logging - commons-logging - 1.1.3 - provided - - org.projectlombok lombok @@ -654,6 +647,27 @@ + + org.basepom.maven + duplicate-finder-maven-plugin + 1.3.0 + + + default + verify + + check + + + + + false + true + true + true + false + + scm-webapp diff --git a/scm-webapp/src/main/java/sonia/scm/ScmLogFilePropertyDefiner.java b/scm-webapp/src/main/java/sonia/scm/ScmLogFilePropertyDefiner.java index 9161c0eec3..a839d95770 100644 --- a/scm-webapp/src/main/java/sonia/scm/ScmLogFilePropertyDefiner.java +++ b/scm-webapp/src/main/java/sonia/scm/ScmLogFilePropertyDefiner.java @@ -21,63 +21,64 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm; //~--- non-JDK imports -------------------------------------------------------- import ch.qos.logback.core.PropertyDefinerBase; +import com.google.common.annotations.VisibleForTesting; +import sonia.scm.util.SystemUtil; //~--- JDK imports ------------------------------------------------------------ import java.io.File; +import java.util.Properties; /** + * Resolve directory path for SCM-Manager logs. * * @author Sebastian Sdorra */ -public class ScmLogFilePropertyDefiner extends PropertyDefinerBase -{ +public class ScmLogFilePropertyDefiner extends PropertyDefinerBase { - /** Field description */ - public static final String LOG_DIRECTORY = "logs"; + private final String logDirectoryPath; - //~--- constructors --------------------------------------------------------- + public ScmLogFilePropertyDefiner() { + this(SCMContext.getContext(), SystemUtil.getPlatform(), System.getProperties()); + } - /** - * Constructs ... - * - */ - public ScmLogFilePropertyDefiner() - { - File logDirectory = new File(SCMContext.getContext().getBaseDirectory(), - LOG_DIRECTORY); + @VisibleForTesting + ScmLogFilePropertyDefiner(SCMContextProvider context, Platform platform, Properties properties) { + File logDirectory = resolveDirectory(context, platform, properties); - if (!logDirectory.exists() &&!logDirectory.mkdirs()) - { + if (!logDirectory.exists() && !logDirectory.mkdirs()) { throw new ConfigurationException( - "could not create log directory ".concat(logDirectory.getPath())); + "could not create log directory ".concat(logDirectory.getPath())); } this.logDirectoryPath = logDirectory.getAbsolutePath(); } - //~--- get methods ---------------------------------------------------------- + private File resolveDirectory(SCMContextProvider context, Platform platform, Properties properties) { + if (platform.isMac()) { + return resolveOsX(properties); + } else { + return resolveDefault(context); + } + } + + private File resolveOsX(Properties properties) { + return new File(properties.getProperty("user.home"), "Library/Logs/SCM-Manager"); + } + + private File resolveDefault(SCMContextProvider context) { + return new File(context.getBaseDirectory(), "logs"); + } - /** - * Method description - * - * - * @return - */ @Override - public String getPropertyValue() - { + public String getPropertyValue() { return logDirectoryPath; } - //~--- fields --------------------------------------------------------------- - - /** Field description */ - private String logDirectoryPath; } diff --git a/scm-webapp/src/main/java/sonia/scm/api/InvalidFormatExceptionMapper.java b/scm-webapp/src/main/java/sonia/scm/api/InvalidFormatExceptionMapper.java new file mode 100644 index 0000000000..97dd96a23a --- /dev/null +++ b/scm-webapp/src/main/java/sonia/scm/api/InvalidFormatExceptionMapper.java @@ -0,0 +1,59 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.api; + +import com.fasterxml.jackson.databind.exc.InvalidFormatException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.MDC; +import sonia.scm.api.v2.resources.ErrorDto; +import sonia.scm.web.VndMediaType; + +import javax.ws.rs.core.Response; +import javax.ws.rs.ext.ExceptionMapper; +import javax.ws.rs.ext.Provider; +import java.util.Collections; + +@Provider +public class InvalidFormatExceptionMapper implements ExceptionMapper { + + private static final Logger LOG = LoggerFactory.getLogger(InvalidFormatExceptionMapper.class); + + private static final String ERROR_CODE = "2qRyyaVcJ1"; + + @Override + public Response toResponse(InvalidFormatException exception) { + LOG.trace("got invalid format in json: {}", exception.getMessage()); + ErrorDto errorDto = new ErrorDto(); + errorDto.setMessage("invalid format in json content: " + exception.getMessage()); + errorDto.setContext(Collections.emptyList()); + errorDto.setErrorCode(ERROR_CODE); + errorDto.setTransactionId(MDC.get("transaction_id")); + return Response.status(Response.Status.BAD_REQUEST) + .entity(errorDto) + .type(VndMediaType.ERROR_TYPE) + .build(); + } +} diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/ResteasyValidationExceptionMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/JavaxValidationExceptionMapper.java similarity index 83% rename from scm-webapp/src/main/java/sonia/scm/api/v2/ResteasyValidationExceptionMapper.java rename to scm-webapp/src/main/java/sonia/scm/api/v2/JavaxValidationExceptionMapper.java index 48eea0a5d4..43f6be6e14 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/ResteasyValidationExceptionMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/JavaxValidationExceptionMapper.java @@ -21,30 +21,30 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.api.v2; -import org.jboss.resteasy.api.validation.ResteasyViolationException; import sonia.scm.api.v2.resources.ResteasyViolationExceptionToErrorDtoMapper; import sonia.scm.web.VndMediaType; import javax.inject.Inject; +import javax.validation.ConstraintViolationException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; @Provider -public class ResteasyValidationExceptionMapper implements ExceptionMapper { +public class JavaxValidationExceptionMapper implements ExceptionMapper { private final ResteasyViolationExceptionToErrorDtoMapper mapper; @Inject - public ResteasyValidationExceptionMapper(ResteasyViolationExceptionToErrorDtoMapper mapper) { + public JavaxValidationExceptionMapper(ResteasyViolationExceptionToErrorDtoMapper mapper) { this.mapper = mapper; } @Override - public Response toResponse(ResteasyViolationException exception) { + public Response toResponse(ConstraintViolationException exception) { return Response .status(Response.Status.BAD_REQUEST) .type(VndMediaType.ERROR_TYPE) diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/AvailablePluginResource.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/AvailablePluginResource.java index b898eadafa..c4f11d8a91 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/AvailablePluginResource.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/AvailablePluginResource.java @@ -178,7 +178,7 @@ public class AvailablePluginResource { ) ) public Response installPlugin(@PathParam("name") String name, @QueryParam("restart") boolean restartAfterInstallation) { - PluginPermissions.manage().check(); + PluginPermissions.write().check(); pluginManager.install(name, restartAfterInstallation); return Response.ok().build(); } diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/BranchToBranchDtoMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/BranchToBranchDtoMapper.java index 30b689a3a3..0d779d2164 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/BranchToBranchDtoMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/BranchToBranchDtoMapper.java @@ -32,6 +32,7 @@ import org.mapstruct.Mapping; import org.mapstruct.ObjectFactory; import sonia.scm.repository.Branch; import sonia.scm.repository.NamespaceAndName; +import sonia.scm.web.EdisonHalAppender; import javax.inject.Inject; diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/BrowserResultToFileObjectDtoMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/BrowserResultToFileObjectDtoMapper.java index 1271845a14..f289bc917e 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/BrowserResultToFileObjectDtoMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/BrowserResultToFileObjectDtoMapper.java @@ -24,22 +24,17 @@ package sonia.scm.api.v2.resources; -import com.google.common.annotations.VisibleForTesting; import de.otto.edison.hal.Embedded; import de.otto.edison.hal.Links; import org.mapstruct.Context; import org.mapstruct.Mapper; import org.mapstruct.Mapping; -import org.mapstruct.ObjectFactory; import org.mapstruct.Qualifier; import sonia.scm.repository.BrowserResult; import sonia.scm.repository.FileObject; import sonia.scm.repository.NamespaceAndName; -import sonia.scm.repository.SubRepository; -import sonia.scm.repository.spi.BrowseCommand; -import sonia.scm.repository.spi.BrowseCommandRequest; +import sonia.scm.web.EdisonHalAppender; -import javax.inject.Inject; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -48,9 +43,6 @@ import java.time.Instant; import java.util.Optional; import java.util.OptionalLong; -import static de.otto.edison.hal.Embedded.embeddedBuilder; -import static de.otto.edison.hal.Link.link; - @Mapper public abstract class BrowserResultToFileObjectDtoMapper extends BaseFileObjectDtoMapper { diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/DefaultChangesetToChangesetDtoMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/DefaultChangesetToChangesetDtoMapper.java index 2c1799f786..a9ba0758a6 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/DefaultChangesetToChangesetDtoMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/DefaultChangesetToChangesetDtoMapper.java @@ -37,6 +37,7 @@ import sonia.scm.repository.Tag; import sonia.scm.repository.api.Command; import sonia.scm.repository.api.RepositoryService; import sonia.scm.repository.api.RepositoryServiceFactory; +import sonia.scm.web.EdisonHalAppender; import javax.inject.Inject; import java.util.List; diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/DiffResultToDiffResultDtoMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/DiffResultToDiffResultDtoMapper.java index 045638c0b7..5057950149 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/DiffResultToDiffResultDtoMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/DiffResultToDiffResultDtoMapper.java @@ -21,12 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.api.v2.resources; import com.github.sdorra.spotter.ContentTypes; import com.github.sdorra.spotter.Language; -import com.google.common.base.Strings; import com.google.inject.Inject; import sonia.scm.repository.Repository; import sonia.scm.repository.api.DiffFile; @@ -42,7 +41,7 @@ import java.util.OptionalInt; import static de.otto.edison.hal.Links.linkingTo; /** - * TODO conflicts, copy and rename + * TODO conflicts */ class DiffResultToDiffResultDtoMapper { @@ -83,18 +82,29 @@ class DiffResultToDiffResultDtoMapper { String oldPath = file.getOldPath(); String path; - if (isFilePath(newPath) && isFileNull(oldPath)) { - path = newPath; - dto.setType("add"); - } else if (isFileNull(newPath) && isFilePath(oldPath)) { - path = oldPath; - dto.setType("delete"); - } else if (isFilePath(newPath) && isFilePath(oldPath)) { - path = newPath; - dto.setType("modify"); - } else { - // TODO copy and rename? - throw new IllegalStateException("no file without path"); + switch (file.getChangeType()) { + case ADD: + path = newPath; + dto.setType("add"); + break; + case DELETE: + path = oldPath; + dto.setType("delete"); + break; + case RENAME: + path = newPath; + dto.setType("rename"); + break; + case MODIFY: + path = newPath; + dto.setType("modify"); + break; + case COPY: + path = newPath; + dto.setType("copy"); + break; + default: + throw new IllegalArgumentException("unknown change type: " + file.getChangeType()); } dto.setNewPath(newPath); @@ -116,14 +126,6 @@ class DiffResultToDiffResultDtoMapper { return dto; } - private boolean isFilePath(String path) { - return !isFileNull(path); - } - - private boolean isFileNull(String path) { - return Strings.isNullOrEmpty(path) || "/dev/null".equals(path); - } - private DiffResultDto.HunkDto mapHunk(Hunk hunk) { DiffResultDto.HunkDto dto = new DiffResultDto.HunkDto(); dto.setContent(hunk.getRawHeader()); diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/GroupToGroupDtoMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/GroupToGroupDtoMapper.java index 2ab6bf48e2..da8be2865d 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/GroupToGroupDtoMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/GroupToGroupDtoMapper.java @@ -31,6 +31,7 @@ import org.mapstruct.ObjectFactory; import sonia.scm.group.Group; import sonia.scm.group.GroupPermissions; import sonia.scm.security.PermissionPermissions; +import sonia.scm.web.EdisonHalAppender; import javax.inject.Inject; import java.util.List; diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/IndexDtoGenerator.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/IndexDtoGenerator.java index 8b0a0a5565..41167a221f 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/IndexDtoGenerator.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/IndexDtoGenerator.java @@ -38,6 +38,7 @@ import sonia.scm.plugin.PluginPermissions; import sonia.scm.security.Authentications; import sonia.scm.security.PermissionPermissions; import sonia.scm.user.UserPermissions; +import sonia.scm.web.EdisonHalAppender; import javax.inject.Inject; import java.util.List; @@ -82,7 +83,7 @@ public class IndexDtoGenerator extends HalAppenderMapper { builder.single(link("installedPlugins", resourceLinks.installedPluginCollection().self())); builder.single(link("availablePlugins", resourceLinks.availablePluginCollection().self())); } - if (PluginPermissions.manage().isPermitted()) { + if (PluginPermissions.write().isPermitted()) { builder.single(link("pendingPlugins", resourceLinks.pendingPluginCollection().self())); } if (UserPermissions.list().isPermitted()) { diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/MeDtoFactory.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/MeDtoFactory.java index 80d4736f30..5308402540 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/MeDtoFactory.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/MeDtoFactory.java @@ -34,6 +34,7 @@ import sonia.scm.security.Authentications; import sonia.scm.user.User; import sonia.scm.user.UserManager; import sonia.scm.user.UserPermissions; +import sonia.scm.web.EdisonHalAppender; import javax.inject.Inject; diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ModificationsDto.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ModificationsDto.java index 9dbfb5707d..d826ece42c 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ModificationsDto.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ModificationsDto.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.api.v2.resources; import de.otto.edison.hal.HalRepresentation; @@ -54,10 +54,21 @@ public class ModificationsDto extends HalRepresentation { */ private List removed; + /** + * Mapping of renamed files + */ + private List renamed; + @Override @SuppressWarnings("squid:S1185") // We want to have this method available in this package protected HalRepresentation add(Links links) { return super.add(links); } + @Getter + @Setter + public static class RenamedDto { + private String oldPath; + private String newPath; + } } diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ModificationsToDtoMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ModificationsToDtoMapper.java index e393265c26..ec545402b7 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ModificationsToDtoMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ModificationsToDtoMapper.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.api.v2.resources; import de.otto.edison.hal.Links; @@ -30,7 +30,11 @@ import org.mapstruct.Context; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.MappingTarget; +import sonia.scm.repository.Added; import sonia.scm.repository.Modifications; +import sonia.scm.repository.Modified; +import sonia.scm.repository.Removed; +import sonia.scm.repository.Renamed; import sonia.scm.repository.Repository; import javax.inject.Inject; @@ -52,4 +56,18 @@ public abstract class ModificationsToDtoMapper { .self(resourceLinks.modifications().self(repository.getNamespace(), repository.getName(), target.getRevision())); target.add(linksBuilder.build()); } + + String map(Added added) { + return added.getPath(); + } + + String map(Removed removed) { + return removed.getPath(); + } + + String map(Modified modified) { + return modified.getPath(); + } + + abstract ModificationsDto.RenamedDto map(Renamed renamed); } diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/PendingPluginResource.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/PendingPluginResource.java index 72b44dc33d..0d59e4ef28 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/PendingPluginResource.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/PendingPluginResource.java @@ -118,7 +118,7 @@ public class PendingPluginResource { List uninstallDtos = uninstallPlugins.map(i -> mapper.mapInstalled(i, pending)).collect(toList()); if ( - PluginPermissions.manage().isPermitted() && + PluginPermissions.write().isPermitted() && (!installDtos.isEmpty() || !updateDtos.isEmpty() || !uninstallDtos.isEmpty()) ) { if (restarter.isSupported()) { diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/PluginDtoCollectionMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/PluginDtoCollectionMapper.java index b579935b30..ff66f2bc85 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/PluginDtoCollectionMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/PluginDtoCollectionMapper.java @@ -31,6 +31,7 @@ import de.otto.edison.hal.Links; import sonia.scm.plugin.AvailablePlugin; import sonia.scm.plugin.InstalledPlugin; import sonia.scm.plugin.PluginManager; +import sonia.scm.plugin.PluginPermissions; import java.util.List; @@ -71,7 +72,7 @@ public class PluginDtoCollectionMapper { Links.Builder linksBuilder = linkingTo() .with(Links.linkingTo().self(baseUrl).build()); - if (!manager.getUpdatable().isEmpty()) { + if (!manager.getUpdatable().isEmpty() && PluginPermissions.write().isPermitted()) { linksBuilder.single(link("update", resourceLinks.installedPluginCollection().update())); } diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/PluginDtoMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/PluginDtoMapper.java index ff2522c352..1d71735278 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/PluginDtoMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/PluginDtoMapper.java @@ -81,7 +81,7 @@ public abstract class PluginDtoMapper { .self(resourceLinks.availablePlugin() .self(information.getName())); - if (!plugin.isPending() && PluginPermissions.manage().isPermitted()) { + if (!plugin.isPending() && PluginPermissions.write().isPermitted()) { String href = resourceLinks.availablePlugin().install(information.getName()); appendLink(links, "install", href); } @@ -106,7 +106,7 @@ public abstract class PluginDtoMapper { if (!plugin.isCore() && availablePlugin.isPresent() && !availablePlugin.get().isPending() - && PluginPermissions.manage().isPermitted() + && PluginPermissions.write().isPermitted() ) { String href = resourceLinks.availablePlugin().install(information.getName()); appendLink(links, "update", href); @@ -114,7 +114,7 @@ public abstract class PluginDtoMapper { if (plugin.isUninstallable() && (!availablePlugin.isPresent() || !availablePlugin.get().isPending()) - && PluginPermissions.manage().isPermitted() + && PluginPermissions.write().isPermitted() ) { String href = resourceLinks.installedPlugin().uninstall(information.getName()); appendLink(links, "uninstall", href); diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/RepositoryRoleToRepositoryRoleDtoMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/RepositoryRoleToRepositoryRoleDtoMapper.java index 4afe1d97b6..1cd56dc2b4 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/RepositoryRoleToRepositoryRoleDtoMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/RepositoryRoleToRepositoryRoleDtoMapper.java @@ -30,6 +30,7 @@ import org.mapstruct.Mapper; import org.mapstruct.ObjectFactory; import sonia.scm.repository.RepositoryRole; import sonia.scm.repository.RepositoryRolePermissions; +import sonia.scm.web.EdisonHalAppender; import javax.inject.Inject; diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/RepositoryToRepositoryDtoMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/RepositoryToRepositoryDtoMapper.java index 2105124015..8dd3e8fb1b 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/RepositoryToRepositoryDtoMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/RepositoryToRepositoryDtoMapper.java @@ -38,6 +38,7 @@ import sonia.scm.repository.api.Command; import sonia.scm.repository.api.RepositoryService; import sonia.scm.repository.api.RepositoryServiceFactory; import sonia.scm.repository.api.ScmProtocol; +import sonia.scm.web.EdisonHalAppender; import sonia.scm.web.api.RepositoryToHalMapper; import java.util.List; diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ResteasyViolationExceptionToErrorDtoMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ResteasyViolationExceptionToErrorDtoMapper.java index 1c726489f9..e94bd57503 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ResteasyViolationExceptionToErrorDtoMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ResteasyViolationExceptionToErrorDtoMapper.java @@ -21,10 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.api.v2.resources; -import org.jboss.resteasy.api.validation.ResteasyViolationException; import org.mapstruct.AfterMapping; import org.mapstruct.Mapper; import org.mapstruct.Mapping; @@ -32,6 +31,7 @@ import org.mapstruct.MappingTarget; import org.slf4j.MDC; import javax.validation.ConstraintViolation; +import javax.validation.ConstraintViolationException; import java.util.List; import java.util.stream.Collectors; @@ -42,7 +42,8 @@ public abstract class ResteasyViolationExceptionToErrorDtoMapper { @Mapping(target = "transactionId", ignore = true) @Mapping(target = "context", ignore = true) @Mapping(target = "url", ignore = true) - public abstract ErrorDto map(ResteasyViolationException exception); + @Mapping(target = "violations", ignore = true) + public abstract ErrorDto map(ConstraintViolationException exception); @AfterMapping void setTransactionId(@MappingTarget ErrorDto dto) { @@ -50,7 +51,7 @@ public abstract class ResteasyViolationExceptionToErrorDtoMapper { } @AfterMapping - void mapViolations(ResteasyViolationException exception, @MappingTarget ErrorDto dto) { + void mapViolations(ConstraintViolationException exception, @MappingTarget ErrorDto dto) { List violations = exception.getConstraintViolations() .stream() diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/TagToTagDtoMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/TagToTagDtoMapper.java index bd7a2b1a5f..e056162dcc 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/TagToTagDtoMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/TagToTagDtoMapper.java @@ -32,6 +32,7 @@ import org.mapstruct.Mapping; import org.mapstruct.ObjectFactory; import sonia.scm.repository.NamespaceAndName; import sonia.scm.repository.Tag; +import sonia.scm.web.EdisonHalAppender; import javax.inject.Inject; diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/UserToUserDtoMapper.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/UserToUserDtoMapper.java index 01435ab614..322c951962 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/UserToUserDtoMapper.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/UserToUserDtoMapper.java @@ -33,6 +33,7 @@ import sonia.scm.security.PermissionPermissions; import sonia.scm.user.User; import sonia.scm.user.UserManager; import sonia.scm.user.UserPermissions; +import sonia.scm.web.EdisonHalAppender; import javax.inject.Inject; diff --git a/scm-webapp/src/main/java/sonia/scm/plugin/DefaultPluginManager.java b/scm-webapp/src/main/java/sonia/scm/plugin/DefaultPluginManager.java index bb6dc1491f..9acd07641e 100644 --- a/scm-webapp/src/main/java/sonia/scm/plugin/DefaultPluginManager.java +++ b/scm-webapp/src/main/java/sonia/scm/plugin/DefaultPluginManager.java @@ -157,7 +157,7 @@ public class DefaultPluginManager implements PluginManager { @Override public void install(String name, boolean restartAfterInstallation) { - PluginPermissions.manage().check(); + PluginPermissions.write().check(); getInstalled(name) .map(InstalledPlugin::isCore) @@ -192,7 +192,7 @@ public class DefaultPluginManager implements PluginManager { @Override public void uninstall(String name, boolean restartAfterInstallation) { - PluginPermissions.manage().check(); + PluginPermissions.write().check(); InstalledPlugin installed = getInstalled(name) .orElseThrow(() -> NotFoundException.notFound(entity(InstalledPlugin.class, name))); doThrow().violation("plugin is a core plugin and cannot be uninstalled").when(installed.isCore()); @@ -231,7 +231,7 @@ public class DefaultPluginManager implements PluginManager { @Override public void executePendingAndRestart() { - PluginPermissions.manage().check(); + PluginPermissions.write().check(); if (!pendingInstallQueue.isEmpty() || getInstalled().stream().anyMatch(InstalledPlugin::isMarkedForUninstall)) { triggerRestart("execute pending plugin changes"); } @@ -278,7 +278,7 @@ public class DefaultPluginManager implements PluginManager { @Override public void cancelPending() { - PluginPermissions.manage().check(); + PluginPermissions.write().check(); pendingUninstallQueue.forEach(PendingPluginUninstallation::cancel); pendingInstallQueue.forEach(PendingPluginInstallation::cancel); pendingUninstallQueue.clear(); @@ -288,7 +288,7 @@ public class DefaultPluginManager implements PluginManager { @Override public void updateAll() { - PluginPermissions.manage().check(); + PluginPermissions.write().check(); for (InstalledPlugin installedPlugin : getInstalled()) { String pluginName = installedPlugin.getDescriptor().getInformation().getName(); if (isUpdatable(pluginName)) { diff --git a/scm-webapp/src/main/resources/locales/de/plugins.json b/scm-webapp/src/main/resources/locales/de/plugins.json index 8c5c88e0f8..314dac3de4 100644 --- a/scm-webapp/src/main/resources/locales/de/plugins.json +++ b/scm-webapp/src/main/resources/locales/de/plugins.json @@ -215,6 +215,10 @@ "8nRuFzjss1": { "displayName": "Fehler beim Löschen falscher Downloads", "description": "Ein fehlerhaft heruntergeladenes Plugin konnte nicht gelöscht werden. Bitte prüfen Sie die Server Logs und löschen die Datei manuell." + }, + "2qRyyaVcJ1": { + "displayName": "Ungültig formatiertes Element", + "description": "Die Eingabe beinhaltete unfültige Formate. Bitte prüfen Sie die Server Logs für genauere Informationen." } }, "namespaceStrategies": { diff --git a/scm-webapp/src/main/resources/locales/en/plugins.json b/scm-webapp/src/main/resources/locales/en/plugins.json index 998e796bac..fba82da650 100644 --- a/scm-webapp/src/main/resources/locales/en/plugins.json +++ b/scm-webapp/src/main/resources/locales/en/plugins.json @@ -215,6 +215,10 @@ "8nRuFzjss1": { "displayName": "Error while cleaning up failed plugin", "description": "A failed plugin download could not be removed correctly. Please check the server log and remove the plugin manually." + }, + "2qRyyaVcJ1": { + "displayName": "Invalid format in element", + "description": "The input had some invalid formats. Please check the server log for further information." } }, "namespaceStrategies": { diff --git a/scm-webapp/src/test/java/sonia/scm/ProxyPushStateDispatcherTest.java b/scm-webapp/src/test/java/sonia/scm/ProxyPushStateDispatcherTest.java index 3fbbfafdcd..422edb2ce5 100644 --- a/scm-webapp/src/test/java/sonia/scm/ProxyPushStateDispatcherTest.java +++ b/scm-webapp/src/test/java/sonia/scm/ProxyPushStateDispatcherTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm; import com.google.common.base.Charsets; @@ -33,16 +33,23 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; +import javax.servlet.ReadListener; import javax.servlet.ServletInputStream; import javax.servlet.ServletOutputStream; +import javax.servlet.WriteListener; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.InputStream; import java.net.HttpURLConnection; -import java.util.*; +import java.util.Collection; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Vector; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.verify; @@ -173,7 +180,7 @@ public class ProxyPushStateDispatcherTest { private class DevServletInputStream extends ServletInputStream { - private InputStream inputStream; + private ByteArrayInputStream inputStream; private DevServletInputStream(String content) { inputStream = new ByteArrayInputStream(content.getBytes(Charsets.UTF_8)); @@ -183,6 +190,20 @@ public class ProxyPushStateDispatcherTest { public int read() throws IOException { return inputStream.read(); } + + @Override + public boolean isReady() { + return inputStream.available() > 0; + } + + @Override + public boolean isFinished() { + return inputStream.available() == 0; + } + + @Override + public void setReadListener(ReadListener readListener) { + } } private class DevServletOutputStream extends ServletOutputStream { @@ -193,6 +214,15 @@ public class ProxyPushStateDispatcherTest { public void write(int b) { stream.write(b); } + + @Override + public boolean isReady() { + return true; + } + + @Override + public void setWriteListener(WriteListener writeListener) { + } } } diff --git a/scm-webapp/src/test/java/sonia/scm/ScmLogFilePropertyDefinerTest.java b/scm-webapp/src/test/java/sonia/scm/ScmLogFilePropertyDefinerTest.java new file mode 100644 index 0000000000..4ad33b9697 --- /dev/null +++ b/scm-webapp/src/test/java/sonia/scm/ScmLogFilePropertyDefinerTest.java @@ -0,0 +1,93 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.api.io.TempDir; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +import java.nio.file.Path; +import java.util.Properties; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.when; + +@ExtendWith({MockitoExtension.class}) +class ScmLogFilePropertyDefinerTest { + + @Mock + private SCMContextProvider context; + + @Test + void shouldReturnPath(@TempDir Path tempDir) { + when(context.getBaseDirectory()).thenReturn(tempDir.toFile()); + ScmLogFilePropertyDefiner definer = builder().create(); + + Path logDirectory = tempDir.resolve("logs"); + assertThat(definer.getPropertyValue()).isEqualTo(logDirectory.toAbsolutePath().toString()); + } + + @Test + void shouldReturnOsxPath(@TempDir Path tempDir) { + ScmLogFilePropertyDefiner definer = builder() + .withOs("Mac OS X") + .withUserHome(tempDir.toAbsolutePath().toString()) + .create(); + + Path logDirectory = tempDir.resolve("Library/Logs/SCM-Manager"); + assertThat(definer.getPropertyValue()).isEqualTo(logDirectory.toAbsolutePath().toString()); + } + + private ScmLogFilePropertyDefinerBuilder builder() { + return new ScmLogFilePropertyDefinerBuilder(); + } + + private class ScmLogFilePropertyDefinerBuilder { + + private Platform platform; + private Properties properties = new Properties(); + + public ScmLogFilePropertyDefinerBuilder() { + withOs("Linux"); + } + + public ScmLogFilePropertyDefinerBuilder withOs(String osName) { + platform = new Platform(osName, "64", "x86_64"); + return this; + } + + public ScmLogFilePropertyDefinerBuilder withUserHome(String path) { + properties.setProperty("user.home", path); + return this; + } + + public ScmLogFilePropertyDefiner create() { + return new ScmLogFilePropertyDefiner(context, platform, properties); + } + + } +} diff --git a/scm-webapp/src/test/java/sonia/scm/WebResourceServletTest.java b/scm-webapp/src/test/java/sonia/scm/WebResourceServletTest.java index 8364a53000..21727e56b3 100644 --- a/scm-webapp/src/test/java/sonia/scm/WebResourceServletTest.java +++ b/scm-webapp/src/test/java/sonia/scm/WebResourceServletTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm; import com.google.common.base.Charsets; @@ -37,6 +37,7 @@ import sonia.scm.plugin.PluginLoader; import sonia.scm.plugin.UberWebResourceLoader; import javax.servlet.ServletOutputStream; +import javax.servlet.WriteListener; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.ByteArrayOutputStream; @@ -152,6 +153,15 @@ public class WebResourceServletTest { public void write(int b) { buffer.write(b); } + + @Override + public boolean isReady() { + return true; + } + + @Override + public void setWriteListener(WriteListener writeListener) { + } } } diff --git a/scm-webapp/src/test/java/sonia/scm/api/InvalidFormatExceptionMapperTest.java b/scm-webapp/src/test/java/sonia/scm/api/InvalidFormatExceptionMapperTest.java new file mode 100644 index 0000000000..c06da77c92 --- /dev/null +++ b/scm-webapp/src/test/java/sonia/scm/api/InvalidFormatExceptionMapperTest.java @@ -0,0 +1,74 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * 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. + */ + +package sonia.scm.api; + +import org.jboss.resteasy.mock.MockDispatcherFactory; +import org.jboss.resteasy.mock.MockHttpRequest; +import org.jboss.resteasy.mock.MockHttpResponse; +import org.jboss.resteasy.spi.Dispatcher; +import org.junit.jupiter.api.Test; + +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import java.io.UnsupportedEncodingException; +import java.net.URISyntaxException; + +import static org.assertj.core.api.Assertions.assertThat; + +class InvalidFormatExceptionMapperTest { + + @Test + void shouldMapInvalidFormatExceptionDueToInvalidEnum() throws URISyntaxException, UnsupportedEncodingException { + Dispatcher dispatcher = MockDispatcherFactory.createDispatcher(); + dispatcher.getRegistry().addSingletonResource(new SimpleResource()); + dispatcher.getProviderFactory().registerProvider(InvalidFormatExceptionMapper.class); + + MockHttpRequest request = MockHttpRequest + .post("/") + .contentType("application/json") + .content("{\"e\": \"NONE\"}".getBytes()); + MockHttpResponse response = new MockHttpResponse(); + + dispatcher.invoke(request, response); + + assertThat(response.getStatus()).isEqualTo(400); + assertThat(response.getContentAsString()).contains("2qRyyaVcJ1"); + } + + @Path("/") + static class SimpleResource { + @POST + public void post(ObjectWithEnum o) { + } + } + + static class ObjectWithEnum { + public Enum e; + } + + enum Enum { + ONE, TWO + } +} diff --git a/scm-webapp/src/test/java/sonia/scm/api/v2/resources/DiffResultToDiffResultDtoMapperTest.java b/scm-webapp/src/test/java/sonia/scm/api/v2/resources/DiffResultToDiffResultDtoMapperTest.java index 3c88c76675..291b04e00c 100644 --- a/scm-webapp/src/test/java/sonia/scm/api/v2/resources/DiffResultToDiffResultDtoMapperTest.java +++ b/scm-webapp/src/test/java/sonia/scm/api/v2/resources/DiffResultToDiffResultDtoMapperTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.api.v2.resources; import de.otto.edison.hal.Link; @@ -35,11 +35,13 @@ import sonia.scm.repository.api.DiffResult; import sonia.scm.repository.api.Hunk; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.OptionalInt; import static java.net.URI.create; +import static java.util.Collections.emptyIterator; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -60,6 +62,8 @@ class DiffResultToDiffResultDtoMapperTest { assertAddedFile(files.get(0), "A.java", "abc", "java"); assertModifiedFile(files.get(1), "B.ts", "abc", "def", "typescript"); assertDeletedFile(files.get(2), "C.go", "ghi", "golang"); + assertRenamedFile(files.get(3), "typo.ts", "okay.ts", "def", "fixed", "typescript"); + assertCopiedFile(files.get(4), "good.ts", "better.ts", "def", "fixed", "typescript"); DiffResultDto.HunkDto hunk = files.get(1).getHunks().get(0); assertHunk(hunk, "@@ -3,4 1,2 @@", 1, 2, 3, 4); @@ -104,7 +108,9 @@ class DiffResultToDiffResultDtoMapperTest { deletedLine("c", 3) ) ), - deletedFile("C.go", "ghi") + deletedFile("C.go", "ghi"), + renamedFile("okay.ts", "typo.ts", "fixed", "def"), + copiedFile("better.ts", "good.ts", "fixed", "def") ); } @@ -161,6 +167,24 @@ class DiffResultToDiffResultDtoMapperTest { assertThat(file.getLanguage()).isEqualTo(language); } + private void assertRenamedFile(DiffResultDto.FileDto file, String oldPath, String newPath, String oldRevision, String newRevision, String language) { + assertThat(file.getOldPath()).isEqualTo(oldPath); + assertThat(file.getNewPath()).isEqualTo(newPath); + assertThat(file.getOldRevision()).isEqualTo(oldRevision); + assertThat(file.getNewRevision()).isEqualTo(newRevision); + assertThat(file.getType()).isEqualTo("rename"); + assertThat(file.getLanguage()).isEqualTo(language); + } + + private void assertCopiedFile(DiffResultDto.FileDto file, String oldPath, String newPath, String oldRevision, String newRevision, String language) { + assertThat(file.getOldPath()).isEqualTo(oldPath); + assertThat(file.getNewPath()).isEqualTo(newPath); + assertThat(file.getOldRevision()).isEqualTo(oldRevision); + assertThat(file.getNewRevision()).isEqualTo(newRevision); + assertThat(file.getType()).isEqualTo("copy"); + assertThat(file.getLanguage()).isEqualTo(language); + } + private DiffResult result(DiffFile... files) { DiffResult result = mock(DiffResult.class); when(result.iterator()).thenReturn(Arrays.asList(files).iterator()); @@ -171,6 +195,7 @@ class DiffResultToDiffResultDtoMapperTest { DiffFile file = mock(DiffFile.class); when(file.getNewPath()).thenReturn(path); when(file.getNewRevision()).thenReturn(revision); + when(file.getChangeType()).thenReturn(DiffFile.ChangeType.ADD); when(file.iterator()).thenReturn(Arrays.asList(hunks).iterator()); return file; } @@ -179,6 +204,7 @@ class DiffResultToDiffResultDtoMapperTest { DiffFile file = mock(DiffFile.class); when(file.getOldPath()).thenReturn(path); when(file.getOldRevision()).thenReturn(revision); + when(file.getChangeType()).thenReturn(DiffFile.ChangeType.DELETE); when(file.iterator()).thenReturn(Arrays.asList(hunks).iterator()); return file; } @@ -189,10 +215,33 @@ class DiffResultToDiffResultDtoMapperTest { when(file.getNewRevision()).thenReturn(newRevision); when(file.getOldPath()).thenReturn(path); when(file.getOldRevision()).thenReturn(oldRevision); + when(file.getChangeType()).thenReturn(DiffFile.ChangeType.MODIFY); when(file.iterator()).thenReturn(Arrays.asList(hunks).iterator()); return file; } + private DiffFile renamedFile(String newPath, String oldPath, String newRevision, String oldRevision) { + DiffFile file = mock(DiffFile.class); + when(file.getNewPath()).thenReturn(newPath); + when(file.getNewRevision()).thenReturn(newRevision); + when(file.getOldPath()).thenReturn(oldPath); + when(file.getOldRevision()).thenReturn(oldRevision); + when(file.getChangeType()).thenReturn(DiffFile.ChangeType.RENAME); + when(file.iterator()).thenReturn(emptyIterator()); + return file; + } + + private DiffFile copiedFile(String newPath, String oldPath, String newRevision, String oldRevision) { + DiffFile file = mock(DiffFile.class); + when(file.getNewPath()).thenReturn(newPath); + when(file.getNewRevision()).thenReturn(newRevision); + when(file.getOldPath()).thenReturn(oldPath); + when(file.getOldRevision()).thenReturn(oldRevision); + when(file.getChangeType()).thenReturn(DiffFile.ChangeType.COPY); + when(file.iterator()).thenReturn(emptyIterator()); + return file; + } + private Hunk hunk(String rawHeader, int newStart, int newLineCount, int oldStart, int oldLineCount, DiffLine... lines) { Hunk hunk = mock(Hunk.class); when(hunk.getRawHeader()).thenReturn(rawHeader); diff --git a/scm-webapp/src/test/java/sonia/scm/api/v2/resources/ModificationsResourceTest.java b/scm-webapp/src/test/java/sonia/scm/api/v2/resources/ModificationsResourceTest.java index 23893f9f95..9c6a3b984c 100644 --- a/scm-webapp/src/test/java/sonia/scm/api/v2/resources/ModificationsResourceTest.java +++ b/scm-webapp/src/test/java/sonia/scm/api/v2/resources/ModificationsResourceTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.api.v2.resources; import com.google.inject.util.Providers; @@ -30,7 +30,6 @@ import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.support.SubjectThreadState; import org.apache.shiro.util.ThreadContext; import org.apache.shiro.util.ThreadState; -import org.assertj.core.util.Lists; import org.jboss.resteasy.mock.MockHttpRequest; import org.jboss.resteasy.mock.MockHttpResponse; import org.junit.After; @@ -40,9 +39,12 @@ import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; +import sonia.scm.repository.Added; import sonia.scm.repository.InternalRepositoryException; import sonia.scm.repository.Modifications; import sonia.scm.repository.NamespaceAndName; +import sonia.scm.repository.Removed; +import sonia.scm.repository.Modified; import sonia.scm.repository.Repository; import sonia.scm.repository.api.ModificationsCommandBuilder; import sonia.scm.repository.api.RepositoryService; @@ -141,7 +143,6 @@ public class ModificationsResourceTest extends RepositoryTestBase { @Test public void shouldGetModifications() throws Exception { - Modifications modifications = new Modifications(); String revision = "revision"; String addedFile_1 = "a.txt"; String addedFile_2 = "b.txt"; @@ -149,10 +150,13 @@ public class ModificationsResourceTest extends RepositoryTestBase { String modifiedFile_2 = "c.txt"; String removedFile_1 = "e.txt"; String removedFile_2 = "f.txt"; - modifications.setRevision(revision); - modifications.setAdded(Lists.newArrayList(addedFile_1, addedFile_2)); - modifications.setModified(Lists.newArrayList(modifiedFile_1, modifiedFile_2)); - modifications.setRemoved(Lists.newArrayList(removedFile_1, removedFile_2)); + Modifications modifications = new Modifications(revision, + new Added(addedFile_1), + new Added(addedFile_2), + new Modified(modifiedFile_1), + new Modified(modifiedFile_2), + new Removed(removedFile_1), + new Removed(removedFile_2)); when(modificationsCommandBuilder.getModifications()).thenReturn(modifications); when(modificationsCommandBuilder.revision(eq(revision))).thenReturn(modificationsCommandBuilder); diff --git a/scm-webapp/src/test/java/sonia/scm/api/v2/resources/PendingPluginResourceTest.java b/scm-webapp/src/test/java/sonia/scm/api/v2/resources/PendingPluginResourceTest.java index 2f545761b7..00c4191dd7 100644 --- a/scm-webapp/src/test/java/sonia/scm/api/v2/resources/PendingPluginResourceTest.java +++ b/scm-webapp/src/test/java/sonia/scm/api/v2/resources/PendingPluginResourceTest.java @@ -114,7 +114,7 @@ class PendingPluginResourceTest { @BeforeEach void bindSubject() { ThreadContext.bind(subject); - lenient().when(subject.isPermitted("plugin:manage")).thenReturn(true); + lenient().when(subject.isPermitted("plugin:write")).thenReturn(true); lenient().when(restarter.isSupported()).thenReturn(true); } @@ -228,7 +228,7 @@ class PendingPluginResourceTest { @BeforeEach void bindSubject() { ThreadContext.bind(subject); - when(subject.isPermitted("plugin:manage")).thenReturn(false); + when(subject.isPermitted("plugin:write")).thenReturn(false); } @AfterEach diff --git a/scm-webapp/src/test/java/sonia/scm/api/v2/resources/PluginDtoCollectionMapperTest.java b/scm-webapp/src/test/java/sonia/scm/api/v2/resources/PluginDtoCollectionMapperTest.java index a3fa801a22..f91c7b08b9 100644 --- a/scm-webapp/src/test/java/sonia/scm/api/v2/resources/PluginDtoCollectionMapperTest.java +++ b/scm-webapp/src/test/java/sonia/scm/api/v2/resources/PluginDtoCollectionMapperTest.java @@ -119,7 +119,7 @@ class PluginDtoCollectionMapperTest { @Test void shouldNotAddInstallLinkForNewVersionWhenNotPermitted() { - when(subject.isPermitted("plugin:manage")).thenReturn(false); + when(subject.isPermitted("plugin:write")).thenReturn(false); PluginDtoCollectionMapper mapper = new PluginDtoCollectionMapper(resourceLinks, pluginDtoMapper, manager); HalRepresentation result = mapper.mapInstalled( @@ -132,7 +132,7 @@ class PluginDtoCollectionMapperTest { @Test void shouldNotAddInstallLinkForNewVersionWhenInstallationIsPending() { - when(subject.isPermitted("plugin:manage")).thenReturn(true); + when(subject.isPermitted("plugin:write")).thenReturn(true); PluginDtoCollectionMapper mapper = new PluginDtoCollectionMapper(resourceLinks, pluginDtoMapper, manager); AvailablePlugin availablePlugin = createAvailablePlugin("scm-some-plugin", "2"); @@ -147,7 +147,7 @@ class PluginDtoCollectionMapperTest { @Test void shouldAddUpdateLinkForNewVersionWhenPermitted() { - when(subject.isPermitted("plugin:manage")).thenReturn(true); + when(subject.isPermitted("plugin:write")).thenReturn(true); PluginDtoCollectionMapper mapper = new PluginDtoCollectionMapper(resourceLinks, pluginDtoMapper, manager); HalRepresentation result = mapper.mapInstalled( @@ -161,7 +161,7 @@ class PluginDtoCollectionMapperTest { @Test void shouldAddUpdateWithRestartLinkForNewVersionWhenPermitted() { when(restarter.isSupported()).thenReturn(true); - when(subject.isPermitted("plugin:manage")).thenReturn(true); + when(subject.isPermitted("plugin:write")).thenReturn(true); PluginDtoCollectionMapper mapper = new PluginDtoCollectionMapper(resourceLinks, pluginDtoMapper, manager); HalRepresentation result = mapper.mapInstalled( @@ -175,7 +175,7 @@ class PluginDtoCollectionMapperTest { @Test void shouldSetInstalledPluginPendingWhenCorrespondingAvailablePluginIsPending() { - when(subject.isPermitted("plugin:manage")).thenReturn(true); + when(subject.isPermitted("plugin:write")).thenReturn(true); PluginDtoCollectionMapper mapper = new PluginDtoCollectionMapper(resourceLinks, pluginDtoMapper, manager); AvailablePlugin availablePlugin = createAvailablePlugin("scm-some-plugin", "2"); diff --git a/scm-webapp/src/test/java/sonia/scm/api/v2/resources/PluginDtoMapperTest.java b/scm-webapp/src/test/java/sonia/scm/api/v2/resources/PluginDtoMapperTest.java index 8301e6fb76..7c3c3975c0 100644 --- a/scm-webapp/src/test/java/sonia/scm/api/v2/resources/PluginDtoMapperTest.java +++ b/scm-webapp/src/test/java/sonia/scm/api/v2/resources/PluginDtoMapperTest.java @@ -127,7 +127,7 @@ class PluginDtoMapperTest { @Test void shouldAppendInstallLink() { - when(subject.isPermitted("plugin:manage")).thenReturn(true); + when(subject.isPermitted("plugin:write")).thenReturn(true); AvailablePlugin plugin = createAvailable(createPluginInformation()); PluginDto dto = mapper.mapAvailable(plugin); @@ -138,7 +138,7 @@ class PluginDtoMapperTest { @Test void shouldAppendInstallWithRestartLink() { when(restarter.isSupported()).thenReturn(true); - when(subject.isPermitted("plugin:manage")).thenReturn(true); + when(subject.isPermitted("plugin:write")).thenReturn(true); AvailablePlugin plugin = createAvailable(createPluginInformation()); PluginDto dto = mapper.mapAvailable(plugin); @@ -166,7 +166,7 @@ class PluginDtoMapperTest { @Test void shouldAppendUninstallLink() { - when(subject.isPermitted("plugin:manage")).thenReturn(true); + when(subject.isPermitted("plugin:write")).thenReturn(true); InstalledPlugin plugin = createInstalled(createPluginInformation()); when(plugin.isUninstallable()).thenReturn(true); @@ -178,7 +178,7 @@ class PluginDtoMapperTest { @Test void shouldAppendUninstallWithRestartLink() { when(restarter.isSupported()).thenReturn(true); - when(subject.isPermitted("plugin:manage")).thenReturn(true); + when(subject.isPermitted("plugin:write")).thenReturn(true); InstalledPlugin plugin = createInstalled(createPluginInformation()); when(plugin.isUninstallable()).thenReturn(true); diff --git a/scm-webapp/src/test/java/sonia/scm/lifecycle/RestartServletTest.java b/scm-webapp/src/test/java/sonia/scm/lifecycle/RestartServletTest.java index 324f43dcb7..eeae7c697a 100644 --- a/scm-webapp/src/test/java/sonia/scm/lifecycle/RestartServletTest.java +++ b/scm-webapp/src/test/java/sonia/scm/lifecycle/RestartServletTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.lifecycle; import com.github.legman.Subscribe; @@ -34,6 +34,7 @@ import sonia.scm.Stage; import sonia.scm.event.ScmEventBus; import sonia.scm.event.ScmTestEventBus; +import javax.servlet.ReadListener; import javax.servlet.ServletInputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -128,6 +129,21 @@ public class RestartServletTest { private ServletInputStream createServletInputStream(final InputStream inputStream) { return new ServletInputStream() { + @Override + public boolean isFinished() { + return false; + } + + @Override + public boolean isReady() { + return false; + } + + @Override + public void setReadListener(ReadListener readListener) { + + } + @Override public int read() throws IOException { return inputStream.read(); diff --git a/scm-webapp/src/test/java/sonia/scm/lifecycle/VersionsTest.java b/scm-webapp/src/test/java/sonia/scm/lifecycle/VersionsTest.java index a59de4fa25..c865d5e5cb 100644 --- a/scm-webapp/src/test/java/sonia/scm/lifecycle/VersionsTest.java +++ b/scm-webapp/src/test/java/sonia/scm/lifecycle/VersionsTest.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.lifecycle; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; @@ -41,7 +41,7 @@ import java.nio.file.Paths; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.doReturn; -@ExtendWith({MockitoExtension.class, TempDirectory.class}) +@ExtendWith({MockitoExtension.class}) class VersionsTest { @Mock @@ -51,7 +51,7 @@ class VersionsTest { private Versions versions; @Test - void shouldReturnTrueForVersionsPreviousTo160(@TempDirectory.TempDir Path directory) throws IOException { + void shouldReturnTrueForVersionsPreviousTo160(@TempDir Path directory) throws IOException { setVersion(directory, "1.59"); assertThat(versions.isPreviousVersionTooOld()).isTrue(); @@ -60,19 +60,19 @@ class VersionsTest { } @Test - void shouldReturnFalseForVersion160(@TempDirectory.TempDir Path directory) throws IOException { + void shouldReturnFalseForVersion160(@TempDir Path directory) throws IOException { setVersion(directory, "1.60"); assertThat(versions.isPreviousVersionTooOld()).isFalse(); } @Test - void shouldNotFailIfVersionContainsLineBreak(@TempDirectory.TempDir Path directory) throws IOException { + void shouldNotFailIfVersionContainsLineBreak(@TempDir Path directory) throws IOException { setVersion(directory, "1.59\n"); assertThat(versions.isPreviousVersionTooOld()).isTrue(); } @Test - void shouldReturnFalseForVersionsNewerAs160(@TempDirectory.TempDir Path directory) throws IOException { + void shouldReturnFalseForVersionsNewerAs160(@TempDir Path directory) throws IOException { setVersion(directory, "1.61"); assertThat(versions.isPreviousVersionTooOld()).isFalse(); @@ -81,13 +81,13 @@ class VersionsTest { } @Test - void shouldReturnFalseForNonExistingVersionFile(@TempDirectory.TempDir Path directory) { + void shouldReturnFalseForNonExistingVersionFile(@TempDir Path directory) { setVersionFile(directory.resolve("version.txt")); assertThat(versions.isPreviousVersionTooOld()).isFalse(); } @Test - void shouldWriteNewVersion(@TempDirectory.TempDir Path directory) { + void shouldWriteNewVersion(@TempDir Path directory) { Path config = directory.resolve("config"); doReturn(config).when(contextProvider).resolve(Paths.get("config")); doReturn("2.0.0").when(contextProvider).getVersion(); diff --git a/scm-webapp/src/test/java/sonia/scm/plugin/DefaultPluginManagerTest.java b/scm-webapp/src/test/java/sonia/scm/plugin/DefaultPluginManagerTest.java index 03b12f92cf..afb7c4eea1 100644 --- a/scm-webapp/src/test/java/sonia/scm/plugin/DefaultPluginManagerTest.java +++ b/scm-webapp/src/test/java/sonia/scm/plugin/DefaultPluginManagerTest.java @@ -34,7 +34,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.InjectMocks; @@ -48,7 +48,6 @@ import sonia.scm.lifecycle.Restarter; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; -import java.util.Collections; import java.util.List; import java.util.Optional; @@ -56,7 +55,6 @@ import static java.util.Arrays.asList; import static java.util.Collections.singleton; import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.in; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.any; import static org.mockito.Mockito.doNothing; @@ -72,7 +70,6 @@ import static sonia.scm.plugin.PluginTestHelper.createAvailable; import static sonia.scm.plugin.PluginTestHelper.createInstalled; @ExtendWith(MockitoExtension.class) -@ExtendWith(TempDirectory.class) class DefaultPluginManagerTest { @Mock @@ -372,7 +369,7 @@ class DefaultPluginManagerTest { } @Test - void shouldCreateUninstallFile(@TempDirectory.TempDir Path temp) { + void shouldCreateUninstallFile(@TempDir Path temp) { InstalledPlugin mailPlugin = createInstalled("scm-mail-plugin"); when(mailPlugin.getDirectory()).thenReturn(temp); @@ -384,7 +381,7 @@ class DefaultPluginManagerTest { } @Test - void shouldMarkPluginForUninstall(@TempDirectory.TempDir Path temp) { + void shouldMarkPluginForUninstall(@TempDir Path temp) { InstalledPlugin mailPlugin = createInstalled("scm-mail-plugin"); when(mailPlugin.getDirectory()).thenReturn(temp); @@ -414,7 +411,7 @@ class DefaultPluginManagerTest { } @Test - void shouldThrowExceptionWhenUninstallingCorePlugin(@TempDirectory.TempDir Path temp) { + void shouldThrowExceptionWhenUninstallingCorePlugin(@TempDir Path temp) { InstalledPlugin mailPlugin = createInstalled("scm-mail-plugin"); when(mailPlugin.getDirectory()).thenReturn(temp); when(mailPlugin.isCore()).thenReturn(true); @@ -484,7 +481,7 @@ class DefaultPluginManagerTest { } @Test - void shouldUndoPendingInstallations(@TempDirectory.TempDir Path temp) throws IOException { + void shouldUndoPendingInstallations(@TempDir Path temp) throws IOException { InstalledPlugin mailPlugin = createInstalled("scm-ssh-plugin"); Path mailPluginPath = temp.resolve("scm-mail-plugin"); Files.createDirectories(mailPluginPath); @@ -602,12 +599,12 @@ class DefaultPluginManagerTest { } @Nested - class WithoutManagePermissions { + class WithoutWritePermissions { @BeforeEach void setUpSubject() { ThreadContext.bind(subject); - doThrow(AuthorizationException.class).when(subject).checkPermission("plugin:manage"); + doThrow(AuthorizationException.class).when(subject).checkPermission("plugin:write"); } @AfterEach diff --git a/scm-webapp/src/test/java/sonia/scm/plugin/PendingPluginInstallationTest.java b/scm-webapp/src/test/java/sonia/scm/plugin/PendingPluginInstallationTest.java index ba275bc820..b668870488 100644 --- a/scm-webapp/src/test/java/sonia/scm/plugin/PendingPluginInstallationTest.java +++ b/scm-webapp/src/test/java/sonia/scm/plugin/PendingPluginInstallationTest.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.plugin; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.Answers; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; @@ -39,14 +39,14 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.when; -@ExtendWith({MockitoExtension.class, TempDirectory.class}) +@ExtendWith({MockitoExtension.class}) class PendingPluginInstallationTest { @Mock(answer = Answers.RETURNS_DEEP_STUBS) private AvailablePlugin plugin; @Test - void shouldDeleteFileOnCancel(@TempDirectory.TempDir Path directory) throws IOException { + void shouldDeleteFileOnCancel(@TempDir Path directory) throws IOException { Path file = directory.resolve("file"); Files.write(file, "42".getBytes()); @@ -59,7 +59,7 @@ class PendingPluginInstallationTest { } @Test - void shouldThrowExceptionIfCancelFailed(@TempDirectory.TempDir Path directory) { + void shouldThrowExceptionIfCancelFailed(@TempDir Path directory) { Path file = directory.resolve("file"); when(plugin.getDescriptor().getInformation().getName()).thenReturn("scm-awesome-plugin"); diff --git a/scm-webapp/src/test/java/sonia/scm/plugin/PluginInstallerTest.java b/scm-webapp/src/test/java/sonia/scm/plugin/PluginInstallerTest.java index 14bb26f87c..bccbb67f3c 100644 --- a/scm-webapp/src/test/java/sonia/scm/plugin/PluginInstallerTest.java +++ b/scm-webapp/src/test/java/sonia/scm/plugin/PluginInstallerTest.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.plugin; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.Answers; import org.mockito.InjectMocks; import org.mockito.Mock; @@ -45,9 +45,13 @@ import java.util.Collections; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.RETURNS_DEEP_STUBS; +import static org.mockito.Mockito.anyInt; +import static org.mockito.Mockito.lenient; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; -@ExtendWith({MockitoExtension.class, TempDirectory.class}) +@ExtendWith({MockitoExtension.class}) class PluginInstallerTest { @Mock @@ -65,7 +69,7 @@ class PluginInstallerTest { private Path directory; @BeforeEach - void setUpContext(@TempDirectory.TempDir Path directory) throws IOException { + void setUpContext(@TempDir Path directory) throws IOException { this.directory = directory; lenient().when(context.resolve(any())).then(ic -> { Path arg = ic.getArgument(0); diff --git a/scm-webapp/src/test/java/sonia/scm/plugin/SmpDescriptorExtractorTest.java b/scm-webapp/src/test/java/sonia/scm/plugin/SmpDescriptorExtractorTest.java index eea0a2f681..dd8dad5eca 100644 --- a/scm-webapp/src/test/java/sonia/scm/plugin/SmpDescriptorExtractorTest.java +++ b/scm-webapp/src/test/java/sonia/scm/plugin/SmpDescriptorExtractorTest.java @@ -21,13 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.plugin; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import java.io.IOException; import java.nio.file.Files; @@ -38,7 +37,6 @@ import java.util.zip.ZipOutputStream; import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.jupiter.api.Assertions.assertThrows; -@ExtendWith(TempDirectory.class) class SmpDescriptorExtractorTest { private static final String PLUGIN_XML = "\n" + @@ -66,7 +64,7 @@ class SmpDescriptorExtractorTest { "\n"; @Test - void shouldExtractPluginXml(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldExtractPluginXml(@TempDir Path tempDir) throws IOException { Path pluginFile = createZipFile(tempDir, "META-INF/scm/plugin.xml", PLUGIN_XML); InstalledPluginDescriptor installedPluginDescriptor = new SmpDescriptorExtractor().extractPluginDescriptor(pluginFile); @@ -75,14 +73,14 @@ class SmpDescriptorExtractorTest { } @Test - void shouldFailWithoutPluginXml(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldFailWithoutPluginXml(@TempDir Path tempDir) throws IOException { Path pluginFile = createZipFile(tempDir, "META-INF/wrong/plugin.xml", PLUGIN_XML); assertThrows(IOException.class, () -> new SmpDescriptorExtractor().extractPluginDescriptor(pluginFile)); } @Test - void shouldFailWithIllegalPluginXml(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldFailWithIllegalPluginXml(@TempDir Path tempDir) throws IOException { Path pluginFile = createZipFile(tempDir, "META-INF/scm/plugin.xml", "content"); assertThrows(IOException.class, () -> new SmpDescriptorExtractor().extractPluginDescriptor(pluginFile)); diff --git a/scm-webapp/src/test/java/sonia/scm/plugin/UberClassLoaderTest.java b/scm-webapp/src/test/java/sonia/scm/plugin/UberClassLoaderTest.java index 59b8432882..375304e74a 100644 --- a/scm-webapp/src/test/java/sonia/scm/plugin/UberClassLoaderTest.java +++ b/scm-webapp/src/test/java/sonia/scm/plugin/UberClassLoaderTest.java @@ -21,14 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.plugin; import com.google.common.collect.ImmutableSet; import com.google.common.io.Resources; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import java.io.IOException; import java.net.URL; @@ -43,13 +42,12 @@ import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; -@ExtendWith(TempDirectory.class) class UberClassLoaderTest { private final URLClassLoader parentClassLoader = new URLClassLoader(new URL[0]); @Test - void shouldOnlyUseClassloaderOnce(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldOnlyUseClassloaderOnce(@TempDir Path tempDir) throws IOException { ClassLoader mailClassLoader = createClassLoader(tempDir, "plugin.txt", "mail"); ClassLoader reviewClassLoader = createClassLoader(mailClassLoader, tempDir, "plugin.txt", "review"); @@ -61,7 +59,7 @@ class UberClassLoaderTest { } @Test - void shouldReturnResourceFromEachPluginClassLoader(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldReturnResourceFromEachPluginClassLoader(@TempDir Path tempDir) throws IOException { ClassLoader mailClassLoader = createClassLoader(tempDir, "scm.txt", "mail"); ClassLoader reviewClassLoader = createClassLoader(tempDir, "scm.txt", "review"); diff --git a/scm-webapp/src/test/java/sonia/scm/update/group/XmlGroupV1UpdateStepTest.java b/scm-webapp/src/test/java/sonia/scm/update/group/XmlGroupV1UpdateStepTest.java index 95e0dc12bf..434dc075d5 100644 --- a/scm-webapp/src/test/java/sonia/scm/update/group/XmlGroupV1UpdateStepTest.java +++ b/scm-webapp/src/test/java/sonia/scm/update/group/XmlGroupV1UpdateStepTest.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.update.group; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; @@ -39,7 +39,6 @@ import sonia.scm.store.ConfigurationEntryStore; import sonia.scm.store.InMemoryConfigurationEntryStoreFactory; import sonia.scm.update.UpdateStepTestUtil; import sonia.scm.update.V1Properties; -import sonia.scm.update.V1Property; import javax.xml.bind.JAXBException; import java.io.IOException; @@ -55,7 +54,6 @@ import static org.mockito.Mockito.verify; import static sonia.scm.store.InMemoryConfigurationEntryStoreFactory.create; @ExtendWith(MockitoExtension.class) -@ExtendWith(TempDirectory.class) class XmlGroupV1UpdateStepTest { @Mock @@ -72,7 +70,7 @@ class XmlGroupV1UpdateStepTest { @BeforeEach - void mockScmHome(@TempDirectory.TempDir Path tempDir) { + void mockScmHome(@TempDir Path tempDir) { testUtil = new UpdateStepTestUtil(tempDir); updateStep = new XmlGroupV1UpdateStep(testUtil.getContextProvider(), groupDAO, storeFactory); } diff --git a/scm-webapp/src/test/java/sonia/scm/update/repository/CopyMigrationStrategyTest.java b/scm-webapp/src/test/java/sonia/scm/update/repository/CopyMigrationStrategyTest.java index 267b2876da..1766c288f9 100644 --- a/scm-webapp/src/test/java/sonia/scm/update/repository/CopyMigrationStrategyTest.java +++ b/scm-webapp/src/test/java/sonia/scm/update/repository/CopyMigrationStrategyTest.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.update.repository; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import sonia.scm.SCMContextProvider; @@ -44,7 +44,6 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -@ExtendWith(TempDirectory.class) @ExtendWith(MockitoExtension.class) class CopyMigrationStrategyTest { @@ -54,30 +53,30 @@ class CopyMigrationStrategyTest { RepositoryLocationResolver locationResolver; @BeforeEach - void mockContextProvider(@TempDirectory.TempDir Path tempDir) { + void mockContextProvider(@TempDir Path tempDir) { when(contextProvider.getBaseDirectory()).thenReturn(tempDir.toFile()); } @BeforeEach - void createV1Home(@TempDirectory.TempDir Path tempDir) throws IOException { + void createV1Home(@TempDir Path tempDir) throws IOException { V1RepositoryFileSystem.createV1Home(tempDir); } @BeforeEach - void mockLocationResolver(@TempDirectory.TempDir Path tempDir) { + void mockLocationResolver(@TempDir Path tempDir) { RepositoryLocationResolver.RepositoryLocationResolverInstance instanceMock = mock(RepositoryLocationResolver.RepositoryLocationResolverInstance.class); when(locationResolver.forClass(Path.class)).thenReturn(instanceMock); when(instanceMock.createLocation(anyString())).thenAnswer(invocation -> tempDir.resolve((String) invocation.getArgument(0))); } @Test - void shouldUseStandardDirectory(@TempDirectory.TempDir Path tempDir) { + void shouldUseStandardDirectory(@TempDir Path tempDir) { Path target = new CopyMigrationStrategy(contextProvider, locationResolver).migrate("b4f-a9f0-49f7-ad1f-37d3aae1c55f", "some/more/directories/than/one", "git").get(); assertThat(target).isEqualTo(tempDir.resolve("b4f-a9f0-49f7-ad1f-37d3aae1c55f")); } @Test - void shouldCopyDataDirectory(@TempDirectory.TempDir Path tempDir) { + void shouldCopyDataDirectory(@TempDir Path tempDir) { Path target = new CopyMigrationStrategy(contextProvider, locationResolver).migrate("b4f-a9f0-49f7-ad1f-37d3aae1c55f", "some/more/directories/than/one", "git").get(); assertThat(target.resolve("data")).exists(); Path originalDataDir = tempDir diff --git a/scm-webapp/src/test/java/sonia/scm/update/repository/DefaultMigrationStrategyDAOTest.java b/scm-webapp/src/test/java/sonia/scm/update/repository/DefaultMigrationStrategyDAOTest.java index f9596d3a67..1bbba6317e 100644 --- a/scm-webapp/src/test/java/sonia/scm/update/repository/DefaultMigrationStrategyDAOTest.java +++ b/scm-webapp/src/test/java/sonia/scm/update/repository/DefaultMigrationStrategyDAOTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.update.repository; import org.assertj.core.api.Assertions; @@ -29,7 +29,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import sonia.scm.SCMContextProvider; @@ -43,7 +43,6 @@ import static org.mockito.Mockito.when; import static sonia.scm.update.repository.MigrationStrategy.INLINE; @ExtendWith(MockitoExtension.class) -@ExtendWith(TempDirectory.class) class DefaultMigrationStrategyDAOTest { @Mock @@ -52,7 +51,7 @@ class DefaultMigrationStrategyDAOTest { private ConfigurationStoreFactory storeFactory; @BeforeEach - void initStore(@TempDirectory.TempDir Path tempDir) { + void initStore(@TempDir Path tempDir) { when(contextProvider.getBaseDirectory()).thenReturn(tempDir.toFile()); storeFactory = new JAXBConfigurationStoreFactory(contextProvider, null); } diff --git a/scm-webapp/src/test/java/sonia/scm/update/repository/InlineMigrationStrategyTest.java b/scm-webapp/src/test/java/sonia/scm/update/repository/InlineMigrationStrategyTest.java index 2d4a1ba03f..d236859af9 100644 --- a/scm-webapp/src/test/java/sonia/scm/update/repository/InlineMigrationStrategyTest.java +++ b/scm-webapp/src/test/java/sonia/scm/update/repository/InlineMigrationStrategyTest.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.update.repository; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import sonia.scm.SCMContextProvider; @@ -41,7 +41,6 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@ExtendWith(TempDirectory.class) @ExtendWith(MockitoExtension.class) class InlineMigrationStrategyTest { @@ -53,25 +52,25 @@ class InlineMigrationStrategyTest { RepositoryLocationResolver.RepositoryLocationResolverInstance locationResolverInstance; @BeforeEach - void mockContextProvider(@TempDirectory.TempDir Path tempDir) { + void mockContextProvider(@TempDir Path tempDir) { when(locationResolver.forClass(Path.class)).thenReturn(locationResolverInstance); when(contextProvider.getBaseDirectory()).thenReturn(tempDir.toFile()); } @BeforeEach - void createV1Home(@TempDirectory.TempDir Path tempDir) throws IOException { + void createV1Home(@TempDir Path tempDir) throws IOException { V1RepositoryFileSystem.createV1Home(tempDir); } @Test - void shouldUseExistingDirectory(@TempDirectory.TempDir Path tempDir) { + void shouldUseExistingDirectory(@TempDir Path tempDir) { Path target = new InlineMigrationStrategy(contextProvider, locationResolver).migrate("b4f-a9f0-49f7-ad1f-37d3aae1c55f", "some/more/directories/than/one", "git").get(); assertThat(target).isEqualTo(resolveOldDirectory(tempDir)); verify(locationResolverInstance).setLocation("b4f-a9f0-49f7-ad1f-37d3aae1c55f", target); } @Test - void shouldMoveDataDirectory(@TempDirectory.TempDir Path tempDir) { + void shouldMoveDataDirectory(@TempDir Path tempDir) { new InlineMigrationStrategy(contextProvider, locationResolver).migrate("b4f-a9f0-49f7-ad1f-37d3aae1c55f", "some/more/directories/than/one", "git"); assertThat(resolveOldDirectory(tempDir).resolve("data")).exists(); } diff --git a/scm-webapp/src/test/java/sonia/scm/update/repository/MigrateVerbsToPermissionRolesTest.java b/scm-webapp/src/test/java/sonia/scm/update/repository/MigrateVerbsToPermissionRolesTest.java index 81dd03b4ed..72cabf5d8b 100644 --- a/scm-webapp/src/test/java/sonia/scm/update/repository/MigrateVerbsToPermissionRolesTest.java +++ b/scm-webapp/src/test/java/sonia/scm/update/repository/MigrateVerbsToPermissionRolesTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.update.repository; import com.google.common.io.Resources; @@ -29,7 +29,7 @@ import org.assertj.core.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; @@ -51,7 +51,6 @@ import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) -@ExtendWith(TempDirectory.class) class MigrateVerbsToPermissionRolesTest { private static final String EXISTING_REPOSITORY_ID = "id"; @@ -65,7 +64,7 @@ class MigrateVerbsToPermissionRolesTest { private MigrateVerbsToPermissionRoles migration; @BeforeEach - void init(@TempDirectory.TempDir Path tempDir) throws IOException { + void init(@TempDir Path tempDir) throws IOException { URL metadataUrl = Resources.getResource("sonia/scm/update/repository/metadataWithoutRoles.xml"); Files.copy(metadataUrl.openStream(), tempDir.resolve("metadata.xml")); doAnswer(invocation -> { @@ -76,7 +75,7 @@ class MigrateVerbsToPermissionRolesTest { } @Test - void shouldUpdateToRolesIfPossible(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldUpdateToRolesIfPossible(@TempDir Path tempDir) throws IOException { migration.doUpdate(); List newMetadata = Files.readAllLines(tempDir.resolve("metadata.xml")); diff --git a/scm-webapp/src/test/java/sonia/scm/update/repository/MoveMigrationStrategyTest.java b/scm-webapp/src/test/java/sonia/scm/update/repository/MoveMigrationStrategyTest.java index 02beffed00..658360d234 100644 --- a/scm-webapp/src/test/java/sonia/scm/update/repository/MoveMigrationStrategyTest.java +++ b/scm-webapp/src/test/java/sonia/scm/update/repository/MoveMigrationStrategyTest.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.update.repository; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import sonia.scm.SCMContextProvider; @@ -41,7 +41,6 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -@ExtendWith(TempDirectory.class) @ExtendWith(MockitoExtension.class) class MoveMigrationStrategyTest { @@ -51,30 +50,30 @@ class MoveMigrationStrategyTest { RepositoryLocationResolver locationResolver; @BeforeEach - void mockContextProvider(@TempDirectory.TempDir Path tempDir) { + void mockContextProvider(@TempDir Path tempDir) { when(contextProvider.getBaseDirectory()).thenReturn(tempDir.toFile()); } @BeforeEach - void createV1Home(@TempDirectory.TempDir Path tempDir) throws IOException { + void createV1Home(@TempDir Path tempDir) throws IOException { V1RepositoryFileSystem.createV1Home(tempDir); } @BeforeEach - void mockLocationResolver(@TempDirectory.TempDir Path tempDir) { + void mockLocationResolver(@TempDir Path tempDir) { RepositoryLocationResolver.RepositoryLocationResolverInstance instanceMock = mock(RepositoryLocationResolver.RepositoryLocationResolverInstance.class); when(locationResolver.forClass(Path.class)).thenReturn(instanceMock); when(instanceMock.createLocation(anyString())).thenAnswer(invocation -> tempDir.resolve((String) invocation.getArgument(0))); } @Test - void shouldUseStandardDirectory(@TempDirectory.TempDir Path tempDir) { + void shouldUseStandardDirectory(@TempDir Path tempDir) { Path target = new MoveMigrationStrategy(contextProvider, locationResolver).migrate("b4f-a9f0-49f7-ad1f-37d3aae1c55f", "some/more/directories/than/one", "git").get(); assertThat(target).isEqualTo(tempDir.resolve("b4f-a9f0-49f7-ad1f-37d3aae1c55f")); } @Test - void shouldMoveDataDirectory(@TempDirectory.TempDir Path tempDir) { + void shouldMoveDataDirectory(@TempDir Path tempDir) { Path target = new MoveMigrationStrategy(contextProvider, locationResolver).migrate("b4f-a9f0-49f7-ad1f-37d3aae1c55f", "some/more/directories/than/one", "git").get(); assertThat(target.resolve("data")).exists(); Path originalDataDir = tempDir diff --git a/scm-webapp/src/test/java/sonia/scm/update/repository/PublicFlagUpdateStepTest.java b/scm-webapp/src/test/java/sonia/scm/update/repository/PublicFlagUpdateStepTest.java index 9d7c4333fe..54c5460c6e 100644 --- a/scm-webapp/src/test/java/sonia/scm/update/repository/PublicFlagUpdateStepTest.java +++ b/scm-webapp/src/test/java/sonia/scm/update/repository/PublicFlagUpdateStepTest.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.update.repository; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; @@ -35,7 +35,6 @@ import org.mockito.junit.jupiter.MockitoExtension; import sonia.scm.SCMContext; import sonia.scm.repository.Repository; import sonia.scm.repository.RepositoryPermission; -import sonia.scm.repository.RepositoryRolePermissions; import sonia.scm.repository.RepositoryTestData; import sonia.scm.repository.xml.XmlRepositoryDAO; import sonia.scm.update.UpdateStepTestUtil; @@ -49,7 +48,6 @@ import java.nio.file.Path; import java.util.Collections; import static org.assertj.core.api.Assertions.assertThat; -import static org.junitpioneer.jupiter.TempDirectory.TempDir; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.never; @@ -58,7 +56,6 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) -@ExtendWith(TempDirectory.class) class PublicFlagUpdateStepTest { @Mock diff --git a/scm-webapp/src/test/java/sonia/scm/update/repository/XmlRepositoryFileNameUpdateStepTest.java b/scm-webapp/src/test/java/sonia/scm/update/repository/XmlRepositoryFileNameUpdateStepTest.java index 7e6d912336..3475fffac0 100644 --- a/scm-webapp/src/test/java/sonia/scm/update/repository/XmlRepositoryFileNameUpdateStepTest.java +++ b/scm-webapp/src/test/java/sonia/scm/update/repository/XmlRepositoryFileNameUpdateStepTest.java @@ -21,14 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.update.repository; import com.google.common.io.Resources; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import sonia.scm.SCMContextProvider; import sonia.scm.repository.xml.PathBasedRepositoryLocationResolver; import sonia.scm.repository.xml.XmlRepositoryDAO; @@ -43,19 +42,18 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -@ExtendWith(TempDirectory.class) class XmlRepositoryFileNameUpdateStepTest { SCMContextProvider contextProvider = mock(SCMContextProvider.class); XmlRepositoryDAO repositoryDAO = mock(XmlRepositoryDAO.class); @BeforeEach - void mockScmHome(@TempDirectory.TempDir Path tempDir) { + void mockScmHome(@TempDir Path tempDir) { when(contextProvider.getBaseDirectory()).thenReturn(tempDir.toFile()); } @Test - void shouldCopyRepositoriesFileToRepositoryPathsFile(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldCopyRepositoriesFileToRepositoryPathsFile(@TempDir Path tempDir) throws IOException { XmlRepositoryFileNameUpdateStep updateStep = new XmlRepositoryFileNameUpdateStep(contextProvider, repositoryDAO); URL url = Resources.getResource("sonia/scm/update/repository/formerV2RepositoryFile.xml"); Path configDir = tempDir.resolve("config"); diff --git a/scm-webapp/src/test/java/sonia/scm/update/repository/XmlRepositoryV1UpdateStepTest.java b/scm-webapp/src/test/java/sonia/scm/update/repository/XmlRepositoryV1UpdateStepTest.java index d9ea7d5766..6b0d2176f7 100644 --- a/scm-webapp/src/test/java/sonia/scm/update/repository/XmlRepositoryV1UpdateStepTest.java +++ b/scm-webapp/src/test/java/sonia/scm/update/repository/XmlRepositoryV1UpdateStepTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.update.repository; import com.google.common.io.Resources; @@ -30,7 +30,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; @@ -63,7 +63,6 @@ import static org.mockito.Mockito.when; import static sonia.scm.update.repository.MigrationStrategy.MOVE; @ExtendWith(MockitoExtension.class) -@ExtendWith(TempDirectory.class) class XmlRepositoryV1UpdateStepTest { Injector injectorMock = MigrationStrategyMock.init(); @@ -85,7 +84,7 @@ class XmlRepositoryV1UpdateStepTest { XmlRepositoryV1UpdateStep updateStep; @BeforeEach - void createUpdateStepFromMocks(@TempDirectory.TempDir Path tempDir) { + void createUpdateStepFromMocks(@TempDir Path tempDir) { testUtil = new UpdateStepTestUtil(tempDir); updateStep = new XmlRepositoryV1UpdateStep( testUtil.getContextProvider(), @@ -100,7 +99,7 @@ class XmlRepositoryV1UpdateStepTest { class WithExistingDatabase { @BeforeEach - void createV1Home(@TempDirectory.TempDir Path tempDir) throws IOException { + void createV1Home(@TempDir Path tempDir) throws IOException { V1RepositoryFileSystem.createV1Home(tempDir); } @@ -165,7 +164,7 @@ class XmlRepositoryV1UpdateStepTest { } @Test - void shouldUseDirectoryFromStrategy(@TempDirectory.TempDir Path tempDir) throws JAXBException { + void shouldUseDirectoryFromStrategy(@TempDir Path tempDir) throws JAXBException { Path targetDir = tempDir.resolve("someDir"); MigrationStrategy.Instance strategyMock = injectorMock.getInstance(MoveMigrationStrategy.class); when(strategyMock.migrate("454972da-faf9-4437-b682-dc4a4e0aa8eb", "simple", "git")).thenReturn(of(targetDir)); @@ -195,7 +194,7 @@ class XmlRepositoryV1UpdateStepTest { } @Test - void shouldBackupOldRepositoryDatabaseFile(@TempDirectory.TempDir Path tempDir) throws JAXBException { + void shouldBackupOldRepositoryDatabaseFile(@TempDir Path tempDir) throws JAXBException { updateStep.doUpdate(); assertThat(tempDir.resolve("config").resolve("repositories.xml")).doesNotExist(); @@ -209,14 +208,14 @@ class XmlRepositoryV1UpdateStepTest { } @Test - void shouldNotFailIfFormerV2DatabaseExists(@TempDirectory.TempDir Path tempDir) throws JAXBException, IOException { + void shouldNotFailIfFormerV2DatabaseExists(@TempDir Path tempDir) throws JAXBException, IOException { createFormerV2RepositoriesFile(tempDir); updateStep.doUpdate(); } @Test - void shouldNotBackupFormerV2DatabaseFile(@TempDirectory.TempDir Path tempDir) throws JAXBException, IOException { + void shouldNotBackupFormerV2DatabaseFile(@TempDir Path tempDir) throws JAXBException, IOException { createFormerV2RepositoriesFile(tempDir); updateStep.doUpdate(); @@ -226,14 +225,14 @@ class XmlRepositoryV1UpdateStepTest { } @Test - void shouldGetNoMissingStrategiesWithFormerV2DatabaseFile(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldGetNoMissingStrategiesWithFormerV2DatabaseFile(@TempDir Path tempDir) throws IOException { createFormerV2RepositoriesFile(tempDir); assertThat(updateStep.getRepositoriesWithoutMigrationStrategies()).isEmpty(); } @Test - void shouldFindMissingStrategies(@TempDirectory.TempDir Path tempDir) throws IOException { + void shouldFindMissingStrategies(@TempDir Path tempDir) throws IOException { V1RepositoryFileSystem.createV1Home(tempDir); assertThat(updateStep.getRepositoriesWithoutMigrationStrategies()) @@ -244,7 +243,7 @@ class XmlRepositoryV1UpdateStepTest { "454972da-faf9-4437-b682-dc4a4e0aa8eb"); } - private void createFormerV2RepositoriesFile(@TempDirectory.TempDir Path tempDir) throws IOException { + private void createFormerV2RepositoriesFile(@TempDir Path tempDir) throws IOException { URL url = Resources.getResource("sonia/scm/update/repository/formerV2RepositoryFile.xml"); Path configDir = tempDir.resolve("config"); Files.createDirectories(configDir); diff --git a/scm-webapp/src/test/java/sonia/scm/update/security/XmlSecurityV1UpdateStepTest.java b/scm-webapp/src/test/java/sonia/scm/update/security/XmlSecurityV1UpdateStepTest.java index aa1a19df7d..559b181199 100644 --- a/scm-webapp/src/test/java/sonia/scm/update/security/XmlSecurityV1UpdateStepTest.java +++ b/scm-webapp/src/test/java/sonia/scm/update/security/XmlSecurityV1UpdateStepTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.update.security; import com.google.common.io.Resources; @@ -29,7 +29,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import sonia.scm.SCMContextProvider; @@ -50,7 +50,6 @@ import static org.mockito.Mockito.when; import static sonia.scm.store.InMemoryConfigurationEntryStoreFactory.create; @ExtendWith(MockitoExtension.class) -@ExtendWith(TempDirectory.class) class XmlSecurityV1UpdateStepTest { @Mock @@ -60,7 +59,7 @@ class XmlSecurityV1UpdateStepTest { ConfigurationEntryStore assignedPermissionStore; @BeforeEach - void mockScmHome(@TempDirectory.TempDir Path tempDir) { + void mockScmHome(@TempDir Path tempDir) { when(contextProvider.getBaseDirectory()).thenReturn(tempDir.toFile()); InMemoryConfigurationEntryStoreFactory inMemoryConfigurationEntryStoreFactory = create(); assignedPermissionStore = inMemoryConfigurationEntryStoreFactory.get("security"); @@ -71,7 +70,7 @@ class XmlSecurityV1UpdateStepTest { class WithExistingDatabase { @BeforeEach - void createConfigV1XML(@TempDirectory.TempDir Path tempDir) throws IOException { + void createConfigV1XML(@TempDir Path tempDir) throws IOException { Path configDir = tempDir.resolve("config"); Files.createDirectories(configDir); copyTestDatabaseFile(configDir, "config.xml"); @@ -109,7 +108,7 @@ class XmlSecurityV1UpdateStepTest { class WithExistingSecurityXml { @BeforeEach - void createSecurityV1XML(@TempDirectory.TempDir Path tempDir) throws IOException { + void createSecurityV1XML(@TempDir Path tempDir) throws IOException { Path configDir = tempDir.resolve("config"); Files.createDirectories(configDir); copyTestDatabaseFile(configDir, "securityV1.xml"); diff --git a/scm-webapp/src/test/java/sonia/scm/update/user/XmlUserV1UpdateStepTest.java b/scm-webapp/src/test/java/sonia/scm/update/user/XmlUserV1UpdateStepTest.java index 98ab3dfadd..da9e3ccb7d 100644 --- a/scm-webapp/src/test/java/sonia/scm/update/user/XmlUserV1UpdateStepTest.java +++ b/scm-webapp/src/test/java/sonia/scm/update/user/XmlUserV1UpdateStepTest.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.update.user; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; +import org.junit.jupiter.api.io.TempDir; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; @@ -38,7 +38,6 @@ import sonia.scm.store.ConfigurationEntryStore; import sonia.scm.store.InMemoryConfigurationEntryStoreFactory; import sonia.scm.update.UpdateStepTestUtil; import sonia.scm.update.V1Properties; -import sonia.scm.update.V1Property; import sonia.scm.user.User; import sonia.scm.user.xml.XmlUserDAO; @@ -55,7 +54,6 @@ import static org.mockito.Mockito.verify; import static sonia.scm.store.InMemoryConfigurationEntryStoreFactory.create; @ExtendWith(MockitoExtension.class) -@ExtendWith(TempDirectory.class) class XmlUserV1UpdateStepTest { @Mock @@ -71,7 +69,7 @@ class XmlUserV1UpdateStepTest { private UpdateStepTestUtil testUtil; @BeforeEach - void mockScmHome(@TempDirectory.TempDir Path tempDir) { + void mockScmHome(@TempDir Path tempDir) { testUtil = new UpdateStepTestUtil(tempDir); updateStep = new XmlUserV1UpdateStep(testUtil.getContextProvider(), userDAO, storeFactory); } diff --git a/yarn.lock b/yarn.lock index f33b9dd3fd..6cd638ce5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,28 +16,28 @@ dependencies: "@babel/highlight" "^7.8.3" -"@babel/compat-data@^7.8.6", "@babel/compat-data@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.0.tgz#04815556fc90b0c174abd2c0c1bb966faa036a6c" - integrity sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g== +"@babel/compat-data@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.6.tgz#3f604c40e420131affe6f2c8052e9a275ae2049b" + integrity sha512-5QPTrNen2bm7RBc7dsOmcA5hbrS4O2Vhmk5XOL4zWW/zD/hV0iinpefDlkm+tBBy8kDtFaaeEvmAqt+nURAV2g== dependencies: - browserslist "^4.9.1" + browserslist "^4.11.1" invariant "^2.2.4" semver "^5.5.0" "@babel/core@^7.1.0", "@babel/core@^7.4.5", "@babel/core@^7.6.3", "@babel/core@^7.7.5": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" - integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.6.tgz#d9aa1f580abf3b2286ef40b6904d390904c63376" + integrity sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.0" + "@babel/generator" "^7.9.6" "@babel/helper-module-transforms" "^7.9.0" - "@babel/helpers" "^7.9.0" - "@babel/parser" "^7.9.0" + "@babel/helpers" "^7.9.6" + "@babel/parser" "^7.9.6" "@babel/template" "^7.8.6" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" @@ -47,12 +47,12 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.9.0": - version "7.9.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.4.tgz#12441e90c3b3c4159cdecf312075bf1a8ce2dbce" - integrity sha512-rjP8ahaDy/ouhrvCoU1E5mqaitWrxwuNGU+dy1EpaoK48jZay4MdkskKGIMHLZNewg8sAsqpGSREJwP0zH3YQA== +"@babel/generator@^7.4.0", "@babel/generator@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.6.tgz#5408c82ac5de98cda0d77d8124e99fa1f2170a43" + integrity sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ== dependencies: - "@babel/types" "^7.9.0" + "@babel/types" "^7.9.6" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" @@ -73,13 +73,13 @@ "@babel/types" "^7.8.3" "@babel/helper-builder-react-jsx-experimental@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.9.0.tgz#066d80262ade488f9c1b1823ce5db88a4cedaa43" - integrity sha512-3xJEiyuYU4Q/Ar9BsHisgdxZsRlsShMe90URZ0e6przL26CCs8NJbDoxH94kKT17PcxlMhsCAwZd90evCo26VQ== + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.9.5.tgz#0b4b3e04e6123f03b404ca4dfd6528fe6bb92fe3" + integrity sha512-HAagjAC93tk748jcXpZ7oYRZH485RCq/+yEv9SIWezHRPv9moZArTnkUNciUNzvwHUABmiWKlcxJvMcu59UwTg== dependencies: "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/helper-module-imports" "^7.8.3" - "@babel/types" "^7.9.0" + "@babel/types" "^7.9.5" "@babel/helper-builder-react-jsx@^7.9.0": version "7.9.0" @@ -89,27 +89,27 @@ "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/types" "^7.9.0" -"@babel/helper-compilation-targets@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz#dac1eea159c0e4bd46e309b5a1b04a66b53c1dde" - integrity sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw== +"@babel/helper-compilation-targets@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.9.6.tgz#1e05b7ccc9d38d2f8b40b458b380a04dcfadd38a" + integrity sha512-x2Nvu0igO0ejXzx09B/1fGBxY9NXQlBW2kZsSxCJft+KHN8t9XWzIvFxtPHnBOAXpVsdxZKZFbRUC8TsNKajMw== dependencies: - "@babel/compat-data" "^7.8.6" - browserslist "^4.9.1" + "@babel/compat-data" "^7.9.6" + browserslist "^4.11.1" invariant "^2.2.4" levenary "^1.1.1" semver "^5.5.0" -"@babel/helper-create-class-features-plugin@^7.8.3": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.6.tgz#243a5b46e2f8f0f674dc1387631eb6b28b851de0" - integrity sha512-klTBDdsr+VFFqaDHm5rR69OpEQtO2Qv8ECxHS1mNhJJvaHArR6a1xTf5K/eZW7eZpJbhCx3NW1Yt/sKsLXLblg== +"@babel/helper-create-class-features-plugin@^7.8.3", "@babel/helper-create-class-features-plugin@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.9.6.tgz#965c8b0a9f051801fd9d3b372ca0ccf200a90897" + integrity sha512-6N9IeuyHvMBRyjNYOMJHrhwtu4WJMrYf8hVbEHD3pbbbmNOk1kmXSQs7bA4dYDUaIx4ZEzdnvo6NwC3WHd/Qow== dependencies: - "@babel/helper-function-name" "^7.8.3" + "@babel/helper-function-name" "^7.9.5" "@babel/helper-member-expression-to-functions" "^7.8.3" "@babel/helper-optimise-call-expression" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-replace-supers" "^7.8.6" + "@babel/helper-replace-supers" "^7.9.6" "@babel/helper-split-export-declaration" "^7.8.3" "@babel/helper-create-regexp-features-plugin@^7.8.3", "@babel/helper-create-regexp-features-plugin@^7.8.8": @@ -138,14 +138,14 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-function-name@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" - integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== +"@babel/helper-function-name@^7.8.3", "@babel/helper-function-name@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz#2b53820d35275120e1874a82e5aabe1376920a5c" + integrity sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw== dependencies: "@babel/helper-get-function-arity" "^7.8.3" "@babel/template" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/types" "^7.9.5" "@babel/helper-get-function-arity@^7.8.3": version "7.8.3" @@ -218,15 +218,15 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" - integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== +"@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6", "@babel/helper-replace-supers@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.9.6.tgz#03149d7e6a5586ab6764996cd31d6981a17e1444" + integrity sha512-qX+chbxkbArLyCImk3bWV+jB5gTNU/rsze+JlcF6Nf8tVTigPJSI1o1oBow/9Resa1yehUO9lIipsmu9oG4RzA== dependencies: "@babel/helper-member-expression-to-functions" "^7.8.3" "@babel/helper-optimise-call-expression" "^7.8.3" - "@babel/traverse" "^7.8.6" - "@babel/types" "^7.8.6" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" "@babel/helper-simple-access@^7.8.3": version "7.8.3" @@ -243,10 +243,10 @@ dependencies: "@babel/types" "^7.8.3" -"@babel/helper-validator-identifier@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz#ad53562a7fc29b3b9a91bbf7d10397fd146346ed" - integrity sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw== +"@babel/helper-validator-identifier@^7.9.0", "@babel/helper-validator-identifier@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" + integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== "@babel/helper-wrap-function@^7.8.3": version "7.8.3" @@ -258,14 +258,14 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helpers@^7.9.0": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" - integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA== +"@babel/helpers@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.6.tgz#092c774743471d0bb6c7de3ad465ab3d3486d580" + integrity sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw== dependencies: "@babel/template" "^7.8.3" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/traverse" "^7.9.6" + "@babel/types" "^7.9.6" "@babel/highlight@^7.0.0", "@babel/highlight@^7.8.3": version "7.9.0" @@ -276,10 +276,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": - version "7.9.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" - integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.8.6", "@babel/parser@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.6.tgz#3b1bbb30dabe600cd72db58720998376ff653bc7" + integrity sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q== "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.8.3" @@ -330,13 +330,14 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-numeric-separator" "^7.8.3" -"@babel/plugin-proposal-object-rest-spread@^7.6.2", "@babel/plugin-proposal-object-rest-spread@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.0.tgz#a28993699fc13df165995362693962ba6b061d6f" - integrity sha512-UgqBv6bjq4fDb8uku9f+wcm1J7YxJ5nT7WO/jBr0cl0PLKb7t1O6RNR1kZbjgx2LQtsDI9hwoQVmn0yhXeQyow== +"@babel/plugin-proposal-object-rest-spread@^7.6.2", "@babel/plugin-proposal-object-rest-spread@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.6.tgz#7a093586fcb18b08266eb1a7177da671ac575b63" + integrity sha512-Ga6/fhGqA9Hj+y6whNpPv8psyaK5xzrQwSPsGPloVkvmH+PqW1ixdnfJ9uIO06OjQNYol3PMnfmJ8vfZtkzF+A== dependencies: "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-transform-parameters" "^7.9.5" "@babel/plugin-proposal-optional-catch-binding@^7.8.3": version "7.8.3" @@ -491,14 +492,14 @@ "@babel/helper-plugin-utils" "^7.8.3" lodash "^4.17.13" -"@babel/plugin-transform-classes@^7.9.0": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.2.tgz#8603fc3cc449e31fdbdbc257f67717536a11af8d" - integrity sha512-TC2p3bPzsfvSsqBZo0kJnuelnoK9O3welkUpqSqBQuBF6R5MN2rysopri8kNvtlGIb2jmUO7i15IooAZJjZuMQ== +"@babel/plugin-transform-classes@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.5.tgz#800597ddb8aefc2c293ed27459c1fcc935a26c2c" + integrity sha512-x2kZoIuLC//O5iA7PEvecB105o7TLzZo8ofBVhP79N+DO3jaX+KYfww9TQcfBEZD0nikNyYcGB1IKtRq36rdmg== dependencies: "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/helper-define-map" "^7.8.3" - "@babel/helper-function-name" "^7.8.3" + "@babel/helper-function-name" "^7.9.5" "@babel/helper-optimise-call-expression" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-replace-supers" "^7.8.6" @@ -512,10 +513,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-destructuring@^7.8.3": - version "7.8.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz#fadb2bc8e90ccaf5658de6f8d4d22ff6272a2f4b" - integrity sha512-eRJu4Vs2rmttFCdhPUM3bV0Yo/xPSdPw6ML9KHs/bjB4bLA5HXlbvYXPOD5yASodGod+krjYx21xm1QmL8dCJQ== +"@babel/plugin-transform-destructuring@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.9.5.tgz#72c97cf5f38604aea3abf3b935b0e17b1db76a50" + integrity sha512-j3OEsGel8nHL/iusv/mRd5fYZ3DrOxWC82x0ogmdN/vHfAP4MYw+AFKYanzWlktNwikKvlzUV//afBW5FTp17Q== dependencies: "@babel/helper-plugin-utils" "^7.8.3" @@ -579,34 +580,34 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-modules-amd@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz#19755ee721912cf5bb04c07d50280af3484efef4" - integrity sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q== +"@babel/plugin-transform-modules-amd@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.6.tgz#8539ec42c153d12ea3836e0e3ac30d5aae7b258e" + integrity sha512-zoT0kgC3EixAyIAU+9vfaUVKTv9IxBDSabgHoUCBP6FqEJ+iNiN7ip7NBKcYqbfUDfuC2mFCbM7vbu4qJgOnDw== dependencies: "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz#e3e72f4cbc9b4a260e30be0ea59bdf5a39748940" - integrity sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g== +"@babel/plugin-transform-modules-commonjs@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.6.tgz#64b7474a4279ee588cacd1906695ca721687c277" + integrity sha512-7H25fSlLcn+iYimmsNe3uK1at79IE6SKW9q0/QeEHTMC9MdOZ+4bA+T1VFB5fgOqBWoqlifXRzYD0JPdmIrgSQ== dependencies: "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-simple-access" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz#e9fd46a296fc91e009b64e07ddaa86d6f0edeb90" - integrity sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ== +"@babel/plugin-transform-modules-systemjs@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.6.tgz#207f1461c78a231d5337a92140e52422510d81a4" + integrity sha512-NW5XQuW3N2tTHim8e1b7qGy7s0kZ2OH3m5octc49K1SdAKGxYxeIx7hiIz05kS1R2R+hOWcsr1eYwcGhrdHsrg== dependencies: "@babel/helper-hoist-variables" "^7.8.3" "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" - babel-plugin-dynamic-import-node "^2.3.0" + babel-plugin-dynamic-import-node "^2.3.3" "@babel/plugin-transform-modules-umd@^7.9.0": version "7.9.0" @@ -638,10 +639,10 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-replace-supers" "^7.8.3" -"@babel/plugin-transform-parameters@^7.8.7": - version "7.9.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.3.tgz#3028d0cc20ddc733166c6e9c8534559cee09f54a" - integrity sha512-fzrQFQhp7mIhOzmOtPiKffvCYQSK10NR8t6BBz2yPbeUHb9OLW8RZGtgDRBn8z2hGcwvKDL3vC7ojPTLNxmqEg== +"@babel/plugin-transform-parameters@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.5.tgz#173b265746f5e15b2afe527eeda65b73623a0795" + integrity sha512-0+1FhHnMfj6lIIhVvS4KGQJeuhe1GI//h5uptK4PvLt+BGBxsoUJbd3/IW002yk//6sZPlFgsG1hY6OHLcy6kA== dependencies: "@babel/helper-get-function-arity" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" @@ -754,11 +755,11 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-transform-typescript@^7.9.0": - version "7.9.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.9.4.tgz#4bb4dde4f10bbf2d787fce9707fb09b483e33359" - integrity sha512-yeWeUkKx2auDbSxRe8MusAG+n4m9BFY/v+lPjmQDgOFX5qnySkUY5oXzkp6FwPdsYqnKay6lorXYdC0n3bZO7w== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.9.6.tgz#2248971416a506fc78278fc0c0ea3179224af1e9" + integrity sha512-8OvsRdvpt3Iesf2qsAn+YdlwAJD7zJ+vhFZmDCa4b8dTp7MmHtKk5FF2mCsGxjZwuwsy/yIIay/nLmxST1ctVQ== dependencies: - "@babel/helper-create-class-features-plugin" "^7.8.3" + "@babel/helper-create-class-features-plugin" "^7.9.6" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-typescript" "^7.8.3" @@ -779,12 +780,12 @@ regenerator-runtime "^0.13.4" "@babel/preset-env@^7.4.5", "@babel/preset-env@^7.6.3": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.0.tgz#a5fc42480e950ae8f5d9f8f2bbc03f52722df3a8" - integrity sha512-712DeRXT6dyKAM/FMbQTV/FvRCms2hPCx+3weRjZ8iQVQWZejWWk1wwG6ViWMyqb/ouBbGOl5b6aCk0+j1NmsQ== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.6.tgz#df063b276c6455ec6fcfc6e53aacc38da9b0aea6" + integrity sha512-0gQJ9RTzO0heXOhzftog+a/WyOuqMrAIugVYxMYf83gh1CQaQDjMtsOpqOwXyDL/5JcWsrCm8l4ju8QC97O7EQ== dependencies: - "@babel/compat-data" "^7.9.0" - "@babel/helper-compilation-targets" "^7.8.7" + "@babel/compat-data" "^7.9.6" + "@babel/helper-compilation-targets" "^7.9.6" "@babel/helper-module-imports" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-proposal-async-generator-functions" "^7.8.3" @@ -792,7 +793,7 @@ "@babel/plugin-proposal-json-strings" "^7.8.3" "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3" "@babel/plugin-proposal-numeric-separator" "^7.8.3" - "@babel/plugin-proposal-object-rest-spread" "^7.9.0" + "@babel/plugin-proposal-object-rest-spread" "^7.9.6" "@babel/plugin-proposal-optional-catch-binding" "^7.8.3" "@babel/plugin-proposal-optional-chaining" "^7.9.0" "@babel/plugin-proposal-unicode-property-regex" "^7.8.3" @@ -809,9 +810,9 @@ "@babel/plugin-transform-async-to-generator" "^7.8.3" "@babel/plugin-transform-block-scoped-functions" "^7.8.3" "@babel/plugin-transform-block-scoping" "^7.8.3" - "@babel/plugin-transform-classes" "^7.9.0" + "@babel/plugin-transform-classes" "^7.9.5" "@babel/plugin-transform-computed-properties" "^7.8.3" - "@babel/plugin-transform-destructuring" "^7.8.3" + "@babel/plugin-transform-destructuring" "^7.9.5" "@babel/plugin-transform-dotall-regex" "^7.8.3" "@babel/plugin-transform-duplicate-keys" "^7.8.3" "@babel/plugin-transform-exponentiation-operator" "^7.8.3" @@ -819,14 +820,14 @@ "@babel/plugin-transform-function-name" "^7.8.3" "@babel/plugin-transform-literals" "^7.8.3" "@babel/plugin-transform-member-expression-literals" "^7.8.3" - "@babel/plugin-transform-modules-amd" "^7.9.0" - "@babel/plugin-transform-modules-commonjs" "^7.9.0" - "@babel/plugin-transform-modules-systemjs" "^7.9.0" + "@babel/plugin-transform-modules-amd" "^7.9.6" + "@babel/plugin-transform-modules-commonjs" "^7.9.6" + "@babel/plugin-transform-modules-systemjs" "^7.9.6" "@babel/plugin-transform-modules-umd" "^7.9.0" "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" "@babel/plugin-transform-new-target" "^7.8.3" "@babel/plugin-transform-object-super" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.8.7" + "@babel/plugin-transform-parameters" "^7.9.5" "@babel/plugin-transform-property-literals" "^7.8.3" "@babel/plugin-transform-regenerator" "^7.8.7" "@babel/plugin-transform-reserved-words" "^7.8.3" @@ -837,8 +838,8 @@ "@babel/plugin-transform-typeof-symbol" "^7.8.4" "@babel/plugin-transform-unicode-regex" "^7.8.3" "@babel/preset-modules" "^0.1.3" - "@babel/types" "^7.9.0" - browserslist "^4.9.1" + "@babel/types" "^7.9.6" + browserslist "^4.11.1" core-js-compat "^3.6.2" invariant "^2.2.2" levenary "^1.1.1" @@ -884,17 +885,17 @@ "@babel/plugin-transform-typescript" "^7.9.0" "@babel/runtime-corejs3@^7.8.3": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.9.2.tgz#26fe4aa77e9f1ecef9b776559bbb8e84d34284b7" - integrity sha512-HHxmgxbIzOfFlZ+tdeRKtaxWOMUoCG5Mu3wKeUmOxjYrwb3AAHgnmtCUbPPK11/raIWLIBK250t8E2BPO0p7jA== + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.9.6.tgz#67aded13fffbbc2cb93247388cf84d77a4be9a71" + integrity sha512-6toWAfaALQjt3KMZQc6fABqZwUDDuWzz+cAfPhqyEnzxvdWOAkjwPNxgF8xlmo7OWLsSjaKjsskpKHRLaMArOA== dependencies: core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06" - integrity sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q== +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.6.tgz#a9102eb5cadedf3f31d08a9ecf294af7827ea29f" + integrity sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ== dependencies: regenerator-runtime "^0.13.4" @@ -907,27 +908,27 @@ "@babel/parser" "^7.8.6" "@babel/types" "^7.8.6" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.0.tgz#d3882c2830e513f4fe4cec9fe76ea1cc78747892" - integrity sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w== +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.8.3", "@babel/traverse@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.6.tgz#5540d7577697bf619cc57b92aa0f1c231a94f442" + integrity sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.0" - "@babel/helper-function-name" "^7.8.3" + "@babel/generator" "^7.9.6" + "@babel/helper-function-name" "^7.9.5" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/parser" "^7.9.6" + "@babel/types" "^7.9.6" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.0.tgz#00b064c3df83ad32b2dbf5ff07312b15c7f1efb5" - integrity sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng== +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5", "@babel/types@^7.9.6": + version "7.9.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.6.tgz#2c5502b427251e9de1bd2dff95add646d95cc9f7" + integrity sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA== dependencies: - "@babel/helper-validator-identifier" "^7.9.0" + "@babel/helper-validator-identifier" "^7.9.5" lodash "^4.17.13" to-fast-properties "^2.0.0" @@ -1315,24 +1316,24 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" -"@jest/types@^25.2.6": - version "25.2.6" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.2.6.tgz#c12f44af9bed444438091e4b59e7ed05f8659cb6" - integrity sha512-myJTTV37bxK7+3NgKc4Y/DlQ5q92/NOwZsZ+Uch7OXdElxOg61QYc72fPYNAjlvbnJ2YvbXLamIsa9tj48BmyQ== +"@jest/types@^25.5.0": + version "25.5.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.5.0.tgz#4d6a4793f7b9599fc3680877b856a97dbccf2a9d" + integrity sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^15.0.0" chalk "^3.0.0" -"@lerna/add@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.20.0.tgz#bea7edf36fc93fb72ec34cb9ba854c48d4abf309" - integrity sha512-AnH1oRIEEg/VDa3SjYq4x1/UglEAvrZuV0WssHUMN81RTZgQk3we+Mv3qZNddrZ/fBcZu2IAdN/EQ3+ie2JxKQ== +"@lerna/add@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.21.0.tgz#27007bde71cc7b0a2969ab3c2f0ae41578b4577b" + integrity sha512-vhUXXF6SpufBE1EkNEXwz1VLW03f177G9uMOFMQkp6OJ30/PWg4Ekifuz9/3YfgB2/GH8Tu4Lk3O51P2Hskg/A== dependencies: "@evocateur/pacote" "^9.6.3" - "@lerna/bootstrap" "3.20.0" - "@lerna/command" "3.18.5" + "@lerna/bootstrap" "3.21.0" + "@lerna/command" "3.21.0" "@lerna/filter-options" "3.20.0" "@lerna/npm-conf" "3.16.0" "@lerna/validation-error" "3.13.0" @@ -1341,12 +1342,12 @@ p-map "^2.1.0" semver "^6.2.0" -"@lerna/bootstrap@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-3.20.0.tgz#635d71046830f208e851ab429a63da1747589e37" - integrity sha512-Wylullx3uthKE7r4izo09qeRGL20Y5yONlQEjPCfnbxCC2Elu+QcPu4RC6kqKQ7b+g7pdC3OOgcHZjngrwr5XQ== +"@lerna/bootstrap@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-3.21.0.tgz#bcd1b651be5b0970b20d8fae04c864548123aed6" + integrity sha512-mtNHlXpmvJn6JTu0KcuTTPl2jLsDNud0QacV/h++qsaKbhAaJr/FElNZ5s7MwZFUM3XaDmvWzHKaszeBMHIbBw== dependencies: - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/filter-options" "3.20.0" "@lerna/has-npm-version" "3.16.5" "@lerna/npm-install" "3.16.5" @@ -1370,13 +1371,13 @@ read-package-tree "^5.1.6" semver "^6.2.0" -"@lerna/changed@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-3.20.0.tgz#66b97ebd6c8f8d207152ee524a0791846a9097ae" - integrity sha512-+hzMFSldbRPulZ0vbKk6RD9f36gaH3Osjx34wrrZ62VB4pKmjyuS/rxVYkCA3viPLHoiIw2F8zHM5BdYoDSbjw== +"@lerna/changed@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-3.21.0.tgz#108e15f679bfe077af500f58248c634f1044ea0b" + integrity sha512-hzqoyf8MSHVjZp0gfJ7G8jaz+++mgXYiNs9iViQGA8JlN/dnWLI5sWDptEH3/B30Izo+fdVz0S0s7ydVE3pWIw== dependencies: "@lerna/collect-updates" "3.20.0" - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/listable" "3.18.5" "@lerna/output" "3.13.0" @@ -1398,12 +1399,12 @@ execa "^1.0.0" strong-log-transformer "^2.0.0" -"@lerna/clean@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-3.20.0.tgz#ba777e373ddeae63e57860df75d47a9e5264c5b2" - integrity sha512-9ZdYrrjQvR5wNXmHfDsfjWjp0foOkCwKe3hrckTzkAeQA1ibyz5llGwz5e1AeFrV12e2/OLajVqYfe+qdkZUgg== +"@lerna/clean@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-3.21.0.tgz#c0b46b5300cc3dae2cda3bec14b803082da3856d" + integrity sha512-b/L9l+MDgE/7oGbrav6rG8RTQvRiZLO1zTcG17zgJAAuhlsPxJExMlh2DFwJEVi2les70vMhHfST3Ue1IMMjpg== dependencies: - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/filter-options" "3.20.0" "@lerna/prompt" "3.18.5" "@lerna/pulse-till-done" "3.13.0" @@ -1443,14 +1444,14 @@ npmlog "^4.1.2" slash "^2.0.0" -"@lerna/command@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/command/-/command-3.18.5.tgz#14c6d2454adbfd365f8027201523e6c289cd3cd9" - integrity sha512-36EnqR59yaTU4HrR1C9XDFti2jRx0BgpIUBeWn129LZZB8kAB3ov1/dJNa1KcNRKp91DncoKHLY99FZ6zTNpMQ== +"@lerna/command@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/command/-/command-3.21.0.tgz#9a2383759dc7b700dacfa8a22b2f3a6e190121f7" + integrity sha512-T2bu6R8R3KkH5YoCKdutKv123iUgUbW8efVjdGCDnCMthAQzoentOJfDeodBwn0P2OqCl3ohsiNVtSn9h78fyQ== dependencies: "@lerna/child-process" "3.16.5" "@lerna/package-graph" "3.18.5" - "@lerna/project" "3.18.0" + "@lerna/project" "3.21.0" "@lerna/validation-error" "3.13.0" "@lerna/write-log-file" "3.13.0" clone-deep "^4.0.1" @@ -1485,14 +1486,14 @@ fs-extra "^8.1.0" npmlog "^4.1.2" -"@lerna/create@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-3.18.5.tgz#11ac539f069248eaf7bc4c42e237784330f4fc47" - integrity sha512-cHpjocbpKmLopCuZFI7cKEM3E/QY8y+yC7VtZ4FQRSaLU8D8i2xXtXmYaP1GOlVNavji0iwoXjuNpnRMInIr2g== +"@lerna/create@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-3.21.0.tgz#e813832adf3488728b139e5a75c8b01b1372e62f" + integrity sha512-cRIopzKzE2vXJPmsiwCDMWo4Ct+KTmX3nvvkQLDoQNrrRK7w+3KQT3iiorbj1koD95RsVQA7mS2haWok9SIv0g== dependencies: "@evocateur/pacote" "^9.6.3" "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/npm-conf" "3.16.0" "@lerna/validation-error" "3.13.0" camelcase "^5.0.0" @@ -1517,23 +1518,23 @@ "@lerna/child-process" "3.16.5" npmlog "^4.1.2" -"@lerna/diff@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-3.18.5.tgz#e9e2cb882f84d5b84f0487c612137305f07accbc" - integrity sha512-u90lGs+B8DRA9Z/2xX4YaS3h9X6GbypmGV6ITzx9+1Ga12UWGTVlKaCXBgONMBjzJDzAQOK8qPTwLA57SeBLgA== +"@lerna/diff@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-3.21.0.tgz#e6df0d8b9916167ff5a49fcb02ac06424280a68d" + integrity sha512-5viTR33QV3S7O+bjruo1SaR40m7F2aUHJaDAC7fL9Ca6xji+aw1KFkpCtVlISS0G8vikUREGMJh+c/VMSc8Usw== dependencies: "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/validation-error" "3.13.0" npmlog "^4.1.2" -"@lerna/exec@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-3.20.0.tgz#29f0c01aee2340eb46f90706731fef2062a49639" - integrity sha512-pS1mmC7kzV668rHLWuv31ClngqeXjeHC8kJuM+W2D6IpUVMGQHLcCTYLudFgQsuKGVpl0DGNYG+sjLhAPiiu6A== +"@lerna/exec@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-3.21.0.tgz#17f07533893cb918a17b41bcc566dc437016db26" + integrity sha512-iLvDBrIE6rpdd4GIKTY9mkXyhwsJ2RvQdB9ZU+/NhR3okXfqKc6py/24tV111jqpXTtZUW6HNydT4dMao2hi1Q== dependencies: "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/filter-options" "3.20.0" "@lerna/profiler" "3.20.0" "@lerna/run-topologically" "3.18.5" @@ -1609,13 +1610,13 @@ "@lerna/child-process" "3.16.5" semver "^6.2.0" -"@lerna/import@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/import/-/import-3.18.5.tgz#a9c7d8601870729851293c10abd18b3707f7ba5e" - integrity sha512-PH0WVLEgp+ORyNKbGGwUcrueW89K3Iuk/DDCz8mFyG2IG09l/jOF0vzckEyGyz6PO5CMcz4TI1al/qnp3FrahQ== +"@lerna/import@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/import/-/import-3.21.0.tgz#87b08f2a2bfeeff7357c6fd8490e638d3cd5b32d" + integrity sha512-aISkL4XD0Dqf5asDaOZWu65jgj8fWUhuQseZWuQe3UfHxav69fTS2YLIngUfencaOSZVOcVCom28YCzp61YDxw== dependencies: "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/prompt" "3.18.5" "@lerna/pulse-till-done" "3.13.0" "@lerna/validation-error" "3.13.0" @@ -1623,43 +1624,43 @@ fs-extra "^8.1.0" p-map-series "^1.0.0" -"@lerna/info@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/info/-/info-3.20.0.tgz#3a5212f3029f2bc6255f9533bdf4bcb120ef329a" - integrity sha512-Rsz+KQF9mczbGUbPTrtOed1N0C+cA08Qz0eX/oI+NNjvsryZIju/o7uedG4I3P55MBiAioNrJI88fHH3eTgYug== +"@lerna/info@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/info/-/info-3.21.0.tgz#76696b676fdb0f35d48c83c63c1e32bb5e37814f" + integrity sha512-0XDqGYVBgWxUquFaIptW2bYSIu6jOs1BtkvRTWDDhw4zyEdp6q4eaMvqdSap1CG+7wM5jeLCi6z94wS0AuiuwA== dependencies: - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/output" "3.13.0" envinfo "^7.3.1" -"@lerna/init@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/init/-/init-3.18.5.tgz#86dd0b2b3290755a96975069b5cb007f775df9f5" - integrity sha512-oCwipWrha98EcJAHm8AGd2YFFLNI7AW9AWi0/LbClj1+XY9ah+uifXIgYGfTk63LbgophDd8936ZEpHMxBsbAg== +"@lerna/init@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/init/-/init-3.21.0.tgz#1e810934dc8bf4e5386c031041881d3b4096aa5c" + integrity sha512-6CM0z+EFUkFfurwdJCR+LQQF6MqHbYDCBPyhu/d086LRf58GtYZYj49J8mKG9ktayp/TOIxL/pKKjgLD8QBPOg== dependencies: "@lerna/child-process" "3.16.5" - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" fs-extra "^8.1.0" p-map "^2.1.0" write-json-file "^3.2.0" -"@lerna/link@3.18.5": - version "3.18.5" - resolved "https://registry.yarnpkg.com/@lerna/link/-/link-3.18.5.tgz#f24347e4f0b71d54575bd37cfa1794bc8ee91b18" - integrity sha512-xTN3vktJpkT7Nqc3QkZRtHO4bT5NvuLMtKNIBDkks0HpGxC9PRyyqwOoCoh1yOGbrWIuDezhfMg3Qow+6I69IQ== +"@lerna/link@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/link/-/link-3.21.0.tgz#8be68ff0ccee104b174b5bbd606302c2f06e9d9b" + integrity sha512-tGu9GxrX7Ivs+Wl3w1+jrLi1nQ36kNI32dcOssij6bg0oZ2M2MDEFI9UF2gmoypTaN9uO5TSsjCFS7aR79HbdQ== dependencies: - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/package-graph" "3.18.5" "@lerna/symlink-dependencies" "3.17.0" p-map "^2.1.0" slash "^2.0.0" -"@lerna/list@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/list/-/list-3.20.0.tgz#7e67cc29c5cf661cfd097e8a7c2d3dcce7a81029" - integrity sha512-fXTicPrfioVnRzknyPawmYIVkzDRBaQqk9spejS1S3O1DOidkihK0xxNkr8HCVC0L22w6f92g83qWDp2BYRUbg== +"@lerna/list@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/list/-/list-3.21.0.tgz#42f76fafa56dea13b691ec8cab13832691d61da2" + integrity sha512-KehRjE83B1VaAbRRkRy6jLX1Cin8ltsrQ7FHf2bhwhRHK0S54YuA6LOoBnY/NtA8bHDX/Z+G5sMY78X30NS9tg== dependencies: - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/filter-options" "3.20.0" "@lerna/listable" "3.18.5" "@lerna/output" "3.13.0" @@ -1805,10 +1806,10 @@ npmlog "^4.1.2" upath "^1.2.0" -"@lerna/project@3.18.0": - version "3.18.0" - resolved "https://registry.yarnpkg.com/@lerna/project/-/project-3.18.0.tgz#56feee01daeb42c03cbdf0ed8a2a10cbce32f670" - integrity sha512-+LDwvdAp0BurOAWmeHE3uuticsq9hNxBI0+FMHiIai8jrygpJGahaQrBYWpwbshbQyVLeQgx3+YJdW2TbEdFWA== +"@lerna/project@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/project/-/project-3.21.0.tgz#5d784d2d10c561a00f20320bcdb040997c10502d" + integrity sha512-xT1mrpET2BF11CY32uypV2GPtPVm6Hgtha7D81GQP9iAitk9EccrdNjYGt5UBYASl4CIDXBRxwmTTVGfrCx82A== dependencies: "@lerna/package" "3.16.0" "@lerna/validation-error" "3.13.0" @@ -1831,10 +1832,10 @@ inquirer "^6.2.0" npmlog "^4.1.2" -"@lerna/publish@3.20.2": - version "3.20.2" - resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-3.20.2.tgz#a45d29813099b3249657ea913d0dc3f8ebc5cc2e" - integrity sha512-N7Y6PdhJ+tYQPdI1tZum8W25cDlTp4D6brvRacKZusweWexxaopbV8RprBaKexkEX/KIbncuADq7qjDBdQHzaA== +"@lerna/publish@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-3.21.0.tgz#0112393125f000484c3f50caba71a547f91bd7f4" + integrity sha512-JZ+ehZB9UCQ9nqH8Ld/Yqc/If++aK/7XIubkrB9sQ5hf2GeIbmI/BrJpMgLW/e9T5bKrUBZPUvoUN3daVipA5A== dependencies: "@evocateur/libnpmaccess" "^3.1.2" "@evocateur/npm-registry-fetch" "^4.0.0" @@ -1842,7 +1843,7 @@ "@lerna/check-working-tree" "3.16.5" "@lerna/child-process" "3.16.5" "@lerna/collect-updates" "3.20.0" - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/describe-ref" "3.16.5" "@lerna/log-packed" "3.16.0" "@lerna/npm-conf" "3.16.0" @@ -1857,7 +1858,7 @@ "@lerna/run-lifecycle" "3.16.2" "@lerna/run-topologically" "3.18.5" "@lerna/validation-error" "3.13.0" - "@lerna/version" "3.20.2" + "@lerna/version" "3.21.0" figgy-pudding "^3.5.1" fs-extra "^8.1.0" npm-package-arg "^6.1.0" @@ -1920,12 +1921,12 @@ figgy-pudding "^3.5.1" p-queue "^4.0.0" -"@lerna/run@3.20.0": - version "3.20.0" - resolved "https://registry.yarnpkg.com/@lerna/run/-/run-3.20.0.tgz#a479f7c42bdf9ebabb3a1e5a2bdebb7a8d201151" - integrity sha512-9U3AqeaCeB7KsGS9oyKNp62s9vYoULg/B4cqXTKZkc+OKL6QOEjYHYVSBcMK9lUXrMjCjDIuDSX3PnTCPxQ2Dw== +"@lerna/run@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/run/-/run-3.21.0.tgz#2a35ec84979e4d6e42474fe148d32e5de1cac891" + integrity sha512-fJF68rT3veh+hkToFsBmUJ9MHc9yGXA7LSDvhziAojzOb0AI/jBDp6cEcDQyJ7dbnplba2Lj02IH61QUf9oW0Q== dependencies: - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/filter-options" "3.20.0" "@lerna/npm-run-script" "3.16.5" "@lerna/output" "3.13.0" @@ -1970,15 +1971,15 @@ dependencies: npmlog "^4.1.2" -"@lerna/version@3.20.2": - version "3.20.2" - resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.20.2.tgz#3709141c0f537741d9bc10cb24f56897bcb30428" - integrity sha512-ckBJMaBWc+xJen0cMyCE7W67QXLLrc0ELvigPIn8p609qkfNM0L0CF803MKxjVOldJAjw84b8ucNWZLvJagP/Q== +"@lerna/version@3.21.0": + version "3.21.0" + resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.21.0.tgz#5bcc3d2de9eb8f4db18efb0d88973f9a509eccc3" + integrity sha512-nIT3u43fCNj6uSMN1dRxFnF4GhmIiOEqSTkGSjrMU+8kHKwzOqS/6X6TOzklBmCyEZOpF/fLlGqH3BZHnwLDzQ== dependencies: "@lerna/check-working-tree" "3.16.5" "@lerna/child-process" "3.16.5" "@lerna/collect-updates" "3.20.0" - "@lerna/command" "3.18.5" + "@lerna/command" "3.21.0" "@lerna/conventional-commits" "3.18.5" "@lerna/github-client" "3.16.5" "@lerna/gitlab-client" "3.15.0" @@ -2030,12 +2031,12 @@ dependencies: "@octokit/types" "^2.0.0" -"@octokit/endpoint@^6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.0.tgz#4c7acd79ab72df78732a7d63b09be53ec5a2230b" - integrity sha512-3nx+MEYoZeD0uJ+7F/gvELLvQJzLXhep2Az0bBSXagbApDvDW0LWwpnAIY/hb0Jwe17A0fJdz0O12dPh05cj7A== +"@octokit/endpoint@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.1.tgz#16d5c0e7a83e3a644d1ddbe8cded6c3d038d31d7" + integrity sha512-pOPHaSz57SFT/m3R5P8MUu4wLPszokn5pXcB/pzavLTQf2jbU+6iayTvzaY6/BiotuRS0qyEUkx3QglT4U958A== dependencies: - "@octokit/types" "^2.0.0" + "@octokit/types" "^2.11.1" is-plain-object "^3.0.0" universal-user-agent "^5.0.0" @@ -2083,13 +2084,13 @@ once "^1.4.0" "@octokit/request@^5.2.0": - version "5.3.4" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.3.4.tgz#fbc950bf785d59da3b0399fc6d042c8cf52e2905" - integrity sha512-qyj8G8BxQyXjt9Xu6NvfvOr1E0l35lsXtwm3SopsYg/JWXjlsnwqLc8rsD2OLguEL/JjLfBvrXr4az7z8Lch2A== + version "5.4.2" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.2.tgz#74f8e5bbd39dc738a1b127629791f8ad1b3193ee" + integrity sha512-zKdnGuQ2TQ2vFk9VU8awFT4+EYf92Z/v3OlzRaSh4RIP0H6cvW1BFPXq4XYvNez+TPQjqN+0uSkCYnMFFhcFrw== dependencies: - "@octokit/endpoint" "^6.0.0" + "@octokit/endpoint" "^6.0.1" "@octokit/request-error" "^2.0.0" - "@octokit/types" "^2.0.0" + "@octokit/types" "^2.11.1" deprecation "^2.0.0" is-plain-object "^3.0.0" node-fetch "^2.3.0" @@ -2118,10 +2119,10 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/types@^2.0.0", "@octokit/types@^2.0.1": - version "2.5.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.5.1.tgz#22563b3bb50034bea3176eac1860340c5e812e2a" - integrity sha512-q4Wr7RexkPRrkQpXzUYF5Fj/14Mr65RyOHj6B9d/sQACpqGcStkHZj4qMEtlMY5SnD/69jlL9ItGPbDM0dR/dA== +"@octokit/types@^2.0.0", "@octokit/types@^2.0.1", "@octokit/types@^2.11.1": + version "2.16.2" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.16.2.tgz#4c5f8da3c6fecf3da1811aef678fda03edac35d2" + integrity sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q== dependencies: "@types/node" ">= 8" @@ -2646,16 +2647,16 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.0.9" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.9.tgz#be82fab304b141c3eee81a4ce3b034d0eba1590a" - integrity sha512-jEFQ8L1tuvPjOI8lnpaf73oCJe+aoxL6ygqSy6c8LcW98zaC+4mzWuQIRCEvKeCOu+lbqdXcg4Uqmm1S8AP1tw== + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.11.tgz#1ae3010e8bf8851d324878b42acec71986486d18" + integrity sha512-ddHK5icION5U6q11+tV2f9Mo6CZVuT8GJKld2q9LqHSZbvLbH34Kcu2yFGckZut453+eQU6btIA3RihmnRgI+Q== dependencies: "@babel/types" "^7.3.0" "@types/cheerio@*": - version "0.22.17" - resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.17.tgz#e54f71c3135f71ebc16c8dc62edad533872c9e72" - integrity sha512-izlm+hbqWN9csuB9GSMfCnAyd3/57XZi3rfz1B0C4QBGVMp+9xQ7+9KYnep+ySfUrCWql4lGzkLf0XmprXcz9g== + version "0.22.18" + resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.18.tgz#19018dceae691509901e339d63edf1e935978fe6" + integrity sha512-Fq7R3fINAPSdUEhOyjG4iVxgHrOnqDJbY0/BUuiN0pvD/rfmZWekVZnv+vcs8TtpA2XF50uv50LaE4EnpEL/Hw== dependencies: "@types/node" "*" @@ -2714,9 +2715,9 @@ "@types/node" "*" "@types/history@*", "@types/history@^4.7.3": - version "4.7.5" - resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.5.tgz#527d20ef68571a4af02ed74350164e7a67544860" - integrity sha512-wLD/Aq2VggCJXSjxEwrMafIP51Z+13H78nXIX0ABEuIGhmB5sNGbR113MOKo+yfw+RDo1ZU3DM6yfnnRF/+ouw== + version "4.7.6" + resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.6.tgz#ed8fc802c45b8e8f54419c2d054e55c9ea344356" + integrity sha512-GRTZLeLJ8ia00ZH8mxMO8t0aC9M1N9bN461Z2eaRurJo6Fpa+utgCwLzI4jQHcrdzuzp5WPN9jRwpsCQ1VhJ5w== "@types/hoist-non-react-statics@*": version "3.3.1" @@ -2727,9 +2728,9 @@ hoist-non-react-statics "^3.3.0" "@types/html-minifier-terser@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.0.0.tgz#7532440c138605ced1b555935c3115ddd20e8bef" - integrity sha512-q95SP4FdkmF0CwO0F2q0H6ZgudsApaY/yCtAQNRn1gduef5fGpyEphzy0YCq/N0UFvDSnLg5V8jFK/YGXlDiCw== + version "5.1.0" + resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.1.0.tgz#551a4589b6ee2cc9c1dff08056128aec29b94880" + integrity sha512-iYCgjm1dGPRuo12+BStjd1HiVQqhlRhWDOQigNxn023HcjnhsiFz9pc6CzJj4HwDCSQca9bxTL4PxJDbkdm3PA== "@types/i18next@^13.0.0": version "13.0.0" @@ -2744,9 +2745,9 @@ integrity sha512-iTs9HReBu7evG77Q4EC8hZnqRt57irBDkK9nvmHroiOIVwYMQc4IvYvdRgwKfYepunIY7Oh/dBuuld+Gj9uo6w== "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" - integrity sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg== + version "2.0.2" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.2.tgz#79d7a78bad4219f4c03d6557a1c72d9ca6ba62d5" + integrity sha512-rsZg7eL+Xcxsxk2XlBt9KcG8nOp9iYdKCOikY9x2RFJCyOdNj4MKPQty0e8oZr29vVAzKXr1BmR+kZauti3o1w== "@types/istanbul-lib-report@*": version "3.0.0" @@ -2756,9 +2757,9 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz#7a8cbf6a406f36c8add871625b278eaf0b0d255a" - integrity sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA== + version "1.1.2" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz#e875cc689e47bce549ec81f3df5e6f6f11cfaeb2" + integrity sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw== dependencies: "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" @@ -2771,9 +2772,9 @@ "@types/jest" "*" "@types/jest@*": - version "25.2.1" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-25.2.1.tgz#9544cd438607955381c1bdbdb97767a249297db5" - integrity sha512-msra1bCaAeEdkSyA0CZ6gW1ukMIvZ5YoJkdXw/qhQdsuuDlFTcEUrUw8CLCPt2rVRUfXlClVvK2gvPs9IokZaA== + version "25.2.3" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-25.2.3.tgz#33d27e4c4716caae4eced355097a47ad363fdcaf" + integrity sha512-JXc1nK/tXHiDhV55dvfzqtmP4S3sy3T3ouV2tkViZgxY/zeUkcpQcQPGRlgF4KmWzWW5oiWYSZwtCB+2RsE4Fw== dependencies: jest-diff "^25.2.1" pretty-format "^25.2.1" @@ -2798,9 +2799,9 @@ "@types/lodash" "*" "@types/lodash@*", "@types/lodash@^4.14.136": - version "4.14.149" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.149.tgz#1342d63d948c6062838fbf961012f74d4e638440" - integrity sha512-ijGqzZt/b7BfzcK9vTrS6MFljQRPn5BFWOx8oE0GYxribu6uV+aA9zZuXI1zc/etK9E8nrgdoF2+LgUw7+9tJQ== + version "4.14.151" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.151.tgz#7d58cac32bedb0ec37cb7f99094a167d6176c9d5" + integrity sha512-Zst90IcBX5wnwSu7CAS0vvJkTjTELY4ssKbHiTnGcJgi170uiS8yQDdc3v6S77bRqYQIN1App5a1Pc2lceE5/g== "@types/lowlight@^0.0.0": version "0.0.0" @@ -2812,10 +2813,15 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== +"@types/minimist@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" + integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= + "@types/node@*", "@types/node@>= 8": - version "13.11.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.11.0.tgz#390ea202539c61c8fa6ba4428b57e05bc36dc47b" - integrity sha512-uM4mnmsIIPK/yeO+42F2RQhGUIs39K2RFmugcJANppXe6J1nvH87PvzPZYpza7Xhhs8Yn9yIAVdLZ84z61+0xQ== + version "14.0.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.1.tgz#5d93e0a099cd0acd5ef3d5bde3c086e1f49ff68c" + integrity sha512-FAYBGwC+W6F9+huFIDtn43cpy7+SzG+atzRiTfdp3inUKL2hXnd4rG8hylJLIh4+hqrQy1P17kvJByE/z825hA== "@types/normalize-package-data@^2.4.0": version "2.4.0" @@ -2843,9 +2849,9 @@ integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== "@types/q@^1.5.1": - version "1.5.2" - resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8" - integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw== + version "1.5.4" + resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" + integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== "@types/query-string@5": version "5.1.0" @@ -2853,24 +2859,24 @@ integrity sha512-9/sJK+T04pNq7uwReR0CLxqXj1dhxiTapZ1tIxA0trEsT6FRS0bz09YMcMb7tsVBTm4RJ0NEBYGsAjoEmqoFXg== "@types/reach__router@^1.2.3": - version "1.3.4" - resolved "https://registry.yarnpkg.com/@types/reach__router/-/reach__router-1.3.4.tgz#98ef393d06f59d296b5c021ba94b94e5fc463245" - integrity sha512-DZgYfxUIlVSjvf0AvBbYNbpXLrTFNNpU1HrvCRbnMtx3nvGUUWC1/zlAe4dD4FCPFtc+LQuIPEsDiTb0zQkthg== + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/reach__router/-/reach__router-1.3.5.tgz#14e1e981cccd3a5e50dc9e969a72de0b9d472f6d" + integrity sha512-h0NbqXN/tJuBY/xggZSej1SKQEstbHO7J/omt1tYoFGmj3YXOodZKbbqD4mNDh7zvEGYd7YFrac1LTtAr3xsYQ== dependencies: "@types/history" "*" "@types/react" "*" "@types/react-dom@*", "@types/react-dom@^16.9.2": - version "16.9.6" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.6.tgz#9e7f83d90566521cc2083be2277c6712dcaf754c" - integrity sha512-S6ihtlPMDotrlCJE9ST1fRmYrQNNwfgL61UB4I1W7M6kPulUKx9fXAleW5zpdIjUQ4fTaaog8uERezjsGUj9HQ== + version "16.9.8" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.8.tgz#fe4c1e11dfc67155733dfa6aa65108b4971cb423" + integrity sha512-ykkPQ+5nFknnlU6lDd947WbQ6TE3NNzbQAkInC2EKY1qeYdTKp7onFusmYZb+ityzx2YviqT6BXSu+LyWWJwcA== dependencies: "@types/react" "*" "@types/react-native@*": - version "0.62.1" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.62.1.tgz#a51d50ade85420a68d594778316ed74e5040078c" - integrity sha512-4uKqYGek9/OstJWW0hEfF/6fx8BzNkzdAFxeY+VOxec+SPKK/hvGEjnX6+0jV1MnJDBHYKdWfWA4sYCQ8G3sqA== + version "0.62.10" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.62.10.tgz#82c481df21db4e7460755dc3fc7091e333a1d2bd" + integrity sha512-QR4PGrzZ3IvRIHlScyIPuv2GV8tD/BMICZz514KGvn3KHbh0mLphHHemtHZC1o8u4xM5LxwVpMpMYHQ+ncSfag== dependencies: "@types/react" "*" @@ -2883,18 +2889,18 @@ redux "^3.6.0" "@types/react-router-dom@^5.1.0": - version "5.1.3" - resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.1.3.tgz#b5d28e7850bd274d944c0fbbe5d57e6b30d71196" - integrity sha512-pCq7AkOvjE65jkGS5fQwQhvUp4+4PVD9g39gXLZViP2UqFiFzsEpB3PKf0O6mdbKsewSK8N14/eegisa/0CwnA== + version "5.1.5" + resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.1.5.tgz#7c334a2ea785dbad2b2dcdd83d2cf3d9973da090" + integrity sha512-ArBM4B1g3BWLGbaGvwBGO75GNFbLDUthrDojV2vHLih/Tq8M+tgvY1DSwkuNrPSwdp/GUL93WSEpTZs8nVyJLw== dependencies: "@types/history" "*" "@types/react" "*" "@types/react-router" "*" "@types/react-router@*": - version "5.1.5" - resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.5.tgz#7b2f9b7cc3d350e92664c4e38c0ef529286fe628" - integrity sha512-RZPdCtZympi6X7EkGyaU7ISiAujDYTWgqMF9owE3P6efITw27IWQykcti0BvA5h4Mu1LLl5rxrpO3r8kHyUZ/Q== + version "5.1.7" + resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.7.tgz#e9d12ed7dcfc79187e4d36667745b69a5aa11556" + integrity sha512-2ouP76VQafKjtuc0ShpwUebhHwJo0G6rhahW9Pb8au3tQTjYXd2jta4wv6U2tGLR/I42yuG00+UXjNYY0dTzbg== dependencies: "@types/history" "*" "@types/react" "*" @@ -2930,9 +2936,9 @@ "@types/react" "*" "@types/react@*", "@types/react@^16.9.9": - version "16.9.32" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.32.tgz#f6368625b224604148d1ddf5920e4fefbd98d383" - integrity sha512-fmejdp0CTH00mOJmxUPPbWCEBWPvRIL4m8r0qD+BSDUqmutPyGQCHifzMpMzdvZwROdEdL78IuZItntFWgPXHQ== + version "16.9.35" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.35.tgz#a0830d172e8aadd9bd41709ba2281a3124bbd368" + integrity sha512-q0n0SsWcGc8nDqH2GJfWQWUOmZSJhXV64CjVN5SvcNti3TdEaA3AH0D8DwNmMdzjMAC/78tB8nAZIlV8yTz+zQ== dependencies: "@types/prop-types" "*" csstype "^2.2.0" @@ -2975,16 +2981,16 @@ integrity sha512-/gG2M/Imw7cQFp8PGvz/SwocNrmKFjFsm5Pb8HdbHkZ1K8pmuPzOX4VeVoiEecFCVf4CsN1r3/BRvx+6sNqwtQ== "@types/uglify-js@*": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.5.tgz#2c70d5c68f6e002e3b2e4f849adc5f162546f633" - integrity sha512-L7EbSkhSaWBpkl+PZAEAqZTqtTeIsq7s/oX/q0LNnxxJoRVKQE0T81XDVyaxjiiKQwiV2vhVeYRqxdRNqGOGJw== + version "3.9.1" + resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.9.1.tgz#0ad39d6a72979593f669acdfc7e980d590d3fb94" + integrity sha512-rdBIeMQyRBOXogop/EYBvSkYFn9D9yGxUa5hagBVG55KIdSUbp22EACJSHCs6kmmfunojAhf7zJH+Ds06/qLaQ== dependencies: source-map "^0.6.1" "@types/webpack-env@^1.15.0": - version "1.15.1" - resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.15.1.tgz#c8e84705e08eed430b5e15b39c65b0944e4d1422" - integrity sha512-eWN5ElDTeBc5lRDh95SqA8x18D0ll2pWudU3uWiyfsRmIZcmUXpEsxPU+7+BsdCrO2vfLRC629u/MmjbmF+2tA== + version "1.15.2" + resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.15.2.tgz#927997342bb9f4a5185a86e6579a0a18afc33b0a" + integrity sha512-67ZgZpAlhIICIdfQrB5fnDvaKFcDxpKibxznfYRVAT4mQE41Dido/3Ty+E3xGBmTogc5+0Qb8tWhna+5B8z1iQ== "@types/webpack-sources@*": version "0.1.7" @@ -2996,9 +3002,9 @@ source-map "^0.6.1" "@types/webpack@^4.41.8": - version "4.41.10" - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.10.tgz#2e1f6b3508a249854efe3dcc7690905ac5ee10be" - integrity sha512-vIy0qaq8AjOjZLuFPqpo7nAJzcoVXMdw3mvpNN07Uvdy0p1IpJeLNBe3obdRP7FX2jIusDE7z1pZa0A6qYUgnA== + version "4.41.13" + resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.13.tgz#988d114c8913d039b8a0e0502a7fe4f1f84f3d5e" + integrity sha512-RYmIHOWSxnTTa765N6jJBVE45pd2SYNblEYshVDduLw6RhocazNmRzE5/ytvBD8IkDMH6DI+bcrqxh8NILimBA== dependencies: "@types/anymatch" "*" "@types/node" "*" @@ -3013,60 +3019,60 @@ integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== "@types/yargs@^13.0.0": - version "13.0.8" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.8.tgz#a38c22def2f1c2068f8971acb3ea734eb3c64a99" - integrity sha512-XAvHLwG7UQ+8M4caKIH0ZozIOYay5fQkAgyIXegXT9jPtdIGdhga+sUEdAr1CiG46aB+c64xQEYyEzlwWVTNzA== + version "13.0.9" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.9.tgz#44028e974343c7afcf3960f1a2b1099c39a7b5e1" + integrity sha512-xrvhZ4DZewMDhoH1utLtOAwYQy60eYFoXeje30TzM3VOvQlBwQaEpKFq5m34k1wOw2AKIi2pwtiAjdmhvlBUzg== dependencies: "@types/yargs-parser" "*" "@types/yargs@^15.0.0": - version "15.0.4" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.4.tgz#7e5d0f8ca25e9d5849f2ea443cf7c402decd8299" - integrity sha512-9T1auFmbPZoxHz0enUFlUuKRy3it01R+hlggyVUMtnCTQRunsQYifnSGb8hET4Xo8yiC0o0r1paW3ud5+rbURg== + version "15.0.5" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.5.tgz#947e9a6561483bdee9adffc983e91a6902af8b79" + integrity sha512-Dk/IDOPtOgubt/IaevIUbTgV7doaKkoorvOyYM2CMwuDyP89bekI7H4xLIwunNYiK9jhCkmc6pUrJk3cj2AB9w== dependencies: "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^2.12.0": - version "2.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.26.0.tgz#04c96560c8981421e5a9caad8394192363cc423f" - integrity sha512-4yUnLv40bzfzsXcTAtZyTjbiGUXMrcIJcIMioI22tSOyAxpdXiZ4r7YQUU8Jj6XXrLz9d5aMHPQf5JFR7h27Nw== + version "2.34.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz#6f8ce8a46c7dea4a6f1d171d2bb8fbae6dac2be9" + integrity sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ== dependencies: - "@typescript-eslint/experimental-utils" "2.26.0" + "@typescript-eslint/experimental-utils" "2.34.0" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@2.26.0": - version "2.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.26.0.tgz#063390c404d9980767d76274df386c0aa675d91d" - integrity sha512-RELVoH5EYd+JlGprEyojUv9HeKcZqF7nZUGSblyAw1FwOGNnmQIU8kxJ69fttQvEwCsX5D6ECJT8GTozxrDKVQ== +"@typescript-eslint/experimental-utils@2.34.0": + version "2.34.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz#d3524b644cdb40eebceca67f8cf3e4cc9c8f980f" + integrity sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.26.0" + "@typescript-eslint/typescript-estree" "2.34.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" "@typescript-eslint/parser@^2.12.0": - version "2.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.26.0.tgz#385463615818b33acb72a25b39c03579df93d76f" - integrity sha512-+Xj5fucDtdKEVGSh9353wcnseMRkPpEAOY96EEenN7kJVrLqy/EVwtIh3mxcUz8lsFXW1mT5nN5vvEam/a5HiQ== + version "2.34.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.34.0.tgz#50252630ca319685420e9a39ca05fe185a256bc8" + integrity sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA== dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "2.26.0" - "@typescript-eslint/typescript-estree" "2.26.0" + "@typescript-eslint/experimental-utils" "2.34.0" + "@typescript-eslint/typescript-estree" "2.34.0" eslint-visitor-keys "^1.1.0" -"@typescript-eslint/typescript-estree@2.26.0": - version "2.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.26.0.tgz#d8132cf1ee8a72234f996519a47d8a9118b57d56" - integrity sha512-3x4SyZCLB4zsKsjuhxDLeVJN6W29VwBnYpCsZ7vIdPel9ZqLfIZJgJXO47MNUkurGpQuIBALdPQKtsSnWpE1Yg== +"@typescript-eslint/typescript-estree@2.34.0": + version "2.34.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz#14aeb6353b39ef0732cc7f1b8285294937cf37d5" + integrity sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg== dependencies: debug "^4.1.1" eslint-visitor-keys "^1.1.0" glob "^7.1.6" is-glob "^4.0.1" lodash "^4.17.15" - semver "^6.3.0" + semver "^7.3.2" tsutils "^3.17.1" "@webassemblyjs/ast@1.9.0": @@ -3282,15 +3288,15 @@ acorn@^5.5.3: resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== -acorn@^6.0.1, acorn@^6.2.1: +acorn@^6.0.1, acorn@^6.4.1: version "6.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== acorn@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" - integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== + version "7.2.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.2.0.tgz#17ea7e40d7c8640ff54a694c889c26f31704effe" + integrity sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ== address@1.1.2, address@^1.0.1: version "1.1.2" @@ -3376,9 +3382,9 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: - version "6.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" - integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== + version "6.12.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" + integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== dependencies: fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" @@ -3641,6 +3647,11 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= +arrify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" + integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== + asap@^2.0.0, asap@~2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" @@ -3733,17 +3744,17 @@ atob@^2.1.2: integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== autoprefixer@^9.7.2: - version "9.7.5" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.5.tgz#8df10b9ff9b5814a8d411a5cfbab9c793c392376" - integrity sha512-URo6Zvt7VYifomeAfJlMFnYDhow1rk2bufwkbamPEAtQFcL11moLk4PnR7n9vlu7M+BkXAZkHFA0mIcY7tjQFg== + version "9.8.0" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.0.tgz#68e2d2bef7ba4c3a65436f662d0a56a741e56511" + integrity sha512-D96ZiIHXbDmU02dBaemyAg53ez+6F5yZmapmgKcjm35yEe1uVDYI8hGW3VYoGRaG290ZFf91YxHrR518vC0u/A== dependencies: - browserslist "^4.11.0" - caniuse-lite "^1.0.30001036" + browserslist "^4.12.0" + caniuse-lite "^1.0.30001061" chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.27" - postcss-value-parser "^4.0.3" + postcss "^7.0.30" + postcss-value-parser "^4.1.0" aws-sign2@~0.7.0: version "0.7.0" @@ -3850,10 +3861,10 @@ babel-plugin-add-react-displayname@^0.0.5: resolved "https://registry.yarnpkg.com/babel-plugin-add-react-displayname/-/babel-plugin-add-react-displayname-0.0.5.tgz#339d4cddb7b65fd62d1df9db9fe04de134122bd5" integrity sha1-M51M3be2X9YtHfnbn+BN4TQSK9U= -babel-plugin-dynamic-import-node@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" - integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ== +babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== dependencies: object.assign "^4.1.0" @@ -4241,11 +4252,16 @@ bluebird@^3.3.5, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== +bn.js@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.1.tgz#48efc4031a9c4041b9c99c6941d903463ab62eb5" + integrity sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA== + body-parser@1.19.0: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" @@ -4372,7 +4388,7 @@ browserify-des@^1.0.0: inherits "^2.0.1" safe-buffer "^5.1.2" -browserify-rsa@^4.0.0: +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= @@ -4381,17 +4397,19 @@ browserify-rsa@^4.0.0: randombytes "^2.0.1" browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= + version "4.2.0" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.0.tgz#545d0b1b07e6b2c99211082bf1b12cce7a0b0e11" + integrity sha512-hEZC1KEeYuoHRqhGhTy6gWrpJA3ZDjFWv0DE61643ZnOXAKJb3u7yWcrU0mMc9SwAqK1n7myPGndkp0dFG7NFA== dependencies: - 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" + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.2" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" browserify-zlib@^0.2.0: version "0.2.0" @@ -4409,13 +4427,13 @@ browserslist@4.7.0: electron-to-chromium "^1.3.247" node-releases "^1.1.29" -browserslist@^4.0.0, browserslist@^4.11.0, browserslist@^4.8.3, browserslist@^4.9.1: - version "4.11.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.11.1.tgz#92f855ee88d6e050e7e7311d987992014f1a1f1b" - integrity sha512-DCTr3kDrKEYNw6Jb9HFxVLQNaue8z+0ZfRBRjmCunKDEXEBajKDj2Y+Uelg+Pi29OnvaSGwjOsnRyNEkXzHg5g== +browserslist@^4.0.0, browserslist@^4.11.1, browserslist@^4.12.0, browserslist@^4.8.5: + version "4.12.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.12.0.tgz#06c6d5715a1ede6c51fc39ff67fd647f740b656d" + integrity sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg== dependencies: - caniuse-lite "^1.0.30001038" - electron-to-chromium "^1.3.390" + caniuse-lite "^1.0.30001043" + electron-to-chromium "^1.3.413" node-releases "^1.1.53" pkg-up "^2.0.0" @@ -4476,9 +4494,9 @@ bulma-tooltip@^3.0.0: integrity sha512-CsT3APjhlZScskFg38n8HYL8oYNUHQtcu4sz6ERarxkUpBRbk9v0h/5KAvXeKapVSn2dp9l7bOGit5SECP8EWQ== bulma@^0.8.0: - version "0.8.1" - resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.8.1.tgz#a5feacb703b73a87fdeae4f0d12317d62fc1d301" - integrity sha512-Afi2zv4DKmNSYfmx55V+Mtnt8+WfR8Rs65kWArmzEuWP7vNr7dSAEDI+ORZlgOR1gueNZwpKaPdUi4ZiTNwgPA== + version "0.8.2" + resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.8.2.tgz#5d928f16ed4a84549c2873f95c92c38c69c631a7" + integrity sha512-vMM/ijYSxX+Sm+nD7Lmc1UgWDy2JcL2nTKqwgEqXuOMU+IGALbXd5MLt/BcjBAPLIx36TtzhzBcSnOP974gcqA== byline@^5.0.0: version "5.0.0" @@ -4614,6 +4632,15 @@ camelcase-keys@^4.0.0: map-obj "^2.0.0" quick-lru "^1.0.0" +camelcase-keys@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" + integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== + dependencies: + camelcase "^5.3.1" + map-obj "^4.0.0" + quick-lru "^4.0.1" + camelcase@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" @@ -4629,6 +4656,11 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.0.0.tgz#5259f7c30e35e278f1bdc2a4d91230b37cad981e" + integrity sha512-8KMDF1Vz2gzOq54ONPJS65IvTUaB1cHJ2DMM7MbPmLZljDH1qpzzLsWdiN9pHh6qvkRVDTi/07+eNGch/oLU4w== + camelize@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" @@ -4649,10 +4681,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001036, caniuse-lite@^1.0.30001038: - version "1.0.30001039" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001039.tgz#b3814a1c38ffeb23567f8323500c09526a577bbe" - integrity sha512-SezbWCTT34eyFoWHgx8UWso7YtvtM7oosmFoXbCkdC6qJzRfBTeTgE9REtKtiuKXuMwWTZEvdnFNGAyVMorv8Q== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001043, caniuse-lite@^1.0.30001061: + version "1.0.30001062" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001062.tgz#d814b648338504b315222ace6f1a533d9a55e390" + integrity sha512-ei9ZqeOnN7edDrb24QfJ0OZicpEbsWxv7WusOiQGz/f2SfvBgHHbOEwBJ8HKGVSyx8Z6ndPjxzR6m0NQq+0bfw== capture-exit@^2.0.0: version "2.0.0" @@ -4736,10 +4768,10 @@ cheerio@^1.0.0-rc.3: lodash "^4.15.0" parse5 "^3.0.1" -"chokidar@>=2.0.0 <4.0.0": - version "3.3.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" - integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg== +"chokidar@>=2.0.0 <4.0.0", chokidar@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.0.tgz#b30611423ce376357c765b9b8f904b9fba3c0be8" + integrity sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -4747,7 +4779,7 @@ cheerio@^1.0.0-rc.3: is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.3.0" + readdirp "~3.4.0" optionalDependencies: fsevents "~2.1.2" @@ -4852,9 +4884,9 @@ cli-table3@0.5.1: colors "^1.1.2" cli-width@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" - integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" + integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== clipboard@^2.0.0: version "2.0.6" @@ -4865,15 +4897,6 @@ clipboard@^2.0.0: select "^1.1.2" tiny-emitter "^2.0.0" -cliui@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" - integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -5026,9 +5049,9 @@ commondir@^1.0.1: integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= compare-func@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" - integrity sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg= + version "1.3.4" + resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.4.tgz#6b07c4c5e8341119baf44578085bda0f4a823516" + integrity sha512-sq2sWtrqKPkEXAC8tEJA1+BqAH9GbFkGBtUOqrUX57VSfwp8xyktctk+uLoRy5eccTdxzDcVIztlYDpKs3Jv1Q== dependencies: array-ify "^1.0.0" dot-prop "^3.0.0" @@ -5134,9 +5157,9 @@ content-type@~1.0.4: integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== conventional-changelog-angular@^5.0.3: - version "5.0.6" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.6.tgz#269540c624553aded809c29a3508fdc2b544c059" - integrity sha512-QDEmLa+7qdhVIv8sFZfVxU1VSyVvnXPsxq8Vam49mKUcO1Z8VTLEJk9uI21uiJUsnmm0I4Hrsdc9TgkOQo9WSA== + version "5.0.10" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.10.tgz#5cf7b00dd315b6a6a558223c80d5ef24ddb34205" + integrity sha512-k7RPPRs0vp8+BtPsM9uDxRl6KcgqtCJmzRD1wRtgqmhQ96g8ifBGo9O/TZBG23jqlXS/rg8BKRDELxfnQQGiaA== dependencies: compare-func "^1.3.1" q "^1.5.1" @@ -5161,43 +5184,43 @@ conventional-changelog-core@^3.1.6: through2 "^3.0.0" conventional-changelog-preset-loader@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.0.tgz#580fa8ab02cef22c24294d25e52d7ccd247a9a6a" - integrity sha512-/rHb32J2EJnEXeK4NpDgMaAVTFZS3o1ExmjKMtYVgIC4MQn0vkNSbYpdGRotkfGGRWiqk3Ri3FBkiZGbAfIfOQ== + version "2.3.4" + resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" + integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== conventional-changelog-writer@^4.0.6: - version "4.0.11" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.11.tgz#9f56d2122d20c96eb48baae0bf1deffaed1edba4" - integrity sha512-g81GQOR392I+57Cw3IyP1f+f42ME6aEkbR+L7v1FBBWolB0xkjKTeCWVguzRrp6UiT1O6gBpJbEy2eq7AnV1rw== + version "4.0.16" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.16.tgz#ca10f2691a8ea6d3c2eb74bd35bcf40aa052dda5" + integrity sha512-jmU1sDJDZpm/dkuFxBeRXvyNcJQeKhGtVcFFkwTphUAzyYWcwz2j36Wcv+Mv2hU3tpvLMkysOPXJTLO55AUrYQ== dependencies: compare-func "^1.3.1" - conventional-commits-filter "^2.0.2" + conventional-commits-filter "^2.0.6" dateformat "^3.0.0" - handlebars "^4.4.0" + handlebars "^4.7.6" json-stringify-safe "^5.0.1" lodash "^4.17.15" - meow "^5.0.0" + meow "^7.0.0" semver "^6.0.0" split "^1.0.0" through2 "^3.0.0" -conventional-commits-filter@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.2.tgz#f122f89fbcd5bb81e2af2fcac0254d062d1039c1" - integrity sha512-WpGKsMeXfs21m1zIw4s9H5sys2+9JccTzpN6toXtxhpw2VNF2JUXwIakthKBy+LN4DvJm+TzWhxOMWOs1OFCFQ== +conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.6.tgz#0935e1240c5ca7698329affee1b6a46d33324c4c" + integrity sha512-4g+sw8+KA50/Qwzfr0hL5k5NWxqtrOVw4DDk3/h6L85a9Gz0/Eqp3oP+CWCNfesBvZZZEFHF7OTEbRe+yYSyKw== dependencies: lodash.ismatch "^4.4.0" modify-values "^1.0.0" conventional-commits-parser@^3.0.3: - version "3.0.8" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.8.tgz#23310a9bda6c93c874224375e72b09fb275fe710" - integrity sha512-YcBSGkZbYp7d+Cr3NWUeXbPDFUN6g3SaSIzOybi8bjHL5IJ5225OSCxJJ4LgziyEJ7AaJtE9L2/EU6H7Nt/DDQ== + version "3.1.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz#10140673d5e7ef5572633791456c5d03b69e8be4" + integrity sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA== dependencies: JSONStream "^1.0.4" is-text-path "^1.0.1" lodash "^4.17.15" - meow "^5.0.0" + meow "^7.0.0" split2 "^2.0.0" through2 "^3.0.0" trim-off-newlines "^1.0.0" @@ -5258,17 +5281,17 @@ copy-to-clipboard@^3.0.8: toggle-selection "^1.0.6" core-js-compat@^3.6.2: - version "3.6.4" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.4.tgz#938476569ebb6cda80d339bcf199fae4f16fff17" - integrity sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA== + version "3.6.5" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.5.tgz#2a51d9a4e25dfd6e690251aa81f99e3c05481f1c" + integrity sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng== dependencies: - browserslist "^4.8.3" + browserslist "^4.8.5" semver "7.0.0" core-js-pure@^3.0.0, core-js-pure@^3.0.1: - version "3.6.4" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.4.tgz#4bf1ba866e25814f149d4e9aaa08c36173506e3a" - integrity sha512-epIhRLkXdgv32xIUFaaAry2wdxZYBi6bgM7cB136dzzXXa+dFyRLTZeLUJxnd8ShrmyVXBub63n2NHo2JAt8Cw== + version "3.6.5" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.5.tgz#c79e75f5e38dbc85a662d91eea52b8256d53b813" + integrity sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA== core-js@^1.0.0: version "1.2.7" @@ -5281,9 +5304,9 @@ core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.5, core-js@^2.6.9: integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== core-js@^3.0.1, core-js@^3.0.4: - version "3.6.4" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647" - integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw== + version "3.6.5" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" + integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -5340,7 +5363,7 @@ create-emotion@^9.2.12: stylis "^3.5.0" stylis-rule-sheet "^0.0.10" -create-hash@^1.1.0, create-hash@^1.1.2: +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -5351,7 +5374,7 @@ create-hash@^1.1.0, create-hash@^1.1.2: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== @@ -5418,22 +5441,23 @@ css-declaration-sorter@^4.0.1: timsort "^0.3.0" css-loader@^3.0.0, css-loader@^3.2.0: - version "3.4.2" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.4.2.tgz#d3fdb3358b43f233b78501c5ed7b1c6da6133202" - integrity sha512-jYq4zdZT0oS0Iykt+fqnzVLRIeiPWhka+7BqPn+oSIpWJAHak5tmB/WZrJ2a21JhCeFyNnnlroSl8c+MtVndzA== + version "3.5.3" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.5.3.tgz#95ac16468e1adcd95c844729e0bb167639eb0bcf" + integrity sha512-UEr9NH5Lmi7+dguAm+/JSPovNjYbm2k3TK58EiwQHzOHH5Jfq1Y+XoP2bQO6TMn7PptMd0opxxedAWcaSTRKHw== dependencies: camelcase "^5.3.1" cssesc "^3.0.0" icss-utils "^4.1.1" loader-utils "^1.2.3" normalize-path "^3.0.0" - postcss "^7.0.23" + postcss "^7.0.27" postcss-modules-extract-imports "^2.0.0" postcss-modules-local-by-default "^3.0.2" - postcss-modules-scope "^2.1.1" + postcss-modules-scope "^2.2.0" postcss-modules-values "^3.0.0" - postcss-value-parser "^4.0.2" - schema-utils "^2.6.0" + postcss-value-parser "^4.0.3" + schema-utils "^2.6.6" + semver "^6.3.0" css-select-base-adapter@^0.1.1: version "0.1.1" @@ -5633,9 +5657,9 @@ data-urls@^1.0.0: whatwg-url "^7.0.0" date-fns@^2.4.1: - version "2.11.1" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.11.1.tgz#197b8be1bbf5c5e6fe8bea817f0fe111820e7a12" - integrity sha512-3RdUoinZ43URd2MJcquzBbDQo+J87cSzB8NkXdZiN5ia1UNyep0oCyitfiL88+R7clGTeq/RniXAc16gWyAu1w== + version "2.14.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.14.0.tgz#359a87a265bb34ef2e38f93ecf63ac453f9bc7ba" + integrity sha512-1zD+68jhFgDIM0rF05rcwYO8cExdNqxjq4xP1QKM60Q45mnO6zaMWB4tOzrIr4M4GSLntsKeE4c9Bdl2jhL/yw== dateformat@^3.0.0: version "3.0.3" @@ -5675,7 +5699,7 @@ debuglog@^1.0.1: resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= -decamelize-keys@^1.0.0: +decamelize-keys@^1.0.0, decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= @@ -6043,9 +6067,9 @@ domutils@^1.5.1, domutils@^1.7.0: domelementtype "1" domutils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.0.0.tgz#15b8278e37bfa8468d157478c58c367718133c08" - integrity sha512-n5SelJ1axbO636c2yUtOGia/IcJtVtlhQbFiVDBZHKV5ReJO1ViX7sFEemtuyoAnBxk5meNSYgA8V4s0271efg== + version "2.1.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.1.0.tgz#7ade3201af43703fde154952e3a868eb4b635f16" + integrity sha512-CD9M0Dm1iaHfQ1R/TI+z3/JWp/pgub0j4jIQKH89ARR4ATAV2nbaOQS5XxU9maJP5jHaPdDDQSEHuE2UmpUTKg== dependencies: dom-serializer "^0.2.1" domelementtype "^2.0.1" @@ -6093,9 +6117,9 @@ dotenv-expand@^5.1.0: integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== dotenv-webpack@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/dotenv-webpack/-/dotenv-webpack-1.7.0.tgz#4384d8c57ee6f405c296278c14a9f9167856d3a1" - integrity sha512-wwNtOBW/6gLQSkb8p43y0Wts970A3xtNiG/mpwj9MLUhtPCQG6i+/DSXXoNN7fbPCU/vQ7JjwGmgOeGZSSZnsw== + version "1.8.0" + resolved "https://registry.yarnpkg.com/dotenv-webpack/-/dotenv-webpack-1.8.0.tgz#7ca79cef2497dd4079d43e81e0796bc9d0f68a5e" + integrity sha512-o8pq6NLBehtrqA8Jv8jFQNtG9nhRtVqmoD4yWbgUyoU3+9WBlPe+c2EAiaJok9RB28QvrWvdWLZGeTT5aATDMg== dependencies: dotenv-defaults "^1.0.2" @@ -6142,10 +6166,10 @@ ejs@^2.7.4: resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== -electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.390: - version "1.3.397" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.397.tgz#db640c2e67b08d590a504c20b56904537aa2bafa" - integrity sha512-zcUd1p/7yzTSdWkCTrqGvbnEOASy96d0RJL/lc5BDJoO23Z3G/VHd0yIPbguDU9n8QNUTCigLO7oEdtOb7fp2A== +electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.413: + version "1.3.442" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.442.tgz#62f96e0529f40a214a97411b57f27c4f080f0aa2" + integrity sha512-3OjmbnD9+LyWzh9o3rjC7LNIkcDHjKyHM6Xt0G/+7gHGCaEIwvWYi8TrNA8feNnuGmvI9WKu289PFMQGMLHAig== element-resize-detector@^1.2.1: version "1.2.1" @@ -6154,7 +6178,7 @@ element-resize-detector@^1.2.1: dependencies: batch-processor "1.0.0" -elliptic@^6.0.0: +elliptic@^6.0.0, elliptic@^6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== @@ -6247,9 +6271,9 @@ entities@^1.1.1, entities@^1.1.2, entities@~1.1.1: integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== entities@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" - integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== + version "2.0.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.2.tgz#ac74db0bba8d33808bbf36809c3a5c3683531436" + integrity sha512-dmD3AvJQBUjKpcNkoqr+x+IF0SdRtPz9Vk0uTy4yWqga9ibB6s4v++QFWNohjiUGoMlF552ZvNyXDxz5iW0qmw== env-paths@^2.2.0: version "2.2.0" @@ -6257,9 +6281,9 @@ env-paths@^2.2.0: integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== envinfo@^7.3.1: - version "7.5.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.5.0.tgz#91410bb6db262fb4f1409bd506e9ff57e91023f4" - integrity sha512-jDgnJaF/Btomk+m3PZDTTCb5XIIIX3zYItnCRfF73zVgvinLoRomuhi75Y4su0PtQxWz4v66XnLLckyvyJTOIQ== + version "7.5.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.5.1.tgz#93c26897225a00457c75e734d354ea9106a72236" + integrity sha512-hQBkDf2iO4Nv0CNHpCuSBeaSrveU6nThVxFGTrq/eDlV716UQk09zChaJae4mZRsos1x4YLY2TaH3LHUae3ZmQ== enzyme-adapter-react-16@^1.15.0: version "1.15.2" @@ -6289,9 +6313,9 @@ enzyme-adapter-utils@^1.13.0: semver "^5.7.1" enzyme-context-react-router-4@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/enzyme-context-react-router-4/-/enzyme-context-react-router-4-2.0.0.tgz#d23ab6a4e3a6c6d34519def1bdacea4fd19daecd" - integrity sha512-q/0Fugcvipzo6qxghQ9NQjMrj0PW1wZh02dQ67AVg/j35naD4MeXihI2la3s4fUKGhrK6IUCQ4QGEw15slTNqQ== + version "2.1.0" + resolved "https://registry.yarnpkg.com/enzyme-context-react-router-4/-/enzyme-context-react-router-4-2.1.0.tgz#3154fc5294047e55fa65c4f15b3df912500f5b20" + integrity sha512-PCH0DuZ70r5PTDn6ZkETsF8MS2g9sgbrJGM2lvHsBHNI41p6HUo8nPf2zWJJ1vyWCDGQNlvuNUt5p9ZdgL0vCA== dependencies: "@types/history" "^4.7.3" enzyme-context-utils "^1.1.0" @@ -6463,9 +6487,9 @@ escodegen@^1.9.1: source-map "~0.6.1" eslint-config-prettier@^6.4.0: - version "6.10.1" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz#129ef9ec575d5ddc0e269667bf09defcd898642a" - integrity sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ== + version "6.11.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" + integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== dependencies: get-stdin "^6.0.0" @@ -6533,9 +6557,9 @@ eslint-plugin-jsx-a11y@^6.2.3: jsx-ast-utils "^2.2.1" eslint-plugin-prettier@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz#432e5a667666ab84ce72f945c72f77d996a5c9ba" - integrity sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA== + version "3.1.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz#ae116a0fc0e598fdae48743a4430903de5b4e6ca" + integrity sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ== dependencies: prettier-linter-helpers "^1.0.0" @@ -6545,9 +6569,9 @@ eslint-plugin-react-hooks@^2.1.2: integrity sha512-Y2c4b55R+6ZzwtTppKwSmK/Kar8AdLiC2f9NADCuxbcTgPPg41Gyqa6b9GppgXSvCtkRw43ZE86CT5sejKC6/g== eslint-plugin-react@^7.16.0: - version "7.19.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz#6d08f9673628aa69c5559d33489e855d83551666" - integrity sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ== + version "7.20.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.20.0.tgz#f98712f0a5e57dfd3e5542ef0604b8739cd47be3" + integrity sha512-rqe1abd0vxMjmbPngo4NaYxTcR3Y4Hrmc/jg4T+sYz63yqlmJRknpEQfmWY+eDWPuMmix6iUIK+mv0zExjeLgA== dependencies: array-includes "^3.1.1" doctrine "^2.1.0" @@ -6558,7 +6582,6 @@ eslint-plugin-react@^7.16.0: object.values "^1.1.1" prop-types "^15.7.2" resolve "^1.15.1" - semver "^6.3.0" string.prototype.matchall "^4.0.2" xregexp "^4.3.0" @@ -6655,11 +6678,11 @@ esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.2.0.tgz#a010a519c0288f2530b3404124bfb5f02e9797fe" - integrity sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q== + version "1.3.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" + integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== dependencies: - estraverse "^5.0.0" + estraverse "^5.1.0" esrecurse@^4.1.0: version "4.2.1" @@ -6673,10 +6696,10 @@ estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.0.0.tgz#ac81750b482c11cca26e4b07e83ed8f75fbcdc22" - integrity sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A== +estraverse@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.1.0.tgz#374309d39fd935ae500e7b92e8a6b4c720e59642" + integrity sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw== esutils@^2.0.2: version "2.0.3" @@ -6694,9 +6717,9 @@ eventemitter3@^3.1.0: integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== eventemitter3@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" - integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg== + version "4.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" + integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== events@^3.0.0: version "3.1.0" @@ -7044,7 +7067,7 @@ find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-cache-dir@^3.0.0, find-cache-dir@^3.2.0: +find-cache-dir@^3.0.0, find-cache-dir@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== @@ -7120,10 +7143,10 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" -focus-lock@^0.6.6: - version "0.6.6" - resolved "https://registry.yarnpkg.com/focus-lock/-/focus-lock-0.6.6.tgz#98119a755a38cfdbeda0280eaa77e307eee850c7" - integrity sha512-Dx69IXGCq1qsUExWuG+5wkiMqVM/zGx/reXSJSLogECwp3x6KeNQZ+NAetgxEFpnC41rD8U3+jRCW68+LNzdtw== +focus-lock@^0.6.7: + version "0.6.8" + resolved "https://registry.yarnpkg.com/focus-lock/-/focus-lock-0.6.8.tgz#61985fadfa92f02f2ee1d90bc738efaf7f3c9f46" + integrity sha512-vkHTluRCoq9FcsrldC0ulQHiyBYgVJB2CX53I8r0nTC6KnEij7Of0jpBspjt3/CuNb6fyoj3aOh9J2HgQUM0og== follow-redirects@^1.0.0: version "1.11.0" @@ -7257,17 +7280,17 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.2.7: - version "1.2.12" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c" - integrity sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q== + version "1.2.13" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" + integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== dependencies: bindings "^1.5.0" nan "^2.12.1" fsevents@~2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" - integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== function-bind@^1.1.1: version "1.1.1" @@ -7322,11 +7345,6 @@ gensync@^1.0.0-beta.1: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -7426,9 +7444,9 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" -gitdiff-parser@^0.1.2, "gitdiff-parser@https://github.com/scm-manager/gitdiff-parser#ed3fe7de73dbb0a06c3e6adbbdf22dbae6e66351": +gitdiff-parser@^0.1.2, "gitdiff-parser@https://github.com/scm-manager/gitdiff-parser#617747460280bf4522bb84d217a9064ac8eb6d3d": version "0.1.2" - resolved "https://github.com/scm-manager/gitdiff-parser#ed3fe7de73dbb0a06c3e6adbbdf22dbae6e66351" + resolved "https://github.com/scm-manager/gitdiff-parser#617747460280bf4522bb84d217a9064ac8eb6d3d" glob-base@^0.3.0: version "0.3.0" @@ -7591,9 +7609,9 @@ good-listener@^1.2.2: delegate "^3.1.2" graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2: - version "4.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== growly@^1.3.0: version "1.3.0" @@ -7618,7 +7636,7 @@ handle-thing@^2.0.0: resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== -handlebars@^4.4.0: +handlebars@^4.7.6: version "4.7.6" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== @@ -7643,6 +7661,11 @@ har-validator@~5.1.3: ajv "^6.5.5" har-schema "^2.0.0" +hard-rejection@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" + integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -7709,12 +7732,13 @@ has@^1.0.0, has@^1.0.3: function-bind "^1.1.1" hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" @@ -7843,10 +7867,10 @@ html-encoding-sniffer@^1.0.2: dependencies: whatwg-encoding "^1.0.1" -html-entities@^1.2.0, html-entities@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" - integrity sha1-DfKTUfByEWNRXfueVUPl9u7VFi8= +html-entities@^1.2.0, html-entities@^1.2.1, html-entities@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.3.1.tgz#fb9a1a4b5b14c5daba82d3e34c6ae4fe701a0e44" + integrity sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA== html-escaper@^2.0.0: version "2.0.2" @@ -7854,9 +7878,9 @@ html-escaper@^2.0.0: integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== html-minifier-terser@^5.0.1: - version "5.0.5" - resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.0.5.tgz#8f12f639789f04faa9f5cf2ff9b9f65607f21f8b" - integrity sha512-cBSFFghQh/uHcfSiL42KxxIRMF7A144+3E44xdlctIjxEmkEfCvouxNyFH2wysXk1fCGBPwtcr3hDWlGTfkDew== + version "5.1.1" + resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#922e96f1f3bb60832c2634b79884096389b1f054" + integrity sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg== dependencies: camel-case "^4.1.1" clean-css "^4.2.3" @@ -7884,9 +7908,9 @@ html-to-react@^1.3.4: ramda "^0.26" html-webpack-plugin@^4.0.0-beta.2: - version "4.0.4" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.0.4.tgz#90cdfb168094e93e047174d9baca098ec5540636" - integrity sha512-BREQzUbFfIQS39KqxkT2L1Ot0tuu1isako1CaCQLrgEQ43zi2ScHAe3SMTnVBWsStnIsGtl8jprDdxwZkNhrwQ== + version "4.3.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.3.0.tgz#53bf8f6d696c4637d5b656d3d9863d89ce8174fd" + integrity sha512-C0fzKN8yQoVLTelcJxZfJCE+aAvQiY2VUf3UuKrR4a9k5UMWYOtpDLsaXwATbcVCnI05hUS7L9ULQHWLZhyi3w== dependencies: "@types/html-minifier-terser" "^5.0.0" "@types/tapable" "^1.0.5" @@ -7986,9 +8010,9 @@ http-proxy-middleware@0.19.1: micromatch "^3.1.10" http-proxy@^1.17.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.0.tgz#dbe55f63e75a347db7f3d99974f2692a314a6a3a" - integrity sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ== + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== dependencies: eventemitter3 "^4.0.0" follow-redirects "^1.0.0" @@ -8024,21 +8048,21 @@ humanize-ms@^1.2.1: ms "^2.0.0" i18next-browser-languagedetector@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-4.0.2.tgz#eb02535cc5e57dd534fc60abeede05a3823a8551" - integrity sha512-AK4IZ3XST4HIKShgpB2gOFeDPrMOnZx56GLA6dGo/8rvkiczIlq05lV8w77c3ShEZxtTZeUVRI4Q/cBFFVXS/w== + version "4.2.0" + resolved "https://registry.yarnpkg.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-4.2.0.tgz#82e35d31f88a1d7c2b6d5913bf8c8481cd40aafb" + integrity sha512-qRSCBWgDUSqVQb3sTxkDC+ImYLhF+wB387Y1RpOcJvyex+V3abi+W83n4Awy+dx719AOBbKTy97FjrUGrAhbyw== dependencies: "@babel/runtime" "^7.5.5" i18next-fetch-backend@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/i18next-fetch-backend/-/i18next-fetch-backend-2.2.0.tgz#39ff6578596e0122e80692e04d7897ee373607d6" - integrity sha512-HodOCr4fezjMgJwWnOR/JUotdbM1onXdnB6Y+XDgDpXX58SkZXcyz6VmmUGc/8XMxFzq3162Qs2vO+SlO4TCFw== + version "2.3.1" + resolved "https://registry.yarnpkg.com/i18next-fetch-backend/-/i18next-fetch-backend-2.3.1.tgz#5bad723cfdec4b29698e580957fa547f4ff6e37a" + integrity sha512-cn0GFBbkkaXwaiXqfb3bpmhoBYvFR9bFBR5BeSNMP9KSmYE8M+q0QKwd68rcVDwasFxrurI97hYOY+5svGM51Q== i18next@*: - version "19.3.4" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-19.3.4.tgz#512de50ee6075df825c646e1ce646a104f0938c9" - integrity sha512-ef7AxxutzdhBsBNugE9jgqsbwesG1muJOtZ9ZrPARPs/jXegViTp4+8JCeMp8BAyTIo1Zn0giqc8+2UpqFjU0w== + version "19.4.4" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-19.4.4.tgz#c0a18bc2f2be554da636e67bfbf5200c7948b60d" + integrity sha512-ofaHtdsDdX3A5nYur1HWblB7J4hIcjr2ACdnwTAJgc8hTfPbyzZfGX0hVkKpI3vzDIgO6Uzc4v1ffW2W6gG6zw== dependencies: "@babel/runtime" "^7.3.1" @@ -8173,7 +8197,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -8523,9 +8547,9 @@ is-fullwidth-code-point@^3.0.0: integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== is-function@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" - integrity sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU= + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== is-generator-fn@^2.0.0: version "2.1.0" @@ -8633,11 +8657,6 @@ is-plain-object@^3.0.0: dependencies: isobject "^4.0.0" -is-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= - is-regex@^1.0.4, is-regex@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" @@ -8714,9 +8733,9 @@ is-utf8@^0.2.0: integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= is-what@^3.3.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.7.1.tgz#a3f810a99f88e9122cf17bf2be7709688970db1a" - integrity sha512-IAoapxlqyLSqt0Zr/7ZMT/fjEw9nwxxmz/TlBH+TJjvcXxmmAdRvo41W74uw3XJMGFpbeft97cpkPmLK89lJWw== + version "3.8.0" + resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.8.0.tgz#610bc46a524355f2424eb85eedc6ebbbf7e1ff8c" + integrity sha512-UKeBoQfV8bjlM4pmx1FLDHdxslW/1mTksEs8ReVsilPmUv5cORd4+2/wFcviI3cUjrLybxCjzc8DnodAzJ/Wrg== is-whitespace-character@^1.0.0: version "1.0.4" @@ -8744,9 +8763,11 @@ is-wsl@^1.1.0: integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= is-wsl@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.1.tgz#4a1c152d429df3d441669498e2486d3596ebaf1d" - integrity sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog== + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" isarray@0.0.1: version "0.0.1" @@ -8918,14 +8939,14 @@ jest-diff@^24.3.0, jest-diff@^24.9.0: pretty-format "^24.9.0" jest-diff@^25.2.1: - version "25.2.6" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.2.6.tgz#a6d70a9ab74507715ea1092ac513d1ab81c1b5e7" - integrity sha512-KuadXImtRghTFga+/adnNrv9s61HudRMR7gVSbP35UKZdn4IK2/0N0PpGZIqtmllK9aUyye54I3nu28OYSnqOg== + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.5.0.tgz#1dd26ed64f96667c068cef026b677dfa01afcfa9" + integrity sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A== dependencies: chalk "^3.0.0" diff-sequences "^25.2.6" jest-get-type "^25.2.6" - pretty-format "^25.2.6" + pretty-format "^25.5.0" jest-docblock@^24.3.0: version "24.9.0" @@ -9234,10 +9255,10 @@ jest-worker@^24.6.0, jest-worker@^24.9.0: merge-stream "^2.0.0" supports-color "^6.1.0" -jest-worker@^25.1.0: - version "25.2.6" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.2.6.tgz#d1292625326794ce187c38f51109faced3846c58" - integrity sha512-FJn9XDUSxcOR4cwDzRfL1z56rUofNTFs539FGASpd50RHdb6EVkhxQqktodW2mI49l+W3H+tFJDotCHUQF6dmA== +jest-worker@^25.4.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.5.0.tgz#2611d071b79cea0f43ee57a3d118593ac1547db1" + integrity sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw== dependencies: merge-stream "^2.0.0" supports-color "^7.0.0" @@ -9427,7 +9448,7 @@ kind-of@^5.0.0: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== -kind-of@^6.0.0, kind-of@^6.0.2: +kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -9486,26 +9507,26 @@ left-pad@^1.3.0: integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== lerna@^3.17.0: - version "3.20.2" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.20.2.tgz#abf84e73055fe84ee21b46e64baf37b496c24864" - integrity sha512-bjdL7hPLpU3Y8CBnw/1ys3ynQMUjiK6l9iDWnEGwFtDy48Xh5JboR9ZJwmKGCz9A/sarVVIGwf1tlRNKUG9etA== + version "3.21.0" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.21.0.tgz#c81a0f8df45c6b7c9d3fc9fdcd0f846aca2375c6" + integrity sha512-ux8yOwQEgIXOZVUfq+T8nVzPymL19vlIoPbysOP3YA4hcjKlqQIlsjI/1ugBe6b4MF7W4iV5vS3gH9cGqBBc1A== dependencies: - "@lerna/add" "3.20.0" - "@lerna/bootstrap" "3.20.0" - "@lerna/changed" "3.20.0" - "@lerna/clean" "3.20.0" + "@lerna/add" "3.21.0" + "@lerna/bootstrap" "3.21.0" + "@lerna/changed" "3.21.0" + "@lerna/clean" "3.21.0" "@lerna/cli" "3.18.5" - "@lerna/create" "3.18.5" - "@lerna/diff" "3.18.5" - "@lerna/exec" "3.20.0" - "@lerna/import" "3.18.5" - "@lerna/info" "3.20.0" - "@lerna/init" "3.18.5" - "@lerna/link" "3.18.5" - "@lerna/list" "3.20.0" - "@lerna/publish" "3.20.2" - "@lerna/run" "3.20.0" - "@lerna/version" "3.20.2" + "@lerna/create" "3.21.0" + "@lerna/diff" "3.21.0" + "@lerna/exec" "3.21.0" + "@lerna/import" "3.21.0" + "@lerna/info" "3.21.0" + "@lerna/init" "3.21.0" + "@lerna/link" "3.21.0" + "@lerna/list" "3.21.0" + "@lerna/publish" "3.21.0" + "@lerna/run" "3.21.0" + "@lerna/version" "3.21.0" import-local "^2.0.0" npmlog "^4.1.2" @@ -9599,6 +9620,15 @@ loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4.0: emojis-list "^3.0.0" json5 "^1.0.1" +loader-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" + integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^2.1.2" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -9727,10 +9757,10 @@ lodash@^4.15.0, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17. resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== -loglevel@^1.6.6: - version "1.6.7" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.7.tgz#b3e034233188c68b889f5b862415306f565e2c56" - integrity sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A== +loglevel@^1.6.8: + version "1.6.8" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171" + integrity sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA== loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" @@ -9790,9 +9820,9 @@ make-dir@^2.0.0, make-dir@^2.1.0: semver "^5.6.0" make-dir@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" - integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== dependencies: semver "^6.0.0" @@ -9842,6 +9872,11 @@ map-obj@^2.0.0: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= +map-obj@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.1.0.tgz#b91221b542734b9f14256c0132c897c5d7256fd5" + integrity sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g== + map-or-similar@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/map-or-similar/-/map-or-similar-1.5.0.tgz#6de2653174adfb5d9edc33c69d3e92a1b76faf08" @@ -9860,9 +9895,9 @@ markdown-escapes@^1.0.0: integrity sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg== markdown-to-jsx@^6.9.1, markdown-to-jsx@^6.9.3: - version "6.11.0" - resolved "https://registry.yarnpkg.com/markdown-to-jsx/-/markdown-to-jsx-6.11.0.tgz#a2e3f2bc781c3402d8bb0f8e0a12a186474623b0" - integrity sha512-RH7LCJQ4RFmPqVeZEesKaO1biRzB/k4utoofmTCp3Eiw6D7qfvK8fzZq/2bjEJAtVkfPrM5SMt5APGf2rnaKMg== + version "6.11.1" + resolved "https://registry.yarnpkg.com/markdown-to-jsx/-/markdown-to-jsx-6.11.1.tgz#3931612cfffaa5fd6610ecf2a4055eccccb98fa8" + integrity sha512-FdtDAv8d9/tjyHxdCvWZxxOgK2icwzBkTq/dPk+XlQ2B+DYDcwE89FWGzT92erXQ0CQR/bQbpNK3loNYhYL70g== dependencies: prop-types "^15.6.2" unquote "^1.1.0" @@ -9966,20 +10001,24 @@ meow@^4.0.0: redent "^2.0.0" trim-newlines "^2.0.0" -meow@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" - integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== +meow@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/meow/-/meow-7.0.1.tgz#1ed4a0a50b3844b451369c48362eb0515f04c1dc" + integrity sha512-tBKIQqVrAHqwit0vfuFPY3LlzJYkEOFyKa3bPgxzNl6q/RtN8KQ+ALYEASYuFayzSAsjlhXj/JZ10rH85Q6TUw== dependencies: - 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" + "@types/minimist" "^1.2.0" + arrify "^2.0.1" + camelcase "^6.0.0" + camelcase-keys "^6.2.2" + decamelize-keys "^1.1.0" + hard-rejection "^2.1.0" + minimist-options "^4.0.2" + normalize-package-data "^2.5.0" + read-pkg-up "^7.0.1" + redent "^3.0.0" + trim-newlines "^3.0.0" + type-fest "^0.13.1" + yargs-parser "^18.1.3" merge-anything@^2.2.4: version "2.4.4" @@ -10057,17 +10096,17 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.43.0, "mime-db@>= 1.43.0 < 2": - version "1.43.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" - integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== +mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.26" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" - integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== dependencies: - mime-db "1.43.0" + mime-db "1.44.0" mime@1.6.0: version "1.6.0" @@ -10075,9 +10114,9 @@ mime@1.6.0: integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mime@^2.4.4: - version "2.4.4" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" - integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== + version "2.4.5" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.5.tgz#d8de2ecb92982dedbb6541c9b6841d7f218ea009" + integrity sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w== mimic-fn@^1.0.0: version "1.2.0" @@ -10101,14 +10140,13 @@ min-indent@^1.0.0: resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.0.tgz#cfc45c37e9ec0d8f0a0ec3dd4ef7f7c3abe39256" integrity sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY= -mini-create-react-context@^0.3.0: - version "0.3.2" - resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.3.2.tgz#79fc598f283dd623da8e088b05db8cddab250189" - integrity sha512-2v+OeetEyliMt5VHMXsBhABoJ0/M4RCe7fatd/fBy6SMiKazUSEt3gxxypfnk2SHMkdBYvorHRoQxuGoiwbzAw== +mini-create-react-context@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.4.0.tgz#df60501c83151db69e28eac0ef08b4002efab040" + integrity sha512-b0TytUgFSbgFJGzJqXPKCFCBWigAjpjo+Fl7Vf7ZbKRDptszpppKxXH6DRXEABZ/gcEQczeb0iZ7JvL8e8jjCA== dependencies: - "@babel/runtime" "^7.4.0" - gud "^1.0.0" - tiny-warning "^1.0.2" + "@babel/runtime" "^7.5.5" + tiny-warning "^1.0.3" mini-css-extract-plugin@^0.7.0: version "0.7.0" @@ -10155,6 +10193,15 @@ minimist-options@^3.0.1: arrify "^1.0.1" is-plain-obj "^1.1.0" +minimist-options@^4.0.2: + version "4.1.0" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" + integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== + dependencies: + arrify "^1.0.1" + is-plain-obj "^1.1.0" + kind-of "^6.0.3" + minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -10175,9 +10222,9 @@ minipass-flush@^1.0.5: minipass "^3.0.0" minipass-pipeline@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.2.tgz#3dcb6bb4a546e32969c7ad710f2c79a86abba93a" - integrity sha512-3JS5A2DKhD2g0Gg8x3yamO0pj7YeKGwVlDS90pF++kxptwx/F+B//roxf9SqYil5tQo65bijy+dAuAFZmYOouA== + version "1.2.3" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.3.tgz#55f7839307d74859d6e8ada9c3ebe72cec216a34" + integrity sha512-cFOknTvng5vqnwOpDsZTWhNll6Jf8o2x+/diplafmxpuIymAjzoOolZG0VvQf3V2HgqzJNhnuKHYp2BqDgz8IQ== dependencies: minipass "^3.0.0" @@ -10190,9 +10237,9 @@ minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: yallist "^3.0.0" minipass@^3.0.0, minipass@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.1.tgz#7607ce778472a185ad6d89082aa2070f79cedcd5" - integrity sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w== + version "3.1.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" + integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== dependencies: yallist "^4.0.0" @@ -10339,9 +10386,9 @@ mz@^2.5.0: thenify-all "^1.0.0" nan@^2.12.1: - version "2.14.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" - integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + version "2.14.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" + integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== nanomatch@^1.2.9: version "1.2.13" @@ -10366,9 +10413,9 @@ natural-compare@^1.4.0: integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= nearley@^2.7.10: - version "2.19.1" - resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.19.1.tgz#4af4006e16645ff800e9f993c3af039857d9dbdc" - integrity sha512-xq47GIUGXxU9vQg7g/y1o1xuKnkO7ev4nRWqftmQrLkfnE/FjRqDaGOUakM8XHPn/6pW3bGjU2wgoJyId90rqg== + version "2.19.3" + resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.19.3.tgz#ae3b040e27616b5348102c436d1719209476a5a1" + integrity sha512-FpAy1PmTsUpOtgxr23g4jRNvJHYzZEW2PixXeSzksLR/ykPfwKhAodc2+9wQhY+JneWLcvkDw6q7FJIsIdF/aQ== dependencies: commander "^2.19.0" moo "^0.5.0" @@ -10501,9 +10548,9 @@ node-notifier@^5.4.2: which "^1.3.0" node-releases@^1.1.29, node-releases@^1.1.53: - version "1.1.53" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4" - integrity sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ== + version "1.1.55" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.55.tgz#8af23b7c561d8e2e6e36a46637bab84633b07cee" + integrity sha512-H3R3YR/8TjT5WPin/wOoHOUPHgvj8leuU/Keta/rwelEQN9pA/S2Dx8/se4pZ2LBxSd0nAGzsNzhqwa77v7F1w== nopt@^4.0.1: version "4.0.3" @@ -10680,9 +10727,12 @@ object-inspect@^1.7.0: integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== object-is@^1.0.1, object-is@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.2.tgz#6b80eb84fe451498f65007982f035a5b445edec4" - integrity sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ== + version "1.1.2" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6" + integrity sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" @@ -10802,9 +10852,9 @@ open@^6.3.0: is-wsl "^1.1.0" open@^7.0.0: - version "7.0.3" - resolved "https://registry.yarnpkg.com/open/-/open-7.0.3.tgz#db551a1af9c7ab4c7af664139930826138531c48" - integrity sha512-sP2ru2v0P290WFfv49Ap8MF6PkzGNnGlAwHweB4WR4mr5d2d0woiCluUeJ218w7/+PmoBy9JmYgD5A4mLcWOFA== + version "7.0.4" + resolved "https://registry.yarnpkg.com/open/-/open-7.0.4.tgz#c28a9d315e5c98340bf979fdcb2e58664aa10d83" + integrity sha512-brSA+/yq+b08Hsr4c8fsEW2CRzk1BmfN3SAK/5VCHQ9bdoZJ4qa/+AfR0xHjlbbZUyPkUHs1b8x1RqdyZdkVqQ== dependencies: is-docker "^2.0.0" is-wsl "^2.1.1" @@ -10853,7 +10903,7 @@ os-homedir@^1.0.0: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-locale@^3.0.0, os-locale@^3.1.0: +os-locale@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== @@ -10912,7 +10962,7 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.2: +p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== @@ -11029,7 +11079,7 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-asn1@^5.0.0: +parse-asn1@^5.0.0, parse-asn1@^5.1.5: version "5.1.5" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ== @@ -11244,7 +11294,7 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.0.7: +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== @@ -11324,21 +11374,21 @@ pnp-webpack-plugin@1.5.0: ts-pnp "^1.1.2" polished@^3.3.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/polished/-/polished-3.5.1.tgz#657b6faf4c2308f3e0b1951196803a5e5d67b122" - integrity sha512-GVbvskpBiDV5TknurGL6OyFfLHsCknxbU8w5iMppT8rW0tLEoQHrIRfrPNPqGXNj3HGhkjRvhmg59Fy7HSnCAw== + version "3.6.3" + resolved "https://registry.yarnpkg.com/polished/-/polished-3.6.3.tgz#68f4fe7ffad46530733029b939dd12978200cb59" + integrity sha512-QJ0q0b6gX1+0OJtPMfgVJxV0vg5XTa4im+Rca989dAtmsd/fEky3X+0A+V+OUXq1nyiDGplJwqD853dTS0gkPg== dependencies: - "@babel/runtime" "^7.8.7" + "@babel/runtime" "^7.9.2" popper.js@^1.14.4, popper.js@^1.14.7: version "1.16.1" resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b" integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ== -portfinder@^1.0.25: - version "1.0.25" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" - integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg== +portfinder@^1.0.26: + version "1.0.26" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.26.tgz#475658d56ca30bed72ac7f1378ed350bd1b64e70" + integrity sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ== dependencies: async "^2.6.2" debug "^3.1.1" @@ -11406,9 +11456,9 @@ postcss-discard-overridden@^4.0.1: postcss "^7.0.0" postcss-flexbugs-fixes@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.2.0.tgz#662b3dcb6354638b9213a55eed8913bcdc8d004a" - integrity sha512-QRE0n3hpkxxS/OGvzOa+PDuy4mh/Jg4o9ui22/ko5iGYOG3M5dfJabjnAZjTdh2G9F85c7Hv8hWcEDEKW/xceQ== + version "4.2.1" + resolved "https://registry.yarnpkg.com/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-4.2.1.tgz#9218a65249f30897deab1033aced8578562a6690" + integrity sha512-9SiofaZ9CWpQWxOwRh1b/r85KD5y7GgvsNt1056k6OYLvWUun0czCvogfJgylC22uJTwW1KzY3Gz65NZRlvoiQ== dependencies: postcss "^7.0.26" @@ -11509,7 +11559,7 @@ postcss-modules-local-by-default@^3.0.2: postcss-selector-parser "^6.0.2" postcss-value-parser "^4.0.0" -postcss-modules-scope@^2.1.1: +postcss-modules-scope@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" integrity sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ== @@ -11677,15 +11727,15 @@ postcss-value-parser@^3.0.0, postcss-value-parser@^3.3.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2, postcss-value-parser@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d" - integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg== +postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2, postcss-value-parser@^4.0.3, postcss-value-parser@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" + integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.23, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.5, postcss@^7.0.6: - version "7.0.27" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.27.tgz#cc67cdc6b0daa375105b7c424a85567345fc54d9" - integrity sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ== +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.30, postcss@^7.0.5, postcss@^7.0.6: + version "7.0.30" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.30.tgz#cc9378beffe46a02cbc4506a0477d05fcea9a8e2" + integrity sha512-nu/0m+NtIzoubO+xdAlwZl/u5S5vi/y6BCsoL8D+8IxsD3XvBS8X4YEADNIVXKVuQvduiucnRv+vPIqj56EGMQ== dependencies: chalk "^2.4.2" source-map "^0.6.1" @@ -11736,12 +11786,12 @@ pretty-format@^24.9.0: ansi-styles "^3.2.0" react-is "^16.8.4" -pretty-format@^25.2.1, pretty-format@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.2.6.tgz#542a1c418d019bbf1cca2e3620443bc1323cb8d7" - integrity sha512-DEiWxLBaCHneffrIT4B+TpMvkV9RNvvJrd3lY9ew1CEQobDzEXmYT1mg0hJhljZty7kCc10z13ohOFAE8jrUDg== +pretty-format@^25.2.1, pretty-format@^25.5.0: + version "25.5.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.5.0.tgz#7873c1d774f682c34b8d48b6743a2bf2ac55791a" + integrity sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ== dependencies: - "@jest/types" "^25.2.6" + "@jest/types" "^25.5.0" ansi-regex "^5.0.0" ansi-styles "^4.0.0" react-is "^16.12.0" @@ -11859,9 +11909,9 @@ prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, react-is "^16.8.1" property-information@^5.0.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.4.0.tgz#16e08f13f4e5c4a7be2e4ec431c01c4f8dba869a" - integrity sha512-nmMWAm/3vKFGmmOWOcdLjgq/Hlxa+hsuR/px1Lp/UGEyc5A22A6l78Shc2C0E71sPmAqglni+HrS7L7VJ7AUCA== + version "5.5.0" + resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.5.0.tgz#4dc075d493061a82e2b7d096f406e076ed859943" + integrity sha512-RgEbCx2HLa1chNgvChcx+rrCWD0ctBmGSE0M7lVm1yyv4UbvbrWoXp/BkVLZefzjrRBGW8/Js6uh/BnlHXFyjA== dependencies: xtend "^4.0.0" @@ -11963,9 +12013,9 @@ qs@6.7.0: integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== qs@^6.6.0: - version "6.9.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.3.tgz#bfadcd296c2d549f1dffa560619132c977f5008e" - integrity sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw== + version "6.9.4" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.4.tgz#9090b290d1f91728d3c22e54843ca44aea5ab687" + integrity sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ== qs@~6.5.2: version "6.5.2" @@ -12009,6 +12059,11 @@ quick-lru@^1.0.0: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= +quick-lru@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" + integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== + raf@^3.4.0, raf@^3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" @@ -12121,9 +12176,9 @@ react-dev-utils@^9.0.0, react-dev-utils@^9.1.0: text-table "0.2.0" react-diff-view@^2.4.1: - version "2.4.3" - resolved "https://registry.yarnpkg.com/react-diff-view/-/react-diff-view-2.4.3.tgz#ad78f9760409757563f1a9b25682dc792a87baf6" - integrity sha512-7pCMzojlN2ql0ppg4Ppcg3STpJw3l98AA4fZqmUuSYNtX2D9jVLNHT60c+UGKQwfWRFKQPrswq0o4BOy4SpRzw== + version "2.4.4" + resolved "https://registry.yarnpkg.com/react-diff-view/-/react-diff-view-2.4.4.tgz#d255622ebaf9d1339600d5febccfc0bff30abf4a" + integrity sha512-eS+NIxOHpgGy/uGGB0wv4GvN6iXNaOlxiTPreBsKj6VpzbgsaeF5h084ZDQD9Q28gdCB5K5CQ5ZLqKfqEw+SPw== dependencies: classnames "^2.2.6" diff-match-patch "^1.0.4" @@ -12156,9 +12211,9 @@ react-dom@^16.10.2, react-dom@^16.8.3, react-dom@^16.8.6: scheduler "^0.19.1" react-draggable@^4.0.3: - version "4.2.0" - resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-4.2.0.tgz#40cc5209082ca7d613104bf6daf31372cc0e1114" - integrity sha512-5wFq//gEoeTYprnd4ze8GrFc+Rbnx+9RkOMR3vk4EbWxj02U6L6T3yrlKeiw4X5CtjD2ma2+b3WujghcXNRzkw== + version "4.4.2" + resolved "https://registry.yarnpkg.com/react-draggable/-/react-draggable-4.4.2.tgz#f3cefecee25f467f865144cda0d066e5f05f94a0" + integrity sha512-zLQs4R4bnBCGnCVTZiD8hPsHtkiJxgMpGDlRESM+EHQo8ysXhKJ2GKdJ8UxxLJdRVceX1j19jy+hQS2wHislPQ== dependencies: classnames "^2.2.5" prop-types "^15.6.0" @@ -12168,32 +12223,32 @@ react-error-overlay@^6.0.3: resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.7.tgz#1dcfb459ab671d53f660a991513cb2f0a0553108" integrity sha512-TAv1KJFh3RhqxNvhzxj6LeT5NWklP6rDr2a0jaTfsZ5wSZWHOGeqQyejUp3xxLfPt2UpyJEcVQB/zyPcmonNFA== -react-fast-compare@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9" - integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw== +react-fast-compare@^3.0.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.1.1.tgz#0becf31e3812fa70dc231e259f40d892d4767900" + integrity sha512-SCsAORWK59BvauR2L1BTdjQbJcSGJJz03U0awektk2hshLKrITDDFTlgGCqIZpTDlPC/NFlZee6xTMzXPVLiHw== react-focus-lock@^2.1.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/react-focus-lock/-/react-focus-lock-2.2.1.tgz#1d12887416925dc53481914b7cedd39494a3b24a" - integrity sha512-47g0xYcCTZccdzKRGufepY8oZ3W1Qg+2hn6u9SHZ0zUB6uz/4K4xJe7yYFNZ1qT6m+2JDm82F6QgKeBTbjW4PQ== + version "2.3.1" + resolved "https://registry.yarnpkg.com/react-focus-lock/-/react-focus-lock-2.3.1.tgz#9d5d85899773609c7eefa4fc54fff6a0f5f2fc47" + integrity sha512-j15cWLPzH0gOmRrUg01C09Peu8qbcdVqr6Bjyfxj80cNZmH+idk/bNBYEDSmkAtwkXI+xEYWSmHYqtaQhZ8iUQ== dependencies: "@babel/runtime" "^7.0.0" - focus-lock "^0.6.6" + focus-lock "^0.6.7" prop-types "^15.6.2" react-clientside-effect "^1.2.2" use-callback-ref "^1.2.1" use-sidecar "^1.0.1" react-helmet-async@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/react-helmet-async/-/react-helmet-async-1.0.4.tgz#079ef10b7fefcaee6240fefd150711e62463cc97" - integrity sha512-KTGHE9sz8N7+fCkZ2a3vzXH9eIkiTNhL2NhKR7XzzQl3WsGlCHh76arauJUIiGdfhjeMp7DY7PkASAmYFXeJYg== + version "1.0.6" + resolved "https://registry.yarnpkg.com/react-helmet-async/-/react-helmet-async-1.0.6.tgz#11c15c74e79b3f66670c73779bef3e0e352b1d4e" + integrity sha512-t+bhAI4NgxfEv8ez4r77cLfR4O4Z55E/FH2DT+uiE4U7yfWgAk7OAOi7IxHxuYEVLI26bqjZvlVCkpC5/5AoNA== dependencies: - "@babel/runtime" "^7.3.4" + "@babel/runtime" "^7.9.2" invariant "^2.2.4" prop-types "^15.7.2" - react-fast-compare "^2.0.4" + react-fast-compare "^3.0.1" shallowequal "^1.1.0" react-hotkeys@2.0.0: @@ -12212,9 +12267,9 @@ react-i18next@^10.13.1: html-parse-stringify2 "2.0.1" react-i18next@^11.3.3: - version "11.3.4" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.3.4.tgz#355df5fe5133e5e30302d166f529678100ffc968" - integrity sha512-IRZMD7PAM3C+fJNzRbyLNi1ZD0kc3Z3obBspJjEl+9H+ME41PhVor3BpdIqv/Rm7lUoGhMjmpu42J45ooJ61KA== + version "11.4.0" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.4.0.tgz#dde6bf3a695910af7a4270fea2e111bc331cf151" + integrity sha512-lyOZSSQkif4H9HnHN3iEKVkryLI+WkdZSEw3VAZzinZLopfYRMHVY5YxCopdkXPLEHs6S5GjKYPh3+j0j336Fg== dependencies: "@babel/runtime" "^7.3.1" html-parse-stringify2 "2.0.1" @@ -12294,33 +12349,33 @@ react-redux@^5.0.7: react-lifecycles-compat "^3.0.0" react-refresh@^0.8.0: - version "0.8.1" - resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.1.tgz#5500506ad6fc891fdd057d0bf3581f9310abc6a2" - integrity sha512-xZIKi49RtLUUSAZ4a4ut2xr+zr4+glOD5v0L413B55MPvlg4EQ6Ctx8PD4CmjlPGoAWmSCTmmkY59TErizNsow== + version "0.8.2" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.2.tgz#24bb0858eac92b0d7b0dd561747f0c9fd6c60327" + integrity sha512-n8GXxo3DwM2KtFEL69DAVhGc4A1THn2qjmfvSo3nze0NLCoPbywazeJPqdp0RdSGLmyhQzeyA+XPXOobbYlkzg== react-router-dom@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.1.2.tgz#06701b834352f44d37fbb6311f870f84c76b9c18" - integrity sha512-7BPHAaIwWpZS074UKaw1FjVdZBSVWEk8IuDXdB+OkLb8vd/WRQIpA4ag9WQk61aEfQs47wHyjWUoUGGZxpQXew== + version "5.2.0" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.2.0.tgz#9e65a4d0c45e13289e66c7b17c7e175d0ea15662" + integrity sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA== dependencies: "@babel/runtime" "^7.1.2" history "^4.9.0" loose-envify "^1.3.1" prop-types "^15.6.2" - react-router "5.1.2" + react-router "5.2.0" tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-router@5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.1.2.tgz#6ea51d789cb36a6be1ba5f7c0d48dd9e817d3418" - integrity sha512-yjEuMFy1ONK246B+rsa0cUam5OeAQ8pyclRDgpxuSCrAlJ1qN9uZ5IgyKC7gQg0w8OM50NXHEegPh/ks9YuR2A== +react-router@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.2.0.tgz#424e75641ca8747fbf76e5ecca69781aa37ea293" + integrity sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw== dependencies: "@babel/runtime" "^7.1.2" history "^4.9.0" hoist-non-react-statics "^3.1.0" loose-envify "^1.3.1" - mini-create-react-context "^0.3.0" + mini-create-react-context "^0.4.0" path-to-regexp "^1.7.0" prop-types "^15.6.2" react-is "^16.6.0" @@ -12458,7 +12513,7 @@ read-pkg-up@^4.0.0: find-up "^3.0.0" read-pkg "^3.0.0" -read-pkg-up@^7.0.0: +read-pkg-up@^7.0.0, read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== @@ -12524,7 +12579,7 @@ read@1, read@~1.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1: +"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -12552,12 +12607,12 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17" - integrity sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ== +readdirp@~3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" + integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== dependencies: - picomatch "^2.0.7" + picomatch "^2.2.1" realpath-native@^1.1.0: version "1.1.0" @@ -12618,6 +12673,14 @@ redent@^2.0.0: indent-string "^3.0.0" strip-indent "^2.0.0" +redent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" + integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== + dependencies: + indent-string "^4.0.0" + strip-indent "^3.0.0" + redux-devtools-extension@^2.13.5: version "2.13.8" resolved "https://registry.yarnpkg.com/redux-devtools-extension/-/redux-devtools-extension-2.13.8.tgz#37b982688626e5e4993ff87220c9bbb7cd2d96e1" @@ -12870,11 +12933,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -12936,9 +12994,9 @@ resolve@1.1.7: integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.15.1, resolve@^1.3.2: - version "1.15.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" - integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" @@ -13019,11 +13077,9 @@ rsvp@^4.8.4: integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== run-async@^2.2.0, run-async@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" - integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== - dependencies: - is-promise "^2.1.0" + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" @@ -13050,9 +13106,9 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" - integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== safe-regex@^1.1.0: version "1.1.0" @@ -13093,9 +13149,9 @@ sass-loader@^8.0.0: semver "^6.3.0" sass@^1.26.3: - version "1.26.3" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.26.3.tgz#412df54486143b76b5a65cdf7569e86f44659f46" - integrity sha512-5NMHI1+YFYw4sN3yfKjpLuV9B5l7MqQ6FlkTcC4FT+oHbBRUZoSjHrrt/mE0nFXJyY2kQtU9ou9HxvFVjLFuuw== + version "1.26.5" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.26.5.tgz#2d7aecfbbabfa298567c8f06615b6e24d2d68099" + integrity sha512-FG2swzaZUiX53YzZSjSakzvGtlds0lcbF+URuU9mxOv7WBh7NhXEVDa4kPKN4hN6fC2TkOTOKqiqp6d53N9X5Q== dependencies: chokidar ">=2.0.0 <4.0.0" @@ -13121,10 +13177,10 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.0.1, schema-utils@^2.5.0, schema-utils@^2.6.0, schema-utils@^2.6.1, schema-utils@^2.6.4, schema-utils@^2.6.5: - version "2.6.5" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" - integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== +schema-utils@^2.0.1, schema-utils@^2.5.0, schema-utils@^2.6.1, schema-utils@^2.6.5, schema-utils@^2.6.6: + version "2.6.6" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.6.tgz#299fe6bd4a3365dc23d99fd446caff8f1d6c330c" + integrity sha512-wHutF/WPSbIi9x6ctjGGk2Hvl0VOz5l3EKEuKbjPlB30mKZUzb9A5k9yEXRX3pwyqVLPvpfZZEllaFq/M718hA== dependencies: ajv "^6.12.0" ajv-keywords "^3.4.1" @@ -13168,6 +13224,11 @@ semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" + integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -13192,6 +13253,11 @@ serialize-javascript@^2.1.2: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== +serialize-javascript@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-3.0.0.tgz#492e489a2d77b7b804ad391a5f5d97870952548e" + integrity sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw== + serve-favicon@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/serve-favicon/-/serve-favicon-2.5.0.tgz#935d240cdfe0f5805307fdfe967d88942a2cbcf0" @@ -13309,9 +13375,9 @@ shell-quote@1.7.2: integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== shelljs@^0.8.3: - version "0.8.3" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097" - integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A== + version "0.8.4" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2" + integrity sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ== dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -13438,13 +13504,14 @@ sockjs-client@1.4.0: json3 "^3.3.2" url-parse "^1.4.3" -sockjs@0.3.19: - version "0.3.19" - resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.19.tgz#d976bbe800af7bd20ae08598d582393508993c0d" - integrity sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw== +sockjs@0.3.20: + version "0.3.20" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.20.tgz#b26a283ec562ef8b2687b44033a4eeceac75d855" + integrity sha512-SpmVOVpdq0DJc0qArhF3E5xsxvaiqGNb73XfgBpK1y3UD5gs8DSo8aCTsuT5pX8rssdc2NDIzANwP9eCAiSdTA== dependencies: faye-websocket "^0.10.0" - uuid "^3.0.1" + uuid "^3.4.0" + websocket-driver "0.6.5" socks-proxy-agent@^4.0.0: version "4.0.2" @@ -13493,9 +13560,9 @@ source-map-resolve@^0.5.0: urix "^0.1.0" source-map-support@^0.5.6, source-map-support@~0.5.12: - version "0.5.16" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" - integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -13534,14 +13601,14 @@ spdx-correct@^3.0.0: spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" @@ -13563,7 +13630,7 @@ spdy-transport@^3.0.0: readable-stream "^3.0.6" wbuf "^1.7.3" -spdy@^4.0.1: +spdy@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== @@ -13669,9 +13736,9 @@ stealthy-require@^1.1.1: integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= store2@^2.7.1: - version "2.11.0" - resolved "https://registry.yarnpkg.com/store2/-/store2-2.11.0.tgz#307636a239014ef4d8f1c8b47afe903509484fc8" - integrity sha512-WeIZ5+c/KzBSutSqOjUCAkk1qTLVBcYUuvrhNx8ndjLZKdZRfP6Vv7AOxlynuL6tVU/6zt6e2CTHwWI5KE+fKg== + version "2.11.2" + resolved "https://registry.yarnpkg.com/store2/-/store2-2.11.2.tgz#a298e5e97b21b3ce7419b732540bc7c79cb007db" + integrity sha512-TQMKs+C6n9idtzLpxluikmDCYiDJrTbbIGn9LFxMg0BVTu+8JZKSlXTWYRpOFKlfKD5HlDWLVpJJyNGZ2e9l1A== storybook-addon-i18next@^1.2.1: version "1.3.0" @@ -13740,7 +13807,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2", string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -13804,9 +13871,9 @@ string.prototype.trim@^1.2.1: function-bind "^1.1.1" string.prototype.trimend@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz#ee497fd29768646d84be2c9b819e292439614373" - integrity sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA== + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" + integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== dependencies: define-properties "^1.1.3" es-abstract "^1.17.5" @@ -13830,9 +13897,9 @@ string.prototype.trimright@^2.1.1: string.prototype.trimend "^1.0.0" string.prototype.trimstart@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz#afe596a7ce9de905496919406c9734845f01a2f2" - integrity sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w== + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" + integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== dependencies: define-properties "^1.1.3" es-abstract "^1.17.5" @@ -13930,12 +13997,12 @@ strong-log-transformer@^2.0.0: through "^2.3.4" style-loader@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.1.3.tgz#9e826e69c683c4d9bf9db924f85e9abb30d5e200" - integrity sha512-rlkH7X/22yuwFYK357fMN/BxYOorfnfq0eD7+vqlemSK4wEcejFF1dg4zxP0euBW8NrYx2WZzZ8PPFevr7D+Kw== + version "1.2.1" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.2.1.tgz#c5cbbfbf1170d076cfdd86e0109c5bba114baa1a" + integrity sha512-ByHSTQvHLkWE9Ir5+lGbVOXhxX10fbprhLvdg96wedFZb4NDekDPxVKv5Fwmio+QcMlkkNfuK+5W1peQ5CUhZg== dependencies: - loader-utils "^1.2.3" - schema-utils "^2.6.4" + loader-utils "^2.0.0" + schema-utils "^2.6.6" styled-components@^4.4.0: version "4.4.1" @@ -14128,24 +14195,24 @@ terser-webpack-plugin@^1.4.3: worker-farm "^1.7.0" terser-webpack-plugin@^2.1.2: - version "2.3.5" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.3.5.tgz#5ad971acce5c517440ba873ea4f09687de2f4a81" - integrity sha512-WlWksUoq+E4+JlJ+h+U+QUzXpcsMSSNXkDy9lBVkSqDn1w23Gg29L/ary9GeJVYCGiNJJX7LnVc4bwL1N3/g1w== + version "2.3.6" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.3.6.tgz#a4014b311a61f87c6a1b217ef4f5a75bd0665a69" + integrity sha512-I8IDsQwZrqjdmOicNeE8L/MhwatAap3mUrtcAKJuilsemUNcX+Hier/eAzwStVqhlCxq0aG3ni9bK/0BESXkTg== dependencies: cacache "^13.0.1" - find-cache-dir "^3.2.0" - jest-worker "^25.1.0" - p-limit "^2.2.2" - schema-utils "^2.6.4" - serialize-javascript "^2.1.2" + find-cache-dir "^3.3.1" + jest-worker "^25.4.0" + p-limit "^2.3.0" + schema-utils "^2.6.6" + serialize-javascript "^3.0.0" source-map "^0.6.1" - terser "^4.4.3" + terser "^4.6.12" webpack-sources "^1.4.3" -terser@^4.1.2, terser@^4.4.3, terser@^4.6.3: - version "4.6.10" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.10.tgz#90f5bd069ff456ddbc9503b18e52f9c493d3b7c2" - integrity sha512-qbF/3UOo11Hggsbsqm2hPa6+L4w7bkr+09FNseEe8xrcVD3APGLFqE+Oz1ZKAxjYnFsj80rLOfgAtJ0LNJjtTA== +terser@^4.1.2, terser@^4.6.12, terser@^4.6.3: + version "4.7.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.7.0.tgz#15852cf1a08e3256a80428e865a2fa893ffba006" + integrity sha512-Lfb0RiZcjRDXCC3OSHJpEkxJ9Qeqs6mp2v4jf2MHfy8vGERmVDuvjXdd/EnP5Deme5F2yBRBymKmKHCBg2echw== dependencies: commander "^2.20.0" source-map "~0.6.1" @@ -14242,7 +14309,7 @@ tiny-invariant@^1.0.2: resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875" integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw== -tiny-warning@^1.0.0, tiny-warning@^1.0.2: +tiny-warning@^1.0.0, tiny-warning@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== @@ -14343,6 +14410,11 @@ trim-newlines@^2.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= +trim-newlines@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.0.tgz#79726304a6a898aa8373427298d54c2ee8b1cb30" + integrity sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA== + trim-off-newlines@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" @@ -14374,9 +14446,9 @@ ts-pnp@^1.1.2: integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: - version "1.11.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" - integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== + version "1.13.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" + integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== tsutils@^3.17.1: version "3.17.1" @@ -14414,6 +14486,11 @@ type-fest@^0.11.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== +type-fest@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" + integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== + type-fest@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" @@ -14448,9 +14525,9 @@ typedarray@^0.0.6: integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= typescript@^3.7.2: - version "3.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" - integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== + version "3.9.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.2.tgz#64e9c8e9be6ea583c54607677dd4680a1cf35db9" + integrity sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw== ua-parser-js@^0.7.18: version "0.7.21" @@ -14458,12 +14535,11 @@ ua-parser-js@^0.7.18: integrity sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ== uglify-js@^3.1.4: - version "3.8.1" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.8.1.tgz#43bb15ce6f545eaa0a64c49fd29375ea09fa0f93" - integrity sha512-W7KxyzeaQmZvUFbGj4+YFshhVrMBGSg2IbcYAjGWGvx8DHvJMclbTDMpffdxFUGPBHjIytk7KJUR/KUXstUGDw== + version "3.9.3" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.3.tgz#4a285d1658b8a2ebaef9e51366b3a0f7acd79ec2" + integrity sha512-r5ImcL6QyzQGVimQoov3aL2ZScywrOgBXGndbWrdehKoSvGe/RmiE5Jpw/v+GvxODt6l2tpBXwA7n+qZVlHBMA== dependencies: commander "~2.20.3" - source-map "~0.6.1" uid-number@0.0.6: version "0.0.6" @@ -14673,9 +14749,9 @@ url@^0.11.0: querystring "0.2.0" use-callback-ref@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.2.1.tgz#898759ccb9e14be6c7a860abafa3ffbd826c89bb" - integrity sha512-C3nvxh0ZpaOxs9RCnWwAJ+7bJPwQI8LHF71LzbQ3BvzH5XkdtlkMadqElGevg5bYBDFip4sAnD4m06zAKebg1w== + version "1.2.3" + resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.2.3.tgz#9f939dfb5740807bbf9dd79cdd4e99d27e827756" + integrity sha512-DPBPh1i2adCZoIArRlTuKRy7yue7QogtEnfv0AKrWsY+GA+4EKe37zhRDouNnyWMoNQFYZZRF+2dLHsWE4YvJA== use-sidecar@^1.0.1: version "1.0.2" @@ -14744,7 +14820,7 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@^3.0.1, uuid@^3.3.2: +uuid@^3.0.1, uuid@^3.3.2, uuid@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -14851,14 +14927,23 @@ warning@^4.0.2, warning@^4.0.3: dependencies: loose-envify "^1.0.0" -watchpack@^1.6.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.1.tgz#280da0a8718592174010c078c7585a74cd8cd0e2" - integrity sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA== +watchpack-chokidar2@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.0.tgz#9948a1866cbbd6cb824dea13a7ed691f6c8ddff0" + integrity sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA== dependencies: chokidar "^2.1.8" + +watchpack@^1.6.1: + version "1.7.2" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.2.tgz#c02e4d4d49913c3e7e122c3325365af9d331e9aa" + integrity sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g== + dependencies: graceful-fs "^4.1.2" neo-async "^2.5.0" + optionalDependencies: + chokidar "^3.4.0" + watchpack-chokidar2 "^2.0.0" wbuf@^1.1.0, wbuf@^1.7.3: version "1.7.3" @@ -14908,9 +14993,9 @@ webpack-dev-middleware@^3.7.0, webpack-dev-middleware@^3.7.2: webpack-log "^2.0.0" webpack-dev-server@^3.10.1: - version "3.10.3" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.10.3.tgz#f35945036813e57ef582c2420ef7b470e14d3af0" - integrity sha512-e4nWev8YzEVNdOMcNzNeCN947sWJNd43E5XvsJzbAL08kGc2frm1tQ32hTJslRS+H65LCb/AaUCYU7fjHCpDeQ== + version "3.11.0" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.11.0.tgz#8f154a3bce1bcfd1cc618ef4e703278855e7ff8c" + integrity sha512-PUxZ+oSTxogFQgkTtFndEtJIPNmml7ExwufBZ9L2/Xyyd5PnOL5UreWe5ZT7IU25DSdykL9p1MLQzmLh2ljSeg== dependencies: ansi-html "0.0.7" bonjour "^3.5.0" @@ -14920,31 +15005,31 @@ webpack-dev-server@^3.10.1: debug "^4.1.1" del "^4.1.1" express "^4.17.1" - html-entities "^1.2.1" + html-entities "^1.3.1" http-proxy-middleware "0.19.1" import-local "^2.0.0" internal-ip "^4.3.0" ip "^1.1.5" is-absolute-url "^3.0.3" killable "^1.0.1" - loglevel "^1.6.6" + loglevel "^1.6.8" opn "^5.5.0" p-retry "^3.0.1" - portfinder "^1.0.25" + portfinder "^1.0.26" schema-utils "^1.0.0" selfsigned "^1.10.7" semver "^6.3.0" serve-index "^1.9.1" - sockjs "0.3.19" + sockjs "0.3.20" sockjs-client "1.4.0" - spdy "^4.0.1" + spdy "^4.0.2" strip-ansi "^3.0.1" supports-color "^6.1.0" url "^0.11.0" webpack-dev-middleware "^3.7.2" webpack-log "^2.0.0" ws "^6.2.1" - yargs "12.0.5" + yargs "^13.3.2" webpack-hot-middleware@^2.25.0: version "2.25.0" @@ -14973,22 +15058,22 @@ webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack- source-map "~0.6.1" webpack-virtual-modules@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.2.1.tgz#8ab73d4df0fd37ed27bb8d823bc60ea7266c8bf7" - integrity sha512-0PWBlxyt4uGDofooIEanWhhyBOHdd+lr7QpYNDLC7/yc5lqJT8zlc04MTIBnKj+c2BlQNNuwE5er/Tg4wowHzA== + version "0.2.2" + resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.2.2.tgz#20863dc3cb6bb2104729fff951fbe14b18bd0299" + integrity sha512-kDUmfm3BZrei0y+1NTHJInejzxfhtU8eDj2M7OKb2IWrPFAeO1SOH2KuQ68MSZu9IGEHcxbkKKR1v18FrUSOmA== dependencies: debug "^3.0.0" webpack@^4.33.0, webpack@^4.38.0, webpack@^4.41.5: - version "4.42.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.42.1.tgz#ae707baf091f5ca3ef9c38b884287cfe8f1983ef" - integrity sha512-SGfYMigqEfdGchGhFFJ9KyRpQKnipvEvjc1TwrXEPCM6H5Wywu10ka8o3KGrMzSMxMQKt8aCHUFh5DaQ9UmyRg== + version "4.43.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.43.0.tgz#c48547b11d563224c561dad1172c8aa0b8a678e6" + integrity sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g== dependencies: "@webassemblyjs/ast" "1.9.0" "@webassemblyjs/helper-module-context" "1.9.0" "@webassemblyjs/wasm-edit" "1.9.0" "@webassemblyjs/wasm-parser" "1.9.0" - acorn "^6.2.1" + acorn "^6.4.1" ajv "^6.10.2" ajv-keywords "^3.4.1" chrome-trace-event "^1.0.2" @@ -15005,9 +15090,16 @@ webpack@^4.33.0, webpack@^4.38.0, webpack@^4.41.5: schema-utils "^1.0.0" tapable "^1.1.3" terser-webpack-plugin "^1.4.3" - watchpack "^1.6.0" + watchpack "^1.6.1" webpack-sources "^1.4.1" +websocket-driver@0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" + integrity sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY= + dependencies: + websocket-extensions ">=0.1.1" + websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" @@ -15084,9 +15176,9 @@ widest-line@^3.1.0: string-width "^4.0.0" windows-release@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.2.0.tgz#8122dad5afc303d833422380680a79cdfa91785f" - integrity sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA== + version "3.3.0" + resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.3.0.tgz#dce167e9f8be733f21c849ebd4d03fe66b29b9f0" + integrity sha512-2HetyTg1Y+R+rUgrKeUEhAG/ZuOmTrI1NBb3ZyAGQMYmOJjBBPe4MTodghRkmLJZHwkuPi02anbeGP+Zf401LQ== dependencies: execa "^1.0.0" @@ -15121,14 +15213,6 @@ worker-rpc@^0.1.0: dependencies: microevent.ts "~0.1.1" -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" @@ -15241,7 +15325,7 @@ xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: +y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== @@ -15257,26 +15341,9 @@ yallist@^4.0.0: integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yaml@^1.7.2: - version "1.8.3" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.8.3.tgz#2f420fca58b68ce3a332d0ca64be1d191dd3f87a" - integrity sha512-X/v7VDnK+sxbQ2Imq4Jt2PRUsRsP7UcpSl3Llg6+NRRqWLIvxkMFYtH1FmvwNGYRKKPa+EPA4qDBlI9WVG1UKw== - dependencies: - "@babel/runtime" "^7.8.7" - -yargs-parser@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" - integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== - dependencies: - camelcase "^4.1.0" - -yargs-parser@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" - integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" + version "1.10.0" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e" + integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg== yargs-parser@^13.1.0, yargs-parser@^13.1.2: version "13.1.2" @@ -15294,23 +15361,13 @@ yargs-parser@^15.0.1: camelcase "^5.0.0" decamelize "^1.2.0" -yargs@12.0.5: - version "12.0.5" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" - integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== +yargs-parser@^18.1.3: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== dependencies: - cliui "^4.0.0" + camelcase "^5.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@13.2.4: version "13.2.4" @@ -15329,7 +15386,7 @@ yargs@13.2.4: y18n "^4.0.0" yargs-parser "^13.1.0" -yargs@^13.3.0: +yargs@^13.3.0, yargs@^13.3.2: version "13.3.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==