mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-21 23:12:11 +01:00
Merge branch 'develop' into feature/user_converter
This commit is contained in:
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
## [2.8.0] - 2020-10-27
|
||||
### Added
|
||||
- Generation of email addresses for users, where none is configured ([#1370](https://github.com/scm-manager/scm-manager/pull/1370))
|
||||
- Automatic user converter for external users ([#1380](https://github.com/scm-manager/scm-manager/pull/1380))
|
||||
@@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Fixed
|
||||
- Handling of snapshot plugin dependencies ([#1384](https://github.com/scm-manager/scm-manager/pull/1384))
|
||||
- SyntaxHighlighting for GoLang ([#1386](https://github.com/scm-manager/scm-manager/pull/1386))
|
||||
- Privilege escalation for api keys ([#1388](https://github.com/scm-manager/scm-manager/pull/1388))
|
||||
|
||||
## [2.6.3] - 2020-10-16
|
||||
### Fixed
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
],
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"version": "2.8.0-SNAPSHOT"
|
||||
"version": "2.9.0-SNAPSHOT"
|
||||
}
|
||||
|
||||
4
pom.xml
4
pom.xml
@@ -32,7 +32,7 @@
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<description>
|
||||
The easiest way to share your Git, Mercurial
|
||||
and Subversion repositories.
|
||||
@@ -925,7 +925,7 @@
|
||||
<legman.version>1.6.2</legman.version>
|
||||
|
||||
<!-- webserver -->
|
||||
<jetty.version>9.4.31.v20200723</jetty.version>
|
||||
<jetty.version>9.4.33.v20201020</jetty.version>
|
||||
<jetty.maven.version>9.4.30.v20200611</jetty.maven.version>
|
||||
|
||||
<!-- security libraries -->
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-annotation-processor</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<name>scm-annotation-processor</name>
|
||||
|
||||
<dependencies>
|
||||
@@ -46,7 +46,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-annotations</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- rest api -->
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>scm-annotations</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<name>scm-annotations</name>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
<parent>
|
||||
<artifactId>scm</artifactId>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>scm-core</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<name>scm-core</name>
|
||||
|
||||
<dependencies>
|
||||
@@ -54,7 +54,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-annotations</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -227,7 +227,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-annotation-processor</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>scm-dao-xml</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<name>scm-dao-xml</name>
|
||||
|
||||
<dependencies>
|
||||
@@ -50,7 +50,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-core</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- test -->
|
||||
@@ -58,7 +58,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-test</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -31,40 +31,40 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-it</artifactId>
|
||||
<!-- we need type war, because the jetty plugin does not work with jar or pom -->
|
||||
<packaging>war</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<name>scm-it</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-core</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-test</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-git-plugin</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-git-plugin</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<classifier>tests</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
@@ -72,14 +72,14 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-hg-plugin</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-hg-plugin</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<classifier>tests</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
@@ -87,14 +87,14 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-svn-plugin</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-svn-plugin</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<classifier>tests</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm.packaging</groupId>
|
||||
<artifactId>scm-packaging</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>deb</artifactId>
|
||||
<packaging>deb</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<description>Packaging for Debian/Ubuntu</description>
|
||||
<name>deb</name>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-server</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm.packaging</groupId>
|
||||
<artifactId>scm-packaging</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>docker</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm.packaging</groupId>
|
||||
<artifactId>scm-packaging</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>helm</artifactId>
|
||||
<packaging>helm</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<helm.version>3.2.1</helm.version>
|
||||
|
||||
@@ -31,13 +31,13 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>sonia.scm.packaging</groupId>
|
||||
<artifactId>scm-packaging</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<deployment.serverId>packages.scm-manager.org</deployment.serverId>
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm.packaging</groupId>
|
||||
<artifactId>scm-packaging</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>release-yaml</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm.packaging</groupId>
|
||||
<artifactId>scm-packaging</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>rpm</artifactId>
|
||||
<packaging>rpm</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<description>Packaging for RedHat/Centos/Fedora</description>
|
||||
<name>rpm</name>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-server</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm.packaging</groupId>
|
||||
<artifactId>scm-packaging</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>unix</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm.packaging</groupId>
|
||||
<artifactId>scm-packaging</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>windows</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
||||
@@ -31,13 +31,13 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-plugins</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<name>scm-plugins</name>
|
||||
|
||||
<modules>
|
||||
@@ -60,7 +60,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-core</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-annotation-processor</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-test</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@scm-manager/scm-git-plugin",
|
||||
"private": true,
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"license": "MIT",
|
||||
"main": "./src/main/js/index.ts",
|
||||
"scripts": {
|
||||
@@ -20,6 +20,6 @@
|
||||
},
|
||||
"prettier": "@scm-manager/prettier-config",
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-plugins": "^2.8.0-SNAPSHOT"
|
||||
"@scm-manager/ui-plugins": "^2.9.0-SNAPSHOT"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<parent>
|
||||
<artifactId>scm-plugins</artifactId>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>scm-git-plugin</artifactId>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@scm-manager/scm-hg-plugin",
|
||||
"private": true,
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"license": "MIT",
|
||||
"main": "./src/main/js/index.ts",
|
||||
"scripts": {
|
||||
@@ -19,6 +19,6 @@
|
||||
},
|
||||
"prettier": "@scm-manager/prettier-config",
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-plugins": "^2.8.0-SNAPSHOT"
|
||||
"@scm-manager/ui-plugins": "^2.9.0-SNAPSHOT"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-plugins</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>scm-hg-plugin</artifactId>
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-plugins</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>scm-integration-test-plugin</artifactId>
|
||||
<description>Add functions for integration tests. This is not intended for production systems.</description>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<packaging>smp</packaging>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@scm-manager/scm-legacy-plugin",
|
||||
"private": true,
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"license": "MIT",
|
||||
"main": "./src/main/js/index.tsx",
|
||||
"scripts": {
|
||||
@@ -19,6 +19,6 @@
|
||||
},
|
||||
"prettier": "@scm-manager/prettier-config",
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-plugins": "^2.8.0-SNAPSHOT"
|
||||
"@scm-manager/ui-plugins": "^2.9.0-SNAPSHOT"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-plugins</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>scm-legacy-plugin</artifactId>
|
||||
<description>Support migrated repository urls and v1 passwords</description>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<packaging>smp</packaging>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@scm-manager/scm-svn-plugin",
|
||||
"private": true,
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"license": "MIT",
|
||||
"main": "./src/main/js/index.ts",
|
||||
"scripts": {
|
||||
@@ -19,6 +19,6 @@
|
||||
},
|
||||
"prettier": "@scm-manager/prettier-config",
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-plugins": "^2.8.0-SNAPSHOT"
|
||||
"@scm-manager/ui-plugins": "^2.9.0-SNAPSHOT"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<parent>
|
||||
<artifactId>scm-plugins</artifactId>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>scm-svn-plugin</artifactId>
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
<parent>
|
||||
<artifactId>scm</artifactId>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-server</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<name>scm-server</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
<parent>
|
||||
<artifactId>scm</artifactId>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-test</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<name>scm-test</name>
|
||||
|
||||
<dependencies>
|
||||
@@ -50,7 +50,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-core</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/babel-preset",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"license": "MIT",
|
||||
"description": "Babel configuration for scm-manager and its plugins",
|
||||
"main": "index.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/e2e-tests",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"description": "End to end Tests for SCM-Manager",
|
||||
"main": "index.js",
|
||||
"author": "Eduard Heimbuch <eduard.heimbuch@cloudogu.com>",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/eslint-config",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"description": "ESLint configuration for scm-manager and its plugins",
|
||||
"main": "src/index.js",
|
||||
"author": "Sebastian Sdorra <s.sdorra@gmail.com>",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/jest-preset",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"description": "Jest presets for SCM-Manager and its plugins",
|
||||
"main": "src/index.js",
|
||||
"author": "Sebastian Sdorra <sebastian.sdorra@cloudogu.com>",
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-ui</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<name>scm-ui</name>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/prettier-config",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"license": "MIT",
|
||||
"description": "Prettier configuration",
|
||||
"author": "Sebastian Sdorra <sebastian.sdorra@cloudogu.com>",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/tsconfig",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"license": "MIT",
|
||||
"description": "TypeScript configuration",
|
||||
"author": "Sebastian Sdorra <sebastian.sdorra@cloudogu.com>",
|
||||
|
||||
@@ -50,8 +50,16 @@ module.exports = {
|
||||
use: [
|
||||
// Creates `style` nodes from JS strings
|
||||
"style-loader",
|
||||
// Translates CSS into CommonJS
|
||||
"css-loader",
|
||||
{
|
||||
loader: "css-loader",
|
||||
options: {
|
||||
// Run `postcss-loader` on each CSS `@import`, do not forget that `sass-loader` compile non CSS `@import`'s into a single file
|
||||
// If you need run `sass-loader` and `postcss-loader` on each CSS `@import` please set it to `2`
|
||||
importLoaders: 1,
|
||||
// Automatically enable css modules for files satisfying `/\.module\.\w+$/i` RegExp.
|
||||
modules: { auto: true }
|
||||
}
|
||||
},
|
||||
// Compiles Sass to CSS
|
||||
"sass-loader"
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-components",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"description": "UI Components for SCM-Manager and its plugins",
|
||||
"main": "src/index.ts",
|
||||
"files": [
|
||||
@@ -18,7 +18,7 @@
|
||||
"update-storyshots": "jest --testPathPattern=\"storyshots.test.ts\" --collectCoverage=false -u"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@scm-manager/ui-tests": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/ui-tests": "^2.9.0-SNAPSHOT",
|
||||
"@storybook/addon-actions": "^5.2.3",
|
||||
"@storybook/addon-storyshots": "^5.2.3",
|
||||
"@storybook/react": "^5.2.3",
|
||||
@@ -34,7 +34,7 @@
|
||||
"@types/react-router-dom": "^5.1.0",
|
||||
"@types/react-select": "^2.0.19",
|
||||
"@types/react-syntax-highlighter": "^11.0.1",
|
||||
"@types/refractor": "^2.8.0",
|
||||
"@types/refractor": "^3.0.0",
|
||||
"@types/storybook__addon-storyshots": "^5.1.1",
|
||||
"@types/styled-components": "^5.1.0",
|
||||
"@types/to-camel-case": "^1.0.0",
|
||||
@@ -51,8 +51,8 @@
|
||||
"worker-plugin": "^3.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-extensions": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/ui-types": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/ui-extensions": "^2.9.0-SNAPSHOT",
|
||||
"@scm-manager/ui-types": "^2.9.0-SNAPSHOT",
|
||||
"classnames": "^2.2.6",
|
||||
"date-fns": "^2.4.1",
|
||||
"gitdiff-parser": "^0.1.2",
|
||||
|
||||
@@ -121,4 +121,4 @@ function createJavascriptStyleSheet(directory, inputFile, outputFile) {
|
||||
});
|
||||
}
|
||||
|
||||
createJavascriptStyleSheet(path.join("..", "src"), "syntax-highlighting.css", "syntax-highlighting.ts");
|
||||
createJavascriptStyleSheet(path.join("..", "src"), "syntax-highlighting.module.css", "syntax-highlighting.ts");
|
||||
|
||||
@@ -30,6 +30,7 @@ import JavaHttpServer from "./__resources__/HttpServer.java";
|
||||
import GoHttpServer from "./__resources__/HttpServer.go";
|
||||
import JsHttpServer from "./__resources__/HttpServer.js";
|
||||
import PyHttpServer from "./__resources__/HttpServer.py";
|
||||
import Markdown from "./__resources__/test-page.md";
|
||||
|
||||
const Spacing = styled.div`
|
||||
padding: 1em;
|
||||
@@ -43,7 +44,7 @@ storiesOf("SyntaxHighlighter", module)
|
||||
))
|
||||
.add("Go", () => (
|
||||
<Spacing>
|
||||
<SyntaxHighlighter language="go" value={GoHttpServer} />
|
||||
<SyntaxHighlighter language="golang" value={GoHttpServer} />
|
||||
</Spacing>
|
||||
))
|
||||
.add("Javascript", () => (
|
||||
@@ -56,6 +57,11 @@ storiesOf("SyntaxHighlighter", module)
|
||||
<SyntaxHighlighter language="python" value={PyHttpServer} />
|
||||
</Spacing>
|
||||
))
|
||||
.add("Markdown", () => (
|
||||
<Spacing>
|
||||
<SyntaxHighlighter language="markdown" value={Markdown} />
|
||||
</Spacing>
|
||||
))
|
||||
.add("Without line numbers", () => (
|
||||
<Spacing>
|
||||
<SyntaxHighlighter language="java" value={JavaHttpServer} showLineNumbers={false} />
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
import React from "react";
|
||||
|
||||
import { PrismAsyncLight as ReactSyntaxHighlighter } from "react-syntax-highlighter";
|
||||
import { defaultLanguage, determineLanguage } from "./languages";
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import highlightingTheme from "./syntax-highlighting";
|
||||
|
||||
@@ -33,27 +34,20 @@ type Props = {
|
||||
showLineNumbers?: boolean;
|
||||
};
|
||||
|
||||
const defaultLanguage = "text";
|
||||
|
||||
class SyntaxHighlighter extends React.Component<Props> {
|
||||
static defaultProps: Partial<Props> = {
|
||||
language: defaultLanguage,
|
||||
showLineNumbers: true
|
||||
};
|
||||
|
||||
getLanguage = () => {
|
||||
const { language } = this.props;
|
||||
if (language) {
|
||||
return language;
|
||||
}
|
||||
return defaultLanguage;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { showLineNumbers } = this.props;
|
||||
const language = this.getLanguage();
|
||||
const { showLineNumbers, language } = this.props;
|
||||
return (
|
||||
<ReactSyntaxHighlighter showLineNumbers={showLineNumbers} language={language} style={highlightingTheme}>
|
||||
<ReactSyntaxHighlighter
|
||||
showLineNumbers={showLineNumbers}
|
||||
language={determineLanguage(language)}
|
||||
style={highlightingTheme}
|
||||
>
|
||||
{this.props.value}
|
||||
</ReactSyntaxHighlighter>
|
||||
);
|
||||
|
||||
118
scm-ui/ui-components/src/__resources__/Diff.markdown.ts
Normal file
118
scm-ui/ui-components/src/__resources__/Diff.markdown.ts
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* 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 {
|
||||
files: [
|
||||
{
|
||||
oldPath: "CHANGELOG.md",
|
||||
newPath: "CHANGELOG.md",
|
||||
oldEndingNewLine: true,
|
||||
newEndingNewLine: true,
|
||||
oldRevision: "de732d6da1cc0be8454f004c14b7666c69c91fb4",
|
||||
newRevision: "148eb799f3a56909fe65b966e093a482ba542c81",
|
||||
type: "modify",
|
||||
language: "markdown",
|
||||
hunks: [
|
||||
{
|
||||
content: "@@ -5,7 +5,7 @@",
|
||||
oldStart: 5,
|
||||
newStart: 5,
|
||||
oldLines: 7,
|
||||
newLines: 7,
|
||||
changes: [
|
||||
{
|
||||
content: "The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),",
|
||||
type: "normal",
|
||||
oldLineNumber: 5,
|
||||
newLineNumber: 5,
|
||||
isNormal: true
|
||||
},
|
||||
{
|
||||
content: "and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).",
|
||||
type: "normal",
|
||||
oldLineNumber: 6,
|
||||
newLineNumber: 6,
|
||||
isNormal: true
|
||||
},
|
||||
{
|
||||
content: "",
|
||||
type: "normal",
|
||||
oldLineNumber: 7,
|
||||
newLineNumber: 7,
|
||||
isNormal: true
|
||||
},
|
||||
{
|
||||
content: "## Unreleased",
|
||||
type: "delete",
|
||||
lineNumber: 8,
|
||||
isDelete: true
|
||||
},
|
||||
{
|
||||
content: "## [2.7.1] - 2020-10-14",
|
||||
type: "insert",
|
||||
lineNumber: 8,
|
||||
isInsert: true
|
||||
},
|
||||
{
|
||||
content: "### Fixed",
|
||||
type: "normal",
|
||||
oldLineNumber: 9,
|
||||
newLineNumber: 9,
|
||||
isNormal: true
|
||||
},
|
||||
{
|
||||
content:
|
||||
"- Null Pointer Exception on anonymous migration with deleted repositories ([#1371](https://github.com/scm-manager/scm-manager/pull/1371))",
|
||||
type: "normal",
|
||||
oldLineNumber: 10,
|
||||
newLineNumber: 10,
|
||||
isNormal: true
|
||||
},
|
||||
{
|
||||
content:
|
||||
"- Null Pointer Exception on parsing SVN properties ([#1373](https://github.com/scm-manager/scm-manager/pull/1373))",
|
||||
type: "normal",
|
||||
oldLineNumber: 11,
|
||||
newLineNumber: 11,
|
||||
isNormal: true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
_links: {
|
||||
lines: {
|
||||
href:
|
||||
"http://localhost:8081/scm/api/v2/repositories/scmadmin/scm-manager/content/fbffdea2a566dc4ac54ea38d4aade5aaf541e7f2/CHANGELOG.md?start={start}&end={end}",
|
||||
templated: true
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
_links: {
|
||||
self: {
|
||||
href:
|
||||
"http://localhost:8081/scm/api/v2/repositories/scmadmin/scm-manager/diff/fbffdea2a566dc4ac54ea38d4aade5aaf541e7f2/parsed"
|
||||
}
|
||||
}
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
52
scm-ui/ui-components/src/languages.test.ts
Normal file
52
scm-ui/ui-components/src/languages.test.ts
Normal file
@@ -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 { determineLanguage } from "./languages";
|
||||
|
||||
describe("syntax highlighter", () => {
|
||||
it("should return the language as it is", () => {
|
||||
const java = determineLanguage("java");
|
||||
expect(java).toBe("java");
|
||||
});
|
||||
|
||||
it("should lower case the language", () => {
|
||||
const java = determineLanguage("Java");
|
||||
expect(java).toBe("java");
|
||||
});
|
||||
|
||||
it("should return text if language is undefied", () => {
|
||||
const lang = determineLanguage();
|
||||
expect(lang).toBe("text");
|
||||
});
|
||||
|
||||
it("should return text if language is an empty string", () => {
|
||||
const lang = determineLanguage("");
|
||||
expect(lang).toBe("text");
|
||||
});
|
||||
|
||||
it("should use alias go for golang", () => {
|
||||
const go = determineLanguage("golang");
|
||||
expect(go).toBe("go");
|
||||
});
|
||||
});
|
||||
41
scm-ui/ui-components/src/languages.ts
Normal file
41
scm-ui/ui-components/src/languages.ts
Normal file
@@ -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.
|
||||
*/
|
||||
|
||||
// this aliases are only to map from spotter detection to prismjs
|
||||
const languageAliases: { [key: string]: string } = {
|
||||
golang: "go"
|
||||
};
|
||||
|
||||
export const defaultLanguage = "text";
|
||||
|
||||
export const determineLanguage = (language?: string) => {
|
||||
if (!language) {
|
||||
return defaultLanguage;
|
||||
}
|
||||
const lang = language.toLowerCase();
|
||||
if (languageAliases[lang]) {
|
||||
return languageAliases[lang];
|
||||
}
|
||||
return lang;
|
||||
};
|
||||
@@ -29,6 +29,7 @@ import parser from "gitdiff-parser";
|
||||
import simpleDiff from "../__resources__/Diff.simple";
|
||||
import hunksDiff from "../__resources__/Diff.hunks";
|
||||
import binaryDiff from "../__resources__/Diff.binary";
|
||||
import markdownDiff from "../__resources__/Diff.markdown";
|
||||
import { DiffEventContext, File, FileControlFactory } from "./DiffTypes";
|
||||
import Toast from "../toast/Toast";
|
||||
import { getPath } from "./diffs";
|
||||
@@ -151,6 +152,10 @@ storiesOf("Diff", module)
|
||||
});
|
||||
return <Diff diff={filesWithLanguage} />;
|
||||
})
|
||||
.add("SyntaxHighlighting (Markdown)", () => {
|
||||
// @ts-ignore
|
||||
return <Diff diff={markdownDiff.files} />;
|
||||
})
|
||||
.add("CollapsingWithFunction", () => (
|
||||
<Diff diff={diffFiles} defaultCollapse={(oldPath, newPath) => oldPath.endsWith(".java")} />
|
||||
))
|
||||
|
||||
@@ -24,14 +24,28 @@
|
||||
|
||||
// @ts-ignore we have no types for react-diff-view
|
||||
import { tokenize } from "react-diff-view";
|
||||
import refractor from "./refractorAdapter";
|
||||
import createRefractor, { RefractorAdapter } from "./refractorAdapter";
|
||||
|
||||
// the WorkerGlobalScope is assigned to self
|
||||
// see https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/self
|
||||
declare const self: Worker;
|
||||
|
||||
self.addEventListener("message", ({ data: { id, payload } }) => {
|
||||
type TokenizeMessage = {
|
||||
id: string;
|
||||
language: string;
|
||||
hunks: any;
|
||||
payload: any;
|
||||
};
|
||||
|
||||
let refractor: RefractorAdapter;
|
||||
|
||||
function initRefractor(theme: { [key: string]: string }) {
|
||||
refractor = createRefractor(theme);
|
||||
}
|
||||
|
||||
function runTokenize({ id, payload }: TokenizeMessage) {
|
||||
const { hunks, language } = payload;
|
||||
|
||||
const options = {
|
||||
highlight: language !== "text",
|
||||
language: language,
|
||||
@@ -60,4 +74,12 @@ self.addEventListener("message", ({ data: { id, payload } }) => {
|
||||
if (options.highlight) {
|
||||
refractor.loadLanguage(language, createTokenizer(self));
|
||||
}
|
||||
}
|
||||
|
||||
self.addEventListener("message", ({ data }) => {
|
||||
if (data.theme) {
|
||||
initRefractor(data.theme);
|
||||
} else {
|
||||
runTokenize(data);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -26,11 +26,10 @@ import styled from "styled-components";
|
||||
// @ts-ignore we have no typings for react-diff-view
|
||||
import { Diff, useTokenizeWorker } from "react-diff-view";
|
||||
import { File } from "./DiffTypes";
|
||||
import { determineLanguage } from "../languages";
|
||||
|
||||
// styling for the diff tokens
|
||||
// this must be aligned with th style, which is used in the SyntaxHighlighter component
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import "../syntax-highlighting.css";
|
||||
// @ts-ignore no types for css modules
|
||||
import theme from "../syntax-highlighting.module.css";
|
||||
|
||||
const DiffView = styled(Diff)`
|
||||
/* align line numbers */
|
||||
@@ -59,26 +58,11 @@ const DiffView = styled(Diff)`
|
||||
&.unified .diff-widget-content .is-indented-line {
|
||||
padding-left: 6.5rem;
|
||||
}
|
||||
|
||||
/* conflict between prism and bulma number class */
|
||||
.number {
|
||||
align-items: inherit;
|
||||
background-color: inherit;
|
||||
border-radius: inherit;
|
||||
display: initial;
|
||||
font-size: inherit;
|
||||
height: inherit;
|
||||
justify-content: inherit;
|
||||
margin-right: inherit;
|
||||
margin-left: 0;
|
||||
min-width: inherit;
|
||||
padding: 0;
|
||||
text-align: inherit;
|
||||
}
|
||||
`;
|
||||
|
||||
// WebWorker which creates tokens for syntax highlighting
|
||||
const tokenize = new Worker("./Tokenize.worker.ts", { name: "tokenizer", type: "module" });
|
||||
tokenize.postMessage({ theme });
|
||||
|
||||
type Props = {
|
||||
file: File;
|
||||
@@ -86,17 +70,10 @@ type Props = {
|
||||
className?: string;
|
||||
};
|
||||
|
||||
const determineLanguage = (file: File) => {
|
||||
if (file.language) {
|
||||
return file.language.toLowerCase();
|
||||
}
|
||||
return "text";
|
||||
};
|
||||
|
||||
const TokenizedDiffView: FC<Props> = ({ file, viewType, className, children }) => {
|
||||
const { tokens } = useTokenizeWorker(tokenize, {
|
||||
hunks: file.hunks,
|
||||
language: determineLanguage(file)
|
||||
language: determineLanguage(file.language)
|
||||
});
|
||||
|
||||
return (
|
||||
|
||||
@@ -67,7 +67,7 @@ const commitImplementMain = {
|
||||
};
|
||||
|
||||
const source: AnnotatedSource = {
|
||||
language: "go",
|
||||
language: "golang",
|
||||
lines: [
|
||||
{
|
||||
lineNumber: 1,
|
||||
@@ -112,6 +112,52 @@ const source: AnnotatedSource = {
|
||||
]
|
||||
};
|
||||
|
||||
const markdownSource: AnnotatedSource = {
|
||||
language: "markdown",
|
||||
lines: [
|
||||
{
|
||||
lineNumber: 1,
|
||||
code: "# Title",
|
||||
...commitCreateNewApp
|
||||
},
|
||||
{
|
||||
lineNumber: 2,
|
||||
code: "",
|
||||
...commitCreateNewApp
|
||||
},
|
||||
{
|
||||
lineNumber: 3,
|
||||
code: "This is a short Markdown text.",
|
||||
...commitFixedMissingImport
|
||||
},
|
||||
{
|
||||
lineNumber: 4,
|
||||
code: "",
|
||||
...commitFixedMissingImport
|
||||
},
|
||||
{
|
||||
lineNumber: 5,
|
||||
code: "With **bold** and __italic__ words.",
|
||||
...commitCreateNewApp
|
||||
},
|
||||
{
|
||||
lineNumber: 6,
|
||||
code: "",
|
||||
...commitImplementMain
|
||||
},
|
||||
{
|
||||
lineNumber: 7,
|
||||
code: "> This should be a quote",
|
||||
...commitCreateNewApp
|
||||
},
|
||||
{
|
||||
lineNumber: 8,
|
||||
code: "",
|
||||
...commitCreateNewApp
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const Robohash: FC = ({ children }) => {
|
||||
const binder = new Binder("robohash");
|
||||
binder.bind("avatar.factory", (person: Person) => `https://robohash.org/${person.mail}.png`);
|
||||
@@ -124,6 +170,9 @@ storiesOf("Annotate", module)
|
||||
.add("Default", () => (
|
||||
<Annotate source={source} repository={repository} baseDate={new Date("2020-04-16T09:22:42Z")} />
|
||||
))
|
||||
.add("Markdown", () => (
|
||||
<Annotate source={markdownSource} repository={repository} baseDate={new Date("2020-04-15T09:47:42Z")} />
|
||||
))
|
||||
.add("With Avatars", () => (
|
||||
<Robohash>
|
||||
<Annotate source={source} repository={repository} baseDate={new Date("2020-04-15T09:47:42Z")} />
|
||||
|
||||
@@ -35,6 +35,7 @@ import { DateInput } from "../../useDateFormatter";
|
||||
import Popover from "./Popover";
|
||||
import AnnotateLine from "./AnnotateLine";
|
||||
import { Action } from "./actions";
|
||||
import { determineLanguage } from "../../languages";
|
||||
|
||||
type Props = {
|
||||
source: AnnotatedSource;
|
||||
@@ -147,7 +148,7 @@ const Annotate: FC<Props> = ({ source, repository, baseDate }) => {
|
||||
{popover}
|
||||
<ReactSyntaxHighlighter
|
||||
showLineNumbers={false}
|
||||
language={source.language ? source.language : "text"}
|
||||
language={determineLanguage(source.language)}
|
||||
style={highlightingTheme}
|
||||
renderer={defaultRenderer}
|
||||
>
|
||||
|
||||
@@ -24,29 +24,51 @@
|
||||
|
||||
import refractor from "refractor/core";
|
||||
|
||||
const isLanguageRegistered = (lang: string) => {
|
||||
const registeredLanguages = refractor.listLanguages();
|
||||
return registeredLanguages.includes(lang);
|
||||
type RunHookEnv = {
|
||||
classes: string[];
|
||||
};
|
||||
|
||||
const loadLanguage = (lang: string, callback: () => void) => {
|
||||
if (isLanguageRegistered(lang)) {
|
||||
callback();
|
||||
} else {
|
||||
import(
|
||||
/* webpackChunkName: "tokenizer-refractor-[request]" */
|
||||
`refractor/lang/${lang}`
|
||||
).then(loadedLanguage => {
|
||||
refractor.register(loadedLanguage.default);
|
||||
export type RefractorAdapter = typeof refractor & {
|
||||
isLanguageRegistered: (lang: string) => boolean;
|
||||
loadLanguage: (lang: string, callback: () => void) => void;
|
||||
};
|
||||
|
||||
const createAdapter = (theme: { [key: string]: string }): RefractorAdapter => {
|
||||
const isLanguageRegistered = (lang: string) => {
|
||||
const registeredLanguages = refractor.listLanguages();
|
||||
return registeredLanguages.includes(lang);
|
||||
};
|
||||
|
||||
const loadLanguage = (lang: string, callback: () => void) => {
|
||||
if (isLanguageRegistered(lang)) {
|
||||
callback();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
import(
|
||||
/* webpackChunkName: "tokenizer-refractor-[request]" */
|
||||
`refractor/lang/${lang}`
|
||||
).then(loadedLanguage => {
|
||||
refractor.register(loadedLanguage.default);
|
||||
callback();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// @ts-ignore hooks are not in the type definition
|
||||
const originalRunHook = refractor.hooks.run;
|
||||
const runHook = (name: string, env: RunHookEnv) => {
|
||||
originalRunHook.apply(name, env);
|
||||
if (env.classes) {
|
||||
env.classes = env.classes.map(className => theme[className] || className);
|
||||
}
|
||||
};
|
||||
// @ts-ignore hooks are not in the type definition
|
||||
refractor.hooks.run = runHook;
|
||||
|
||||
return {
|
||||
isLanguageRegistered,
|
||||
loadLanguage,
|
||||
...refractor
|
||||
};
|
||||
};
|
||||
|
||||
const refractorAdapter = {
|
||||
isLanguageRegistered,
|
||||
loadLanguage,
|
||||
...refractor
|
||||
};
|
||||
|
||||
export default refractorAdapter;
|
||||
export default createAdapter;
|
||||
|
||||
@@ -22,140 +22,94 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Generated with http://k88hudson.github.io/syntax-highlighting-theme-generator/www */
|
||||
/**
|
||||
* IMPORTANT: If this file is changed, please run scritps/build-syntax-highlighting-javascript afterwards
|
||||
*/
|
||||
|
||||
/* Generated with http://k88hudson.github.io/syntax-highlighting-theme-generator/www */
|
||||
/* http://k88hudson.github.io/react-markdocs */
|
||||
|
||||
/**
|
||||
|
||||
* @author k88hudson
|
||||
|
||||
*
|
||||
|
||||
* Based on prism.js default theme for JavaScript, CSS and HTML
|
||||
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
|
||||
* @author Lea Verou
|
||||
|
||||
*/
|
||||
|
||||
/*********************************************************
|
||||
|
||||
* General
|
||||
|
||||
*/
|
||||
|
||||
pre[class*="language-"],
|
||||
code[class*="language-"] {
|
||||
|
||||
color: #363636;
|
||||
|
||||
font-size: 13px;
|
||||
|
||||
text-shadow: none;
|
||||
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
|
||||
direction: ltr;
|
||||
|
||||
text-align: left;
|
||||
|
||||
white-space: pre;
|
||||
|
||||
word-spacing: normal;
|
||||
|
||||
word-break: normal;
|
||||
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
|
||||
-o-tab-size: 4;
|
||||
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
|
||||
-moz-hyphens: none;
|
||||
|
||||
-ms-hyphens: none;
|
||||
|
||||
hyphens: none;
|
||||
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
code[class*="language-"]::selection,
|
||||
pre[class*="language-"]::mozselection,
|
||||
code[class*="language-"]::mozselection {
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection {
|
||||
text-shadow: none;
|
||||
|
||||
background: #7fe3cd;
|
||||
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
pre[class*="language-"],
|
||||
code[class*="language-"] {
|
||||
|
||||
text-shadow: none;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pre[class*="language-"] {
|
||||
|
||||
padding: 1em;
|
||||
|
||||
margin: .5em 0;
|
||||
|
||||
overflow: auto;
|
||||
|
||||
background: #ffffff;
|
||||
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"] {
|
||||
|
||||
padding: .1em .3em;
|
||||
|
||||
border-radius: .3em;
|
||||
|
||||
color: #ff3860;
|
||||
|
||||
background: #fbe7eb;
|
||||
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
||||
* Tokens
|
||||
|
||||
*/
|
||||
|
||||
.namespace {
|
||||
|
||||
opacity: .7;
|
||||
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
|
||||
color: #9a9a9a;
|
||||
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
|
||||
color: #9a9a9a;
|
||||
|
||||
}
|
||||
|
||||
.token.property,
|
||||
@@ -165,9 +119,7 @@ pre[class*="language-"] {
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
|
||||
color: #2c99c7;
|
||||
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
@@ -176,9 +128,7 @@ pre[class*="language-"] {
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
|
||||
color: #005f9a;
|
||||
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
@@ -186,93 +136,62 @@ pre[class*="language-"] {
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
|
||||
color: #686868;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
|
||||
color: #00a984;
|
||||
|
||||
}
|
||||
|
||||
.token.function {
|
||||
|
||||
color: #ff3860;
|
||||
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
|
||||
color: #a74eb2;
|
||||
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
|
||||
.token.bold,
|
||||
.token.title {
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
|
||||
font-style: italic;
|
||||
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
|
||||
cursor: help;
|
||||
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
||||
* Line highlighting
|
||||
|
||||
*/
|
||||
|
||||
pre[data-line] {
|
||||
|
||||
position: relative;
|
||||
|
||||
}
|
||||
|
||||
pre[class*="language-"] > code[class*="language-"] {
|
||||
|
||||
position: relative;
|
||||
|
||||
z-index: 1;
|
||||
|
||||
}
|
||||
|
||||
.line-highlight {
|
||||
|
||||
position: absolute;
|
||||
|
||||
left: 0;
|
||||
|
||||
right: 0;
|
||||
|
||||
padding: inherit 0;
|
||||
|
||||
margin-top: 1em;
|
||||
|
||||
background: #f5f5f5;
|
||||
|
||||
box-shadow: inset 5px 0 0 #99d8f3;
|
||||
|
||||
z-index: 0;
|
||||
|
||||
pointer-events: none;
|
||||
|
||||
line-height: inherit;
|
||||
|
||||
white-space: pre;
|
||||
|
||||
}
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/* --- DO NOT EDIT --- */
|
||||
/* Auto-generated from syntax-highlighting.css */
|
||||
/* Auto-generated from syntax-highlighting.module.css */
|
||||
|
||||
export default {
|
||||
'pre[class*="language-"]': {
|
||||
@@ -47,7 +47,7 @@ export default {
|
||||
padding: "1em",
|
||||
margin: ".5em 0",
|
||||
overflow: "auto",
|
||||
background: "#ffffff",
|
||||
background: "#ffffff"
|
||||
},
|
||||
'code[class*="language-"]': {
|
||||
color: "#363636",
|
||||
@@ -66,137 +66,140 @@ export default {
|
||||
WebkitHyphens: "none",
|
||||
MozHyphens: "none",
|
||||
msHyphens: "none",
|
||||
hyphens: "none",
|
||||
hyphens: "none"
|
||||
},
|
||||
'pre[class*="language-"]::selection': {
|
||||
textShadow: "none",
|
||||
background: "#7fe3cd",
|
||||
background: "#7fe3cd"
|
||||
},
|
||||
'code[class*="language-"]::selection': {
|
||||
textShadow: "none",
|
||||
background: "#7fe3cd",
|
||||
background: "#7fe3cd"
|
||||
},
|
||||
'pre[class*="language-"]::mozselection': {
|
||||
'pre[class*="language-"]::-moz-selection': {
|
||||
textShadow: "none",
|
||||
background: "#7fe3cd",
|
||||
background: "#7fe3cd"
|
||||
},
|
||||
'code[class*="language-"]::mozselection': {
|
||||
'code[class*="language-"]::-moz-selection': {
|
||||
textShadow: "none",
|
||||
background: "#7fe3cd",
|
||||
background: "#7fe3cd"
|
||||
},
|
||||
':not(pre) > code[class*="language-"]': {
|
||||
padding: ".1em .3em",
|
||||
borderRadius: ".3em",
|
||||
color: "#ff3860",
|
||||
background: "#fbe7eb",
|
||||
background: "#fbe7eb"
|
||||
},
|
||||
".namespace": {
|
||||
Opacity: ".7",
|
||||
Opacity: ".7"
|
||||
},
|
||||
comment: {
|
||||
color: "#9a9a9a",
|
||||
color: "#9a9a9a"
|
||||
},
|
||||
prolog: {
|
||||
color: "#9a9a9a",
|
||||
color: "#9a9a9a"
|
||||
},
|
||||
doctype: {
|
||||
color: "#9a9a9a",
|
||||
color: "#9a9a9a"
|
||||
},
|
||||
cdata: {
|
||||
color: "#9a9a9a",
|
||||
color: "#9a9a9a"
|
||||
},
|
||||
punctuation: {
|
||||
color: "#9a9a9a",
|
||||
color: "#9a9a9a"
|
||||
},
|
||||
property: {
|
||||
color: "#2c99c7",
|
||||
color: "#2c99c7"
|
||||
},
|
||||
tag: {
|
||||
color: "#2c99c7",
|
||||
color: "#2c99c7"
|
||||
},
|
||||
boolean: {
|
||||
color: "#2c99c7",
|
||||
color: "#2c99c7"
|
||||
},
|
||||
number: {
|
||||
color: "#2c99c7",
|
||||
color: "#2c99c7"
|
||||
},
|
||||
constant: {
|
||||
color: "#2c99c7",
|
||||
color: "#2c99c7"
|
||||
},
|
||||
symbol: {
|
||||
color: "#2c99c7",
|
||||
color: "#2c99c7"
|
||||
},
|
||||
deleted: {
|
||||
color: "#2c99c7",
|
||||
color: "#2c99c7"
|
||||
},
|
||||
selector: {
|
||||
color: "#005f9a",
|
||||
color: "#005f9a"
|
||||
},
|
||||
"attr-name": {
|
||||
color: "#005f9a",
|
||||
color: "#005f9a"
|
||||
},
|
||||
string: {
|
||||
color: "#005f9a",
|
||||
color: "#005f9a"
|
||||
},
|
||||
char: {
|
||||
color: "#005f9a",
|
||||
color: "#005f9a"
|
||||
},
|
||||
builtin: {
|
||||
color: "#005f9a",
|
||||
color: "#005f9a"
|
||||
},
|
||||
inserted: {
|
||||
color: "#005f9a",
|
||||
color: "#005f9a"
|
||||
},
|
||||
operator: {
|
||||
color: "#686868",
|
||||
color: "#686868"
|
||||
},
|
||||
entity: {
|
||||
color: "#686868",
|
||||
cursor: "help",
|
||||
cursor: "help"
|
||||
},
|
||||
url: {
|
||||
color: "#686868",
|
||||
color: "#686868"
|
||||
},
|
||||
".language-css .token.string": {
|
||||
color: "#686868",
|
||||
color: "#686868"
|
||||
},
|
||||
".style .token.string": {
|
||||
color: "#686868",
|
||||
color: "#686868"
|
||||
},
|
||||
atrule: {
|
||||
color: "#00a984",
|
||||
color: "#00a984"
|
||||
},
|
||||
"attr-value": {
|
||||
color: "#00a984",
|
||||
color: "#00a984"
|
||||
},
|
||||
keyword: {
|
||||
color: "#00a984",
|
||||
color: "#00a984"
|
||||
},
|
||||
function: {
|
||||
color: "#ff3860",
|
||||
color: "#ff3860"
|
||||
},
|
||||
regex: {
|
||||
color: "#a74eb2",
|
||||
color: "#a74eb2"
|
||||
},
|
||||
important: {
|
||||
color: "#a74eb2",
|
||||
fontWeight: "bold",
|
||||
fontWeight: "bold"
|
||||
},
|
||||
variable: {
|
||||
color: "#a74eb2",
|
||||
color: "#a74eb2"
|
||||
},
|
||||
bold: {
|
||||
fontWeight: "bold",
|
||||
fontWeight: "bold"
|
||||
},
|
||||
title: {
|
||||
fontWeight: "bold"
|
||||
},
|
||||
italic: {
|
||||
fontStyle: "italic",
|
||||
fontStyle: "italic"
|
||||
},
|
||||
"pre[data-line]": {
|
||||
position: "relative",
|
||||
position: "relative"
|
||||
},
|
||||
'pre[class*="language-"] > code[class*="language-"]': {
|
||||
position: "relative",
|
||||
zIndex: "1",
|
||||
zIndex: "1"
|
||||
},
|
||||
".line-highlight": {
|
||||
position: "absolute",
|
||||
@@ -209,6 +212,6 @@ export default {
|
||||
zIndex: "0",
|
||||
pointerEvents: "none",
|
||||
lineHeight: "inherit",
|
||||
whiteSpace: "pre",
|
||||
},
|
||||
whiteSpace: "pre"
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-extensions",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"main": "src/index.ts",
|
||||
"license": "MIT",
|
||||
"private": false,
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-plugins",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"ui-plugins": "./bin/ui-plugins.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-components": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/ui-extensions": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/ui-components": "^2.9.0-SNAPSHOT",
|
||||
"@scm-manager/ui-extensions": "^2.9.0-SNAPSHOT",
|
||||
"classnames": "^2.2.6",
|
||||
"query-string": "^5.0.1",
|
||||
"react": "^16.10.2",
|
||||
@@ -18,14 +18,14 @@
|
||||
"styled-components": "^5.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@scm-manager/babel-preset": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/eslint-config": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/jest-preset": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/prettier-config": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/tsconfig": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/ui-scripts": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/ui-tests": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/ui-types": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/babel-preset": "^2.9.0-SNAPSHOT",
|
||||
"@scm-manager/eslint-config": "^2.9.0-SNAPSHOT",
|
||||
"@scm-manager/jest-preset": "^2.9.0-SNAPSHOT",
|
||||
"@scm-manager/prettier-config": "^2.9.0-SNAPSHOT",
|
||||
"@scm-manager/tsconfig": "^2.9.0-SNAPSHOT",
|
||||
"@scm-manager/ui-scripts": "^2.9.0-SNAPSHOT",
|
||||
"@scm-manager/ui-tests": "^2.9.0-SNAPSHOT",
|
||||
"@scm-manager/ui-types": "^2.9.0-SNAPSHOT",
|
||||
"@types/classnames": "^2.2.9",
|
||||
"@types/enzyme": "^3.10.3",
|
||||
"@types/fetch-mock": "^7.3.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-polyfill",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"description": "Polyfills for SCM-Manager UI",
|
||||
"main": "src/index.js",
|
||||
"author": "Sebastian Sdorra <sebastian.sdorra@cloudogu.com>",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-scripts",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"description": "Build scripts for SCM-Manager",
|
||||
"main": "src/index.js",
|
||||
"author": "Sebastian Sdorra <sebastian.sdorra@cloudogu.com>",
|
||||
|
||||
@@ -90,8 +90,16 @@ module.exports = [
|
||||
use: [
|
||||
// Creates `style` nodes from JS strings
|
||||
"style-loader",
|
||||
// Translates CSS into CommonJS
|
||||
"css-loader",
|
||||
{
|
||||
loader: "css-loader",
|
||||
options: {
|
||||
// Run `postcss-loader` on each CSS `@import`, do not forget that `sass-loader` compile non CSS `@import`'s into a single file
|
||||
// If you need run `sass-loader` and `postcss-loader` on each CSS `@import` please set it to `2`
|
||||
importLoaders: 1,
|
||||
// Automatically enable css modules for files satisfying `/\.module\.\w+$/i` RegExp.
|
||||
modules: { auto: true }
|
||||
}
|
||||
},
|
||||
// Compiles Sass to CSS
|
||||
"sass-loader"
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-styles",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"description": "Styles for SCM-Manager",
|
||||
"main": "src/scm.scss",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-tests",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"description": "UI-Tests helpers",
|
||||
"author": "Sebastian Sdorra <sebastian.sdorra@cloudogu.com>",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-types",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"description": "Flow types for SCM-Manager related Objects",
|
||||
"main": "src/index.ts",
|
||||
"files": [
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "@scm-manager/ui-webapp",
|
||||
"version": "2.8.0-SNAPSHOT",
|
||||
"version": "2.9.0-SNAPSHOT",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@scm-manager/ui-components": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/ui-extensions": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/ui-components": "^2.9.0-SNAPSHOT",
|
||||
"@scm-manager/ui-extensions": "^2.9.0-SNAPSHOT",
|
||||
"classnames": "^2.2.5",
|
||||
"history": "^4.10.1",
|
||||
"i18next": "^19.6.0",
|
||||
@@ -29,7 +29,7 @@
|
||||
"test": "jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@scm-manager/ui-tests": "^2.8.0-SNAPSHOT",
|
||||
"@scm-manager/ui-tests": "^2.9.0-SNAPSHOT",
|
||||
"@types/classnames": "^2.2.9",
|
||||
"@types/enzyme": "^3.10.3",
|
||||
"@types/fetch-mock": "^7.3.1",
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
<parent>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-webapp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<name>scm-webapp</name>
|
||||
|
||||
<dependencies>
|
||||
@@ -48,7 +48,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-annotation-processor</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -73,13 +73,13 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-core</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-dao-xml</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- security -->
|
||||
@@ -343,7 +343,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-test</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@@ -405,7 +405,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-git-plugin</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<classifier>tests</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
@@ -413,14 +413,14 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-git-plugin</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-hg-plugin</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<classifier>tests</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
@@ -428,14 +428,14 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-hg-plugin</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-svn-plugin</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<classifier>tests</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
@@ -443,7 +443,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm.plugins</groupId>
|
||||
<artifactId>scm-svn-plugin</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -729,7 +729,7 @@
|
||||
<dependency>
|
||||
<groupId>sonia.scm</groupId>
|
||||
<artifactId>scm-ui</artifactId>
|
||||
<version>2.8.0-SNAPSHOT</version>
|
||||
<version>2.9.0-SNAPSHOT</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ import static com.google.common.base.Preconditions.checkArgument;
|
||||
@Extension
|
||||
public class ApiKeyRealm extends AuthenticatingRealm {
|
||||
|
||||
public static final String NAME = "ApiTokenRealm";
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ApiKeyRealm.class);
|
||||
|
||||
private final ApiKeyService apiKeyService;
|
||||
@@ -55,7 +57,7 @@ public class ApiKeyRealm extends AuthenticatingRealm {
|
||||
@Inject
|
||||
public ApiKeyRealm(ApiKeyService apiKeyService, DAORealmHelperFactory helperFactory, RepositoryRoleManager repositoryRoleManager) {
|
||||
this.apiKeyService = apiKeyService;
|
||||
this.helper = helperFactory.create("ApiTokenRealm");
|
||||
this.helper = helperFactory.create(NAME);
|
||||
this.repositoryRoleManager = repositoryRoleManager;
|
||||
setAuthenticationTokenClass(BearerToken.class);
|
||||
setCredentialsMatcher(new AllowAllCredentialsMatcher());
|
||||
|
||||
@@ -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;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
@@ -31,6 +31,7 @@ import io.jsonwebtoken.Claims;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.SignatureAlgorithm;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authz.AuthorizationException;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -154,6 +155,9 @@ public final class JwtAccessTokenBuilder implements AccessTokenBuilder {
|
||||
|
||||
@Override
|
||||
public JwtAccessToken build() {
|
||||
if (SecurityUtils.getSubject().getPrincipals().getRealmNames().contains(ApiKeyRealm.NAME)) {
|
||||
throw new AuthorizationException("Cannot create access token for api keys");
|
||||
}
|
||||
String id = keyGenerator.createKey();
|
||||
|
||||
String sub = getSubject();
|
||||
|
||||
@@ -21,122 +21,98 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.security;
|
||||
|
||||
import com.github.sdorra.shiro.ShiroRule;
|
||||
import com.github.sdorra.shiro.SubjectAware;
|
||||
import com.google.common.collect.Sets;
|
||||
import io.jsonwebtoken.Claims;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import org.apache.shiro.authz.AuthorizationException;
|
||||
import org.apache.shiro.subject.PrincipalCollection;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.apache.shiro.util.ThreadContext;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
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.mockito.Mock;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.hamcrest.Matchers.isEmptyOrNullString;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static java.util.Collections.singleton;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.Assert.assertThrows;
|
||||
import static org.mockito.Mockito.anyString;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.mockito.Mockito.lenient;
|
||||
import static sonia.scm.security.SecureKeyTestUtil.createSecureKey;
|
||||
|
||||
/**
|
||||
* Unit test for {@link JwtAccessTokenBuilder}.
|
||||
*
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
@SubjectAware(
|
||||
configuration = "classpath:sonia/scm/shiro-001.ini",
|
||||
username = "trillian",
|
||||
password = "secret"
|
||||
)
|
||||
public class JwtAccessTokenBuilderTest {
|
||||
|
||||
{
|
||||
ThreadContext.unbindSubject();
|
||||
}
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
class JwtAccessTokenBuilderTest {
|
||||
|
||||
@Mock
|
||||
private KeyGenerator keyGenerator;
|
||||
|
||||
|
||||
@Mock
|
||||
private SecureKeyResolver secureKeyResolver;
|
||||
|
||||
|
||||
private Set<AccessTokenEnricher> enrichers;
|
||||
|
||||
|
||||
private JwtAccessTokenBuilderFactory factory;
|
||||
|
||||
@Rule
|
||||
public ShiroRule shiro = new ShiroRule();
|
||||
|
||||
|
||||
@Mock
|
||||
private Subject subject;
|
||||
@Mock
|
||||
private PrincipalCollection principalCollection;
|
||||
|
||||
@BeforeEach
|
||||
void bindSubject() {
|
||||
lenient().when(subject.getPrincipal()).thenReturn("trillian");
|
||||
lenient().when(subject.getPrincipals()).thenReturn(principalCollection);
|
||||
ThreadContext.bind(subject);
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void unbindSubject() {
|
||||
ThreadContext.unbindSubject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare mocks and set up object under test.
|
||||
*/
|
||||
@Before
|
||||
public void setUpObjectUnderTest() {
|
||||
when(keyGenerator.createKey()).thenReturn("42");
|
||||
when(secureKeyResolver.getSecureKey(anyString())).thenReturn(createSecureKey());
|
||||
@BeforeEach
|
||||
void setUpObjectUnderTest() {
|
||||
lenient().when(keyGenerator.createKey()).thenReturn("42");
|
||||
lenient().when(secureKeyResolver.getSecureKey(anyString())).thenReturn(createSecureKey());
|
||||
enrichers = Sets.newHashSet();
|
||||
factory = new JwtAccessTokenBuilderFactory(keyGenerator, secureKeyResolver, enrichers);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests {@link JwtAccessTokenBuilder#build()} with subject from shiro context.
|
||||
*/
|
||||
@Test
|
||||
public void testBuildWithoutSubject() {
|
||||
JwtAccessToken token = factory.create().build();
|
||||
assertEquals("trillian", token.getSubject());
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests {@link JwtAccessTokenBuilder#build()} with explicit subject.
|
||||
*/
|
||||
@Test
|
||||
public void testBuildWithSubject() {
|
||||
JwtAccessToken token = factory.create().subject("dent").build();
|
||||
assertEquals("dent", token.getSubject());
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests {@link JwtAccessTokenBuilder#build()} with enricher.
|
||||
*/
|
||||
@Test
|
||||
public void testBuildWithEnricher() {
|
||||
enrichers.add((b) -> b.custom("c", "d"));
|
||||
JwtAccessToken token = factory.create().subject("dent").build();
|
||||
assertEquals("d", token.getCustom("c").get());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Tests {@link JwtAccessTokenBuilder#build()}.
|
||||
*/
|
||||
@Test
|
||||
public void testBuild(){
|
||||
void testBuild() {
|
||||
JwtAccessToken token = factory.create().subject("dent")
|
||||
.issuer("https://www.scm-manager.org")
|
||||
.expiresIn(5, TimeUnit.SECONDS)
|
||||
.custom("a", "b")
|
||||
.scope(Scope.valueOf("repo:*"))
|
||||
.build();
|
||||
|
||||
|
||||
// assert claims
|
||||
assertClaims(token);
|
||||
|
||||
|
||||
// reparse and assert again
|
||||
String compact = token.compact();
|
||||
assertThat(compact, not(isEmptyOrNullString()));
|
||||
assertThat(compact).isNotEmpty();
|
||||
Claims claims = Jwts.parser()
|
||||
.setSigningKey(secureKeyResolver.getSecureKey("dent").getBytes())
|
||||
.parseClaimsJws(compact)
|
||||
@@ -144,15 +120,67 @@ public class JwtAccessTokenBuilderTest {
|
||||
assertClaims(new JwtAccessToken(claims, compact));
|
||||
}
|
||||
|
||||
private void assertClaims(JwtAccessToken token){
|
||||
assertThat(token.getId(), not(isEmptyOrNullString()));
|
||||
assertNotNull( token.getIssuedAt() );
|
||||
assertNotNull( token.getExpiration());
|
||||
assertTrue(token.getExpiration().getTime() > token.getIssuedAt().getTime());
|
||||
assertEquals("dent", token.getSubject());
|
||||
assertTrue(token.getIssuer().isPresent());
|
||||
assertEquals(token.getIssuer().get(), "https://www.scm-manager.org");
|
||||
assertEquals("b", token.getCustom("a").get());
|
||||
assertEquals("[\"repo:*\"]", token.getScope().toString());
|
||||
private void assertClaims(JwtAccessToken token) {
|
||||
assertThat(token.getId()).isNotEmpty();
|
||||
assertThat(token.getIssuedAt()).isNotNull();
|
||||
assertThat(token.getExpiration()).isNotNull();
|
||||
assertThat(token.getExpiration().getTime() > token.getIssuedAt().getTime()).isTrue();
|
||||
assertThat(token.getSubject()).isEqualTo("dent");
|
||||
assertThat(token.getIssuer()).isNotEmpty();
|
||||
assertThat(token.getIssuer()).get().isEqualTo("https://www.scm-manager.org");
|
||||
assertThat(token.getCustom("a")).get().isEqualTo("b");
|
||||
assertThat(token.getScope()).hasToString("[\"repo:*\"]");
|
||||
}
|
||||
|
||||
@Nested
|
||||
class FromApiKeyRealm {
|
||||
|
||||
@BeforeEach
|
||||
void mockApiKeyRealm() {
|
||||
lenient().when(principalCollection.getRealmNames()).thenReturn(singleton("ApiTokenRealm"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testRejectedRequest() {
|
||||
JwtAccessTokenBuilder builder = factory.create().subject("dent");
|
||||
assertThrows(AuthorizationException.class, builder::build);
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
class FromDefaultRealm {
|
||||
|
||||
@BeforeEach
|
||||
void mockDefaultRealm() {
|
||||
lenient().when(principalCollection.getRealmNames()).thenReturn(singleton("DefaultRealm"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests {@link JwtAccessTokenBuilder#build()} with subject from shiro context.
|
||||
*/
|
||||
@Test
|
||||
void testBuildWithoutSubject() {
|
||||
JwtAccessToken token = factory.create().build();
|
||||
assertThat(token.getSubject()).isEqualTo("trillian");
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests {@link JwtAccessTokenBuilder#build()} with explicit subject.
|
||||
*/
|
||||
@Test
|
||||
void testBuildWithSubject() {
|
||||
JwtAccessToken token = factory.create().subject("dent").build();
|
||||
assertThat(token.getSubject()).isEqualTo("dent");
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests {@link JwtAccessTokenBuilder#build()} with enricher.
|
||||
*/
|
||||
@Test
|
||||
void testBuildWithEnricher() {
|
||||
enrichers.add((b) -> b.custom("c", "d"));
|
||||
JwtAccessToken token = factory.create().subject("dent").build();
|
||||
assertThat(token.getCustom("c")).get().isEqualTo("d");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
52
yarn.lock
52
yarn.lock
@@ -3861,10 +3861,10 @@
|
||||
dependencies:
|
||||
redux "^4.0.0"
|
||||
|
||||
"@types/refractor@^2.8.0":
|
||||
version "2.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/refractor/-/refractor-2.8.0.tgz#2e17b69f27e89c1ea076f49b599abe3567c54e01"
|
||||
integrity sha512-l3wSB96RFZnvB8bnbF8UmYsDD1MQl+u7jtYq+DgI/vo3RD5pdbK3OitGEvMO3DNJhTYmCEhXLVWyyWTddzwNzQ==
|
||||
"@types/refractor@^3.0.0":
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/refractor/-/refractor-3.0.0.tgz#c535cfad1c54cf377ae2984f6cf6e9627a36ea66"
|
||||
integrity sha512-jkCqkTpxMXXfN03Xpzj+mBMxo9IxG616SV2U42iwHkBGq/f8RrX3DCzLayIqUV+MAIBCUvl5xPnjqpUtZRnMqA==
|
||||
dependencies:
|
||||
"@types/prismjs" "*"
|
||||
|
||||
@@ -4775,6 +4775,11 @@ babel-code-frame@^6.22.0:
|
||||
esutils "^2.0.2"
|
||||
js-tokens "^3.0.2"
|
||||
|
||||
babel-core@7.0.0-bridge.0:
|
||||
version "7.0.0-bridge.0"
|
||||
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece"
|
||||
integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==
|
||||
|
||||
babel-eslint@^10.0.3:
|
||||
version "10.1.0"
|
||||
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232"
|
||||
@@ -8994,10 +8999,9 @@ gitconfiglocal@^1.0.0:
|
||||
dependencies:
|
||||
ini "^1.3.2"
|
||||
|
||||
gitdiff-parser@^0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/gitdiff-parser/-/gitdiff-parser-0.1.2.tgz#26a256e05e9c2d5016b512a96c1dacb40862b92a"
|
||||
integrity sha512-glDM6E1AwLYYTOPyI0CqamNEUSuwwAkmwULWpE2sHMpMZNzGJwErt7+eV+yIZcsbDza0pVSlwlBHFWbTf2Wu7A==
|
||||
gitdiff-parser@^0.1.2, "gitdiff-parser@https://github.com/scm-manager/gitdiff-parser#420d6cfa17a6a8f9bf1a517a2c629dcb332dbe13":
|
||||
version "0.2.2"
|
||||
resolved "https://github.com/scm-manager/gitdiff-parser#420d6cfa17a6a8f9bf1a517a2c629dcb332dbe13"
|
||||
|
||||
glob-base@^0.3.0:
|
||||
version "0.3.0"
|
||||
@@ -9318,16 +9322,6 @@ hast-util-parse-selector@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.4.tgz#60c99d0b519e12ab4ed32e58f150ec3f61ed1974"
|
||||
integrity sha512-gW3sxfynIvZApL4L07wryYF4+C9VvH3AUi7LAnVXV4MneGEgwOByXvFo18BgmTWnm7oHAe874jKbIB1YhHSIzA==
|
||||
|
||||
hastscript@^5.0.0:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-5.1.2.tgz#bde2c2e56d04c62dd24e8c5df288d050a355fb8a"
|
||||
integrity sha512-WlztFuK+Lrvi3EggsqOkQ52rKbxkXL3RwB6t5lwoa8QLMemoWfBuL43eDrwOamJyR7uKQKdmKYaBH1NZBiIRrQ==
|
||||
dependencies:
|
||||
comma-separated-tokens "^1.0.0"
|
||||
hast-util-parse-selector "^2.0.0"
|
||||
property-information "^5.0.0"
|
||||
space-separated-tokens "^1.0.0"
|
||||
|
||||
hastscript@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-6.0.0.tgz#e8768d7eac56c3fdeac8a92830d58e811e5bf640"
|
||||
@@ -13445,7 +13439,7 @@ parse-asn1@^5.0.0, parse-asn1@^5.1.5:
|
||||
pbkdf2 "^3.0.3"
|
||||
safe-buffer "^5.1.1"
|
||||
|
||||
parse-entities@^1.1.0, parse-entities@^1.1.2:
|
||||
parse-entities@^1.1.0:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.2.2.tgz#c31bf0f653b6661354f8973559cb86dd1d5edf50"
|
||||
integrity sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==
|
||||
@@ -14234,20 +14228,13 @@ prism-themes@^1.4.0:
|
||||
resolved "https://registry.yarnpkg.com/prism-themes/-/prism-themes-1.4.1.tgz#2e1b5877792e3d19fa365b1f0462335ae348aceb"
|
||||
integrity sha512-Sxk5+Wr63WxMq/sU/JYxnq5WbB0CTjv9dscGGMF91iBo3rHEJFfhZVxEsepEOMRbOQ9Exc+xySuAEaX4ATxtIQ==
|
||||
|
||||
prismjs@^1.21.0, prismjs@^1.8.4, prismjs@~1.22.0:
|
||||
prismjs@1.22.0, prismjs@^1.21.0, prismjs@^1.8.4, prismjs@~1.22.0:
|
||||
version "1.22.0"
|
||||
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.22.0.tgz#73c3400afc58a823dd7eed023f8e1ce9fd8977fa"
|
||||
integrity sha512-lLJ/Wt9yy0AiSYBf212kK3mM5L8ycwlyTlSxHBAneXLR0nzFMlZ5y7riFPF3E33zXOF2IH95xdY5jIyZbM9z/w==
|
||||
optionalDependencies:
|
||||
clipboard "^2.0.0"
|
||||
|
||||
prismjs@~1.17.0:
|
||||
version "1.17.1"
|
||||
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.17.1.tgz#e669fcbd4cdd873c35102881c33b14d0d68519be"
|
||||
integrity sha512-PrEDJAFdUGbOP6xK/UsfkC5ghJsPJviKgnQOoxaDbBjwc8op68Quupwt1DeAFoG8GImPhiKXAvvsH7wDSLsu1Q==
|
||||
optionalDependencies:
|
||||
clipboard "^2.0.0"
|
||||
|
||||
private@~0.1.5:
|
||||
version "0.1.8"
|
||||
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
|
||||
@@ -15227,16 +15214,7 @@ reflect.ownkeys@^0.2.0:
|
||||
resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460"
|
||||
integrity sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=
|
||||
|
||||
refractor@^2.4.1:
|
||||
version "2.10.1"
|
||||
resolved "https://registry.yarnpkg.com/refractor/-/refractor-2.10.1.tgz#166c32f114ed16fd96190ad21d5193d3afc7d34e"
|
||||
integrity sha512-Xh9o7hQiQlDbxo5/XkOX6H+x/q8rmlmZKr97Ie1Q8ZM32IRRd3B/UxuA/yXDW79DBSXGWxm2yRTbcTVmAciJRw==
|
||||
dependencies:
|
||||
hastscript "^5.0.0"
|
||||
parse-entities "^1.1.2"
|
||||
prismjs "~1.17.0"
|
||||
|
||||
refractor@^3.0.0, refractor@^3.1.0:
|
||||
refractor@3.2.0, refractor@^2.4.1, refractor@^3.0.0, refractor@^3.1.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.2.0.tgz#bc46f7cfbb6adbf45cd304e8e299b7fa854804e0"
|
||||
integrity sha512-hSo+EyMIZTLBvNNgIU5lW4yjCzNYMZ4dcEhBq/3nReGfqzd2JfVhdlPDfU9rEsgcAyWx+OimIIUoL4ZU7NtYHQ==
|
||||
|
||||
Reference in New Issue
Block a user