Commit 5292d05b authored by nanahira's avatar nanahira

Koishi rc

parent 13a24293
......@@ -27,7 +27,7 @@
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.1",
"koishi": "^4.0.0-beta.6",
"koishi": "^4.0.0-rc.0",
"prettier": "^2.4.1",
"raw-loader": "^4.0.2",
"ts-loader": "^9.2.6",
......@@ -37,7 +37,7 @@
"ws": "^8.3.0"
},
"peerDependencies": {
"koishi": "^4.0.0-beta.5"
"koishi": "^4.0.0-beta.6"
}
},
"node_modules/@aws-crypto/crc32": {
......@@ -1309,23 +1309,23 @@
}
},
"node_modules/@koishijs/core": {
"version": "4.0.0-beta.6",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.0.0-beta.6.tgz",
"integrity": "sha512-qg/ElGB2T6qAHofR3I7kEgcdqLxCEUcDNC0nUXfHMUcToBmBA3gggvW30KJvCga4VEr6sYp+XDEpa7IdyXg0Uw==",
"version": "4.0.0-rc.0",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.0.0-rc.0.tgz",
"integrity": "sha512-YHr63LnLxWaRQTYzAKq+xWf4ToYnJ/RI4VxdytOIrchwmRrUDQ19R35eO6yF2KiA+scyEZ4e7QpAIpn2pLmu5g==",
"dev": true,
"dependencies": {
"@koishijs/utils": "^5.0.0-beta.1",
"@koishijs/utils": "^5.0.0-rc.0",
"fastest-levenshtein": "^1.0.12",
"schemastery": "^2.1.1"
"schemastery": "^2.1.2"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/@koishijs/utils": {
"version": "5.0.0-beta.1",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-5.0.0-beta.1.tgz",
"integrity": "sha512-JZae1kaums2beMH+AVc7jiKYJArnqCgw+1h2kEuvnaiaSHe7qNJp+BAhMJfxrXOe3VZ/oYKoUOd71FNjzaN2RA==",
"version": "5.0.0-rc.0",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-5.0.0-rc.0.tgz",
"integrity": "sha512-aG1FjFB9NKiSqGS/tjjsSnmSfrW5yXQK7aZAR7DhsSaiF+/CdWZ0sQ9XS830xZ6PV1UwKib9alluVMULyWvrbA==",
"dev": true,
"dependencies": {
"supports-color": "^8.1.0"
......@@ -4810,14 +4810,14 @@
}
},
"node_modules/koishi": {
"version": "4.0.0-beta.6",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.0.0-beta.6.tgz",
"integrity": "sha512-okWri8SnUd3CLx8ujiDgxzNMyfw9pHoGWSKxqvKnGCeJqI/ZdWHb/B/ShWNmWQEwVxQEFsrMKEGrkReHYLfhQQ==",
"version": "4.0.0-rc.0",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.0.0-rc.0.tgz",
"integrity": "sha512-GhnBVBOzsdny5GwwcC3twDWAKwdtA5Q6P64jtwHxUxq6iV69ttKhmz76xHSWQYM2h9JoOaXyOTO4b7n4M0nTkw==",
"dev": true,
"dependencies": {
"@koa/router": "^10.1.1",
"@koishijs/core": "^4.0.0-beta.6",
"@koishijs/utils": "^5.0.0-beta.1",
"@koishijs/core": "^4.0.0-rc.0",
"@koishijs/utils": "^5.0.0-rc.0",
"@types/koa": "*",
"@types/koa__router": "*",
"@types/ws": "^7.4.7",
......@@ -4826,7 +4826,8 @@
"koa-bodyparser": "^4.3.0",
"parseurl": "^1.3.3",
"path-to-regexp": "^6.2.0",
"proxy-agent": "^5.0.0"
"proxy-agent": "^5.0.0",
"ws": "^8.2.1"
},
"engines": {
"node": ">=12.0.0"
......@@ -6043,9 +6044,9 @@
}
},
"node_modules/schemastery": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/schemastery/-/schemastery-2.1.1.tgz",
"integrity": "sha512-ORumqcbLhe4fp+eN5COUFejTxvdfAUCQCFVF4c69HuFdexbU8kgqQsOHjJ3ZXokV15xstwWHPwAVQ8/AwldROw=="
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/schemastery/-/schemastery-2.1.2.tgz",
"integrity": "sha512-iHwWfKxWaTFgZmKNULNtgyo8VDpdEWx31b6+j0tGTST8dBIYU7VYAHmq5qdYKYZ0uNSM5u57c09cuN75Yf7WwQ=="
},
"node_modules/schemastery-gen": {
"version": "2.3.0",
......@@ -8381,20 +8382,20 @@
}
},
"@koishijs/core": {
"version": "4.0.0-beta.6",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.0.0-beta.6.tgz",
"integrity": "sha512-qg/ElGB2T6qAHofR3I7kEgcdqLxCEUcDNC0nUXfHMUcToBmBA3gggvW30KJvCga4VEr6sYp+XDEpa7IdyXg0Uw==",
"version": "4.0.0-rc.0",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.0.0-rc.0.tgz",
"integrity": "sha512-YHr63LnLxWaRQTYzAKq+xWf4ToYnJ/RI4VxdytOIrchwmRrUDQ19R35eO6yF2KiA+scyEZ4e7QpAIpn2pLmu5g==",
"dev": true,
"requires": {
"@koishijs/utils": "^5.0.0-beta.1",
"@koishijs/utils": "^5.0.0-rc.0",
"fastest-levenshtein": "^1.0.12",
"schemastery": "^2.1.1"
"schemastery": "^2.1.2"
}
},
"@koishijs/utils": {
"version": "5.0.0-beta.1",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-5.0.0-beta.1.tgz",
"integrity": "sha512-JZae1kaums2beMH+AVc7jiKYJArnqCgw+1h2kEuvnaiaSHe7qNJp+BAhMJfxrXOe3VZ/oYKoUOd71FNjzaN2RA==",
"version": "5.0.0-rc.0",
"resolved": "https://registry.npmjs.org/@koishijs/utils/-/utils-5.0.0-rc.0.tgz",
"integrity": "sha512-aG1FjFB9NKiSqGS/tjjsSnmSfrW5yXQK7aZAR7DhsSaiF+/CdWZ0sQ9XS830xZ6PV1UwKib9alluVMULyWvrbA==",
"dev": true,
"requires": {
"supports-color": "^8.1.0"
......@@ -11089,14 +11090,14 @@
}
},
"koishi": {
"version": "4.0.0-beta.6",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.0.0-beta.6.tgz",
"integrity": "sha512-okWri8SnUd3CLx8ujiDgxzNMyfw9pHoGWSKxqvKnGCeJqI/ZdWHb/B/ShWNmWQEwVxQEFsrMKEGrkReHYLfhQQ==",
"version": "4.0.0-rc.0",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.0.0-rc.0.tgz",
"integrity": "sha512-GhnBVBOzsdny5GwwcC3twDWAKwdtA5Q6P64jtwHxUxq6iV69ttKhmz76xHSWQYM2h9JoOaXyOTO4b7n4M0nTkw==",
"dev": true,
"requires": {
"@koa/router": "^10.1.1",
"@koishijs/core": "^4.0.0-beta.6",
"@koishijs/utils": "^5.0.0-beta.1",
"@koishijs/core": "^4.0.0-rc.0",
"@koishijs/utils": "^5.0.0-rc.0",
"@types/koa": "*",
"@types/koa__router": "*",
"@types/ws": "^7.4.7",
......@@ -11105,7 +11106,8 @@
"koa-bodyparser": "^4.3.0",
"parseurl": "^1.3.3",
"path-to-regexp": "^6.2.0",
"proxy-agent": "^5.0.0"
"proxy-agent": "^5.0.0",
"ws": "^8.2.1"
},
"dependencies": {
"axios": {
......@@ -12025,9 +12027,9 @@
}
},
"schemastery": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/schemastery/-/schemastery-2.1.1.tgz",
"integrity": "sha512-ORumqcbLhe4fp+eN5COUFejTxvdfAUCQCFVF4c69HuFdexbU8kgqQsOHjJ3ZXokV15xstwWHPwAVQ8/AwldROw=="
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/schemastery/-/schemastery-2.1.2.tgz",
"integrity": "sha512-iHwWfKxWaTFgZmKNULNtgyo8VDpdEWx31b6+j0tGTST8dBIYU7VYAHmq5qdYKYZ0uNSM5u57c09cuN75Yf7WwQ=="
},
"schemastery-gen": {
"version": "2.3.0",
......
......@@ -41,7 +41,7 @@
"source-map-support": "^0.5.20"
},
"peerDependencies": {
"koishi": "^4.0.0-beta.6"
"koishi": "^4.0.0-rc.0"
},
"devDependencies": {
"@types/node": "^16.11.6",
......@@ -50,7 +50,7 @@
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.1",
"koishi": "^4.0.0-beta.6",
"koishi": "^4.0.0-rc.0",
"prettier": "^2.4.1",
"raw-loader": "^4.0.2",
"ts-loader": "^9.2.6",
......
......@@ -107,17 +107,21 @@ export class TournamentConfig {
return ctx.http.get<Partial<SRVProRoomInfo>>(
`${this.endpoint}/api/getrooms`,
{
username: this.username,
pass: this.password,
params: {
username: this.username,
pass: this.password,
},
},
);
}
async kickRoom(ctx: Context, search: string) {
return ctx.http.get(`${this.endpoint}/api/message`, {
username: this.username,
pass: this.password,
kick: search,
params: {
username: this.username,
pass: this.password,
kick: search,
},
});
}
}
......
......@@ -64,9 +64,11 @@ export class YGOTournamentPlugin {
const plain = await this.ctx.http.get(
`${this.config.tournament.getChallongeUrl()}.json`,
{
api_key: this.config.tournament.challongeKey,
include_participants: 1,
include_matches: 1,
params: {
api_key: this.config.tournament.challongeKey,
include_participants: 1,
include_matches: 1,
},
},
);
const data = plainToClass(TournamentWrapper, plain);
......@@ -120,7 +122,9 @@ export class YGOTournamentPlugin {
participant.participant.id
}.json`,
{
api_key: this.config.tournament.challongeKey,
params: {
api_key: this.config.tournament.challongeKey,
},
},
);
this.ctx
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment