1
0
mirror of https://github.com/varbhat/exatorrent.git synced 2021-09-19 22:57:02 +03:00

Huge Update

Update Dependencies
Bump Version
Fix tsconfig.json (svelte-preprocess)
Remove unused variables
Fix AddUser
Add `-passw` Flag
This commit is contained in:
Var Bhat
2021-09-16 23:42:46 +05:30
parent 6b30f372b6
commit a3c79279ab
10 changed files with 246 additions and 92 deletions

View File

@@ -7,6 +7,7 @@ Usage of exatorrent:
-dir <path> exatorrent Directory (Default: "exadir") -dir <path> exatorrent Directory (Default: "exadir")
-engc <opt> Generate Custom Engine Configuration -engc <opt> Generate Custom Engine Configuration
-key <path> Path to TLS Key (Required for HTTPS) -key <path> Path to TLS Key (Required for HTTPS)
-passw <opt> Set Default admin password from "EXAPASSWORD" environment variable
-psql <opt> Generate Sample Postgresql Connection URL -psql <opt> Generate Sample Postgresql Connection URL
-torc <opt> Generate Custom Torrent Client Configuration -torc <opt> Generate Custom Torrent Client Configuration
-unix <path> Unix Socket Path -unix <path> Unix Socket Path
@@ -23,7 +24,7 @@ Valid Listen Addresses include `localhost:9999` , `0.0.0.0:3456` , `127.0.0.1:77
### `-admin` ### `-admin`
Usernames of Users in `exatorrent` can't be changed after User is created . It must be choosen while creating User and can't be changed later . Note that password can be changed anytime later . Usernames of Users in `exatorrent` can't be changed after User is created . It must be choosen while creating User and can't be changed later . Note that password can be changed anytime later .
On the first use of `exatorrent` , `exatorrent` creates Admin user with username `adminuser` and password `adminpassword` . Since this username `adminuser` can't be changed later on , you can customize it before first run itself by passing your desired username to `-admin` flag. On the first use of `exatorrent` , `exatorrent` creates Admin user with username `adminuser` and password `adminpassword` . Since this username `adminuser` can't be changed later on , you can customize it before first run itself by passing your desired username to `-admin` flag. Also see `-passw` flag below .
```bash ```bash
exatorrent -admin "mycustomadminusername" exatorrent -admin "mycustomadminusername"
@@ -37,6 +38,13 @@ If HTTPS needs to be served , Path to TLS Certificate must be specified in this
### `-key` ### `-key`
If HTTPS needs to be served , Path to TLS Key must be specified in this flag . Note that `-cert` flag is also necessary along with this flag to serve HTTPS . If HTTPS needs to be served , Path to TLS Key must be specified in this flag . Note that `-cert` flag is also necessary along with this flag to serve HTTPS .
### `-passw`
On the first use of `exatorrent` , `exatorrent` creates Admin user with username `adminuser` and password `adminpassword` . You can make exatorrent to use custom password rather than default password (`adminpassword`) by `-passw` flag. `-passw` flag sets value of `EXAPASSWORD` environment variable as Password of created Admin User . Also see `-admin` flag above .
```bash
EXAPASSWORD="MyCustomPassword" exatorrent -passw
```
### `-unix` ### `-unix`
This flag specifies file path where Unix Socket must be served . This flag is alternative to `-addr` flag and works only on Operating Systems that support [Unix Sockets](https://en.wikipedia.org/wiki/Unix_domain_socket) . This flag specifies file path where Unix Socket must be served . This flag is alternative to `-addr` flag and works only on Operating Systems that support [Unix Sockets](https://en.wikipedia.org/wiki/Unix_domain_socket) .
@@ -59,4 +67,4 @@ Writes Sample Postgresql connection URL to `<exadirectory>/config/psqlconfig.txt
Blocklist of PeerGuardian Text Lists (P2P) Format can be placed at `<exadirectory>/config/blocklist` to apply blocking based upon blocklist . You are also required to set `IPBlocklist` value of `clentconfig.json` to `true` . Note that Blocklist can't be changed during runtime . Blocklist of PeerGuardian Text Lists (P2P) Format can be placed at `<exadirectory>/config/blocklist` to apply blocking based upon blocklist . You are also required to set `IPBlocklist` value of `clentconfig.json` to `true` . Note that Blocklist can't be changed during runtime .
## Rate Limiter ## Rate Limiter
`UploadLimiterLimit` , `UploadLimiterBurst` , `DownloadLimiterLimit` , `DownloadLimiterBurst` values of `clientconfig.json` can be used to Rate Limit `exatorrent` . `UploadLimiterLimit` , `UploadLimiterBurst` , `DownloadLimiterLimit` , `DownloadLimiterBurst` values of `clientconfig.json` can be used to Rate Limit `exatorrent` .

