Compare commits
2 Commits
jsxapicomp
...
gallery
Author | SHA1 | Date | |
---|---|---|---|
ec0e76d041 | |||
f480df1e1b |
@ -1,48 +0,0 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
gws "github.com/gowebsecure/goWebSecure-go"
|
||||
"github.com/gowebsecure/goWebSecure-go/oauth"
|
||||
"openmediacenter/apiGo/database/settings"
|
||||
)
|
||||
|
||||
const (
|
||||
VideoNode = iota
|
||||
TagNode = iota
|
||||
SettingsNode = iota
|
||||
ActorNode = iota
|
||||
TVShowNode = iota
|
||||
)
|
||||
|
||||
func Init() {
|
||||
AddVideoHandlers()
|
||||
AddSettingsHandlers()
|
||||
AddTagHandlers()
|
||||
AddActorsHandlers()
|
||||
AddTvshowHandlers()
|
||||
|
||||
gws.AddAPINode("video", VideoNode, true)
|
||||
gws.AddAPINode("tags", TagNode, true)
|
||||
gws.AddAPINode("settings", SettingsNode, true)
|
||||
gws.AddAPINode("actor", ActorNode, true)
|
||||
gws.AddAPINode("tvshow", TVShowNode, true)
|
||||
|
||||
// serverinit is blocking
|
||||
gws.ServerInit(func(id string) (oauth.CustomClientInfo, error) {
|
||||
password := settings.GetPassword()
|
||||
// if password not set assign default password
|
||||
if password == nil {
|
||||
defaultpassword := "openmediacenter"
|
||||
password = &defaultpassword
|
||||
}
|
||||
|
||||
clientinfo := oauth.CustomClientInfo{
|
||||
ID: "openmediacenter",
|
||||
Secret: *password,
|
||||
Domain: "http://localhost:8081",
|
||||
UserID: "openmediacenter",
|
||||
}
|
||||
|
||||
return clientinfo, nil
|
||||
}, 8080)
|
||||
}
|
@ -2,7 +2,6 @@ package api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
gws "github.com/gowebsecure/goWebSecure-go"
|
||||
"openmediacenter/apiGo/api/types"
|
||||
"openmediacenter/apiGo/database"
|
||||
)
|
||||
@ -24,7 +23,7 @@ func getActorsFromDB() {
|
||||
* @apiSuccess {string} .Name Actor Name
|
||||
* @apiSuccess {string} .Thumbnail Portrait Thumbnail
|
||||
*/
|
||||
gws.AddHandler("getAllActors", ActorNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("getAllActors", ActorNode, func(info *HandlerInfo) []byte {
|
||||
query := "SELECT actor_id, name, thumbnail FROM actors"
|
||||
return jsonify(readActorsFromResultset(database.Query(query)))
|
||||
})
|
||||
@ -42,7 +41,7 @@ func getActorsFromDB() {
|
||||
* @apiSuccess {string} .Name Actor Name
|
||||
* @apiSuccess {string} .Thumbnail Portrait Thumbnail
|
||||
*/
|
||||
gws.AddHandler("getActorsOfVideo", ActorNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("getActorsOfVideo", ActorNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
MovieId int
|
||||
}
|
||||
@ -75,7 +74,7 @@ func getActorsFromDB() {
|
||||
* @apiSuccess {string} Info.Name Actor Name
|
||||
* @apiSuccess {string} Info.Thumbnail Actor Thumbnail
|
||||
*/
|
||||
gws.AddHandler("getActorInfo", ActorNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("getActorInfo", ActorNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
ActorId int
|
||||
}
|
||||
@ -115,7 +114,7 @@ func saveActorsToDB() {
|
||||
*
|
||||
* @apiSuccess {string} result 'success' if successfully or error message if not
|
||||
*/
|
||||
gws.AddHandler("createActor", ActorNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("createActor", ActorNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
ActorName string
|
||||
}
|
||||
@ -139,7 +138,7 @@ func saveActorsToDB() {
|
||||
*
|
||||
* @apiSuccess {string} result 'success' if successfully or error message if not
|
||||
*/
|
||||
gws.AddHandler("addActorToVideo", ActorNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("addActorToVideo", ActorNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
ActorId int
|
||||
MovieId int
|
||||
|
121
apiGo/api/ApiBase.go
Normal file
121
apiGo/api/ApiBase.go
Normal file
@ -0,0 +1,121 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"gopkg.in/oauth2.v3"
|
||||
"net/http"
|
||||
"openmediacenter/apiGo/api/oauth"
|
||||
"openmediacenter/apiGo/database/settings"
|
||||
)
|
||||
|
||||
const APIPREFIX = "/api"
|
||||
|
||||
const (
|
||||
VideoNode = iota
|
||||
TagNode = iota
|
||||
SettingsNode = iota
|
||||
ActorNode = iota
|
||||
TVShowNode = iota
|
||||
PhotoNode = iota
|
||||
)
|
||||
|
||||
type HandlerInfo struct {
|
||||
ID string
|
||||
Token string
|
||||
Data map[string]interface{}
|
||||
}
|
||||
|
||||
type actionStruct struct {
|
||||
Action string
|
||||
}
|
||||
|
||||
type Handler struct {
|
||||
action string
|
||||
handler func(info *HandlerInfo) []byte
|
||||
apiNode int
|
||||
}
|
||||
|
||||
var handlers = make(map[string]Handler)
|
||||
|
||||
func AddHandler(action string, apiNode int, h func(info *HandlerInfo) []byte) {
|
||||
// append new handler to the handlers
|
||||
handlers[fmt.Sprintf("%s/%d", action, apiNode)] = Handler{action, h, apiNode}
|
||||
}
|
||||
|
||||
func ServerInit() {
|
||||
http.Handle(APIPREFIX+"/video", oauth.ValidateToken(handlefunc, VideoNode))
|
||||
http.Handle(APIPREFIX+"/tags", oauth.ValidateToken(handlefunc, TagNode))
|
||||
http.Handle(APIPREFIX+"/settings", oauth.ValidateToken(handlefunc, SettingsNode))
|
||||
http.Handle(APIPREFIX+"/actor", oauth.ValidateToken(handlefunc, ActorNode))
|
||||
|
||||
// add tvshow endpoint only if tvshows enabled
|
||||
if settings.TVShowsEnabled() {
|
||||
http.Handle(APIPREFIX+"/tvshow", oauth.ValidateToken(handlefunc, TVShowNode))
|
||||
}
|
||||
|
||||
http.Handle(APIPREFIX+"/photos", oauth.ValidateToken(handlefunc, PhotoNode))
|
||||
|
||||
// initialize oauth service and add corresponding auth routes
|
||||
oauth.InitOAuth()
|
||||
}
|
||||
|
||||
func handleAPICall(action string, requestBody string, apiNode int, info *HandlerInfo) []byte {
|
||||
handler, ok := handlers[fmt.Sprintf("%s/%d", action, apiNode)]
|
||||
if !ok {
|
||||
// handler doesn't exist!
|
||||
fmt.Printf("no handler found for Action: %d/%s\n", apiNode, action)
|
||||
return nil
|
||||
}
|
||||
|
||||
// check if info even exists
|
||||
if info == nil {
|
||||
info = &HandlerInfo{}
|
||||
}
|
||||
|
||||
// parse the arguments
|
||||
var args map[string]interface{}
|
||||
err := json.Unmarshal([]byte(requestBody), &args)
|
||||
|
||||
if err != nil {
|
||||
fmt.Printf("failed to decode arguments of action %s :: %s\n", action, requestBody)
|
||||
} else {
|
||||
// check if map has an action
|
||||
if _, ok := args["action"]; ok {
|
||||
delete(args, "action")
|
||||
}
|
||||
|
||||
info.Data = args
|
||||
}
|
||||
|
||||
// call the handler
|
||||
return handler.handler(info)
|
||||
}
|
||||
|
||||
func handlefunc(rw http.ResponseWriter, req *http.Request, node int, tokenInfo *oauth2.TokenInfo) {
|
||||
// only allow post requests
|
||||
if req.Method != "POST" {
|
||||
return
|
||||
}
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
buf.ReadFrom(req.Body)
|
||||
body := buf.String()
|
||||
|
||||
var t actionStruct
|
||||
err := json.Unmarshal([]byte(body), &t)
|
||||
if err != nil {
|
||||
fmt.Println("failed to read action from request! :: " + body)
|
||||
}
|
||||
|
||||
// load userid from received token object
|
||||
id := (*tokenInfo).GetClientID()
|
||||
|
||||
userinfo := &HandlerInfo{
|
||||
ID: id,
|
||||
Token: (*tokenInfo).GetCode(),
|
||||
}
|
||||
|
||||
rw.Write(handleAPICall(t.Action, body, node, userinfo))
|
||||
}
|
72
apiGo/api/ApiBase_test.go
Normal file
72
apiGo/api/ApiBase_test.go
Normal file
@ -0,0 +1,72 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func cleanUp() {
|
||||
handlers = make(map[string]Handler)
|
||||
}
|
||||
|
||||
func TestAddHandler(t *testing.T) {
|
||||
cleanUp()
|
||||
|
||||
AddHandler("test", ActorNode, func(info *HandlerInfo) []byte {
|
||||
return nil
|
||||
})
|
||||
if len(handlers) != 1 {
|
||||
t.Errorf("Handler insertion failed, got: %d handlers, want: %d.", len(handlers), 1)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCallOfHandler(t *testing.T) {
|
||||
cleanUp()
|
||||
|
||||
i := 0
|
||||
AddHandler("test", ActorNode, func(info *HandlerInfo) []byte {
|
||||
i++
|
||||
return nil
|
||||
})
|
||||
|
||||
// simulate the call of the api
|
||||
handleAPICall("test", "", ActorNode, nil)
|
||||
|
||||
if i != 1 {
|
||||
t.Errorf("Unexpected number of Lambda calls : %d/1", i)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDecodingOfArguments(t *testing.T) {
|
||||
cleanUp()
|
||||
|
||||
AddHandler("test", ActorNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
Test string
|
||||
TestInt int
|
||||
}
|
||||
err := FillStruct(&args, info.Data)
|
||||
if err != nil {
|
||||
t.Errorf("Error parsing args: %s", err.Error())
|
||||
return nil
|
||||
}
|
||||
|
||||
if args.TestInt != 42 || args.Test != "myString" {
|
||||
t.Errorf("Wrong parsing of argument parameters : %d/42 - %s/myString", args.TestInt, args.Test)
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
// simulate the call of the api
|
||||
handleAPICall("test", `{"Test":"myString","TestInt":42}`, ActorNode, nil)
|
||||
}
|
||||
|
||||
func TestNoHandlerCovers(t *testing.T) {
|
||||
cleanUp()
|
||||
|
||||
ret := handleAPICall("test", "", ActorNode, nil)
|
||||
|
||||
if ret != nil {
|
||||
t.Error("Expect nil return within unhandled api action")
|
||||
}
|
||||
}
|
15
apiGo/api/Photos.go
Normal file
15
apiGo/api/Photos.go
Normal file
@ -0,0 +1,15 @@
|
||||
package api
|
||||
|
||||
func AddPhotoHandlers() {
|
||||
/**
|
||||
* @api {post} /api/photos [getPhotos]
|
||||
* @apiDescription get all available pictures
|
||||
* @apiName getPhotos
|
||||
* @apiGroup Photos
|
||||
*
|
||||
* @apiSuccess {string} result 'success' if successfully or error message if not
|
||||
*/
|
||||
AddHandler("getPhotos", PhotoNode, func(info *HandlerInfo) []byte {
|
||||
return nil
|
||||
})
|
||||
}
|
@ -3,7 +3,6 @@ package api
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
gws "github.com/gowebsecure/goWebSecure-go"
|
||||
"openmediacenter/apiGo/api/types"
|
||||
"openmediacenter/apiGo/database"
|
||||
"openmediacenter/apiGo/database/settings"
|
||||
@ -38,7 +37,7 @@ func getSettingsFromDB() {
|
||||
* @apiSuccess {uint32} Sizes.DifferentTags number of different tags available
|
||||
* @apiSuccess {uint32} Sizes.TagsAdded number of different tags added to videos
|
||||
*/
|
||||
gws.AddHandler("loadGeneralSettings", SettingsNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("loadGeneralSettings", SettingsNode, func(info *HandlerInfo) []byte {
|
||||
result, _, sizes := database.GetSettings()
|
||||
|
||||
var ret = struct {
|
||||
@ -64,7 +63,7 @@ func getSettingsFromDB() {
|
||||
* @apiSuccess {bool} DarkMode Darkmode enabled?
|
||||
* @apiSuccess {bool} TVShowEnabled is are TVShows enabled
|
||||
*/
|
||||
gws.AddHandler("loadInitialData", SettingsNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("loadInitialData", SettingsNode, func(info *HandlerInfo) []byte {
|
||||
sett := settings.LoadSettings()
|
||||
|
||||
type InitialDataTypeResponse struct {
|
||||
@ -112,7 +111,7 @@ func saveSettingsToDB() {
|
||||
*
|
||||
* @apiSuccess {string} result 'success' if successfully or error message if not
|
||||
*/
|
||||
gws.AddHandler("saveGeneralSettings", SettingsNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("saveGeneralSettings", SettingsNode, func(info *HandlerInfo) []byte {
|
||||
var args types.SettingsType
|
||||
if err := FillStruct(&args, info.Data); err != nil {
|
||||
fmt.Println(err.Error())
|
||||
@ -144,7 +143,7 @@ func reIndexHandling() {
|
||||
*
|
||||
* @apiSuccess {string} result 'success' if successfully or error message if not
|
||||
*/
|
||||
gws.AddHandler("startReindex", SettingsNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("startReindex", SettingsNode, func(info *HandlerInfo) []byte {
|
||||
videoparser.StartReindex()
|
||||
return database.ManualSuccessResponse(nil)
|
||||
})
|
||||
@ -157,7 +156,7 @@ func reIndexHandling() {
|
||||
*
|
||||
* @apiSuccess {string} result 'success' if successfully or error message if not
|
||||
*/
|
||||
gws.AddHandler("startTVShowReindex", SettingsNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("startTVShowReindex", SettingsNode, func(info *HandlerInfo) []byte {
|
||||
videoparser.StartTVShowReindex()
|
||||
return database.ManualSuccessResponse(nil)
|
||||
})
|
||||
@ -168,7 +167,7 @@ func reIndexHandling() {
|
||||
* @apiName cleanupGravity
|
||||
* @apiGroup Settings
|
||||
*/
|
||||
gws.AddHandler("cleanupGravity", SettingsNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("cleanupGravity", SettingsNode, func(info *HandlerInfo) []byte {
|
||||
videoparser.StartCleanup()
|
||||
return nil
|
||||
})
|
||||
|
@ -2,7 +2,6 @@ package api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
gws "github.com/gowebsecure/goWebSecure-go"
|
||||
"openmediacenter/apiGo/database"
|
||||
"openmediacenter/apiGo/database/settings"
|
||||
)
|
||||
@ -23,7 +22,7 @@ func AddTvshowHandlers() {
|
||||
* @apiSuccess {uint32} .Id tvshow id
|
||||
* @apiSuccess {string} .Name tvshow name
|
||||
*/
|
||||
gws.AddHandler("getTVShows", TVShowNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("getTVShows", TVShowNode, func(info *HandlerInfo) []byte {
|
||||
query := "SELECT id, name FROM tvshow"
|
||||
rows := database.Query(query)
|
||||
return jsonify(readTVshowsFromResultset(rows))
|
||||
@ -43,7 +42,7 @@ func AddTvshowHandlers() {
|
||||
* @apiSuccess {uint8} .Season Season number
|
||||
* @apiSuccess {uint8} .Episode Episode number
|
||||
*/
|
||||
gws.AddHandler("getEpisodes", TVShowNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("getEpisodes", TVShowNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
ShowID uint32
|
||||
}
|
||||
@ -91,7 +90,7 @@ func AddTvshowHandlers() {
|
||||
* @apiSuccess {uint8} Episode Episode number
|
||||
* @apiSuccess {string} Path webserver path of video file
|
||||
*/
|
||||
gws.AddHandler("loadEpisode", TVShowNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("loadEpisode", TVShowNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
ID uint32
|
||||
}
|
||||
@ -138,7 +137,7 @@ WHERE tvshow_episodes.id=%d`, args.ID)
|
||||
*
|
||||
* @apiSuccess {string} . Base64 encoded Thubnail
|
||||
*/
|
||||
gws.AddHandler("readThumbnail", TVShowNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("readThumbnail", TVShowNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
Id int
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
gws "github.com/gowebsecure/goWebSecure-go"
|
||||
"openmediacenter/apiGo/database"
|
||||
"regexp"
|
||||
)
|
||||
@ -25,7 +24,7 @@ func deleteFromDB() {
|
||||
*
|
||||
* @apiSuccess {string} result 'success' if successfully or error message if not
|
||||
*/
|
||||
gws.AddHandler("deleteTag", TagNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("deleteTag", TagNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
TagId int
|
||||
Force bool
|
||||
@ -75,7 +74,7 @@ func getFromDB() {
|
||||
* @apiSuccess {uint32} TagId
|
||||
* @apiSuccess {string} TagName name of the Tag
|
||||
*/
|
||||
gws.AddHandler("getAllTags", TagNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("getAllTags", TagNode, func(info *HandlerInfo) []byte {
|
||||
query := "SELECT tag_id,tag_name from tags"
|
||||
return jsonify(readTagsFromResultset(database.Query(query)))
|
||||
})
|
||||
@ -92,7 +91,7 @@ func addToDB() {
|
||||
*
|
||||
* @apiSuccess {string} result 'success' if successfully or error message if not
|
||||
*/
|
||||
gws.AddHandler("createTag", TagNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("createTag", TagNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
TagName string
|
||||
}
|
||||
@ -116,7 +115,7 @@ func addToDB() {
|
||||
*
|
||||
* @apiSuccess {string} result 'success' if successfully or error message if not
|
||||
*/
|
||||
gws.AddHandler("addTag", TagNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("addTag", TagNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
MovieId int
|
||||
TagId int
|
||||
|
@ -3,7 +3,6 @@ package api
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
gws "github.com/gowebsecure/goWebSecure-go"
|
||||
"net/url"
|
||||
"openmediacenter/apiGo/api/types"
|
||||
"openmediacenter/apiGo/database"
|
||||
@ -30,7 +29,7 @@ func getVideoHandlers() {
|
||||
* @apiSuccess {String} Videos.MovieName Name of video
|
||||
* @apiSuccess {String} TagName Name of the Tag returned
|
||||
*/
|
||||
gws.AddHandler("getMovies", VideoNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("getMovies", VideoNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
Tag uint32
|
||||
Sort uint8
|
||||
@ -45,11 +44,9 @@ func getVideoHandlers() {
|
||||
likes = iota
|
||||
random = iota
|
||||
names = iota
|
||||
length = iota
|
||||
)
|
||||
|
||||
// if wrong number passed no sorting is performed
|
||||
var SortClause = ""
|
||||
var SortClause string
|
||||
switch args.Sort {
|
||||
case date:
|
||||
SortClause = "ORDER BY create_date DESC, movie_name"
|
||||
@ -63,9 +60,6 @@ func getVideoHandlers() {
|
||||
case names:
|
||||
SortClause = "ORDER BY movie_name"
|
||||
break
|
||||
case length:
|
||||
SortClause = "ORDER BY length DESC"
|
||||
break
|
||||
}
|
||||
|
||||
var query string
|
||||
@ -121,7 +115,7 @@ func getVideoHandlers() {
|
||||
*
|
||||
* @apiSuccess {string} . Base64 encoded Thubnail
|
||||
*/
|
||||
gws.AddHandler("readThumbnail", VideoNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("readThumbnail", VideoNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
Movieid int
|
||||
}
|
||||
@ -159,7 +153,7 @@ func getVideoHandlers() {
|
||||
* @apiSuccess {string} Videos.MovieName Video Name
|
||||
* @apiSuccess {int} Videos.MovieId Video ID
|
||||
*/
|
||||
gws.AddHandler("getRandomMovies", VideoNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("getRandomMovies", VideoNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
Number int
|
||||
}
|
||||
@ -220,7 +214,7 @@ func getVideoHandlers() {
|
||||
* @apiSuccess {number} .MovieId Id of Video
|
||||
* @apiSuccess {String} .MovieName Name of video
|
||||
*/
|
||||
gws.AddHandler("getSearchKeyWord", VideoNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("getSearchKeyWord", VideoNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
KeyWord string
|
||||
}
|
||||
@ -272,7 +266,7 @@ func loadVideosHandlers() {
|
||||
* @apiSuccess {string} Actors.Name Actor Name
|
||||
* @apiSuccess {string} Actors.Thumbnail Portrait Thumbnail
|
||||
*/
|
||||
gws.AddHandler("loadVideo", VideoNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("loadVideo", VideoNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
MovieId int
|
||||
}
|
||||
@ -348,7 +342,7 @@ func loadVideosHandlers() {
|
||||
* @apiSuccess {uint32} DifferentTags number of different Tags available
|
||||
* @apiSuccess {uint32} Tagged number of different Tags assigned
|
||||
*/
|
||||
gws.AddHandler("getStartData", VideoNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("getStartData", VideoNode, func(info *HandlerInfo) []byte {
|
||||
var result types.StartData
|
||||
// query settings and infotile values
|
||||
query := `
|
||||
@ -399,7 +393,7 @@ func addToVideoHandlers() {
|
||||
*
|
||||
* @apiSuccess {string} result 'success' if successfully or error message if not
|
||||
*/
|
||||
gws.AddHandler("addLike", VideoNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("addLike", VideoNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
MovieId int
|
||||
}
|
||||
@ -422,7 +416,7 @@ func addToVideoHandlers() {
|
||||
*
|
||||
* @apiSuccess {string} result 'success' if successfully or error message if not
|
||||
*/
|
||||
gws.AddHandler("deleteVideo", VideoNode, func(info *gws.HandlerInfo) []byte {
|
||||
AddHandler("deleteVideo", VideoNode, func(info *HandlerInfo) []byte {
|
||||
var args struct {
|
||||
MovieId int
|
||||
}
|
||||
|
57
apiGo/api/oauth/CustomClientStore.go
Normal file
57
apiGo/api/oauth/CustomClientStore.go
Normal file
@ -0,0 +1,57 @@
|
||||
package oauth
|
||||
|
||||
import (
|
||||
"gopkg.in/oauth2.v3"
|
||||
"openmediacenter/apiGo/database/settings"
|
||||
)
|
||||
|
||||
type CustomClientStore struct {
|
||||
oauth2.ClientStore
|
||||
}
|
||||
|
||||
type CustomClientInfo struct {
|
||||
oauth2.ClientInfo
|
||||
ID string
|
||||
Secret string
|
||||
Domain string
|
||||
UserID string
|
||||
}
|
||||
|
||||
func NewCustomStore() oauth2.ClientStore {
|
||||
s := new(CustomClientStore)
|
||||
return s
|
||||
}
|
||||
|
||||
func (a *CustomClientStore) GetByID(id string) (oauth2.ClientInfo, error) {
|
||||
password := settings.GetPassword()
|
||||
// if password not set assign default password
|
||||
if password == nil {
|
||||
defaultpassword := "openmediacenter"
|
||||
password = &defaultpassword
|
||||
}
|
||||
|
||||
clientinfo := CustomClientInfo{
|
||||
ID: "openmediacenter",
|
||||
Secret: *password,
|
||||
Domain: "http://localhost:8081",
|
||||
UserID: "openmediacenter",
|
||||
}
|
||||
|
||||
return &clientinfo, nil
|
||||
}
|
||||
|
||||
func (a *CustomClientInfo) GetID() string {
|
||||
return a.ID
|
||||
}
|
||||
|
||||
func (a *CustomClientInfo) GetSecret() string {
|
||||
return a.Secret
|
||||
}
|
||||
|
||||
func (a *CustomClientInfo) GetDomain() string {
|
||||
return a.Domain
|
||||
}
|
||||
|
||||
func (a *CustomClientInfo) GetUserID() string {
|
||||
return a.UserID
|
||||
}
|
62
apiGo/api/oauth/Oauth.go
Normal file
62
apiGo/api/oauth/Oauth.go
Normal file
@ -0,0 +1,62 @@
|
||||
package oauth
|
||||
|
||||
import (
|
||||
"gopkg.in/oauth2.v3"
|
||||
"gopkg.in/oauth2.v3/errors"
|
||||
"gopkg.in/oauth2.v3/manage"
|
||||
"gopkg.in/oauth2.v3/server"
|
||||
"gopkg.in/oauth2.v3/store"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
var srv *server.Server
|
||||
|
||||
func InitOAuth() {
|
||||
manager := manage.NewDefaultManager()
|
||||
// token store
|
||||
manager.MustTokenStorage(store.NewMemoryTokenStore())
|
||||
|
||||
// create new secretstore
|
||||
clientStore := NewCustomStore()
|
||||
manager.MapClientStorage(clientStore)
|
||||
|
||||
srv = server.NewServer(server.NewConfig(), manager)
|
||||
srv.SetClientInfoHandler(server.ClientFormHandler)
|
||||
manager.SetRefreshTokenCfg(manage.DefaultRefreshTokenCfg)
|
||||
|
||||
srv.SetInternalErrorHandler(func(err error) (re *errors.Response) {
|
||||
log.Println("Internal Error:", err.Error())
|
||||
return
|
||||
})
|
||||
|
||||
srv.SetResponseErrorHandler(func(re *errors.Response) {
|
||||
log.Println("Response Error:", re.Error.Error())
|
||||
})
|
||||
|
||||
http.HandleFunc("/authorize", func(w http.ResponseWriter, r *http.Request) {
|
||||
err := srv.HandleAuthorizeRequest(w, r)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
}
|
||||
})
|
||||
|
||||
http.HandleFunc("/token", func(w http.ResponseWriter, r *http.Request) {
|
||||
err := srv.HandleTokenRequest(w, r)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func ValidateToken(f func(rw http.ResponseWriter, req *http.Request, node int, tokenInfo *oauth2.TokenInfo), node int) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
tokeninfo, err := srv.ValidationBearerToken(r)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
f(w, r, node, &tokeninfo)
|
||||
}
|
||||
}
|
@ -4,6 +4,6 @@ go 1.16
|
||||
|
||||
require (
|
||||
github.com/go-sql-driver/mysql v1.5.0
|
||||
github.com/gowebsecure/goWebSecure-go v0.1.0-beta.1
|
||||
gopkg.in/oauth2.v3 v3.12.0
|
||||
nhooyr.io/websocket v1.8.7
|
||||
)
|
||||
|
46
apiGo/go.sum
46
apiGo/go.sum
@ -1,90 +1,58 @@
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
|
||||
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
|
||||
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
|
||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/gavv/httpexpect v2.0.0+incompatible h1:1X9kcRshkSKEjNJJxX9Y9mQ5BRfbxU5kORdjhlA1yX8=
|
||||
github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc=
|
||||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||
github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14=
|
||||
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
|
||||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
|
||||
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
|
||||
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
|
||||
github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY=
|
||||
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
|
||||
github.com/go-session/session v3.1.2+incompatible/go.mod h1:8B3iivBQjrz/JtC68Np2T1yBBLxTan3mn/3OM0CyRt0=
|
||||
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
|
||||
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0=
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
|
||||
github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
|
||||
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=
|
||||
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls=
|
||||
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
||||
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
|
||||
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM=
|
||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gowebsecure/goWebSecure-go v0.1.0-beta.1 h1:lMaNWyk5udtOAc8U+mUo2FTgNqRwT+Aj5mxDfP5qtx0=
|
||||
github.com/gowebsecure/goWebSecure-go v0.1.0-beta.1/go.mod h1:uEM+/1LS6hSBby7VKx2cHZ9btvQ/LC4K3HWKgqDRPs0=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk=
|
||||
github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
|
||||
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
|
||||
github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||
github.com/klauspost/compress v1.10.3 h1:OP96hzwJVBIHYU52pVTI6CczrxPvrGfgqF9N5eTO0Q8=
|
||||
github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
||||
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
|
||||
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs=
|
||||
github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/tidwall/btree v0.0.0-20170113224114-9876f1454cf0 h1:QnyrPZZvPmR0AtJCxxfCtI1qN+fYpKTKJ/5opWmZ34k=
|
||||
github.com/tidwall/btree v0.0.0-20170113224114-9876f1454cf0/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8=
|
||||
@ -102,26 +70,16 @@ github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e h1:+NL1GDIUOKxVfbp2K
|
||||
github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao=
|
||||
github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 h1:Otn9S136ELckZ3KKDyCkxapfufrqDqwmGjcHfAyXRrE=
|
||||
github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ=
|
||||
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
|
||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasthttp v1.6.0 h1:uWF8lgKmeaIewWVPwi4GRq2P6+R46IgYZdxWtM+GtEY=
|
||||
github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w=
|
||||
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
|
||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
|
||||
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
|
||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY=
|
||||
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI=
|
||||
github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA=
|
||||
github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg=
|
||||
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M=
|
||||
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM=
|
||||
github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
@ -129,7 +87,6 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM=
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@ -137,14 +94,12 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
@ -154,7 +109,6 @@ gopkg.in/oauth2.v3 v3.12.0/go.mod h1:XEYgKqWX095YiPT+Aw5y3tCn+7/FMnlTFKrupgSiJ3I
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
|
||||
nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
|
||||
|
@ -28,12 +28,19 @@ func main() {
|
||||
database.InitDB(db)
|
||||
defer database.Close()
|
||||
|
||||
api.AddVideoHandlers()
|
||||
api.AddSettingsHandlers()
|
||||
api.AddTagHandlers()
|
||||
api.AddActorsHandlers()
|
||||
api.AddTvshowHandlers()
|
||||
api.AddPhotoHandlers()
|
||||
|
||||
videoparser.SetupSettingsWebsocket()
|
||||
|
||||
// add the static files
|
||||
static.ServeStaticFiles()
|
||||
|
||||
api.Init()
|
||||
api.ServerInit()
|
||||
|
||||
fmt.Printf("OpenMediacenter server up and running on port %d\n", port)
|
||||
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil))
|
||||
|
1
declaration.d.ts
vendored
1
declaration.d.ts
vendored
@ -1 +1,2 @@
|
||||
declare module '*.css';
|
||||
declare module 'pro-gallery';
|
||||
|
37
package.json
37
package.json
@ -12,16 +12,15 @@
|
||||
"@fortawesome/free-regular-svg-icons": "^5.15.1",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
||||
"@fortawesome/react-fontawesome": "^0.1.13",
|
||||
"bootstrap": "^5.0.2",
|
||||
"bootstrap": "^5.0.1",
|
||||
"plyr-react": "^3.0.7",
|
||||
"pro-gallery": "^4.0.4",
|
||||
"react": "^17.0.1",
|
||||
"react-bootstrap": "^1.4.0",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-router": "^5.2.0",
|
||||
"react-router-dom": "^5.2.0",
|
||||
"typescript": "^4.3.5",
|
||||
"gowebsecure": "0.1.1-beta.2",
|
||||
"gowebsecure-react": "0.1.0-beta.3"
|
||||
"typescript": "^4.1.3"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
@ -40,7 +39,7 @@
|
||||
"text-summary"
|
||||
]
|
||||
},
|
||||
"proxy": "http://127.0.0.1:8080",
|
||||
"proxy": "http://127.0.0.1:8081",
|
||||
"homepage": "/",
|
||||
"browserslist": {
|
||||
"production": [
|
||||
@ -55,30 +54,30 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "^5.14.1",
|
||||
"@testing-library/react": "^12.0.0",
|
||||
"@testing-library/user-event": "^13.2.1",
|
||||
"@types/jest": "^26.0.24",
|
||||
"@types/node": "^16.4.7",
|
||||
"@types/react": "^17.0.15",
|
||||
"@types/react-dom": "^17.0.9",
|
||||
"@types/react-router": "5.1.16",
|
||||
"@types/react-router-dom": "^5.1.8",
|
||||
"@typescript-eslint/eslint-plugin": "^4.28.5",
|
||||
"@typescript-eslint/parser": "^4.28.5",
|
||||
"@testing-library/jest-dom": "^5.11.6",
|
||||
"@testing-library/react": "^11.2.2",
|
||||
"@testing-library/user-event": "^13.1.9",
|
||||
"@types/jest": "^26.0.19",
|
||||
"@types/node": "^15.12.2",
|
||||
"@types/react": "^17.0.2",
|
||||
"@types/react-dom": "^17.0.1",
|
||||
"@types/react-router": "5.1.15",
|
||||
"@types/react-router-dom": "^5.1.6",
|
||||
"@typescript-eslint/eslint-plugin": "^4.17.0",
|
||||
"@typescript-eslint/parser": "^4.17.0",
|
||||
"apidoc": "^0.28.1",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-adapter-react-16": "^1.15.5",
|
||||
"eslint": "^7.31.0",
|
||||
"eslint": "^7.22.0",
|
||||
"eslint-config-prettier": "^8.1.0",
|
||||
"eslint-formatter-gitlab": "^2.2.0",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-jest": "^24.4.0",
|
||||
"eslint-plugin-jest": "^24.3.1",
|
||||
"eslint-plugin-prettier": "^3.3.1",
|
||||
"eslint-plugin-react": "^7.22.0",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"jest-junit": "^12.0.0",
|
||||
"prettier": "^2.3.2",
|
||||
"prettier": "^2.2.1",
|
||||
"prettier-config": "^1.0.0",
|
||||
"react-scripts": "4.0.3"
|
||||
},
|
||||
|
25
src/App.tsx
25
src/App.tsx
@ -9,17 +9,19 @@ import style from './App.module.css';
|
||||
|
||||
import SettingsPage from './pages/SettingsPage/SettingsPage';
|
||||
import CategoryPage from './pages/CategoryPage/CategoryPage';
|
||||
import {APINode, callAPI} from './utils/Api';
|
||||
|
||||
import {BrowserRouter as Router, NavLink, Route, Switch} from 'react-router-dom';
|
||||
import Player from './pages/Player/Player';
|
||||
import ActorOverviewPage from './pages/ActorOverviewPage/ActorOverviewPage';
|
||||
import ActorPage from './pages/ActorPage/ActorPage';
|
||||
import {APINode, SettingsTypes} from './types/ApiTypes';
|
||||
import {SettingsTypes} from './types/ApiTypes';
|
||||
import AuthenticationPage from './pages/AuthenticationPage/AuthenticationPage';
|
||||
import TVShowPage from './pages/TVShowPage/TVShowPage';
|
||||
import TVPlayer from './pages/TVShowPage/TVPlayer';
|
||||
import {CookieTokenStore, token} from 'gowebsecure';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {CookieTokenStore} from './utils/TokenStore/CookieTokenStore';
|
||||
import {token} from './utils/TokenHandler';
|
||||
import {PhotoPage} from './pages/PhotoPage/PhotoPage';
|
||||
|
||||
interface state {
|
||||
password: boolean | null; // null if uninitialized - true if pwd needed false if not needed
|
||||
@ -40,8 +42,7 @@ class App extends React.Component<{}, state> {
|
||||
if (token.apiTokenValid()) {
|
||||
pwdneeded = false;
|
||||
} else {
|
||||
token.refreshAPIToken(
|
||||
(err) => {
|
||||
token.refreshAPIToken((err) => {
|
||||
if (err === 'invalid_client') {
|
||||
this.setState({password: true});
|
||||
} else if (err === '') {
|
||||
@ -49,11 +50,7 @@ class App extends React.Component<{}, state> {
|
||||
} else {
|
||||
console.log('unimplemented token error: ' + err);
|
||||
}
|
||||
},
|
||||
true,
|
||||
'openmediacenter',
|
||||
'0'
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
this.state = {
|
||||
@ -159,6 +156,10 @@ class App extends React.Component<{}, state> {
|
||||
</NavLink>
|
||||
) : null}
|
||||
|
||||
<NavLink className={[style.navitem, themeStyle.navitem].join(' ')} to={'/photos'} activeStyle={{opacity: '0.85'}}>
|
||||
Photos
|
||||
</NavLink>
|
||||
|
||||
<NavLink className={[style.navitem, themeStyle.navitem].join(' ')} to={'/settings'} activeStyle={{opacity: '0.85'}}>
|
||||
Settings
|
||||
</NavLink>
|
||||
@ -203,6 +204,10 @@ class App extends React.Component<{}, state> {
|
||||
</Route>
|
||||
) : null}
|
||||
|
||||
<Route exact path='/photos'>
|
||||
<PhotoPage />
|
||||
</Route>
|
||||
|
||||
<Route path='/'>
|
||||
<HomePage />
|
||||
</Route>
|
||||
|
@ -1,32 +0,0 @@
|
||||
import React from 'react';
|
||||
|
||||
interface Props {
|
||||
listenKey: string;
|
||||
onKey: () => void;
|
||||
}
|
||||
|
||||
export default class KeyComponent extends React.Component<Props> {
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
|
||||
this.handler = this.handler.bind(this);
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
return <>{this.props.children}</>;
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
document.addEventListener('keyup', this.handler);
|
||||
}
|
||||
|
||||
componentWillUnmount(): void {
|
||||
document.removeEventListener('keyup', this.handler);
|
||||
}
|
||||
|
||||
private handler(e: KeyboardEvent): void {
|
||||
if (e.key === this.props.listenKey) {
|
||||
this.props.onKey();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
import {shallow} from 'enzyme';
|
||||
import React from 'react';
|
||||
import AddActorPopup from './AddActorPopup';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {callAPI} from '../../../utils/Api';
|
||||
|
||||
describe('<AddActorPopup/>', function () {
|
||||
it('renders without crashing ', function () {
|
||||
|
@ -3,11 +3,10 @@ import React from 'react';
|
||||
import ActorTile from '../../ActorTile/ActorTile';
|
||||
import style from './AddActorPopup.module.css';
|
||||
import {NewActorPopupContent} from '../NewActorPopup/NewActorPopup';
|
||||
import {APINode, callAPI} from '../../../utils/Api';
|
||||
import {ActorType} from '../../../types/VideoTypes';
|
||||
import {GeneralSuccess} from '../../../types/GeneralTypes';
|
||||
import FilterButton from '../../FilterButton/FilterButton';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode} from '../../../types/ApiTypes';
|
||||
|
||||
interface Props {
|
||||
onHide: () => void;
|
||||
|
@ -1,11 +1,10 @@
|
||||
import React from 'react';
|
||||
import Tag from '../../Tag/Tag';
|
||||
import PopupBase from '../PopupBase';
|
||||
import {APINode, callAPI} from '../../../utils/Api';
|
||||
import {TagType} from '../../../types/VideoTypes';
|
||||
import FilterButton from '../../FilterButton/FilterButton';
|
||||
import styles from './AddTagPopup.module.css';
|
||||
import {callAPI} from 'gowebsecure/lib/Api';
|
||||
import {APINode} from '../../../types/ApiTypes';
|
||||
|
||||
interface Props {
|
||||
onHide: () => void;
|
||||
|
@ -3,7 +3,7 @@ import React from 'react';
|
||||
import {shallow} from 'enzyme';
|
||||
import '@testing-library/jest-dom';
|
||||
import NewActorPopup, {NewActorPopupContent} from './NewActorPopup';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {callAPI} from '../../../utils/Api';
|
||||
|
||||
describe('<NewActorPopup/>', function () {
|
||||
it('renders without crashing ', function () {
|
||||
|
@ -1,9 +1,8 @@
|
||||
import React from 'react';
|
||||
import PopupBase from '../PopupBase';
|
||||
import style from './NewActorPopup.module.css';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode, callAPI} from '../../../utils/Api';
|
||||
import {GeneralSuccess} from '../../../types/GeneralTypes';
|
||||
import {APINode} from '../../../types/ApiTypes';
|
||||
|
||||
interface NewActorPopupProps {
|
||||
onHide: () => void;
|
||||
|
@ -1,9 +1,8 @@
|
||||
import React from 'react';
|
||||
import PopupBase from '../PopupBase';
|
||||
import style from './NewTagPopup.module.css';
|
||||
import {APINode, callAPI} from '../../../utils/Api';
|
||||
import {GeneralSuccess} from '../../../types/GeneralTypes';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode} from '../../../types/ApiTypes';
|
||||
|
||||
interface props {
|
||||
onHide: () => void;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import Preview from '../Preview/Preview';
|
||||
import {APINode, VideoTypes} from '../../types/ApiTypes';
|
||||
import {VideoTypes} from '../../types/ApiTypes';
|
||||
import DynamicContentContainer from '../DynamicContentContainer/DynamicContentContainer';
|
||||
import {callAPIPlain} from 'gowebsecure';
|
||||
import {APINode, callAPIPlain} from '../../utils/Api';
|
||||
|
||||
interface Props {
|
||||
data: VideoTypes.VideoUnloadedType[];
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode, callAPI} from '../../utils/Api';
|
||||
import {ActorType} from '../../types/VideoTypes';
|
||||
import ActorTile from '../../elements/ActorTile/ActorTile';
|
||||
import PageTitle from '../../elements/PageTitle/PageTitle';
|
||||
@ -8,7 +8,6 @@ import SideBar from '../../elements/SideBar/SideBar';
|
||||
import {Button} from '../../elements/GPElements/Button';
|
||||
import NewActorPopup from '../../elements/Popups/NewActorPopup/NewActorPopup';
|
||||
import DynamicContentContainer from '../../elements/DynamicContentContainer/DynamicContentContainer';
|
||||
import {APINode} from '../../types/ApiTypes';
|
||||
|
||||
interface Props {}
|
||||
|
||||
|
@ -5,12 +5,12 @@ import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faUser} from '@fortawesome/free-solid-svg-icons';
|
||||
import style from './ActorPage.module.css';
|
||||
import VideoContainer from '../../elements/VideoContainer/VideoContainer';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode, callAPI} from '../../utils/Api';
|
||||
import {ActorType} from '../../types/VideoTypes';
|
||||
import {Link, withRouter} from 'react-router-dom';
|
||||
import {RouteComponentProps} from 'react-router';
|
||||
import {Button} from '../../elements/GPElements/Button';
|
||||
import {ActorTypes, APINode, VideoTypes} from '../../types/ApiTypes';
|
||||
import {ActorTypes, VideoTypes} from '../../types/ApiTypes';
|
||||
|
||||
interface state {
|
||||
data: VideoTypes.VideoUnloadedType[];
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import {Button} from '../../elements/GPElements/Button';
|
||||
import style from './AuthenticationPage.module.css';
|
||||
import {addKeyHandler, removeKeyHandler} from '../../utils/ShortkeyHandler';
|
||||
import {token} from 'gowebsecure';
|
||||
import {token} from '../../utils/TokenHandler';
|
||||
import {faTimes} from '@fortawesome/free-solid-svg-icons';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
|
||||
@ -90,8 +90,7 @@ class AuthenticationPage extends React.Component<Props, state> {
|
||||
}
|
||||
},
|
||||
true,
|
||||
this.state.pwdText,
|
||||
'openmediacenter'
|
||||
this.state.pwdText
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import {RouteComponentProps} from 'react-router';
|
||||
import React from 'react';
|
||||
import VideoContainer from '../../elements/VideoContainer/VideoContainer';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode, callAPI} from '../../utils/Api';
|
||||
import {withRouter} from 'react-router-dom';
|
||||
import {APINode, VideoTypes} from '../../types/ApiTypes';
|
||||
import {VideoTypes} from '../../types/ApiTypes';
|
||||
import PageTitle, {Line} from '../../elements/PageTitle/PageTitle';
|
||||
import SideBar, {SideBarTitle} from '../../elements/SideBar/SideBar';
|
||||
import Tag from '../../elements/Tag/Tag';
|
||||
|
@ -2,14 +2,13 @@ import {TagType} from '../../types/VideoTypes';
|
||||
import React from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {TagPreview} from '../../elements/Preview/Preview';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode, callAPI} from '../../utils/Api';
|
||||
import PageTitle, {Line} from '../../elements/PageTitle/PageTitle';
|
||||
import SideBar, {SideBarTitle} from '../../elements/SideBar/SideBar';
|
||||
import Tag from '../../elements/Tag/Tag';
|
||||
import {DefaultTags} from '../../types/GeneralTypes';
|
||||
import NewTagPopup from '../../elements/Popups/NewTagPopup/NewTagPopup';
|
||||
import DynamicContentContainer from '../../elements/DynamicContentContainer/DynamicContentContainer';
|
||||
import {APINode} from '../../types/ApiTypes';
|
||||
|
||||
interface TagViewState {
|
||||
loadedtags: TagType[];
|
||||
|
@ -5,32 +5,31 @@ import VideoContainer from '../../elements/VideoContainer/VideoContainer';
|
||||
|
||||
import style from './HomePage.module.css';
|
||||
import PageTitle, {Line} from '../../elements/PageTitle/PageTitle';
|
||||
import {APINode, callAPI} from '../../utils/Api';
|
||||
import {Route, Switch, withRouter} from 'react-router-dom';
|
||||
import {RouteComponentProps} from 'react-router';
|
||||
import SearchHandling from './SearchHandling';
|
||||
import {APINode, VideoTypes} from '../../types/ApiTypes';
|
||||
import {VideoTypes} from '../../types/ApiTypes';
|
||||
import {DefaultTags} from '../../types/GeneralTypes';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faSortDown} from '@fortawesome/free-solid-svg-icons';
|
||||
import {TagType} from '../../types/VideoTypes';
|
||||
import {APILoader} from 'gowebsecure-react';
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
export enum SortBy {
|
||||
date,
|
||||
likes,
|
||||
random,
|
||||
name,
|
||||
length
|
||||
name
|
||||
}
|
||||
|
||||
interface Props extends RouteComponentProps {}
|
||||
|
||||
interface state {
|
||||
sideinfo: VideoTypes.startDataType;
|
||||
subtitle: string;
|
||||
data: VideoTypes.VideoUnloadedType[];
|
||||
selectionnr: number;
|
||||
sortby: string;
|
||||
sortState: SortBy;
|
||||
tagState: TagType;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -40,24 +39,71 @@ export class HomePage extends React.Component<Props, state> {
|
||||
/** keyword variable needed temporary store search keyword */
|
||||
keyword = '';
|
||||
|
||||
state = {
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
sideinfo: {
|
||||
VideoNr: 0,
|
||||
FullHdNr: 0,
|
||||
HDNr: 0,
|
||||
SDNr: 0,
|
||||
DifferentTags: 0,
|
||||
Tagged: 0
|
||||
},
|
||||
subtitle: 'All Videos',
|
||||
sortby: 'Date Added',
|
||||
sortState: SortBy.date,
|
||||
tagState: DefaultTags.all
|
||||
data: [],
|
||||
selectionnr: 0,
|
||||
sortby: 'Date Added'
|
||||
};
|
||||
}
|
||||
|
||||
sortState = SortBy.date;
|
||||
tagState = DefaultTags.all;
|
||||
|
||||
componentDidMount(): void {
|
||||
// initial get of all videos
|
||||
this.fetchVideoData();
|
||||
this.fetchStartData();
|
||||
}
|
||||
|
||||
/**
|
||||
* fetch available videos for specified tag
|
||||
* this function clears all preview elements an reloads gravity with tag
|
||||
*
|
||||
* @param tag tag to fetch videos
|
||||
*/
|
||||
fetchVideoData(): void {
|
||||
callAPI(
|
||||
APINode.Video,
|
||||
{action: 'getMovies', Tag: this.tagState.TagId, Sort: this.sortState},
|
||||
(result: {Videos: VideoTypes.VideoUnloadedType[]; TagName: string}) => {
|
||||
this.setState({
|
||||
data: result.Videos,
|
||||
selectionnr: result.Videos.length
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* fetch the necessary data for left info box
|
||||
*/
|
||||
fetchStartData(): void {
|
||||
callAPI(APINode.Video, {action: 'getStartData'}, (result: VideoTypes.startDataType) => {
|
||||
this.setState({sideinfo: result});
|
||||
});
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
return (
|
||||
<>
|
||||
<Switch>
|
||||
<Route path='/search/:name'>
|
||||
<SearchHandling />
|
||||
</Route>
|
||||
<Route path='/'>
|
||||
<APILoader
|
||||
render={(data: {Videos: VideoTypes.VideoUnloadedType[]; TagName: string}): JSX.Element => (
|
||||
<>
|
||||
<PageTitle title='Home Page' subtitle={this.state.subtitle + ' - ' + data.Videos.length}>
|
||||
<PageTitle title='Home Page' subtitle={this.state.subtitle + ' - ' + this.state.selectionnr}>
|
||||
<form
|
||||
className={'form-inline ' + style.searchform}
|
||||
onSubmit={(e): void => {
|
||||
@ -79,60 +125,57 @@ export class HomePage extends React.Component<Props, state> {
|
||||
</form>
|
||||
</PageTitle>
|
||||
<SideBar>
|
||||
<APILoader
|
||||
render={(sidebardata: VideoTypes.startDataType): JSX.Element => (
|
||||
<>
|
||||
<SideBarTitle>Infos:</SideBarTitle>
|
||||
<Line />
|
||||
<SideBarItem>
|
||||
<b>{sidebardata.VideoNr}</b> Videos Total!
|
||||
<b>{this.state.sideinfo.VideoNr}</b> Videos Total!
|
||||
</SideBarItem>
|
||||
<SideBarItem>
|
||||
<b>{sidebardata.FullHdNr}</b> FULL-HD Videos!
|
||||
<b>{this.state.sideinfo.FullHdNr}</b> FULL-HD Videos!
|
||||
</SideBarItem>
|
||||
<SideBarItem>
|
||||
<b>{sidebardata.HDNr}</b> HD Videos!
|
||||
<b>{this.state.sideinfo.HDNr}</b> HD Videos!
|
||||
</SideBarItem>
|
||||
<SideBarItem>
|
||||
<b>{sidebardata.SDNr}</b> SD Videos!
|
||||
<b>{this.state.sideinfo.SDNr}</b> SD Videos!
|
||||
</SideBarItem>
|
||||
<SideBarItem>
|
||||
<b>{sidebardata.DifferentTags}</b> different Tags!
|
||||
<b>{this.state.sideinfo.DifferentTags}</b> different Tags!
|
||||
</SideBarItem>
|
||||
<Line />
|
||||
<SideBarTitle>Default Tags:</SideBarTitle>
|
||||
<Tag
|
||||
tagInfo={{TagName: 'All', TagId: DefaultTags.all.TagId}}
|
||||
onclick={(): void => {
|
||||
this.setState({tagState: DefaultTags.all, subtitle: 'All Videos'});
|
||||
this.tagState = DefaultTags.all;
|
||||
this.fetchVideoData();
|
||||
this.setState({subtitle: 'All Videos'});
|
||||
}}
|
||||
/>
|
||||
<Tag
|
||||
tagInfo={{TagName: 'Full Hd', TagId: DefaultTags.fullhd.TagId}}
|
||||
onclick={(): void => {
|
||||
this.setState({tagState: DefaultTags.fullhd, subtitle: 'Full Hd Videos'});
|
||||
this.tagState = DefaultTags.fullhd;
|
||||
this.fetchVideoData();
|
||||
this.setState({subtitle: 'Full Hd Videos'});
|
||||
}}
|
||||
/>
|
||||
<Tag
|
||||
tagInfo={{TagName: 'Low Quality', TagId: DefaultTags.lowq.TagId}}
|
||||
onclick={(): void => {
|
||||
this.setState({
|
||||
tagState: DefaultTags.lowq,
|
||||
subtitle: 'Low Quality Videos'
|
||||
});
|
||||
this.tagState = DefaultTags.lowq;
|
||||
this.fetchVideoData();
|
||||
this.setState({subtitle: 'Low Quality Videos'});
|
||||
}}
|
||||
/>
|
||||
<Tag
|
||||
tagInfo={{TagName: 'HD', TagId: DefaultTags.hd.TagId}}
|
||||
onclick={(): void => {
|
||||
this.setState({tagState: DefaultTags.hd, subtitle: 'HD Videos'});
|
||||
this.tagState = DefaultTags.hd;
|
||||
this.fetchVideoData();
|
||||
this.setState({subtitle: 'HD Videos'});
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
node={APINode.Video}
|
||||
action='getStartData'
|
||||
/>
|
||||
</SideBar>
|
||||
<div>
|
||||
<span className={style.sortbyLabel}>Sort By: </span>
|
||||
@ -142,28 +185,19 @@ export class HomePage extends React.Component<Props, state> {
|
||||
<FontAwesomeIcon style={{marginLeft: 3, paddingBottom: 3}} icon={faSortDown} size='1x' />
|
||||
</span>
|
||||
<div className={style.dropdownContent}>
|
||||
<span onClick={(): void => this.onDropDownItemClick(SortBy.date, 'Date Added')}>
|
||||
Date Added
|
||||
</span>
|
||||
<span onClick={(): void => this.onDropDownItemClick(SortBy.likes, 'Most likes')}>
|
||||
Most likes
|
||||
</span>
|
||||
<span onClick={(): void => this.onDropDownItemClick(SortBy.date, 'Date Added')}>Date Added</span>
|
||||
<span onClick={(): void => this.onDropDownItemClick(SortBy.likes, 'Most likes')}>Most likes</span>
|
||||
<span onClick={(): void => this.onDropDownItemClick(SortBy.random, 'Random')}>Random</span>
|
||||
<span onClick={(): void => this.onDropDownItemClick(SortBy.name, 'Name')}>Name</span>
|
||||
<span onClick={(): void => this.onDropDownItemClick(SortBy.length, 'Length')}>Length</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<VideoContainer data={data.Videos} />
|
||||
|
||||
<VideoContainer data={this.state.data} />
|
||||
<div className={style.rightinfo} />
|
||||
</>
|
||||
)}
|
||||
node={APINode.Video}
|
||||
action='getMovies'
|
||||
params={{Tag: this.state.tagState.TagId, Sort: this.state.sortState}}
|
||||
/>
|
||||
</Route>
|
||||
</Switch>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@ -173,7 +207,9 @@ export class HomePage extends React.Component<Props, state> {
|
||||
* @param name new header title
|
||||
*/
|
||||
onDropDownItemClick(type: SortBy, name: string): void {
|
||||
this.setState({sortby: name, sortState: type});
|
||||
this.sortState = type;
|
||||
this.setState({sortby: name});
|
||||
this.fetchVideoData();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
import {RouteComponentProps} from 'react-router';
|
||||
import React from 'react';
|
||||
import {withRouter} from 'react-router-dom';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode, callAPI} from '../../utils/Api';
|
||||
import VideoContainer from '../../elements/VideoContainer/VideoContainer';
|
||||
import PageTitle from '../../elements/PageTitle/PageTitle';
|
||||
import SideBar from '../../elements/SideBar/SideBar';
|
||||
import {APINode, VideoTypes} from '../../types/ApiTypes';
|
||||
import {VideoTypes} from '../../types/ApiTypes';
|
||||
|
||||
interface params {
|
||||
name: string;
|
||||
|
76
src/pages/PhotoPage/PhotoPage.tsx
Normal file
76
src/pages/PhotoPage/PhotoPage.tsx
Normal file
@ -0,0 +1,76 @@
|
||||
import 'pro-gallery/dist/statics/main.css';
|
||||
import React from 'react';
|
||||
import ExpandableProGallery from './expandableGallery';
|
||||
|
||||
export function PhotoPage(): JSX.Element {
|
||||
// Add your images here...
|
||||
const items = [
|
||||
{
|
||||
// Image item:
|
||||
itemId: 'sample-id',
|
||||
mediaUrl: 'https://i.picsum.photos/id/674/200/300.jpg?hmac=kS3VQkm7AuZdYJGUABZGmnNj_3KtZ6Twgb5Qb9ITssY',
|
||||
metaData: {
|
||||
type: 'image',
|
||||
height: 200,
|
||||
width: 100,
|
||||
title: 'sample-title',
|
||||
description: 'sample-description',
|
||||
focalPoint: [0, 0],
|
||||
link: {
|
||||
url: 'http://example.com',
|
||||
target: '_blank'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
// Another Image item:
|
||||
itemId: 'differentItem',
|
||||
mediaUrl: 'https://i.picsum.photos/id/1003/1181/1772.jpg?hmac=oN9fHMXiqe9Zq2RM6XT-RVZkojgPnECWwyEF1RvvTZk',
|
||||
metaData: {
|
||||
type: 'image',
|
||||
height: 200,
|
||||
width: 100,
|
||||
title: 'sample-title',
|
||||
description: 'sample-description',
|
||||
focalPoint: [0, 0],
|
||||
link: {
|
||||
url: 'http://example.com',
|
||||
target: '_blank'
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
// The options of the gallery (from the playground current state)
|
||||
const options = {
|
||||
galleryLayout: -1,
|
||||
hoveringBehaviour: 'NEVER_SHOW',
|
||||
scrollAnimation: 'MAIN_COLOR',
|
||||
imageHoverAnimation: 'ZOOM_IN',
|
||||
itemBorderRadius: 5,
|
||||
allowContextMenu: true
|
||||
};
|
||||
|
||||
// The size of the gallery container. The images will fit themselves in it
|
||||
const container = {
|
||||
width: window.innerWidth,
|
||||
height: window.innerHeight
|
||||
};
|
||||
|
||||
// The eventsListener will notify you anytime something has happened in the gallery.
|
||||
const eventsListener = (eventName: unknown, eventData: unknown): void => console.log({eventName, eventData});
|
||||
|
||||
return (
|
||||
<ExpandableProGallery
|
||||
items={items}
|
||||
options={options}
|
||||
container={container}
|
||||
eventsListener={eventsListener}
|
||||
scrollingElement={window}
|
||||
viewMode={1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
// Enjoy using your new gallery!
|
||||
// For more options, visit https://github.com/wix/pro-gallery
|
106
src/pages/PhotoPage/expandableGallery.js
Normal file
106
src/pages/PhotoPage/expandableGallery.js
Normal file
@ -0,0 +1,106 @@
|
||||
import React from 'react';
|
||||
import {GALLERY_CONSTS, ProGallery, ProGalleryRenderer} from 'pro-gallery';
|
||||
import {utils} from 'pro-gallery-lib';
|
||||
// import CLICK_ACTIONS from '../../../common/constants/itemClick';
|
||||
import CloseButton from './x';
|
||||
|
||||
const styles = {
|
||||
gallery: {
|
||||
|
||||
},
|
||||
fullscreen: {
|
||||
position: 'fixed',
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: '100vw',
|
||||
height: '100vh',
|
||||
zIndex: 9999,
|
||||
background: 'white',
|
||||
opacity: 0,
|
||||
transition: 'opacity 2s ease',
|
||||
visibility: 'hidden'
|
||||
},
|
||||
shown: {
|
||||
visibility: 'visible',
|
||||
opacity: 1
|
||||
},
|
||||
close: {
|
||||
boxSizing: 'content-box',
|
||||
zIndex: 10,
|
||||
padding: 10,
|
||||
position: 'fixed',
|
||||
right: 20,
|
||||
top: 20,
|
||||
background: 'rgba(255,255,255,0.8)',
|
||||
borderRadius: 4,
|
||||
width: 25,
|
||||
height: 25,
|
||||
fill: 'black',
|
||||
cursor: 'pointer'
|
||||
}
|
||||
}
|
||||
|
||||
const GALLERY_EVENTS = GALLERY_CONSTS.events;
|
||||
|
||||
export default class ExpandableProGallery extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.eventListener = this.eventListener.bind(this);
|
||||
this.state = {
|
||||
fullscreenIdx: -1
|
||||
}
|
||||
}
|
||||
|
||||
eventListener(eventName, eventData) {
|
||||
switch (eventName) {
|
||||
case GALLERY_EVENTS.ITEM_ACTION_TRIGGERED:
|
||||
this.setState({ fullscreenIdx: eventData.idx });
|
||||
break;
|
||||
default:
|
||||
console.log({eventName, eventData});
|
||||
break;
|
||||
}
|
||||
if (typeof this.props.eventsListener === 'function') {
|
||||
this.props.eventsListener(eventName, eventData);
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const Gallery = this.props.useBlueprints ? ProGalleryRenderer : ProGallery;
|
||||
return (
|
||||
<>
|
||||
<section style={{...styles.gallery, display: (this.state.fullscreenIdx < 0 ? 'block' : 'none')}}>
|
||||
<Gallery
|
||||
{...this.props}
|
||||
key={`pro-gallery-${this.props.domId}`}
|
||||
domId={`pro-gallery-${this.props.domId}`}
|
||||
eventsListener={this.eventListener}
|
||||
/>
|
||||
</section>
|
||||
{this.state.fullscreenIdx < 0 ? null : <section style={{ ...styles.fullscreen, ...(this.state.fullscreenIdx >= 0 && styles.shown) }}>
|
||||
<CloseButton style={styles.close} onClick={() => this.setState({fullscreenIdx: -1})} />
|
||||
<Gallery
|
||||
{...this.props}
|
||||
key={`pro-fullscreen-${this.props.domId}`}
|
||||
domId={`pro-fullscreen-${this.props.domId}`}
|
||||
currentIdx={this.state.fullscreenIdx}
|
||||
container= {{
|
||||
width: window.innerWidth,
|
||||
height: window.innerHeight
|
||||
}}
|
||||
styles={{
|
||||
...(this.props.options || this.props.styles),
|
||||
galleryLayout: 5,
|
||||
slideshowInfoSize: 80,
|
||||
slideAnimation: utils.isMobile() ? 'SCROLL' : 'FADE',
|
||||
cubeType:'fit',
|
||||
scrollSnap: true,
|
||||
showArrows: !utils.isMobile()
|
||||
}}
|
||||
/>
|
||||
</section>}
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
16
src/pages/PhotoPage/x.js
Normal file
16
src/pages/PhotoPage/x.js
Normal file
@ -0,0 +1,16 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
const x = ({size, ...props}) => (
|
||||
<svg viewBox="0 0 15 15" fill="currentColor" width={ size || "15" } height={ size || "15" } {...props}>
|
||||
<path d="M15 0.6L14.4 0 7.5 6.9 0.6 0 0 0.6 6.9 7.5 0 14.4 0.6 15 7.5 8.1 14.4 15 15 14.4 8.1 7.5z" fillRule="evenodd" clipRule="evenodd" />
|
||||
</svg>
|
||||
);
|
||||
x.displayName = 'x';
|
||||
x.propTypes = {
|
||||
size: PropTypes.string
|
||||
}
|
||||
export default x;
|
||||
/* tslint:enable */
|
||||
/* eslint-enable */
|
@ -1,7 +1,7 @@
|
||||
import {shallow} from 'enzyme';
|
||||
import React from 'react';
|
||||
import {Player} from './Player';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {callAPI} from '../../utils/Api';
|
||||
|
||||
describe('<Player/>', function () {
|
||||
|
||||
|
@ -13,13 +13,13 @@ import {faPlusCircle} from '@fortawesome/free-solid-svg-icons';
|
||||
import AddActorPopup from '../../elements/Popups/AddActorPopup/AddActorPopup';
|
||||
import ActorTile from '../../elements/ActorTile/ActorTile';
|
||||
import {withRouter} from 'react-router-dom';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode, callAPI} from '../../utils/Api';
|
||||
import {RouteComponentProps} from 'react-router';
|
||||
import {DefaultPlyrOptions, GeneralSuccess} from '../../types/GeneralTypes';
|
||||
import {ActorType, TagType} from '../../types/VideoTypes';
|
||||
import PlyrJS from 'plyr';
|
||||
import {Button} from '../../elements/GPElements/Button';
|
||||
import {APINode, VideoTypes} from '../../types/ApiTypes';
|
||||
import {VideoTypes} from '../../types/ApiTypes';
|
||||
import GlobalInfos from '../../utils/GlobalInfos';
|
||||
|
||||
interface Props extends RouteComponentProps<{id: string}> {}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {shallow} from 'enzyme';
|
||||
import React from 'react';
|
||||
import RandomPage from './RandomPage';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {callAPI} from '../../utils/Api';
|
||||
|
||||
describe('<RandomPage/>', function () {
|
||||
it('renders without crashing ', function () {
|
||||
|
@ -4,10 +4,15 @@ import SideBar, {SideBarTitle} from '../../elements/SideBar/SideBar';
|
||||
import Tag from '../../elements/Tag/Tag';
|
||||
import PageTitle from '../../elements/PageTitle/PageTitle';
|
||||
import VideoContainer from '../../elements/VideoContainer/VideoContainer';
|
||||
import {APINode, callAPI} from '../../utils/Api';
|
||||
import {TagType} from '../../types/VideoTypes';
|
||||
import {APINode, VideoTypes} from '../../types/ApiTypes';
|
||||
import KeyComponent from '../../elements/KeyComponent';
|
||||
import {APILoader} from 'gowebsecure-react';
|
||||
import {VideoTypes} from '../../types/ApiTypes';
|
||||
import {addKeyHandler, removeKeyHandler} from '../../utils/ShortkeyHandler';
|
||||
|
||||
interface state {
|
||||
videos: VideoTypes.VideoUnloadedType[];
|
||||
tags: TagType[];
|
||||
}
|
||||
|
||||
interface GetRandomMoviesType {
|
||||
Videos: VideoTypes.VideoUnloadedType[];
|
||||
@ -17,27 +22,46 @@ interface GetRandomMoviesType {
|
||||
/**
|
||||
* Randompage shuffles random viedeopreviews and provides a shuffle btn
|
||||
*/
|
||||
class RandomPage extends React.Component {
|
||||
class RandomPage extends React.Component<{}, state> {
|
||||
readonly LoadNR = 3;
|
||||
|
||||
constructor(props: {}) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
videos: [],
|
||||
tags: []
|
||||
};
|
||||
|
||||
this.keypress = this.keypress.bind(this);
|
||||
}
|
||||
|
||||
componentDidMount(): void {
|
||||
addKeyHandler(this.keypress);
|
||||
|
||||
this.loadShuffledvideos(this.LoadNR);
|
||||
}
|
||||
|
||||
componentWillUnmount(): void {
|
||||
removeKeyHandler(this.keypress);
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
return (
|
||||
<div>
|
||||
<PageTitle title='Random Videos' subtitle={this.LoadNR + 'pcs'} />
|
||||
<APILoader
|
||||
render={(data: GetRandomMoviesType, actions): JSX.Element => (
|
||||
<KeyComponent listenKey='s' onKey={actions.refresh}>
|
||||
<PageTitle title='Random Videos' subtitle='4pc' />
|
||||
|
||||
<SideBar>
|
||||
<SideBarTitle>Visible Tags:</SideBarTitle>
|
||||
{data.Tags.map((m) => (
|
||||
{this.state.tags.map((m) => (
|
||||
<Tag key={m.TagId} tagInfo={m} />
|
||||
))}
|
||||
</SideBar>
|
||||
|
||||
{data.Videos.length !== 0 ? (
|
||||
<VideoContainer data={data.Videos}>
|
||||
{this.state.videos.length !== 0 ? (
|
||||
<VideoContainer data={this.state.videos}>
|
||||
<div className={style.Shufflebutton}>
|
||||
<button onClick={actions.refresh} className={style.btnshuffle}>
|
||||
<button onClick={(): void => this.shuffleclick()} className={style.btnshuffle}>
|
||||
Shuffle
|
||||
</button>
|
||||
</div>
|
||||
@ -45,15 +69,41 @@ class RandomPage extends React.Component {
|
||||
) : (
|
||||
<div>No Data found!</div>
|
||||
)}
|
||||
</KeyComponent>
|
||||
)}
|
||||
node={APINode.Video}
|
||||
action='getRandomMovies'
|
||||
params={{Number: this.LoadNR}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* click handler for shuffle btn
|
||||
*/
|
||||
shuffleclick(): void {
|
||||
this.loadShuffledvideos(this.LoadNR);
|
||||
}
|
||||
|
||||
/**
|
||||
* load random videos from backend
|
||||
* @param nr number of videos to load
|
||||
*/
|
||||
loadShuffledvideos(nr: number): void {
|
||||
callAPI<GetRandomMoviesType>(APINode.Video, {action: 'getRandomMovies', Number: nr}, (result) => {
|
||||
this.setState({videos: []}); // needed to trigger rerender of main videoview
|
||||
this.setState({
|
||||
videos: result.Videos,
|
||||
tags: result.Tags
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* key event handling
|
||||
* @param event keyevent
|
||||
*/
|
||||
private keypress(event: KeyboardEvent): void {
|
||||
// bind s to shuffle
|
||||
if (event.key === 's') {
|
||||
this.loadShuffledvideos(4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default RandomPage;
|
||||
|
@ -6,8 +6,8 @@ import InfoHeaderItem from '../../elements/InfoHeaderItem/InfoHeaderItem';
|
||||
import {faArchive, faBalanceScaleLeft, faRulerVertical} from '@fortawesome/free-solid-svg-icons';
|
||||
import {faAddressCard} from '@fortawesome/free-regular-svg-icons';
|
||||
import {version} from '../../../package.json';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode, SettingsTypes} from '../../types/ApiTypes';
|
||||
import {APINode, callAPI} from '../../utils/Api';
|
||||
import {SettingsTypes} from '../../types/ApiTypes';
|
||||
import {GeneralSuccess} from '../../types/GeneralTypes';
|
||||
|
||||
interface state {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {shallow} from 'enzyme';
|
||||
import React from 'react';
|
||||
import MovieSettings from './MovieSettings';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {callAPI} from '../../utils/Api';
|
||||
|
||||
describe('<MovieSettings/>', function () {
|
||||
it('renders without crashing ', function () {
|
||||
|
@ -1,8 +1,7 @@
|
||||
import React from 'react';
|
||||
import style from './MovieSettings.module.css';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode, callAPI} from '../../utils/Api';
|
||||
import {GeneralSuccess} from '../../types/GeneralTypes';
|
||||
import {APINode} from '../../types/ApiTypes';
|
||||
|
||||
interface state {
|
||||
text: string[];
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import {RouteComponentProps} from 'react-router';
|
||||
import {withRouter} from 'react-router-dom';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode, callAPI} from '../../utils/Api';
|
||||
import {Link} from 'react-router-dom';
|
||||
import DynamicContentContainer from '../../elements/DynamicContentContainer/DynamicContentContainer';
|
||||
import tileStyle from './EpisodeTile.module.css';
|
||||
@ -10,7 +10,6 @@ import {faPlay} from '@fortawesome/free-solid-svg-icons';
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import PageTitle, {Line} from '../../elements/PageTitle/PageTitle';
|
||||
import SideBar, {SideBarItem, SideBarTitle} from '../../elements/SideBar/SideBar';
|
||||
import {APINode} from '../../types/ApiTypes';
|
||||
|
||||
interface Props extends RouteComponentProps<{id: string}> {}
|
||||
|
||||
|
@ -6,10 +6,9 @@ import style from '../Player/Player.module.css';
|
||||
import {Plyr} from 'plyr-react';
|
||||
import plyrstyle from 'plyr-react/dist/plyr.css';
|
||||
import {DefaultPlyrOptions} from '../../types/GeneralTypes';
|
||||
import {callAPI} from 'gowebsecure';
|
||||
import {APINode, callAPI} from '../../utils/Api';
|
||||
import GlobalInfos from '../../utils/GlobalInfos';
|
||||
import PlyrJS from 'plyr';
|
||||
import {APINode} from '../../types/ApiTypes';
|
||||
|
||||
interface Props extends RouteComponentProps<{id: string}> {}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import Preview from '../../elements/Preview/Preview';
|
||||
import {callAPI, callAPIPlain} from 'gowebsecure';
|
||||
import {APINode, TVShow} from '../../types/ApiTypes';
|
||||
import {APINode, callAPI, callAPIPlain} from '../../utils/Api';
|
||||
import {TVShow} from '../../types/ApiTypes';
|
||||
import DynamicContentContainer from '../../elements/DynamicContentContainer/DynamicContentContainer';
|
||||
import {Route, Switch, useRouteMatch} from 'react-router-dom';
|
||||
import EpisodePage from './EpisodePage';
|
||||
|
@ -6,8 +6,8 @@ import '@testing-library/jest-dom/extend-expect';
|
||||
|
||||
import {configure} from 'enzyme';
|
||||
import Adapter from 'enzyme-adapter-react-16';
|
||||
import {CookieTokenStore} from "gowebsecure";
|
||||
import {token} from "gowebsecure";
|
||||
import {CookieTokenStore} from "./utils/TokenStore/CookieTokenStore";
|
||||
import {token} from "./utils/TokenHandler";
|
||||
|
||||
configure({adapter: new Adapter()});
|
||||
|
||||
@ -36,7 +36,7 @@ global.prepareFailingFetchApi = () => {
|
||||
};
|
||||
|
||||
global.callAPIMock = (resonse) => {
|
||||
const helpers = require('gowebsecure');
|
||||
const helpers = require('./utils/Api');
|
||||
helpers.callAPI = jest.fn().mockImplementation((_, __, func1) => {func1(resonse);});
|
||||
helpers.callApiUnsafe = jest.fn().mockImplementation((_, __, func1) => {func1(resonse);});
|
||||
};
|
||||
|
@ -1,14 +1,5 @@
|
||||
import {ActorType, TagType} from './VideoTypes';
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
export enum APINode {
|
||||
Settings = 'settings',
|
||||
Tags = 'tags',
|
||||
Actor = 'actor',
|
||||
Video = 'video',
|
||||
TVShow = 'tvshow'
|
||||
}
|
||||
|
||||
export namespace VideoTypes {
|
||||
export interface loadVideoType {
|
||||
MovieUrl: string;
|
||||
|
118
src/utils/Api.ts
Normal file
118
src/utils/Api.ts
Normal file
@ -0,0 +1,118 @@
|
||||
import GlobalInfos from './GlobalInfos';
|
||||
import {token} from './TokenHandler';
|
||||
|
||||
const APIPREFIX: string = '/api/';
|
||||
|
||||
/**
|
||||
* interface how an api request should look like
|
||||
*/
|
||||
interface ApiBaseRequest {
|
||||
action: string | number;
|
||||
|
||||
[_: string]: string | number | boolean | object;
|
||||
}
|
||||
|
||||
/**
|
||||
* A backend api call
|
||||
* @param apinode which api backend handler to call
|
||||
* @param fd the object to send to backend
|
||||
* @param callback the callback with json reply from backend
|
||||
* @param errorcallback a optional callback if an error occured
|
||||
*/
|
||||
export function callAPI<T>(
|
||||
apinode: APINode,
|
||||
fd: ApiBaseRequest,
|
||||
callback: (_: T) => void,
|
||||
errorcallback: (_: string) => void = (_: string): void => {}
|
||||
): void {
|
||||
token.checkAPITokenValid((mytoken) => {
|
||||
generalAPICall<T>(apinode, fd, callback, errorcallback, false, true, mytoken);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* make a public unsafe api call (without token) -- use as rare as possible only for initialization (eg. check if pwd is neccessary)
|
||||
* @param apinode
|
||||
* @param fd
|
||||
* @param callback
|
||||
* @param errorcallback
|
||||
*/
|
||||
export function callApiUnsafe<T>(
|
||||
apinode: APINode,
|
||||
fd: ApiBaseRequest,
|
||||
callback: (_: T) => void,
|
||||
errorcallback?: (_: string) => void
|
||||
): void {
|
||||
generalAPICall(apinode, fd, callback, errorcallback, true, true, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* A backend api call
|
||||
* @param apinode which api backend handler to call
|
||||
* @param fd the object to send to backend
|
||||
* @param callback the callback with PLAIN text reply from backend
|
||||
*/
|
||||
export function callAPIPlain(apinode: APINode, fd: ApiBaseRequest, callback: (_: string) => void): void {
|
||||
token.checkAPITokenValid((mytoken) => {
|
||||
generalAPICall(apinode, fd, callback, () => {}, false, false, mytoken);
|
||||
});
|
||||
}
|
||||
|
||||
function generalAPICall<T>(
|
||||
apinode: APINode,
|
||||
fd: ApiBaseRequest,
|
||||
callback: (_: T) => void,
|
||||
errorcallback: (_: string) => void = (_: string): void => {},
|
||||
unsafe: boolean,
|
||||
json: boolean,
|
||||
mytoken: string
|
||||
): void {
|
||||
(async function (): Promise<void> {
|
||||
const response = await fetch(APIPREFIX + apinode, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(fd),
|
||||
headers: new Headers({
|
||||
'Content-Type': json ? 'application/json' : 'text/plain',
|
||||
...(!unsafe && {Authorization: 'Bearer ' + mytoken})
|
||||
})
|
||||
});
|
||||
|
||||
if (response.status === 200) {
|
||||
// success
|
||||
try {
|
||||
// decode json or text
|
||||
const data = json ? await response.json() : await response.text();
|
||||
callback(data);
|
||||
} catch (e) {
|
||||
errorcallback(e);
|
||||
}
|
||||
} else if (response.status === 400) {
|
||||
// Bad Request --> invalid token
|
||||
console.log('loading Password page.');
|
||||
// load password page
|
||||
if (GlobalInfos.loadPasswordPage) {
|
||||
GlobalInfos.loadPasswordPage(() => {
|
||||
callAPI(apinode, fd, callback, errorcallback);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
console.log('Error: ' + response.statusText);
|
||||
if (errorcallback) {
|
||||
errorcallback(response.statusText);
|
||||
}
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
/**
|
||||
* API nodes definitions
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
export enum APINode {
|
||||
Settings = 'settings',
|
||||
Tags = 'tags',
|
||||
Actor = 'actor',
|
||||
Video = 'video',
|
||||
TVShow = 'tvshow'
|
||||
}
|
135
src/utils/TokenHandler.ts
Normal file
135
src/utils/TokenHandler.ts
Normal file
@ -0,0 +1,135 @@
|
||||
import {TokenStore} from './TokenStore/TokenStore';
|
||||
|
||||
export namespace token {
|
||||
// store api token - empty if not set
|
||||
let apiToken = '';
|
||||
|
||||
// a callback que to be called after api token refresh
|
||||
let callQue: ((error: string) => void)[] = [];
|
||||
// flag to check wheter a api refresh is currently pending
|
||||
let refreshInProcess = false;
|
||||
// store the expire seconds of token
|
||||
let expireSeconds = -1;
|
||||
|
||||
let tokenStore: TokenStore;
|
||||
let APiHost: string = '/';
|
||||
|
||||
export function init(ts: TokenStore, apiHost?: string): void {
|
||||
tokenStore = ts;
|
||||
if (apiHost) {
|
||||
APiHost = apiHost;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* refresh the api token or use that one in cookie if still valid
|
||||
* @param callback to be called after successful refresh
|
||||
* @param password
|
||||
* @param force
|
||||
*/
|
||||
export function refreshAPIToken(callback: (error: string) => void, force?: boolean, password?: string): void {
|
||||
callQue.push(callback);
|
||||
|
||||
// check if already is a token refresh is in process
|
||||
if (refreshInProcess) {
|
||||
// if yes return
|
||||
return;
|
||||
} else {
|
||||
// if not set flat
|
||||
refreshInProcess = true;
|
||||
}
|
||||
|
||||
if (apiTokenValid() && !force) {
|
||||
console.log('token still valid...');
|
||||
callFuncQue('');
|
||||
return;
|
||||
}
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('grant_type', 'client_credentials');
|
||||
formData.append('client_id', 'openmediacenter');
|
||||
formData.append('client_secret', password ? password : 'openmediacenter');
|
||||
formData.append('scope', 'all');
|
||||
|
||||
interface APIToken {
|
||||
error?: string;
|
||||
// eslint-disable-next-line camelcase
|
||||
access_token: string; // no camel case allowed because of backendlib
|
||||
// eslint-disable-next-line camelcase
|
||||
expires_in: number; // no camel case allowed because of backendlib
|
||||
scope: string;
|
||||
// eslint-disable-next-line camelcase
|
||||
token_type: string; // no camel case allowed because of backendlib
|
||||
}
|
||||
|
||||
console.log(APiHost);
|
||||
|
||||
fetch(APiHost + 'token', {method: 'POST', body: formData})
|
||||
.then((response) =>
|
||||
response.json().then((result: APIToken) => {
|
||||
if (result.error) {
|
||||
callFuncQue(result.error);
|
||||
return;
|
||||
}
|
||||
// set api token
|
||||
apiToken = result.access_token;
|
||||
// set expire time
|
||||
expireSeconds = new Date().getTime() / 1000 + result.expires_in;
|
||||
// setTokenCookie(apiToken, expireSeconds);
|
||||
tokenStore.setToken({accessToken: apiToken, expireTime: expireSeconds, tokenType: '', scope: ''});
|
||||
// call all handlers and release flag
|
||||
callFuncQue('');
|
||||
})
|
||||
)
|
||||
.catch((e) => {
|
||||
callback(e);
|
||||
});
|
||||
}
|
||||
|
||||
export function apiTokenValid(): boolean {
|
||||
// check if a cookie with token is available
|
||||
// const token = getTokenCookie();
|
||||
const tmptoken = tokenStore.loadToken();
|
||||
if (tmptoken !== null) {
|
||||
// check if token is at least valid for the next minute
|
||||
if (tmptoken.expireTime > new Date().getTime() / 1000 + 60) {
|
||||
apiToken = tmptoken.accessToken;
|
||||
expireSeconds = tmptoken.expireTime;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* call all qued callbacks
|
||||
*/
|
||||
function callFuncQue(error: string): void {
|
||||
// call all pending handlers
|
||||
callQue.map((func) => {
|
||||
return func(error);
|
||||
});
|
||||
// reset pending que
|
||||
callQue = [];
|
||||
// release flag to be able to start new refresh
|
||||
refreshInProcess = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* check if api token is valid -- if not request new one
|
||||
* when finished call callback
|
||||
* @param callback function to be called afterwards
|
||||
*/
|
||||
export function checkAPITokenValid(callback: (mytoken: string) => void): void {
|
||||
// check if token is valid and set
|
||||
if (apiToken === '' || expireSeconds <= new Date().getTime() / 1000) {
|
||||
console.log('token not valid...');
|
||||
refreshAPIToken(() => {
|
||||
callback(apiToken);
|
||||
});
|
||||
} else {
|
||||
callback(apiToken);
|
||||
}
|
||||
}
|
||||
}
|
48
src/utils/TokenStore/CookieTokenStore.ts
Normal file
48
src/utils/TokenStore/CookieTokenStore.ts
Normal file
@ -0,0 +1,48 @@
|
||||
import {Token, TokenStore} from './TokenStore';
|
||||
|
||||
export class CookieTokenStore extends TokenStore {
|
||||
loadToken(): Token | null {
|
||||
const token = this.decodeCookie('token');
|
||||
const expireInString = this.decodeCookie('token_expire');
|
||||
const expireIn = parseInt(expireInString, 10);
|
||||
|
||||
if (expireIn !== 0 && token !== '') {
|
||||
return {accessToken: token, expireTime: expireIn, scope: '', tokenType: ''};
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* set the cookie for the currently gotten token
|
||||
* @param token the token to set
|
||||
*/
|
||||
setToken(token: Token): void {
|
||||
let d = new Date();
|
||||
d.setTime(token.expireTime * 1000);
|
||||
console.log('token set' + d.toUTCString());
|
||||
let expires = 'expires=' + d.toUTCString();
|
||||
document.cookie = 'token=' + token.accessToken + ';' + expires + ';path=/';
|
||||
document.cookie = 'token_expire=' + token.expireTime + ';' + expires + ';path=/';
|
||||
}
|
||||
|
||||
/**
|
||||
* decode a simple cookie with key specified
|
||||
* @param key cookie key
|
||||
*/
|
||||
decodeCookie(key: string): string {
|
||||
let name = key + '=';
|
||||
let decodedCookie = decodeURIComponent(document.cookie);
|
||||
let ca = decodedCookie.split(';');
|
||||
for (let i = 0; i < ca.length; i++) {
|
||||
let c = ca[i];
|
||||
while (c.charAt(0) === ' ') {
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) === 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
}
|
11
src/utils/TokenStore/TokenStore.ts
Normal file
11
src/utils/TokenStore/TokenStore.ts
Normal file
@ -0,0 +1,11 @@
|
||||
export interface Token {
|
||||
accessToken: string;
|
||||
expireTime: number; // second time when token will be invalidated
|
||||
scope: string;
|
||||
tokenType: string;
|
||||
}
|
||||
|
||||
export abstract class TokenStore {
|
||||
abstract loadToken(): Token | null;
|
||||
abstract setToken(token: Token): void;
|
||||
}
|
395
yarn.lock
395
yarn.lock
@ -1243,21 +1243,6 @@
|
||||
minimatch "^3.0.4"
|
||||
strip-json-comments "^3.1.1"
|
||||
|
||||
"@eslint/eslintrc@^0.4.3":
|
||||
version "0.4.3"
|
||||
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
|
||||
integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==
|
||||
dependencies:
|
||||
ajv "^6.12.4"
|
||||
debug "^4.1.1"
|
||||
espree "^7.3.0"
|
||||
globals "^13.9.0"
|
||||
ignore "^4.0.6"
|
||||
import-fresh "^3.2.1"
|
||||
js-yaml "^3.13.1"
|
||||
minimatch "^3.0.4"
|
||||
strip-json-comments "^3.1.1"
|
||||
|
||||
"@fortawesome/fontawesome-common-types@^0.2.35":
|
||||
version "0.2.35"
|
||||
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.35.tgz#01dd3d054da07a00b764d78748df20daf2b317e9"
|
||||
@ -1323,20 +1308,6 @@
|
||||
dependencies:
|
||||
"@hapi/hoek" "^8.3.0"
|
||||
|
||||
"@humanwhocodes/config-array@^0.5.0":
|
||||
version "0.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9"
|
||||
integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==
|
||||
dependencies:
|
||||
"@humanwhocodes/object-schema" "^1.2.0"
|
||||
debug "^4.1.1"
|
||||
minimatch "^3.0.4"
|
||||
|
||||
"@humanwhocodes/object-schema@^1.2.0":
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf"
|
||||
integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==
|
||||
|
||||
"@istanbuljs/load-nyc-config@^1.0.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
|
||||
@ -1524,17 +1495,6 @@
|
||||
"@types/yargs" "^15.0.0"
|
||||
chalk "^4.0.0"
|
||||
|
||||
"@jest/types@^27.0.6":
|
||||
version "27.0.6"
|
||||
resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.0.6.tgz#9a992bc517e0c49f035938b8549719c2de40706b"
|
||||
integrity sha512-aSquT1qa9Pik26JK5/3rvnYb4bGtm1VFNesHKmNTwmPIgOrixvhL2ghIvFRNEpzy3gU+rUgjIF/KodbkFAl++g==
|
||||
dependencies:
|
||||
"@types/istanbul-lib-coverage" "^2.0.0"
|
||||
"@types/istanbul-reports" "^3.0.0"
|
||||
"@types/node" "*"
|
||||
"@types/yargs" "^16.0.0"
|
||||
chalk "^4.0.0"
|
||||
|
||||
"@nodelib/fs.scandir@2.1.5":
|
||||
version "2.1.5"
|
||||
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
|
||||
@ -1759,10 +1719,10 @@
|
||||
dependencies:
|
||||
defer-to-connect "^1.0.1"
|
||||
|
||||
"@testing-library/dom@^8.0.0":
|
||||
version "8.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.1.0.tgz#f8358b1883844ea569ba76b7e94582168df5370d"
|
||||
integrity sha512-kmW9alndr19qd6DABzQ978zKQ+J65gU2Rzkl8hriIetPnwpesRaK4//jEQyYh8fEALmGhomD/LBQqt+o+DL95Q==
|
||||
"@testing-library/dom@^7.28.1":
|
||||
version "7.31.2"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.31.2.tgz#df361db38f5212b88555068ab8119f5d841a8c4a"
|
||||
integrity sha512-3UqjCpey6HiTZT92vODYLPxTBWlM8ZOOjr3LX5F37/VRipW2M1kX6I/Cm4VXzteZqfGfagg8yXywpcOgQBlNsQ==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.10.4"
|
||||
"@babel/runtime" "^7.12.5"
|
||||
@ -1771,12 +1731,12 @@
|
||||
chalk "^4.1.0"
|
||||
dom-accessibility-api "^0.5.6"
|
||||
lz-string "^1.4.4"
|
||||
pretty-format "^27.0.2"
|
||||
pretty-format "^26.6.2"
|
||||
|
||||
"@testing-library/jest-dom@^5.14.1":
|
||||
version "5.14.1"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-5.14.1.tgz#8501e16f1e55a55d675fe73eecee32cdaddb9766"
|
||||
integrity sha512-dfB7HVIgTNCxH22M1+KU6viG5of2ldoA5ly8Ar8xkezKHKXjRvznCdbMbqjYGgO2xjRbwnR+rR8MLUIqF3kKbQ==
|
||||
"@testing-library/jest-dom@^5.11.6":
|
||||
version "5.13.0"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-5.13.0.tgz#0a365684e2c1159f857f5915be50089fc5657df0"
|
||||
integrity sha512-+jXXTn8GjRnZkJfzG/tqK/2Q7dGlBInR412WE7Aml7CT3wdSpx5dMQC0HOwVQoZ3cNTmQUy8fCVGUV/Zhoyvcw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.9.2"
|
||||
"@types/testing-library__jest-dom" "^5.9.1"
|
||||
@ -1784,22 +1744,21 @@
|
||||
chalk "^3.0.0"
|
||||
css "^3.0.0"
|
||||
css.escape "^1.5.1"
|
||||
dom-accessibility-api "^0.5.6"
|
||||
lodash "^4.17.15"
|
||||
redent "^3.0.0"
|
||||
|
||||
"@testing-library/react@^12.0.0":
|
||||
version "12.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-12.0.0.tgz#9aeb2264521522ab9b68f519eaf15136148f164a"
|
||||
integrity sha512-sh3jhFgEshFyJ/0IxGltRhwZv2kFKfJ3fN1vTZ6hhMXzz9ZbbcTgmDYM4e+zJv+oiVKKEWZPyqPAh4MQBI65gA==
|
||||
"@testing-library/react@^11.2.2":
|
||||
version "11.2.7"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-11.2.7.tgz#b29e2e95c6765c815786c0bc1d5aed9cb2bf7818"
|
||||
integrity sha512-tzRNp7pzd5QmbtXNG/mhdcl7Awfu/Iz1RaVHY75zTdOkmHCuzMhRL83gWHSgOAcjS3CCbyfwUHMZgRJb4kAfpA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.5"
|
||||
"@testing-library/dom" "^8.0.0"
|
||||
"@testing-library/dom" "^7.28.1"
|
||||
|
||||
"@testing-library/user-event@^13.2.1":
|
||||
version "13.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-13.2.1.tgz#7a71a39e50b4a733afbe2916fa2b99966e941f98"
|
||||
integrity sha512-cczlgVl+krjOb3j1625usarNEibI0IFRJrSWX9UsJ1HKYFgCQv9Nb7QAipUDXl3Xdz8NDTsiS78eAkPSxlzTlw==
|
||||
"@testing-library/user-event@^13.1.9":
|
||||
version "13.1.9"
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-13.1.9.tgz#29e49a42659ac3c1023565ff56819e0153a82e99"
|
||||
integrity sha512-NZr0zL2TMOs2qk+dNlqrAdbaRW5dAmYwd1yuQ4r7HpkVEOj0MWuUjDWwKhcLd/atdBy8ZSMHSKp+kXSQe47ezg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.5"
|
||||
|
||||
@ -1913,7 +1872,7 @@
|
||||
dependencies:
|
||||
"@types/istanbul-lib-report" "*"
|
||||
|
||||
"@types/jest@*":
|
||||
"@types/jest@*", "@types/jest@^26.0.19":
|
||||
version "26.0.23"
|
||||
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7"
|
||||
integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA==
|
||||
@ -1921,14 +1880,6 @@
|
||||
jest-diff "^26.0.0"
|
||||
pretty-format "^26.0.0"
|
||||
|
||||
"@types/jest@^26.0.24":
|
||||
version "26.0.24"
|
||||
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.24.tgz#943d11976b16739185913a1936e0de0c4a7d595a"
|
||||
integrity sha512-E/X5Vib8BWqZNRlDxj9vYXhsDwPYbPINqKF9BsnSoon4RQ0D9moEuLD8txgyypFLH7J4+Lho9Nr/c8H0Fi+17w==
|
||||
dependencies:
|
||||
jest-diff "^26.0.0"
|
||||
pretty-format "^26.0.0"
|
||||
|
||||
"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6", "@types/json-schema@^7.0.7":
|
||||
version "7.0.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad"
|
||||
@ -1944,16 +1895,11 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.4.tgz#f0ec25dbf2f0e4b18647313ac031134ca5b24b21"
|
||||
integrity sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==
|
||||
|
||||
"@types/node@*":
|
||||
"@types/node@*", "@types/node@^15.12.2":
|
||||
version "15.12.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.2.tgz#1f2b42c4be7156ff4a6f914b2fb03d05fa84e38d"
|
||||
integrity sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==
|
||||
|
||||
"@types/node@^16.4.7":
|
||||
version "16.4.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.7.tgz#f7afa78769d4b477f5092d7c3468e2e8653d779c"
|
||||
integrity sha512-aDDY54sst8sx47CWT6QQqIZp45yURq4dic0+HCYfYNcY5Ejlb/CLmFnRLfy3wQuYafOeh3lB/DAKaqRKBtcZmA==
|
||||
|
||||
"@types/normalize-package-data@^2.4.0":
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
|
||||
@ -1979,23 +1925,23 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24"
|
||||
integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==
|
||||
|
||||
"@types/react-dom@^17.0.9":
|
||||
version "17.0.9"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.9.tgz#441a981da9d7be117042e1a6fd3dac4b30f55add"
|
||||
integrity sha512-wIvGxLfgpVDSAMH5utdL9Ngm5Owu0VsGmldro3ORLXV8CShrL8awVj06NuEXFQ5xyaYfdca7Sgbk/50Ri1GdPg==
|
||||
"@types/react-dom@^17.0.1":
|
||||
version "17.0.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.7.tgz#b8ee15ead9e5d6c2c858b44949fdf2ebe5212232"
|
||||
integrity sha512-Wd5xvZRlccOrCTej8jZkoFZuZRKHzanDDv1xglI33oBNFMWrqOSzrvWFw7ngSiZjrpJAzPKFtX7JvuXpkNmQHA==
|
||||
dependencies:
|
||||
"@types/react" "*"
|
||||
|
||||
"@types/react-router-dom@^5.1.8":
|
||||
version "5.1.8"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.1.8.tgz#bf3e1c8149b3d62eaa206d58599de82df0241192"
|
||||
integrity sha512-03xHyncBzG0PmDmf8pf3rehtjY0NpUj7TIN46FrT5n1ZWHPZvXz32gUyNboJ+xsL8cpg8bQVLcllptcQHvocrw==
|
||||
"@types/react-router-dom@^5.1.6":
|
||||
version "5.1.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.1.7.tgz#a126d9ea76079ffbbdb0d9225073eb5797ab7271"
|
||||
integrity sha512-D5mHD6TbdV/DNHYsnwBTv+y73ei+mMjrkGrla86HthE4/PVvL1J94Bu3qABU+COXzpL23T1EZapVVpwHuBXiUg==
|
||||
dependencies:
|
||||
"@types/history" "*"
|
||||
"@types/react" "*"
|
||||
"@types/react-router" "*"
|
||||
|
||||
"@types/react-router@*":
|
||||
"@types/react-router@*", "@types/react-router@5.1.15":
|
||||
version "5.1.15"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.15.tgz#c1069e0da4617fd315e381b56b18b89490e14e2a"
|
||||
integrity sha512-z3UlMG/x91SFEVmmvykk9FLTliDvfdIUky4k2rCfXWQ0NKbrP8o9BTCaCTPuYsB8gDkUnUmkcA2vYlm2DR+HAA==
|
||||
@ -2003,14 +1949,6 @@
|
||||
"@types/history" "*"
|
||||
"@types/react" "*"
|
||||
|
||||
"@types/react-router@5.1.16":
|
||||
version "5.1.16"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.16.tgz#f3ba045fb96634e38b21531c482f9aeb37608a99"
|
||||
integrity sha512-8d7nR/fNSqlTFGHti0R3F9WwIertOaaA1UEB8/jr5l5mDMOs4CidEgvvYMw4ivqrBK+vtVLxyTj2P+Pr/dtgzg==
|
||||
dependencies:
|
||||
"@types/history" "*"
|
||||
"@types/react" "*"
|
||||
|
||||
"@types/react-transition-group@^4.4.1":
|
||||
version "4.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-4.4.1.tgz#e1a3cb278df7f47f17b5082b1b3da17170bd44b1"
|
||||
@ -2018,7 +1956,7 @@
|
||||
dependencies:
|
||||
"@types/react" "*"
|
||||
|
||||
"@types/react@*", "@types/react@>=16.14.8", "@types/react@>=16.9.11":
|
||||
"@types/react@*", "@types/react@>=16.14.8", "@types/react@>=16.9.11", "@types/react@^17.0.2":
|
||||
version "17.0.11"
|
||||
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.11.tgz#67fcd0ddbf5a0b083a0f94e926c7d63f3b836451"
|
||||
integrity sha512-yFRQbD+whVonItSk7ZzP/L+gPTJVBkL/7shLEF+i9GC/1cV3JmUxEQz6+9ylhUpWSDuqo1N9qEvqS6vTj4USUA==
|
||||
@ -2027,15 +1965,6 @@
|
||||
"@types/scheduler" "*"
|
||||
csstype "^3.0.2"
|
||||
|
||||
"@types/react@^17.0.15":
|
||||
version "17.0.15"
|
||||
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.15.tgz#c7533dc38025677e312606502df7656a6ea626d0"
|
||||
integrity sha512-uTKHDK9STXFHLaKv6IMnwp52fm0hwU+N89w/p9grdUqcFA6WuqDyPhaWopbNyE1k/VhgzmHl8pu1L4wITtmlLw==
|
||||
dependencies:
|
||||
"@types/prop-types" "*"
|
||||
"@types/scheduler" "*"
|
||||
csstype "^3.0.2"
|
||||
|
||||
"@types/resolve@0.0.8":
|
||||
version "0.0.8"
|
||||
resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194"
|
||||
@ -2115,27 +2044,7 @@
|
||||
dependencies:
|
||||
"@types/yargs-parser" "*"
|
||||
|
||||
"@types/yargs@^16.0.0":
|
||||
version "16.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977"
|
||||
integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==
|
||||
dependencies:
|
||||
"@types/yargs-parser" "*"
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^4.28.5":
|
||||
version "4.28.5"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.28.5.tgz#8197f1473e7da8218c6a37ff308d695707835684"
|
||||
integrity sha512-m31cPEnbuCqXtEZQJOXAHsHvtoDi9OVaeL5wZnO2KZTnkvELk+u6J6jHg+NzvWQxk+87Zjbc4lJS4NHmgImz6Q==
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils" "4.28.5"
|
||||
"@typescript-eslint/scope-manager" "4.28.5"
|
||||
debug "^4.3.1"
|
||||
functional-red-black-tree "^1.0.1"
|
||||
regexpp "^3.1.0"
|
||||
semver "^7.3.5"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^4.5.0":
|
||||
"@typescript-eslint/eslint-plugin@^4.17.0", "@typescript-eslint/eslint-plugin@^4.5.0":
|
||||
version "4.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.26.1.tgz#b9c7313321cb837e2bf8bebe7acc2220659e67d3"
|
||||
integrity sha512-aoIusj/8CR+xDWmZxARivZjbMBQTT9dImUtdZ8tVCVRXgBUuuZyM5Of5A9D9arQPxbi/0rlJLcuArclz/rCMJw==
|
||||
@ -2161,18 +2070,6 @@
|
||||
eslint-scope "^5.1.1"
|
||||
eslint-utils "^3.0.0"
|
||||
|
||||
"@typescript-eslint/experimental-utils@4.28.5":
|
||||
version "4.28.5"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.28.5.tgz#66c28bef115b417cf9d80812a713e0e46bb42a64"
|
||||
integrity sha512-bGPLCOJAa+j49hsynTaAtQIWg6uZd8VLiPcyDe4QPULsvQwLHGLSGKKcBN8/lBxIX14F74UEMK2zNDI8r0okwA==
|
||||
dependencies:
|
||||
"@types/json-schema" "^7.0.7"
|
||||
"@typescript-eslint/scope-manager" "4.28.5"
|
||||
"@typescript-eslint/types" "4.28.5"
|
||||
"@typescript-eslint/typescript-estree" "4.28.5"
|
||||
eslint-scope "^5.1.1"
|
||||
eslint-utils "^3.0.0"
|
||||
|
||||
"@typescript-eslint/experimental-utils@^3.10.1":
|
||||
version "3.10.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz#e179ffc81a80ebcae2ea04e0332f8b251345a686"
|
||||
@ -2184,17 +2081,7 @@
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-utils "^2.0.0"
|
||||
|
||||
"@typescript-eslint/parser@^4.28.5":
|
||||
version "4.28.5"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.28.5.tgz#9c971668f86d1b5c552266c47788a87488a47d1c"
|
||||
integrity sha512-NPCOGhTnkXGMqTznqgVbA5LqVsnw+i3+XA1UKLnAb+MG1Y1rP4ZSK9GX0kJBmAZTMIktf+dTwXToT6kFwyimbw==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "4.28.5"
|
||||
"@typescript-eslint/types" "4.28.5"
|
||||
"@typescript-eslint/typescript-estree" "4.28.5"
|
||||
debug "^4.3.1"
|
||||
|
||||
"@typescript-eslint/parser@^4.5.0":
|
||||
"@typescript-eslint/parser@^4.17.0", "@typescript-eslint/parser@^4.5.0":
|
||||
version "4.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.26.1.tgz#cecfdd5eb7a5c13aabce1c1cfd7fbafb5a0f1e8e"
|
||||
integrity sha512-q7F3zSo/nU6YJpPJvQveVlIIzx9/wu75lr6oDbDzoeIRWxpoc/HQ43G4rmMoCc5my/3uSj2VEpg/D83LYZF5HQ==
|
||||
@ -2212,14 +2099,6 @@
|
||||
"@typescript-eslint/types" "4.26.1"
|
||||
"@typescript-eslint/visitor-keys" "4.26.1"
|
||||
|
||||
"@typescript-eslint/scope-manager@4.28.5":
|
||||
version "4.28.5"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.28.5.tgz#3a1b70c50c1535ac33322786ea99ebe403d3b923"
|
||||
integrity sha512-PHLq6n9nTMrLYcVcIZ7v0VY1X7dK309NM8ya9oL/yG8syFINIMHxyr2GzGoBYUdv3NUfCOqtuqps0ZmcgnZTfQ==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "4.28.5"
|
||||
"@typescript-eslint/visitor-keys" "4.28.5"
|
||||
|
||||
"@typescript-eslint/types@3.10.1":
|
||||
version "3.10.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727"
|
||||
@ -2230,11 +2109,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.26.1.tgz#9e7c523f73c34b04a765e4167ca5650436ef1d38"
|
||||
integrity sha512-STyMPxR3cS+LaNvS8yK15rb8Y0iL0tFXq0uyl6gY45glyI7w0CsyqyEXl/Fa0JlQy+pVANeK3sbwPneCbWE7yg==
|
||||
|
||||
"@typescript-eslint/types@4.28.5":
|
||||
version "4.28.5"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.28.5.tgz#d33edf8e429f0c0930a7c3d44e9b010354c422e9"
|
||||
integrity sha512-MruOu4ZaDOLOhw4f/6iudyks/obuvvZUAHBDSW80Trnc5+ovmViLT2ZMDXhUV66ozcl6z0LJfKs1Usldgi/WCA==
|
||||
|
||||
"@typescript-eslint/typescript-estree@3.10.1":
|
||||
version "3.10.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz#fd0061cc38add4fad45136d654408569f365b853"
|
||||
@ -2262,19 +2136,6 @@
|
||||
semver "^7.3.5"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/typescript-estree@4.28.5":
|
||||
version "4.28.5"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.28.5.tgz#4906d343de693cf3d8dcc301383ed638e0441cd1"
|
||||
integrity sha512-FzJUKsBX8poCCdve7iV7ShirP8V+ys2t1fvamVeD1rWpiAnIm550a+BX/fmTHrjEpQJ7ZAn+Z7ZZwJjytk9rZw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "4.28.5"
|
||||
"@typescript-eslint/visitor-keys" "4.28.5"
|
||||
debug "^4.3.1"
|
||||
globby "^11.0.3"
|
||||
is-glob "^4.0.1"
|
||||
semver "^7.3.5"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/visitor-keys@3.10.1":
|
||||
version "3.10.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz#cd4274773e3eb63b2e870ac602274487ecd1e931"
|
||||
@ -2290,13 +2151,13 @@
|
||||
"@typescript-eslint/types" "4.26.1"
|
||||
eslint-visitor-keys "^2.0.0"
|
||||
|
||||
"@typescript-eslint/visitor-keys@4.28.5":
|
||||
version "4.28.5"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.5.tgz#ffee2c602762ed6893405ee7c1144d9cc0a29675"
|
||||
integrity sha512-dva/7Rr+EkxNWdJWau26xU/0slnFlkh88v3TsyTgRS/IIYFi5iIfpCFM4ikw0vQTFUR9FYSSyqgK4w64gsgxhg==
|
||||
"@vimeo/player@2.8.2":
|
||||
version "2.8.2"
|
||||
resolved "https://registry.yarnpkg.com/@vimeo/player/-/player-2.8.2.tgz#0e69e34ad9c9da4805a6dfa04ac833949de8be23"
|
||||
integrity sha512-OVD+WLW7mP9R7h+QZ5qeVJsTa3uvQ83nQE2rLFQkhhJ2zl5CnSWr3ctFedn4ggZrykyve6zbovZ8f6Xc0EIJHw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "4.28.5"
|
||||
eslint-visitor-keys "^2.0.0"
|
||||
native-promise-only "0.8.1"
|
||||
weakmap-polyfill "2.0.0"
|
||||
|
||||
"@webassemblyjs/ast@1.9.0":
|
||||
version "1.9.0"
|
||||
@ -2640,11 +2501,6 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0:
|
||||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
ansi-styles@^5.0.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
|
||||
integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
|
||||
|
||||
anymatch@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb"
|
||||
@ -3212,10 +3068,10 @@ boolbase@^1.0.0, boolbase@~1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
|
||||
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
|
||||
|
||||
bootstrap@^5.0.2:
|
||||
version "5.0.2"
|
||||
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.0.2.tgz#aff23d5e0e03c31255ad437530ee6556e78e728e"
|
||||
integrity sha512-1Ge963tyEQWJJ+8qtXFU6wgmAVj9gweEjibUdbmcCEYsn38tVwRk8107rk2vzt6cfQcRr3SlZ8aQBqaD8aqf+Q==
|
||||
bootstrap@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.0.1.tgz#e7939d599119dc818a90478a2a299bdaff037e09"
|
||||
integrity sha512-Fl79+wsLOZKoiU345KeEaWD0ik8WKRI5zm0YSPj2oF1Qr+BO7z0fco6GbUtqjoG1h4VI89PeKJnMsMMVQdKKTw==
|
||||
|
||||
boxen@^4.2.0:
|
||||
version "4.2.0"
|
||||
@ -4468,7 +4324,7 @@ deep-is@^0.1.3, deep-is@~0.1.3:
|
||||
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
|
||||
integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
|
||||
|
||||
deepmerge@^4.2.2:
|
||||
deepmerge@^4.0.0, deepmerge@^4.2.2:
|
||||
version "4.2.2"
|
||||
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"
|
||||
integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==
|
||||
@ -5119,20 +4975,13 @@ eslint-plugin-import@^2.22.1:
|
||||
resolve "^1.20.0"
|
||||
tsconfig-paths "^3.9.0"
|
||||
|
||||
eslint-plugin-jest@^24.1.0:
|
||||
eslint-plugin-jest@^24.1.0, eslint-plugin-jest@^24.3.1:
|
||||
version "24.3.6"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.6.tgz#5f0ca019183c3188c5ad3af8e80b41de6c8e9173"
|
||||
integrity sha512-WOVH4TIaBLIeCX576rLcOgjNXqP+jNlCiEmRgFTfQtJ52DpwnIQKAVGlGPAN7CZ33bW6eNfHD6s8ZbEUTQubJg==
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils" "^4.0.1"
|
||||
|
||||
eslint-plugin-jest@^24.4.0:
|
||||
version "24.4.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.4.0.tgz#fa4b614dbd46a98b652d830377971f097bda9262"
|
||||
integrity sha512-8qnt/hgtZ94E9dA6viqfViKBfkJwFHXgJmTWlMGDgunw1XJEGqm3eiPjDsTanM3/u/3Az82nyQM9GX7PM/QGmg==
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils" "^4.0.1"
|
||||
|
||||
eslint-plugin-jsx-a11y@^6.3.1:
|
||||
version "6.4.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz#a2d84caa49756942f42f1ffab9002436391718fd"
|
||||
@ -5239,7 +5088,7 @@ eslint-webpack-plugin@^2.5.2:
|
||||
normalize-path "^3.0.0"
|
||||
schema-utils "^3.0.0"
|
||||
|
||||
eslint@^7.11.0:
|
||||
eslint@^7.11.0, eslint@^7.22.0:
|
||||
version "7.28.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.28.0.tgz#435aa17a0b82c13bb2be9d51408b617e49c1e820"
|
||||
integrity sha512-UMfH0VSjP0G4p3EWirscJEQ/cHqnT/iuH6oNZOB94nBjWbMnhGEPxsZm1eyIW0C/9jLI0Fow4W5DXLjEI7mn1g==
|
||||
@ -5284,52 +5133,6 @@ eslint@^7.11.0:
|
||||
text-table "^0.2.0"
|
||||
v8-compile-cache "^2.0.3"
|
||||
|
||||
eslint@^7.31.0:
|
||||
version "7.31.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.31.0.tgz#f972b539424bf2604907a970860732c5d99d3aca"
|
||||
integrity sha512-vafgJpSh2ia8tnTkNUkwxGmnumgckLh5aAbLa1xRmIn9+owi8qBNGKL+B881kNKNTy7FFqTEkpNkUvmw0n6PkA==
|
||||
dependencies:
|
||||
"@babel/code-frame" "7.12.11"
|
||||
"@eslint/eslintrc" "^0.4.3"
|
||||
"@humanwhocodes/config-array" "^0.5.0"
|
||||
ajv "^6.10.0"
|
||||
chalk "^4.0.0"
|
||||
cross-spawn "^7.0.2"
|
||||
debug "^4.0.1"
|
||||
doctrine "^3.0.0"
|
||||
enquirer "^2.3.5"
|
||||
escape-string-regexp "^4.0.0"
|
||||
eslint-scope "^5.1.1"
|
||||
eslint-utils "^2.1.0"
|
||||
eslint-visitor-keys "^2.0.0"
|
||||
espree "^7.3.1"
|
||||
esquery "^1.4.0"
|
||||
esutils "^2.0.2"
|
||||
fast-deep-equal "^3.1.3"
|
||||
file-entry-cache "^6.0.1"
|
||||
functional-red-black-tree "^1.0.1"
|
||||
glob-parent "^5.1.2"
|
||||
globals "^13.6.0"
|
||||
ignore "^4.0.6"
|
||||
import-fresh "^3.0.0"
|
||||
imurmurhash "^0.1.4"
|
||||
is-glob "^4.0.0"
|
||||
js-yaml "^3.13.1"
|
||||
json-stable-stringify-without-jsonify "^1.0.1"
|
||||
levn "^0.4.1"
|
||||
lodash.merge "^4.6.2"
|
||||
minimatch "^3.0.4"
|
||||
natural-compare "^1.4.0"
|
||||
optionator "^0.9.1"
|
||||
progress "^2.0.0"
|
||||
regexpp "^3.1.0"
|
||||
semver "^7.2.1"
|
||||
strip-ansi "^6.0.0"
|
||||
strip-json-comments "^3.1.0"
|
||||
table "^6.0.9"
|
||||
text-table "^0.2.0"
|
||||
v8-compile-cache "^2.0.3"
|
||||
|
||||
espree@^7.3.0, espree@^7.3.1:
|
||||
version "7.3.1"
|
||||
resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6"
|
||||
@ -5388,7 +5191,7 @@ etag@~1.8.1:
|
||||
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
|
||||
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
|
||||
|
||||
eventemitter3@^4.0.0:
|
||||
eventemitter3@^4.0.0, eventemitter3@^4.0.3:
|
||||
version "4.0.7"
|
||||
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
|
||||
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==
|
||||
@ -6049,18 +5852,6 @@ got@^9.6.0:
|
||||
to-readable-stream "^1.0.0"
|
||||
url-parse-lax "^3.0.0"
|
||||
|
||||
gowebsecure-react@0.1.0-beta.3:
|
||||
version "0.1.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/gowebsecure-react/-/gowebsecure-react-0.1.0-beta.3.tgz#f614761c6d31550718d5455b219065f7dafd7664"
|
||||
integrity sha512-8Vefh/VGuJIjcD0LbMcbmAv33DhyVALxgz2j8N5Q2Hjpvm6R20CIt2xRtJeHFDqbXcmfn2Z6rda0yQJ/6OFi6g==
|
||||
|
||||
gowebsecure@0.1.1-beta.2:
|
||||
version "0.1.1-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/gowebsecure/-/gowebsecure-0.1.1-beta.2.tgz#3b9aaa1f83af9a7c2423da8e0ee605dc018d463b"
|
||||
integrity sha512-8QpoBYfmUGAcKrPkyTl6e+WNzJ/NPRk1NxY3+J0K/z7z4w/dG/3Njie+J3IS0L+u8Dpp9pYXZHONbv/W11DUqA==
|
||||
dependencies:
|
||||
typescript "^4.1.2"
|
||||
|
||||
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4:
|
||||
version "4.2.6"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
|
||||
@ -6203,6 +5994,14 @@ history@^4.9.0:
|
||||
tiny-warning "^1.0.0"
|
||||
value-equal "^1.0.1"
|
||||
|
||||
hls.js@^0.14.12:
|
||||
version "0.14.17"
|
||||
resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-0.14.17.tgz#0127cff2ec2f994a54eb955fe669ef6153a8e317"
|
||||
integrity sha512-25A7+m6qqp6UVkuzUQ//VVh2EEOPYlOBg32ypr34bcPO7liBMOkKFvbjbCBfiPAOTA/7BSx1Dujft3Th57WyFg==
|
||||
dependencies:
|
||||
eventemitter3 "^4.0.3"
|
||||
url-toolkit "^2.1.6"
|
||||
|
||||
hmac-drbg@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
|
||||
@ -7747,6 +7546,11 @@ load-json-file@^4.0.0:
|
||||
pify "^3.0.0"
|
||||
strip-bom "^3.0.0"
|
||||
|
||||
load-script@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/load-script/-/load-script-1.0.0.tgz#0491939e0bee5643ee494a7e3da3d2bac70c6ca4"
|
||||
integrity sha1-BJGTngvuVkPuSUp+PaPSuscMbKQ=
|
||||
|
||||
loader-runner@^2.4.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357"
|
||||
@ -8022,6 +7826,11 @@ media-typer@0.3.0:
|
||||
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
|
||||
integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
|
||||
|
||||
memoize-one@^5.1.1:
|
||||
version "5.2.1"
|
||||
resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e"
|
||||
integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==
|
||||
|
||||
memory-fs@^0.4.1:
|
||||
version "0.4.1"
|
||||
resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552"
|
||||
@ -8324,6 +8133,11 @@ nanomatch@^1.2.9:
|
||||
snapdragon "^0.8.1"
|
||||
to-regex "^3.0.1"
|
||||
|
||||
native-promise-only@0.8.1:
|
||||
version "0.8.1"
|
||||
resolved "https://registry.yarnpkg.com/native-promise-only/-/native-promise-only-0.8.1.tgz#20a318c30cb45f71fe7adfbf7b21c99c1472ef11"
|
||||
integrity sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=
|
||||
|
||||
native-url@^0.2.6:
|
||||
version "0.2.6"
|
||||
resolved "https://registry.yarnpkg.com/native-url/-/native-url-0.2.6.tgz#ca1258f5ace169c716ff44eccbddb674e10399ae"
|
||||
@ -9814,10 +9628,10 @@ prettier-linter-helpers@^1.0.0:
|
||||
dependencies:
|
||||
fast-diff "^1.1.2"
|
||||
|
||||
prettier@^2.3.2:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d"
|
||||
integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==
|
||||
prettier@^2.2.1:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6"
|
||||
integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==
|
||||
|
||||
pretty-bytes@^5.3.0:
|
||||
version "5.6.0"
|
||||
@ -9842,15 +9656,28 @@ pretty-format@^26.0.0, pretty-format@^26.6.0, pretty-format@^26.6.2:
|
||||
ansi-styles "^4.0.0"
|
||||
react-is "^17.0.1"
|
||||
|
||||
pretty-format@^27.0.2:
|
||||
version "27.0.6"
|
||||
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.0.6.tgz#ab770c47b2c6f893a21aefc57b75da63ef49a11f"
|
||||
integrity sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ==
|
||||
pro-gallery-lib@4.0.4:
|
||||
version "4.0.4"
|
||||
resolved "https://registry.yarnpkg.com/pro-gallery-lib/-/pro-gallery-lib-4.0.4.tgz#7c7957342541ca13a7ad5bea3899a5207b30541c"
|
||||
integrity sha512-XOkgaRnn/nfxC26ixEcOlIiiBfxR551Wfa6gJrru/BPnGHs8rGDU5XpJ38L2AFc2FewW+PaOJS2kTr0xrnjL1Q==
|
||||
dependencies:
|
||||
"@jest/types" "^27.0.6"
|
||||
ansi-regex "^5.0.0"
|
||||
ansi-styles "^5.0.0"
|
||||
react-is "^17.0.1"
|
||||
pro-layouts "4.0.4"
|
||||
|
||||
pro-gallery@^4.0.4:
|
||||
version "4.0.4"
|
||||
resolved "https://registry.yarnpkg.com/pro-gallery/-/pro-gallery-4.0.4.tgz#16ce8a7914b51e8dcdaeb7220659b72a0b1b7d68"
|
||||
integrity sha512-beDh0BIz9K3LZ+Zf2HoxMnZZ7/tC55Hwdm4PYRemEHtSp0ap4dEiKwU+L2cTUmUg2UXgxTaZtAdt0J8jIAZWmg==
|
||||
dependencies:
|
||||
"@vimeo/player" "2.8.2"
|
||||
hls.js "^0.14.12"
|
||||
pro-gallery-lib "4.0.4"
|
||||
pro-layouts "4.0.4"
|
||||
react-player "^2.6.2"
|
||||
|
||||
pro-layouts@4.0.4:
|
||||
version "4.0.4"
|
||||
resolved "https://registry.yarnpkg.com/pro-layouts/-/pro-layouts-4.0.4.tgz#41809f5a1112be20436784ead5bb4875b95c808a"
|
||||
integrity sha512-+oDhHV7/LF9TTG7+7RAMjDGVwbHF4NmCbLCe/zG7xKDHVrPuOYiSRTeLVhqpwQbIdve8P7IjNar9YmFkIHem8A==
|
||||
|
||||
process-nextick-args@~2.0.0:
|
||||
version "2.0.1"
|
||||
@ -10190,6 +10017,11 @@ react-error-overlay@^6.0.9:
|
||||
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.9.tgz#3c743010c9359608c375ecd6bc76f35d93995b0a"
|
||||
integrity sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==
|
||||
|
||||
react-fast-compare@^3.0.1:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb"
|
||||
integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==
|
||||
|
||||
react-is@^16.13.1, react-is@^16.3.2, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.6:
|
||||
version "16.13.1"
|
||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
|
||||
@ -10219,6 +10051,17 @@ react-overlays@^5.0.1:
|
||||
uncontrollable "^7.2.1"
|
||||
warning "^4.0.3"
|
||||
|
||||
react-player@^2.6.2:
|
||||
version "2.9.0"
|
||||
resolved "https://registry.yarnpkg.com/react-player/-/react-player-2.9.0.tgz#ef7fe7073434087565f00ff219824e1e02c4b046"
|
||||
integrity sha512-jNUkTfMmUhwPPAktAdIqiBcVUKsFKrVGH6Ocutj6535CNfM91yrvWxHg6fvIX8Y/fjYUPoejddwh7qboNV9vGA==
|
||||
dependencies:
|
||||
deepmerge "^4.0.0"
|
||||
load-script "^1.0.0"
|
||||
memoize-one "^5.1.1"
|
||||
prop-types "^15.7.2"
|
||||
react-fast-compare "^3.0.1"
|
||||
|
||||
react-refresh@^0.8.3:
|
||||
version "0.8.3"
|
||||
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f"
|
||||
@ -11980,10 +11823,10 @@ typedarray@^0.0.6:
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
||||
typescript@^4.1.2, typescript@^4.3.5:
|
||||
version "4.3.5"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"
|
||||
integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==
|
||||
typescript@^4.1.3:
|
||||
version "4.3.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805"
|
||||
integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==
|
||||
|
||||
uc.micro@^1.0.1, uc.micro@^1.0.5:
|
||||
version "1.0.6"
|
||||
@ -12186,6 +12029,11 @@ url-polyfill@^1.1.12:
|
||||
resolved "https://registry.yarnpkg.com/url-polyfill/-/url-polyfill-1.1.12.tgz#6cdaa17f6b022841b3aec0bf8dbd87ac0cd33331"
|
||||
integrity sha512-mYFmBHCapZjtcNHW0MDq9967t+z4Dmg5CJ0KqysK3+ZbyoNOWQHksGCTWwDhxGXllkWlOc10Xfko6v4a3ucM6A==
|
||||
|
||||
url-toolkit@^2.1.6:
|
||||
version "2.2.3"
|
||||
resolved "https://registry.yarnpkg.com/url-toolkit/-/url-toolkit-2.2.3.tgz#78fa901215abbac34182066932220279b804522b"
|
||||
integrity sha512-Da75SQoxsZ+2wXS56CZBrj2nukQ4nlGUZUP/dqUBG5E1su5GKThgT94Q00x81eVII7AyS1Pn+CtTTZ4Z0pLUtQ==
|
||||
|
||||
url@^0.11.0:
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
|
||||
@ -12351,6 +12199,11 @@ wbuf@^1.1.0, wbuf@^1.7.3:
|
||||
dependencies:
|
||||
minimalistic-assert "^1.0.0"
|
||||
|
||||
weakmap-polyfill@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/weakmap-polyfill/-/weakmap-polyfill-2.0.0.tgz#8f28f935e3853896ad40747e5258db578d9dc8de"
|
||||
integrity sha1-jyj5NeOFOJatQHR+UljbV42dyN4=
|
||||
|
||||
webidl-conversions@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff"
|
||||
|
Reference in New Issue
Block a user