Commit 5292d05b authored by nanahira's avatar nanahira

Koishi rc

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