-
+
-
- 1
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 8
-
-
-
- 9
-
-
-
- 10
-
-
-
- 11
-
-
-
- 12
-
-
-
- 13
-
-
-
- 14
-
-
-
- 15
-
-
-
- 16
-
-
-
- 17
-
-
-
- 18
-
-
-
- 19
-
-
-
- 20
-
-
-
- 21
-
-
-
- 22
-
-
-
- 23
-
-
-
+ 1
+
<
project
- [
-
-
- ...
-
-
- ]>
-
-
-
-
-
-
-
- [...]
-
-
-
-
-
-
-
- <
-
-
- build
+
+ [...]
+
+
>
@@ -47880,6 +48083,128 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
>
+
+
+ 2
+
+
+
+
+ 3
+
+ [...]
+
+
+ 4
+
+
+
+
+ 5
+
+
+
+
+
+ <
+
+
+ build
+
+
+ >
+
+
+
+
+
+
+ 6
<
plugins
>
@@ -47914,36 +48247,104 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
+
+ 7
+
+
+ 8
+
[...]
+
+ 9
+
+
+ 10
+
<
plugin
>
@@ -47952,6 +48353,21 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
>
+
+
+ 11
<
groupId
>
@@ -47986,24 +48410,32 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
org.apache.maven.plugins
</
groupId
>
@@ -48012,6 +48444,21 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
>
+
+
+ 12
<
artifactId
>
@@ -48046,24 +48501,32 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
maven-enforcer-plugin
</
artifactId
>
@@ -48072,6 +48535,21 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
>
+
+
+ 13
</
plugin
>
@@ -48105,6 +48591,21 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
>
+
+
+ 14
<
plugin
>
@@ -48138,6 +48647,21 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
>
+
+
+ 15
<
groupId
>
@@ -48172,24 +48704,32 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
org.codehaus.mojo
</
groupId
>
@@ -48198,6 +48738,21 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
>
+
+
+ 16
<
artifactId
>
@@ -48232,24 +48795,32 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
animal-sniffer-maven-plugin
</
artifactId
>
@@ -48258,6 +48829,21 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
>
+
+
+ 17
</
plugin
>
@@ -48291,6 +48885,21 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
>
+
+
+ 18
</
plugins
>
@@ -48324,6 +48941,21 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
>
+
+
+ 19
</
build
>
@@ -48358,36 +48998,104 @@ exports[`Storyshots MarkdownView Xml Code Block 1`] = `
+
+ 20
+
+
+ 21
+
[...]
+
+ 22
+
+
+ 23
+
</
project
>
@@ -49344,147 +50052,74 @@ exports[`Storyshots SyntaxHighlighter Go 1`] = `
-
-
+
-
- 1
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 8
-
-
-
- 9
-
-
-
- 10
-
-
-
- 11
-
-
-
- 12
-
-
-
- 13
-
-
-
- 14
-
-
-
- 15
-
-
-
- 16
-
-
-
- 17
-
-
-
+ 1
+
@@ -49496,17 +50131,48 @@ exports[`Storyshots SyntaxHighlighter Go 1`] = `
main
+
+ 2
+
+
+ 3
+
@@ -49515,8 +50181,38 @@ exports[`Storyshots SyntaxHighlighter Go 1`] = `
- (
+
+
+
+ (
+
+
+
+
+
+ 4
@@ -49537,6 +50234,21 @@ exports[`Storyshots SyntaxHighlighter Go 1`] = `
>
+
+
+ 5
@@ -49558,228 +50271,961 @@ exports[`Storyshots SyntaxHighlighter Go 1`] = `
- )
-
-
-
+
+ 6
+
+ )
+
+
+
+
+
+
+ 7
+
+
+
+
+ 8
+
+
+
+
+
func
main
- ()
+ (
+
+
+ )
- {
+
+
+
+ {
+
+
+
- http.HandleFunc(
-
-
+ 9
+
+
+ http
+
+
+ .
+
+
+ HandleFunc
+
+
+ (
+
+
"/"
- ,
-
-
+ ,
+
+
+
+
+
func
- (w http.ResponseWriter, r *http.Request)
+ (
- {
+ w http
+
+
+ .
+
+
+ ResponseWriter
+
+
+ ,
+
+
+ r
+
+
+ *
+
+
+ http
+
+
+ .
+
+
+ Request
+
+
+ )
+
+
+
+
+
+ {
+
+
+
- fmt.Fprintf(w,
-
-
+ 10
+
+
+ fmt
+
+
+ .
+
+
+ Fprintf
+
+
+ (
+
+
+ w
+
+
+ ,
+
+
+
+
+
"Welcome to my website!"
)
+
+
+
- })
+
+ 11
+
+
+
+
+
+ }
+
+
+ )
+
+
+
+
+
+ 12
+
- fs := http.FileServer(http.Dir(
-
-
+ 13
+
+
+ fs
+
+
+ :=
+
+
+ http
+
+
+ .
+
+
+ FileServer
+
+
+ (
+
+
+ http
+
+
+ .
+
+
+ Dir
+
+
+ (
+
+
"static/"
+
+ )
+
+
+ )
+
- ))
+
- http.Handle(
-
-
+ 14
+
+
+ http
+
+
+ .
+
+
+ Handle
+
+
+ (
+
+
"/static/"
- , http.StripPrefix(
-
-
+ ,
+
+
+ http
+
+
+ .
+
+
+ StripPrefix
+
+
+ (
+
+
"/static/"
+
+ ,
+
- , fs))
+ fs
+
+
+ )
+
+
+ )
+
+
+
+
+ 15
+
- http.ListenAndServe(
-
-
+ 16
+
+
+ http
+
+
+ .
+
+
+ ListenAndServe
+
+
+ (
+
+
":80"
- ,
-
-
+ ,
+
+
+
+
+
nil
)
+
+
+
- }
+
+ 17
+
+
+
+
+
+ }
+
+
+
+
+
+ 18
+
@@ -49794,245 +51240,74 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
-
-
+
-
- 1
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 8
-
-
-
- 9
-
-
-
- 10
-
-
-
- 11
-
-
-
- 12
-
-
-
- 13
-
-
-
- 14
-
-
-
- 15
-
-
-
- 16
-
-
-
- 17
-
-
-
- 18
-
-
-
- 19
-
-
-
- 20
-
-
-
- 21
-
-
-
- 22
-
-
-
- 23
-
-
-
- 24
-
-
-
- 25
-
-
-
- 26
-
-
-
- 27
-
-
-
- 28
-
-
-
- 29
-
-
-
- 30
-
-
-
- 31
-
-
-
+ 1
+
@@ -50041,20 +51316,88 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
- com.example;
+
+
+
+ com
+
+
+ .
+
+
+ example
+
+
+ ;
+
+
+
+
+ 2
+
+
+ 3
+
@@ -50063,8 +51406,76 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
- java.io.IOException;
+
+
+
+ java
+
+
+ .
+
+
+ io
+
+
+ .
+
+
+ IOException
+
+
+ ;
+
+
+
+
+
+ 4
@@ -50083,8 +51495,76 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
- java.io.OutputStream;
+
+
+
+ java
+
+
+ .
+
+
+ io
+
+
+ .
+
+
+ OutputStream
+
+
+ ;
+
+
+
+
+
+ 5
@@ -50103,20 +51584,104 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
- java.net.InetSocketAddress;
+
+
+
+ java
+
+
+ .
+
+
+ net
+
+
+ .
+
+
+ InetSocketAddress
+
+
+ ;
+
+
+
+
+ 6
+
+
+ 7
+
@@ -50125,8 +51690,108 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
- com.sun.net.httpserver.HttpExchange;
+
+
+
+ com
+
+
+ .
+
+
+ sun
+
+
+ .
+
+
+ net
+
+
+ .
+
+
+ httpserver
+
+
+ .
+
+
+ HttpExchange
+
+
+ ;
+
+
+
+
+
+ 8
@@ -50145,8 +51811,108 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
- com.sun.net.httpserver.HttpHandler;
+
+
+
+ com
+
+
+ .
+
+
+ sun
+
+
+ .
+
+
+ net
+
+
+ .
+
+
+ httpserver
+
+
+ .
+
+
+ HttpHandler
+
+
+ ;
+
+
+
+
+
+ 9
@@ -50165,20 +51932,136 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
- com.sun.net.httpserver.HttpServer;
+
+
+
+ com
+
+
+ .
+
+
+ sun
+
+
+ .
+
+
+ net
+
+
+ .
+
+
+ httpserver
+
+
+ .
+
+
+ HttpServer
+
+
+ ;
+
+
+
+
+ 10
+
+
+ 11
+
@@ -50190,167 +52073,324 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
class
Test
{
+
+
+
+
+ 12
+
+
+ 13
+
public
static
void
main
- (String[] args)
+ (
+ String
+
+
+ [
+
+
+ ]
+
+
+ args
+
+
+ )
+
+
throws
+
+
+
+ Exception
+
+
+
+
+
- Exception
+ {
- {
+
- HttpServer server = HttpServer.create(
-
-
+ 14
+
+
+
+
+
+ HttpServer
+
+
+ server
+
+
+ =
+
+
+
+
+
+ HttpServer
+
+
+ .
+
+
+ create
+
+
+ (
+
+
@@ -50359,60 +52399,175 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
- InetSocketAddress(
+
+ InetSocketAddress
+
+
+ (
+
+
8000
- ),
-
-
+ )
+
+
+ ,
+
+
+
+
+
0
+
+ )
+
+
+ ;
+
- );
+
- server.createContext(
-
-
+ 15
+
+
+ server
+
+
+ .
+
+
+ createContext
+
+
+ (
+
+
"/test"
- ,
-
-
+ ,
+
+
+
+
+
@@ -50421,32 +52576,150 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
- MyHandler());
-
+
+
+
+ MyHandler
+
+
+ (
+
+
+ )
+
+
+ )
+
+
+ ;
- server.setExecutor(
+
+
+ 16
+
+
+ server
+
+
+ .
+
+
+ setExecutor
+
+
+ (
+
+
null
- );
-
-
+ )
+
+
+ ;
+
+
+
+
+
@@ -50458,21 +52731,160 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
- server.start();
-
+
+ 17
+
+
+ server
+
+
+ .
+
+
+ start
+
+
+ (
+
+
+ )
+
+
+ ;
+
+
+
-
-
+
+
+ 18
+
+ }
+
+
+
+
+
+
+ 19
+
+
+
+
+ 20
+
+
+
+
+
@@ -50484,76 +52896,87 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
class
MyHandler
implements
HttpHandler
{
+
+
+
+
+
+ 21
@@ -50574,6 +52998,21 @@ exports[`Storyshots SyntaxHighlighter Java 1`] = `
>
+
+
+ 22
public
void
handle
- (HttpExchange t)
+ (
+ HttpExchange
+
+
+ t
+
+
+ )
+
+
throws
+
+
+
+ IOException
+
+
+
+
+
- IOException
+ {
- {
+
- String response =
-
-
+ 23
+
+
+
+
+
+ String
+
+
+ response
+
+
+ =
+
+
+
+
+
"This is the response"
;
+
+
+
- t.sendResponseHeaders(
-
-
+ 24
+
+
+ t
+
+
+ .
+
+
+ sendResponseHeaders
+
+
+ (
+
+
200
+
+ ,
+
- , response.length());
+ response
+
+
+ .
+
+
+ length
+
+
+ (
+
+
+ )
+
+
+ )
+
+
+ ;
+
+
+
- OutputStream os = t.getResponseBody();
-
- os.write(response.getBytes());
-
- os.close();
-
+
+ 25
+
+
+
+
+
+ OutputStream
+
+
+ os
+
+
+ =
+
+
+ t
+
+
+ .
+
+
+ getResponseBody
+
+
+ (
+
+
+ )
+
+
+ ;
+
+
+
+
+
+ 26
+
+
+ os
+
+
+ .
+
+
+ write
+
+
+ (
+
+
+ response
+
+
+ .
+
+
+ getBytes
+
+
+ (
+
+
+ )
+
+
+ )
+
+
+ ;
+
+
+
+
+
+
+ 27
+
+
+ os
+
+
+ .
+
+
+ close
+
+
+ (
+
+
+ )
+
+
+ ;
+
+
+
+
+
+
+ 28
+
+
+
+
+
+ }
+
+
+
+
+
+
+ 29
+
+
+
+
+
+ }
+
+
+
+
+
+
+ 30
+
- }
+
+ 31
+
+
+
+
+
+ }
+
+
+
+
+
+ 32
+
@@ -50737,77 +53803,74 @@ exports[`Storyshots SyntaxHighlighter Javascript 1`] = `
-
-
+
-
- 1
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
+ 1
+
@@ -50816,177 +53879,663 @@ exports[`Storyshots SyntaxHighlighter Javascript 1`] = `
- http =
+ http
+ =
+
+
+
+
+
require
(
'http'
+
+ )
+
+
+ ;
+
- );
+
+
+ 2
+
- http.createServer(
-
-
+ 3
+
+
+ http
+
+
+ .
+
+
+ createServer
+
+
+ (
+
+
function
- (
+
- req, res
+ (
+ req
+
+
- )
+ ,
+
+
+ res
+
+
+ )
+
+
+
{
+
+
+
- res.writeHead(
-
-
+ 4
+
+
+ res
+
+
+ .
+
+
+ writeHead
+
+
+ (
+
+
200
- , {
-
-
+ ,
+
+
+
+
+
+ {
+
+
'Content-Type'
- :
-
-
+ :
+
+
+
+
+
'text/plain'
+
+ }
+
+
+ )
+
+
+ ;
+
- });
+
- res.write(
-
-
+ 5
+
+
+ res
+
+
+ .
+
+
+ write
+
+
+ (
+
+
'Hello World!'
- );
-
-
- res.end();
-
-
- }).listen(
-
-
+ )
+
+
+ ;
+
+
+
+
+
+
+ 6
+
+
+ res
+
+
+ .
+
+
+ end
+
+
+ (
+
+
+ )
+
+
+ ;
+
+
+
+
+
+
+ 7
+
+
+
+
+
+ }
+
+
+ )
+
+
+ .
+
+
+ listen
+
+
+ (
+
+
8080
+
+ )
+
+
+ ;
+
- );
+
+
+ 8
+
@@ -51001,168 +54550,74 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
-
-
+
-
- 1
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 8
-
-
-
- 9
-
-
-
- 10
-
-
-
- 11
-
-
-
- 12
-
-
-
- 13
-
-
-
- 14
-
-
-
- 15
-
-
-
- 16
-
-
-
- 17
-
-
-
- 18
-
-
-
- 19
-
-
-
- 20
-
-
-
+ 1
+
@@ -51174,9 +54629,10 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
BaseHTTPServer
@@ -51185,20 +54641,81 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
- BaseHTTPRequestHandler,HTTPServer
+ BaseHTTPRequestHandler
+
+
+ ,
+
+
+ HTTPServer
+
+ 2
+
- PORT_NUMBER =
-
-
+ 3
+
+
+ PORT_NUMBER
+
+
+ =
+
+
+
+
+
@@ -51210,49 +54727,96 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
+
+ 4
+
+
+ 5
+
class
myHandler
- (BaseHTTPRequestHandler)
+ (
+ BaseHTTPRequestHandler
+
+
+ )
+
+
:
@@ -51262,55 +54826,98 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
+
+ 6
+
+
+ 7
+
def
do_GET
- (self)
+ (
+ self
+
+
+ )
+
+
@@ -51323,80 +54930,328 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
- self.send_response(
-
-
+ 8
+
+
+ self
+
+
+ .
+
+
+ send_response
+
+
+ (
+
+
200
)
+
+
+
- self.send_header(
-
-
+ 9
+
+
+ self
+
+
+ .
+
+
+ send_header
+
+
+ (
+
+
'Content-type'
,
'text/html'
- )
-
-
- self.end_headers()
-
-
- self.wfile.write(
-
-
+ )
+
+
+
+
+
+
+ 10
+
+
+ self
+
+
+ .
+
+
+ end_headers
+
+
+ (
+
+
+ )
+
+
+
+
+
+
+ 11
+
+
+ self
+
+
+ .
+
+
+ wfile
+
+
+ .
+
+
+ write
+
+
+ (
+
+
"Hello World !"
)
+
+
+
+
+
+ 12
@@ -51418,47 +55274,204 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
+
+ 13
+
+
+ 14
+
try
:
+
+
+
- server = HTTPServer((
-
-
+ 15
+
+
+ server
+
+
+ =
+
+
+ HTTPServer
+
+
+ (
+
+
+ (
+
+
''
+
+ ,
+
- , PORT_NUMBER), myHandler)
+ PORT_NUMBER
+
+
+ )
+
+
+ ,
+
+
+ myHandler
+
+
+ )
+
+
+
+
+
+ 16
@@ -51480,9 +55494,10 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
@@ -51491,20 +55506,110 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
- , PORT_NUMBER
+
+
+
+ ,
+
+
+ PORT_NUMBER
- server.serve_forever()
+
+ 17
+
+
+ server
+
+
+ .
+
+
+ serve_forever
+
+
+ (
+
+
+ )
+
+
+
+
+
+ 18
+
@@ -51513,8 +55618,38 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
- KeyboardInterrupt:
+ KeyboardInterrupt
+
+
+ :
+
+
+
+
+
+ 19
@@ -51536,9 +55672,10 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
@@ -51550,8 +55687,97 @@ exports[`Storyshots SyntaxHighlighter Python 1`] = `
- server.socket.close()
+
+ 20
+
+
+ server
+
+
+ .
+
+
+ socket
+
+
+ .
+
+
+ close
+
+
+ (
+
+
+ )
+
+
+
+
+
+ 21
+
@@ -51566,19 +55792,59 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
-
+
@@ -51587,7 +55853,44 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
- com.example;
+
+
+
+ com
+
+
+ .
+
+
+ example
+
+
+ ;
+
+
+
@@ -51598,9 +55901,10 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
@@ -51609,7 +55913,60 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
- java.io.IOException;
+
+
+
+ java
+
+
+ .
+
+
+ io
+
+
+ .
+
+
+ IOException
+
+
+ ;
+
+
+
@@ -51629,7 +55987,60 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
- java.io.OutputStream;
+
+
+
+ java
+
+
+ .
+
+
+ io
+
+
+ .
+
+
+ OutputStream
+
+
+ ;
+
+
+
@@ -51649,7 +56061,60 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
- java.net.InetSocketAddress;
+
+
+
+ java
+
+
+ .
+
+
+ net
+
+
+ .
+
+
+ InetSocketAddress
+
+
+ ;
+
+
+
@@ -51660,9 +56125,10 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
@@ -51671,7 +56137,92 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
- com.sun.net.httpserver.HttpExchange;
+
+
+
+ com
+
+
+ .
+
+
+ sun
+
+
+ .
+
+
+ net
+
+
+ .
+
+
+ httpserver
+
+
+ .
+
+
+ HttpExchange
+
+
+ ;
+
+
+
@@ -51691,7 +56243,92 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
- com.sun.net.httpserver.HttpHandler;
+
+
+
+ com
+
+
+ .
+
+
+ sun
+
+
+ .
+
+
+ net
+
+
+ .
+
+
+ httpserver
+
+
+ .
+
+
+ HttpHandler
+
+
+ ;
+
+
+
@@ -51711,7 +56349,92 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
- com.sun.net.httpserver.HttpServer;
+
+
+
+ com
+
+
+ .
+
+
+ sun
+
+
+ .
+
+
+ net
+
+
+ .
+
+
+ httpserver
+
+
+ .
+
+
+ HttpServer
+
+
+ ;
+
+
+
@@ -51722,9 +56445,10 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
@@ -51736,42 +56460,45 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
class
Test
{
+
+
+
@@ -51782,121 +56509,230 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
public
static
void
main
- (String[] args)
+ (
+ String
+
+
+ [
+
+
+ ]
+
+
+ args
+
+
+ )
+
+
throws
- Exception
+
+
+
+ Exception
+
+
+
{
+
+
+
- HttpServer server = HttpServer.create(
+
+ HttpServer
+
+
+ server
+
+
+ =
+
+
+
+
+
+ HttpServer
+
+
+ .
+
+
+ create
+
+
+ (
+
+
@@ -51905,60 +56741,160 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
- InetSocketAddress(
+
+ InetSocketAddress
+
+
+ (
+
+
8000
- ),
-
-
+ )
+
+
+ ,
+
+
+
+
+
0
+
+ )
+
+
+ ;
+
- );
+
- server.createContext(
+ server
+ .
+
+
+ createContext
+
+
+ (
+
+
"/test"
- ,
-
-
+ ,
+
+
+
+
+
@@ -51967,32 +56903,135 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
- MyHandler());
+
+
+
+ MyHandler
+
+
+ (
+
+
+ )
+
+
+ )
+
+
+ ;
+
+
+
- server.setExecutor(
+ server
+ .
+
+
+ setExecutor
+
+
+ (
+
+
null
- );
-
-
+ )
+
+
+ ;
+
+
+
+
+
@@ -52004,10 +57043,88 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
- server.start();
-
+
+ server
+
+
+ .
+
+
+ start
+
+
+ (
+
+
+ )
+
+
+ ;
+
+
+
+
+
+
+
+
+ }
+
+
+
+
+
@@ -52030,75 +57148,71 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
class
MyHandler
implements
HttpHandler
{
+
+
+
@@ -52127,148 +57242,625 @@ exports[`Storyshots SyntaxHighlighter Without line numbers 1`] = `
public
void
handle
- (HttpExchange t)
+ (
+ HttpExchange
+
+
+ t
+
+
+ )
+
+
throws
- IOException
+
+
+
+ IOException
+
+
+
{
+
+
+
- String response =
+
+ String
+
+
+ response
+
+
+ =
+
+
+
+
+
"This is the response"
;
+
+
+
- t.sendResponseHeaders(
+ t
+ .
+
+
+ sendResponseHeaders
+
+
+ (
+
+
200
+
+ ,
+
- , response.length());
+ response
+
+
+ .
+
+
+ length
+
+
+ (
+
+
+ )
+
+
+ )
+
+
+ ;
+
+
+
- OutputStream os = t.getResponseBody();
-
- os.write(response.getBytes());
-
- os.close();
-
+
+
+
+
+ OutputStream
+
+
+ os
+
+
+ =
+
+
+ t
+
+
+ .
+
+
+ getResponseBody
+
+
+ (
+
+
+ )
+
+
+ ;
+
+
+
+
+
+ os
+
+
+ .
+
+
+ write
+
+
+ (
+
+
+ response
+
+
+ .
+
+
+ getBytes
+
+
+ (
+
+
+ )
+
+
+ )
+
+
+ ;
+
+
+
+
+
+
+ os
+
+
+ .
+
+
+ close
+
+
+ (
+
+
+ )
+
+
+ ;
+
+
+
+
+
+
+
+
+
+ }
+
+
+
+
+
+
+
+
+
+ }
+
+
+
+
+
- }
+
+
+
+
+ }
+
+
+
+
diff --git a/scm-ui/ui-components/src/repos/TokenizedDiffView.tsx b/scm-ui/ui-components/src/repos/TokenizedDiffView.tsx
index c012742dbd..dcd1d65616 100644
--- a/scm-ui/ui-components/src/repos/TokenizedDiffView.tsx
+++ b/scm-ui/ui-components/src/repos/TokenizedDiffView.tsx
@@ -29,7 +29,8 @@ import { File } from "./DiffTypes";
// styling for the diff tokens
// this must be aligned with th style, which is used in the SyntaxHighlighter component
-import "highlight.js/styles/arduino-light.css";
+// eslint-disable-next-line no-restricted-imports
+import "../syntax-highlighting.css";
const DiffView = styled(Diff)`
/* align line numbers */
@@ -58,6 +59,22 @@ 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
diff --git a/scm-ui/ui-components/src/repos/annotate/Annotate.tsx b/scm-ui/ui-components/src/repos/annotate/Annotate.tsx
index d95b24fcdf..9aeb36dd55 100644
--- a/scm-ui/ui-components/src/repos/annotate/Annotate.tsx
+++ b/scm-ui/ui-components/src/repos/annotate/Annotate.tsx
@@ -24,10 +24,13 @@
import React, { FC, useReducer } from "react";
import { Repository, AnnotatedSource, AnnotatedLine } from "@scm-manager/ui-types";
-
+// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
-import { LightAsync as ReactSyntaxHighlighter, createElement } from "react-syntax-highlighter";
-import { arduinoLight } from "react-syntax-highlighter/dist/cjs/styles/hljs";
+import { PrismAsyncLight as ReactSyntaxHighlighter, createElement } from "react-syntax-highlighter";
+// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
+// @ts-ignore
+// eslint-disable-next-line no-restricted-imports
+import highlightingTheme from "../../syntax-highlighting";
import { DateInput } from "../../useDateFormatter";
import Popover from "./Popover";
import AnnotateLine from "./AnnotateLine";
@@ -145,7 +148,7 @@ const Annotate: FC = ({ source, repository, baseDate }) => {
{code}
diff --git a/scm-ui/ui-components/src/repos/annotate/AnnotateLine.tsx b/scm-ui/ui-components/src/repos/annotate/AnnotateLine.tsx
index 7d8401aa70..c32d172e89 100644
--- a/scm-ui/ui-components/src/repos/annotate/AnnotateLine.tsx
+++ b/scm-ui/ui-components/src/repos/annotate/AnnotateLine.tsx
@@ -77,10 +77,11 @@ const Line = styled.div`
const Metadata = styled(LineElement)`
cursor: help;
+ width: 217px;
`;
const EmptyMetadata = styled(LineElement)`
- width: 16.7em;
+ width: 217px;
`;
const dispatchDeferred = (dispatch: Dispatch, action: Action) => {
diff --git a/scm-ui/ui-components/src/repos/refractorAdapter.ts b/scm-ui/ui-components/src/repos/refractorAdapter.ts
index acb56fa396..0bac53e4d2 100644
--- a/scm-ui/ui-components/src/repos/refractorAdapter.ts
+++ b/scm-ui/ui-components/src/repos/refractorAdapter.ts
@@ -22,16 +22,11 @@
* SOFTWARE.
*/
-import lowlight from "lowlight/lib/core";
-
-// adapter to let lowlight look like refractor
-// this is required because react-diff-view does only support refractor,
-// but we want same highlighting as in the source code browser.
+import refractor from "refractor/core";
const isLanguageRegistered = (lang: string) => {
- // @ts-ignore listLanguages seems unknown to type
- const registeredLanguages = lowlight.listLanguages();
- return !!registeredLanguages[lang];
+ const registeredLanguages = refractor.listLanguages();
+ return registeredLanguages.includes(lang);
};
const loadLanguage = (lang: string, callback: () => void) => {
@@ -39,22 +34,19 @@ const loadLanguage = (lang: string, callback: () => void) => {
callback();
} else {
import(
- /* webpackChunkName: "tokenizer-lowlight-[request]" */
- `highlight.js/lib/languages/${lang}`
+ /* webpackChunkName: "tokenizer-refractor-[request]" */
+ `refractor/lang/${lang}`
).then(loadedLanguage => {
- lowlight.registerLanguage(lang, loadedLanguage.default);
+ refractor.register(loadedLanguage.default);
callback();
});
}
};
const refractorAdapter = {
- ...lowlight,
isLanguageRegistered,
loadLanguage,
- highlight: (value: string, language: string) => {
- return lowlight.highlight(language, value).value;
- }
+ ...refractor
};
export default refractorAdapter;
diff --git a/scm-ui/ui-components/src/syntax-highlighting.css b/scm-ui/ui-components/src/syntax-highlighting.css
new file mode 100644
index 0000000000..71c052bdcf
--- /dev/null
+++ b/scm-ui/ui-components/src/syntax-highlighting.css
@@ -0,0 +1,278 @@
+/**
+ * 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.
+ */
+
+/* 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 {
+
+ 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,
+.token.tag,
+.token.boolean,
+.token.number,
+.token.constant,
+.token.symbol,
+.token.deleted {
+
+ color: #2c99c7;
+
+}
+
+.token.selector,
+.token.attr-name,
+.token.string,
+.token.char,
+.token.builtin,
+.token.inserted {
+
+ color: #005f9a;
+
+}
+
+.token.operator,
+.token.entity,
+.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 {
+
+ 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;
+
+}
diff --git a/scm-ui/ui-components/src/syntax-highlighting.ts b/scm-ui/ui-components/src/syntax-highlighting.ts
new file mode 100644
index 0000000000..46c319d15e
--- /dev/null
+++ b/scm-ui/ui-components/src/syntax-highlighting.ts
@@ -0,0 +1,214 @@
+/*
+ * 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.
+ */
+
+/* --- DO NOT EDIT --- */
+/* Auto-generated from syntax-highlighting.css */
+
+export default {
+ 'pre[class*="language-"]': {
+ color: "#363636",
+ fontSize: "13px",
+ textShadow: "none",
+ fontFamily: "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
+ direction: "ltr",
+ textAlign: "left",
+ whiteSpace: "pre",
+ wordSpacing: "normal",
+ wordBreak: "normal",
+ lineHeight: "1.5",
+ MozTabSize: "4",
+ OTabSize: "4",
+ tabSize: "4",
+ WebkitHyphens: "none",
+ MozHyphens: "none",
+ msHyphens: "none",
+ hyphens: "none",
+ padding: "1em",
+ margin: ".5em 0",
+ overflow: "auto",
+ background: "#ffffff",
+ },
+ 'code[class*="language-"]': {
+ color: "#363636",
+ fontSize: "13px",
+ textShadow: "none",
+ fontFamily: "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
+ direction: "ltr",
+ textAlign: "left",
+ whiteSpace: "pre",
+ wordSpacing: "normal",
+ wordBreak: "normal",
+ lineHeight: "1.5",
+ MozTabSize: "4",
+ OTabSize: "4",
+ tabSize: "4",
+ WebkitHyphens: "none",
+ MozHyphens: "none",
+ msHyphens: "none",
+ hyphens: "none",
+ },
+ 'pre[class*="language-"]::selection': {
+ textShadow: "none",
+ background: "#7fe3cd",
+ },
+ 'code[class*="language-"]::selection': {
+ textShadow: "none",
+ background: "#7fe3cd",
+ },
+ 'pre[class*="language-"]::mozselection': {
+ textShadow: "none",
+ background: "#7fe3cd",
+ },
+ 'code[class*="language-"]::mozselection': {
+ textShadow: "none",
+ background: "#7fe3cd",
+ },
+ ':not(pre) > code[class*="language-"]': {
+ padding: ".1em .3em",
+ borderRadius: ".3em",
+ color: "#ff3860",
+ background: "#fbe7eb",
+ },
+ ".namespace": {
+ Opacity: ".7",
+ },
+ comment: {
+ color: "#9a9a9a",
+ },
+ prolog: {
+ color: "#9a9a9a",
+ },
+ doctype: {
+ color: "#9a9a9a",
+ },
+ cdata: {
+ color: "#9a9a9a",
+ },
+ punctuation: {
+ color: "#9a9a9a",
+ },
+ property: {
+ color: "#2c99c7",
+ },
+ tag: {
+ color: "#2c99c7",
+ },
+ boolean: {
+ color: "#2c99c7",
+ },
+ number: {
+ color: "#2c99c7",
+ },
+ constant: {
+ color: "#2c99c7",
+ },
+ symbol: {
+ color: "#2c99c7",
+ },
+ deleted: {
+ color: "#2c99c7",
+ },
+ selector: {
+ color: "#005f9a",
+ },
+ "attr-name": {
+ color: "#005f9a",
+ },
+ string: {
+ color: "#005f9a",
+ },
+ char: {
+ color: "#005f9a",
+ },
+ builtin: {
+ color: "#005f9a",
+ },
+ inserted: {
+ color: "#005f9a",
+ },
+ operator: {
+ color: "#686868",
+ },
+ entity: {
+ color: "#686868",
+ cursor: "help",
+ },
+ url: {
+ color: "#686868",
+ },
+ ".language-css .token.string": {
+ color: "#686868",
+ },
+ ".style .token.string": {
+ color: "#686868",
+ },
+ atrule: {
+ color: "#00a984",
+ },
+ "attr-value": {
+ color: "#00a984",
+ },
+ keyword: {
+ color: "#00a984",
+ },
+ function: {
+ color: "#ff3860",
+ },
+ regex: {
+ color: "#a74eb2",
+ },
+ important: {
+ color: "#a74eb2",
+ fontWeight: "bold",
+ },
+ variable: {
+ color: "#a74eb2",
+ },
+ bold: {
+ fontWeight: "bold",
+ },
+ italic: {
+ fontStyle: "italic",
+ },
+ "pre[data-line]": {
+ position: "relative",
+ },
+ 'pre[class*="language-"] > code[class*="language-"]': {
+ position: "relative",
+ zIndex: "1",
+ },
+ ".line-highlight": {
+ position: "absolute",
+ left: "0",
+ right: "0",
+ padding: "inherit 0",
+ marginTop: "1em",
+ background: "#f5f5f5",
+ boxShadow: "inset 5px 0 0 #99d8f3",
+ zIndex: "0",
+ pointerEvents: "none",
+ lineHeight: "inherit",
+ whiteSpace: "pre",
+ },
+};
diff --git a/scm-ui/ui-components/tsconfig.json b/scm-ui/ui-components/tsconfig.json
index 7e3ee63a2d..9aa573a38d 100644
--- a/scm-ui/ui-components/tsconfig.json
+++ b/scm-ui/ui-components/tsconfig.json
@@ -1,3 +1,6 @@
{
- "extends": "@scm-manager/tsconfig"
+ "extends": "@scm-manager/tsconfig",
+ "exclude": [
+ "./scripts"
+ ]
}
diff --git a/scm-ui/ui-scripts/bin/ui-scripts.js b/scm-ui/ui-scripts/bin/ui-scripts.js
index 0386f49e3d..0b3b645736 100755
--- a/scm-ui/ui-scripts/bin/ui-scripts.js
+++ b/scm-ui/ui-scripts/bin/ui-scripts.js
@@ -25,7 +25,7 @@
/* eslint-disable no-console */
const { spawnSync } = require("child_process");
-const commands = ["plugin", "plugin-watch", "publish", "version"];
+const commands = ["plugin", "plugin-watch", "plugin-publish", "publish", "version"];
const args = process.argv.slice(2);
@@ -39,7 +39,7 @@ const nodeArgs = commandIndex > 0 ? args.slice(0, commandIndex) : [];
if (commands.includes(command)) {
const result = spawnSync(
"node",
- nodeArgs.concat(require.resolve("../src/commands/" + command)).concat(args.slice(commandIndex + 1)),
+ nodeArgs.concat(require.resolve(`../src/commands/${command}`)).concat(args.slice(commandIndex + 1)),
{ stdio: "inherit" }
);
if (result.signal) {
diff --git a/scm-ui/ui-scripts/src/commands/plugin-publish.js b/scm-ui/ui-scripts/src/commands/plugin-publish.js
new file mode 100644
index 0000000000..5b80cbfad2
--- /dev/null
+++ b/scm-ui/ui-scripts/src/commands/plugin-publish.js
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+const yarn = require("../yarn");
+const versions = require("../versions");
+
+const args = process.argv.slice(2);
+
+if (args.length < 1) {
+ console.log("usage ui-scripts publish ");
+ process.exit(1);
+}
+
+const version = args[0];
+const index = version.indexOf("-SNAPSHOT");
+if (index > 0) {
+ const snapshotVersion = `${version.substring(0, index)}-${versions.createSnapshotVersion()}`;
+ console.log(`publish snapshot release ${snapshotVersion}`);
+ yarn.version(snapshotVersion);
+ yarn.publish(snapshotVersion);
+ yarn.version(version);
+} else {
+ // ?? not sure
+ yarn.publish(version);
+}
diff --git a/scm-ui/ui-scripts/src/createPluginConfig.js b/scm-ui/ui-scripts/src/createPluginConfig.js
index f82c6f55eb..61ab0e1cf8 100644
--- a/scm-ui/ui-scripts/src/createPluginConfig.js
+++ b/scm-ui/ui-scripts/src/createPluginConfig.js
@@ -29,7 +29,7 @@ const root = process.cwd();
const packageJsonPath = path.join(root, "package.json");
const packageJSON = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: "UTF-8" }));
-let name = packageJSON.name;
+let { name } = packageJSON;
const orgaIndex = name.indexOf("/");
if (orgaIndex > 0) {
name = name.substring(orgaIndex + 1);
@@ -62,7 +62,8 @@ module.exports = function(mode) {
"classnames",
"query-string",
"redux",
- "react-redux"
+ "react-redux",
+ /^@scm-manager\/scm-.*-plugin$/i
],
module: {
rules: [
@@ -90,9 +91,9 @@ module.exports = function(mode) {
extensions: [".ts", ".tsx", ".js", ".jsx", ".css", ".scss", ".json"]
},
output: {
- path: path.join(root, "target", name + "-" + packageJSON.version, "webapp", "assets"),
+ path: path.join(root, "target", `${name}-${packageJSON.version}`, "webapp", "assets"),
filename: "[name].bundle.js",
- chunkFilename: name + ".[name].chunk.js",
+ chunkFilename: `${name}.[name].chunk.js`,
library: name,
libraryTarget: "amd"
}
diff --git a/scm-ui/ui-scripts/src/lerna.js b/scm-ui/ui-scripts/src/lerna.js
index 3b9af49e3a..dac170f07f 100644
--- a/scm-ui/ui-scripts/src/lerna.js
+++ b/scm-ui/ui-scripts/src/lerna.js
@@ -21,21 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-const { spawnSync } = require("child_process");
-const os = require("os");
-
-const yarnCmd = os.platform() === "win32" ? "yarn.cmd" : "yarn";
-
-const yarn = args => {
- const result = spawnSync(yarnCmd, args, { stdio: "inherit" });
- if (result.error) {
- console.log("could not start yarn command:", result.error);
- process.exit(2);
- } else if (result.status !== 0) {
- console.log("yarn process ends with status code:", result.status);
- process.exit(3);
- }
-};
+const { yarn } = require("./yarn");
const version = v => {
yarn(["run", "lerna", "--no-git-tag-version", "--no-push", "version", "--force-publish", "--yes", v]);
diff --git a/scm-ui/ui-scripts/src/yarn.js b/scm-ui/ui-scripts/src/yarn.js
new file mode 100644
index 0000000000..2ff27b0c5f
--- /dev/null
+++ b/scm-ui/ui-scripts/src/yarn.js
@@ -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.
+ */
+const { spawnSync } = require("child_process");
+const os = require("os");
+
+const yarnCmd = os.platform() === "win32" ? "yarn.cmd" : "yarn";
+
+const yarn = args => {
+ const result = spawnSync(yarnCmd, args, { stdio: "inherit" });
+ if (result.error) {
+ console.log("could not start yarn command:", result.error);
+ process.exit(2);
+ } else if (result.status !== 0) {
+ console.log("yarn process ends with status code:", result.status);
+ process.exit(3);
+ }
+};
+
+const version = v => {
+ yarn(["version", "--no-git-tag-version", "--new-version", v]);
+};
+
+const publish = v => {
+ yarn(["publish", "--new-version", v]);
+};
+
+module.exports = {
+ version,
+ publish,
+ yarn
+};
diff --git a/scm-ui/ui-styles/package.json b/scm-ui/ui-styles/package.json
index 4f4b7d8023..0069cefc73 100644
--- a/scm-ui/ui-styles/package.json
+++ b/scm-ui/ui-styles/package.json
@@ -17,6 +17,7 @@
},
"devDependencies": {
"css-loader": "^3.2.0",
+ "prettier": "^2.1.2",
"sass": "^1.26.3",
"sass-loader": "^8.0.0",
"style-loader": "^1.0.0",
diff --git a/scm-ui/ui-webapp/src/containers/loadBundle.ts b/scm-ui/ui-webapp/src/containers/loadBundle.ts
index 8096e70ec4..fcb82d8f01 100644
--- a/scm-ui/ui-webapp/src/containers/loadBundle.ts
+++ b/scm-ui/ui-webapp/src/containers/loadBundle.ts
@@ -74,6 +74,29 @@ SystemJS.config({
}
});
+// We have to patch the resolve methods of SystemJS
+// in order to resolve the correct bundle url for plugins
+
+const resolveModuleUrl = (key: string) => {
+ if (key.startsWith("@scm-manager/scm-") && key.endsWith("-plugin")) {
+ const pluginName = key.replace("@scm-manager/", "");
+ return urls.withContextPath(`/assets/${pluginName}.bundle.js`);
+ }
+ return key;
+};
+
+const defaultResolve = SystemJS.resolve;
+SystemJS.resolve = function(key, parentName) {
+ const module = resolveModuleUrl(key);
+ return defaultResolve.apply(this, [module, parentName]);
+};
+
+const defaultResolveSync = SystemJS.resolveSync;
+SystemJS.resolveSync = function(key, parentName) {
+ const module = resolveModuleUrl(key);
+ return defaultResolveSync.apply(this, [module, parentName]);
+};
+
const expose = (name: string, cmp: any, defaultCmp?: any) => {
let mod = cmp;
if (defaultCmp) {
diff --git a/scm-webapp/src/main/java/sonia/scm/security/ApiKeyRealm.java b/scm-webapp/src/main/java/sonia/scm/security/ApiKeyRealm.java
index 672f972dab..a447388d97 100644
--- a/scm-webapp/src/main/java/sonia/scm/security/ApiKeyRealm.java
+++ b/scm-webapp/src/main/java/sonia/scm/security/ApiKeyRealm.java
@@ -24,6 +24,7 @@
package sonia.scm.security;
+import com.google.common.io.BaseEncoding;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.UsernamePasswordToken;
@@ -61,13 +62,14 @@ public class ApiKeyRealm extends AuthenticatingRealm {
}
@Override
+ @SuppressWarnings("java:S4738") // java.util.Base64 has no canDecode method
public boolean supports(AuthenticationToken token) {
if (token instanceof UsernamePasswordToken || token instanceof BearerToken) {
- boolean containsDot = getPassword(token).contains(".");
- if (containsDot) {
- LOG.debug("Ignoring token with at least one dot ('.'); this is probably a JWT token");
+ boolean isBase64 = BaseEncoding.base64().canDecode(getPassword(token));
+ if (!isBase64) {
+ LOG.debug("Ignoring non base 64 token; this is probably a JWT token or a normal password");
}
- return !containsDot;
+ return isBase64;
}
return false;
}
diff --git a/scm-webapp/src/main/java/sonia/scm/security/ApiKeyTokenHandler.java b/scm-webapp/src/main/java/sonia/scm/security/ApiKeyTokenHandler.java
index 34ee392060..de38346aec 100644
--- a/scm-webapp/src/main/java/sonia/scm/security/ApiKeyTokenHandler.java
+++ b/scm-webapp/src/main/java/sonia/scm/security/ApiKeyTokenHandler.java
@@ -63,7 +63,10 @@ class ApiKeyTokenHandler {
try {
return of(OBJECT_MAPPER.readValue(decoder.decode(token), Token.class));
} catch (IOException | DecodingException e) {
- LOG.warn("error reading api token", e);
+ LOG.debug("failed to read api token, perhaps it is a jwt token or a normal password");
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("failed to parse token", e);
+ }
return empty();
}
}
diff --git a/scm-webapp/src/test/java/sonia/scm/plugin/PluginInstallationVerifierTest.java b/scm-webapp/src/test/java/sonia/scm/plugin/PluginInstallationVerifierTest.java
index 37597c806f..791f874235 100644
--- a/scm-webapp/src/test/java/sonia/scm/plugin/PluginInstallationVerifierTest.java
+++ b/scm-webapp/src/test/java/sonia/scm/plugin/PluginInstallationVerifierTest.java
@@ -144,6 +144,17 @@ class PluginInstallationVerifierTest {
PluginInstallationVerifier.verify(context, descriptor);
}
+ @Test
+ @SuppressWarnings("squid:S2699") // we are happy if no exception is thrown
+ void shouldVerifyPluginWithSnapshotDependencies() {
+ matchConditions();
+
+ PluginInstallationContext context = mockInstallationOf(IID_PLUGIN, "1.0.0-SNAPSHOT");
+ mockDependingOf(IID_PLUGIN, "1.0.0-20201022.094711-15");
+
+ PluginInstallationVerifier.verify(context, descriptor);
+ }
+
@Test
@SuppressWarnings("squid:S2699") // we are happy if no exception is thrown
void shouldVerifyPluginWithOptionalDependency() {
diff --git a/scm-webapp/src/test/java/sonia/scm/security/ApiKeyRealmTest.java b/scm-webapp/src/test/java/sonia/scm/security/ApiKeyRealmTest.java
index 0f4171b8d9..f53e845bf2 100644
--- a/scm-webapp/src/test/java/sonia/scm/security/ApiKeyRealmTest.java
+++ b/scm-webapp/src/test/java/sonia/scm/security/ApiKeyRealmTest.java
@@ -25,6 +25,7 @@
package sonia.scm.security;
import org.apache.shiro.authc.AuthenticationToken;
+import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.authz.AuthorizationException;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -105,6 +106,15 @@ class ApiKeyRealmTest {
assertThat(supports).isFalse();
}
+ @Test
+ void shouldIgnoreNonBase64Tokens() {
+ UsernamePasswordToken token = new UsernamePasswordToken("trillian", "My&SecretPassword");
+
+ boolean supports = realm.supports(token);
+
+ assertThat(supports).isFalse();
+ }
+
void verifyScopeSet(String... permissions) {
verify(authenticationInfoBuilder).withScope(argThat(scope -> {
assertThat(scope).containsExactly(permissions);
diff --git a/yarn.lock b/yarn.lock
index 7060aa1f76..087b9f224d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3479,6 +3479,11 @@
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
+"@types/css@^0.0.31":
+ version "0.0.31"
+ resolved "https://registry.yarnpkg.com/@types/css/-/css-0.0.31.tgz#235cf80e4991a9d769fd640b4b8644b0a4139895"
+ integrity sha512-Xt3xp8o0zueqrdIkAOO5gy5YNs+jYfmIUPeoeKiwrcmCRXuNWkIgR2Ph6vHuVfi1y6c9Tx214EQBWPEkU97djw==
+
"@types/diff@^4.0.1":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@types/diff/-/diff-4.0.2.tgz#2e9bb89f9acc3ab0108f0f3dc4dbdcf2fff8a99c"
@@ -3529,6 +3534,13 @@
dependencies:
"@types/node" "*"
+"@types/hast@^2.0.0":
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.1.tgz#b16872f2a6144c7025f296fb9636a667ebb79cd9"
+ integrity sha512-viwwrB+6xGzw+G1eWpF9geV3fnsDgXqHG+cqgiHrvQfDUW5hzhCyV7Sy3UJxhfRFBsgky2SSW33qi/YrIkjX5Q==
+ dependencies:
+ "@types/unist" "*"
+
"@types/history@*", "@types/history@^4.7.3":
version "4.7.8"
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.8.tgz#49348387983075705fe8f4e02fb67f7daaec4934"
@@ -3710,6 +3722,11 @@
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.1.1.tgz#be148756d5480a84cde100324c03a86ae5739fb5"
integrity sha512-2zs+O+UkDsJ1Vcp667pd3f8xearMdopz/z54i99wtRDI5KLmngk7vlrYZD0ZjKHaROR03EznlBbVY9PfAEyJIQ==
+"@types/prismjs@*":
+ version "1.16.1"
+ resolved "https://registry.yarnpkg.com/@types/prismjs/-/prismjs-1.16.1.tgz#50b82947207847db6abcbcd14caa89e3b897c259"
+ integrity sha512-RNgcK3FEc1GpeOkamGDq42EYkb6yZW5OWQwTS56NJIB8WL0QGISQglA7En7NUx9RGP8AC52DOe+squqbAckXlA==
+
"@types/prop-types@*":
version "15.7.3"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7"
@@ -3844,6 +3861,13 @@
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==
+ dependencies:
+ "@types/prismjs" "*"
+
"@types/sinonjs__fake-timers@^6.0.1":
version "6.0.2"
resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.2.tgz#3a84cf5ec3249439015e14049bd3161419bf9eae"
@@ -3891,6 +3915,11 @@
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.6.tgz#a9ca4b70a18b270ccb2bc0aaafefd1d486b7ea74"
integrity sha512-W+bw9ds02rAQaMvaLYxAbJ6cvguW/iJXNT6lTssS1ps6QdrMKttqEAMEG/b5CR8TZl3/L7/lH0ZV5nNR1LXikA==
+"@types/to-camel-case@^1.0.0":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@types/to-camel-case/-/to-camel-case-1.0.0.tgz#927ef0a7294d90b1835466c29b64b8ad2a32d8b5"
+ integrity sha512-LXJOP0xvOUB4dKu+t7EVhSsM2NauLSZSOGkBS7Wqz3lWHIseCJnMDG+HrZHLFZQ39Fq3jr4RErJyQzfsoOlXSA==
+
"@types/uglify-js@*":
version "3.11.0"
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.11.0.tgz#2868d405cc45cd9dc3069179052103032c33afbc"
@@ -3898,6 +3927,11 @@
dependencies:
source-map "^0.6.1"
+"@types/unist@*":
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.3.tgz#9c088679876f374eb5983f150d4787aa6fb32d7e"
+ integrity sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==
+
"@types/webpack-env@^1.15.0", "@types/webpack-env@^1.15.2":
version "1.15.3"
resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.15.3.tgz#fb602cd4c2f0b7c0fb857e922075fdf677d25d84"
@@ -4741,11 +4775,6 @@ 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"
@@ -6709,6 +6738,15 @@ css-what@^3.2.1:
resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.3.0.tgz#10fec696a9ece2e591ac772d759aacabac38cd39"
integrity sha512-pv9JPyatiPaQ6pf4OvD/dbfm0o5LviWmwxNWzblYf/1u9QZd0ihV+PMwy5jdQWQ3349kZmKEx9WXuSka2dM4cg==
+css@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/css/-/css-3.0.0.tgz#4447a4d58fdd03367c516ca9f64ae365cee4aa5d"
+ integrity sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==
+ dependencies:
+ inherits "^2.0.4"
+ source-map "^0.6.1"
+ source-map-resolve "^0.6.0"
+
cssesc@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
@@ -8329,7 +8367,7 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6:
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
-fault@^1.0.0:
+fault@^1.0.0, fault@^1.0.2:
version "1.0.4"
resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.4.tgz#eafcfc0a6d214fc94601e170df29954a4f842f13"
integrity sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==
@@ -8956,9 +8994,10 @@ gitconfiglocal@^1.0.0:
dependencies:
ini "^1.3.2"
-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"
+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==
glob-base@^0.3.0:
version "0.3.0"
@@ -9289,6 +9328,17 @@ hastscript@^5.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"
+ integrity sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==
+ dependencies:
+ "@types/hast" "^2.0.0"
+ comma-separated-tokens "^1.0.0"
+ hast-util-parse-selector "^2.0.0"
+ property-information "^5.0.0"
+ space-separated-tokens "^1.0.0"
+
he@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
@@ -9299,12 +9349,17 @@ hex-color-regex@^1.1.0:
resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e"
integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==
+highlight.js@^10.1.1, highlight.js@~10.3.0:
+ version "10.3.1"
+ resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.3.1.tgz#3ca6bf007377faae347e8135ff25900aac734b9a"
+ integrity sha512-jeW8rdPdhshYKObedYg5XGbpVgb1/DT4AHvDFXhkU7UnGSIjy9kkJ7zHG7qplhFHMitTSzh5/iClKQk3Kb2RFQ==
+
highlight.js@~9.13.0:
version "9.13.1"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.13.1.tgz#054586d53a6863311168488a0f58d6c505ce641e"
integrity sha512-Sc28JNQNDzaH6PORtRLMvif9RSn1mYuOoX3omVjnb0+HbpPygU2ALBI0R/wsiqCb4/fcp07Gdo8g+fhtFrQl6A==
-highlight.js@~9.15.1:
+highlight.js@~9.15.0, highlight.js@~9.15.1:
version "9.15.10"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.10.tgz#7b18ed75c90348c045eef9ed08ca1319a2219ad2"
integrity sha512-RoV7OkQm0T3os3Dd2VHLNMoaoDVx77Wygln3n9l5YV172XonWG6rgQD3XnF/BuFFZw9A0TJgmMSO8FEWQgvcXw==
@@ -12006,7 +12061,15 @@ lower-case@^2.0.1:
dependencies:
tslib "^1.10.0"
-lowlight@1.12.1, lowlight@1.13.1, lowlight@^1.13.0, lowlight@~1.11.0:
+lowlight@1.12.1:
+ version "1.12.1"
+ resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.12.1.tgz#014acf8dd73a370e02ff1cc61debcde3bb1681eb"
+ integrity sha512-OqaVxMGIESnawn+TU/QMV5BJLbUghUfjDWPAtFqDYDmDtr4FnB+op8xM+pR7nKlauHNUHXGt0VgWatFB8voS5w==
+ dependencies:
+ fault "^1.0.2"
+ highlight.js "~9.15.0"
+
+lowlight@^1.13.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.13.1.tgz#c4f0e03906ebd23fedf2d258f6ab2f6324cf90eb"
integrity sha512-kQ71/T6RksEVz9AlPq07/2m+SU/1kGvt9k39UtvHX760u4SaWakaYH7hYgH5n6sTsCWk4MVYzUzLU59aN5CSmQ==
@@ -12014,6 +12077,22 @@ lowlight@1.12.1, lowlight@1.13.1, lowlight@^1.13.0, lowlight@~1.11.0:
fault "^1.0.0"
highlight.js "~9.16.0"
+lowlight@^1.14.0:
+ version "1.16.0"
+ resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.16.0.tgz#9d904370d0b20bca0893d73559cf27428fecbf7e"
+ integrity sha512-ECLdzIJvBEjK4ef51sWiGZyz21yx4IEPaF/62DRxLehoOHkWqN3OsLB1GUMfc6Mcf87rR5eW7z6lI9cNEXZDsQ==
+ dependencies:
+ fault "^1.0.0"
+ highlight.js "~10.3.0"
+
+lowlight@~1.11.0:
+ version "1.11.0"
+ resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.11.0.tgz#1304d83005126d4e8b1dc0f07981e9b689ec2efc"
+ integrity sha512-xrGGN6XLL7MbTMdPD6NfWPwY43SNkjf/d0mecSx/CW36fUZTjRHEq0/Cdug3TWKtRXLWi7iMl1eP0olYxj/a4A==
+ dependencies:
+ fault "^1.0.2"
+ highlight.js "~9.13.0"
+
lru-cache@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
@@ -13378,6 +13457,18 @@ parse-entities@^1.1.0, parse-entities@^1.1.2:
is-decimal "^1.0.0"
is-hexadecimal "^1.0.0"
+parse-entities@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8"
+ integrity sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==
+ dependencies:
+ character-entities "^1.0.0"
+ character-entities-legacy "^1.0.0"
+ character-reference-invalid "^1.0.0"
+ is-alphanumerical "^1.0.0"
+ is-decimal "^1.0.0"
+ is-hexadecimal "^1.0.0"
+
parse-github-repo-url@^1.3.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50"
@@ -14085,6 +14176,11 @@ prettier@^1.19.1:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
+prettier@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5"
+ integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==
+
pretty-bytes@^5.3.0:
version "5.4.1"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.4.1.tgz#cd89f79bbcef21e3d21eb0da68ffe93f803e884b"
@@ -14133,10 +14229,15 @@ pretty-hrtime@^1.0.3:
resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=
-prismjs@^1.16.0, prismjs@^1.8.4:
- version "1.21.0"
- resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.21.0.tgz#36c086ec36b45319ec4218ee164c110f9fc015a3"
- integrity sha512-uGdSIu1nk3kej2iZsLyDoJ7e9bnPzIgY0naW/HdknGj61zScaprVEVGHrPoXqI+M9sP0NDnTK2jpkvmldpuqDw==
+prism-themes@^1.4.0:
+ version "1.4.1"
+ 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:
+ 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"
@@ -14801,15 +14902,16 @@ react-syntax-highlighter@^12.2.1:
prismjs "^1.8.4"
refractor "^2.4.1"
-"react-syntax-highlighter@https://github.com/conorhastings/react-syntax-highlighter#08bcf49b1aa7877ce94f7208e73dfa6bef8b26e7":
- version "12.0.2"
- resolved "https://github.com/conorhastings/react-syntax-highlighter#08bcf49b1aa7877ce94f7208e73dfa6bef8b26e7"
+react-syntax-highlighter@^15.2.1:
+ version "15.2.1"
+ resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-15.2.1.tgz#63a42be96a645407a394cd7b93b99622f3ea179f"
+ integrity sha512-xrSfqX5Rztf9x4Fa6W+DbbKaJmi5zvh+tAvG2MnktZPDLeX/iMkumwxJdGYn5M1jM3d4+EJTloVAB8UvD7O0nA==
dependencies:
"@babel/runtime" "^7.3.1"
- highlight.js "~9.13.0"
- lowlight "~1.11.0"
- prismjs "^1.16.0"
- refractor "^2.10.1"
+ highlight.js "^10.1.1"
+ lowlight "^1.14.0"
+ prismjs "^1.21.0"
+ refractor "^3.1.0"
react-test-renderer@^16.0.0-0, react-test-renderer@^16.10.2:
version "16.13.1"
@@ -15125,7 +15227,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.10.1, refractor@^2.4.1:
+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==
@@ -15134,6 +15236,15 @@ refractor@^2.10.1, refractor@^2.4.1:
parse-entities "^1.1.2"
prismjs "~1.17.0"
+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==
+ dependencies:
+ hastscript "^6.0.0"
+ parse-entities "^2.0.0"
+ prismjs "~1.22.0"
+
regenerate-unicode-properties@^8.2.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec"
@@ -16034,6 +16145,14 @@ source-map-resolve@^0.5.0:
source-map-url "^0.4.0"
urix "^0.1.0"
+source-map-resolve@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.6.0.tgz#3d9df87e236b53f16d01e58150fc7711138e5ed2"
+ integrity sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==
+ dependencies:
+ atob "^2.1.2"
+ decode-uri-component "^0.2.0"
+
source-map-support@^0.5.16, source-map-support@^0.5.6, source-map-support@~0.5.12:
version "0.5.19"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
@@ -16919,11 +17038,23 @@ to-arraybuffer@^1.0.0:
resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=
+to-camel-case@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/to-camel-case/-/to-camel-case-1.0.0.tgz#1a56054b2f9d696298ce66a60897322b6f423e46"
+ integrity sha1-GlYFSy+daWKYzmamCJcyK29CPkY=
+ dependencies:
+ to-space-case "^1.0.0"
+
to-fast-properties@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
+to-no-case@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/to-no-case/-/to-no-case-1.0.2.tgz#c722907164ef6b178132c8e69930212d1b4aa16a"
+ integrity sha1-xyKQcWTvaxeBMsjmmTAhLRtKoWo=
+
to-object-path@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
@@ -16956,6 +17087,13 @@ to-regex@^3.0.1, to-regex@^3.0.2:
regex-not "^1.0.2"
safe-regex "^1.1.0"
+to-space-case@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/to-space-case/-/to-space-case-1.0.0.tgz#b052daafb1b2b29dc770cea0163e5ec0ebc9fc17"
+ integrity sha1-sFLar7Gysp3HcM6gFj5ewOvJ/Bc=
+ dependencies:
+ to-no-case "^1.0.0"
+
toggle-selection@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32"