Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d0d17eb5b | ||
|
|
9c937f3907 | ||
|
|
6ea0effa12 | ||
|
|
f106d20983 | ||
|
|
9cb2a5b99f | ||
|
|
911ac7d49c | ||
|
|
871906808c | ||
|
|
817603cade | ||
|
|
71669aa380 | ||
|
|
2605f9bdb8 | ||
|
|
bc5bbaf016 | ||
|
|
acd7a8b5f0 |
No files matched your search
+2
-3
@@ -1,3 +1,2 @@
|
|||||||
node_modules
|
web/*
|
||||||
dist
|
miao-directory.exe
|
||||||
static
|
|
||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"cSpell.words": [
|
||||||
|
"birthtime",
|
||||||
|
"gonic"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package api
|
||||||
|
|
||||||
|
var staticPath = "./"
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
|
"miao-directory/fsOperateEventCenter"
|
||||||
|
)
|
||||||
|
|
||||||
|
func CopyHandler(fsOperateEventCenter *fsOperateEventCenter.FsOperateEventCenter) gin.HandlerFunc {
|
||||||
|
return func(c *gin.Context) {
|
||||||
|
var req struct {
|
||||||
|
NewPath string `json:"newPath"`
|
||||||
|
}
|
||||||
|
if err := c.ShouldBindJSON(&req); err != nil {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid request body"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
decodedPath, err := filepath.Abs(filepath.Join(staticPath, c.Param("path")))
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"error": "Unable to access path"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
newPath := filepath.Join(staticPath, req.NewPath, filepath.Base(decodedPath))
|
||||||
|
eventId := fsOperateEventCenter.Push(func() error {
|
||||||
|
return copyFile(decodedPath, newPath)
|
||||||
|
})
|
||||||
|
c.JSON(http.StatusOK, gin.H{"eventId": eventId})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func copyFile(src, dst string) error {
|
||||||
|
sourceFile, err := os.Open(src)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer sourceFile.Close()
|
||||||
|
|
||||||
|
destFile, err := os.Create(dst)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer destFile.Close()
|
||||||
|
|
||||||
|
_, err = io.Copy(destFile, sourceFile)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return destFile.Sync()
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
// "fmt"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
|
"miao-directory/fsOperateEventCenter"
|
||||||
|
)
|
||||||
|
|
||||||
|
func CutHandler(fsOperateEventCenter *fsOperateEventCenter.FsOperateEventCenter) gin.HandlerFunc {
|
||||||
|
return func(c *gin.Context) {
|
||||||
|
var req struct {
|
||||||
|
NewPath string `json:"newPath"`
|
||||||
|
}
|
||||||
|
if err := c.ShouldBindJSON(&req); err != nil {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid request body"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
decodedPath, err := filepath.Abs(filepath.Join(staticPath, c.Param("path")))
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"error": "Unable to access path"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
newPath := filepath.Join(staticPath, req.NewPath, filepath.Base(decodedPath))
|
||||||
|
eventId := fsOperateEventCenter.Push(func() error {
|
||||||
|
return os.Rename(decodedPath, newPath)
|
||||||
|
})
|
||||||
|
c.JSON(http.StatusOK, gin.H{"eventId": eventId})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
// "fmt"
|
||||||
|
"miao-directory/fsOperateEventCenter"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
)
|
||||||
|
|
||||||
|
func DeleteHandler(fsOperateEventCenter *fsOperateEventCenter.FsOperateEventCenter) gin.HandlerFunc {
|
||||||
|
return func(c *gin.Context) {
|
||||||
|
decodedPath, err := filepath.Abs(filepath.Join(staticPath, c.Param("path")))
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"error": "Unable to access path"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
eventId := fsOperateEventCenter.Push(func() error {
|
||||||
|
return os.RemoveAll(decodedPath)
|
||||||
|
})
|
||||||
|
c.JSON(http.StatusOK, gin.H{"eventId": eventId})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"io/ioutil"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
)
|
||||||
|
|
||||||
|
func GetHandler(c *gin.Context) {
|
||||||
|
decodedPath, err := filepath.Abs(filepath.Join(staticPath, c.Param("path")))
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"error": "Unable to access path"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
fileInfo, err := os.Stat(decodedPath)
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
c.JSON(http.StatusNotFound, gin.H{"error": "Path not found"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if fileInfo.IsDir() {
|
||||||
|
files, err := ioutil.ReadDir(decodedPath)
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"error": "Unable to scan directory"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var fileDetails []gin.H
|
||||||
|
for _, file := range files {
|
||||||
|
fileDetails = append(fileDetails, gin.H{
|
||||||
|
"name": file.Name(),
|
||||||
|
"size": file.Size(),
|
||||||
|
"type": func() string {
|
||||||
|
if file.IsDir() {
|
||||||
|
return "directory"
|
||||||
|
}
|
||||||
|
return "file"
|
||||||
|
}(),
|
||||||
|
"stats": gin.H{
|
||||||
|
"atimeMs": file.ModTime().UnixNano() / 1e6,
|
||||||
|
"birthtimeMs": file.ModTime().UnixNano() / 1e6,
|
||||||
|
"ctimeMs": file.ModTime().UnixNano() / 1e6,
|
||||||
|
"mtimeMs": file.ModTime().UnixNano() / 1e6,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if len(fileDetails) == 0 {
|
||||||
|
c.JSON(http.StatusOK, []gin.H{})
|
||||||
|
} else {
|
||||||
|
c.JSON(http.StatusOK, fileDetails)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if strings.HasSuffix(decodedPath, "index.html") {
|
||||||
|
f, err := os.Open(decodedPath)
|
||||||
|
if err != nil {
|
||||||
|
c.Writer.WriteHeader(http.StatusInternalServerError)
|
||||||
|
c.Writer.Write([]byte("Internal Server Error"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
http.ServeContent(c.Writer, c.Request, "index.html", time.Now(), f)
|
||||||
|
} else {
|
||||||
|
// if c.Query("import") != "" {
|
||||||
|
// c.Writer.Header().Set("Content-Type", "application/javascript")
|
||||||
|
// }
|
||||||
|
ext := filepath.Ext(decodedPath)
|
||||||
|
switch ext {
|
||||||
|
case ".js":
|
||||||
|
case ".cjs":
|
||||||
|
c.Writer.Header().Set("Content-Type", "application/javascript")
|
||||||
|
case ".css":
|
||||||
|
c.Writer.Header().Set("Content-Type", "text/css")
|
||||||
|
case ".html":
|
||||||
|
c.Writer.Header().Set("Content-Type", "text/html")
|
||||||
|
case ".json":
|
||||||
|
c.Writer.Header().Set("Content-Type", "application/json")
|
||||||
|
default:
|
||||||
|
c.Writer.Header().Set("Content-Type", "application/octet-stream")
|
||||||
|
}
|
||||||
|
c.File(decodedPath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
)
|
||||||
|
|
||||||
|
func MkdirHandler(c *gin.Context) {
|
||||||
|
var request struct {
|
||||||
|
FolderName string `json:"folderName"`
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := c.ShouldBindJSON(&request); err != nil {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"message": "failed", "error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
decodedPath, err := filepath.Abs(filepath.Join(staticPath, c.Param("path")))
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"message": "failed", "error": "Unable to access path"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdirPath := filepath.Join(decodedPath, request.FolderName)
|
||||||
|
|
||||||
|
if err := os.MkdirAll(mkdirPath, os.ModePerm); err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"message": "failed", "error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
c.JSON(http.StatusOK, gin.H{"message": "success"})
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
|
"miao-directory/fsOperateEventCenter"
|
||||||
|
)
|
||||||
|
|
||||||
|
func QueryHandler(fsOperateEventCenter *fsOperateEventCenter.FsOperateEventCenter) gin.HandlerFunc {
|
||||||
|
return func(c *gin.Context) {
|
||||||
|
idStr := c.Query("id")
|
||||||
|
id, err := strconv.ParseInt(idStr, 10, 32)
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid id"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
event := fsOperateEventCenter.Query(int32(id))
|
||||||
|
c.JSON(http.StatusOK, event)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
// "fmt"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
|
"miao-directory/fsOperateEventCenter"
|
||||||
|
)
|
||||||
|
|
||||||
|
func RenameHandler(fsOperateEventCenter *fsOperateEventCenter.FsOperateEventCenter) gin.HandlerFunc {
|
||||||
|
return func(c *gin.Context) {
|
||||||
|
var req struct {
|
||||||
|
NewName string `json:"newName"`
|
||||||
|
}
|
||||||
|
if err := c.ShouldBindJSON(&req); err != nil {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid request body"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
decodedPath, err := filepath.Abs(filepath.Join(staticPath, c.Param("path")))
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"error": "Unable to access path"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
newTargetPath := filepath.Join(filepath.Dir(decodedPath), req.NewName)
|
||||||
|
eventId := fsOperateEventCenter.Push(func() error {
|
||||||
|
return os.Rename(decodedPath, newTargetPath)
|
||||||
|
})
|
||||||
|
c.JSON(http.StatusOK, gin.H{"eventId": eventId})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"io/ioutil"
|
||||||
|
)
|
||||||
|
|
||||||
|
func UploadHandler(c *gin.Context) {
|
||||||
|
fileName := c.PostForm("fileName")
|
||||||
|
operateType := c.PostForm("operateType")
|
||||||
|
file, err := c.FormFile("file")
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"message": "failed", "error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
decodedPath, err := filepath.Abs(filepath.Join(staticPath, c.Param("path")))
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"message": "failed", "error": "Unable to access path"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
savePath := filepath.Join(decodedPath, fileName)
|
||||||
|
fileData, err := file.Open()
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"message": "failed", "error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer fileData.Close()
|
||||||
|
|
||||||
|
data, err := ioutil.ReadAll(fileData)
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"message": "failed", "error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if operateType == "write" {
|
||||||
|
err = ioutil.WriteFile(savePath, data, 0644)
|
||||||
|
} else {
|
||||||
|
f, err := os.OpenFile(savePath, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0644)
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"message": "failed", "error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer f.Close()
|
||||||
|
_, err = f.Write(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusInternalServerError, gin.H{"message": "failed", "error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
c.JSON(http.StatusOK, gin.H{"message": "success"})
|
||||||
|
}
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
import { api, staticPath } from "../config.js";
|
|
||||||
import path from "path";
|
|
||||||
import useFsOprateEventCenter from "../hooks/useFsOprateEventCenter.js";
|
|
||||||
import fs from 'fs'
|
|
||||||
|
|
||||||
const fsOprateEventCenter = useFsOprateEventCenter()
|
|
||||||
|
|
||||||
function deletePath(targetPath) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
fs.stat(targetPath, (err, stats) => {
|
|
||||||
if (err) {
|
|
||||||
console.log(err)
|
|
||||||
return reject(err); // 如果获取状态失败,返回错误
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stats.isFile()) {
|
|
||||||
// 如果是文件,直接删除
|
|
||||||
fs.unlink(targetPath, (err) => {
|
|
||||||
if (err) return reject(err);
|
|
||||||
resolve(); // 删除成功
|
|
||||||
});
|
|
||||||
// console.log('delete file')
|
|
||||||
} else if (stats.isDirectory()) {
|
|
||||||
// 如果是文件夹,递归删除
|
|
||||||
fs.rm(targetPath, { recursive: true }, (err) => {
|
|
||||||
if (err) return reject(err);
|
|
||||||
resolve(); // 删除成功
|
|
||||||
});
|
|
||||||
// console.log('delete directory')
|
|
||||||
} else {
|
|
||||||
// console.log('unknow file')
|
|
||||||
// 其他类型(如符号链接等),可以根据需要处理
|
|
||||||
reject('unknow file'); // 这里选择不处理其他类型
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function useDeleteApi(app) {
|
|
||||||
app.post(api.delete, (req, res) => {
|
|
||||||
const decodedPath = decodeURIComponent(req.path).substring(api.delete.length - 1);
|
|
||||||
const targetPath = path.join(staticPath, decodedPath);
|
|
||||||
const eventId = fsOprateEventCenter.push(deletePath(targetPath))
|
|
||||||
res.send({ eventId });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
import express from "express";
|
|
||||||
import path from "path";
|
|
||||||
import fs from "fs";
|
|
||||||
import { staticPath, api } from "../config.js";
|
|
||||||
|
|
||||||
const api_get = api.get
|
|
||||||
|
|
||||||
export default function useGetApi(app) {
|
|
||||||
// 不存在文件与文件夹同名的问题
|
|
||||||
app.use(api_get, (req, res, next) => {
|
|
||||||
const decodedPath = decodeURIComponent(req.path);
|
|
||||||
const directoryPath = path.join(staticPath, decodedPath);
|
|
||||||
fs.stat(directoryPath, (err, stats) => {
|
|
||||||
if (err) {
|
|
||||||
console.log(err, directoryPath);
|
|
||||||
// return res.status(500).json({ error: "Unable to access path" });
|
|
||||||
return next();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stats.isDirectory()) {
|
|
||||||
fs.readdir(directoryPath, (err, files) => {
|
|
||||||
if (err) {
|
|
||||||
console.log(err, directoryPath);
|
|
||||||
return res.status(500).json({ error: "Unable to scan directory" });
|
|
||||||
}
|
|
||||||
const fileDetails = files.map(file => {
|
|
||||||
const filePath = path.join(directoryPath, file);
|
|
||||||
const stats = fs.statSync(filePath);
|
|
||||||
return {
|
|
||||||
name: file,
|
|
||||||
size: stats.isDirectory() ? undefined : stats.size,
|
|
||||||
type: stats.isDirectory() ? "directory" : "file",
|
|
||||||
stats: {
|
|
||||||
atimeMs: stats.atimeMs,
|
|
||||||
birthtimeMs: stats.birthtimeMs,
|
|
||||||
ctimeMs: stats.ctimeMs,
|
|
||||||
mtimeMs: stats.mtimeMs
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
res.json(fileDetails);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
next();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
app.use(api_get, express.static(staticPath));
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import { api } from "../config.js";
|
|
||||||
import useFsOprateEventCenter from "../hooks/useFsOprateEventCenter.js";
|
|
||||||
|
|
||||||
const fsOprateEventCenter = useFsOprateEventCenter();
|
|
||||||
|
|
||||||
export default function useQueryApi(app) {
|
|
||||||
app.get(api.query, (req, res) => {
|
|
||||||
const id = req.query.id;
|
|
||||||
res.json(fsOprateEventCenter.query(id));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
import path from "path";
|
|
||||||
import fs from "fs";
|
|
||||||
import multer from "multer";
|
|
||||||
import { api, staticPath } from "../config.js";
|
|
||||||
|
|
||||||
const api_upload = api.upload
|
|
||||||
|
|
||||||
const storage = multer.memoryStorage();
|
|
||||||
const upload = multer({ storage: storage }).single('file');
|
|
||||||
|
|
||||||
export default function useUploadApi(app) {
|
|
||||||
app.post(api_upload, upload, (req, res) => {
|
|
||||||
// 必须这样传,不然中文乱码
|
|
||||||
const fileName = req.body.fileName
|
|
||||||
|
|
||||||
const decodedPath = decodeURIComponent(req.path).substring(api_upload.length - 1);
|
|
||||||
const savePath = path.join(staticPath, decodedPath, fileName)
|
|
||||||
// 覆盖写or追加写
|
|
||||||
const oprateType = req.body.oprateType === 'write' ? 'write' : 'append'
|
|
||||||
const data = req.file.buffer
|
|
||||||
if (oprateType === 'write') {
|
|
||||||
// 覆盖写入
|
|
||||||
fs.writeFile(savePath, data, (err) => {
|
|
||||||
if (err) {
|
|
||||||
return res.status(500).json({ message: 'failed', error: err });
|
|
||||||
}
|
|
||||||
res.status(200).json({ message: 'success' });
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// 追加写入
|
|
||||||
fs.appendFile(savePath, data, (err) => {
|
|
||||||
if (err) {
|
|
||||||
return res.status(500).json({ message: 'failed', error: err });
|
|
||||||
}
|
|
||||||
res.status(200).json({ message: 'success' });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
import path from "path";
|
|
||||||
|
|
||||||
|
|
||||||
export const staticPath = path.join("./static");
|
|
||||||
export const port = 17705;
|
|
||||||
|
|
||||||
export const api = {
|
|
||||||
get: `/${"get"}`,
|
|
||||||
upload: `/${"upload"}/*`,
|
|
||||||
delete: `/${"delete"}/*`,
|
|
||||||
query: `/${"query"}`
|
|
||||||
}
|
|
||||||
|
|
||||||
export default { staticPath, port, api }
|
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package fsOperateEventCenter
|
||||||
|
|
||||||
|
import (
|
||||||
|
// "fmt"
|
||||||
|
"math/rand"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FsOperateEventStatus string
|
||||||
|
|
||||||
|
const (
|
||||||
|
FsOperateEventStatusProgress FsOperateEventStatus = "progress"
|
||||||
|
FsOperateEventStatusSuccess FsOperateEventStatus = "success"
|
||||||
|
FsOperateEventStatusFailed FsOperateEventStatus = "failed"
|
||||||
|
FsOperateEventStatusUnknown FsOperateEventStatus = "unknown"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FsOperateEvent struct {
|
||||||
|
Status FsOperateEventStatus `json:"status"`
|
||||||
|
FailedEvent error `json:"failedEvent"`
|
||||||
|
UID int32 `json:"uid"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type FsOperateEventCenter struct {
|
||||||
|
eventMap sync.Map
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewFsOperateEventCenter() *FsOperateEventCenter {
|
||||||
|
return &FsOperateEventCenter{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FsOperateEventCenter) Push(event func() error) int32 {
|
||||||
|
ev := &FsOperateEvent{
|
||||||
|
Status: FsOperateEventStatusProgress,
|
||||||
|
UID: generateId(),
|
||||||
|
}
|
||||||
|
|
||||||
|
wrapper := &eventWrapper{
|
||||||
|
event: ev,
|
||||||
|
timer: time.AfterFunc(time.Hour, func() {
|
||||||
|
c.Query(ev.UID)
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
|
||||||
|
c.eventMap.Store(ev.UID, wrapper)
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
if err := event(); err != nil {
|
||||||
|
wrapper.event.Status = FsOperateEventStatusFailed
|
||||||
|
wrapper.event.FailedEvent = err
|
||||||
|
} else {
|
||||||
|
wrapper.event.Status = FsOperateEventStatusSuccess
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
return ev.UID
|
||||||
|
}
|
||||||
|
|
||||||
|
type eventWrapper struct {
|
||||||
|
event *FsOperateEvent
|
||||||
|
timer *time.Timer
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FsOperateEventCenter) Query(id int32) *FsOperateEvent {
|
||||||
|
val, ok := c.eventMap.Load(id)
|
||||||
|
// fmt.Printf("Query ID: %d; ok: %t; val: %v\n", id, ok, val)
|
||||||
|
|
||||||
|
// c.eventMap.Range(func(key, value interface{}) bool {
|
||||||
|
// fmt.Printf("key: %d (type: %T), id: %d (type: %T), bool: %t\n", key, key, id, id, id == key)
|
||||||
|
// event := value.(*eventWrapper).event
|
||||||
|
// fmt.Printf("Event UID: %d, Status: %s\n", event.UID, event.Status)
|
||||||
|
// return true
|
||||||
|
// })
|
||||||
|
|
||||||
|
if !ok {
|
||||||
|
return &FsOperateEvent{
|
||||||
|
Status: FsOperateEventStatusUnknown,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
wrapper := val.(*eventWrapper)
|
||||||
|
if wrapper.event.Status == FsOperateEventStatusSuccess || wrapper.event.Status == FsOperateEventStatusFailed {
|
||||||
|
wrapper.timer.Stop()
|
||||||
|
c.eventMap.Delete(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
return wrapper.event
|
||||||
|
}
|
||||||
|
|
||||||
|
func generateId() int32 {
|
||||||
|
return rand.Int31()
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
module miao-directory
|
||||||
|
|
||||||
|
go 1.23.0
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/akavel/rsrc v0.10.2 // indirect
|
||||||
|
github.com/bytedance/sonic v1.12.1 // indirect
|
||||||
|
github.com/bytedance/sonic/loader v0.2.0 // indirect
|
||||||
|
github.com/cloudwego/base64x v0.1.4 // indirect
|
||||||
|
github.com/cloudwego/iasm v0.2.0 // indirect
|
||||||
|
github.com/gabriel-vasile/mimetype v1.4.5 // indirect
|
||||||
|
github.com/gin-contrib/gzip v1.0.1 // indirect
|
||||||
|
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||||
|
github.com/gin-gonic/gin v1.10.0 // indirect
|
||||||
|
github.com/go-playground/locales v0.14.1 // indirect
|
||||||
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||||
|
github.com/go-playground/validator/v10 v10.22.0 // indirect
|
||||||
|
github.com/goccy/go-json v0.10.3 // indirect
|
||||||
|
github.com/josephspurrier/goversioninfo v1.4.0 // indirect
|
||||||
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
|
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
|
||||||
|
github.com/leodido/go-urn v1.4.0 // indirect
|
||||||
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
|
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
||||||
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||||
|
github.com/ugorji/go/codec v1.2.12 // indirect
|
||||||
|
golang.org/x/arch v0.9.0 // indirect
|
||||||
|
golang.org/x/crypto v0.26.0 // indirect
|
||||||
|
golang.org/x/net v0.28.0 // indirect
|
||||||
|
golang.org/x/sys v0.24.0 // indirect
|
||||||
|
golang.org/x/text v0.17.0 // indirect
|
||||||
|
google.golang.org/protobuf v1.34.2 // indirect
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
|
)
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
github.com/akavel/rsrc v0.10.2 h1:Zxm8V5eI1hW4gGaYsJQUhxpjkENuG91ki8B4zCrvEsw=
|
||||||
|
github.com/akavel/rsrc v0.10.2/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=
|
||||||
|
github.com/bytedance/sonic v1.12.1 h1:jWl5Qz1fy7X1ioY74WqO0KjAMtAGQs4sYnjiEBiyX24=
|
||||||
|
github.com/bytedance/sonic v1.12.1/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk=
|
||||||
|
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
|
||||||
|
github.com/bytedance/sonic/loader v0.2.0 h1:zNprn+lsIP06C/IqCHs3gPQIvnvpKbbxyXQP1iU4kWM=
|
||||||
|
github.com/bytedance/sonic/loader v0.2.0/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
|
||||||
|
github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
|
||||||
|
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
|
||||||
|
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
|
||||||
|
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
|
||||||
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/gabriel-vasile/mimetype v1.4.5 h1:J7wGKdGu33ocBOhGy0z653k/lFKLFDPJMG8Gql0kxn4=
|
||||||
|
github.com/gabriel-vasile/mimetype v1.4.5/go.mod h1:ibHel+/kbxn9x2407k1izTA1S81ku1z/DlgOW2QE0M4=
|
||||||
|
github.com/gin-contrib/gzip v1.0.1 h1:HQ8ENHODeLY7a4g1Au/46Z92bdGFl74OhxcZble9WJE=
|
||||||
|
github.com/gin-contrib/gzip v1.0.1/go.mod h1:njt428fdUNRvjuJf16tZMYZ2Yl+WQB53X5wmhDwXvC4=
|
||||||
|
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||||
|
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||||
|
github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=
|
||||||
|
github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
|
||||||
|
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||||
|
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||||
|
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||||
|
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||||
|
github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao=
|
||||||
|
github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
||||||
|
github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
|
||||||
|
github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||||
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
|
github.com/josephspurrier/goversioninfo v1.4.0 h1:Puhl12NSHUSALHSuzYwPYQkqa2E1+7SrtAPJorKK0C8=
|
||||||
|
github.com/josephspurrier/goversioninfo v1.4.0/go.mod h1:JWzv5rKQr+MmW+LvM412ToT/IkYDZjaclF2pKDss8IY=
|
||||||
|
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||||
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
|
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||||
|
github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM=
|
||||||
|
github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
|
||||||
|
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
|
||||||
|
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
||||||
|
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
|
||||||
|
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||||
|
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
|
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||||
|
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||||
|
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
|
||||||
|
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
|
||||||
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
|
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||||
|
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||||
|
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||||
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
|
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
|
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||||
|
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
|
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||||
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
|
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
||||||
|
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||||
|
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
|
||||||
|
github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||||
|
golang.org/x/arch v0.9.0 h1:ub9TgUInamJ8mrZIGlBG6/4TqWeMszd4N8lNorbrr6k=
|
||||||
|
golang.org/x/arch v0.9.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
|
||||||
|
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
|
||||||
|
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
|
||||||
|
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
|
||||||
|
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
|
||||||
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
|
||||||
|
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
|
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
|
||||||
|
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||||
|
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
|
||||||
|
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||||
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
|
||||||
|
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
/**
|
|
||||||
* 生成一个id,不唯一的几率比因为我代码烂的几率低
|
|
||||||
* @param length 生成id的长度
|
|
||||||
* @returns {number}
|
|
||||||
*/
|
|
||||||
export default function generateId(length) {
|
|
||||||
length || (length = 16);
|
|
||||||
let id = Math.ceil(Math.random() * 10 ** 16);
|
|
||||||
return id
|
|
||||||
}
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
import generateId from "./generateId.js"
|
|
||||||
|
|
||||||
// 一个文件操作事件
|
|
||||||
class FsOprateEvent {
|
|
||||||
constructor(event){
|
|
||||||
this.status = 'progress'
|
|
||||||
this.uid = generateId()
|
|
||||||
event.then(()=>{
|
|
||||||
this.status = 'success'
|
|
||||||
}).catch((e)=>{
|
|
||||||
this.failedEvent = e
|
|
||||||
this.status = 'failed'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 事件状态,分为progress, success, failed
|
|
||||||
*/
|
|
||||||
failedEvent
|
|
||||||
status
|
|
||||||
uid
|
|
||||||
}
|
|
||||||
|
|
||||||
class FsOprateEventCenter {
|
|
||||||
constructor(){
|
|
||||||
this.eventMap = {}
|
|
||||||
}
|
|
||||||
eventMap
|
|
||||||
/**
|
|
||||||
* 推送一个事件,返回这个事件的id,后续可以通过这个id查询这个事件的状态
|
|
||||||
* @param {Promise} event
|
|
||||||
* @returns {number} 事件id
|
|
||||||
*/
|
|
||||||
push(event){
|
|
||||||
const ev = new FsOprateEvent(event)
|
|
||||||
const id = ev.uid
|
|
||||||
this.eventMap[id] = {
|
|
||||||
event: ev,
|
|
||||||
// 每小时自查询一下状态,防止一直没查询导致内存泄漏
|
|
||||||
timer: setInterval(()=>{
|
|
||||||
this.query(id)
|
|
||||||
}, 1000*60*60)
|
|
||||||
}
|
|
||||||
return id
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 推送一个事件,返回这个事件的id,后续可以通过这个id查询这个事件的状态
|
|
||||||
* 当查询到这个事件已经完成的时候,将这个事件移除出事件表(eventMap)
|
|
||||||
* @param {number} id 事件id
|
|
||||||
* @returns {{status: 'success' | 'failed' | 'progress' | 'unknow'; result?: any}} 事件id
|
|
||||||
*/
|
|
||||||
query(id){
|
|
||||||
let status
|
|
||||||
if(!this.eventMap[id]){
|
|
||||||
status = 'unknow'
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
status = this.eventMap[id].event.status
|
|
||||||
}
|
|
||||||
const res = {status}
|
|
||||||
if( ['success', 'failed'].includes(status) ){
|
|
||||||
if(status === 'failed'){
|
|
||||||
res.result = this.eventMap[id].event.failedEvent
|
|
||||||
}
|
|
||||||
clearInterval(this.eventMap[id].timer)
|
|
||||||
this.eventMap[id] = undefined
|
|
||||||
}
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const fsOprateEventCenter = new FsOprateEventCenter()
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 除了上传以外的所有文件操作都统一通过这个进行管理
|
|
||||||
* @returns {fsOprateEventCenter}
|
|
||||||
*/
|
|
||||||
export default function useFsOprateEventCenter(){
|
|
||||||
return fsOprateEventCenter
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
import express from "express";
|
|
||||||
import os from "os";
|
|
||||||
import cors from "cors";
|
|
||||||
import fs from "fs";
|
|
||||||
import Config from "./config.js";
|
|
||||||
import useGetApi from "./api/useGetApi.js";
|
|
||||||
import useUploadApi from "./api/useUploadApi.js";
|
|
||||||
import useDeleteApi from "./api/useDeleteApi.js";
|
|
||||||
import useQueryApi from "./api/useQueryApi.js";
|
|
||||||
|
|
||||||
const { staticPath, port, api } = Config;
|
|
||||||
|
|
||||||
if (!fs.existsSync(staticPath)) {
|
|
||||||
fs.mkdirSync(staticPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
const app = express();
|
|
||||||
app.use(cors());
|
|
||||||
|
|
||||||
useGetApi(app);
|
|
||||||
useUploadApi(app);
|
|
||||||
useDeleteApi(app);
|
|
||||||
useQueryApi(app);
|
|
||||||
|
|
||||||
app.listen(port, "::", () => {
|
|
||||||
const interfaces = os.networkInterfaces();
|
|
||||||
console.log(`服务器正在以下地址运行:`);
|
|
||||||
for (const name of Object.keys(interfaces)) {
|
|
||||||
for (const iface of interfaces[name]) {
|
|
||||||
iface.family === "IPv6" ? console.log(`http://[${iface.address}]:${port}`) : console.log(`http://${iface.address}:${port}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.log(`以下地址访问文件/文件夹:`);
|
|
||||||
for (const name of Object.keys(interfaces)) {
|
|
||||||
for (const iface of interfaces[name]) {
|
|
||||||
iface.family === "IPv6" ? console.log(`http://[${iface.address}]:${port}${api.get}`) : console.log(`http://${iface.address}:${port}${api.get}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
//go:generate goversioninfo -icon=./icon.ico
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"embed"
|
||||||
|
"fmt"
|
||||||
|
"net"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"github.com/gin-contrib/gzip"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
|
"miao-directory/api"
|
||||||
|
"miao-directory/fsOperateEventCenter"
|
||||||
|
)
|
||||||
|
|
||||||
|
//go:embed all:web/*
|
||||||
|
var webFS embed.FS
|
||||||
|
|
||||||
|
var port = ":17705"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
// gin.SetMode(gin.ReleaseMode)
|
||||||
|
|
||||||
|
fsOperateEventCenter := fsOperateEventCenter.NewFsOperateEventCenter()
|
||||||
|
|
||||||
|
router := gin.Default()
|
||||||
|
router.Use(corsMiddleware())
|
||||||
|
|
||||||
|
router.GET("/query", api.QueryHandler(fsOperateEventCenter))
|
||||||
|
router.GET("/get/*path", api.GetHandler)
|
||||||
|
router.POST("/mkdir/*path", api.MkdirHandler)
|
||||||
|
router.POST("/upload/*path", api.UploadHandler)
|
||||||
|
router.POST("/cut/*path", api.CutHandler(fsOperateEventCenter))
|
||||||
|
router.POST("/copy/*path", api.CopyHandler(fsOperateEventCenter))
|
||||||
|
router.POST("/rename/*path", api.RenameHandler(fsOperateEventCenter))
|
||||||
|
router.POST("/delete/*path", api.DeleteHandler(fsOperateEventCenter))
|
||||||
|
|
||||||
|
// Redirect from '/' to '/web/'
|
||||||
|
router.GET("/", func(c *gin.Context) {
|
||||||
|
c.Redirect(http.StatusMovedPermanently, "/web/")
|
||||||
|
})
|
||||||
|
|
||||||
|
// Serve static files from the embedded filesystem with gzip compression
|
||||||
|
staticFS := http.FS(webFS)
|
||||||
|
staticGroup := router.Group("/web")
|
||||||
|
staticGroup.Use(gzip.Gzip(gzip.DefaultCompression))
|
||||||
|
staticGroup.GET("/*filepath", func(c *gin.Context) {
|
||||||
|
http.FileServer(staticFS).ServeHTTP(c.Writer, c.Request)
|
||||||
|
})
|
||||||
|
|
||||||
|
address := "[::]" + port
|
||||||
|
printListeningAddresses(port)
|
||||||
|
router.Run(address)
|
||||||
|
}
|
||||||
|
|
||||||
|
func corsMiddleware() gin.HandlerFunc {
|
||||||
|
return func(c *gin.Context) {
|
||||||
|
c.Writer.Header().Set("Access-Control-Allow-Origin", "*")
|
||||||
|
c.Next()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func printListeningAddresses(port string) {
|
||||||
|
host, _ := os.Hostname()
|
||||||
|
addrs, _ := net.LookupHost(host)
|
||||||
|
|
||||||
|
fmt.Printf("Listening on:\n")
|
||||||
|
fmt.Printf(" ➜ Local: http://localhost%s\n", port)
|
||||||
|
for _, addr := range addrs {
|
||||||
|
if strings.Contains(addr, "%") {
|
||||||
|
addr = strings.Split(addr, "%")[0]
|
||||||
|
}
|
||||||
|
if strings.Contains(addr, ":") {
|
||||||
|
// IPv6 address
|
||||||
|
fmt.Printf(" ➜ Network: http://[%s]%s\n", addr, port)
|
||||||
|
} else {
|
||||||
|
// IPv4 address
|
||||||
|
fmt.Printf(" ➜ Network: http://%s%s\n", addr, port)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "miao-directory",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "",
|
|
||||||
"main": "index.js",
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
|
||||||
"dev": "ts-node index.js",
|
|
||||||
"dev:bun": "bun index.js",
|
|
||||||
"serve": "node dist/index.min.js",
|
|
||||||
"serve:bun": "bun dist/index.min.js",
|
|
||||||
"build": "ncc build index.js && uglifyjs dist/index.js -o dist/index.min.js"
|
|
||||||
},
|
|
||||||
"keywords": [],
|
|
||||||
"author": "",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"cors": "^2.8.5",
|
|
||||||
"express": "^4.19.2",
|
|
||||||
"multer": "1.4.5-lts.1",
|
|
||||||
"ts-node": "^10.9.2"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@vercel/ncc": "^0.38.1",
|
|
||||||
"uglify-js": "^3.19.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Generated
-848
@@ -1,848 +0,0 @@
|
|||||||
lockfileVersion: '9.0'
|
|
||||||
|
|
||||||
settings:
|
|
||||||
autoInstallPeers: true
|
|
||||||
excludeLinksFromLockfile: false
|
|
||||||
|
|
||||||
importers:
|
|
||||||
|
|
||||||
.:
|
|
||||||
dependencies:
|
|
||||||
cors:
|
|
||||||
specifier: ^2.8.5
|
|
||||||
version: 2.8.5
|
|
||||||
express:
|
|
||||||
specifier: ^4.19.2
|
|
||||||
version: 4.19.2
|
|
||||||
multer:
|
|
||||||
specifier: 1.4.5-lts.1
|
|
||||||
version: 1.4.5-lts.1
|
|
||||||
ts-node:
|
|
||||||
specifier: ^10.9.2
|
|
||||||
version: 10.9.2(@types/node@22.2.0)(typescript@5.5.4)
|
|
||||||
devDependencies:
|
|
||||||
'@vercel/ncc':
|
|
||||||
specifier: ^0.38.1
|
|
||||||
version: 0.38.1
|
|
||||||
uglify-js:
|
|
||||||
specifier: ^3.19.1
|
|
||||||
version: 3.19.1
|
|
||||||
|
|
||||||
packages:
|
|
||||||
|
|
||||||
'@cspotcode/source-map-support@0.8.1':
|
|
||||||
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
|
|
||||||
engines: {node: '>=12'}
|
|
||||||
|
|
||||||
'@jridgewell/resolve-uri@3.1.2':
|
|
||||||
resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
|
|
||||||
engines: {node: '>=6.0.0'}
|
|
||||||
|
|
||||||
'@jridgewell/sourcemap-codec@1.5.0':
|
|
||||||
resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==}
|
|
||||||
|
|
||||||
'@jridgewell/trace-mapping@0.3.9':
|
|
||||||
resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}
|
|
||||||
|
|
||||||
'@tsconfig/node10@1.0.11':
|
|
||||||
resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==}
|
|
||||||
|
|
||||||
'@tsconfig/node12@1.0.11':
|
|
||||||
resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==}
|
|
||||||
|
|
||||||
'@tsconfig/node14@1.0.3':
|
|
||||||
resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==}
|
|
||||||
|
|
||||||
'@tsconfig/node16@1.0.4':
|
|
||||||
resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==}
|
|
||||||
|
|
||||||
'@types/node@22.2.0':
|
|
||||||
resolution: {integrity: sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==}
|
|
||||||
|
|
||||||
'@vercel/ncc@0.38.1':
|
|
||||||
resolution: {integrity: sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw==}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
accepts@1.3.8:
|
|
||||||
resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
acorn-walk@8.3.3:
|
|
||||||
resolution: {integrity: sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==}
|
|
||||||
engines: {node: '>=0.4.0'}
|
|
||||||
|
|
||||||
acorn@8.12.1:
|
|
||||||
resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==}
|
|
||||||
engines: {node: '>=0.4.0'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
append-field@1.0.0:
|
|
||||||
resolution: {integrity: sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==}
|
|
||||||
|
|
||||||
arg@4.1.3:
|
|
||||||
resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==}
|
|
||||||
|
|
||||||
array-flatten@1.1.1:
|
|
||||||
resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==}
|
|
||||||
|
|
||||||
body-parser@1.20.2:
|
|
||||||
resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==}
|
|
||||||
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
|
|
||||||
|
|
||||||
buffer-from@1.1.2:
|
|
||||||
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
|
|
||||||
|
|
||||||
busboy@1.6.0:
|
|
||||||
resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==}
|
|
||||||
engines: {node: '>=10.16.0'}
|
|
||||||
|
|
||||||
bytes@3.1.2:
|
|
||||||
resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==}
|
|
||||||
engines: {node: '>= 0.8'}
|
|
||||||
|
|
||||||
call-bind@1.0.7:
|
|
||||||
resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==}
|
|
||||||
engines: {node: '>= 0.4'}
|
|
||||||
|
|
||||||
concat-stream@1.6.2:
|
|
||||||
resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==}
|
|
||||||
engines: {'0': node >= 0.8}
|
|
||||||
|
|
||||||
content-disposition@0.5.4:
|
|
||||||
resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
content-type@1.0.5:
|
|
||||||
resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
cookie-signature@1.0.6:
|
|
||||||
resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==}
|
|
||||||
|
|
||||||
cookie@0.6.0:
|
|
||||||
resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
core-util-is@1.0.3:
|
|
||||||
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
|
|
||||||
|
|
||||||
cors@2.8.5:
|
|
||||||
resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==}
|
|
||||||
engines: {node: '>= 0.10'}
|
|
||||||
|
|
||||||
create-require@1.1.1:
|
|
||||||
resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==}
|
|
||||||
|
|
||||||
debug@2.6.9:
|
|
||||||
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
|
|
||||||
peerDependencies:
|
|
||||||
supports-color: '*'
|
|
||||||
peerDependenciesMeta:
|
|
||||||
supports-color:
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
define-data-property@1.1.4:
|
|
||||||
resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==}
|
|
||||||
engines: {node: '>= 0.4'}
|
|
||||||
|
|
||||||
depd@2.0.0:
|
|
||||||
resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==}
|
|
||||||
engines: {node: '>= 0.8'}
|
|
||||||
|
|
||||||
destroy@1.2.0:
|
|
||||||
resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==}
|
|
||||||
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
|
|
||||||
|
|
||||||
diff@4.0.2:
|
|
||||||
resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==}
|
|
||||||
engines: {node: '>=0.3.1'}
|
|
||||||
|
|
||||||
ee-first@1.1.1:
|
|
||||||
resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
|
|
||||||
|
|
||||||
encodeurl@1.0.2:
|
|
||||||
resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==}
|
|
||||||
engines: {node: '>= 0.8'}
|
|
||||||
|
|
||||||
es-define-property@1.0.0:
|
|
||||||
resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==}
|
|
||||||
engines: {node: '>= 0.4'}
|
|
||||||
|
|
||||||
es-errors@1.3.0:
|
|
||||||
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
|
|
||||||
engines: {node: '>= 0.4'}
|
|
||||||
|
|
||||||
escape-html@1.0.3:
|
|
||||||
resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==}
|
|
||||||
|
|
||||||
etag@1.8.1:
|
|
||||||
resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
express@4.19.2:
|
|
||||||
resolution: {integrity: sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==}
|
|
||||||
engines: {node: '>= 0.10.0'}
|
|
||||||
|
|
||||||
finalhandler@1.2.0:
|
|
||||||
resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==}
|
|
||||||
engines: {node: '>= 0.8'}
|
|
||||||
|
|
||||||
forwarded@0.2.0:
|
|
||||||
resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
fresh@0.5.2:
|
|
||||||
resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
function-bind@1.1.2:
|
|
||||||
resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
|
|
||||||
|
|
||||||
get-intrinsic@1.2.4:
|
|
||||||
resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==}
|
|
||||||
engines: {node: '>= 0.4'}
|
|
||||||
|
|
||||||
gopd@1.0.1:
|
|
||||||
resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
|
|
||||||
|
|
||||||
has-property-descriptors@1.0.2:
|
|
||||||
resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==}
|
|
||||||
|
|
||||||
has-proto@1.0.3:
|
|
||||||
resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==}
|
|
||||||
engines: {node: '>= 0.4'}
|
|
||||||
|
|
||||||
has-symbols@1.0.3:
|
|
||||||
resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==}
|
|
||||||
engines: {node: '>= 0.4'}
|
|
||||||
|
|
||||||
hasown@2.0.2:
|
|
||||||
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
|
|
||||||
engines: {node: '>= 0.4'}
|
|
||||||
|
|
||||||
http-errors@2.0.0:
|
|
||||||
resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==}
|
|
||||||
engines: {node: '>= 0.8'}
|
|
||||||
|
|
||||||
iconv-lite@0.4.24:
|
|
||||||
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
|
|
||||||
engines: {node: '>=0.10.0'}
|
|
||||||
|
|
||||||
inherits@2.0.4:
|
|
||||||
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
|
|
||||||
|
|
||||||
ipaddr.js@1.9.1:
|
|
||||||
resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==}
|
|
||||||
engines: {node: '>= 0.10'}
|
|
||||||
|
|
||||||
isarray@1.0.0:
|
|
||||||
resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==}
|
|
||||||
|
|
||||||
make-error@1.3.6:
|
|
||||||
resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==}
|
|
||||||
|
|
||||||
media-typer@0.3.0:
|
|
||||||
resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
merge-descriptors@1.0.1:
|
|
||||||
resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==}
|
|
||||||
|
|
||||||
methods@1.1.2:
|
|
||||||
resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
mime-db@1.52.0:
|
|
||||||
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
mime-types@2.1.35:
|
|
||||||
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
mime@1.6.0:
|
|
||||||
resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==}
|
|
||||||
engines: {node: '>=4'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
minimist@1.2.8:
|
|
||||||
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
|
|
||||||
|
|
||||||
mkdirp@0.5.6:
|
|
||||||
resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
ms@2.0.0:
|
|
||||||
resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==}
|
|
||||||
|
|
||||||
ms@2.1.3:
|
|
||||||
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
|
|
||||||
|
|
||||||
multer@1.4.5-lts.1:
|
|
||||||
resolution: {integrity: sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==}
|
|
||||||
engines: {node: '>= 6.0.0'}
|
|
||||||
|
|
||||||
negotiator@0.6.3:
|
|
||||||
resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
object-assign@4.1.1:
|
|
||||||
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
|
|
||||||
engines: {node: '>=0.10.0'}
|
|
||||||
|
|
||||||
object-inspect@1.13.2:
|
|
||||||
resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==}
|
|
||||||
engines: {node: '>= 0.4'}
|
|
||||||
|
|
||||||
on-finished@2.4.1:
|
|
||||||
resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==}
|
|
||||||
engines: {node: '>= 0.8'}
|
|
||||||
|
|
||||||
parseurl@1.3.3:
|
|
||||||
resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==}
|
|
||||||
engines: {node: '>= 0.8'}
|
|
||||||
|
|
||||||
path-to-regexp@0.1.7:
|
|
||||||
resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==}
|
|
||||||
|
|
||||||
process-nextick-args@2.0.1:
|
|
||||||
resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
|
|
||||||
|
|
||||||
proxy-addr@2.0.7:
|
|
||||||
resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==}
|
|
||||||
engines: {node: '>= 0.10'}
|
|
||||||
|
|
||||||
qs@6.11.0:
|
|
||||||
resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==}
|
|
||||||
engines: {node: '>=0.6'}
|
|
||||||
|
|
||||||
range-parser@1.2.1:
|
|
||||||
resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
raw-body@2.5.2:
|
|
||||||
resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==}
|
|
||||||
engines: {node: '>= 0.8'}
|
|
||||||
|
|
||||||
readable-stream@2.3.8:
|
|
||||||
resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==}
|
|
||||||
|
|
||||||
safe-buffer@5.1.2:
|
|
||||||
resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
|
|
||||||
|
|
||||||
safe-buffer@5.2.1:
|
|
||||||
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
|
||||||
|
|
||||||
safer-buffer@2.1.2:
|
|
||||||
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
|
|
||||||
|
|
||||||
send@0.18.0:
|
|
||||||
resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==}
|
|
||||||
engines: {node: '>= 0.8.0'}
|
|
||||||
|
|
||||||
serve-static@1.15.0:
|
|
||||||
resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==}
|
|
||||||
engines: {node: '>= 0.8.0'}
|
|
||||||
|
|
||||||
set-function-length@1.2.2:
|
|
||||||
resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==}
|
|
||||||
engines: {node: '>= 0.4'}
|
|
||||||
|
|
||||||
setprototypeof@1.2.0:
|
|
||||||
resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==}
|
|
||||||
|
|
||||||
side-channel@1.0.6:
|
|
||||||
resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
|
|
||||||
engines: {node: '>= 0.4'}
|
|
||||||
|
|
||||||
statuses@2.0.1:
|
|
||||||
resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==}
|
|
||||||
engines: {node: '>= 0.8'}
|
|
||||||
|
|
||||||
streamsearch@1.1.0:
|
|
||||||
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
|
|
||||||
engines: {node: '>=10.0.0'}
|
|
||||||
|
|
||||||
string_decoder@1.1.1:
|
|
||||||
resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==}
|
|
||||||
|
|
||||||
toidentifier@1.0.1:
|
|
||||||
resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==}
|
|
||||||
engines: {node: '>=0.6'}
|
|
||||||
|
|
||||||
ts-node@10.9.2:
|
|
||||||
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
|
|
||||||
hasBin: true
|
|
||||||
peerDependencies:
|
|
||||||
'@swc/core': '>=1.2.50'
|
|
||||||
'@swc/wasm': '>=1.2.50'
|
|
||||||
'@types/node': '*'
|
|
||||||
typescript: '>=2.7'
|
|
||||||
peerDependenciesMeta:
|
|
||||||
'@swc/core':
|
|
||||||
optional: true
|
|
||||||
'@swc/wasm':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
type-is@1.6.18:
|
|
||||||
resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==}
|
|
||||||
engines: {node: '>= 0.6'}
|
|
||||||
|
|
||||||
typedarray@0.0.6:
|
|
||||||
resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==}
|
|
||||||
|
|
||||||
typescript@5.5.4:
|
|
||||||
resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==}
|
|
||||||
engines: {node: '>=14.17'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
uglify-js@3.19.1:
|
|
||||||
resolution: {integrity: sha512-y/2wiW+ceTYR2TSSptAhfnEtpLaQ4Ups5zrjB2d3kuVxHj16j/QJwPl5PvuGy9uARb39J0+iKxcRPvtpsx4A4A==}
|
|
||||||
engines: {node: '>=0.8.0'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
undici-types@6.13.0:
|
|
||||||
resolution: {integrity: sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==}
|
|
||||||
|
|
||||||
unpipe@1.0.0:
|
|
||||||
resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}
|
|
||||||
engines: {node: '>= 0.8'}
|
|
||||||
|
|
||||||
util-deprecate@1.0.2:
|
|
||||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
|
||||||
|
|
||||||
utils-merge@1.0.1:
|
|
||||||
resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==}
|
|
||||||
engines: {node: '>= 0.4.0'}
|
|
||||||
|
|
||||||
v8-compile-cache-lib@3.0.1:
|
|
||||||
resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==}
|
|
||||||
|
|
||||||
vary@1.1.2:
|
|
||||||
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
|
|
||||||
engines: {node: '>= 0.8'}
|
|
||||||
|
|
||||||
xtend@4.0.2:
|
|
||||||
resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}
|
|
||||||
engines: {node: '>=0.4'}
|
|
||||||
|
|
||||||
yn@3.1.1:
|
|
||||||
resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==}
|
|
||||||
engines: {node: '>=6'}
|
|
||||||
|
|
||||||
snapshots:
|
|
||||||
|
|
||||||
'@cspotcode/source-map-support@0.8.1':
|
|
||||||
dependencies:
|
|
||||||
'@jridgewell/trace-mapping': 0.3.9
|
|
||||||
|
|
||||||
'@jridgewell/resolve-uri@3.1.2': {}
|
|
||||||
|
|
||||||
'@jridgewell/sourcemap-codec@1.5.0': {}
|
|
||||||
|
|
||||||
'@jridgewell/trace-mapping@0.3.9':
|
|
||||||
dependencies:
|
|
||||||
'@jridgewell/resolve-uri': 3.1.2
|
|
||||||
'@jridgewell/sourcemap-codec': 1.5.0
|
|
||||||
|
|
||||||
'@tsconfig/node10@1.0.11': {}
|
|
||||||
|
|
||||||
'@tsconfig/node12@1.0.11': {}
|
|
||||||
|
|
||||||
'@tsconfig/node14@1.0.3': {}
|
|
||||||
|
|
||||||
'@tsconfig/node16@1.0.4': {}
|
|
||||||
|
|
||||||
'@types/node@22.2.0':
|
|
||||||
dependencies:
|
|
||||||
undici-types: 6.13.0
|
|
||||||
|
|
||||||
'@vercel/ncc@0.38.1': {}
|
|
||||||
|
|
||||||
accepts@1.3.8:
|
|
||||||
dependencies:
|
|
||||||
mime-types: 2.1.35
|
|
||||||
negotiator: 0.6.3
|
|
||||||
|
|
||||||
acorn-walk@8.3.3:
|
|
||||||
dependencies:
|
|
||||||
acorn: 8.12.1
|
|
||||||
|
|
||||||
acorn@8.12.1: {}
|
|
||||||
|
|
||||||
append-field@1.0.0: {}
|
|
||||||
|
|
||||||
arg@4.1.3: {}
|
|
||||||
|
|
||||||
array-flatten@1.1.1: {}
|
|
||||||
|
|
||||||
body-parser@1.20.2:
|
|
||||||
dependencies:
|
|
||||||
bytes: 3.1.2
|
|
||||||
content-type: 1.0.5
|
|
||||||
debug: 2.6.9
|
|
||||||
depd: 2.0.0
|
|
||||||
destroy: 1.2.0
|
|
||||||
http-errors: 2.0.0
|
|
||||||
iconv-lite: 0.4.24
|
|
||||||
on-finished: 2.4.1
|
|
||||||
qs: 6.11.0
|
|
||||||
raw-body: 2.5.2
|
|
||||||
type-is: 1.6.18
|
|
||||||
unpipe: 1.0.0
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- supports-color
|
|
||||||
|
|
||||||
buffer-from@1.1.2: {}
|
|
||||||
|
|
||||||
busboy@1.6.0:
|
|
||||||
dependencies:
|
|
||||||
streamsearch: 1.1.0
|
|
||||||
|
|
||||||
bytes@3.1.2: {}
|
|
||||||
|
|
||||||
call-bind@1.0.7:
|
|
||||||
dependencies:
|
|
||||||
es-define-property: 1.0.0
|
|
||||||
es-errors: 1.3.0
|
|
||||||
function-bind: 1.1.2
|
|
||||||
get-intrinsic: 1.2.4
|
|
||||||
set-function-length: 1.2.2
|
|
||||||
|
|
||||||
concat-stream@1.6.2:
|
|
||||||
dependencies:
|
|
||||||
buffer-from: 1.1.2
|
|
||||||
inherits: 2.0.4
|
|
||||||
readable-stream: 2.3.8
|
|
||||||
typedarray: 0.0.6
|
|
||||||
|
|
||||||
content-disposition@0.5.4:
|
|
||||||
dependencies:
|
|
||||||
safe-buffer: 5.2.1
|
|
||||||
|
|
||||||
content-type@1.0.5: {}
|
|
||||||
|
|
||||||
cookie-signature@1.0.6: {}
|
|
||||||
|
|
||||||
cookie@0.6.0: {}
|
|
||||||
|
|
||||||
core-util-is@1.0.3: {}
|
|
||||||
|
|
||||||
cors@2.8.5:
|
|
||||||
dependencies:
|
|
||||||
object-assign: 4.1.1
|
|
||||||
vary: 1.1.2
|
|
||||||
|
|
||||||
create-require@1.1.1: {}
|
|
||||||
|
|
||||||
debug@2.6.9:
|
|
||||||
dependencies:
|
|
||||||
ms: 2.0.0
|
|
||||||
|
|
||||||
define-data-property@1.1.4:
|
|
||||||
dependencies:
|
|
||||||
es-define-property: 1.0.0
|
|
||||||
es-errors: 1.3.0
|
|
||||||
gopd: 1.0.1
|
|
||||||
|
|
||||||
depd@2.0.0: {}
|
|
||||||
|
|
||||||
destroy@1.2.0: {}
|
|
||||||
|
|
||||||
diff@4.0.2: {}
|
|
||||||
|
|
||||||
ee-first@1.1.1: {}
|
|
||||||
|
|
||||||
encodeurl@1.0.2: {}
|
|
||||||
|
|
||||||
es-define-property@1.0.0:
|
|
||||||
dependencies:
|
|
||||||
get-intrinsic: 1.2.4
|
|
||||||
|
|
||||||
es-errors@1.3.0: {}
|
|
||||||
|
|
||||||
escape-html@1.0.3: {}
|
|
||||||
|
|
||||||
etag@1.8.1: {}
|
|
||||||
|
|
||||||
express@4.19.2:
|
|
||||||
dependencies:
|
|
||||||
accepts: 1.3.8
|
|
||||||
array-flatten: 1.1.1
|
|
||||||
body-parser: 1.20.2
|
|
||||||
content-disposition: 0.5.4
|
|
||||||
content-type: 1.0.5
|
|
||||||
cookie: 0.6.0
|
|
||||||
cookie-signature: 1.0.6
|
|
||||||
debug: 2.6.9
|
|
||||||
depd: 2.0.0
|
|
||||||
encodeurl: 1.0.2
|
|
||||||
escape-html: 1.0.3
|
|
||||||
etag: 1.8.1
|
|
||||||
finalhandler: 1.2.0
|
|
||||||
fresh: 0.5.2
|
|
||||||
http-errors: 2.0.0
|
|
||||||
merge-descriptors: 1.0.1
|
|
||||||
methods: 1.1.2
|
|
||||||
on-finished: 2.4.1
|
|
||||||
parseurl: 1.3.3
|
|
||||||
path-to-regexp: 0.1.7
|
|
||||||
proxy-addr: 2.0.7
|
|
||||||
qs: 6.11.0
|
|
||||||
range-parser: 1.2.1
|
|
||||||
safe-buffer: 5.2.1
|
|
||||||
send: 0.18.0
|
|
||||||
serve-static: 1.15.0
|
|
||||||
setprototypeof: 1.2.0
|
|
||||||
statuses: 2.0.1
|
|
||||||
type-is: 1.6.18
|
|
||||||
utils-merge: 1.0.1
|
|
||||||
vary: 1.1.2
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- supports-color
|
|
||||||
|
|
||||||
finalhandler@1.2.0:
|
|
||||||
dependencies:
|
|
||||||
debug: 2.6.9
|
|
||||||
encodeurl: 1.0.2
|
|
||||||
escape-html: 1.0.3
|
|
||||||
on-finished: 2.4.1
|
|
||||||
parseurl: 1.3.3
|
|
||||||
statuses: 2.0.1
|
|
||||||
unpipe: 1.0.0
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- supports-color
|
|
||||||
|
|
||||||
forwarded@0.2.0: {}
|
|
||||||
|
|
||||||
fresh@0.5.2: {}
|
|
||||||
|
|
||||||
function-bind@1.1.2: {}
|
|
||||||
|
|
||||||
get-intrinsic@1.2.4:
|
|
||||||
dependencies:
|
|
||||||
es-errors: 1.3.0
|
|
||||||
function-bind: 1.1.2
|
|
||||||
has-proto: 1.0.3
|
|
||||||
has-symbols: 1.0.3
|
|
||||||
hasown: 2.0.2
|
|
||||||
|
|
||||||
gopd@1.0.1:
|
|
||||||
dependencies:
|
|
||||||
get-intrinsic: 1.2.4
|
|
||||||
|
|
||||||
has-property-descriptors@1.0.2:
|
|
||||||
dependencies:
|
|
||||||
es-define-property: 1.0.0
|
|
||||||
|
|
||||||
has-proto@1.0.3: {}
|
|
||||||
|
|
||||||
has-symbols@1.0.3: {}
|
|
||||||
|
|
||||||
hasown@2.0.2:
|
|
||||||
dependencies:
|
|
||||||
function-bind: 1.1.2
|
|
||||||
|
|
||||||
http-errors@2.0.0:
|
|
||||||
dependencies:
|
|
||||||
depd: 2.0.0
|
|
||||||
inherits: 2.0.4
|
|
||||||
setprototypeof: 1.2.0
|
|
||||||
statuses: 2.0.1
|
|
||||||
toidentifier: 1.0.1
|
|
||||||
|
|
||||||
iconv-lite@0.4.24:
|
|
||||||
dependencies:
|
|
||||||
safer-buffer: 2.1.2
|
|
||||||
|
|
||||||
inherits@2.0.4: {}
|
|
||||||
|
|
||||||
ipaddr.js@1.9.1: {}
|
|
||||||
|
|
||||||
isarray@1.0.0: {}
|
|
||||||
|
|
||||||
make-error@1.3.6: {}
|
|
||||||
|
|
||||||
media-typer@0.3.0: {}
|
|
||||||
|
|
||||||
merge-descriptors@1.0.1: {}
|
|
||||||
|
|
||||||
methods@1.1.2: {}
|
|
||||||
|
|
||||||
mime-db@1.52.0: {}
|
|
||||||
|
|
||||||
mime-types@2.1.35:
|
|
||||||
dependencies:
|
|
||||||
mime-db: 1.52.0
|
|
||||||
|
|
||||||
mime@1.6.0: {}
|
|
||||||
|
|
||||||
minimist@1.2.8: {}
|
|
||||||
|
|
||||||
mkdirp@0.5.6:
|
|
||||||
dependencies:
|
|
||||||
minimist: 1.2.8
|
|
||||||
|
|
||||||
ms@2.0.0: {}
|
|
||||||
|
|
||||||
ms@2.1.3: {}
|
|
||||||
|
|
||||||
multer@1.4.5-lts.1:
|
|
||||||
dependencies:
|
|
||||||
append-field: 1.0.0
|
|
||||||
busboy: 1.6.0
|
|
||||||
concat-stream: 1.6.2
|
|
||||||
mkdirp: 0.5.6
|
|
||||||
object-assign: 4.1.1
|
|
||||||
type-is: 1.6.18
|
|
||||||
xtend: 4.0.2
|
|
||||||
|
|
||||||
negotiator@0.6.3: {}
|
|
||||||
|
|
||||||
object-assign@4.1.1: {}
|
|
||||||
|
|
||||||
object-inspect@1.13.2: {}
|
|
||||||
|
|
||||||
on-finished@2.4.1:
|
|
||||||
dependencies:
|
|
||||||
ee-first: 1.1.1
|
|
||||||
|
|
||||||
parseurl@1.3.3: {}
|
|
||||||
|
|
||||||
path-to-regexp@0.1.7: {}
|
|
||||||
|
|
||||||
process-nextick-args@2.0.1: {}
|
|
||||||
|
|
||||||
proxy-addr@2.0.7:
|
|
||||||
dependencies:
|
|
||||||
forwarded: 0.2.0
|
|
||||||
ipaddr.js: 1.9.1
|
|
||||||
|
|
||||||
qs@6.11.0:
|
|
||||||
dependencies:
|
|
||||||
side-channel: 1.0.6
|
|
||||||
|
|
||||||
range-parser@1.2.1: {}
|
|
||||||
|
|
||||||
raw-body@2.5.2:
|
|
||||||
dependencies:
|
|
||||||
bytes: 3.1.2
|
|
||||||
http-errors: 2.0.0
|
|
||||||
iconv-lite: 0.4.24
|
|
||||||
unpipe: 1.0.0
|
|
||||||
|
|
||||||
readable-stream@2.3.8:
|
|
||||||
dependencies:
|
|
||||||
core-util-is: 1.0.3
|
|
||||||
inherits: 2.0.4
|
|
||||||
isarray: 1.0.0
|
|
||||||
process-nextick-args: 2.0.1
|
|
||||||
safe-buffer: 5.1.2
|
|
||||||
string_decoder: 1.1.1
|
|
||||||
util-deprecate: 1.0.2
|
|
||||||
|
|
||||||
safe-buffer@5.1.2: {}
|
|
||||||
|
|
||||||
safe-buffer@5.2.1: {}
|
|
||||||
|
|
||||||
safer-buffer@2.1.2: {}
|
|
||||||
|
|
||||||
send@0.18.0:
|
|
||||||
dependencies:
|
|
||||||
debug: 2.6.9
|
|
||||||
depd: 2.0.0
|
|
||||||
destroy: 1.2.0
|
|
||||||
encodeurl: 1.0.2
|
|
||||||
escape-html: 1.0.3
|
|
||||||
etag: 1.8.1
|
|
||||||
fresh: 0.5.2
|
|
||||||
http-errors: 2.0.0
|
|
||||||
mime: 1.6.0
|
|
||||||
ms: 2.1.3
|
|
||||||
on-finished: 2.4.1
|
|
||||||
range-parser: 1.2.1
|
|
||||||
statuses: 2.0.1
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- supports-color
|
|
||||||
|
|
||||||
serve-static@1.15.0:
|
|
||||||
dependencies:
|
|
||||||
encodeurl: 1.0.2
|
|
||||||
escape-html: 1.0.3
|
|
||||||
parseurl: 1.3.3
|
|
||||||
send: 0.18.0
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- supports-color
|
|
||||||
|
|
||||||
set-function-length@1.2.2:
|
|
||||||
dependencies:
|
|
||||||
define-data-property: 1.1.4
|
|
||||||
es-errors: 1.3.0
|
|
||||||
function-bind: 1.1.2
|
|
||||||
get-intrinsic: 1.2.4
|
|
||||||
gopd: 1.0.1
|
|
||||||
has-property-descriptors: 1.0.2
|
|
||||||
|
|
||||||
setprototypeof@1.2.0: {}
|
|
||||||
|
|
||||||
side-channel@1.0.6:
|
|
||||||
dependencies:
|
|
||||||
call-bind: 1.0.7
|
|
||||||
es-errors: 1.3.0
|
|
||||||
get-intrinsic: 1.2.4
|
|
||||||
object-inspect: 1.13.2
|
|
||||||
|
|
||||||
statuses@2.0.1: {}
|
|
||||||
|
|
||||||
streamsearch@1.1.0: {}
|
|
||||||
|
|
||||||
string_decoder@1.1.1:
|
|
||||||
dependencies:
|
|
||||||
safe-buffer: 5.1.2
|
|
||||||
|
|
||||||
toidentifier@1.0.1: {}
|
|
||||||
|
|
||||||
ts-node@10.9.2(@types/node@22.2.0)(typescript@5.5.4):
|
|
||||||
dependencies:
|
|
||||||
'@cspotcode/source-map-support': 0.8.1
|
|
||||||
'@tsconfig/node10': 1.0.11
|
|
||||||
'@tsconfig/node12': 1.0.11
|
|
||||||
'@tsconfig/node14': 1.0.3
|
|
||||||
'@tsconfig/node16': 1.0.4
|
|
||||||
'@types/node': 22.2.0
|
|
||||||
acorn: 8.12.1
|
|
||||||
acorn-walk: 8.3.3
|
|
||||||
arg: 4.1.3
|
|
||||||
create-require: 1.1.1
|
|
||||||
diff: 4.0.2
|
|
||||||
make-error: 1.3.6
|
|
||||||
typescript: 5.5.4
|
|
||||||
v8-compile-cache-lib: 3.0.1
|
|
||||||
yn: 3.1.1
|
|
||||||
|
|
||||||
type-is@1.6.18:
|
|
||||||
dependencies:
|
|
||||||
media-typer: 0.3.0
|
|
||||||
mime-types: 2.1.35
|
|
||||||
|
|
||||||
typedarray@0.0.6: {}
|
|
||||||
|
|
||||||
typescript@5.5.4: {}
|
|
||||||
|
|
||||||
uglify-js@3.19.1: {}
|
|
||||||
|
|
||||||
undici-types@6.13.0: {}
|
|
||||||
|
|
||||||
unpipe@1.0.0: {}
|
|
||||||
|
|
||||||
util-deprecate@1.0.2: {}
|
|
||||||
|
|
||||||
utils-merge@1.0.1: {}
|
|
||||||
|
|
||||||
v8-compile-cache-lib@3.0.1: {}
|
|
||||||
|
|
||||||
vary@1.1.2: {}
|
|
||||||
|
|
||||||
xtend@4.0.2: {}
|
|
||||||
|
|
||||||
yn@3.1.1: {}
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# miao-directory的后端部分
|
||||||
|
* 原有的node后端不再维护。
|
||||||
|
* ./web文件夹中的内容自己到main分支去打包一个出来
|
||||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"IconPath": "icon.ico"
|
||||||
|
}
|
||||||
Reference in new issue
Block a user