View File

@@ -54,6 +54,7 @@ func Initialize() {
var engc bool var engc bool
var err error var err error
var auser string var auser string
var pw bool
flag.Usage = func() { flag.Usage = func() {
_, _ = fmt.Fprintf(flag.CommandLine.Output(), "exatorrent is bittorrent client\n\n") _, _ = fmt.Fprintf(flag.CommandLine.Output(), "exatorrent is bittorrent client\n\n")
@@ -75,6 +76,7 @@ func Initialize() {
flag.StringVar(&Flagconfig.TLSCertPath, "cert", "", "<path> Path to TLS Certificate (Required for HTTPS)") flag.StringVar(&Flagconfig.TLSCertPath, "cert", "", "<path> Path to TLS Certificate (Required for HTTPS)")
flag.StringVar(&Dirconfig.DirPath, "dir", "exadir", `<path> exatorrent Directory (Default: "exadir")`) flag.StringVar(&Dirconfig.DirPath, "dir", "exadir", `<path> exatorrent Directory (Default: "exadir")`)
flag.StringVar(&auser, "admin", "adminuser", `<user> Default admin username (Default Username: "adminuser" and Default Password: "adminpassword")`) flag.StringVar(&auser, "admin", "adminuser", `<user> Default admin username (Default Username: "adminuser" and Default Password: "adminpassword")`)
flag.BoolVar(&pw, "passw", false, `<opt> Set Default admin password from "EXAPASSWORD" environment variable`)
flag.BoolVar(&psql, "psql", false, "<opt> Generate Sample Postgresql Connection URL") flag.BoolVar(&psql, "psql", false, "<opt> Generate Sample Postgresql Connection URL")
flag.BoolVar(&engc, "engc", false, "<opt> Generate Custom Engine Configuration") flag.BoolVar(&engc, "engc", false, "<opt> Generate Custom Engine Configuration")
flag.BoolVar(&torcc, "torc", false, "<opt> Generate Custom Torrent Client Configuration") flag.BoolVar(&torcc, "torc", false, "<opt> Generate Custom Torrent Client Configuration")
@@ -83,7 +85,7 @@ func Initialize() {
if len(flag.Args()) != 0 { if len(flag.Args()) != 0 {
_, _ = fmt.Fprintf(flag.CommandLine.Output(), "Invalid Flags Provided: %s\n\n", flag.Args()) _, _ = fmt.Fprintf(flag.CommandLine.Output(), "Invalid Flags Provided: %s\n\n", flag.Args())
flag.Usage() flag.Usage()
return os.Exit(1)
} }
// Display All Flag Configurations Provided to exatorrent // Display All Flag Configurations Provided to exatorrent
@@ -237,14 +239,26 @@ func Initialize() {
_, err = os.Stat(filepath.Join(Dirconfig.DataDir, ".adminadded")) _, err = os.Stat(filepath.Join(Dirconfig.DataDir, ".adminadded"))
if errors.Is(err, os.ErrNotExist) { if errors.Is(err, os.ErrNotExist) {
Info.Println(`Adding Admin user with username "` + auser + `" and password "adminpassword"`) if pw {
er := Engine.UDb.Add(auser, "adminpassword", 1) Info.Println(`Adding Admin user with username "` + auser + `" and custom password`)
if er != nil { er := Engine.UDb.Add(auser, os.Getenv("EXAPASSWORD"), 1)
Err.Fatalln("Unable to add admin user to adminless exatorrent instance", er) if er != nil {
} Err.Fatalln("Unable to add admin user to adminless exatorrent instance :", er)
_, er = os.Create(filepath.Join(Dirconfig.DataDir, ".adminadded")) }
if er != nil { _, er = os.Create(filepath.Join(Dirconfig.DataDir, ".adminadded"))
Err.Fatalln(er) if er != nil {
Err.Fatalln(er)
}
} else {
Info.Println(`Adding Admin user with username "` + auser + `" and password "adminpassword"`)
er := Engine.UDb.Add(auser, "adminpassword", 1)
if er != nil {
Err.Fatalln("Unable to add admin user to adminless exatorrent instance :", er)
}
_, er = os.Create(filepath.Join(Dirconfig.DataDir, ".adminadded"))
if er != nil {
Err.Fatalln(er)
}
} }
} }

View File

@@ -1,3 +1,3 @@
package core package core
const Version string = "v0.0.2" const Version string = "v0.0.3"

View File

@@ -37,7 +37,7 @@ func (db *PsqlUserDb) Add(Username string, Password string, UserType int) (err e
err = fmt.Errorf("uuid error") // uuid may panic err = fmt.Errorf("uuid error") // uuid may panic
} }
}() }()
if len(Username) < 5 || len(Password) < 5 { if len(Username) <= 5 || len(Password) <= 5 {
return fmt.Errorf("username or password size too small") return fmt.Errorf("username or password size too small")
} }
bytes, err := bcrypt.GenerateFromPassword([]byte(Password), 10) bytes, err := bcrypt.GenerateFromPassword([]byte(Password), 10)

View File

@@ -49,7 +49,7 @@ func (db *Sqlite3UserDb) Add(Username string, Password string, UserType int) (er
err = fmt.Errorf("uuid error") // uuid may panic err = fmt.Errorf("uuid error") // uuid may panic
} }
}() }()
if len(Username) < 5 || len(Password) < 5 { if len(Username) <= 5 || len(Password) <= 5 {
return fmt.Errorf("username or password size too small") return fmt.Errorf("username or password size too small")
} }
bytes, err := bcrypt.GenerateFromPassword([]byte(Password), 10) bytes, err := bcrypt.GenerateFromPassword([]byte(Password), 10)

