Compare commits

...

2 Commits

Author SHA1 Message Date
47c85f70eb v0.9.9 2020-10-02 20:00:31 +08:00
da9e2063ca fix: continer Autowired error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-10-02 19:57:10 +08:00
17 changed files with 49 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
{ {
"version": "0.9.8", "version": "0.9.9",
"useWorkspaces": true, "useWorkspaces": true,
"npmClient": "yarn", "npmClient": "yarn",
"packages": [ "packages": [

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/amqp", "name": "@ccms/amqp",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript amqp package", "description": "MiaoScript amqp package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -19,9 +19,9 @@
"test": "echo \"Error: run tests from root\" && exit 1" "test": "echo \"Error: run tests from root\" && exit 1"
}, },
"dependencies": { "dependencies": {
"@ccms/api": "^0.9.8", "@ccms/api": "^0.9.9",
"@ccms/common": "^0.9.8", "@ccms/common": "^0.9.8",
"@ccms/container": "^0.9.8" "@ccms/container": "^0.9.9"
}, },
"devDependencies": { "devDependencies": {
"@ccms/nashorn": "^0.9.8", "@ccms/nashorn": "^0.9.8",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/api", "name": "@ccms/api",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript api package", "description": "MiaoScript api package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -20,7 +20,7 @@
}, },
"dependencies": { "dependencies": {
"@ccms/common": "^0.9.8", "@ccms/common": "^0.9.8",
"@ccms/container": "^0.9.8", "@ccms/container": "^0.9.9",
"@ccms/ployfill": "^0.9.8", "@ccms/ployfill": "^0.9.8",
"base64-js": "^1.3.1", "base64-js": "^1.3.1",
"source-map-builder": "^0.0.7" "source-map-builder": "^0.0.7"

View File

@@ -1,4 +1,4 @@
import { provideSingleton, Autowired } from '@ccms/container' import { provideSingleton, Autowired, optional } from '@ccms/container'
import { channel } from './channel' import { channel } from './channel'
export namespace proxy { export namespace proxy {
@@ -44,7 +44,7 @@ export namespace proxy {
* Get a list of players connected on a certain server, or on ALL the servers. * Get a list of players connected on a certain server, or on ALL the servers.
* @param server count server * @param server count server
* Response: * Response:
* String server = in.readUTF(); // The name of the server you got the player list of, as given in args. * String server = in.readUTF(); // The name of the server you got the player list of, as given in args.
* String[] playerList = in.readUTF().split(", "); * String[] playerList = in.readUTF().split(", ");
*/ */
playerList(server: string | "ALL") { playerList(server: string | "ALL") {
@@ -98,7 +98,7 @@ export namespace proxy {
return this.forward("ALL", channel, data) return this.forward("ALL", channel, data)
} }
/** /**
* Send a custom plugin message to said server. This is one of the most useful channels ever. * Send a custom plugin message to said server. This is one of the most useful channels ever.
* Remember, the sending and receiving server(s) need to have a player online. * Remember, the sending and receiving server(s) need to have a player online.
* @param server reciver * @param server reciver
* @param channel channelName * @param channel channelName
@@ -112,7 +112,7 @@ export namespace proxy {
return this.finalSend() return this.finalSend()
} }
/** /**
* Send a custom plugin message to said server. This is one of the most useful channels ever. * Send a custom plugin message to said server. This is one of the most useful channels ever.
* Remember, the sending and receiving server(s) need to have a player online. * Remember, the sending and receiving server(s) need to have a player online.
* @param server reciver * @param server reciver
* @param channel channelName * @param channel channelName
@@ -147,6 +147,7 @@ export namespace proxy {
} }
@provideSingleton(BungeeCord) @provideSingleton(BungeeCord)
export class BungeeCord { export class BungeeCord {
@optional()
@Autowired() @Autowired()
private channel: channel.Channel private channel: channel.Channel
/** /**
@@ -157,4 +158,4 @@ export namespace proxy {
return new bungeecord.SubChannelBuilder(this.channel, player) return new bungeecord.SubChannelBuilder(this.channel, player)
} }
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/bukkit", "name": "@ccms/bukkit",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript bukkit package", "description": "MiaoScript bukkit package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -25,8 +25,8 @@
"typescript": "^4.0.3" "typescript": "^4.0.3"
}, },
"dependencies": { "dependencies": {
"@ccms/api": "^0.9.8", "@ccms/api": "^0.9.9",
"@ccms/common": "^0.9.8", "@ccms/common": "^0.9.8",
"@ccms/container": "^0.9.8" "@ccms/container": "^0.9.9"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/bungee", "name": "@ccms/bungee",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript bungee package", "description": "MiaoScript bungee package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -25,8 +25,8 @@
"typescript": "^4.0.3" "typescript": "^4.0.3"
}, },
"dependencies": { "dependencies": {
"@ccms/api": "^0.9.8", "@ccms/api": "^0.9.9",
"@ccms/common": "^0.9.8", "@ccms/common": "^0.9.8",
"@ccms/container": "^0.9.8" "@ccms/container": "^0.9.9"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/container", "name": "@ccms/container",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript container package", "description": "MiaoScript container package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",

View File

@@ -66,7 +66,7 @@ export const Autowired = (className?: any) => {
return inject(className)(target, propertyKey, index) return inject(className)(target, propertyKey, index)
} }
let type = Reflect.getMetadata('design:type', target, propertyKey) let type = Reflect.getMetadata('design:type', target, propertyKey)
if (type && type !== Object && Java.isJavaObject(type)) { if (type && type !== Object && !Java.isJavaObject(type)) {
inject(type)(target, propertyKey, index) inject(type)(target, propertyKey, index)
named(className || propertyKey)(target, propertyKey, index) named(className || propertyKey)(target, propertyKey, index)
} else if (container.isBound(ioc.Autowired)) { } else if (container.isBound(ioc.Autowired)) {

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/core", "name": "@ccms/core",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript api package", "description": "MiaoScript api package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -24,8 +24,8 @@
"typescript": "^4.0.3" "typescript": "^4.0.3"
}, },
"dependencies": { "dependencies": {
"@ccms/api": "^0.9.8", "@ccms/api": "^0.9.9",
"@ccms/container": "^0.9.8" "@ccms/container": "^0.9.9"
}, },
"gitHead": "781524f83e52cad26d7c480513e3c525df867121" "gitHead": "781524f83e52cad26d7c480513e3c525df867121"
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/database", "name": "@ccms/database",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript database package", "description": "MiaoScript database package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -25,7 +25,7 @@
"typescript": "^4.0.3" "typescript": "^4.0.3"
}, },
"dependencies": { "dependencies": {
"@ccms/api": "^0.9.8", "@ccms/api": "^0.9.9",
"@ccms/container": "^0.9.8" "@ccms/container": "^0.9.9"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/keyvalue", "name": "@ccms/keyvalue",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript keyvalue package", "description": "MiaoScript keyvalue package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -19,9 +19,9 @@
"test": "echo \"Error: run tests from root\" && exit 1" "test": "echo \"Error: run tests from root\" && exit 1"
}, },
"dependencies": { "dependencies": {
"@ccms/api": "^0.9.8", "@ccms/api": "^0.9.9",
"@ccms/common": "^0.9.8", "@ccms/common": "^0.9.8",
"@ccms/container": "^0.9.8" "@ccms/container": "^0.9.9"
}, },
"devDependencies": { "devDependencies": {
"@ccms/nashorn": "^0.9.8", "@ccms/nashorn": "^0.9.8",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/nukkit", "name": "@ccms/nukkit",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript nukkit package", "description": "MiaoScript nukkit package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -25,8 +25,8 @@
"typescript": "^4.0.3" "typescript": "^4.0.3"
}, },
"dependencies": { "dependencies": {
"@ccms/api": "^0.9.8", "@ccms/api": "^0.9.9",
"@ccms/common": "^0.9.8", "@ccms/common": "^0.9.8",
"@ccms/container": "^0.9.8" "@ccms/container": "^0.9.9"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/plugin", "name": "@ccms/plugin",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript api package", "description": "MiaoScript api package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -25,9 +25,9 @@
"typescript": "^4.0.3" "typescript": "^4.0.3"
}, },
"dependencies": { "dependencies": {
"@ccms/api": "^0.9.8", "@ccms/api": "^0.9.9",
"@ccms/common": "^0.9.8", "@ccms/common": "^0.9.8",
"@ccms/container": "^0.9.8", "@ccms/container": "^0.9.9",
"@ccms/i18n": "^0.9.8", "@ccms/i18n": "^0.9.8",
"js-yaml": "^3.14.0" "js-yaml": "^3.14.0"
} }

View File

@@ -1,7 +1,7 @@
{ {
"private": true, "private": true,
"name": "@ccms/plugins", "name": "@ccms/plugins",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript plugins package", "description": "MiaoScript plugins package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -28,8 +28,8 @@
"typescript": "^4.0.3" "typescript": "^4.0.3"
}, },
"dependencies": { "dependencies": {
"@ccms/api": "^0.9.8", "@ccms/api": "^0.9.9",
"@ccms/container": "^0.9.8", "@ccms/container": "^0.9.9",
"@ccms/plugin": "^0.9.8" "@ccms/plugin": "^0.9.9"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/sponge", "name": "@ccms/sponge",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript api package", "description": "MiaoScript api package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -25,8 +25,8 @@
"typescript": "^4.0.3" "typescript": "^4.0.3"
}, },
"dependencies": { "dependencies": {
"@ccms/api": "^0.9.8", "@ccms/api": "^0.9.9",
"@ccms/common": "^0.9.8", "@ccms/common": "^0.9.8",
"@ccms/container": "^0.9.8" "@ccms/container": "^0.9.9"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/spring", "name": "@ccms/spring",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript spring package", "description": "MiaoScript spring package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -24,9 +24,9 @@
"typescript": "^4.0.3" "typescript": "^4.0.3"
}, },
"dependencies": { "dependencies": {
"@ccms/api": "^0.9.8", "@ccms/api": "^0.9.9",
"@ccms/common": "^0.9.8", "@ccms/common": "^0.9.8",
"@ccms/container": "^0.9.8", "@ccms/container": "^0.9.9",
"@ccms/database": "^0.9.8" "@ccms/database": "^0.9.9"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ccms/web", "name": "@ccms/web",
"version": "0.9.8", "version": "0.9.9",
"description": "MiaoScript web package", "description": "MiaoScript web package",
"keywords": [ "keywords": [
"miaoscript", "miaoscript",
@@ -29,7 +29,7 @@
"typescript": "^4.0.3" "typescript": "^4.0.3"
}, },
"dependencies": { "dependencies": {
"@ccms/api": "^0.9.8", "@ccms/api": "^0.9.9",
"@ccms/container": "^0.9.8" "@ccms/container": "^0.9.9"
} }
} }