Pull from upstream front and back
This commit is contained in:
parent
e61816bd6d
commit
eef826a53d
|
|
@ -5,3 +5,4 @@ PROD=true
|
|||
LOCALCERTIFICATEPATH=
|
||||
LOCALREDISCONNECTION=
|
||||
DB_PASSWORD=
|
||||
ACCESS_KEY=
|
||||
|
|
@ -25,3 +25,17 @@ easy enough
|
|||
```
|
||||
PROTOCOL_HEADER=x-forwarded-proto HOST_HEADER=x-forwarded-host pm2 start server.mjs
|
||||
```
|
||||
|
||||
# Setting up Access keys
|
||||
|
||||
Open regedit go to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node
|
||||
|
||||
Make a key called ROBLOX Corporation if it doesn't exist
|
||||
|
||||
Inside of that key make another key called Roblox if it doesn't exist
|
||||
|
||||
Finally inside that key made a string value called AccessKey for the value put the same value as the one from the env file thank you.
|
||||
|
||||
# Contribution
|
||||
|
||||
Anyone is welcome to contribute.
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
const mongoose = require("mongoose")
|
||||
const ConfigSchema = new mongoose.Schema(
|
||||
{
|
||||
RegistrationEnabled: { type: Boolean, required: true },
|
||||
MaintenanceEnabled: { type: Boolean, required: true },
|
||||
KeysEnabled: { type: Boolean, required: true },
|
||||
GamesEnabled: { type: Boolean, required: true },
|
||||
},
|
||||
{ collection: "config" },
|
||||
)
|
||||
|
||||
const model = mongoose.model("ConfigSchema", ConfigSchema)
|
||||
|
||||
module.exports = model
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
import { Schema } from "redis-om"
|
||||
|
||||
const configSchema = new Schema("config", {
|
||||
RegistrationEnabled: { type: "boolean" },
|
||||
MaintenanceEnabled: { type: "boolean" },
|
||||
GamesEnabled: { type: "boolean" },
|
||||
KeysEnabled: { type: "boolean" },
|
||||
bannermessage: { type: "string" },
|
||||
})
|
||||
|
||||
export default configSchema
|
||||
|
|
@ -71,6 +71,13 @@ UserSchema.virtual("feed.userdata", {
|
|||
justOne: true,
|
||||
})
|
||||
|
||||
UserSchema.virtual("inventory.itemdata", {
|
||||
ref: "CatalogSchema",
|
||||
localField: "inventory.ItemId",
|
||||
foreignField: "ItemId",
|
||||
justOne: true,
|
||||
})
|
||||
|
||||
const model = mongoose.model("UserSchema", UserSchema)
|
||||
|
||||
module.exports = model
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
-----BEGIN PUBLIC KEY-----
|
||||
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC04Nimx5hGYvQ54rZPWJ9qvvoP
|
||||
SsBXt3PREKhramu1gXpv+W4Mh/vdzlTsNqmedZ2gaX0rd9smy3Kp2lgxKsuyX1gc
|
||||
918k9L/PUzKvnfxy93RDwXdo6qJze+mdQlkDi9U5W4MAzcx6ann3YTHyiKHfs9Dq
|
||||
F+kBJQiloPgcnk3HPQIDAQAB
|
||||
-----END PUBLIC KEY-----
|
||||
|
|
@ -33,6 +33,7 @@
|
|||
"jsonwebtoken": "^9.0.0",
|
||||
"mongo-sanitize": "^1.1.0",
|
||||
"mongoose": "^6.5.2",
|
||||
"mongoose-execution-time": "^1.0.2",
|
||||
"mongoose-unique-validator": "^3.1.0",
|
||||
"multer": "^1.4.5-lts.1",
|
||||
"node-fetch": "^3.2.10",
|
||||
|
|
@ -3524,6 +3525,11 @@
|
|||
"url": "https://opencollective.com/mongoose"
|
||||
}
|
||||
},
|
||||
"node_modules/mongoose-execution-time": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mongoose-execution-time/-/mongoose-execution-time-1.0.2.tgz",
|
||||
"integrity": "sha512-ROCOxLNOQcXuNcEmpcYUj6oeLWuBWMZXOPW4duuCJwmm4b7hGuLEExwWiy/4TtMULkw/heCHHOvXjyPw2+g9iA=="
|
||||
},
|
||||
"node_modules/mongoose-unique-validator": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mongoose-unique-validator/-/mongoose-unique-validator-3.1.0.tgz",
|
||||
|
|
@ -7683,6 +7689,11 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"mongoose-execution-time": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mongoose-execution-time/-/mongoose-execution-time-1.0.2.tgz",
|
||||
"integrity": "sha512-ROCOxLNOQcXuNcEmpcYUj6oeLWuBWMZXOPW4duuCJwmm4b7hGuLEExwWiy/4TtMULkw/heCHHOvXjyPw2+g9iA=="
|
||||
},
|
||||
"mongoose-unique-validator": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mongoose-unique-validator/-/mongoose-unique-validator-3.1.0.tgz",
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
"jsonwebtoken": "^9.0.0",
|
||||
"mongo-sanitize": "^1.1.0",
|
||||
"mongoose": "^6.5.2",
|
||||
"mongoose-execution-time": "^1.0.2",
|
||||
"mongoose-unique-validator": "^3.1.0",
|
||||
"multer": "^1.4.5-lts.1",
|
||||
"node-fetch": "^3.2.10",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ dependencies:
|
|||
version: 6.6.0(prom-client@14.2.0)
|
||||
express-rate-limit:
|
||||
specifier: ^6.7.0
|
||||
version: 6.11.0(express@4.18.2)
|
||||
version: 6.11.2(express@4.18.2)
|
||||
express-session:
|
||||
specifier: ^1.17.3
|
||||
version: 1.17.3
|
||||
|
|
@ -77,6 +77,9 @@ dependencies:
|
|||
mongoose:
|
||||
specifier: ^6.5.2
|
||||
version: 6.12.0
|
||||
mongoose-execution-time:
|
||||
specifier: ^1.0.2
|
||||
version: 1.1.1
|
||||
mongoose-unique-validator:
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0(mongoose@6.12.0)
|
||||
|
|
@ -142,7 +145,7 @@ packages:
|
|||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-crypto/util": 3.0.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
tslib: 1.14.1
|
||||
dev: false
|
||||
optional: true
|
||||
|
|
@ -169,7 +172,7 @@ packages:
|
|||
"@aws-crypto/sha256-js": 3.0.0
|
||||
"@aws-crypto/supports-web-crypto": 3.0.0
|
||||
"@aws-crypto/util": 3.0.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@aws-sdk/util-locate-window": 3.310.0
|
||||
"@aws-sdk/util-utf8-browser": 3.259.0
|
||||
tslib: 1.14.1
|
||||
|
|
@ -184,7 +187,7 @@ packages:
|
|||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-crypto/util": 3.0.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
tslib: 1.14.1
|
||||
dev: false
|
||||
optional: true
|
||||
|
|
@ -207,33 +210,33 @@ packages:
|
|||
}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@aws-sdk/util-utf8-browser": 3.259.0
|
||||
tslib: 1.14.1
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/client-cognito-identity@3.409.0:
|
||||
/@aws-sdk/client-cognito-identity@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-vUThhqsTL39s4Gbtldher8EuaahWkVh9M5BrfIlIoDnO2dTA/NXbAA3tP7Zj+mw1PAjLZdEqtNmIeZFVGs+0nw==,
|
||||
integrity: sha512-J4iPhXswm66Fsk1x0Kly+PWzBizmms4kkkoAU1sk9n08XfWqNBTyf01mx6/t/X+Yh43p2zaeB/XvUwa0jSsWaQ==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-crypto/sha256-browser": 3.0.0
|
||||
"@aws-crypto/sha256-js": 3.0.0
|
||||
"@aws-sdk/client-sts": 3.409.0
|
||||
"@aws-sdk/credential-provider-node": 3.409.0
|
||||
"@aws-sdk/middleware-host-header": 3.408.0
|
||||
"@aws-sdk/middleware-logger": 3.408.0
|
||||
"@aws-sdk/middleware-recursion-detection": 3.408.0
|
||||
"@aws-sdk/middleware-signing": 3.408.0
|
||||
"@aws-sdk/middleware-user-agent": 3.408.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/util-endpoints": 3.408.0
|
||||
"@aws-sdk/util-user-agent-browser": 3.408.0
|
||||
"@aws-sdk/util-user-agent-node": 3.408.0
|
||||
"@aws-sdk/client-sts": 3.410.0
|
||||
"@aws-sdk/credential-provider-node": 3.410.0
|
||||
"@aws-sdk/middleware-host-header": 3.410.0
|
||||
"@aws-sdk/middleware-logger": 3.410.0
|
||||
"@aws-sdk/middleware-recursion-detection": 3.410.0
|
||||
"@aws-sdk/middleware-signing": 3.410.0
|
||||
"@aws-sdk/middleware-user-agent": 3.410.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@aws-sdk/util-endpoints": 3.410.0
|
||||
"@aws-sdk/util-user-agent-browser": 3.410.0
|
||||
"@aws-sdk/util-user-agent-node": 3.410.0
|
||||
"@smithy/config-resolver": 2.0.7
|
||||
"@smithy/fetch-http-handler": 2.1.2
|
||||
"@smithy/hash-node": 2.0.6
|
||||
|
|
@ -245,7 +248,7 @@ packages:
|
|||
"@smithy/middleware-stack": 2.0.0
|
||||
"@smithy/node-config-provider": 2.0.9
|
||||
"@smithy/node-http-handler": 2.1.2
|
||||
"@smithy/protocol-http": 2.0.5
|
||||
"@smithy/protocol-http": 3.0.2
|
||||
"@smithy/smithy-client": 2.1.3
|
||||
"@smithy/types": 2.3.0
|
||||
"@smithy/url-parser": 2.0.6
|
||||
|
|
@ -262,24 +265,24 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/client-sso@3.409.0:
|
||||
/@aws-sdk/client-sso@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-vlXcIzcmUhObuEJ6q3lsp1ZHeDeD9bUrG3dmdSTeII4U6A9imgvaXONWI9GFEUsgzCrrCxtCqBX2RqMfZDhylw==,
|
||||
integrity: sha512-MC9GrgwtlOuSL2WS3DRM3dQ/5y+49KSMMJRH6JiEcU5vE0dX/OtEcX+VfEwpi73x5pSfIjm7xnzjzOFx+sQBIg==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-crypto/sha256-browser": 3.0.0
|
||||
"@aws-crypto/sha256-js": 3.0.0
|
||||
"@aws-sdk/middleware-host-header": 3.408.0
|
||||
"@aws-sdk/middleware-logger": 3.408.0
|
||||
"@aws-sdk/middleware-recursion-detection": 3.408.0
|
||||
"@aws-sdk/middleware-user-agent": 3.408.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/util-endpoints": 3.408.0
|
||||
"@aws-sdk/util-user-agent-browser": 3.408.0
|
||||
"@aws-sdk/util-user-agent-node": 3.408.0
|
||||
"@aws-sdk/middleware-host-header": 3.410.0
|
||||
"@aws-sdk/middleware-logger": 3.410.0
|
||||
"@aws-sdk/middleware-recursion-detection": 3.410.0
|
||||
"@aws-sdk/middleware-user-agent": 3.410.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@aws-sdk/util-endpoints": 3.410.0
|
||||
"@aws-sdk/util-user-agent-browser": 3.410.0
|
||||
"@aws-sdk/util-user-agent-node": 3.410.0
|
||||
"@smithy/config-resolver": 2.0.7
|
||||
"@smithy/fetch-http-handler": 2.1.2
|
||||
"@smithy/hash-node": 2.0.6
|
||||
|
|
@ -291,7 +294,7 @@ packages:
|
|||
"@smithy/middleware-stack": 2.0.0
|
||||
"@smithy/node-config-provider": 2.0.9
|
||||
"@smithy/node-http-handler": 2.1.2
|
||||
"@smithy/protocol-http": 2.0.5
|
||||
"@smithy/protocol-http": 3.0.2
|
||||
"@smithy/smithy-client": 2.1.3
|
||||
"@smithy/types": 2.3.0
|
||||
"@smithy/url-parser": 2.0.6
|
||||
|
|
@ -308,27 +311,27 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/client-sts@3.409.0:
|
||||
/@aws-sdk/client-sts@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-yNL9zYWDVIOWZhIlsy2tiHetSYvio5ZVJ3nvR4xWPTwqOQveZx/K0PTK+nh6T6w5R3w5IOSKvd+vPCpY4bGx8Q==,
|
||||
integrity: sha512-e6VMrBJtnTxxUXwDmkADGIvyppmDMFf4+cGGA68tVCUm1cFNlCI6M/67bVSIPN/WVKAAfhEL5O2vVXCM7aatYg==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-crypto/sha256-browser": 3.0.0
|
||||
"@aws-crypto/sha256-js": 3.0.0
|
||||
"@aws-sdk/credential-provider-node": 3.409.0
|
||||
"@aws-sdk/middleware-host-header": 3.408.0
|
||||
"@aws-sdk/middleware-logger": 3.408.0
|
||||
"@aws-sdk/middleware-recursion-detection": 3.408.0
|
||||
"@aws-sdk/middleware-sdk-sts": 3.408.0
|
||||
"@aws-sdk/middleware-signing": 3.408.0
|
||||
"@aws-sdk/middleware-user-agent": 3.408.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/util-endpoints": 3.408.0
|
||||
"@aws-sdk/util-user-agent-browser": 3.408.0
|
||||
"@aws-sdk/util-user-agent-node": 3.408.0
|
||||
"@aws-sdk/credential-provider-node": 3.410.0
|
||||
"@aws-sdk/middleware-host-header": 3.410.0
|
||||
"@aws-sdk/middleware-logger": 3.410.0
|
||||
"@aws-sdk/middleware-recursion-detection": 3.410.0
|
||||
"@aws-sdk/middleware-sdk-sts": 3.410.0
|
||||
"@aws-sdk/middleware-signing": 3.410.0
|
||||
"@aws-sdk/middleware-user-agent": 3.410.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@aws-sdk/util-endpoints": 3.410.0
|
||||
"@aws-sdk/util-user-agent-browser": 3.410.0
|
||||
"@aws-sdk/util-user-agent-node": 3.410.0
|
||||
"@smithy/config-resolver": 2.0.7
|
||||
"@smithy/fetch-http-handler": 2.1.2
|
||||
"@smithy/hash-node": 2.0.6
|
||||
|
|
@ -340,7 +343,7 @@ packages:
|
|||
"@smithy/middleware-stack": 2.0.0
|
||||
"@smithy/node-config-provider": 2.0.9
|
||||
"@smithy/node-http-handler": 2.1.2
|
||||
"@smithy/protocol-http": 2.0.5
|
||||
"@smithy/protocol-http": 3.0.2
|
||||
"@smithy/smithy-client": 2.1.3
|
||||
"@smithy/types": 2.3.0
|
||||
"@smithy/url-parser": 2.0.6
|
||||
|
|
@ -358,16 +361,16 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/credential-provider-cognito-identity@3.409.0:
|
||||
/@aws-sdk/credential-provider-cognito-identity@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-8MLPJ8YjX+iAhsyeUah6388EHm0aeLPyn+bz5M/PwyDkX8UuuaM3VzH0dHoMdqX+iOCIynh/WRm+qYizrAscCA==,
|
||||
integrity: sha512-2QMvdnwnYsKnwy8O+o9ozKL80VFWI0skXVvKB3DFW4cr9IX5cBCx7xuhI7TXbCqiBxuz5SSiA1s19fVtq0sUmw==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/client-cognito-identity": 3.409.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/client-cognito-identity": 3.410.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/property-provider": 2.0.7
|
||||
"@smithy/types": 2.3.0
|
||||
tslib: 2.6.2
|
||||
|
|
@ -376,34 +379,34 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/credential-provider-env@3.408.0:
|
||||
/@aws-sdk/credential-provider-env@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-GCpgHEHxRTzKaMkwDC2gLb3xlD+ZxhKPUJ1DVcO7I9E3eCGJsYVedIi0/2XE+NP+HVoy8LyW2qH8QQWh64JKow==,
|
||||
integrity: sha512-c7TB9LbN0PkFOsXI0lcRJnqPNOmc4VBvrHf8jP/BkTDg4YUoKQKOFd4d0SqzODmlZiAyoMQVZTR4ISZo95Zj4Q==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/property-provider": 2.0.7
|
||||
"@smithy/types": 2.3.0
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/credential-provider-ini@3.409.0:
|
||||
/@aws-sdk/credential-provider-ini@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-Z7hb0Kj0FuqD5HimDrtt0LRjKBHA5pvLcTYYdVorJovaBxEvfDpISSDVRIUmvhMGAlv7XezbvqESOU5cn0Gpzw==,
|
||||
integrity: sha512-D8rcr5bRCFD0f42MPQ7K6TWZq5d3pfqrKINL1/bpfkK5BJbvq1BGYmR88UC6CLpTRtZ1LHY2HgYG0fp/2zjjww==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/credential-provider-env": 3.408.0
|
||||
"@aws-sdk/credential-provider-process": 3.408.0
|
||||
"@aws-sdk/credential-provider-sso": 3.409.0
|
||||
"@aws-sdk/credential-provider-web-identity": 3.408.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/credential-provider-env": 3.410.0
|
||||
"@aws-sdk/credential-provider-process": 3.410.0
|
||||
"@aws-sdk/credential-provider-sso": 3.410.0
|
||||
"@aws-sdk/credential-provider-web-identity": 3.410.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/credential-provider-imds": 2.0.9
|
||||
"@smithy/property-provider": 2.0.7
|
||||
"@smithy/shared-ini-file-loader": 2.0.8
|
||||
|
|
@ -414,20 +417,20 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/credential-provider-node@3.409.0:
|
||||
/@aws-sdk/credential-provider-node@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-kXmfBVYnHoEAACo6zskEryDSgMSo1QYiv6P8n6Go/RsJHe4Ec+YtrOMLg3hTOptiIGHOTWZ1ANaU/IfIxmqumA==,
|
||||
integrity: sha512-0wmVm33T/j1FS7MZ/j+WsPlgSc0YnCXnpbWSov1Mn6R86SHI2b2JhdIPRRE4XbGfyW2QGNUl2CwoZVaqhXeF5g==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/credential-provider-env": 3.408.0
|
||||
"@aws-sdk/credential-provider-ini": 3.409.0
|
||||
"@aws-sdk/credential-provider-process": 3.408.0
|
||||
"@aws-sdk/credential-provider-sso": 3.409.0
|
||||
"@aws-sdk/credential-provider-web-identity": 3.408.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/credential-provider-env": 3.410.0
|
||||
"@aws-sdk/credential-provider-ini": 3.410.0
|
||||
"@aws-sdk/credential-provider-process": 3.410.0
|
||||
"@aws-sdk/credential-provider-sso": 3.410.0
|
||||
"@aws-sdk/credential-provider-web-identity": 3.410.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/credential-provider-imds": 2.0.9
|
||||
"@smithy/property-provider": 2.0.7
|
||||
"@smithy/shared-ini-file-loader": 2.0.8
|
||||
|
|
@ -438,15 +441,15 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/credential-provider-process@3.408.0:
|
||||
/@aws-sdk/credential-provider-process@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-qCTf9tr6+I2s3+v5zP4YRQQrGlYw/jyZ7u/k6bGshhlvgwGPfjNuHrM8uK/W1kv4ng1myxaL1/tAY6RVVdXz4Q==,
|
||||
integrity: sha512-BMju1hlDCDNkkSZpKF5SQ8G0WCLRj6/Jvw9QmudLHJuVwYJXEW1r2AsVMg98OZ3hB9G+MAvHruHZIbMiNmUMXQ==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/property-provider": 2.0.7
|
||||
"@smithy/shared-ini-file-loader": 2.0.8
|
||||
"@smithy/types": 2.3.0
|
||||
|
|
@ -454,17 +457,17 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/credential-provider-sso@3.409.0:
|
||||
/@aws-sdk/credential-provider-sso@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-Bh0ykbDpnUK4W8sQMEpRA/TlZxwpPLl4aU8eBLlbEcTL2M8or2nr0dQzOOvabZo8hbaPM6yfOl+vLTvWGs75zg==,
|
||||
integrity: sha512-zEaoY/sY+KYTlQUkp9dvveAHf175b8RIt0DsQkDrRPtrg/RBHR00r5rFvz9+nrwsR8546RaBU7h/zzTaQGhmcA==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/client-sso": 3.409.0
|
||||
"@aws-sdk/token-providers": 3.408.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/client-sso": 3.410.0
|
||||
"@aws-sdk/token-providers": 3.410.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/property-provider": 2.0.7
|
||||
"@smithy/shared-ini-file-loader": 2.0.8
|
||||
"@smithy/types": 2.3.0
|
||||
|
|
@ -474,40 +477,40 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/credential-provider-web-identity@3.408.0:
|
||||
/@aws-sdk/credential-provider-web-identity@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-5FbDPF/zY/1t6k1zRI/HnrxcH2v7SwsEYu2SThI2qbzaP/K7MTnTanV5vNFcdQOpuQ7x3PrzTlH3AWZueCr3Vw==,
|
||||
integrity: sha512-cE0l8LmEHdWbDkdPNgrfdYSgp4/cIVXrjUKI1QCATA729CrHZ/OQjB/maOBOrMHO9YTiggko887NkslVvwVB7w==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/property-provider": 2.0.7
|
||||
"@smithy/types": 2.3.0
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/credential-providers@3.409.0:
|
||||
/@aws-sdk/credential-providers@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-eaQChfbLnVs1ctC04dIdQPh5FtJD9v8R3xbVttKowdhUUV18rTHM5sVJuL5DGbHTXxmZSiURsoVCujrc/kaEiA==,
|
||||
integrity: sha512-QcunzQRNi9dJdAGdduST7itRW+QhDrb9zZHn+HhLKUoVwLrqk1iuH2R9SoEdZg8eV5jR04yoOPdjj1jzdIkFXQ==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/client-cognito-identity": 3.409.0
|
||||
"@aws-sdk/client-sso": 3.409.0
|
||||
"@aws-sdk/client-sts": 3.409.0
|
||||
"@aws-sdk/credential-provider-cognito-identity": 3.409.0
|
||||
"@aws-sdk/credential-provider-env": 3.408.0
|
||||
"@aws-sdk/credential-provider-ini": 3.409.0
|
||||
"@aws-sdk/credential-provider-node": 3.409.0
|
||||
"@aws-sdk/credential-provider-process": 3.408.0
|
||||
"@aws-sdk/credential-provider-sso": 3.409.0
|
||||
"@aws-sdk/credential-provider-web-identity": 3.408.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/client-cognito-identity": 3.410.0
|
||||
"@aws-sdk/client-sso": 3.410.0
|
||||
"@aws-sdk/client-sts": 3.410.0
|
||||
"@aws-sdk/credential-provider-cognito-identity": 3.410.0
|
||||
"@aws-sdk/credential-provider-env": 3.410.0
|
||||
"@aws-sdk/credential-provider-ini": 3.410.0
|
||||
"@aws-sdk/credential-provider-node": 3.410.0
|
||||
"@aws-sdk/credential-provider-process": 3.410.0
|
||||
"@aws-sdk/credential-provider-sso": 3.410.0
|
||||
"@aws-sdk/credential-provider-web-identity": 3.410.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/credential-provider-imds": 2.0.9
|
||||
"@smithy/property-provider": 2.0.7
|
||||
"@smithy/types": 2.3.0
|
||||
|
|
@ -517,76 +520,76 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/middleware-host-header@3.408.0:
|
||||
/@aws-sdk/middleware-host-header@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-eofCXuSZ+ntbLzeCRdHzraXzgWqAplXU7W2qFFVC4O9lZBhADwNPI8n8x98TH0mftnmvZxh5Bo5U8WvEolIDkw==,
|
||||
integrity: sha512-ED/OVcyITln5rrxnajZP+V0PN1nug+gSDHJDqdDo/oLy7eiDr/ZWn3nlWW7WcMplQ1/Jnb+hK0UetBp/25XooA==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@smithy/protocol-http": 2.0.5
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/protocol-http": 3.0.2
|
||||
"@smithy/types": 2.3.0
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/middleware-logger@3.408.0:
|
||||
/@aws-sdk/middleware-logger@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-otwXPCubsGRFv8Hb6nKw6Vvnu4dC8CcPk05buStj42nF8QdjWrKGb2rDCvLph5lr576LF5HN+Y2moyOi7z/I7g==,
|
||||
integrity: sha512-YtmKYCVtBfScq3/UFJk+aSZOktKJBNZL9DaSc2aPcy/goCVsYDOkGwtHk0jIkC1JRSNCkVTqL7ya60sSr8zaQQ==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/types": 2.3.0
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/middleware-recursion-detection@3.408.0:
|
||||
/@aws-sdk/middleware-recursion-detection@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-QfZwmX5z0IRC2c8pBi9VozSqbJw19V5oxyykSTqdjGe3CG3yNujXObV6xQesK67CWSnPb9wDgVGKUoYuIXwOxw==,
|
||||
integrity: sha512-KWaes5FLzRqj28vaIEE4Bimpga2E596WdPF2HaH6zsVMJddoRDsc3ZX9ZhLOGrXzIO1RqBd0QxbLrM0S/B2aOQ==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@smithy/protocol-http": 2.0.5
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/protocol-http": 3.0.2
|
||||
"@smithy/types": 2.3.0
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/middleware-sdk-sts@3.408.0:
|
||||
/@aws-sdk/middleware-sdk-sts@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-dIO9BTX049P2PwaeAK2lxJeA2rZi9/bWzMP1GIE60VrMDHmN5Ljvh1lLActECLAqNQIqN5Ub0bKV2tC/jMn+CA==,
|
||||
integrity: sha512-YfBpctDocRR4CcROoDueJA7D+aMLBV8nTFfmVNdLLLgyuLZ/AUR11VQSu1lf9gQZKl8IpKE/BLf2fRE/qV1ZuA==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/middleware-signing": 3.408.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/middleware-signing": 3.410.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/types": 2.3.0
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/middleware-signing@3.408.0:
|
||||
/@aws-sdk/middleware-signing@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-flLiLKATJ4NLcLb7lPojyQ6NvLSyQ3axqIClqwMRnhSRxvREB7OgBKwmPecSl0I5JxsNEqo+mjARdMjUHadgWQ==,
|
||||
integrity: sha512-KBAZ/eoAJUSJv5us2HsKwK2OszG2s9FEyKpEhgnHLcbbKzW873zHBH5GcOGEQu4AWArTy2ndzJu3FF+9/J9hJQ==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/property-provider": 2.0.7
|
||||
"@smithy/protocol-http": 2.0.5
|
||||
"@smithy/protocol-http": 3.0.2
|
||||
"@smithy/signature-v4": 2.0.6
|
||||
"@smithy/types": 2.3.0
|
||||
"@smithy/util-middleware": 2.0.0
|
||||
|
|
@ -594,40 +597,40 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/middleware-user-agent@3.408.0:
|
||||
/@aws-sdk/middleware-user-agent@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-UvlKri8/Mgf5W+tFU6ZJ65fC6HljcysIqfRFts/8Wurl322IS1I4j+pyjV2P6eK1054bzynfi3Trv+tRYHtVcA==,
|
||||
integrity: sha512-ZayDtLfvCZUohSxQc/49BfoU/y6bDHLfLdyyUJbJ54Sv8zQcrmdyKvCBFUZwE6tHQgAmv9/ZT18xECMl+xiONA==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/util-endpoints": 3.408.0
|
||||
"@smithy/protocol-http": 2.0.5
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@aws-sdk/util-endpoints": 3.410.0
|
||||
"@smithy/protocol-http": 3.0.2
|
||||
"@smithy/types": 2.3.0
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/token-providers@3.408.0:
|
||||
/@aws-sdk/token-providers@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-D//BjUrVtDzDdCz1mRdZZSAc822fh75Ssq46smeS6S6NKq3vJeHhfrQJMyVU1GclXu1tn9AwykaQW5Jwb5im+g==,
|
||||
integrity: sha512-d5Nc0xydkH/X0LA1HDyhGY5sEv4LuADFk+QpDtT8ogLilcre+b1jpdY8Sih/gd1KoGS1H+d1tz2hSGwUHAbUbw==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-crypto/sha256-browser": 3.0.0
|
||||
"@aws-crypto/sha256-js": 3.0.0
|
||||
"@aws-sdk/middleware-host-header": 3.408.0
|
||||
"@aws-sdk/middleware-logger": 3.408.0
|
||||
"@aws-sdk/middleware-recursion-detection": 3.408.0
|
||||
"@aws-sdk/middleware-user-agent": 3.408.0
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/util-endpoints": 3.408.0
|
||||
"@aws-sdk/util-user-agent-browser": 3.408.0
|
||||
"@aws-sdk/util-user-agent-node": 3.408.0
|
||||
"@aws-sdk/middleware-host-header": 3.410.0
|
||||
"@aws-sdk/middleware-logger": 3.410.0
|
||||
"@aws-sdk/middleware-recursion-detection": 3.410.0
|
||||
"@aws-sdk/middleware-user-agent": 3.410.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@aws-sdk/util-endpoints": 3.410.0
|
||||
"@aws-sdk/util-user-agent-browser": 3.410.0
|
||||
"@aws-sdk/util-user-agent-node": 3.410.0
|
||||
"@smithy/config-resolver": 2.0.7
|
||||
"@smithy/fetch-http-handler": 2.1.2
|
||||
"@smithy/hash-node": 2.0.6
|
||||
|
|
@ -640,7 +643,7 @@ packages:
|
|||
"@smithy/node-config-provider": 2.0.9
|
||||
"@smithy/node-http-handler": 2.1.2
|
||||
"@smithy/property-provider": 2.0.7
|
||||
"@smithy/protocol-http": 2.0.5
|
||||
"@smithy/protocol-http": 3.0.2
|
||||
"@smithy/shared-ini-file-loader": 2.0.8
|
||||
"@smithy/smithy-client": 2.1.3
|
||||
"@smithy/types": 2.3.0
|
||||
|
|
@ -658,10 +661,10 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/types@3.408.0:
|
||||
/@aws-sdk/types@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-sIsR5224xWQTW7O6h4V0S7DMWs4bK4DCunwOo7Avpq7ZVmH2YyLTs0n4NGL186j8xTosycF1ACQgpM48SLIvaA==,
|
||||
integrity: sha512-D7iaUCszv/v04NDaZUmCmekamy6VD/lKozm/3gS9+dkfU6cC2CsNoUfPV8BlV6dPdw0oWgF91am3I1stdvfVrQ==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
|
|
@ -671,15 +674,15 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/util-endpoints@3.408.0:
|
||||
/@aws-sdk/util-endpoints@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-N1D5cKEkCqf5Q7IF/pI9kfcNrT+/5ctZ6cQo4Ex6xaOcnUzdOZcXdPqaMRZVZRn8enjK2SpoLlRpXGISOugPaw==,
|
||||
integrity: sha512-iNiqJyC7N3+8zFwnXUqcWSxrZecVZLToo1iTQQdeYL2af1IcOtRgb7n8jpAI/hmXhBSx2+3RI+Y7pxyFo1vu+w==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
optional: true
|
||||
|
|
@ -696,24 +699,24 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/util-user-agent-browser@3.408.0:
|
||||
/@aws-sdk/util-user-agent-browser@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-wOVjDprG5h6kM8aJZk/tRX/RgxNxr73d6kIsUePlAgil13q62M9lcFMcIXduqtDsa1B6FfVB2wx/pyUuOZri5g==,
|
||||
integrity: sha512-i1G/XGpXGMRT2zEiAhi1xucJsfCWk8nNYjk/LbC0sA+7B9Huri96YAzVib12wkHPsJQvZxZC6CpQDIHWm4lXMA==,
|
||||
}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/types": 2.3.0
|
||||
bowser: 2.11.0
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@aws-sdk/util-user-agent-node@3.408.0:
|
||||
/@aws-sdk/util-user-agent-node@3.410.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-BzMFV+cIXrtfcfJk3GpXnkANFkzZisvAtD306TMgIscn5FF26K1jD5DU+h5Q5WMq7gx+oXh9kJ3Lu3hi7hahKQ==,
|
||||
integrity: sha512-bK70t1jHRl8HrJXd4hEIwc5PBZ7U0w+81AKFnanIVKZwZedd6nLibUXDTK14z/Jp2GFcBqd4zkt2YLGkRt/U4A==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
|
|
@ -723,7 +726,7 @@ packages:
|
|||
aws-crt:
|
||||
optional: true
|
||||
dependencies:
|
||||
"@aws-sdk/types": 3.408.0
|
||||
"@aws-sdk/types": 3.410.0
|
||||
"@smithy/node-config-provider": 2.0.9
|
||||
"@smithy/types": 2.3.0
|
||||
tslib: 2.6.2
|
||||
|
|
@ -1423,19 +1426,6 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@smithy/protocol-http@2.0.5:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-d2hhHj34mA2V86doiDfrsy2fNTnUOowGaf9hKb0hIPHqvcnShU4/OSc4Uf1FwHkAdYF3cFXTrj5VGUYbEuvMdw==,
|
||||
}
|
||||
engines: { node: ">=14.0.0" }
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
"@smithy/types": 2.3.0
|
||||
tslib: 2.6.2
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@smithy/protocol-http@3.0.2:
|
||||
resolution:
|
||||
{
|
||||
|
|
@ -1894,7 +1884,7 @@ packages:
|
|||
postcss: ^8.1.0
|
||||
dependencies:
|
||||
browserslist: 4.21.10
|
||||
caniuse-lite: 1.0.30001532
|
||||
caniuse-lite: 1.0.30001533
|
||||
fraction.js: 4.3.6
|
||||
normalize-range: 0.1.2
|
||||
picocolors: 1.0.0
|
||||
|
|
@ -2044,8 +2034,8 @@ packages:
|
|||
engines: { node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 }
|
||||
hasBin: true
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001532
|
||||
electron-to-chromium: 1.4.513
|
||||
caniuse-lite: 1.0.30001533
|
||||
electron-to-chromium: 1.4.516
|
||||
node-releases: 2.0.13
|
||||
update-browserslist-db: 1.0.11(browserslist@4.21.10)
|
||||
dev: false
|
||||
|
|
@ -2128,10 +2118,10 @@ packages:
|
|||
engines: { node: ">=6" }
|
||||
dev: false
|
||||
|
||||
/caniuse-lite@1.0.30001532:
|
||||
/caniuse-lite@1.0.30001533:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-FbDFnNat3nMnrROzqrsg314zhqN5LGQ1kyyMk2opcrwGbVGpHRhgCWtAgD5YJUqNAiQ+dklreil/c3Qf1dfCTw==,
|
||||
integrity: sha512-9aY/b05NKU4Yl2sbcJhn4A7MsGwR1EPfW/nrqsnqVA0Oq50wpmPaGI+R1Z0UKlUl96oxUkGEOILWtOHck0eCWw==,
|
||||
}
|
||||
dev: false
|
||||
|
||||
|
|
@ -2592,10 +2582,10 @@ packages:
|
|||
}
|
||||
dev: false
|
||||
|
||||
/electron-to-chromium@1.4.513:
|
||||
/electron-to-chromium@1.4.516:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-cOB0xcInjm+E5qIssHeXJ29BaUyWpMyFKT5RB3bsLENDheCja0wMkHJyiPl0NBE/VzDI7JDuNEQWhe6RitEUcw==,
|
||||
integrity: sha512-A8xs6nie7jw/9GFRrCPrrE+maux1M3gSnFe1HVstK6ubH+7v5hMDFq3qoNxTRssYyz6jdzk/1wLebT+9tisLKA==,
|
||||
}
|
||||
dev: false
|
||||
|
||||
|
|
@ -2698,10 +2688,10 @@ packages:
|
|||
url-value-parser: 2.2.0
|
||||
dev: false
|
||||
|
||||
/express-rate-limit@6.11.0(express@4.18.2):
|
||||
/express-rate-limit@6.11.2(express@4.18.2):
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-H9afltGTaEZcvenAB5LFgb/ysTMHUzMxoB3TJM6UHP5FtAP1p2+heMj1xwTei54Zm4I9I/2qsS5m+XrdKQp/Hw==,
|
||||
integrity: sha512-a7uwwfNTh1U60ssiIkuLFWHt4hAC5yxlLGU2VP0X4YNlyEDZAqF4tK3GD3NSitVBrCQmQ0++0uOyFOgC2y4DDw==,
|
||||
}
|
||||
engines: { node: ">= 14" }
|
||||
peerDependencies:
|
||||
|
|
@ -3635,12 +3625,19 @@ packages:
|
|||
mongodb-connection-string-url: 2.6.0
|
||||
socks: 2.7.1
|
||||
optionalDependencies:
|
||||
"@aws-sdk/credential-providers": 3.409.0
|
||||
"@aws-sdk/credential-providers": 3.410.0
|
||||
"@mongodb-js/saslprep": 1.1.0
|
||||
transitivePeerDependencies:
|
||||
- aws-crt
|
||||
dev: false
|
||||
|
||||
/mongoose-execution-time@1.1.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-1/kp7Gp/HlV2whQvulKTjpKFFYVv1yHfZGJIZiWu05pyWjuKaE3oMaEz59ZgchS5iRDXh6aTzCIKzmlpp+aQ4A==,
|
||||
}
|
||||
dev: false
|
||||
|
||||
/mongoose-unique-validator@3.1.0(mongoose@6.12.0):
|
||||
resolution:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -281,4 +281,51 @@ router.post("/queue", requireAuth, async (req, res) => {
|
|||
})
|
||||
})
|
||||
|
||||
router.post("/config", requireAuth, async (req, res) => {
|
||||
if (req.userdocument.admin == false) {
|
||||
return res.redirect("/")
|
||||
}
|
||||
|
||||
return res.json({
|
||||
data: {
|
||||
GamesEnabled: req.config.GamesEnabled,
|
||||
KeysEnabled: req.config.KeysEnabled,
|
||||
MaintenanceEnabled: req.config.MaintenanceEnabled,
|
||||
RegistrationEnabled: req.config.RegistrationEnabled,
|
||||
bannermessage: req.config.bannermessage,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
router.post("/config/update", requireAuth, async (req, res) => {
|
||||
if (req.userdocument.admin == false) {
|
||||
return res.redirect("/")
|
||||
}
|
||||
|
||||
if (
|
||||
req.body.setting != "RegistrationEnabled" &&
|
||||
req.body.setting != "MaintenanceEnabled" &&
|
||||
req.body.setting != "GamesEnabled" &&
|
||||
req.body.setting != "KeysEnabled"
|
||||
) {
|
||||
return res.json({
|
||||
data: { status: "error", error: "Malformed input!" },
|
||||
})
|
||||
}
|
||||
|
||||
req.config[req.body.setting] = req.body.update
|
||||
|
||||
await req.configRepository.save(req.config)
|
||||
|
||||
return res.json({
|
||||
data: {
|
||||
GamesEnabled: req.config.GamesEnabled,
|
||||
KeysEnabled: req.config.KeysEnabled,
|
||||
MaintenanceEnabled: req.config.MaintenanceEnabled,
|
||||
RegistrationEnabled: req.config.RegistrationEnabled,
|
||||
bannermessage: req.config.bannermessage,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
module.exports = router
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ router.get("/", requireAuth, async (req, res) => {
|
|||
"ugcpermission",
|
||||
"moderation",
|
||||
"colors",
|
||||
"inventory",
|
||||
"joindate",
|
||||
"lastclaimofcurrency",
|
||||
"membership",
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ router.post("/", requireAuth, async (req, res) => {
|
|||
inventory: {
|
||||
Type: itemdoc.Type,
|
||||
ItemId: itemdoc.ItemId,
|
||||
ItemName: itemdoc.Name,
|
||||
Equipped: false,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -4,13 +4,18 @@ const user = require("./../..//model/user.js")
|
|||
const games = require("./../../model/games.js")
|
||||
const RelativeTime = require("@yaireo/relative-time")
|
||||
const relativeTime = new RelativeTime()
|
||||
const bodyParser = require("body-parser")
|
||||
router.use(bodyParser.json())
|
||||
|
||||
router.get("/:id", async (req, res) => {
|
||||
var id = req.params.id
|
||||
if (isNaN(parseFloat(id)) === true) {
|
||||
return res.json({ error: true })
|
||||
}
|
||||
const response = await user.findOne({ userid: id }).lean()
|
||||
const response = await user
|
||||
.findOne({ userid: id })
|
||||
.lean()
|
||||
.select("-inventory")
|
||||
|
||||
if (!response) {
|
||||
return res.json({ error: true, message: "404" })
|
||||
|
|
@ -69,7 +74,6 @@ router.get("/:id", async (req, res) => {
|
|||
admin: response.admin,
|
||||
discordid: response.discordid,
|
||||
membership: response.membership,
|
||||
inventory: response.inventory,
|
||||
bio: response.bio,
|
||||
status,
|
||||
followers: response.followers?.length,
|
||||
|
|
@ -79,6 +83,150 @@ router.get("/:id", async (req, res) => {
|
|||
})
|
||||
})
|
||||
|
||||
router.post("/:id/inventory", async (req, res) => {
|
||||
var id = req.params.id
|
||||
const resultsPerPage = 5
|
||||
let page = req.body.page ?? 0
|
||||
if (page != 0) {
|
||||
page -= 1
|
||||
}
|
||||
let filter = req.body.filter ?? "Shirts"
|
||||
console.log(req.body)
|
||||
filter = filter.charAt(0).toUpperCase() + filter.slice(1)
|
||||
console.log(filter)
|
||||
let onlywearing = req.body.onlywearing ?? false
|
||||
if (isNaN(parseFloat(id)) === true) {
|
||||
return res.json({ error: true })
|
||||
}
|
||||
console.log(onlywearing)
|
||||
let response
|
||||
if (onlywearing === true) {
|
||||
response = await user.aggregate([
|
||||
{
|
||||
$match: {
|
||||
userid: parseInt(id),
|
||||
},
|
||||
},
|
||||
{
|
||||
$project: {
|
||||
inventory: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
$unwind: {
|
||||
path: "$inventory",
|
||||
},
|
||||
},
|
||||
{
|
||||
$match: {
|
||||
"inventory.Equipped": true,
|
||||
},
|
||||
},
|
||||
{
|
||||
$group: {
|
||||
_id: "$_id",
|
||||
inventory: {
|
||||
$push: "$inventory",
|
||||
},
|
||||
},
|
||||
},
|
||||
])
|
||||
} else {
|
||||
response = await user.aggregate([
|
||||
{
|
||||
$match: {
|
||||
userid: parseInt(id),
|
||||
},
|
||||
},
|
||||
{
|
||||
$project: {
|
||||
inventory: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
$unwind: {
|
||||
path: "$inventory",
|
||||
},
|
||||
},
|
||||
{
|
||||
$match: {
|
||||
"inventory.Type": filter,
|
||||
},
|
||||
},
|
||||
{
|
||||
$group: {
|
||||
_id: "$_id",
|
||||
inventory: {
|
||||
$push: "$inventory",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
$project: {
|
||||
inventory: {
|
||||
$slice: [
|
||||
"$inventory",
|
||||
parseFloat(page) * resultsPerPage,
|
||||
resultsPerPage,
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
])
|
||||
}
|
||||
await user.populate(response, {
|
||||
path: "inventory.itemdata",
|
||||
select: "Name",
|
||||
})
|
||||
console.log(response?.[0]?.inventory?.length)
|
||||
if (!response[0]?.inventory) {
|
||||
return res.json({ error: false, inventory: [] })
|
||||
}
|
||||
if (onlywearing === true) {
|
||||
// we aren't gonna use pagination for equipped yet cause lazy and its only used on peoples profiles anyways
|
||||
return res.json({ error: false, inventory: response?.[0]?.inventory })
|
||||
}
|
||||
let responsecount
|
||||
if (onlywearing === true) {
|
||||
responsecount = (
|
||||
await user.aggregate([
|
||||
{ $match: { userid: parseInt(id) } },
|
||||
{ $project: { inventory: 1 } },
|
||||
{ $unwind: { path: "$inventory" } },
|
||||
{
|
||||
$match: {
|
||||
"inventory.Type": filter,
|
||||
"inventory.Equipped": onlywearing,
|
||||
},
|
||||
},
|
||||
{ $count: "inventory" },
|
||||
])
|
||||
)[0].inventory
|
||||
} else {
|
||||
responsecount = (
|
||||
await user.aggregate([
|
||||
{ $match: { userid: parseInt(id) } },
|
||||
{ $project: { inventory: 1 } },
|
||||
{ $unwind: { path: "$inventory" } },
|
||||
{ $match: { "inventory.Type": filter } },
|
||||
{ $count: "inventory" },
|
||||
])
|
||||
)[0].inventory
|
||||
}
|
||||
console.log(responsecount)
|
||||
//const responsecount = await user.aggregate([ { $match : { userid : id } },{$project: { count: { $size:"$inventory" }}}]) // alternative yea
|
||||
|
||||
if (!response) {
|
||||
return res.json({ error: true, message: "404" })
|
||||
}
|
||||
|
||||
return res.json({
|
||||
error: false,
|
||||
inventory: response?.[0]?.inventory,
|
||||
pages: Math.ceil(Math.max(responsecount / resultsPerPage, 1)),
|
||||
})
|
||||
})
|
||||
|
||||
router.get("/:id/creations", async (req, res) => {
|
||||
var id = req.params.id
|
||||
if (isNaN(parseFloat(id)) === true) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ var path = require("path")
|
|||
const crypto = require("crypto")
|
||||
require("dotenv").config()
|
||||
const RCC_HOST = process.env.RCC_HOST
|
||||
const ACCESS_KEY = process.env.ACCESS_KEY
|
||||
const User = require("../model/user.js")
|
||||
const catalog = require("../model/item")
|
||||
const games = require("./../model/games.js")
|
||||
|
|
@ -72,25 +73,31 @@ router.get("/", async (req, res) => {
|
|||
console.log(ip)
|
||||
var sanitizedid = req.query.id.match(rgx)
|
||||
if (ip === RCC_HOST || ip === "::ffff:" + RCC_HOST) {
|
||||
fs.access(
|
||||
"./assets/ugc/gamefile-" + sanitizedid + ".rbxl",
|
||||
fs.F_OK,
|
||||
err => {
|
||||
if (err) {
|
||||
res.status(404).send("not found")
|
||||
return
|
||||
}
|
||||
console.log(req.headers["accesskey"])
|
||||
if (req.headers?.["accesskey"] === ACCESS_KEY) {
|
||||
fs.access(
|
||||
"./assets/ugc/gamefile-" + sanitizedid + ".rbxl",
|
||||
fs.F_OK,
|
||||
err => {
|
||||
if (err) {
|
||||
res.status(404).send("not found")
|
||||
return
|
||||
}
|
||||
|
||||
//file exists
|
||||
res.sendFile(
|
||||
path.resolve(
|
||||
"./assets/ugc/gamefile-" + sanitizedid + ".rbxl",
|
||||
),
|
||||
)
|
||||
return
|
||||
},
|
||||
)
|
||||
//file exists
|
||||
res.sendFile(
|
||||
path.resolve(
|
||||
"./assets/ugc/gamefile-" +
|
||||
sanitizedid +
|
||||
".rbxl",
|
||||
),
|
||||
)
|
||||
return
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
return res.status(401).end()
|
||||
} else {
|
||||
if (!req.query.id) {
|
||||
req.query.id = req.query.assetversionid
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ const { requireAuth } = require("./../middleware/authmiddleware")
|
|||
const User = require("./../model/item.js")
|
||||
const bodyParser = require("body-parser")
|
||||
router.use(bodyParser.json())
|
||||
const xss = require("xss")
|
||||
|
||||
router.post("/fetch", async (req, res) => {
|
||||
const resultsPerPage = 30
|
||||
|
|
@ -12,6 +13,7 @@ router.post("/fetch", async (req, res) => {
|
|||
page -= 1
|
||||
}
|
||||
let { filter, sort } = req.body
|
||||
let libraryassets = ["User Ad", "Gamepass", "Video"] // we don't want to include these in the catalog
|
||||
//console.log(req.body)
|
||||
try {
|
||||
if (filter === "Best Selling") {
|
||||
|
|
@ -33,7 +35,7 @@ router.post("/fetch", async (req, res) => {
|
|||
if (sort === "All") {
|
||||
response = await User.find({
|
||||
Hidden: { $exists: false },
|
||||
Type: { $ne: "User Ad" },
|
||||
Type: { $nin: libraryassets },
|
||||
})
|
||||
.limit(resultsPerPage)
|
||||
.skip(0 + parseFloat(page) * resultsPerPage)
|
||||
|
|
@ -42,7 +44,7 @@ router.post("/fetch", async (req, res) => {
|
|||
.select(["-_id"])
|
||||
responsecount = await User.countDocuments({
|
||||
Hidden: { $exists: false },
|
||||
Type: { $ne: "User Ad" },
|
||||
Type: { $nin: libraryassets },
|
||||
})
|
||||
}
|
||||
} else {
|
||||
|
|
@ -63,7 +65,7 @@ router.post("/fetch", async (req, res) => {
|
|||
if (sort === "All") {
|
||||
response = await User.find({
|
||||
Hidden: { $exists: false },
|
||||
Type: { $ne: "User Ad" },
|
||||
Type: { $nin: libraryassets },
|
||||
})
|
||||
.limit(resultsPerPage)
|
||||
.skip(0 + parseFloat(page) * resultsPerPage)
|
||||
|
|
@ -71,7 +73,7 @@ router.post("/fetch", async (req, res) => {
|
|||
.select(["-_id"])
|
||||
responsecount = await User.countDocuments({
|
||||
Hidden: { $exists: false },
|
||||
Type: { $ne: "User Ad" },
|
||||
Type: { $nin: libraryassets },
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -89,7 +91,7 @@ router.post("/fetch", async (req, res) => {
|
|||
router.get("/iteminfo/:id", async (req, res) => {
|
||||
var id = req.params.id
|
||||
|
||||
if (isNaN(parseFloat(id)) === true) {
|
||||
if (isNaN(parseInt(id)) === true) {
|
||||
return res.json({ status: "error", error: "Must be number" })
|
||||
}
|
||||
const response = await User.findOne({ ItemId: id }).lean()
|
||||
|
|
@ -100,6 +102,78 @@ router.get("/iteminfo/:id", async (req, res) => {
|
|||
return res.json({ error: false, iteminfo: response })
|
||||
})
|
||||
|
||||
router.post("/iteminfo/:id/configure", requireAuth, async (req, res) => {
|
||||
var id = req.params.id
|
||||
|
||||
let { name, description, price } = req.body
|
||||
|
||||
if (
|
||||
typeof name === "undefined" &&
|
||||
typeof description === "undefined" &&
|
||||
typeof price === "undefined"
|
||||
) {
|
||||
return res.json({ status: "error", error: "Nothing to update" })
|
||||
}
|
||||
|
||||
if (isNaN(parseInt(id)) === true) {
|
||||
return res.json({ status: "error", error: "Must be number" })
|
||||
}
|
||||
const response = await User.findOne({ ItemId: parseInt(id) })
|
||||
|
||||
if (!response) {
|
||||
return res.json({ status: "error", error: "Not found" })
|
||||
}
|
||||
|
||||
if (
|
||||
response.Creator !== req.userdocument.userid &&
|
||||
req.userdocument.admin === false
|
||||
) {
|
||||
return res.status(401).json({ status: "error", error: "Unauthorized!" })
|
||||
}
|
||||
let save = false
|
||||
|
||||
if (price && price != null) {
|
||||
if (isNaN(parseInt(price)) === true) {
|
||||
return res.json({ status: "error", error: "Must be number" })
|
||||
}
|
||||
price = parseInt(price)
|
||||
if (price < 5 && response.Type != "Gamepass") {
|
||||
return res.json({
|
||||
status: "error",
|
||||
error: "Minimum price is 5 rocks.",
|
||||
})
|
||||
} else if (price < 1 && response.Type === "Gamepass") {
|
||||
return res.json({
|
||||
status: "error",
|
||||
error: "Minimum price is 1 rock.",
|
||||
})
|
||||
}
|
||||
|
||||
response.Price = price
|
||||
response.markModified("Price")
|
||||
save = true
|
||||
}
|
||||
|
||||
if (description && description != "") {
|
||||
response.Description = xss(description)
|
||||
response.markModified("Description")
|
||||
save = true
|
||||
}
|
||||
|
||||
if (name && name != "") {
|
||||
response.Name = xss(name)
|
||||
response.markModified("Name")
|
||||
save = true
|
||||
}
|
||||
|
||||
if (save === true) {
|
||||
await response.save()
|
||||
}
|
||||
console.log(name, description, price)
|
||||
|
||||
return res.json({ status: "success", message: "Item updated!" })
|
||||
})
|
||||
|
||||
router.post("/search", async (req, res) => {
|
||||
const resultsPerPage = 30
|
||||
let page = req.body.page ?? 0
|
||||
|
|
|
|||
|
|
@ -260,6 +260,7 @@ router.get("/gameinfo/:id", async (req, res) => {
|
|||
])
|
||||
.populate("owner", "username")
|
||||
//console.log(response)
|
||||
//console.log(response)
|
||||
|
||||
if (!response) {
|
||||
return res.json({ status: "error", error: "Not found" })
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
const express = require("express")
|
||||
const router = express.Router()
|
||||
const { requireAuth } = require("./../middleware/authmiddleware")
|
||||
const bodyParser = require("body-parser")
|
||||
router.use(bodyParser.json())
|
||||
|
||||
router.get("/welcome", requireAuth, async (req, res) => {
|
||||
res.send("test")
|
||||
})
|
||||
|
||||
module.exports = router
|
||||
|
|
@ -108,7 +108,6 @@ router.post("/marketplace/purchase", requireAuth, async (req, res) => {
|
|||
inventory: {
|
||||
Type: itemdoc.Type,
|
||||
ItemId: itemdoc.ItemId,
|
||||
ItemName: itemdoc.Name,
|
||||
Equipped: false,
|
||||
},
|
||||
},
|
||||
|
|
@ -273,7 +272,6 @@ router.post(
|
|||
inventory: {
|
||||
Type: itemdoc.Type,
|
||||
ItemId: itemdoc.ItemId,
|
||||
ItemName: itemdoc.Name,
|
||||
Equipped: false,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ var cookieParser = require("cookie-parser")
|
|||
var session = require("express-session")
|
||||
const helmet = require("helmet")
|
||||
const mongoose = require("mongoose")
|
||||
const config = require("./model/config.js")
|
||||
import configNew from "./model/configNew.mjs"
|
||||
import ipWhitelist from "./model/ipWhitelist.mjs"
|
||||
const user = require("./model/user.js")
|
||||
const model = require("./model/user.js")
|
||||
|
|
@ -64,15 +64,16 @@ let redis
|
|||
if (PROD === "true") {
|
||||
redis = createClient()
|
||||
} else {
|
||||
redis = createClient({
|
||||
url: "redis://default:2BxaAV7Dcbt8d6QqNm58TdUfdIQtEY5q@redis-15195.c53.west-us.azure.cloud.redislabs.com:15195",
|
||||
})
|
||||
const localRedisConnection = process.env.LOCALREDISCONNECTION
|
||||
redis = createClient({ url: localRedisConnection })
|
||||
}
|
||||
redis.on("error", err => console.log("Redis Client Error", err))
|
||||
await redis.connect()
|
||||
|
||||
import { Repository } from "redis-om"
|
||||
|
||||
const configRepository = new Repository(configNew, redis)
|
||||
|
||||
const ipWhiteListRepository = new Repository(ipWhitelist, redis)
|
||||
|
||||
const collectDefaultMetrics = client.collectDefaultMetrics
|
||||
|
|
@ -133,8 +134,11 @@ const JWT_SECRET = process.env.JWT_SECRET
|
|||
const RCC_HOST = process.env.RCC_HOST
|
||||
const DB_PASSWORD = process.env.DB_PASSWORD
|
||||
console.log(RCC_HOST)
|
||||
const { logExecutionTime } = require("mongoose-execution-time")
|
||||
|
||||
//mongoose.plugin(logExecutionTime);
|
||||
if (PROD === "true") {
|
||||
mongoose.connect("mongodb://localhost:27017/meteoritedb", {
|
||||
mongoose.connect("mongodb://127.0.0.1:27017/meteoritedb", {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: true,
|
||||
authSource: "admin",
|
||||
|
|
@ -142,24 +146,26 @@ if (PROD === "true") {
|
|||
pass: DB_PASSWORD,
|
||||
})
|
||||
} else {
|
||||
mongoose.connect("mongodb://localhost:27017/meteoritedb", {
|
||||
mongoose.connect("mongodb://127.0.0.1:27017/meteoritedb", {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: true,
|
||||
})
|
||||
}
|
||||
|
||||
app.disable("x-powered-by") // we don't wanna tell potential attackers our exact framework yet lol
|
||||
// automatically create a default document in mongodb for our config
|
||||
// if the config document doesn't exist auto create one these are also the default settings your site will start with
|
||||
// automatically create a default document in redisdb for our config
|
||||
// if the redis document doesn't exist auto create one these are also the default settings your site will start with
|
||||
async function createconfig() {
|
||||
try {
|
||||
var resp = await config.findOne()
|
||||
if (!resp) {
|
||||
const response = await config.create({
|
||||
var resp = await redis.exists("config:ONE")
|
||||
if (resp === 0) {
|
||||
// doesn't exist
|
||||
await configRepository.save("ONE", {
|
||||
RegistrationEnabled: true,
|
||||
MaintenanceEnabled: false,
|
||||
KeysEnabled: false,
|
||||
GamesEnabled: true,
|
||||
KeysEnabled: false,
|
||||
bannermessage: "",
|
||||
})
|
||||
}
|
||||
} catch (err) {
|
||||
|
|
@ -174,8 +180,9 @@ app.use(async function (req, res, next) {
|
|||
return next()
|
||||
}
|
||||
res.header("Cache-Control", "no-store,no-cache,must-revalidate")
|
||||
var resp = await config.findOne().lean()
|
||||
var resp = await configRepository.fetch("ONE")
|
||||
req.config = resp
|
||||
req.configRepository = configRepository
|
||||
|
||||
//console.log(req.headers['x-forwarded-proto'])
|
||||
if (!req.headers["x-forwarded-proto"]) {
|
||||
|
|
@ -185,10 +192,9 @@ app.use(async function (req, res, next) {
|
|||
req.headers["x-forwarded-proto"] = "http"
|
||||
}
|
||||
}
|
||||
if (!req.headers["cf-connecting-ip"]) {
|
||||
//localhost
|
||||
res.header("Access-Control-Allow-Origin", "*")
|
||||
}
|
||||
/*if (!req.headers['cf-connecting-ip']){ //localhost
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
}*/
|
||||
if (
|
||||
req.headers["x-forwarded-host"] === "www.mete0r.xyz" &&
|
||||
req.headers["x-forwarded-host"] &&
|
||||
|
|
@ -210,7 +216,7 @@ app.use(async function (req, res, next) {
|
|||
//req.headers['x-forwarded-host'] = "mete0r.xyz"
|
||||
//console.log(req.headers?.['cf-connecting-ip'])
|
||||
//console.log(req.socket.remoteAddress)
|
||||
//console.log(req.url)
|
||||
console.log(req.url)
|
||||
if (req.url === "/assets/2020.zip") {
|
||||
return res.redirect("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
|
||||
}
|
||||
|
|
@ -426,9 +432,9 @@ app.use("/api/requestad", requestAdRouter)
|
|||
|
||||
app.use('/api/bank',bankRouter)*/
|
||||
|
||||
/*const groupRouter = require('./routes/api/groups.js');
|
||||
const groupRouter = require("./routes/api/groups.js")
|
||||
|
||||
app.use('/api/groups',groupRouter)*/
|
||||
app.use("/api/groups", groupRouter)
|
||||
|
||||
const feedRouter = require("./routes/api/feed.js")
|
||||
|
||||
|
|
@ -438,6 +444,10 @@ const commentRouter = require("./routes/api/comment.js")
|
|||
|
||||
app.use("/api/comments", commentRouter)
|
||||
|
||||
const ideRouter = require("./routes/ide.js")
|
||||
|
||||
app.use(["/ide", "//ide"], ideRouter)
|
||||
|
||||
/*
|
||||
app.get("/My/Places", (req, res) => {
|
||||
res.send("No editing sorry")
|
||||
|
|
|
|||
|
|
@ -1,77 +0,0 @@
|
|||
-- This is the thumbnail script for R6 avatars. Straight up and down, with the right arm out if they have a gear.
|
||||
local person = 0
|
||||
local baseurl = "http://mete0r.xyz" -- have to set to https for production
|
||||
local HttpService = game:GetService("HttpService")
|
||||
HttpService.HttpEnabled = true
|
||||
|
||||
---@diagnostic disable-next-line: invalid-class-name
|
||||
local ThumbnailGenerator = game:GetService("ThumbnailGenerator")
|
||||
|
||||
pcall(function() game:GetService("ContentProvider"):SetBaseUrl(baseurl) end)
|
||||
game:GetService("ScriptContext").ScriptsDisabled = true
|
||||
|
||||
local player = game:GetService("Players"):CreateLocalPlayer(0)
|
||||
player:LoadCharacter()
|
||||
|
||||
-- bodycolors
|
||||
a = HttpService:JSONDecode(HttpService:GetAsync("http://mete0r.xyz/game/colors?name="..person.."&rcc=''"))
|
||||
bcolor = Instance.new("BodyColors", player.Character)
|
||||
bcolor.HeadColor = BrickColor.new(a[1])
|
||||
bcolor.TorsoColor = BrickColor.new(a[2])
|
||||
bcolor.LeftArmColor = BrickColor.new(a[3])
|
||||
bcolor.RightArmColor = BrickColor.new(a[4])
|
||||
bcolor.LeftLegColor = BrickColor.new(a[5])
|
||||
bcolor.RightLegColor = BrickColor.new(a[6])
|
||||
|
||||
|
||||
-- charapp
|
||||
b = HttpService:JSONDecode(HttpService:GetAsync("http://mete0r.xyz/game/charapp?name="..person.."&rcc=''"))
|
||||
tool = false
|
||||
pcall(function()
|
||||
|
||||
for i,v in pairs(b) do
|
||||
pcall(function()
|
||||
print(v.item.itemid)
|
||||
---@diagnostic disable-next-line: undefined-global
|
||||
thing = game:GetService("InsertService"):LoadAsset(v.item.itemid)
|
||||
|
||||
if thing:GetChildren()[1].ClassName == "Tool" then
|
||||
if tool == false then
|
||||
tool = true
|
||||
thing:GetChildren()[1].Parent = player.Character
|
||||
end
|
||||
elseif thing:GetChildren()[1]:IsA("Decal") then
|
||||
--face
|
||||
player.Character.Head.face:Destroy()
|
||||
thing:GetChildren()[1].Parent = player.Character.Head
|
||||
else
|
||||
thing:GetChildren()[1].Parent = player.Character
|
||||
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
|
||||
-- Raise up the character's arm if they have gear.
|
||||
if player.Character then
|
||||
for _, child in pairs(player.Character:GetChildren()) do
|
||||
if child:IsA("Tool") then
|
||||
player.Character.Torso["Right Shoulder"].CurrentAngle = math.rad(90)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
game.CoreGui.RobloxGui.HealthGui:Destroy()
|
||||
game.CoreGui.RobloxGui.Backpack:Destroy()
|
||||
|
||||
local arguments = {
|
||||
["thumbnail"] = ThumbnailGenerator:Click("PNG", 400, 400, --[[hideSky = ]] true),
|
||||
["player"] = person
|
||||
}
|
||||
|
||||
HttpService:PostAsync(
|
||||
baseurl .. "/api/thumbnailrender/rcc",
|
||||
HttpService:JSONEncode(arguments)
|
||||
)
|
||||
|
|
@ -2109,6 +2109,11 @@
|
|||
"@aws-sdk/credential-providers" "^3.186.0"
|
||||
"saslprep" "^1.0.3"
|
||||
|
||||
"mongoose-execution-time@^1.0.2":
|
||||
"integrity" "sha512-ROCOxLNOQcXuNcEmpcYUj6oeLWuBWMZXOPW4duuCJwmm4b7hGuLEExwWiy/4TtMULkw/heCHHOvXjyPw2+g9iA=="
|
||||
"resolved" "https://registry.npmjs.org/mongoose-execution-time/-/mongoose-execution-time-1.0.2.tgz"
|
||||
"version" "1.0.2"
|
||||
|
||||
"mongoose-unique-validator@^3.1.0":
|
||||
"integrity" "sha512-UsBBlFapip8gc8x1h+nLWnkOy+GTy9Z+zmTyZ35icLV3EoLIVz180vJzepfMM9yBy2AJh+maeuoM8CWtqejGUg=="
|
||||
"resolved" "https://registry.npmjs.org/mongoose-unique-validator/-/mongoose-unique-validator-3.1.0.tgz"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
# create-svelte
|
||||
|
||||
## Hey idiots to push to PRODUCTION go to actions tab and use Meteorite Push to Prod ONLY USE THIS WHEN READY
|
||||
|
||||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,39 +1,39 @@
|
|||
{
|
||||
"name": "meteoriterewrite",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@skeletonlabs/skeleton": "^0.124.2",
|
||||
"@sveltejs/adapter-auto": "^2.0.0",
|
||||
"@sveltejs/adapter-node": "^1.1.4",
|
||||
"@sveltejs/kit": "^1.5.0",
|
||||
"@tailwindcss/forms": "^0.5.3",
|
||||
"@tailwindcss/typography": "^0.5.8",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"postcss": "^8.4.21",
|
||||
"prettier": "^3.0.3",
|
||||
"prettier-plugin-svelte": "^3.0.3",
|
||||
"svelte": "^3.56.0",
|
||||
"svelte-check": "^3.0.3",
|
||||
"svelte-feather-icons": "^4.0.0",
|
||||
"svelte-hcaptcha": "^0.1.1",
|
||||
"svelte-preprocess": "^5.0.1",
|
||||
"tailwindcss": "^3.2.4",
|
||||
"tslib": "^2.4.1",
|
||||
"typescript": "^4.9.3",
|
||||
"vite": "^4.0.0"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@yaireo/relative-time": "^1.0.3",
|
||||
"dotenv": "^16.0.3",
|
||||
"lucide-svelte": "^0.216.0"
|
||||
}
|
||||
"name": "meteoriterewrite",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@skeletonlabs/skeleton": "^0.124.2",
|
||||
"@sveltejs/adapter-auto": "^2.0.0",
|
||||
"@sveltejs/adapter-node": "^1.1.4",
|
||||
"@sveltejs/kit": "^1.5.0",
|
||||
"@tailwindcss/forms": "^0.5.3",
|
||||
"@tailwindcss/typography": "^0.5.8",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"postcss": "^8.4.21",
|
||||
"prettier": "^3.0.3",
|
||||
"prettier-plugin-svelte": "^3.0.3",
|
||||
"svelte": "^3.56.0",
|
||||
"svelte-check": "^3.0.3",
|
||||
"svelte-feather-icons": "^4.0.0",
|
||||
"svelte-hcaptcha": "^0.1.1",
|
||||
"svelte-preprocess": "^5.0.1",
|
||||
"tailwindcss": "^3.2.4",
|
||||
"tslib": "^2.4.1",
|
||||
"typescript": "^4.9.3",
|
||||
"vite": "^4.0.0"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@yaireo/relative-time": "^1.0.3",
|
||||
"dotenv": "^16.0.3",
|
||||
"lucide-svelte": "^0.216.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3873
Front/pnpm-lock.yaml
3873
Front/pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,115 @@
|
|||
<script lang="ts">
|
||||
import { SlideToggle } from "@skeletonlabs/skeleton"
|
||||
import { Regex } from "lucide-svelte"
|
||||
|
||||
let regEnabled = false
|
||||
|
||||
let mainEnabled = false
|
||||
|
||||
let gameEnabled = false
|
||||
|
||||
let keyEnabled = false
|
||||
|
||||
let bannerMessage = ""
|
||||
|
||||
export let jwt: string
|
||||
|
||||
async function updateSliders() {
|
||||
const response = await fetch("admin/config", {
|
||||
method: "POST",
|
||||
headers: { "content-type": "application/json", Authorization: jwt },
|
||||
})
|
||||
const data = (await response.json()).data
|
||||
if (!data.error) {
|
||||
regEnabled = data.RegistrationEnabled
|
||||
mainEnabled = data.MaintenanceEnabled
|
||||
gameEnabled = data.GamesEnabled
|
||||
keyEnabled = data.KeysEnabled
|
||||
bannerMessage = data.bannermessage
|
||||
}
|
||||
}
|
||||
updateSliders()
|
||||
|
||||
async function updateSetting(setting: String, update: boolean) {
|
||||
const response = await fetch("admin/config/update", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
setting,
|
||||
update: update === true ? false : true,
|
||||
}),
|
||||
headers: { "content-type": "application/json", Authorization: jwt },
|
||||
})
|
||||
const data = (await response.json()).data
|
||||
if (!data.error) {
|
||||
regEnabled = data.RegistrationEnabled
|
||||
mainEnabled = data.MaintenanceEnabled
|
||||
gameEnabled = data.GamesEnabled
|
||||
keyEnabled = data.KeysEnabled
|
||||
bannerMessage = data.bannermessage
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="grow">
|
||||
<h2>Config</h2>
|
||||
|
||||
<div class="flex flex-col gap-4 justify-between">
|
||||
<div class="flex flex-row space-x-2 grow">
|
||||
<h5 class="text-tertiary-600 text-base">Registration enabled</h5>
|
||||
<SlideToggle
|
||||
name=""
|
||||
active="bg-success-600"
|
||||
on:click={() => {
|
||||
updateSetting("RegistrationEnabled", regEnabled)
|
||||
}}
|
||||
bind:checked={regEnabled}></SlideToggle>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row space-x-2 grow">
|
||||
<h5 class="text-tertiary-600 text-base">Maintenance enabled</h5>
|
||||
<SlideToggle
|
||||
name=""
|
||||
active="bg-success-600"
|
||||
on:click={() => {
|
||||
updateSetting("MaintenanceEnabled", mainEnabled)
|
||||
}}
|
||||
bind:checked={mainEnabled}></SlideToggle>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row space-x-2 grow">
|
||||
<h5 class="text-tertiary-600 text-base">Games enabled</h5>
|
||||
<SlideToggle
|
||||
name=""
|
||||
active="bg-success-600"
|
||||
on:click={() => {
|
||||
updateSetting("GamesEnabled", gameEnabled)
|
||||
}}
|
||||
bind:checked={gameEnabled}></SlideToggle>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row space-x-2 grow">
|
||||
<h5 class="text-tertiary-600 text-base">
|
||||
Keys enabled (Keys can't be generated normally)
|
||||
</h5>
|
||||
<SlideToggle
|
||||
name=""
|
||||
active="bg-success-600"
|
||||
on:click={() => {
|
||||
updateSetting("KeysEnabled", keyEnabled)
|
||||
}}
|
||||
bind:checked={keyEnabled}></SlideToggle>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row space-x-2 grow">
|
||||
<h5 class="text-tertiary-600 text-base">
|
||||
Banner message (Not functional yet.)
|
||||
</h5>
|
||||
<input
|
||||
type="text"
|
||||
bind:value={bannerMessage}
|
||||
placeholder="..."
|
||||
class="input input-bordered input-primary w-full max-w-xs rounded-md"
|
||||
required />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<script lang="ts">
|
||||
export let jwt: string
|
||||
</script>
|
||||
|
||||
<div class="grow">
|
||||
<h2 class="">Admin Logs</h2>
|
||||
<table
|
||||
class="border-separate border-spacing-2 border border-slate-500 w-full">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="border border-slate-600">Person</th>
|
||||
<th class="border border-slate-600">Action</th>
|
||||
<th class="border border-slate-600">Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="border border-slate-700">Indiana</td>
|
||||
<td class="border border-slate-700">Indianapolis</td>
|
||||
<td class="border border-slate-700">Indianapolis</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-slate-700">Ohio</td>
|
||||
<td class="border border-slate-700">Columbus</td>
|
||||
<td class="border border-slate-700">Indianapolis</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="border border-slate-700">Michigan</td>
|
||||
<td class="border border-slate-700">Detroit</td>
|
||||
<td class="border border-slate-700">Indianapolis</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
let price: string
|
||||
let creations: any[] = []
|
||||
|
||||
$: if (!itemname || !price) {
|
||||
$: if (!itemname || typeof price === "undefined") {
|
||||
disabled = true
|
||||
message.message = "Item name and price required."
|
||||
message.error = true
|
||||
|
|
|
|||
|
|
@ -101,12 +101,12 @@
|
|||
</label>
|
||||
|
||||
<label class="input-label gap-8">
|
||||
<span class="pt-3">Description:</span>
|
||||
<input
|
||||
<span class="">Description:</span>
|
||||
<textarea
|
||||
bind:value={itemdesc}
|
||||
type="text"
|
||||
class="input input-bordered input-primary w-full max-w-md rounded-md"
|
||||
required />
|
||||
required>
|
||||
</textarea>
|
||||
</label>
|
||||
|
||||
<label class="input-label gap-8">
|
||||
|
|
|
|||
|
|
@ -12,29 +12,31 @@
|
|||
src="/api/thumbnailrender/asset/?id={itemid}" />
|
||||
<a
|
||||
href="/catalog/{itemid}/{itemname
|
||||
.replace(/[^a-zA-Z ]/g, '')
|
||||
.replace(/[^0-9a-z ]/gi, '')
|
||||
.replaceAll(' ', '-')}">
|
||||
<h5 class="!text-sm">{itemname}</h5>
|
||||
</a>
|
||||
</div>
|
||||
<svg
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
height="24"
|
||||
width="24"
|
||||
stroke-width="1.5"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
aria-hidden="true">
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 011.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.56.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.893.149c-.425.07-.765.383-.93.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 01-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.397.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 01-.12-1.45l.527-.737c.25-.35.273-.806.108-1.204-.165-.397-.505-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.107-1.204l-.527-.738a1.125 1.125 0 01.12-1.45l.773-.773a1.125 1.125 0 011.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894z">
|
||||
</path>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z">
|
||||
</path>
|
||||
</svg>
|
||||
<a href="/catalog/{itemid}/configure" class="unstyled">
|
||||
<svg
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
height="24"
|
||||
width="24"
|
||||
stroke-width="1.5"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
aria-hidden="true">
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 011.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.56.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.893.149c-.425.07-.765.383-.93.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 01-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.397.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 01-.12-1.45l.527-.737c.25-.35.273-.806.108-1.204-.165-.397-.505-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.107-1.204l-.527-.738a1.125 1.125 0 01.12-1.45l.773-.773a1.125 1.125 0 011.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894z">
|
||||
</path>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z">
|
||||
</path>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
"/games/" +
|
||||
idofgame +
|
||||
"/" +
|
||||
gamename.replace(/[^a-zA-Z ]/g, "").replaceAll(" ", "-")
|
||||
gamename.replace(/[^0-9a-z ]/gi, "").replaceAll(" ", "-")
|
||||
}}>
|
||||
<div
|
||||
class="card rounded-md card-glass-surface snap-center card-hover w-20 sm:w-40 relative">
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
<a
|
||||
class="unstyled group"
|
||||
href="/games/{idofgame}/{gamename
|
||||
.replace(/[^a-zA-Z ]/g, '')
|
||||
.replace(/[^0-9a-z ]/gi, '')
|
||||
.replaceAll(' ', '-')}">
|
||||
<div
|
||||
class="card rounded-md card-glass-surface snap-center card-hover w-20 sm:w-40 relative">
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
<a
|
||||
class="unstyled hidden sm:block"
|
||||
href="/catalog/{itemid}/{itemname
|
||||
.replace(/[^a-zA-Z ]/g, '')
|
||||
.replace(/[^0-9a-z ]/gi, '')
|
||||
.replaceAll(' ', '-')}">
|
||||
{#if type != "Audio" && type != "Video"}
|
||||
{#if imageloading}
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
{/if}
|
||||
<img
|
||||
alt=""
|
||||
class="avatar-image bg-surface-400-500-token w-full h-full flex aspect-square object-cover {imageloading ===
|
||||
class="avatar-image bg-surface-400-500-token w-{width} h-{width} flex aspect-square object-cover {imageloading ===
|
||||
true
|
||||
? 'hidden'
|
||||
: ''} "
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
on:click={() => {
|
||||
action("remove", parseFloat({ itemid }.itemid))
|
||||
}}
|
||||
class="btn variant-filled-primary rounded-md btn-sm absolute right-0 top-0">
|
||||
class="btn variant-filled-primary rounded-none btn-sm absolute right-0 top-0">
|
||||
Remove
|
||||
</button>
|
||||
{:else}
|
||||
|
|
@ -92,13 +92,14 @@
|
|||
on:click={() => {
|
||||
action("wear", parseFloat({ itemid }.itemid))
|
||||
}}
|
||||
class="btn variant-filled-primary rounded-md btn-sm absolute right-0 top-0">
|
||||
class="btn variant-filled-primary rounded-none btn-sm absolute right-0 top-0">
|
||||
Wear
|
||||
</button>
|
||||
{/if}
|
||||
{/if}
|
||||
<p class="truncate w-28">{itemname}</p>
|
||||
{#if sales}
|
||||
|
||||
{#if interact !== "true"}
|
||||
<div class="!text-xs">{sales ?? "0"} Sales</div>
|
||||
{/if}
|
||||
|
||||
|
|
|
|||
|
|
@ -162,6 +162,9 @@
|
|||
on:click={() => {
|
||||
search = ""
|
||||
}}
|
||||
on:keydown
|
||||
on:keyup
|
||||
on:keypress
|
||||
class="w-8 h-8 absolute inset-y-0 right-0 pt-2 pr-3"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
|
|
@ -264,6 +267,9 @@
|
|||
<svg
|
||||
class="w-6 h-6 md:hidden block"
|
||||
on:click={drawerOpen}
|
||||
on:keydown
|
||||
on:keyup
|
||||
on:keypress
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
|
|
@ -334,6 +340,9 @@
|
|||
on:click={() => {
|
||||
search = ""
|
||||
}}
|
||||
on:keydown
|
||||
on:keyup
|
||||
on:keypress
|
||||
class="w-8 h-8 absolute inset-y-0 right-0 pt-2 pr-3"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
|
|
@ -425,7 +434,7 @@
|
|||
<svelte:fragment slot="trail">
|
||||
{#if data.user}
|
||||
<Rocks />
|
||||
{coins ?? "0"}
|
||||
{coins ?? "?"}
|
||||
<span class="relative pr-2">
|
||||
<button
|
||||
class="w-6 pt-2"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@
|
|||
import Lookup from "../../components/admin/lookup.svelte"
|
||||
import Lookupdone from "../../components/admin/lookupdone.svelte"
|
||||
import Assetqueue from "../../components/admin/assetqueue.svelte"
|
||||
import Logs from "../../components/admin/logs.svelte"
|
||||
import type { PageData } from "../$types"
|
||||
import Config from "../../components/admin/config.svelte"
|
||||
let lookupdata: any
|
||||
|
||||
let storeTab = "lookup"
|
||||
|
|
@ -35,6 +37,14 @@
|
|||
<Tab bind:group={storeTab} value="queue">Asset Queue</Tab>
|
||||
</div>
|
||||
|
||||
<div class="pl-2">
|
||||
<Tab bind:group={storeTab} value="logs">Logs</Tab>
|
||||
</div>
|
||||
|
||||
<div class="pl-2">
|
||||
<Tab bind:group={storeTab} value="config">Config</Tab>
|
||||
</div>
|
||||
|
||||
<h5>Forums</h5>
|
||||
|
||||
<h5>Website</h5>
|
||||
|
|
@ -59,5 +69,13 @@
|
|||
{#if storeTab === "queue"}
|
||||
<Assetqueue jwt={data.jwt} />
|
||||
{/if}
|
||||
|
||||
{#if storeTab === "logs"}
|
||||
<Logs jwt={data.jwt} />
|
||||
{/if}
|
||||
|
||||
{#if storeTab === "config"}
|
||||
<Config jwt={data.jwt} />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
import { url } from "$lib/url"
|
||||
let avatar: string
|
||||
import { avatarstore } from "$lib/avatarstore"
|
||||
import { page } from "$app/stores"
|
||||
import { goto, invalidate } from "$app/navigation"
|
||||
import { onMount } from "svelte"
|
||||
avatarstore.subscribe(value => {
|
||||
avatar = value
|
||||
|
|
@ -16,13 +18,17 @@
|
|||
|
||||
let regenerating = false
|
||||
|
||||
$: query = $page.url
|
||||
|
||||
export let data: PageData
|
||||
const jwt = data.jwt
|
||||
const userid = data.user.userid
|
||||
|
||||
let avatartype = data.user.avatartype ?? "R6"
|
||||
let avatarfilter = "shirts"
|
||||
let currentItems: any[] = []
|
||||
$: avatarfilter = data.avatarfilter
|
||||
$: currentPage = data.currentPage
|
||||
$: maxiumumPage = data.maxiumumPage
|
||||
$: currentItems = data.currentItems
|
||||
async function updateBodyType(newavatartype: string) {
|
||||
if (avatartype != newavatartype) {
|
||||
avatartype = newavatartype
|
||||
|
|
@ -35,20 +41,6 @@
|
|||
})
|
||||
}
|
||||
}
|
||||
async function updateItems() {
|
||||
const response = await fetch(url + `/api/userinfo/${userid}`)
|
||||
const data = await response.json()
|
||||
if (currentItems) {
|
||||
currentItems.length = 0
|
||||
currentItems = currentItems
|
||||
}
|
||||
currentItems = data.userinfo.inventory
|
||||
currentItems = currentItems
|
||||
currentItems = currentItems.filter(
|
||||
currentItems => currentItems.Type.toLowerCase() === avatarfilter,
|
||||
)
|
||||
//console.log(currentItems)
|
||||
}
|
||||
async function itemaction(action: any, itemid: Number) {
|
||||
console.log(action)
|
||||
console.log(itemid)
|
||||
|
|
@ -64,28 +56,25 @@
|
|||
}),
|
||||
})
|
||||
const itemaction = await itemactionresult.json()
|
||||
updateItems()
|
||||
invalidate("/api/userinfo/" + userid)
|
||||
console.log(itemaction)
|
||||
}
|
||||
$: {
|
||||
if (avatarfilter != "bodycolors") {
|
||||
updateItems()
|
||||
} else {
|
||||
// pop up modal
|
||||
const modalComponent: ModalComponent = {
|
||||
// Pass a reference to your custom component
|
||||
ref: Colorpicker,
|
||||
props: { jwt: data.jwt },
|
||||
}
|
||||
const d: ModalSettings = {
|
||||
type: "component",
|
||||
// NOTE: title, body, response, etc are supported!
|
||||
component: modalComponent,
|
||||
modalClasses: "w-full max-w-[700px] p-4",
|
||||
}
|
||||
modalStore.trigger(d)
|
||||
$: if (avatarfilter == "bodycolors") {
|
||||
// pop up modal
|
||||
const modalComponent: ModalComponent = {
|
||||
// Pass a reference to your custom component
|
||||
ref: Colorpicker,
|
||||
props: { jwt: data.jwt },
|
||||
}
|
||||
const d: ModalSettings = {
|
||||
type: "component",
|
||||
// NOTE: title, body, response, etc are supported!
|
||||
component: modalComponent,
|
||||
modalClasses: "w-full max-w-[700px] p-4",
|
||||
}
|
||||
modalStore.trigger(d)
|
||||
}
|
||||
|
||||
let regeneratebtn = "Regenerate"
|
||||
let regenerateimg: HTMLImageElement
|
||||
|
||||
|
|
@ -117,6 +106,17 @@
|
|||
regenerating = false
|
||||
}
|
||||
}
|
||||
|
||||
function setPage(value: number) {
|
||||
if (currentPage - value >= 1 && currentPage - value <= maxiumumPage) {
|
||||
currentPage -= value
|
||||
query.searchParams.set("page", currentPage.toString())
|
||||
goto(query.href)
|
||||
console.log(query.href)
|
||||
}
|
||||
}
|
||||
|
||||
//$:avatarfilter,updateAvatarFilter()
|
||||
</script>
|
||||
|
||||
<div
|
||||
|
|
@ -192,41 +192,59 @@
|
|||
|
||||
<div class="bg-surface-800">
|
||||
<RadioGroup rounded="rounded-md truncate flex-wrap lg:flex-nowrap">
|
||||
<RadioItem bind:group={avatarfilter} value="shirts">
|
||||
Shirts
|
||||
</RadioItem>
|
||||
<RadioItem bind:group={avatarfilter} value="pants">
|
||||
Pants
|
||||
</RadioItem>
|
||||
<RadioItem bind:group={avatarfilter} value="hats">
|
||||
Hats
|
||||
</RadioItem>
|
||||
<RadioItem bind:group={avatarfilter} value="faces">
|
||||
Faces
|
||||
</RadioItem>
|
||||
<RadioItem bind:group={avatarfilter} value="packages">
|
||||
Packages
|
||||
</RadioItem>
|
||||
<RadioItem bind:group={avatarfilter} value="heads">
|
||||
Heads
|
||||
</RadioItem>
|
||||
<RadioItem bind:group={avatarfilter} value="gears">
|
||||
Gears
|
||||
</RadioItem>
|
||||
<RadioItem bind:group={avatarfilter} value="emotes">
|
||||
Emotes
|
||||
</RadioItem>
|
||||
<RadioItem bind:group={avatarfilter} value="bodycolors">
|
||||
🖌️
|
||||
</RadioItem>
|
||||
<a class="unstyled" href="?filter=shirts">
|
||||
<RadioItem bind:group={avatarfilter} value="shirts">
|
||||
Shirts
|
||||
</RadioItem>
|
||||
</a>
|
||||
<a class="unstyled" href="?filter=pants">
|
||||
<RadioItem bind:group={avatarfilter} value="pants">
|
||||
Pants
|
||||
</RadioItem>
|
||||
</a>
|
||||
<a class="unstyled" href="?filter=hats">
|
||||
<RadioItem bind:group={avatarfilter} value="hats">
|
||||
Hats
|
||||
</RadioItem>
|
||||
</a>
|
||||
<a class="unstyled" href="?filter=faces">
|
||||
<RadioItem bind:group={avatarfilter} value="faces">
|
||||
Faces
|
||||
</RadioItem>
|
||||
</a>
|
||||
<a class="unstyled" href="?filter=packages">
|
||||
<RadioItem bind:group={avatarfilter} value="packages">
|
||||
Packages
|
||||
</RadioItem>
|
||||
</a>
|
||||
<a class="unstyled" href="?filter=heads">
|
||||
<RadioItem bind:group={avatarfilter} value="heads">
|
||||
Heads
|
||||
</RadioItem>
|
||||
</a>
|
||||
<a class="unstyled" href="?filter=gears">
|
||||
<RadioItem bind:group={avatarfilter} value="gears">
|
||||
Gears
|
||||
</RadioItem>
|
||||
</a>
|
||||
<a class="unstyled" href="?filter=emotes">
|
||||
<RadioItem bind:group={avatarfilter} value="emotes">
|
||||
Emotes
|
||||
</RadioItem>
|
||||
</a>
|
||||
<a class="unstyled" href="?filter=bodycolors">
|
||||
<RadioItem bind:group={avatarfilter} value="bodycolors">
|
||||
🖌️
|
||||
</RadioItem>
|
||||
</a>
|
||||
</RadioGroup>
|
||||
<div
|
||||
class="flex flex-col flex-wrap sm:grid sm:grid-cols-6 gap-2 p-2">
|
||||
{#if currentItems && avatarfilter != "bodycolors"}
|
||||
{#each currentItems as { ItemName, ItemId, Hidden, Equipped }}
|
||||
{#each currentItems as { itemdata, ItemId, Hidden, Equipped }}
|
||||
{#if !Hidden}
|
||||
<Itemcard
|
||||
itemname={ItemName}
|
||||
itemname={itemdata.Name}
|
||||
itemid={ItemId}
|
||||
width="w-24"
|
||||
interact="true"
|
||||
|
|
@ -236,8 +254,8 @@
|
|||
class="bg-surface-800 flex flex-row block sm:hidden px-2 relative">
|
||||
<a
|
||||
class="unstyled"
|
||||
href="/catalog/{ItemId}/{ItemName.replace(
|
||||
/[^a-zA-Z ]/g,
|
||||
href="/catalog/{ItemId}/{itemdata.Name.replace(
|
||||
/[^0-9a-z ]/gi,
|
||||
'',
|
||||
).replaceAll(' ', '-')}">
|
||||
<img
|
||||
|
|
@ -246,7 +264,7 @@
|
|||
src="/api/thumbnailrender/asset/?id={ItemId}" />
|
||||
</a>
|
||||
<div>
|
||||
<h3 class="truncate">{ItemName}</h3>
|
||||
<h3 class="truncate">{itemdata.Name}</h3>
|
||||
</div>
|
||||
{#if Equipped === true}
|
||||
<button
|
||||
|
|
@ -276,6 +294,25 @@
|
|||
{/each}
|
||||
{/if}
|
||||
</div>
|
||||
{#if avatarfilter != "bodycolors"}
|
||||
<div class="flex flex-row space-x-2 justify-center">
|
||||
<button
|
||||
on:click={() => {
|
||||
setPage(1)
|
||||
}}
|
||||
class="btn btn-sm bg-surface-600 rounded-md">
|
||||
<
|
||||
</button>
|
||||
<h5 class="">{currentPage} / {maxiumumPage}</h5>
|
||||
<button
|
||||
on:click={() => {
|
||||
setPage(-1)
|
||||
}}
|
||||
class="btn btn-sm bg-surface-600 rounded-md">
|
||||
>
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
import { error } from "@sveltejs/kit"
|
||||
import type { PageLoad } from "./$types"
|
||||
import { url as url2 } from "$lib/url"
|
||||
|
||||
export const load = (async ({ parent, url, fetch }) => {
|
||||
const avatarfilter = String(url.searchParams.get("filter") ?? "shirts")
|
||||
const currentPage = Number(url.searchParams.get("page") ?? "1")
|
||||
let currentItems: Array<any> = []
|
||||
const userid = (await parent()).user.userid
|
||||
|
||||
const response = await fetch(url2 + `/api/userinfo/${userid}/inventory`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ page: currentPage, filter: avatarfilter }),
|
||||
})
|
||||
const data = await response.json()
|
||||
currentItems = data.inventory
|
||||
|
||||
currentItems = currentItems.filter(
|
||||
currentItems => currentItems.Type.toLowerCase() === avatarfilter,
|
||||
)
|
||||
|
||||
if (!data.error) {
|
||||
return {
|
||||
currentItems,
|
||||
maxiumumPage: data.pages,
|
||||
currentPage,
|
||||
avatarfilter,
|
||||
}
|
||||
}
|
||||
}) satisfies PageLoad
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
import Itemcard from "../../components/itemcard.svelte"
|
||||
import Rocks from "../../components/rocks.svelte"
|
||||
import { url } from "$lib/url"
|
||||
import { Avatar } from "@skeletonlabs/skeleton"
|
||||
import { menu } from "@skeletonlabs/skeleton"
|
||||
import { page } from "$app/stores"
|
||||
import { goto } from "$app/navigation"
|
||||
import type { PageData } from "../$types"
|
||||
|
|
@ -12,6 +12,7 @@
|
|||
let bodyparts = false
|
||||
let animations = false
|
||||
let items: any
|
||||
let currentSort = "Oldest"
|
||||
$: query = $page.url.searchParams
|
||||
|
||||
export let data: PageData
|
||||
|
|
@ -282,7 +283,60 @@
|
|||
</div>
|
||||
|
||||
<h3>{currentFilter}</h3>
|
||||
<h4>{currentCategory}</h4>
|
||||
|
||||
<div class="flex flex-row">
|
||||
<h4>{currentCategory}</h4>
|
||||
|
||||
<button
|
||||
class="ring-surface-500 hover:ring-surface-300 ring-2 rounded p-1 flex flex-row gap-x-3 relative ml-auto w-24"
|
||||
use:menu={{ menu: "navigationsort" }}>
|
||||
<h5 class="!text-sm hover:text-white">{currentSort}</h5>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="w-4 ml-auto">
|
||||
<line x1="12" y1="5" x2="12" y2="19"></line>
|
||||
<polyline points="19 12 12 19 5 12"></polyline>
|
||||
</svg>
|
||||
<nav class=" rounded-none mt-6" data-menu="navigationsort">
|
||||
<ul>
|
||||
<button
|
||||
class="btn bg-surface-700 !rounded-none text-sm">
|
||||
Oldest
|
||||
</button>
|
||||
</ul>
|
||||
<ul>
|
||||
<button
|
||||
class="btn bg-surface-700 !rounded-none text-sm">
|
||||
Newest
|
||||
</button>
|
||||
</ul>
|
||||
<ul>
|
||||
<button
|
||||
class="btn bg-surface-700 !rounded-none text-sm">
|
||||
Bestselling
|
||||
</button>
|
||||
</ul>
|
||||
<ul>
|
||||
<button
|
||||
class="btn bg-surface-700 !rounded-none text-sm">
|
||||
Price (High to Low)
|
||||
</button>
|
||||
</ul>
|
||||
<ul>
|
||||
<button
|
||||
class="btn bg-surface-700 !rounded-none text-sm">
|
||||
Price (Low to High)
|
||||
</button>
|
||||
</ul>
|
||||
</nav>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="flex flex-col flex-wrap sm:grid sm:grid-cols-6 sm:grid-rows-5 gap-2">
|
||||
{#if items}
|
||||
|
|
@ -295,7 +349,7 @@
|
|||
<a
|
||||
class="unstyled block sm:hidden px-2"
|
||||
href="/catalog/{ItemId}/{Name.replace(
|
||||
/[^a-zA-Z ]/g,
|
||||
/[^0-9a-z ]/gi,
|
||||
'',
|
||||
).replaceAll(' ', '-')}">
|
||||
<div class="bg-surface-800 flex flex-row">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export const load = (async ({ fetch, params }) => {
|
|||
"/catalog/" +
|
||||
params.slug +
|
||||
"/" +
|
||||
data.iteminfo.Name.replace(/[^a-zA-Z ]/g, "").replaceAll(
|
||||
data.iteminfo.Name.replace(/[^0-9a-z ]/gi, "").replaceAll(
|
||||
" ",
|
||||
"-",
|
||||
),
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@
|
|||
import Rocks from "../../../../components/rocks.svelte"
|
||||
import Commentcard from "../../../../components/commentcard.svelte"
|
||||
import type { PageData } from "./$types"
|
||||
import { toastStore } from "@skeletonlabs/skeleton"
|
||||
import { toastStore, menu } from "@skeletonlabs/skeleton"
|
||||
import type { ToastSettings } from "@skeletonlabs/skeleton"
|
||||
import { coinstore } from "$lib/coinstore"
|
||||
import { MoreHorizontalIcon } from "lucide-svelte"
|
||||
|
||||
export let data: PageData
|
||||
|
||||
|
|
@ -87,7 +88,7 @@
|
|||
class="m-auto border sm:border-0 object-cover"
|
||||
alt={data.item.Name}
|
||||
src="/api/thumbnailrender/asset/?id={data.item.ItemId}" />
|
||||
{#if data.user.admin === true}
|
||||
{#if data.user.admin === true || (data.user.userid === data.item?.Creator && data.user.ugcpermission === true)}
|
||||
<button
|
||||
on:click={moderate}
|
||||
class="btn variant-filled-primary rounded-md btn-sm absolute right-0 top-0">
|
||||
|
|
@ -96,7 +97,25 @@
|
|||
{/if}
|
||||
</div>
|
||||
<div class="text-center sm:text-left">
|
||||
<h2>{data.item.Name}</h2>
|
||||
<div class="flex flex-row">
|
||||
<h2>{data.item.Name}</h2>
|
||||
<span class="relative ml-auto">
|
||||
<button use:menu={{ menu: "navigationconfig" }}>
|
||||
<MoreHorizontalIcon />
|
||||
</button>
|
||||
<nav
|
||||
class=" rounded-none pb-2 pt-2 w-40"
|
||||
data-menu="navigationconfig">
|
||||
<ul>
|
||||
<a
|
||||
href="/catalog/{data.item.ItemId}/configure"
|
||||
class="btn variant-filled-primary !rounded-md w-full btn-sm text-xs">
|
||||
Configure
|
||||
</a>
|
||||
</ul>
|
||||
</nav>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<h5>
|
||||
By <a href="/users/{data.item.Creator ?? '0'}">
|
||||
|
|
@ -130,7 +149,7 @@
|
|||
<h5 class="text-base">Description</h5>
|
||||
<div class=" pl-8">
|
||||
<h5
|
||||
class="text-base w-52 h-48 overflow-y-auto break-words">
|
||||
class="text-base w-52 h-48 overflow-y-auto break-words whitespace-pre-line">
|
||||
{data.item?.Description ?? ""}
|
||||
</h5>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ export const load = (async ({ fetch, params }) => {
|
|||
|
||||
if (
|
||||
params.name !=
|
||||
data.iteminfo.Name.replace(/[^a-zA-Z ]/g, "").replaceAll(" ", "-")
|
||||
data.iteminfo.Name.replace(/[^0-9a-z ]/gi, "").replaceAll(" ", "-")
|
||||
) {
|
||||
throw redirect(
|
||||
301,
|
||||
"/catalog/" +
|
||||
params.slug +
|
||||
"/" +
|
||||
data.iteminfo.Name.replace(/[^a-zA-Z ]/g, "").replaceAll(
|
||||
data.iteminfo.Name.replace(/[^0-9a-z ]/gi, "").replaceAll(
|
||||
" ",
|
||||
"-",
|
||||
),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,116 @@
|
|||
<script lang="ts">
|
||||
import { goto } from "$app/navigation"
|
||||
import type { PageData } from "./$types"
|
||||
|
||||
export let data: PageData
|
||||
|
||||
const jwt = data.jwt
|
||||
|
||||
let disabled = false
|
||||
let message = { error: false, message: "" }
|
||||
|
||||
let name: string
|
||||
|
||||
let price: number
|
||||
|
||||
let description: string
|
||||
|
||||
async function save() {
|
||||
const save = await fetch(
|
||||
`/api/catalog/iteminfo/${data.item.ItemId}/configure`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: jwt,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
name,
|
||||
description,
|
||||
price,
|
||||
}),
|
||||
},
|
||||
)
|
||||
const saveJson = await save.json()
|
||||
if (!saveJson.error) {
|
||||
message.message = "Done!"
|
||||
message.error = false
|
||||
goto("/catalog/" + data.item.ItemId)
|
||||
} else {
|
||||
message.message = saveJson.error
|
||||
message.error = true
|
||||
}
|
||||
}
|
||||
|
||||
$: if (!name && !description && !price && price !== 0) {
|
||||
disabled = true
|
||||
message.error = true
|
||||
message.message = "Change required"
|
||||
} else {
|
||||
disabled = false
|
||||
message.message = ""
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Meteorite - {data.item.Name} Configure</title>
|
||||
</svelte:head>
|
||||
|
||||
<div
|
||||
class="bg-surface-700 p-4 space-x-2 flex flex-row flex-wrap sm:flex-nowrap max-w-[1100px] m-0 m-auto">
|
||||
<div class="sm:border sm:p-12 sm:w-[418px] relative">
|
||||
<img
|
||||
class="m-auto border sm:border-0 object-cover"
|
||||
alt={data.item.Name}
|
||||
src="/api/thumbnailrender/asset/?id={data.item.ItemId}" />
|
||||
</div>
|
||||
|
||||
<div class="text-center sm:text-left ml-auto grow">
|
||||
<h2>{data.item.Name} - Configure</h2>
|
||||
|
||||
<div class="space-y-4 w-full">
|
||||
<h5 class="">Edit Asset</h5>
|
||||
|
||||
<label class="label">
|
||||
<span>Name</span>
|
||||
<input
|
||||
type="text"
|
||||
bind:value={name}
|
||||
class="input input-bordered input-primary w-full rounded-md" />
|
||||
</label>
|
||||
|
||||
<label class="label">
|
||||
<span>Price</span>
|
||||
<input
|
||||
type="number"
|
||||
bind:value={price}
|
||||
min="0"
|
||||
step="1"
|
||||
class="input input-bordered input-primary w-full rounded-md" />
|
||||
</label>
|
||||
|
||||
<label class="label">
|
||||
<span>Description</span>
|
||||
<textarea
|
||||
bind:value={description}
|
||||
class="input input-bordered input-primary w-full rounded-md">
|
||||
</textarea>
|
||||
</label>
|
||||
|
||||
<div
|
||||
class="!text-xs mt-6 {message.error === true
|
||||
? 'text-error-600'
|
||||
: 'text-success-600'}">
|
||||
{message.message ?? ""}
|
||||
</div>
|
||||
|
||||
<button
|
||||
on:click={save}
|
||||
type="submit"
|
||||
class="btn variant-filled-primary btn-sm w-full text-base rounded-md"
|
||||
{disabled}>
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
import { error, redirect } from "@sveltejs/kit"
|
||||
import type { PageLoad } from "./$types"
|
||||
|
||||
export const load = (async ({ parent, fetch, params }) => {
|
||||
const res = await fetch(
|
||||
`http://mete0r.xyz/api/catalog/iteminfo/${params.slug}`,
|
||||
)
|
||||
const data = await res.json()
|
||||
let self = (await parent()).user
|
||||
|
||||
if (data.iteminfo?.Creator != self.userid && self.admin === false) {
|
||||
throw error(403, "Forbidden")
|
||||
}
|
||||
|
||||
if (data.error === false) {
|
||||
return {
|
||||
item: data.iteminfo,
|
||||
}
|
||||
}
|
||||
throw error(404, "Not found")
|
||||
}) satisfies PageLoad
|
||||
|
|
@ -271,7 +271,7 @@
|
|||
<a
|
||||
class="unstyled block sm:hidden px-2"
|
||||
href="/catalog/{ItemId}/{Name.replace(
|
||||
/[^a-zA-Z ]/g,
|
||||
/[^0-9a-z ]/gi,
|
||||
'',
|
||||
).replaceAll(' ', '-')}">
|
||||
<div class="bg-surface-800 flex flex-row">
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export const load = (async ({ fetch, params }) => {
|
|||
params.slug +
|
||||
"/" +
|
||||
data.gameinfo.nameofgame
|
||||
.replace(/[^a-zA-Z ]/g, "")
|
||||
.replace(/[^0-9a-z ]/gi, "")
|
||||
.replaceAll(" ", "-"),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
import Linkdiscordmodal from "../../../../components/games/linkdiscordmodal.svelte"
|
||||
import Advertisemodal from "../../../../components/assets/advertisemodal.svelte"
|
||||
import Itemcard from "../../../../components/itemcard.svelte"
|
||||
import { MoreHorizontalIcon } from "lucide-svelte"
|
||||
let storeTab = "About"
|
||||
|
||||
export let data: PageData
|
||||
|
|
@ -162,26 +163,12 @@
|
|||
<button
|
||||
class="w-6 pt-2"
|
||||
use:menu={{ menu: "navigationgame" }}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="feather feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
<MoreHorizontalIcon />
|
||||
</button>
|
||||
<nav
|
||||
class="list-nav rounded-none pb-2 pt-2 w-40"
|
||||
class="rounded-none pb-2 pt-2 w-40"
|
||||
data-menu="navigationgame">
|
||||
<ul>
|
||||
<ul class="space-y-1">
|
||||
<button
|
||||
on:click={shutdown}
|
||||
class="btn variant-filled-primary !rounded-md w-full btn-sm text-xs">
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ export const load = (async ({ fetch, params }) => {
|
|||
|
||||
if (
|
||||
params.name !=
|
||||
data.gameinfo.nameofgame.replace(/[^a-zA-Z ]/g, "").replaceAll(" ", "-")
|
||||
data.gameinfo.nameofgame
|
||||
.replace(/[^0-9a-z ]/gi, "")
|
||||
.replaceAll(" ", "-")
|
||||
) {
|
||||
throw redirect(
|
||||
301,
|
||||
|
|
@ -15,7 +17,7 @@ export const load = (async ({ fetch, params }) => {
|
|||
params.slug +
|
||||
"/" +
|
||||
data.gameinfo.nameofgame
|
||||
.replace(/[^a-zA-Z ]/g, "")
|
||||
.replace(/[^0-9a-z ]/gi, "")
|
||||
.replaceAll(" ", "-"),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
<script lang="ts">
|
||||
import type { PageData } from "../$types"
|
||||
import Groupbar from "../../components/groups/groupbar.svelte"
|
||||
let selectedgroup = "Lambda Media Group"
|
||||
|
||||
export let data: PageData
|
||||
</script>
|
||||
|
||||
<div class="sm:flex sm:flex-row gap-2 max-w-[1400px] m-0 m-auto">
|
||||
{#if data.groups}
|
||||
<Groupbar {selectedgroup} grouplist={data.groups} />
|
||||
{/if}
|
||||
|
||||
<div class="col-span-5"></div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
import type { PageLoad } from "./$types"
|
||||
import { url } from "$lib/url"
|
||||
|
||||
export const load = (async ({ fetch, parent }) => {
|
||||
let data = await parent()
|
||||
|
||||
const response = await fetch(url + "/api/groups", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
Authorization: data.jwt,
|
||||
},
|
||||
})
|
||||
const groups = await response.json()
|
||||
|
||||
return {
|
||||
groups,
|
||||
}
|
||||
}) satisfies PageLoad
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
<script lang="ts">
|
||||
import { Avatar, menu } from "@skeletonlabs/skeleton"
|
||||
import type { PageData } from "../$types"
|
||||
import Groupbar from "../../../components/groups/groupbar.svelte"
|
||||
import Commentcard from "../../../components/commentcard.svelte"
|
||||
import { url } from "$lib/url"
|
||||
let selectedgroup = "Lambda Media Group"
|
||||
let currentPage = 1
|
||||
let maxiumumPage = 1
|
||||
let users: []
|
||||
|
||||
export let data: PageData
|
||||
let groupid = data.group.groupid
|
||||
|
||||
async function updateMembers() {
|
||||
const response = await fetch(
|
||||
url + "/api/groups/" + groupid + "/members",
|
||||
{
|
||||
method: "POST",
|
||||
body: JSON.stringify({ page: currentPage, rank: 1 }),
|
||||
headers: { "content-type": "application/json" },
|
||||
},
|
||||
)
|
||||
const data = await response.json()
|
||||
if (!data.error) {
|
||||
if (users) {
|
||||
users.length = 0
|
||||
users = users
|
||||
}
|
||||
users = data.data
|
||||
users = users
|
||||
maxiumumPage = data.pages
|
||||
}
|
||||
}
|
||||
|
||||
updateMembers()
|
||||
</script>
|
||||
|
||||
<div class="sm:flex sm:flex-row gap-2 max-w-[1400px] m-0 m-auto">
|
||||
<Groupbar {selectedgroup} grouplist={data.groups} />
|
||||
|
||||
<div class="col-span-5 mt-8 w-full space-y-2">
|
||||
<div class="bg-surface-700 p-4">
|
||||
<div class="">
|
||||
<div class="flex flex-row gap-x-4">
|
||||
<Avatar
|
||||
width="w-36"
|
||||
rounded="rounded-none"
|
||||
src="/assets/groupicons/icon-0.png" />
|
||||
|
||||
<div>
|
||||
<h2 class="font-bold">{data.group.Name}</h2>
|
||||
<h5 class="!text-sm">
|
||||
By <a href="/users/{data.group.owner.userid}">
|
||||
{data.group.owner.username}
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full space-y-2">
|
||||
<h5 class="font-bold !text-base">Description</h5>
|
||||
<h5>{data.group.Description}</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="font-bold">Shout</h4>
|
||||
|
||||
<div class="">
|
||||
<div class="bg-surface-700 p-4 flex flex-row gap-x-2">
|
||||
<a href="/users/0">
|
||||
<Avatar
|
||||
width="w-12"
|
||||
src="/api/thumbnailrender?id=0&type=headshot" />
|
||||
</a>
|
||||
|
||||
<div>
|
||||
<h5 class="!text-sm font-semibold">SushiWasNotHere</h5>
|
||||
<h5 class="!text-sm">Hello, world!</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-surface-700 p-4 flex flex-row gap-x-2">
|
||||
<textarea
|
||||
class="rounded-md grow input input-bordered input-primary"
|
||||
placeholder="Shout here!!" />
|
||||
<button class="btn mb-6 variant-filled-primary rounded-md">
|
||||
Shout
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row justify-between">
|
||||
<h4 class="font-bold">Members</h4>
|
||||
|
||||
<div class="flex flex-row gap-x-2">
|
||||
<button
|
||||
on:click={() => {}}
|
||||
class="btn btn-sm bg-surface-600 rounded-md">
|
||||
<
|
||||
</button>
|
||||
<h5 class="">1 / 1</h5>
|
||||
<button
|
||||
on:click={() => {}}
|
||||
class="btn btn-sm bg-surface-600 rounded-md">
|
||||
>
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="ring-surface-500 hover:ring-surface-300 ring-2 rounded p-1 flex flex-row gap-x-3 relative">
|
||||
<h5 class="!text-sm hover:text-white">Members</h5>
|
||||
<h5 class="!text-sm hover:text-white">(1)</h5>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="w-4">
|
||||
<line x1="12" y1="5" x2="12" y2="19"></line>
|
||||
<polyline points="19 12 12 19 5 12"></polyline>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-surface-700 p-4 flex flex-row gap-x-2">
|
||||
{#if users}
|
||||
{#each users as { userid, username }}
|
||||
<a class="unstyled" href="/users/{userid}">
|
||||
<div class="w-20">
|
||||
<Avatar
|
||||
width="w-20"
|
||||
src="/api/thumbnailrender?id={userid}&type=headshot" />
|
||||
<h5 class="!text-base truncate">{username}</h5>
|
||||
</div>
|
||||
</a>
|
||||
{/each}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<h4 class="font-bold">Wall</h4>
|
||||
<Commentcard PostText="Post" PlaceholderText="Say something..." />
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
import type { PageLoad } from "./$types"
|
||||
import { url } from "$lib/url"
|
||||
import { error } from "@sveltejs/kit"
|
||||
|
||||
export const load = (async ({ fetch, parent, params }) => {
|
||||
let data = await parent()
|
||||
|
||||
const response = await fetch(url + "/api/groups", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
Authorization: data.jwt,
|
||||
},
|
||||
})
|
||||
const groups = await response.json()
|
||||
|
||||
const responsegroup = await fetch(url + "/api/groups/" + params.slug, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
Authorization: data.jwt,
|
||||
},
|
||||
})
|
||||
const group = await responsegroup.json()
|
||||
|
||||
if (!group.error) {
|
||||
return {
|
||||
groups,
|
||||
group: group.data,
|
||||
}
|
||||
}
|
||||
throw error(404, "Not found")
|
||||
}) satisfies PageLoad
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
<script lang="ts">
|
||||
import { goto } from "$app/navigation"
|
||||
import { FileDropzone } from "@skeletonlabs/skeleton"
|
||||
import type { PageData } from "../$types"
|
||||
let groupname: string
|
||||
let groupdescription: string
|
||||
let files: FileList
|
||||
let publicgroup = true
|
||||
let disabled = true
|
||||
import Rocks from "../../../components/rocks.svelte"
|
||||
|
||||
export let data: PageData
|
||||
let jwt = data.jwt
|
||||
|
||||
$: if (groupname && files && data.user.coins >= 100) {
|
||||
disabled = false
|
||||
} else {
|
||||
disabled = true
|
||||
}
|
||||
|
||||
const toBase64 = (file: Blob) =>
|
||||
new Promise((resolve, reject) => {
|
||||
const reader = new FileReader()
|
||||
reader.readAsDataURL(file)
|
||||
reader.onload = () => resolve(reader.result)
|
||||
reader.onerror = error => reject(error)
|
||||
})
|
||||
|
||||
async function create() {
|
||||
const formData = new FormData()
|
||||
formData.append("groupicon", files[0])
|
||||
formData.append("groupname", groupname)
|
||||
formData.append("description", groupdescription ?? "...")
|
||||
formData.append("publicgroup", publicgroup.toString())
|
||||
|
||||
const req = await fetch("/api/groups/create", {
|
||||
method: "post",
|
||||
body: formData,
|
||||
headers: {
|
||||
Authorization: jwt,
|
||||
},
|
||||
})
|
||||
|
||||
const res = await req.json()
|
||||
|
||||
if (!res.error) {
|
||||
goto("/groups")
|
||||
} else {
|
||||
}
|
||||
}
|
||||
let base64: any
|
||||
async function conv() {
|
||||
base64 = await toBase64(files[0])
|
||||
}
|
||||
$: if (files) {
|
||||
conv()
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="max-w-[1200px] m-0 m-auto">
|
||||
<div class="flex flex-col gap-y-2">
|
||||
<h2 class="font-bold">Create a Group</h2>
|
||||
|
||||
<label>
|
||||
<span class="block text-sm">Group Name</span>
|
||||
<input
|
||||
bind:value={groupname}
|
||||
maxlength={20}
|
||||
type="text"
|
||||
class="input input-bordered input-primary w-full rounded-md"
|
||||
placeholder="Name of group"
|
||||
required />
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span class="block text-sm">Group Description</span>
|
||||
<textarea
|
||||
bind:value={groupdescription}
|
||||
maxlength={500}
|
||||
class="input input-bordered input-primary w-full h-64 rounded-md"
|
||||
placeholder="Description"
|
||||
required>
|
||||
</textarea>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span class="block text-sm">Icon</span>
|
||||
<input class="w-full" accept="image/png" bind:files type="file" />
|
||||
{#if base64}
|
||||
<img alt="" class="w-32 aspect-square" src={base64} />
|
||||
{/if}
|
||||
</label>
|
||||
|
||||
<h4 class="font-bold">Settings</h4>
|
||||
|
||||
<div class="space-y-4 w-full bg-surface-700 rounded-md p-4">
|
||||
<label class="flex items-center space-x-2">
|
||||
<input
|
||||
bind:group={publicgroup}
|
||||
class="radio"
|
||||
type="radio"
|
||||
checked
|
||||
name="radio-setting"
|
||||
value={true} />
|
||||
<p>Anyone can join</p>
|
||||
</label>
|
||||
|
||||
<label class="flex items-center space-x-2">
|
||||
<input
|
||||
bind:group={publicgroup}
|
||||
class="radio"
|
||||
type="radio"
|
||||
name="radio-setting"
|
||||
value={false} />
|
||||
<p>Manual Approval</p>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row gap-2 justify-end">
|
||||
<a
|
||||
href="/groups"
|
||||
class="btn variant-ringed-surface rounded-md btn-sm">
|
||||
Cancel
|
||||
</a>
|
||||
<button
|
||||
class="btn variant-filled-primary rounded-md btn-sm"
|
||||
{disabled}
|
||||
on:click={create}>
|
||||
<Rocks width="w-4" />
|
||||
100
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
let creations: any[] = []
|
||||
let editAbout = false
|
||||
let about: string
|
||||
let checkedgames = false
|
||||
//$:console.log(friends)
|
||||
async function saveabout() {
|
||||
const result = await fetch("/settings/aboutme", {
|
||||
|
|
@ -51,9 +52,14 @@
|
|||
)
|
||||
creations = await res.json()
|
||||
console.log(creations)
|
||||
checkedgames = true
|
||||
}
|
||||
|
||||
$: if (storeTab === "Games" && creations.length === 0) {
|
||||
$: if (
|
||||
storeTab === "Games" &&
|
||||
creations.length === 0 &&
|
||||
checkedgames === false
|
||||
) {
|
||||
requestGames()
|
||||
}
|
||||
|
||||
|
|
@ -326,17 +332,17 @@
|
|||
8
|
||||
? 'md:gap-y-10'
|
||||
: ''} overflow-x-scroll md:overflow-x-hidden md:overflow-y-scroll grid md:grid-cols-4 grid-flow-col md:grid-rows-none md:grid-flow-row auto-rows-max auto-cols-max">
|
||||
{#if data.profile.inventory}
|
||||
{#each data.profile.inventory as { Type, ItemId, ItemName, Equipped, Hidden }}
|
||||
{#if data.wearingItems}
|
||||
{#each data.wearingItems as { Type, ItemId, itemdata, Equipped, Hidden }}
|
||||
{#if Equipped === true && !Hidden}
|
||||
<a
|
||||
href="/catalog/{ItemId}/{ItemName.replace(
|
||||
/[^a-zA-Z ]/g,
|
||||
href="/catalog/{ItemId}/{itemdata.Name.replace(
|
||||
/[^0-9a-z ]/gi,
|
||||
'',
|
||||
).replaceAll(' ', '-')}">
|
||||
<img
|
||||
class="bg-surface-800 p-2 rounded-md w-28"
|
||||
alt={ItemName}
|
||||
alt={itemdata.Name}
|
||||
src="/api/thumbnailrender/asset/?id={ItemId}" />
|
||||
</a>
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
import { error } from "@sveltejs/kit"
|
||||
import type { PageLoad } from "./$types"
|
||||
import { url } from "$lib/url"
|
||||
|
||||
export const load = (async ({ fetch, params, parent }) => {
|
||||
let data = await parent()
|
||||
let alreadyFriends = false
|
||||
let otherUserWantsToBeFriends = false
|
||||
let wearingItems: Array<any> = []
|
||||
const res = await fetch(`http://mete0r.xyz/api/userinfo/${params.slug}`)
|
||||
const datauser = await res.json()
|
||||
|
||||
|
|
@ -36,12 +38,24 @@ export const load = (async ({ fetch, params, parent }) => {
|
|||
}
|
||||
}
|
||||
|
||||
const wearingresponse = await fetch(
|
||||
url + `/api/userinfo/${params.slug}/inventory`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ onlywearing: true }),
|
||||
},
|
||||
)
|
||||
const wearingdata = await wearingresponse.json()
|
||||
wearingItems = wearingdata.inventory
|
||||
|
||||
if (datauser.error === false) {
|
||||
return {
|
||||
profile: datauser.userinfo,
|
||||
alreadyFriends,
|
||||
otherUserWantsToBeFriends,
|
||||
visits: datavisits.visits,
|
||||
wearingItems,
|
||||
}
|
||||
}
|
||||
throw error(404, "Not found")
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import adapter from '@sveltejs/adapter-node';
|
||||
import preprocess from 'svelte-preprocess';
|
||||
import adapter from "@sveltejs/adapter-node"
|
||||
import preprocess from "svelte-preprocess"
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
kit: {
|
||||
adapter: adapter(),
|
||||
},
|
||||
preprocess: [
|
||||
preprocess({
|
||||
postcss: true,
|
||||
}),
|
||||
],
|
||||
};
|
||||
kit: {
|
||||
adapter: adapter(),
|
||||
},
|
||||
preprocess: [
|
||||
preprocess({
|
||||
postcss: true,
|
||||
}),
|
||||
],
|
||||
}
|
||||
|
||||
export default config;
|
||||
export default config
|
||||
|
|
|
|||
|
|
@ -1,17 +1,29 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
darkMode: 'class',
|
||||
content: ['./src/**/*.{html,js,svelte,ts}', require('path').join(require.resolve('@skeletonlabs/skeleton'), '../**/*.{html,js,svelte,ts}')],
|
||||
darkMode: "class",
|
||||
content: [
|
||||
"./src/**/*.{html,js,svelte,ts}",
|
||||
require("path").join(
|
||||
require.resolve("@skeletonlabs/skeleton"),
|
||||
"../**/*.{html,js,svelte,ts}",
|
||||
),
|
||||
],
|
||||
theme: {
|
||||
extend: {transitionProperty: {
|
||||
'width': 'width'
|
||||
}},
|
||||
extend: {
|
||||
transitionProperty: {
|
||||
width: "width",
|
||||
},
|
||||
},
|
||||
},
|
||||
safelist: [
|
||||
'float-left',
|
||||
'float-right',
|
||||
'h-5',
|
||||
'w-5' // status bubbles
|
||||
],
|
||||
plugins: [require('@tailwindcss/forms'),require('@tailwindcss/typography'),...require("@skeletonlabs/skeleton/tailwind/skeleton.cjs")()],
|
||||
"float-left",
|
||||
"float-right",
|
||||
"h-5",
|
||||
"w-5", // status bubbles
|
||||
],
|
||||
plugins: [
|
||||
require("@tailwindcss/forms"),
|
||||
require("@tailwindcss/typography"),
|
||||
...require("@skeletonlabs/skeleton/tailwind/skeleton.cjs")(),
|
||||
],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,44 +1,43 @@
|
|||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vite'
|
||||
let url = 'http://localhost:80'
|
||||
import { sveltekit } from "@sveltejs/kit/vite"
|
||||
import { defineConfig } from "vite"
|
||||
let url = "http://localhost:80"
|
||||
|
||||
/** @type {import('vite').UserConfig} */
|
||||
const deb = {
|
||||
target: url,
|
||||
changeOrigin: true
|
||||
}
|
||||
changeOrigin: true,
|
||||
}
|
||||
const defaultconfig = {
|
||||
plugins: [sveltekit()],
|
||||
server: {
|
||||
proxy: {
|
||||
'/login': deb,
|
||||
'/api': deb,
|
||||
'/games/': deb,
|
||||
"/develop/": deb,
|
||||
"/favicon": deb,
|
||||
"/assets": deb,
|
||||
"/settings/": deb,
|
||||
}
|
||||
}
|
||||
};
|
||||
"/login": deb,
|
||||
"/api": deb,
|
||||
"/games/": deb,
|
||||
"/develop/": deb,
|
||||
"/favicon": deb,
|
||||
"/assets": deb,
|
||||
"/settings/": deb,
|
||||
"/admin/": deb,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default defineConfig(({ command, mode, ssrBuild }) => {
|
||||
if (command === 'serve') {
|
||||
return {
|
||||
...defaultconfig
|
||||
}
|
||||
} else {
|
||||
// command === 'build'
|
||||
return {
|
||||
// build specific config
|
||||
|
||||
...{
|
||||
plugins: [sveltekit()]
|
||||
}
|
||||
if (command === "serve") {
|
||||
return {
|
||||
...defaultconfig,
|
||||
}
|
||||
} else {
|
||||
// command === 'build'
|
||||
return {
|
||||
// build specific config
|
||||
|
||||
}
|
||||
...{
|
||||
plugins: [sveltekit()],
|
||||
},
|
||||
}
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
//export default config;
|
||||
Loading…
Reference in New Issue