diff --git a/.gitignore b/.gitignore index 7baacd1aa..816771c9c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,12 @@ *.so *.dylib .idea +cmd/server/web/assets/ +cmd/server/web/monacoeditorwork +cmd/server/web/favicon.ico +cmd/server/web/index.html + +build # Test binary, built with `go test -c` *.test diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..c888114ef --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +GOCMD=go +GOBUILD=$(GOCMD) build +GOCLEAN=$(GOCMD) clean +GOARCH=$(shell go env GOARCH) +GOOS=$(shell go env GOOS ) + +BASE_PAH := $(shell pwd) +BUILD_PATH = $(BASE_PAH)/build +WEB_PATH=$(BASE_PAH)/frontend +SERVER_PATH=$(BASE_PAH)/backend +MAIN= $(BASE_PAH)/cmd/server/main.go +APP_NAME=1panel + +build_web: + cd $(WEB_PATH) && npm install && npm run build:dev + +build_bin: + cd $(SERVER_PATH) \ + && GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -trimpath -ldflags "-s -w" -o $(BUILD_PATH)/$(APP_NAME) $(MAIN) + +build_all: build_web build_bin + diff --git a/apps/apps.json b/apps/apps.json index 6d72ca95c..70084a939 100644 --- a/apps/apps.json +++ b/apps/apps.json @@ -1,4 +1,4 @@ { - "version": "0.0.1", + "version": "0.0.3", "package": "" } diff --git a/apps/list.json b/apps/list.json index bca1f8a0e..abded4bbf 100644 --- a/apps/list.json +++ b/apps/list.json @@ -1,5 +1,5 @@ { - "version": "0.1", + "version": "0.0.2", "tags": [ { "key": "WebSite", @@ -56,6 +56,20 @@ "limit": 0, "crossVersionUpdate": true, "source": "http://wordpress.org/" + }, + { + "key": "redis", + "name": "redis", + "tags": ["Datastore"], + "versions": ["7.0.5","6.0.16"], + "short_desc": "缓存数据库", + "icon": "redis.png", + "author": "Salvatore Sanfilippo", + "type": "runtime", + "required": [""], + "limit": 0, + "crossVersionUpdate": true, + "source": "https://redis.io/" } ] } \ No newline at end of file diff --git a/apps/mysql/5.7.39/docker-compose.yml b/apps/mysql/5.7.39/docker-compose.yml index f7c4402e2..3bd41e120 100644 --- a/apps/mysql/5.7.39/docker-compose.yml +++ b/apps/mysql/5.7.39/docker-compose.yml @@ -19,4 +19,8 @@ services: --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --explicit_defaults_for_timestamp=true - --lower_case_table_names=1 \ No newline at end of file + --lower_case_table_names=1 + +networks: + 1panel: + external: true \ No newline at end of file diff --git a/apps/nginx/1.23.1/docker-compose.yml b/apps/nginx/1.23.1/docker-compose.yml index 44f49984a..c4f8022fe 100644 --- a/apps/nginx/1.23.1/docker-compose.yml +++ b/apps/nginx/1.23.1/docker-compose.yml @@ -3,6 +3,8 @@ services: container_name: ${CONTAINER_NAME} image: nginx:1.23.1 restart: always + networks: + - 1panel ports: - ${PANEL_APP_PORT_HTTP}:80 - ${PANEL_APP_PORT_HTTPS}:443 @@ -11,4 +13,8 @@ services: - ./www:/home/www - ./log:/var/log/nginx - ./conf/conf.d:/etc/nginx/conf.d/ - - ./html:/usr/share/nginx/html \ No newline at end of file + - ./html:/usr/share/nginx/html + +networks: + 1panel: + external: true \ No newline at end of file diff --git a/apps/redis/6.0.16/README.md b/apps/redis/6.0.16/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/apps/redis/6.0.16/config.json b/apps/redis/6.0.16/config.json new file mode 100644 index 000000000..91b94279a --- /dev/null +++ b/apps/redis/6.0.16/config.json @@ -0,0 +1,20 @@ +{ + "formFields": [ + { + "type": "text", + "labelZh": "密码", + "labelEn": "Password", + "required": true, + "default": "eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81", + "envKey": "PANEL_DB_ROOT_PASSWORD" + }, + { + "type": "number", + "labelZh": "端口", + "labelEn": "Port", + "required": true, + "default": 6379, + "envKey": "PANEL_APP_PORT_HTTP" + } + ] +} \ No newline at end of file diff --git a/apps/redis/6.0.16/docker-compose.yml b/apps/redis/6.0.16/docker-compose.yml new file mode 100644 index 000000000..1621ee690 --- /dev/null +++ b/apps/redis/6.0.16/docker-compose.yml @@ -0,0 +1,15 @@ +version: '3' +services: + redis-6.0.16: + image: redis:6.0.16 + restart: always + networks: + - 1panel + ports: + - ${PANEL_APP_PORT_HTTP}:6379 + command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81 + volumes: + - ./data:/data +networks: + 1panel: + external: true \ No newline at end of file diff --git a/apps/redis/7.0.5/README.md b/apps/redis/7.0.5/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/apps/redis/7.0.5/config.json b/apps/redis/7.0.5/config.json new file mode 100644 index 000000000..91b94279a --- /dev/null +++ b/apps/redis/7.0.5/config.json @@ -0,0 +1,20 @@ +{ + "formFields": [ + { + "type": "text", + "labelZh": "密码", + "labelEn": "Password", + "required": true, + "default": "eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81", + "envKey": "PANEL_DB_ROOT_PASSWORD" + }, + { + "type": "number", + "labelZh": "端口", + "labelEn": "Port", + "required": true, + "default": 6379, + "envKey": "PANEL_APP_PORT_HTTP" + } + ] +} \ No newline at end of file diff --git a/apps/redis/7.0.5/docker-compose.yml b/apps/redis/7.0.5/docker-compose.yml new file mode 100644 index 000000000..b2de06f97 --- /dev/null +++ b/apps/redis/7.0.5/docker-compose.yml @@ -0,0 +1,15 @@ +version: '3' +services: + redis-7.0.5: + image: redis:7.0.5 + restart: always + networks: + - 1panel + ports: + - ${PANEL_APP_PORT_HTTP}:6379 + command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81 + volumes: + - ./data:/data +networks: + 1panel: + external: true \ No newline at end of file diff --git a/backend/app/api/v1/app.go b/backend/app/api/v1/app.go index ada4bb9a8..8f465d4a2 100644 --- a/backend/app/api/v1/app.go +++ b/backend/app/api/v1/app.go @@ -1,9 +1,9 @@ package v1 import ( - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" "github.com/gin-gonic/gin" "strconv" ) diff --git a/backend/app/api/v1/auth.go b/backend/app/api/v1/auth.go index 9209e129b..0fa084f31 100644 --- a/backend/app/api/v1/auth.go +++ b/backend/app/api/v1/auth.go @@ -3,12 +3,12 @@ package v1 import ( "errors" - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/utils/captcha" - "github.com/1Panel-dev/1Panel/utils/encrypt" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/utils/captcha" + "github.com/1Panel-dev/1Panel/backend/utils/encrypt" "github.com/gin-gonic/gin" ) diff --git a/backend/app/api/v1/backup.go b/backend/app/api/v1/backup.go index 0183da49a..9c4929524 100644 --- a/backend/app/api/v1/backup.go +++ b/backend/app/api/v1/backup.go @@ -1,10 +1,10 @@ package v1 import ( - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/gin-gonic/gin" ) diff --git a/backend/app/api/v1/command.go b/backend/app/api/v1/command.go index c877a1e13..08332b97b 100644 --- a/backend/app/api/v1/command.go +++ b/backend/app/api/v1/command.go @@ -1,10 +1,10 @@ package v1 import ( - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/gin-gonic/gin" ) diff --git a/backend/app/api/v1/cronjob.go b/backend/app/api/v1/cronjob.go index 38eeceb40..aaf5f8ff0 100644 --- a/backend/app/api/v1/cronjob.go +++ b/backend/app/api/v1/cronjob.go @@ -4,10 +4,10 @@ import ( "os" "time" - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/gin-gonic/gin" ) diff --git a/backend/app/api/v1/entry.go b/backend/app/api/v1/entry.go index 114c5c32e..c4cdcc5ce 100644 --- a/backend/app/api/v1/entry.go +++ b/backend/app/api/v1/entry.go @@ -1,6 +1,6 @@ package v1 -import "github.com/1Panel-dev/1Panel/app/service" +import "github.com/1Panel-dev/1Panel/backend/app/service" type ApiGroup struct { BaseApi diff --git a/backend/app/api/v1/file.go b/backend/app/api/v1/file.go index ba03a19a8..e1da5cb61 100644 --- a/backend/app/api/v1/file.go +++ b/backend/app/api/v1/file.go @@ -2,11 +2,11 @@ package v1 import ( "fmt" - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" - websocket2 "github.com/1Panel-dev/1Panel/utils/websocket" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" + websocket2 "github.com/1Panel-dev/1Panel/backend/utils/websocket" "github.com/gin-gonic/gin" "github.com/gorilla/websocket" "net/http" diff --git a/backend/app/api/v1/group.go b/backend/app/api/v1/group.go index 716c0b30b..0318b11fe 100644 --- a/backend/app/api/v1/group.go +++ b/backend/app/api/v1/group.go @@ -1,10 +1,10 @@ package v1 import ( - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/gin-gonic/gin" ) diff --git a/backend/app/api/v1/helper/helper.go b/backend/app/api/v1/helper/helper.go index 840f812bd..796d79a02 100644 --- a/backend/app/api/v1/helper/helper.go +++ b/backend/app/api/v1/helper/helper.go @@ -6,9 +6,9 @@ import ( "github.com/pkg/errors" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/i18n" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/i18n" "github.com/gin-gonic/gin" ) diff --git a/backend/app/api/v1/host.go b/backend/app/api/v1/host.go index 90c65aa50..d17caac3c 100644 --- a/backend/app/api/v1/host.go +++ b/backend/app/api/v1/host.go @@ -1,12 +1,12 @@ package v1 import ( - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/utils/copier" - "github.com/1Panel-dev/1Panel/utils/ssh" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/utils/copier" + "github.com/1Panel-dev/1Panel/backend/utils/ssh" "github.com/gin-gonic/gin" ) diff --git a/backend/app/api/v1/monitor.go b/backend/app/api/v1/monitor.go index 0fdc4cf4e..fff909f4e 100644 --- a/backend/app/api/v1/monitor.go +++ b/backend/app/api/v1/monitor.go @@ -3,11 +3,11 @@ package v1 import ( "time" - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/gin-gonic/gin" "github.com/shirou/gopsutil/net" ) diff --git a/backend/app/api/v1/operation_log.go b/backend/app/api/v1/operation_log.go index 15f57100e..bbec8ad1f 100644 --- a/backend/app/api/v1/operation_log.go +++ b/backend/app/api/v1/operation_log.go @@ -1,10 +1,10 @@ package v1 import ( - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/gin-gonic/gin" ) diff --git a/backend/app/api/v1/setting.go b/backend/app/api/v1/setting.go index 0be62e519..4b0512d9f 100644 --- a/backend/app/api/v1/setting.go +++ b/backend/app/api/v1/setting.go @@ -3,12 +3,12 @@ package v1 import ( "errors" - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/utils/mfa" - "github.com/1Panel-dev/1Panel/utils/ntp" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/utils/mfa" + "github.com/1Panel-dev/1Panel/backend/utils/ntp" "github.com/gin-gonic/gin" ) diff --git a/backend/app/api/v1/terminal.go b/backend/app/api/v1/terminal.go index 4867c94d3..623edbe9c 100644 --- a/backend/app/api/v1/terminal.go +++ b/backend/app/api/v1/terminal.go @@ -5,12 +5,12 @@ import ( "strconv" "time" - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/utils/copier" - "github.com/1Panel-dev/1Panel/utils/ssh" - "github.com/1Panel-dev/1Panel/utils/terminal" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/utils/copier" + "github.com/1Panel-dev/1Panel/backend/utils/ssh" + "github.com/1Panel-dev/1Panel/backend/utils/terminal" "github.com/gin-gonic/gin" "github.com/gorilla/websocket" "github.com/pkg/errors" diff --git a/backend/app/dto/app.go b/backend/app/dto/app.go index 2c1c1d314..f8189bc64 100644 --- a/backend/app/dto/app.go +++ b/backend/app/dto/app.go @@ -2,7 +2,7 @@ package dto import ( "encoding/json" - "github.com/1Panel-dev/1Panel/app/model" + "github.com/1Panel-dev/1Panel/backend/app/model" ) type AppRes struct { diff --git a/backend/app/dto/file.go b/backend/app/dto/file.go index 383b72ceb..24efcdc9a 100644 --- a/backend/app/dto/file.go +++ b/backend/app/dto/file.go @@ -1,7 +1,7 @@ package dto import ( - "github.com/1Panel-dev/1Panel/utils/files" + "github.com/1Panel-dev/1Panel/backend/utils/files" ) type FileOption struct { diff --git a/backend/app/model/app_install.go b/backend/app/model/app_install.go index 73602eee9..96bd0a740 100644 --- a/backend/app/model/app_install.go +++ b/backend/app/model/app_install.go @@ -1,7 +1,7 @@ package model import ( - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/constant" "path" ) diff --git a/backend/app/model/app_install_backup.go b/backend/app/model/app_install_backup.go index dad6826ec..b9018bfed 100644 --- a/backend/app/model/app_install_backup.go +++ b/backend/app/model/app_install_backup.go @@ -2,9 +2,10 @@ package model type AppInstallBackup struct { BaseModel - Name string `gorm:"type:varchar(64);not null" json:"name"` - Path string `gorm:"type:varchar(64);not null" json:"path"` - Param string `gorm:"type:longtext;" json:"param"` - AppDetailId uint `gorm:"type:integer;not null" json:"app_detail_id"` - AppInstallId uint `gorm:"type:integer;not null" json:"app_install_id"` + Name string `gorm:"type:varchar(64);not null" json:"name"` + Path string `gorm:"type:varchar(64);not null" json:"path"` + Param string `gorm:"type:longtext;" json:"param"` + AppDetailId uint `gorm:"type:integer;not null" json:"app_detail_id"` + AppInstallId uint `gorm:"type:integer;not null" json:"app_install_id"` + AppDetail AppDetail `json:"-"` } diff --git a/backend/app/repo/app.go b/backend/app/repo/app.go index fa808952e..032658523 100644 --- a/backend/app/repo/app.go +++ b/backend/app/repo/app.go @@ -2,7 +2,7 @@ package repo import ( "context" - "github.com/1Panel-dev/1Panel/app/model" + "github.com/1Panel-dev/1Panel/backend/app/model" "gorm.io/gorm" "gorm.io/gorm/clause" ) diff --git a/backend/app/repo/app_detail.go b/backend/app/repo/app_detail.go index ffa100811..9ad076af5 100644 --- a/backend/app/repo/app_detail.go +++ b/backend/app/repo/app_detail.go @@ -2,7 +2,7 @@ package repo import ( "context" - "github.com/1Panel-dev/1Panel/app/model" + "github.com/1Panel-dev/1Panel/backend/app/model" "gorm.io/gorm" ) diff --git a/backend/app/repo/app_install.go b/backend/app/repo/app_install.go index ad8d13568..b476f861a 100644 --- a/backend/app/repo/app_install.go +++ b/backend/app/repo/app_install.go @@ -2,7 +2,7 @@ package repo import ( "context" - "github.com/1Panel-dev/1Panel/app/model" + "github.com/1Panel-dev/1Panel/backend/app/model" "gorm.io/gorm" ) diff --git a/backend/app/repo/app_install_backup.go b/backend/app/repo/app_install_backup.go index 04eed1f7a..bf82f2100 100644 --- a/backend/app/repo/app_install_backup.go +++ b/backend/app/repo/app_install_backup.go @@ -2,7 +2,7 @@ package repo import ( "context" - "github.com/1Panel-dev/1Panel/app/model" + "github.com/1Panel-dev/1Panel/backend/app/model" "gorm.io/gorm" "gorm.io/gorm/clause" ) @@ -20,12 +20,13 @@ func (a AppInstallBackupRepo) Create(ctx context.Context, backup model.AppInstal return getTx(ctx).Omit(clause.Associations).Create(&backup).Error } -func (a AppInstallBackupRepo) Delete(opts ...DBOption) error { - return getDb(opts...).Omit(clause.Associations).Delete(&model.AppInstallBackup{}).Error +func (a AppInstallBackupRepo) Delete(ctx context.Context, opts ...DBOption) error { + return getTx(ctx, opts...).Omit(clause.Associations).Delete(&model.AppInstallBackup{}).Error } + func (a AppInstallBackupRepo) GetBy(opts ...DBOption) ([]model.AppInstallBackup, error) { var backups []model.AppInstallBackup - if err := getDb(opts...).Find(&backups); err != nil { + if err := getDb(opts...).Preload("AppDetail").Find(&backups); err != nil { return backups, nil } return backups, nil @@ -34,7 +35,7 @@ func (a AppInstallBackupRepo) GetBy(opts ...DBOption) ([]model.AppInstallBackup, func (a AppInstallBackupRepo) GetFirst(opts ...DBOption) (model.AppInstallBackup, error) { var backup model.AppInstallBackup db := getDb(opts...).Model(&model.AppInstallBackup{}) - err := db.First(&backup).Error + err := db.Preload("AppDetail").First(&backup).Error return backup, err } @@ -43,6 +44,6 @@ func (a AppInstallBackupRepo) Page(page, size int, opts ...DBOption) (int64, []m db := getDb(opts...).Model(&model.AppInstallBackup{}) count := int64(0) db = db.Count(&count) - err := db.Debug().Limit(size).Offset(size * (page - 1)).Find(&backups).Error + err := db.Limit(size).Offset(size * (page - 1)).Preload("AppDetail").Find(&backups).Error return count, backups, err } diff --git a/backend/app/repo/app_install_resource.go b/backend/app/repo/app_install_resource.go index bb033abbb..66975c535 100644 --- a/backend/app/repo/app_install_resource.go +++ b/backend/app/repo/app_install_resource.go @@ -2,8 +2,8 @@ package repo import ( "context" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/gorm" ) diff --git a/backend/app/repo/app_tag.go b/backend/app/repo/app_tag.go index 98f6480d9..76e23d434 100644 --- a/backend/app/repo/app_tag.go +++ b/backend/app/repo/app_tag.go @@ -2,8 +2,8 @@ package repo import ( "context" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/gorm" ) diff --git a/backend/app/repo/backup.go b/backend/app/repo/backup.go index 80497e35b..b60038f9c 100644 --- a/backend/app/repo/backup.go +++ b/backend/app/repo/backup.go @@ -1,8 +1,8 @@ package repo import ( - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/global" ) type BackupRepo struct{} diff --git a/backend/app/repo/command.go b/backend/app/repo/command.go index 2bd0aa2f2..4f7fee3f5 100644 --- a/backend/app/repo/command.go +++ b/backend/app/repo/command.go @@ -1,8 +1,8 @@ package repo import ( - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/gorm" ) diff --git a/backend/app/repo/common.go b/backend/app/repo/common.go index d432e560e..27b68263e 100644 --- a/backend/app/repo/common.go +++ b/backend/app/repo/common.go @@ -2,7 +2,7 @@ package repo import ( "context" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/gorm" ) diff --git a/backend/app/repo/cronjob.go b/backend/app/repo/cronjob.go index 23f7f945a..300ca2613 100644 --- a/backend/app/repo/cronjob.go +++ b/backend/app/repo/cronjob.go @@ -3,9 +3,9 @@ package repo import ( "time" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/gorm" ) diff --git a/backend/app/repo/database.go b/backend/app/repo/database.go index 2ac3c6eaa..1e016b633 100644 --- a/backend/app/repo/database.go +++ b/backend/app/repo/database.go @@ -2,8 +2,8 @@ package repo import ( "context" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/gorm" ) diff --git a/backend/app/repo/group.go b/backend/app/repo/group.go index 6dcc5c83c..092d37db8 100644 --- a/backend/app/repo/group.go +++ b/backend/app/repo/group.go @@ -1,8 +1,8 @@ package repo import ( - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/gorm" ) diff --git a/backend/app/repo/host.go b/backend/app/repo/host.go index 777a1b159..2cb486ae2 100644 --- a/backend/app/repo/host.go +++ b/backend/app/repo/host.go @@ -1,8 +1,8 @@ package repo import ( - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/gorm" ) diff --git a/backend/app/repo/operation_log.go b/backend/app/repo/operation_log.go index 00b63db09..e5629e9d7 100644 --- a/backend/app/repo/operation_log.go +++ b/backend/app/repo/operation_log.go @@ -1,8 +1,8 @@ package repo import ( - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/global" ) type OperationRepo struct{} diff --git a/backend/app/repo/setting.go b/backend/app/repo/setting.go index 3837d8905..7f5778fa0 100644 --- a/backend/app/repo/setting.go +++ b/backend/app/repo/setting.go @@ -1,8 +1,8 @@ package repo import ( - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/gorm" ) diff --git a/backend/app/repo/tag.go b/backend/app/repo/tag.go index 76130aca4..3101ca9d9 100644 --- a/backend/app/repo/tag.go +++ b/backend/app/repo/tag.go @@ -2,8 +2,8 @@ package repo import ( "context" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/gorm" ) diff --git a/backend/app/service/app.go b/backend/app/service/app.go index b074decc6..787030ccd 100644 --- a/backend/app/service/app.go +++ b/backend/app/service/app.go @@ -5,15 +5,15 @@ import ( "encoding/json" "errors" "fmt" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/app/repo" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/utils/common" - "github.com/1Panel-dev/1Panel/utils/compose" - "github.com/1Panel-dev/1Panel/utils/docker" - "github.com/1Panel-dev/1Panel/utils/files" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/app/repo" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/utils/common" + "github.com/1Panel-dev/1Panel/backend/utils/compose" + "github.com/1Panel-dev/1Panel/backend/utils/docker" + "github.com/1Panel-dev/1Panel/backend/utils/files" "golang.org/x/net/context" "gopkg.in/yaml.v3" "os" @@ -175,35 +175,9 @@ func (a AppService) OperateInstall(req dto.AppInstallOperate) error { } install.Status = constant.Running case dto.Delete: - op := files.NewFileOp() - appDir := install.GetPath() - dir, _ := os.Stat(appDir) - if dir != nil { - out, err := compose.Down(dockerComposePath) - if err != nil { - return handleErr(install, err, out) - } - if err := op.DeleteDir(appDir); err != nil { - return err - } - } - - tx, ctx := getTxAndContext() - if err := appInstallRepo.Delete(ctx, install); err != nil { - tx.Rollback() - return err - } - if err := deleteLink(ctx, &install); err != nil { - tx.Rollback() - return err - } - tx.Commit() - return nil + return deleteAppInstall(install) case dto.Sync: - if err := a.SyncInstalled(install.ID); err != nil { - return err - } - return nil + return a.SyncInstalled(install.ID) case dto.Backup: tx, ctx := getTxAndContext() if err := backupInstall(ctx, install); err != nil { @@ -213,11 +187,7 @@ func (a AppService) OperateInstall(req dto.AppInstallOperate) error { tx.Commit() return nil case dto.Restore: - installBackup, err := appInstallBackupRepo.GetFirst(commonRepo.WithByID(req.BackupId)) - if err != nil { - return err - } - return restoreInstall(install, installBackup) + return restoreInstall(install, req.BackupId) case dto.Update: return updateInstall(install.ID, req.DetailId) default: @@ -344,7 +314,7 @@ func (a AppService) DeleteBackup(req dto.AppBackupDeleteRequest) error { errStr.WriteString(err.Error()) continue } - if err := appInstallBackupRepo.Delete(commonRepo.WithIdsIn(req.Ids)); err != nil { + if err := appInstallBackupRepo.Delete(nil, commonRepo.WithIdsIn(req.Ids)); err != nil { errStr.WriteString(err.Error()) } } diff --git a/backend/app/service/app_utils.go b/backend/app/service/app_utils.go index a9812bade..a67b550b8 100644 --- a/backend/app/service/app_utils.go +++ b/backend/app/service/app_utils.go @@ -4,14 +4,14 @@ import ( "context" "encoding/json" "fmt" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/utils/cmd" - "github.com/1Panel-dev/1Panel/utils/common" - "github.com/1Panel-dev/1Panel/utils/compose" - "github.com/1Panel-dev/1Panel/utils/files" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/utils/cmd" + "github.com/1Panel-dev/1Panel/backend/utils/common" + "github.com/1Panel-dev/1Panel/backend/utils/compose" + "github.com/1Panel-dev/1Panel/backend/utils/files" "github.com/joho/godotenv" "github.com/pkg/errors" "gopkg.in/yaml.v3" @@ -140,6 +140,37 @@ func createLink(ctx context.Context, app model.App, appInstall *model.AppInstall return nil } +func deleteAppInstall(install model.AppInstall) error { + op := files.NewFileOp() + appDir := install.GetPath() + dir, _ := os.Stat(appDir) + if dir != nil { + out, err := compose.Down(install.GetComposePath()) + if err != nil { + return handleErr(install, err, out) + } + if err := op.DeleteDir(appDir); err != nil { + return err + } + } + + tx, ctx := getTxAndContext() + if err := appInstallRepo.Delete(ctx, install); err != nil { + tx.Rollback() + return err + } + if err := deleteLink(ctx, &install); err != nil { + tx.Rollback() + return err + } + if err := appInstallBackupRepo.Delete(ctx, appInstallBackupRepo.WithAppInstallID(install.ID)); err != nil { + tx.Rollback() + return err + } + tx.Commit() + return nil +} + func deleteLink(ctx context.Context, install *model.AppInstall) error { resources, _ := appInstallResourceRepo.GetBy(appInstallResourceRepo.WithAppInstallId(install.ID)) if len(resources) == 0 { @@ -171,12 +202,20 @@ func updateInstall(installId uint, detailId uint) error { if err != nil { return err } + oldDetail, err := appDetailRepo.GetFirst(commonRepo.WithByID(install.AppDetailId)) + if err != nil { + return err + } + detail, err := appDetailRepo.GetFirst(commonRepo.WithByID(detailId)) if err != nil { return err } + if oldDetail.LastVersion == detail.Version { + install.CanUpdate = false + } if install.Version == detail.Version { - return errors.New("two version is save") + return errors.New("two version is same") } tx, ctx := getTxAndContext() if err := backupInstall(ctx, install); err != nil { @@ -188,6 +227,7 @@ func updateInstall(installId uint, detailId uint) error { } install.DockerCompose = detail.DockerCompose install.Version = detail.Version + fileOp := files.NewFileOp() if err := fileOp.WriteFile(install.GetComposePath(), strings.NewReader(install.DockerCompose), 0775); err != nil { return err @@ -221,7 +261,11 @@ func backupInstall(ctx context.Context, install model.AppInstall) error { return nil } -func restoreInstall(install model.AppInstall, backup model.AppInstallBackup) error { +func restoreInstall(install model.AppInstall, backupId uint) error { + backup, err := appInstallBackupRepo.GetFirst(commonRepo.WithByID(backupId)) + if err != nil { + return err + } if _, err := compose.Down(install.GetComposePath()); err != nil { return err } @@ -284,6 +328,7 @@ func restoreInstall(install model.AppInstall, backup model.AppInstallBackup) err return handleErr(install, err, out) } install.AppDetailId = backup.AppDetailId + install.Version = backup.AppDetail.Version install.Status = constant.Running return appInstallRepo.Save(&install) } diff --git a/backend/app/service/auth.go b/backend/app/service/auth.go index 9c10e82e7..a6f52945f 100644 --- a/backend/app/service/auth.go +++ b/backend/app/service/auth.go @@ -3,11 +3,11 @@ package service import ( "strconv" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/utils/encrypt" - "github.com/1Panel-dev/1Panel/utils/jwt" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/utils/encrypt" + "github.com/1Panel-dev/1Panel/backend/utils/jwt" "github.com/gin-gonic/gin" "github.com/pkg/errors" uuid "github.com/satori/go.uuid" diff --git a/backend/app/service/backup.go b/backend/app/service/backup.go index d05a80e0b..e6f9c8835 100644 --- a/backend/app/service/backup.go +++ b/backend/app/service/backup.go @@ -3,10 +3,10 @@ package service import ( "encoding/json" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/utils/cloud_storage" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/utils/cloud_storage" "github.com/jinzhu/copier" "github.com/pkg/errors" ) diff --git a/backend/app/service/command.go b/backend/app/service/command.go index 337ff6014..09f8e8883 100644 --- a/backend/app/service/command.go +++ b/backend/app/service/command.go @@ -1,9 +1,9 @@ package service import ( - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/constant" "github.com/jinzhu/copier" "github.com/pkg/errors" ) diff --git a/backend/app/service/cornjob.go b/backend/app/service/cornjob.go index 6e9f7bc44..18bb3b10c 100644 --- a/backend/app/service/cornjob.go +++ b/backend/app/service/cornjob.go @@ -8,11 +8,11 @@ import ( "strings" "time" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/utils/cloud_storage" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/utils/cloud_storage" "github.com/jinzhu/copier" "github.com/pkg/errors" "github.com/robfig/cron/v3" diff --git a/backend/app/service/cronjob_helper.go b/backend/app/service/cronjob_helper.go index be89c0288..1af3d1bff 100644 --- a/backend/app/service/cronjob_helper.go +++ b/backend/app/service/cronjob_helper.go @@ -11,10 +11,10 @@ import ( "strings" "time" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/utils/cloud_storage" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/utils/cloud_storage" "github.com/pkg/errors" "github.com/robfig/cron/v3" ) diff --git a/backend/app/service/entry.go b/backend/app/service/entry.go index 27f800ce3..efd2d69c7 100644 --- a/backend/app/service/entry.go +++ b/backend/app/service/entry.go @@ -1,6 +1,6 @@ package service -import "github.com/1Panel-dev/1Panel/app/repo" +import "github.com/1Panel-dev/1Panel/backend/app/repo" type ServiceGroup struct { AuthService diff --git a/backend/app/service/file.go b/backend/app/service/file.go index 3da89be9d..b1ecefd95 100644 --- a/backend/app/service/file.go +++ b/backend/app/service/file.go @@ -2,10 +2,10 @@ package service import ( "fmt" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/utils/common" - "github.com/1Panel-dev/1Panel/utils/files" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/utils/common" + "github.com/1Panel-dev/1Panel/backend/utils/files" "github.com/pkg/errors" uuid "github.com/satori/go.uuid" "io/fs" diff --git a/backend/app/service/group.go b/backend/app/service/group.go index d89c1e790..36bc72476 100644 --- a/backend/app/service/group.go +++ b/backend/app/service/group.go @@ -1,8 +1,8 @@ package service import ( - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" "github.com/jinzhu/copier" "github.com/pkg/errors" ) diff --git a/backend/app/service/helper.go b/backend/app/service/helper.go index 227dbe921..5a7693ef4 100644 --- a/backend/app/service/helper.go +++ b/backend/app/service/helper.go @@ -2,7 +2,7 @@ package service import ( "context" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/gorm" ) diff --git a/backend/app/service/host.go b/backend/app/service/host.go index b3ba32039..1062947ec 100644 --- a/backend/app/service/host.go +++ b/backend/app/service/host.go @@ -3,9 +3,9 @@ package service import ( "fmt" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/constant" "github.com/jinzhu/copier" "github.com/pkg/errors" ) diff --git a/backend/app/service/operation_log.go b/backend/app/service/operation_log.go index 21a8de1b1..7c5fd0947 100644 --- a/backend/app/service/operation_log.go +++ b/backend/app/service/operation_log.go @@ -3,10 +3,10 @@ package service import ( "encoding/json" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/jinzhu/copier" "github.com/pkg/errors" ) diff --git a/backend/app/service/setting.go b/backend/app/service/setting.go index ee6702cd4..680291d75 100644 --- a/backend/app/service/setting.go +++ b/backend/app/service/setting.go @@ -5,10 +5,10 @@ import ( "strconv" "time" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/utils/encrypt" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/utils/encrypt" "github.com/gin-gonic/gin" ) diff --git a/backend/cron/cron.go b/backend/cron/cron.go index 4d95a6867..924e765a0 100644 --- a/backend/cron/cron.go +++ b/backend/cron/cron.go @@ -3,11 +3,11 @@ package cron import ( "time" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/app/service" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/cron/job" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/app/service" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/cron/job" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/robfig/cron/v3" ) diff --git a/backend/cron/job/monitor.go b/backend/cron/job/monitor.go index 712aa5088..3802b732f 100644 --- a/backend/cron/job/monitor.go +++ b/backend/cron/job/monitor.go @@ -4,9 +4,9 @@ import ( "strconv" "time" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/app/repo" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/app/repo" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/shirou/gopsutil/cpu" "github.com/shirou/gopsutil/disk" "github.com/shirou/gopsutil/load" diff --git a/backend/global/global.go b/backend/global/global.go index a10740fe9..8dab4c697 100644 --- a/backend/global/global.go +++ b/backend/global/global.go @@ -1,9 +1,9 @@ package global import ( - "github.com/1Panel-dev/1Panel/configs" - "github.com/1Panel-dev/1Panel/init/cache/badger_db" - "github.com/1Panel-dev/1Panel/init/session/psession" + "github.com/1Panel-dev/1Panel/backend/configs" + "github.com/1Panel-dev/1Panel/backend/init/cache/badger_db" + "github.com/1Panel-dev/1Panel/backend/init/session/psession" "github.com/go-playground/validator/v10" "github.com/robfig/cron/v3" "github.com/sirupsen/logrus" diff --git a/backend/init/cache/cache.go b/backend/init/cache/cache.go index c627efdb8..54d045193 100644 --- a/backend/init/cache/cache.go +++ b/backend/init/cache/cache.go @@ -1,8 +1,8 @@ package cache import ( - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/init/cache/badger_db" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/init/cache/badger_db" "github.com/dgraph-io/badger/v3" "time" ) diff --git a/backend/init/db/db.go b/backend/init/db/db.go index 7428a6367..55987a92d 100644 --- a/backend/init/db/db.go +++ b/backend/init/db/db.go @@ -1,6 +1,6 @@ package db -import "github.com/1Panel-dev/1Panel/global" +import "github.com/1Panel-dev/1Panel/backend/global" func Init() { switch global.CONF.System.DbType { diff --git a/backend/init/db/mysql.go b/backend/init/db/mysql.go index 6664c5850..1315d9547 100644 --- a/backend/init/db/mysql.go +++ b/backend/init/db/mysql.go @@ -1,7 +1,7 @@ package db import ( - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/driver/mysql" "gorm.io/gorm" diff --git a/backend/init/db/sqlite.go b/backend/init/db/sqlite.go index 472a339f7..0ff904d28 100644 --- a/backend/init/db/sqlite.go +++ b/backend/init/db/sqlite.go @@ -1,7 +1,7 @@ package db import ( - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/global" "gorm.io/driver/sqlite" "gorm.io/gorm" diff --git a/backend/init/log/log.go b/backend/init/log/log.go index c37e0025b..7352421ef 100644 --- a/backend/init/log/log.go +++ b/backend/init/log/log.go @@ -6,8 +6,8 @@ import ( "strings" "time" - "github.com/1Panel-dev/1Panel/configs" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/configs" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/natefinch/lumberjack" "github.com/sirupsen/logrus" @@ -45,7 +45,7 @@ func (s *MineFormatter) Format(entry *logrus.Entry) ([]byte, error) { var cstSh, _ = time.LoadLocation(global.CONF.LogConfig.TimeZone) detailInfo := "" if entry.Caller != nil { - funcion := strings.ReplaceAll(entry.Caller.Function, "github.com/1Panel-dev/1Panel/", "") + funcion := strings.ReplaceAll(entry.Caller.Function, "github.com/1Panel-dev/1Panel/backend/", "") detailInfo = fmt.Sprintf("(%s: %d)", funcion, entry.Caller.Line) } if len(entry.Data) == 0 { diff --git a/backend/init/migration/migrate.go b/backend/init/migration/migrate.go index 81c4f16d0..1c002d7d6 100644 --- a/backend/init/migration/migrate.go +++ b/backend/init/migration/migrate.go @@ -1,8 +1,8 @@ package migration import ( - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/init/migration/migrations" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/init/migration/migrations" "github.com/go-gormigrate/gormigrate/v2" ) diff --git a/backend/init/migration/migrations/init.go b/backend/init/migration/migrations/init.go index 797c792d1..8df51b646 100644 --- a/backend/init/migration/migrations/init.go +++ b/backend/init/migration/migrations/init.go @@ -3,7 +3,7 @@ package migrations import ( "time" - "github.com/1Panel-dev/1Panel/app/model" + "github.com/1Panel-dev/1Panel/backend/app/model" "github.com/go-gormigrate/gormigrate/v2" "gorm.io/gorm" diff --git a/backend/init/router/router.go b/backend/init/router/router.go index 3ecbc375e..63eaedc0d 100644 --- a/backend/init/router/router.go +++ b/backend/init/router/router.go @@ -1,17 +1,16 @@ package router import ( - "html/template" - - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/docs" - "github.com/1Panel-dev/1Panel/i18n" - "github.com/1Panel-dev/1Panel/middleware" - rou "github.com/1Panel-dev/1Panel/router" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/docs" + "github.com/1Panel-dev/1Panel/backend/i18n" + "github.com/1Panel-dev/1Panel/backend/middleware" + rou "github.com/1Panel-dev/1Panel/backend/router" ginI18n "github.com/gin-contrib/i18n" "github.com/gin-gonic/gin" swaggerfiles "github.com/swaggo/files" ginSwagger "github.com/swaggo/gin-swagger" + "html/template" ) func Routers() *gin.Engine { diff --git a/backend/init/session/psession/psession.go b/backend/init/session/psession/psession.go index 3bf474f30..5cf8ff0af 100644 --- a/backend/init/session/psession/psession.go +++ b/backend/init/session/psession/psession.go @@ -2,7 +2,7 @@ package psession import ( "encoding/json" - "github.com/1Panel-dev/1Panel/init/cache/badger_db" + "github.com/1Panel-dev/1Panel/backend/init/cache/badger_db" "time" ) diff --git a/backend/init/session/session.go b/backend/init/session/session.go index 9f4adf1e1..9212b8f06 100644 --- a/backend/init/session/session.go +++ b/backend/init/session/session.go @@ -1,8 +1,8 @@ package session import ( - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/init/session/psession" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/init/session/psession" ) func Init() { diff --git a/backend/init/validator/validator.go b/backend/init/validator/validator.go index 51307a71b..d840383bd 100644 --- a/backend/init/validator/validator.go +++ b/backend/init/validator/validator.go @@ -4,7 +4,7 @@ import ( "regexp" "unicode" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/go-playground/validator/v10" ) diff --git a/backend/init/viper/viper.go b/backend/init/viper/viper.go index db2180c92..a75050fe9 100644 --- a/backend/init/viper/viper.go +++ b/backend/init/viper/viper.go @@ -2,9 +2,9 @@ package viper import ( "fmt" - "github.com/1Panel-dev/1Panel/configs" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/configs" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" "path" "github.com/fsnotify/fsnotify" diff --git a/backend/main.go b/backend/main.go deleted file mode 100644 index f8b7dbf3d..000000000 --- a/backend/main.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "github.com/1Panel-dev/1Panel/server" - -func main() { - server.Start() -} diff --git a/backend/middleware/cors.go b/backend/middleware/cors.go index 19a8e0dfe..5ee3d0141 100644 --- a/backend/middleware/cors.go +++ b/backend/middleware/cors.go @@ -3,8 +3,8 @@ package middleware import ( "net/http" - "github.com/1Panel-dev/1Panel/configs" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/configs" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/gin-gonic/gin" ) diff --git a/backend/middleware/csrf.go b/backend/middleware/csrf.go index 08571c152..28c32ab0c 100644 --- a/backend/middleware/csrf.go +++ b/backend/middleware/csrf.go @@ -3,7 +3,7 @@ package middleware import ( "net/http" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/gin-gonic/gin" "github.com/gorilla/csrf" adapter "github.com/gwatts/gin-adapter" diff --git a/backend/middleware/jwt.go b/backend/middleware/jwt.go index 651306dc5..a381286d6 100644 --- a/backend/middleware/jwt.go +++ b/backend/middleware/jwt.go @@ -4,11 +4,11 @@ import ( "strconv" "time" - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/repo" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" - jwtUtils "github.com/1Panel-dev/1Panel/utils/jwt" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/repo" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" + jwtUtils "github.com/1Panel-dev/1Panel/backend/utils/jwt" "github.com/golang-jwt/jwt/v4" "github.com/gin-gonic/gin" diff --git a/backend/middleware/operation.go b/backend/middleware/operation.go index 2b621fde9..2060a9222 100644 --- a/backend/middleware/operation.go +++ b/backend/middleware/operation.go @@ -9,9 +9,9 @@ import ( "strings" "time" - "github.com/1Panel-dev/1Panel/app/model" - "github.com/1Panel-dev/1Panel/app/service" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/model" + "github.com/1Panel-dev/1Panel/backend/app/service" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/gin-gonic/gin" ) diff --git a/backend/middleware/password_expired.go b/backend/middleware/password_expired.go index 69a5d7fbf..ede07a0c2 100644 --- a/backend/middleware/password_expired.go +++ b/backend/middleware/password_expired.go @@ -1,8 +1,8 @@ package middleware import ( - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/constant" "github.com/gin-gonic/gin" ) diff --git a/backend/middleware/safety.go b/backend/middleware/safety.go index 5bc07b1ba..aadca6006 100644 --- a/backend/middleware/safety.go +++ b/backend/middleware/safety.go @@ -1,9 +1,9 @@ package middleware import ( - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/service" - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/service" + "github.com/1Panel-dev/1Panel/backend/constant" "github.com/gin-gonic/gin" ) diff --git a/backend/middleware/session.go b/backend/middleware/session.go index f4d2ee4ad..1df01429b 100644 --- a/backend/middleware/session.go +++ b/backend/middleware/session.go @@ -3,10 +3,10 @@ package middleware import ( "strconv" - "github.com/1Panel-dev/1Panel/app/api/v1/helper" - "github.com/1Panel-dev/1Panel/app/repo" - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/app/repo" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/gin-gonic/gin" ) diff --git a/backend/router/operation_log.go b/backend/router/operation_log.go index ef74fce14..5ce95174c 100644 --- a/backend/router/operation_log.go +++ b/backend/router/operation_log.go @@ -1,8 +1,8 @@ package router import ( - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/middleware" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" "github.com/gin-gonic/gin" ) diff --git a/backend/router/ro_app.go b/backend/router/ro_app.go index 75649f898..98cc07641 100644 --- a/backend/router/ro_app.go +++ b/backend/router/ro_app.go @@ -1,8 +1,8 @@ package router import ( - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/middleware" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" "github.com/gin-gonic/gin" ) diff --git a/backend/router/ro_backup.go b/backend/router/ro_backup.go index 23e214704..ce89d375b 100644 --- a/backend/router/ro_backup.go +++ b/backend/router/ro_backup.go @@ -1,8 +1,8 @@ package router import ( - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/middleware" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" "github.com/gin-gonic/gin" ) diff --git a/backend/router/ro_base.go b/backend/router/ro_base.go index e98e138e0..a18aba3af 100644 --- a/backend/router/ro_base.go +++ b/backend/router/ro_base.go @@ -1,8 +1,8 @@ package router import ( - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/middleware" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" "github.com/gin-gonic/gin" ) diff --git a/backend/router/ro_command.go b/backend/router/ro_command.go index c8da752e1..641363861 100644 --- a/backend/router/ro_command.go +++ b/backend/router/ro_command.go @@ -1,8 +1,8 @@ package router import ( - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/middleware" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" "github.com/gin-gonic/gin" ) diff --git a/backend/router/ro_cronjob.go b/backend/router/ro_cronjob.go index eaa4a3ba1..c21475f6a 100644 --- a/backend/router/ro_cronjob.go +++ b/backend/router/ro_cronjob.go @@ -1,8 +1,8 @@ package router import ( - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/middleware" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" "github.com/gin-gonic/gin" ) diff --git a/backend/router/ro_file.go b/backend/router/ro_file.go index 281601fac..dde6f7c3e 100644 --- a/backend/router/ro_file.go +++ b/backend/router/ro_file.go @@ -1,8 +1,8 @@ package router import ( - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/middleware" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" "github.com/gin-gonic/gin" ) diff --git a/backend/router/ro_group.go b/backend/router/ro_group.go index 4e8c66212..0e75a17d8 100644 --- a/backend/router/ro_group.go +++ b/backend/router/ro_group.go @@ -1,8 +1,8 @@ package router import ( - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/middleware" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" "github.com/gin-gonic/gin" ) diff --git a/backend/router/ro_host.go b/backend/router/ro_host.go index 2858033e6..1186c6851 100644 --- a/backend/router/ro_host.go +++ b/backend/router/ro_host.go @@ -1,8 +1,8 @@ package router import ( - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/middleware" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" "github.com/gin-gonic/gin" ) diff --git a/backend/router/ro_monitor.go b/backend/router/ro_monitor.go index 30537393e..f150441de 100644 --- a/backend/router/ro_monitor.go +++ b/backend/router/ro_monitor.go @@ -1,8 +1,8 @@ package router import ( - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/middleware" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" "github.com/gin-gonic/gin" ) diff --git a/backend/router/ro_setting.go b/backend/router/ro_setting.go index 2e14cfa81..98f408586 100644 --- a/backend/router/ro_setting.go +++ b/backend/router/ro_setting.go @@ -1,8 +1,8 @@ package router import ( - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/middleware" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" "github.com/gin-gonic/gin" ) diff --git a/backend/router/ro_terminal.go b/backend/router/ro_terminal.go index 1b7800725..20a21c3f3 100644 --- a/backend/router/ro_terminal.go +++ b/backend/router/ro_terminal.go @@ -1,8 +1,8 @@ package router import ( - v1 "github.com/1Panel-dev/1Panel/app/api/v1" - "github.com/1Panel-dev/1Panel/middleware" + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" "github.com/gin-gonic/gin" ) diff --git a/backend/server/server.go b/backend/server/server.go index f69a9fc5f..0b22ade59 100644 --- a/backend/server/server.go +++ b/backend/server/server.go @@ -3,20 +3,22 @@ package server import ( "encoding/gob" "fmt" + "github.com/1Panel-dev/1Panel/cmd/server/web" + "net/http" "time" - "github.com/1Panel-dev/1Panel/cron" - "github.com/1Panel-dev/1Panel/init/cache" - "github.com/1Panel-dev/1Panel/init/session" - "github.com/1Panel-dev/1Panel/init/session/psession" + "github.com/1Panel-dev/1Panel/backend/cron" + "github.com/1Panel-dev/1Panel/backend/init/cache" + "github.com/1Panel-dev/1Panel/backend/init/session" + "github.com/1Panel-dev/1Panel/backend/init/session/psession" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/init/db" - "github.com/1Panel-dev/1Panel/init/log" - "github.com/1Panel-dev/1Panel/init/migration" - "github.com/1Panel-dev/1Panel/init/router" - "github.com/1Panel-dev/1Panel/init/validator" - "github.com/1Panel-dev/1Panel/init/viper" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/init/db" + "github.com/1Panel-dev/1Panel/backend/init/log" + "github.com/1Panel-dev/1Panel/backend/init/migration" + "github.com/1Panel-dev/1Panel/backend/init/router" + "github.com/1Panel-dev/1Panel/backend/init/validator" + "github.com/1Panel-dev/1Panel/backend/init/viper" "github.com/fvbock/endless" "github.com/gin-gonic/gin" @@ -34,9 +36,17 @@ func Start() { gin.SetMode(global.CONF.System.Level) cron.Run() - routers := router.Routers() + rootRouter := router.Routers() address := fmt.Sprintf(":%d", global.CONF.System.Port) - s := initServer(address, routers) + rootRouter.StaticFS("/login/onepanel", http.FS(web.IndexHtml)) + rootRouter.StaticFS("/1panel", http.FS(web.IndexHtml)) + + rootRouter.GET("/assets/*filepath", func(c *gin.Context) { + staticServer := http.FileServer(http.FS(web.Assets)) + staticServer.ServeHTTP(c.Writer, c.Request) + }) + + s := initServer(address, rootRouter) global.LOG.Infof("server run success on %d", global.CONF.System.Port) if err := s.ListenAndServe(); err != nil { global.LOG.Error(err) diff --git a/backend/utils/captcha/captcha.go b/backend/utils/captcha/captcha.go index 97729b01b..84197d72f 100644 --- a/backend/utils/captcha/captcha.go +++ b/backend/utils/captcha/captcha.go @@ -3,8 +3,8 @@ package captcha import ( "strings" - "github.com/1Panel-dev/1Panel/app/dto" - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/app/dto" + "github.com/1Panel-dev/1Panel/backend/constant" "github.com/mojocn/base64Captcha" ) diff --git a/backend/utils/cloud_storage/client/minio.go b/backend/utils/cloud_storage/client/minio.go index 813c10881..e0b21de35 100644 --- a/backend/utils/cloud_storage/client/minio.go +++ b/backend/utils/cloud_storage/client/minio.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/constant" "github.com/minio/minio-go/v7" "github.com/minio/minio-go/v7/pkg/credentials" ) diff --git a/backend/utils/cloud_storage/client/oss.go b/backend/utils/cloud_storage/client/oss.go index 162c9fcb6..1438b1521 100644 --- a/backend/utils/cloud_storage/client/oss.go +++ b/backend/utils/cloud_storage/client/oss.go @@ -1,7 +1,7 @@ package client import ( - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/constant" osssdk "github.com/aliyun/aliyun-oss-go-sdk/oss" ) diff --git a/backend/utils/cloud_storage/client/s3.go b/backend/utils/cloud_storage/client/s3.go index aa29abc67..f4970cc4f 100644 --- a/backend/utils/cloud_storage/client/s3.go +++ b/backend/utils/cloud_storage/client/s3.go @@ -3,7 +3,7 @@ package client import ( "os" - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/constant" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" diff --git a/backend/utils/cloud_storage/client/sftp.go b/backend/utils/cloud_storage/client/sftp.go index 098461179..4d40d34bf 100644 --- a/backend/utils/cloud_storage/client/sftp.go +++ b/backend/utils/cloud_storage/client/sftp.go @@ -9,7 +9,7 @@ import ( "strconv" "time" - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/constant" "github.com/pkg/sftp" "golang.org/x/crypto/ssh" ) diff --git a/backend/utils/cloud_storage/cloud_storage_client.go b/backend/utils/cloud_storage/cloud_storage_client.go index 0c994fb96..88267818e 100644 --- a/backend/utils/cloud_storage/cloud_storage_client.go +++ b/backend/utils/cloud_storage/cloud_storage_client.go @@ -1,8 +1,8 @@ package cloud_storage import ( - "github.com/1Panel-dev/1Panel/constant" - "github.com/1Panel-dev/1Panel/utils/cloud_storage/client" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/1Panel-dev/1Panel/backend/utils/cloud_storage/client" ) type CloudStorageClient interface { diff --git a/backend/utils/encrypt/encrypt.go b/backend/utils/encrypt/encrypt.go index c682ca8e1..d0d67ec43 100644 --- a/backend/utils/encrypt/encrypt.go +++ b/backend/utils/encrypt/encrypt.go @@ -11,7 +11,7 @@ import ( "fmt" "io" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/global" ) func StringEncrypt(text string) (string, error) { diff --git a/backend/utils/encrypt/encrypt_test.go b/backend/utils/encrypt/encrypt_test.go index 1cb083e74..04e2e084f 100644 --- a/backend/utils/encrypt/encrypt_test.go +++ b/backend/utils/encrypt/encrypt_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/1Panel-dev/1Panel/init/viper" + "github.com/1Panel-dev/1Panel/backend/init/viper" ) func TestStringEncrypt(t *testing.T) { diff --git a/backend/utils/files/file_op.go b/backend/utils/files/file_op.go index 6a36be426..38f923507 100644 --- a/backend/utils/files/file_op.go +++ b/backend/utils/files/file_op.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" "fmt" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/mholt/archiver/v4" "github.com/pkg/errors" "github.com/spf13/afero" diff --git a/backend/utils/jwt/jwt.go b/backend/utils/jwt/jwt.go index afbaadd58..b125def10 100644 --- a/backend/utils/jwt/jwt.go +++ b/backend/utils/jwt/jwt.go @@ -3,7 +3,7 @@ package jwt import ( "time" - "github.com/1Panel-dev/1Panel/constant" + "github.com/1Panel-dev/1Panel/backend/constant" "github.com/golang-jwt/jwt/v4" ) diff --git a/backend/utils/ssh/ssh.go b/backend/utils/ssh/ssh.go index debbd800e..aa2058dfb 100644 --- a/backend/utils/ssh/ssh.go +++ b/backend/utils/ssh/ssh.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/global" gossh "golang.org/x/crypto/ssh" ) diff --git a/backend/utils/terminal/local_cmd.go b/backend/utils/terminal/local_cmd.go index 5b9042c0a..5ff0338c7 100644 --- a/backend/utils/terminal/local_cmd.go +++ b/backend/utils/terminal/local_cmd.go @@ -7,7 +7,7 @@ import ( "time" "unsafe" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/kr/pty" "github.com/pkg/errors" ) diff --git a/backend/utils/terminal/ws_local_session.go b/backend/utils/terminal/ws_local_session.go index 538a3dd38..92209c8dc 100644 --- a/backend/utils/terminal/ws_local_session.go +++ b/backend/utils/terminal/ws_local_session.go @@ -5,7 +5,7 @@ import ( "encoding/json" "sync" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/gorilla/websocket" "github.com/pkg/errors" ) diff --git a/backend/utils/terminal/ws_session.go b/backend/utils/terminal/ws_session.go index 9b9139602..cfe8d1606 100644 --- a/backend/utils/terminal/ws_session.go +++ b/backend/utils/terminal/ws_session.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/1Panel-dev/1Panel/global" + "github.com/1Panel-dev/1Panel/backend/global" "github.com/gorilla/websocket" "golang.org/x/crypto/ssh" ) diff --git a/backend/utils/websocket/client.go b/backend/utils/websocket/client.go index 8a51ca032..3d17df6d5 100644 --- a/backend/utils/websocket/client.go +++ b/backend/utils/websocket/client.go @@ -2,8 +2,8 @@ package websocket import ( "encoding/json" - "github.com/1Panel-dev/1Panel/global" - "github.com/1Panel-dev/1Panel/utils/files" + "github.com/1Panel-dev/1Panel/backend/global" + "github.com/1Panel-dev/1Panel/backend/utils/files" "github.com/gorilla/websocket" ) diff --git a/cmd/server/main.go b/cmd/server/main.go new file mode 100644 index 000000000..a4b4b66b6 --- /dev/null +++ b/cmd/server/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "github.com/1Panel-dev/1Panel/backend/server" +) + +func main() { + server.Start() +} diff --git a/cmd/server/web/static.go b/cmd/server/web/static.go new file mode 100644 index 000000000..73f8939af --- /dev/null +++ b/cmd/server/web/static.go @@ -0,0 +1,9 @@ +package web + +import "embed" + +//go:embed index.html +var IndexHtml embed.FS + +//go:embed assets/* +var Assets embed.FS diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 6889eb42e..b5a9e4e24 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1235,7 +1235,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -1244,7 +1243,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -1253,7 +1251,6 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", - "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -1263,7 +1260,6 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -1276,14 +1272,12 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -1402,17 +1396,25 @@ "version": "8.4.5", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.5.tgz", "integrity": "sha512-dhsC09y1gpJWnK+Ff4SGvCuSnk9DaU0BJZSzOwa6GVSg65XtTugLBITDAAzRU5duGBoXBHpdR/9jHGxJjNflJQ==", - "dev": true, "dependencies": { "@types/estree": "*", "@types/json-schema": "*" } }, + "node_modules/@types/eslint-scope": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "peer": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", - "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==", - "dev": true + "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==" }, "node_modules/@types/glob": { "version": "7.2.0", @@ -1426,8 +1428,7 @@ "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" }, "node_modules/@types/lodash": { "version": "4.14.182", @@ -2445,6 +2446,164 @@ } } }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "peer": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "peer": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "peer": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "peer": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "peer": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "peer": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "peer": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "peer": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "peer": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "peer": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "peer": true + }, "node_modules/acorn": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", @@ -2456,6 +2615,15 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "peer": true, + "peerDependencies": { + "acorn": "^8" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -2871,7 +3039,6 @@ "version": "4.21.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", - "dev": true, "funding": [ { "type": "opencollective", @@ -2922,8 +3089,7 @@ "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, "node_modules/cache-base": { "version": "1.0.1", @@ -3019,7 +3185,6 @@ "version": "1.0.30001375", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001375.tgz", "integrity": "sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw==", - "dev": true, "funding": [ { "type": "opencollective", @@ -3088,6 +3253,15 @@ "fsevents": "~2.3.2" } }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "peer": true, + "engines": { + "node": ">=6.0" + } + }, "node_modules/class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -5281,8 +5455,7 @@ "node_modules/electron-to-chromium": { "version": "1.4.213", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.213.tgz", - "integrity": "sha512-+3DbGHGOCHTVB/Ms63bGqbyC1b8y7Fk86+7ltssB8NQrZtSCvZG6eooSl9U2Q0yw++fL2DpHKOdTU0NVEkFObg==", - "dev": true + "integrity": "sha512-+3DbGHGOCHTVB/Ms63bGqbyC1b8y7Fk86+7ltssB8NQrZtSCvZG6eooSl9U2Q0yw++fL2DpHKOdTU0NVEkFObg==" }, "node_modules/element-plus": { "version": "2.2.13", @@ -5339,6 +5512,19 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/enhanced-resolve": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", + "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -5356,6 +5542,12 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "peer": true + }, "node_modules/esbuild": { "version": "0.14.54", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz", @@ -5695,7 +5887,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, "engines": { "node": ">=6" } @@ -5826,7 +6017,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -6099,7 +6289,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -6111,7 +6300,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, "engines": { "node": ">=4.0" } @@ -6120,7 +6308,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, "engines": { "node": ">=4.0" } @@ -6139,6 +6326,15 @@ "node": ">=0.10.0" } }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "peer": true, + "engines": { + "node": ">=0.8.x" + } + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -6349,8 +6545,7 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-diff": { "version": "1.2.0", @@ -6377,8 +6572,7 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -7089,7 +7283,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -7780,6 +7973,35 @@ "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-1.6.0.tgz", "integrity": "sha512-fnjC0up+0SjEJtgmmG+teeel68kutkvzfctO/KxE3qJlbunkJYAshgH3boU++gSBHP8z5/r0ts0qRIrHf0RTQQ==" }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "peer": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/js-base64": { "version": "3.7.2", "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz", @@ -7835,8 +8057,7 @@ "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "node_modules/json-schema-traverse": { "version": "1.0.0", @@ -8153,6 +8374,15 @@ "node": ">=4" } }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "peer": true, + "engines": { + "node": ">=6.11.5" + } + }, "node_modules/local-pkg": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.2.tgz", @@ -8494,8 +8724,7 @@ "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, "node_modules/merge2": { "version": "1.4.1", @@ -8767,8 +8996,7 @@ "node_modules/node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", - "dev": true + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" }, "node_modules/normalize-package-data": { "version": "3.0.3", @@ -9674,7 +9902,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, "engines": { "node": ">=6" } @@ -9732,6 +9959,15 @@ "node": ">=8" } }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "peer": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, "node_modules/read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -10186,7 +10422,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -10269,6 +10504,55 @@ } } }, + "node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "peer": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/schema-utils/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peer": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/schema-utils/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "peer": true + }, "node_modules/screenfull": { "version": "6.0.2", "resolved": "https://registry.npmmirror.com/screenfull/-/screenfull-6.0.2.tgz", @@ -10312,6 +10596,15 @@ "node": ">=10" } }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "peer": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, "node_modules/set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -10620,7 +10913,6 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -11502,11 +11794,19 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/terser": { "version": "5.14.2", "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", - "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", @@ -11520,11 +11820,54 @@ "node": ">=10" } }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", + "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.14", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.14.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "node_modules/text-extensions": { "version": "1.9.0", @@ -12102,7 +12445,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz", "integrity": "sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==", - "dev": true, "funding": [ { "type": "opencollective", @@ -12128,7 +12470,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -12629,6 +12970,25 @@ "throttle-debounce": "^3.0.1" } }, + "node_modules/watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "peer": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/watchpack/node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "peer": true + }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -12638,6 +12998,53 @@ "defaults": "^1.0.3" } }, + "node_modules/webpack": { + "version": "5.74.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz", + "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", + "peer": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, "node_modules/webpack-chain": { "version": "4.12.1", "resolved": "https://registry.npmjs.org/webpack-chain/-/webpack-chain-4.12.1.tgz", @@ -12660,6 +13067,18 @@ "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.4.4.tgz", "integrity": "sha512-h9atBP/bsZohWpHnr+2sic8Iecb60GxftXsWNLLLSqewgIsGzByd2gcIID4nXcG+3tNe4GQG3dLcff3kXupdRA==" }, + "node_modules/webpack/node_modules/@types/estree": { + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "peer": true + }, + "node_modules/webpack/node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "peer": true + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -13748,20 +14167,17 @@ "@jridgewell/resolve-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" }, "@jridgewell/set-array": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" }, "@jridgewell/source-map": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", - "dev": true, "requires": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -13771,7 +14187,6 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, "requires": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -13783,14 +14198,12 @@ "@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, "@jridgewell/trace-mapping": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -13890,17 +14303,25 @@ "version": "8.4.5", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.5.tgz", "integrity": "sha512-dhsC09y1gpJWnK+Ff4SGvCuSnk9DaU0BJZSzOwa6GVSg65XtTugLBITDAAzRU5duGBoXBHpdR/9jHGxJjNflJQ==", - "dev": true, "requires": { "@types/estree": "*", "@types/json-schema": "*" } }, + "@types/eslint-scope": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "peer": true, + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, "@types/estree": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", - "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==", - "dev": true + "integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==" }, "@types/glob": { "version": "7.2.0", @@ -13914,8 +14335,7 @@ "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" }, "@types/lodash": { "version": "4.14.182", @@ -14709,11 +15129,176 @@ "vue-demi": "*" } }, + "@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "peer": true, + "requires": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "peer": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "peer": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "peer": true + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "peer": true, + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "peer": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "peer": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "peer": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "peer": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "peer": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "peer": true + }, "acorn": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==" }, + "acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "peer": true, + "requires": {} + }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -15013,7 +15598,6 @@ "version": "4.21.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", - "dev": true, "requires": { "caniuse-lite": "^1.0.30001370", "electron-to-chromium": "^1.4.202", @@ -15034,8 +15618,7 @@ "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, "cache-base": { "version": "1.0.1", @@ -15109,8 +15692,7 @@ "caniuse-lite": { "version": "1.0.30001375", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001375.tgz", - "integrity": "sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw==", - "dev": true + "integrity": "sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw==" }, "chalk": { "version": "4.1.2", @@ -15152,6 +15734,12 @@ "readdirp": "~3.6.0" } }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "peer": true + }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -16895,8 +17483,7 @@ "electron-to-chromium": { "version": "1.4.213", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.213.tgz", - "integrity": "sha512-+3DbGHGOCHTVB/Ms63bGqbyC1b8y7Fk86+7ltssB8NQrZtSCvZG6eooSl9U2Q0yw++fL2DpHKOdTU0NVEkFObg==", - "dev": true + "integrity": "sha512-+3DbGHGOCHTVB/Ms63bGqbyC1b8y7Fk86+7ltssB8NQrZtSCvZG6eooSl9U2Q0yw++fL2DpHKOdTU0NVEkFObg==" }, "element-plus": { "version": "2.2.13", @@ -16949,6 +17536,16 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "enhanced-resolve": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", + "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", + "peer": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, "entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -16963,6 +17560,12 @@ "is-arrayish": "^0.2.1" } }, + "es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "peer": true + }, "esbuild": { "version": "0.14.54", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz", @@ -17114,8 +17717,7 @@ "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, "escape-html": { "version": "1.0.3", @@ -17326,7 +17928,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -17392,7 +17993,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, "requires": { "estraverse": "^5.2.0" }, @@ -17400,16 +18000,14 @@ "estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" } } }, "estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" }, "estree-walker": { "version": "2.0.2", @@ -17422,6 +18020,12 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "peer": true + }, "execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -17592,8 +18196,7 @@ "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-diff": { "version": "1.2.0", @@ -17617,8 +18220,7 @@ "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "fast-levenshtein": { "version": "2.0.6", @@ -18168,8 +18770,7 @@ "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, "has-symbols": { "version": "1.0.3", @@ -18663,6 +19264,28 @@ "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-1.6.0.tgz", "integrity": "sha512-fnjC0up+0SjEJtgmmG+teeel68kutkvzfctO/KxE3qJlbunkJYAshgH3boU++gSBHP8z5/r0ts0qRIrHf0RTQQ==" }, + "jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "peer": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "peer": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "js-base64": { "version": "3.7.2", "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz", @@ -18709,8 +19332,7 @@ "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "json-schema-traverse": { "version": "1.0.0", @@ -18949,6 +19571,12 @@ } } }, + "loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "peer": true + }, "local-pkg": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.2.tgz", @@ -19210,8 +19838,7 @@ "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, "merge2": { "version": "1.4.1", @@ -19433,8 +20060,7 @@ "node-releases": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", - "dev": true + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==" }, "normalize-package-data": { "version": "3.0.3", @@ -20107,8 +20733,7 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "q": { "version": "1.5.1", @@ -20136,6 +20761,15 @@ "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", "dev": true }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "peer": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, "read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -20467,8 +21101,7 @@ "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safe-regex": { "version": "1.1.0", @@ -20503,6 +21136,44 @@ "neo-async": "^2.6.2" } }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "peer": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "peer": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peer": true, + "requires": {} + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "peer": true + } + } + }, "screenfull": { "version": "6.0.2", "resolved": "https://registry.npmmirror.com/screenfull/-/screenfull-6.0.2.tgz", @@ -20531,6 +21202,15 @@ "lru-cache": "^6.0.0" } }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "peer": true, + "requires": { + "randombytes": "^2.1.0" + } + }, "set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -20771,7 +21451,6 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -21452,11 +22131,16 @@ } } }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "peer": true + }, "terser": { "version": "5.14.2", "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", - "dev": true, "requires": { "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", @@ -21467,8 +22151,32 @@ "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + } + } + }, + "terser-webpack-plugin": { + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", + "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "peer": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.14", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.14.1" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "peer": true, + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } } } }, @@ -21849,7 +22557,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz", "integrity": "sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==", - "dev": true, "requires": { "escalade": "^3.1.1", "picocolors": "^1.0.0" @@ -21859,7 +22566,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "requires": { "punycode": "^2.1.0" } @@ -22251,6 +22957,24 @@ "throttle-debounce": "^3.0.1" } }, + "watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "peer": true, + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "dependencies": { + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "peer": true + } + } + }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -22260,6 +22984,52 @@ "defaults": "^1.0.3" } }, + "webpack": { + "version": "5.74.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz", + "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", + "peer": true, + "requires": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "dependencies": { + "@types/estree": { + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "peer": true + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "peer": true + } + } + }, "webpack-chain": { "version": "4.12.1", "resolved": "https://registry.npmjs.org/webpack-chain/-/webpack-chain-4.12.1.tgz", diff --git a/frontend/src/routers/router.ts b/frontend/src/routers/router.ts index 1edd036c0..b06c47eb8 100644 --- a/frontend/src/routers/router.ts +++ b/frontend/src/routers/router.ts @@ -71,7 +71,7 @@ export const routes: RouteRecordRaw[] = [ }, ]; const router = createRouter({ - history: createWebHistory(), + history: createWebHistory('/kubepi/'), routes: routes as RouteRecordRaw[], strict: false, scrollBehavior: () => ({ left: 0, top: 0 }), diff --git a/frontend/src/views/app-store/apps/index.vue b/frontend/src/views/app-store/apps/index.vue index 0b6dc9516..621b1b372 100644 --- a/frontend/src/views/app-store/apps/index.vue +++ b/frontend/src/views/app-store/apps/index.vue @@ -91,6 +91,7 @@ const sync = () => { SyncApp() .then(() => { ElMessage.success(i18n.global.t('app.syncSuccess')); + search(req); }) .finally(() => { loading.value = false; diff --git a/frontend/src/views/app-store/installed/index.vue b/frontend/src/views/app-store/installed/index.vue index 4abc46da8..cbcafffa8 100644 --- a/frontend/src/views/app-store/installed/index.vue +++ b/frontend/src/views/app-store/installed/index.vue @@ -72,7 +72,11 @@