View File

@@ -14,7 +14,7 @@
"postcss": "^8.3.6", "postcss": "^8.3.6",
"slocation": "latest", "slocation": "latest",
"svelte": "latest", "svelte": "latest",
"svelte-preprocess": "^4.8.0", "svelte-preprocess": "^4.9.4",
"tailwindcss": "^2.2.15" "tailwindcss": "^2.2.15"
}, },
"devDependencies": { "devDependencies": {
@@ -163,9 +163,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "16.7.1", "version": "16.9.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.1.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.1.tgz",
"integrity": "sha512-ncRdc45SoYJ2H4eWU9ReDfp3vtFqDYhjOsKlFFUDEn8V1Bgr2RjYal8YT5byfadWIRluhPFU6JiDOl0H6Sl87A==" "integrity": "sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g=="
}, },
"node_modules/@types/parse-json": { "node_modules/@types/parse-json": {
"version": "4.0.0", "version": "4.0.0",
@@ -305,13 +305,13 @@
} }
}, },
"node_modules/browserslist": { "node_modules/browserslist": {
"version": "4.16.8", "version": "4.17.0",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.8.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz",
"integrity": "sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ==", "integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==",
"dependencies": { "dependencies": {
"caniuse-lite": "^1.0.30001251", "caniuse-lite": "^1.0.30001254",
"colorette": "^1.3.0", "colorette": "^1.3.0",
"electron-to-chromium": "^1.3.811", "electron-to-chromium": "^1.3.830",
"escalade": "^3.1.1", "escalade": "^3.1.1",
"node-releases": "^1.1.75" "node-releases": "^1.1.75"
}, },
@@ -326,6 +326,14 @@
"url": "https://opencollective.com/browserslist" "url": "https://opencollective.com/browserslist"
} }
}, },
"node_modules/buffer-crc32": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
"engines": {
"node": "*"
}
},
"node_modules/bytes": { "node_modules/bytes": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
@@ -351,9 +359,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001252", "version": "1.0.30001257",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001257.tgz",
"integrity": "sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw==", "integrity": "sha512-JN49KplOgHSXpIsVSF+LUyhD8PUp6xPpAXeRrrcBh4KBeP7W864jHn6RvzJgDlrReyeVjMFJL3PLpPvKIxlIHA==",
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
"url": "https://opencollective.com/browserslist" "url": "https://opencollective.com/browserslist"
@@ -429,9 +437,9 @@
} }
}, },
"node_modules/colorette": { "node_modules/colorette": {
"version": "1.3.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",
"integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==" "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g=="
}, },
"node_modules/commander": { "node_modules/commander": {
"version": "6.2.1", "version": "6.2.1",
@@ -525,9 +533,9 @@
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.3.817", "version": "1.3.840",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.817.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.840.tgz",
"integrity": "sha512-Vw0Faepf2Id9Kf2e97M/c99qf168xg86JLKDxivvlpBQ9KDtjSeX0v+TiuSE25PqeQfTz+NJs375b64ca3XOIQ==" "integrity": "sha512-yRoUmTLDJnkIJx23xLY7GbSvnmDCq++NSuxHDQ0jiyDJ9YZBUGJcrdUqm+ZwZFzMbCciVzfem2N2AWiHJcWlbw=="
}, },
"node_modules/error-ex": { "node_modules/error-ex": {
"version": "1.3.2", "version": "1.3.2",
@@ -537,6 +545,11 @@
"is-arrayish": "^0.2.1" "is-arrayish": "^0.2.1"
} }
}, },
"node_modules/es6-promise": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
"integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM="
},
"node_modules/esbuild": { "node_modules/esbuild": {
"version": "0.12.28", "version": "0.12.28",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.28.tgz", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.28.tgz",
@@ -589,9 +602,9 @@
} }
}, },
"node_modules/fastq": { "node_modules/fastq": {
"version": "1.12.0", "version": "1.13.0",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.12.0.tgz", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz",
"integrity": "sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==", "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==",
"dependencies": { "dependencies": {
"reusify": "^1.0.4" "reusify": "^1.0.4"
} }
@@ -902,6 +915,14 @@
"resolved": "https://registry.npmjs.org/lodash.topath/-/lodash.topath-4.5.2.tgz", "resolved": "https://registry.npmjs.org/lodash.topath/-/lodash.topath-4.5.2.tgz",
"integrity": "sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak=" "integrity": "sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak="
}, },
"node_modules/magic-string": {
"version": "0.25.7",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz",
"integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==",
"dependencies": {
"sourcemap-codec": "^1.4.4"
}
},
"node_modules/merge2": { "node_modules/merge2": {
"version": "1.4.1", "version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -954,6 +975,17 @@
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
}, },
"node_modules/mkdirp": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"dependencies": {
"minimist": "^1.2.5"
},
"bin": {
"mkdirp": "bin/cmd.js"
}
},
"node_modules/modern-normalize": { "node_modules/modern-normalize": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/modern-normalize/-/modern-normalize-1.1.0.tgz", "resolved": "https://registry.npmjs.org/modern-normalize/-/modern-normalize-1.1.0.tgz",
@@ -966,9 +998,9 @@
} }
}, },
"node_modules/mri": { "node_modules/mri": {
"version": "1.1.6", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/mri/-/mri-1.1.6.tgz", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
"integrity": "sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==", "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=4" "node": ">=4"
@@ -1322,17 +1354,14 @@
"integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=" "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM="
}, },
"node_modules/rimraf": { "node_modules/rimraf": {
"version": "3.0.2", "version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
"dependencies": { "dependencies": {
"glob": "^7.1.3" "glob": "^7.1.3"
}, },
"bin": { "bin": {
"rimraf": "bin.js" "rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
} }
}, },
"node_modules/run-parallel": { "node_modules/run-parallel": {
@@ -1369,6 +1398,17 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/sander": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz",
"integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=",
"dependencies": {
"es6-promise": "^3.1.2",
"graceful-fs": "^4.1.3",
"mkdirp": "^0.5.1",
"rimraf": "^2.5.2"
}
},
"node_modules/simple-swizzle": { "node_modules/simple-swizzle": {
"version": "0.2.2", "version": "0.2.2",
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
@@ -1390,6 +1430,20 @@
"svelte": "latest" "svelte": "latest"
} }
}, },
"node_modules/sorcery": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz",
"integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=",
"dependencies": {
"buffer-crc32": "^0.2.5",
"minimist": "^1.2.0",
"sander": "^0.5.0",
"sourcemap-codec": "^1.3.0"
},
"bin": {
"sorcery": "bin/index.js"
}
},
"node_modules/source-map": { "node_modules/source-map": {
"version": "0.7.3", "version": "0.7.3",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
@@ -1407,6 +1461,11 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/sourcemap-codec": {
"version": "1.4.8",
"resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
"integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA=="
},
"node_modules/strip-indent": { "node_modules/strip-indent": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
@@ -1430,9 +1489,9 @@
} }
}, },
"node_modules/svelte": { "node_modules/svelte": {
"version": "3.42.3", "version": "3.42.6",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.42.3.tgz", "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.42.6.tgz",
"integrity": "sha512-pbdtdNZEx2GBqSM6XEgPoHbwtvWBwFLt/1bRmzsyXZO+i424wFnPe7O5B3GOJDPFSxPRztumAW3mL5LPzecWUg==", "integrity": "sha512-lAcryr9Do2PeGtbodspX5I4kWj4yWYAa2WGpDCwzNkP3y8WZTxigMd4/TMO1rBZEOkMYGn4ZXrbAlSEGhK6q3w==",
"engines": { "engines": {
"node": ">= 8" "node": ">= 8"
} }
@@ -1461,14 +1520,16 @@
} }
}, },
"node_modules/svelte-preprocess": { "node_modules/svelte-preprocess": {
"version": "4.8.0", "version": "4.9.4",
"resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.8.0.tgz", "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.9.4.tgz",
"integrity": "sha512-i9Z17cwGlp+kuSSv3kJWdAdAP2L26A5yMzHHdDj8YL+86sN64Yz5/gfjQp3Xb6fiaToo4sB+wTpid/23Gz0yvw==", "integrity": "sha512-Z0mUQBGtE+ZZSv/HerRSHe7ukJokxjiPeHe7iPOIXseEoRw51H3K/Vh6OMIMstetzZ11vWO9rCsXSD/uUUArmA==",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"@types/pug": "^2.0.4", "@types/pug": "^2.0.4",
"@types/sass": "^1.16.0", "@types/sass": "^1.16.0",
"detect-indent": "^6.0.0", "detect-indent": "^6.0.0",
"magic-string": "^0.25.7",
"sorcery": "^0.10.0",
"strip-indent": "^3.0.0" "strip-indent": "^3.0.0"
}, },
"engines": { "engines": {
@@ -1595,6 +1656,20 @@
"node": ">=8.17.0" "node": ">=8.17.0"
} }
}, },
"node_modules/tmp/node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dependencies": {
"glob": "^7.1.3"
},
"bin": {
"rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/to-regex-range": { "node_modules/to-regex-range": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -1762,9 +1837,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "16.7.1", "version": "16.9.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.1.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.1.tgz",
"integrity": "sha512-ncRdc45SoYJ2H4eWU9ReDfp3vtFqDYhjOsKlFFUDEn8V1Bgr2RjYal8YT5byfadWIRluhPFU6JiDOl0H6Sl87A==" "integrity": "sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g=="
}, },
"@types/parse-json": { "@types/parse-json": {
"version": "4.0.0", "version": "4.0.0",
@@ -1867,17 +1942,22 @@
} }
}, },
"browserslist": { "browserslist": {
"version": "4.16.8", "version": "4.17.0",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.8.tgz", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz",
"integrity": "sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ==", "integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==",
"requires": { "requires": {
"caniuse-lite": "^1.0.30001251", "caniuse-lite": "^1.0.30001254",
"colorette": "^1.3.0", "colorette": "^1.3.0",
"electron-to-chromium": "^1.3.811", "electron-to-chromium": "^1.3.830",
"escalade": "^3.1.1", "escalade": "^3.1.1",
"node-releases": "^1.1.75" "node-releases": "^1.1.75"
} }
}, },
"buffer-crc32": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI="
},
"bytes": { "bytes": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
@@ -1894,9 +1974,9 @@
"integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==" "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA=="
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001252", "version": "1.0.30001257",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001257.tgz",
"integrity": "sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw==" "integrity": "sha512-JN49KplOgHSXpIsVSF+LUyhD8PUp6xPpAXeRrrcBh4KBeP7W864jHn6RvzJgDlrReyeVjMFJL3PLpPvKIxlIHA=="
}, },
"chalk": { "chalk": {
"version": "4.1.2", "version": "4.1.2",
@@ -1954,9 +2034,9 @@
} }
}, },
"colorette": { "colorette": {
"version": "1.3.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",
"integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==" "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g=="
}, },
"commander": { "commander": {
"version": "6.2.1", "version": "6.2.1",
@@ -2026,9 +2106,9 @@
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.3.817", "version": "1.3.840",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.817.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.840.tgz",
"integrity": "sha512-Vw0Faepf2Id9Kf2e97M/c99qf168xg86JLKDxivvlpBQ9KDtjSeX0v+TiuSE25PqeQfTz+NJs375b64ca3XOIQ==" "integrity": "sha512-yRoUmTLDJnkIJx23xLY7GbSvnmDCq++NSuxHDQ0jiyDJ9YZBUGJcrdUqm+ZwZFzMbCciVzfem2N2AWiHJcWlbw=="
}, },
"error-ex": { "error-ex": {
"version": "1.3.2", "version": "1.3.2",
@@ -2038,6 +2118,11 @@
"is-arrayish": "^0.2.1" "is-arrayish": "^0.2.1"
} }
}, },
"es6-promise": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
"integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM="
},
"esbuild": { "esbuild": {
"version": "0.12.28", "version": "0.12.28",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.28.tgz", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.28.tgz",
@@ -2074,9 +2159,9 @@
} }
}, },
"fastq": { "fastq": {
"version": "1.12.0", "version": "1.13.0",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.12.0.tgz", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz",
"integrity": "sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==", "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==",
"requires": { "requires": {
"reusify": "^1.0.4" "reusify": "^1.0.4"
} }
@@ -2316,6 +2401,14 @@
"resolved": "https://registry.npmjs.org/lodash.topath/-/lodash.topath-4.5.2.tgz", "resolved": "https://registry.npmjs.org/lodash.topath/-/lodash.topath-4.5.2.tgz",
"integrity": "sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak=" "integrity": "sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak="
}, },
"magic-string": {
"version": "0.25.7",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz",
"integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==",
"requires": {
"sourcemap-codec": "^1.4.4"
}
},
"merge2": { "merge2": {
"version": "1.4.1", "version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -2353,15 +2446,23 @@
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
}, },
"mkdirp": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"requires": {
"minimist": "^1.2.5"
}
},
"modern-normalize": { "modern-normalize": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/modern-normalize/-/modern-normalize-1.1.0.tgz", "resolved": "https://registry.npmjs.org/modern-normalize/-/modern-normalize-1.1.0.tgz",
"integrity": "sha512-2lMlY1Yc1+CUy0gw4H95uNN7vjbpoED7NNRSBHE25nWfLBdmMzFCsPshlzbxHz+gYMcBEUN8V4pU16prcdPSgA==" "integrity": "sha512-2lMlY1Yc1+CUy0gw4H95uNN7vjbpoED7NNRSBHE25nWfLBdmMzFCsPshlzbxHz+gYMcBEUN8V4pU16prcdPSgA=="
}, },
"mri": { "mri": {
"version": "1.1.6", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/mri/-/mri-1.1.6.tgz", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
"integrity": "sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==", "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
"dev": true "dev": true
}, },
"nanoid": { "nanoid": {
@@ -2588,9 +2689,9 @@
"integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=" "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM="
}, },
"rimraf": { "rimraf": {
"version": "3.0.2", "version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
"requires": { "requires": {
"glob": "^7.1.3" "glob": "^7.1.3"
} }
@@ -2612,6 +2713,17 @@
"mri": "^1.1.0" "mri": "^1.1.0"
} }
}, },
"sander": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz",
"integrity": "sha1-dB4kXiMfB8r7b98PEzrfohalAq0=",
"requires": {
"es6-promise": "^3.1.2",
"graceful-fs": "^4.1.3",
"mkdirp": "^0.5.1",
"rimraf": "^2.5.2"
}
},
"simple-swizzle": { "simple-swizzle": {
"version": "0.2.2", "version": "0.2.2",
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
@@ -2635,6 +2747,17 @@
"svelte": "latest" "svelte": "latest"
} }
}, },
"sorcery": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.10.0.tgz",
"integrity": "sha1-iukK19fLBfxZ8asMY3hF1cFaUrc=",
"requires": {
"buffer-crc32": "^0.2.5",
"minimist": "^1.2.0",
"sander": "^0.5.0",
"sourcemap-codec": "^1.3.0"
}
},
"source-map": { "source-map": {
"version": "0.7.3", "version": "0.7.3",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
@@ -2646,6 +2769,11 @@
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz",
"integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==" "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug=="
}, },
"sourcemap-codec": {
"version": "1.4.8",
"resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
"integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA=="
},
"strip-indent": { "strip-indent": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
@@ -2663,9 +2791,9 @@
} }
}, },
"svelte": { "svelte": {
"version": "3.42.3", "version": "3.42.6",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.42.3.tgz", "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.42.6.tgz",
"integrity": "sha512-pbdtdNZEx2GBqSM6XEgPoHbwtvWBwFLt/1bRmzsyXZO+i424wFnPe7O5B3GOJDPFSxPRztumAW3mL5LPzecWUg==" "integrity": "sha512-lAcryr9Do2PeGtbodspX5I4kWj4yWYAa2WGpDCwzNkP3y8WZTxigMd4/TMO1rBZEOkMYGn4ZXrbAlSEGhK6q3w=="
}, },
"svelte-check": { "svelte-check": {
"version": "2.2.6", "version": "2.2.6",
@@ -2685,13 +2813,15 @@
} }
}, },
"svelte-preprocess": { "svelte-preprocess": {
"version": "4.8.0", "version": "4.9.4",
"resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.8.0.tgz", "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-4.9.4.tgz",
"integrity": "sha512-i9Z17cwGlp+kuSSv3kJWdAdAP2L26A5yMzHHdDj8YL+86sN64Yz5/gfjQp3Xb6fiaToo4sB+wTpid/23Gz0yvw==", "integrity": "sha512-Z0mUQBGtE+ZZSv/HerRSHe7ukJokxjiPeHe7iPOIXseEoRw51H3K/Vh6OMIMstetzZ11vWO9rCsXSD/uUUArmA==",
"requires": { "requires": {
"@types/pug": "^2.0.4", "@types/pug": "^2.0.4",
"@types/sass": "^1.16.0", "@types/sass": "^1.16.0",
"detect-indent": "^6.0.0", "detect-indent": "^6.0.0",
"magic-string": "^0.25.7",
"sorcery": "^0.10.0",
"strip-indent": "^3.0.0" "strip-indent": "^3.0.0"
} }
}, },
@@ -2750,6 +2880,16 @@
"integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==",
"requires": { "requires": {
"rimraf": "^3.0.0" "rimraf": "^3.0.0"
},
"dependencies": {
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"requires": {
"glob": "^7.1.3"
}
}
} }
}, },
"to-regex-range": { "to-regex-range": {

View File

@@ -32,7 +32,7 @@
"@tailwindcss/forms": "^0.3.3", "@tailwindcss/forms": "^0.3.3",
"postcss": "^8.3.6", "postcss": "^8.3.6",
"tailwindcss": "^2.2.15", "tailwindcss": "^2.2.15",
"svelte-preprocess": "^4.8.0", "svelte-preprocess": "^4.9.4",
"svelte": "latest" "svelte": "latest"
} }
} }

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { onMount, onDestroy } from 'svelte'; import { onMount, onDestroy } from 'svelte';
import { Send, adminmode, torrentstats, isAdmin, usersfortorrent, torctime, torrentinfo, fileSize, fsdirinfo, torrentfiles, fileviewpath, fileviewinfohash, istrntlocked, torrentinfostat } from './core'; import { Send, adminmode, torrentstats, isAdmin, usersfortorrent, torctime, torrentinfo, fileSize, fsdirinfo, torrentfiles, fileviewpath, fileviewinfohash, istrntlocked } from './core';
import slocation from 'slocation'; import slocation from 'slocation';
import TorrentCard from './TorrentCard.svelte'; import TorrentCard from './TorrentCard.svelte';
import type { DlObject } from './core'; import type { DlObject } from './core';

View File

@@ -12,12 +12,6 @@ export interface DlObject {
seeding?: boolean; seeding?: boolean;
} }
interface DlObject2 {
locked: boolean;
addedat: string;
startedat: string;
}
interface RespObject { interface RespObject {
type: string; type: string;
state: string; state: string;
@@ -128,7 +122,6 @@ export const downloadslist: Writable<{ has: boolean; data: DlObject[] }> = writa
data: [] data: []
}); });
export const torrentinfo: Writable<DlObject> = writable({} as DlObject); export const torrentinfo: Writable<DlObject> = writable({} as DlObject);
export const torrentinfostat: Writable<DlObject2> = writable({} as DlObject2);
export const istrntlocked: Writable<boolean> = writable(false); export const istrntlocked: Writable<boolean> = writable(false);
export const resplist: Writable<{ has: boolean; data: RespObject[] }> = writable({ export const resplist: Writable<{ has: boolean; data: RespObject[] }> = writable({
has: false, has: false,

View File

@@ -2,7 +2,6 @@
"extends": "@tsconfig/svelte/tsconfig.json", "extends": "@tsconfig/svelte/tsconfig.json",
"include": ["src/**/*", "src/node_modules", "src/**/*.d.ts", "src/*", "src/**/*.svelte"], "include": ["src/**/*", "src/node_modules", "src/**/*.d.ts", "src/*", "src/**/*.svelte"],
"compilerOptions": { "compilerOptions": {
"outDir": "tscheck",
"target": "ESNext", "target": "ESNext",
"types": ["svelte"] "types": ["svelte"]
} }